\documentclass[12pt]{article}
\usepackage{verbatim, amssymb, amsmath, float, fullpage}
\begin{document}
\title{36-303 Sampling, Surveys \& Society \\ Homework 03 Solutions}
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  PROB1  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Question 1}
On page 171 of the textbook, you can find discussion about the question order effect.  Question order are significantly less likely to occur 
in a self-administered survey than in a telephone or face-to-face survey.   



\section{Question 2}
Let's call $\sum_i^np_{ij}=p_{+j}$ and $\sum_j^np_{ij}=p_{i+}$. Note that $\Pr[X = x_i] = p_{i+}$ and that $\Pr[Y = y_j] = p_{+j}$. Note also that $\sum_{i=1}^n\sum_{j=1}^n p_{ij}=1$
\subsection*{a)}
\begin{eqnarray}
E\left[ aX + bY + c\right] &=& \sum_{i=1}^n\sum_{j=1}^n\left( ax_i + by_i + c \right)p_{ij}\\
&=& a\sum_{i=1}^n\sum_{j=1}^nx_ip_{ij} + b\sum_{i=1}^n\sum_{j=1}^n y_jp_{ij} +c\sum_{i=1}^n\sum_{j=1}^np_{ij}\\
&=& a\sum_{i=1}^n x_i p_{i+} + b\sum_{j=1}^n y_jp_{+j} +c\\
&=& aEX + bEY +c
\end{eqnarray}

\subsection*{b)}
\begin{eqnarray}
V\left[ aX + bY + c\right] &=& \underbrace{E\left[ \left(aX + bY + c\right)^2\right]}_\alpha  - \underbrace{E\left[aX + bY + c\right]^2}_\beta
\end{eqnarray}
\begin{eqnarray}
\alpha &=&  a^2\sum_{i=1}^n\sum_{j=1}^nx_i^2p_{ij}
+b^2\sum_{i=1}^n\sum_{j=1}^ny_j^2p_{ij} + c^2 +2ab\sum_{i=1}^n\sum_{j=1}^nx_iy_jp_{ij} \\
\nonumber && +2ac\sum_{i=1}^n\sum_{j=1}^nx_iy_jp_{ij} +2bc\sum_{i=1}^n\sum_{j=1}^nx_iy_jp_{ij} + 2c^2 \sum_{i=1}^n\sum_{j=1}^np_{ij}\\
&=& a^2EX^2 + b^2EY^2 + 2abEXY + 2acEXY + 2c^2
\end{eqnarray}
\begin{eqnarray}
\beta &=& a^2E[X]^2 + b^2E[Y]^2 +c^2 +2abEXEY + 2acEX + 2c^2
\end{eqnarray}
Finally,
\begin{eqnarray}
Var[aX + bY + c] &=& \alpha - \beta\\
&=& a^2\left[ EX^2 -E[X]^2 \right] + b^2\left[ EY^2 -E[Y]^2 \right]\\
\nonumber && 2ab\left[ EXY - EXEY \right]\\
&=& a^2V[X] + b^2V[Y] + 2ab\text{Cov}[X,Y]
\end{eqnarray}
\subsection*{c)}
If $X$ and $Y$ are independent $p_{ij} = p_i\cdot p_j = p_{i+} \cdot p_{+j}$,
\begin{eqnarray}
E[X|Y=y_j] &=& \sum_{i=1}^kx_i P(X=x_i | Y= y_j)\\
&=& \sum_{i=1}^kx_i {P(X=x_i , Y= y_j) \over P(Y= y_j)}\\
&=& \sum_{i=1}^kx_i {p_{i+} \cdot p_{+j} \over p_{+j}}\\
&=& \sum_{i=1}^kx_i \cdot {p_{i+} }\\
&=& E[X]
\end{eqnarray}
\section{Question 3}
\subsection{a)} 
\begin{eqnarray}
E[\hat\pi] &=& E\left[ \frac{\hat\lambda - 1/2(1-p)}{p} \right]\\
&=& \frac{1}{p} E\hat\lambda - \frac{1}{2p}(1-p)
\end{eqnarray}
$\hat\lambda$ is defined as the fraction of ``Yes'' answers in the survey, therefore, $n\hat\lambda \sim Binomial(n, P(Yes))$ and $E[n\hat\lambda] = nP(Yes) = n\lambda$. Thus, $E\hat\lambda = \lambda$. Replacing,
\begin{eqnarray}
E[\hat\pi] &=& \frac{1}{p} \lambda - \frac{1}{2p}(1-p)\\
&=& \frac{\lambda - 1/2(1-p)}{p}\\
&=& \pi
\end{eqnarray}

