Skip to content

Commit

Permalink
u5deck2 - comparing two proportions: slides + app ex + post
Browse files Browse the repository at this point in the history
  • Loading branch information
mine-cetinkaya-rundel committed Mar 18, 2015
1 parent 583cd40 commit 5f7b8d7
Show file tree
Hide file tree
Showing 18 changed files with 1,098 additions and 93 deletions.
Binary file not shown.
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 not shown.
Binary file not shown.

This file was deleted.

Binary file removed Slides/05_Unit5/deck1/figures/emotion/low.pdf
Binary file not shown.
8 changes: 8 additions & 0 deletions Slides/05_Unit5/deck2/figures/malaria/malaria.R
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 added Slides/05_Unit5/deck2/figures/malaria/malaria.pdf
Binary file not shown.
Binary file added Slides/05_Unit5/deck2/u5_deck2.pdf
Binary file not shown.
Loading

0 comments on commit 5f7b8d7

Please sign in to comment.