\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{geometry}
\usepackage{amssymb}     
\usepackage{graphicx}
\geometry{top=1in,bottom=1in,left=1in,right=1in}
\setlength{\parindent}{0in}
\setlength{\parskip}{2ex}

\begin{document}
\begin{center}
\begin{tabular*}{6.5in}{l@{\extracolsep{\fill}}r}
\multicolumn{2}{c} {\bfseries Solutions to Problem Set 1 } \\
& \\
EC 2228 03, Spring 2015  & Prof. Baum, Mr. Zhang \\
\\
\end{tabular*}
\end{center}
\begin{center}
\textbf{Maximum number of points for Problem set 1 is: 40}
\end{center}
\begin{center}
\textbf{Problem A.7.}
\end{center}
(i) (2 pts.) By exponentiating the left and right sides of the equation we get: 
$$Salary= e^{10.6+.027exper}$$ 
Therefore, for $exper=0$, we have $Salary_{1}=e^{10.6}\approx40134.84$, and for $exper=5$,
$Salary_{2}=e^{10.6+.027*5}=e^{10.735}\approx45935.80$.

(ii) (2 pts.) $\frac{Salary_{2}-Salary_{1}}{Salary_{1}}\approx \ln{Salary_{2}-\ln{Salary_{1}}}=.735-.6=.135$

(iii) (2 pts.) $\frac{Salary_{2}-Salary_{1}}{Salary_{1}}=\frac{45935.80-40134.84}{40134.80}\approx.144>.135$

\begin{center}
\textbf{Problem A.10.}
\end{center}
(i) (2 pts.) It means that the average score is 45.6 when the class size is zero. It is not of much interest because we are not interested in the class of no class.

(ii) (2 pts.) $\frac{\partial score}{\partial class}=0.082-2\times 0.000147 \times class=0 \Rightarrow class=278.91 \Rightarrow 279$ students.

The highest score $=score (class=279)=45.6+0.082\times 279-0.000147\times (279)^2=57.04$.

(iii) (2 pts.) 
\begin{figure}[!h]
\includegraphics[width=3in]{ps1.jpg}
\end{figure}

(iv) (2 pts.) They don't seem likely have a deterministic relationship because there are probably other factors affecting the score beyond the class size.

\begin{center}
\textbf{Problem B.2.}
\end{center}

(i) (2 pts.) P($X\leq 6)=P[(X-5)/2\leq (6-5)/2]=P(Z\leq 0.5)\approx 0.692.$,
where $Z$ denotes a Normal(0,1) random variable. [We obtain
$P(Z)\leq 0.5$ from Table G.1]

(ii) (2 pts.) $P(X>4)=P[(X-5)/2>(4-5)/2]=P(Z>-0.5)=P(Z\leq 0.5)\approx 0.692$.

(iii) (2 pts.) $P(|X-5|>1)=P(X-5>1)+P(X-5<-1)=P(X>6)+P(X<4)\approx
(1-0.692)+(1-0.692)=0.616$, where we have used answers from parts
(i) and (ii).

\begin{center}
\textbf{Problem B.4.}
\end{center}

(3 pts.) $Pr(X \ge .6) = 1-Pr(X < .6) = 1-F (.6) = 0.3520$.

\begin{center}
\textbf{Problem C.1.}
\end{center}

(i) (2 pts.) This is just a special case of what we covered in the text, with
$n=4: E(\bar{Y})=\mu$ and $Var(\bar{Y})=\sigma^2/4$.

(ii)(2 pts.) $E(W)=E(Y_{1})/8+E(Y_{2})/8+E(Y_{3})/4+E(Y_{4})/2=\mu[(1/8)+(1/8)+(1/4)+(1/2)]=\mu(1+1+2+4)/8=\mu$,
which shows that $W$ is unbiased. 
\newline
Because the $Y_{i}$ are independent with the same variance $\sigma^2$ and because $Var(aY)=a^2Var(Y)$ for any constant $a$ and variable $Y$,
\begin{equation}
\begin{split}
Var(W)=Var(Y_{1})/64+Var(Y_{2})/64+Var(Y_{3})/16+Var(Y_{4})/4=\\
=\sigma^2((1/64)+(1/64)+(4/64)+(16/64))=\sigma^2(22/64)=\sigma^2(11/32).
\end{split}
\end{equation}

(iii) (2 pts.) Because $11/32>8/32=1/4, Var(W)>Var(\bar{Y})$ for any
$\sigma^2>0$, so $\bar{Y}$ is preferred to $W$ because each is
unbiased.

\begin{center}
\textbf{Problem C.6.}
\end{center}

(i)  (1 pt.) $H_{0}:\mu=0$

(ii) (1 pt.) $H_{1}:\mu<0$

(iii) (2 pts.) The standard error of $\bar{y}$ is $s/\sqrt
n=466.4/30\approx15.55.$ Therefore, the t statistic for testing
$H_{0}:\mu=0$ is $t=\bar y/se(\bar y)=-32.8/15.55\approx -2.11$. We
obtain the p-value as $P(Z\leq -2.11)$, where $Z \sim$ Normal(0,1).
These probabilities are in Table G.1: p-value=.0174. Because the
p-value is below .05, we reject $H_0$ against the
one-sided alternative at the 5 percent level. We do not reject at the 1 percent level 
because p-value $=.0174 > .01$.

(iv) (1 pt.) The estimated reduction, about 33 ounces, does not seem large
for an entire year's consumption. If the alcohol is beer, 33 ounces
is less than three 12-ounces cans of beer. Even if this is hard
liquor, the reduction seems small. (On the other hand, when
aggregated across the entire population, alcohol distributors might
not think the effect is so small.)

(v) (1 pt.) The implicit assumption is that other factors that affect liquor
consumption - such as income, or changes in price due to
transportation costs, are constant over the two years.
\begin{center}
\textbf{Problem 7}
\end{center}
\begin{itemize}
\item[(a)] (1 pt.) \textsf{tab female}.
There are 252 females (indicated by a 1 in the female column) and 274 males (indicated by a zero in the female column) in this dataset. 
\item[(b)](1 pt.) \textsf{summ wage if female}.
The average wage for a female is 4.587659.
\item[(c)] (1 pt.) \textsf{summ wage if female, detail}.
The results shows the value for different percentiles. Obviously, the 50 percentile will also be the median. Thus the median wage for a female is 3.75. \\
Or you can use \textsf{tabstat wage, by(female) statistics(n mean median)}, the reported p50 is the same as the median. 
\item[(d)] (1 pt.) \textsf{tab nonwhite}.
There are 54 nonwhites in this dataset. 
\item[(e)] (1 pt.) \textsf{summ wage if nonwhite} returns the mean wage for nonwhites, which is 5.475926, \textsf{summ wage if nonwhite==0} gives the mean wage for whites 5.944174. Thus nonwhites earn, on average, 0.468248 less than whites. \\
Or you can use the \textsf{ttest} command as in the next question, the difference between two group means is also reported. 
\end{itemize}


\end{document}