\subsection{b)}
\begin{eqnarray}
V[\hat\pi] &=& V\left[ \frac{\hat\lambda - 1/2(1-p)}{p} \right]\\
&=& V\left[ \frac{\hat\lambda}{p} \right] \\
&=& \frac{1}{p^2}V[\hat\lambda]
\end{eqnarray}
>From the last result, 
\begin{eqnarray}
\lim_{p \to 1}V[\hat\pi] = \lim_{p \to 1}\frac{1}{p^2}V[\hat\lambda]=V[\hat\lambda]
\end{eqnarray}

\subsection{c)}
Using a normal approximation, a 95\% confidence interval for $\pi$ can be constructed as $\hat\pi \pm 2\cdot se(\hat\pi)$. Therefore, the width of the interval is $w=4\cdot se(\hat\pi)$. If we want the confidence interval be only 0.02 wide then, $se(\hat\pi) = 0.02/4 = 0.005$.\\
\begin{eqnarray}
se(\hat\pi)^2 &=& V[\hat\pi]\\
&=& \frac{1}{p^2}V[\hat\lambda]
\end{eqnarray}
Since $n\hat\lambda \sim Binomial(n, P(Yes))$,
\begin{eqnarray}
se(\hat\pi)^2 &=& \frac{1}{p^2} V[ \frac{1}{n} n\hat\lambda]\\
&=& \frac{1}{p^2n^2} V[ n\hat\lambda]\\
&=& \frac{1}{p^2n^2} n(1-\lambda)\lambda\\
&=& \frac{\lambda}{np^2} (1-\lambda)
\end{eqnarray}
Since we know $p=1/2$ and we assume $\pi = 0.1$, 
\begin{eqnarray}
\lambda = \pi p + {1 \over 2} (1-p) = 0.3
\end{eqnarray}
and
$$se(\hat\pi)^2 = \frac{4}{n}\times 0.3(1-0.3)$$
Solving for $n$ we get
\begin{eqnarray}
n = \frac{4}{0.005^2}\times 0.3(1-0.3) = 33600
\end{eqnarray}


\section{Question 4}
part a) this question measures people's attitudes toward president Obama, U.S military, energy independence and public lighting.
I don't think the analytic goal is met because the sentence wording fall into the bipolar approach category (as discussed on page 249 in the textbook).  It forces respondents to choose among positive and negative emotions.  \\
part b) The first problem with this question is that there is no "other " category.  Second, the definitions of some of the choices are ambiguous.  For example, what does a "tune-up" or "transmission overhaul" consist of?  third, there are overlap among some of the options.  For example, "oil change" is technically part of a "fluid replacement".  Lastly, the question only allows one or two answers, but an individual may have had more service work done so options lower down on the list may be possibly ignored.\\
part c) 
Ex.1 It is probably difficult for the respondent to remember specific activity information from the previous four weeks.  It may be better to ask what types of household activities they perform on a regular basis.  Also, some of the options have overlapping meanings.  One possible rewording can be " During the past four weeks, what type of household activities have you done on a regular basis?"\\
Ex. 2 First, the question is asking information that may be sensitive to respondents.  Secondly, "times" are a very ambiguous measure for the question purpose.  One possible wording may be "How many days of the past week did you drink alcoholic beverages?"\\
Ex. 3 I think income and finance type of questions may be sensitive to some respondents.  It may be better to ask a self-administered survey type of question.  Secondly, the sentence may be hard for respondents to understand and there are many information I consider repetitive.  One possible wording may be " What would be the smallest income you family need to meet the expenses you consider necessary?  "\\
Ex. 4 I think the problem of this sentence is that the question covers too broad of a time period for respondents to remember easily.  There is also redundant information in the question. 
One possible wording is "During the past 6 months, how many times did you get sick or injured that resulted in staying home or hospital more than half the day?" 
\end{document}
