forked from mine-cetinkaya-rundel/sta101_sp15
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
u5deck2 - comparing two proportions: slides + app ex + post
- Loading branch information
1 parent
583cd40
commit 5f7b8d7
Showing
18 changed files
with
1,098 additions
and
93 deletions.
There are no files selected for viewing
Binary file added
BIN
+30.4 KB
Application Exercises/5.2 Inference for comparing two proportions/app_Two_prop_inf.pdf
Binary file not shown.
84 changes: 84 additions & 0 deletions
84
Application Exercises/5.2 Inference for comparing two proportions/app_Two_prop_inf.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
% -*- TeX-engine: xetex; eval: (auto-fill-mode 0); eval: (visual-line-mode 1); -*- | ||
% Compile with XeLaTeX | ||
|
||
\documentclass[11pt]{article} | ||
\input{../app_style.tex} | ||
|
||
%%%%%%%%%%%%%%%% | ||
% Timing | ||
%%%%%%%%%%%%%%%% | ||
|
||
% 15-20 minutes | ||
|
||
%%%%%%%%%%%%%%%% | ||
% Sakai link for course | ||
%%%%%%%%%%%%%%%% | ||
|
||
% UPDATE FOR OWN COURSE | ||
% LINK TO ASSIGNMENTS TOOL IN SAKAI | ||
|
||
\newcommand{\Sakai}[1] | ||
{\href{https://sakai.duke.edu/portal/site/ba0d1c18-ba55-473f-9d70-b6a1f9559bbe/page/9870858b-a1a9-481e-8497-8a6ffe9e5be2}{Sakai}} | ||
|
||
%%%%%%%%%%% | ||
% App Ex number % | ||
%%%%%%%%%%% | ||
|
||
% DON'T FORGET TO UPDATE | ||
|
||
\newcommand{\appno}[1] | ||
{5.2} | ||
|
||
%%%%%%%%%%%%%% | ||
% Turn on/off solutions % | ||
%%%%%%%%%%%%%% | ||
|
||
% Off | ||
\newcommand{\soln}[1]{ | ||
\vskip5pt | ||
} | ||
|
||
%% On | ||
%\newcommand{\soln}[1]{ | ||
%\textit{\textcolor{custom_darkGray}{#1}} | ||
%} | ||
|
||
%%%%%%%%%%%%%%%% | ||
% Document | ||
%%%%%%%%%%%%%%%% | ||
|
||
\begin{document} | ||
\fontspec[Ligatures=TeX]{Helvetica Neue Light} | ||
|
||
Dr. \c{C}etinkaya-Rundel \hfill Data Analysis and Statistical Inference \\ | ||
|
||
\ttl{Application exercise \appno{}: \\ | ||
Inference for comparing two proportions} | ||
|
||
\inst{Submit your responses on \Sakai{}, under the appropriate assignment. Only one submission per team is required. One team will be randomly selected and their responses will be discussed.} | ||
|
||
\section*{Raise teacher pay vs. cut taxes} | ||
|
||
A 2014 Public Policy Polling survey asked NC residents whether they would prefer that the General Assembly raises teacher pay or cuts taxes. Overall it was found that 54\% of respondents preferred raising teacher pay, 36\% prefer cutting taxes, and 10\% were not sure. | ||
|
||
Some of these interviews were conducted over the phone, and others (for those without a landline) were conducted on the internet. Ideally we would like to see no significant difference based on whether the interviews were conducted over the phone or on the internet. | ||
|
||
Findings of the report can be found at \url{http://www.publicpolicypolling.com/pdf/2014/PPP_Release_NC_514.pdf}. | ||
|
||
\begin{enumerate} | ||
|
||
\item How many NC residents were polled as part of this survey? | ||
|
||
\item How many of them were polled via phone vs. on the internet? | ||
|
||
\item State the distribution of responses to the question on raising teacher pay vs. cutting taxes by mode of delivery of the survey. \textit{Hint:} All you need to do is to find the corresponding table on the report. | ||
|
||
\item Conduct a hypothesis test evaluating whether opinion on raising teacher pay varies by mode of delivery (phone / internet). \textit{Hint:} Make sure to state the hypotheses, check conditions, calculate the appropriate test statistic, and the p-value. | ||
|
||
\item If you find a significant difference between these proportions, look through the remainder of the findings from the report to try to explain what might be causing this difference? | ||
|
||
\end{enumerate} | ||
|
||
% | ||
|
||
\end{document} |
Binary file removed
BIN
-57.1 KB
... last semester/5.1 Inference for comparing two proportions/app_5.1_Inference_two_prop.pdf
Binary file not shown.
Binary file removed
BIN
-6.17 KB
...emester/5.1 Inference for comparing two proportions/app_5.1_Inference_two_prop.synctex.gz
Binary file not shown.
91 changes: 0 additions & 91 deletions
91
... last semester/5.1 Inference for comparing two proportions/app_5.1_Inference_two_prop.tex
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
library("downloader") | ||
|
||
download("https://stat.duke.edu/~mc301/data/vacc_malaria.csv", destfile = "vacc_malaria.csv") | ||
vacc_malaria = read.csv("vacc_malaria.csv") | ||
|
||
pdf("malaria.pdf", height = 3, width = 8) | ||
inference(vacc_malaria$outcome, vacc_malaria$group, success = "malaria", est = "proportion", type = "ht", null = 0, alternative = "twosided", method = "simulation", seed = 1028) | ||
dev.off() |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.