\documentclass[twocolumn]{article}

\setlength{\oddsidemargin}{-0.5in}
\setlength{\evensidemargin}{-0.5in}
\setlength{\topmargin}{0.0in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\textwidth}{7.0in}
\setlength{\textheight}{9.5in}
\setlength{\parindent}{0in}
\setlength{\parskip}{0.05in}
\setlength{\columnseprule}{0.3pt}
\usepackage{fancyvrb}
\usepackage{relsize}

\begin{document}

Name: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

Directions: {\bf Work only on this sheet} (on both sides, if needed); do not
turn in any supplementary sheets of paper. There is actually plenty of room
for your answers, as long as you organize yourself BEFORE starting writing.
In order to get full credit, {\bf SHOW YOUR WORK}.

{\bf IMPORTANT NOTE:}  Leave definite integrals as is.  For example,
write $\int_{0}^{1} x^2 ~ dx$ instead of 1/3.


{\bf 1.} Consider the bus example in Section 5 of the PLN which reviews
continuous random variables.  

\begin{itemize}

\item [(a)] () Find $P(Y > 10)$.

\item [(b)] () Write $Y = Y_1 + Y_2$, with $Y_1$ being the time since
the last bus when I arrive, and with $Y_2$ being the time that I wait
for the next bus.  The fact that Y has an Erlang distribution tells us
what about $Y_1$ and $Y_2$?

\end{itemize}

{\bf 2.} () In our ordinary coins which we use every day, each one has a
slightly different probability of heads, R.  Say R has the distribution
$N(0.5, 0.03^2)$.  Choose a coin from a batch at random, then toss it 10
times.  Let N be the number of heads we get.  Find Var(N).

{\bf 3.} Say we roll a die n times.  Let $C_n = (N_{1n},...,N_{5n})$,
where $N_{in}$ is the number of rolls for which the side facing upward
shows i dots.

\begin{itemize}

\item [(a)] Why is $C_n$ approximately normal?

\item [(b)] What is its covariance matrix?
 
\end{itemize}

{\bf Solutions:}

{\bf 1.a}  $\int_{10}^{\infty} 0.01t e^{-0.1t} ~ dt$

{\bf 1.b}  As noted in the PLN, Y has a two-component Erlang
distribution, so it is a sum of two independent exponentially
distributed random variables with the same parameter.  By the Markov
property, $Y_2$ is exponentially distributed, so $Y_1$ must be the
``other'' exponential component.  So, we can conclude that (i) $Y_1$ and
$Y_2$ are exponentially distributed  with mean 10, (ii) they are
independent.

{\bf 2.}  From the PLN, we know that

\begin{equation}
\label{tot}
Var(N) = E[Var(N|R)]+Var[E(N|R)]
\end{equation}

Note carefully that even though there are integrals involved here, there
will be {\bf NO EXPLICIT INTEGRALS IN THIS SOLUTION}.  This illustrates
the real usefulness of the Theorem of Total Expectation.

Let's evaluate E[Var(N$|$R)] first.  The conditional distribution of
N, given R, is binomial with n = 10 and p = R.  Therefore

\begin{equation}
Var(N|R) = 10R(1-R)
\end{equation}

and thus

\begin{equation}
\label{1st}
E[Var(N|R)] = 10 \left [E(R) - E(R^2) \right ]
\end{equation}

We can get $E(R^2)$ from the relation $Var(R) = E(R^2) - (ER)^2$.
Substituting this in (\ref{1st}), we have

\begin{equation}
E[Var(N|R)] = 10 \left [
0.5 - (0.03^2+0.5^2) 
\right ] \approx 2.5
\end{equation}

As to the second term in (\ref{tot}), we have that

\begin{equation}
Var[E(N|R)] = Var(10R) = 100 \cdot 0.03^2 \approx 0.1
\end{equation}

Thus $Var(N) \approx 2.6$.

{\bf 3.a}  This is due to the {\it multivariate} Central Limit Theorem,
applied to the vectors $U_i = (V_{1i},...,V_{5i})$, where $V_{ji}$ is 1
if the $i^{th}$ roll of the die produces j, 0 otherwise, j = 1,...,5.

(Note carefully that this is a generalization of the analysis we used in
our PLN unit on continuous random variables to show that the binomial is
approximately normal.)

Since 

\begin{equation}
C_n = \sum_{i=1}^n U_i
\end{equation}

the multivariate CLT says that $C_n$ is approximately normal.

{\bf 3.b}  

\begin{eqnarray}
Cov(N_{rn}, N_{sn}) 
&=& Cov \left [ \sum_{i=1}^n V_{ri}, \sum_{k=1}^n V_{sk} \right ] \\
&=& \sum_{i=1}^n \sum_{k=1}^n Cov(V_{ri}, V_{sk} ) \\
&=& \sum_{i=1}^n Cov(V_{ri}, V_{si} ) 
\end{eqnarray}

where the second equality comes from the bilinearity of
$Cov(\cdot,\cdot)$ and the third comes from the fact that the
independence of the rolls of the die implies that $Cov(V_{ri}, V_{sk}) =
0$ when $i \neq k$.

Now for $r \neq s$,

\begin{eqnarray}
Cov(V_{ri}, V_{si}) 
&=& E( V_{ri} V_{si} ) - E( V_{ri}) E( V_{si} ) \\
&=& 0 - \frac{1}{6}^2 \\
&=& -\frac{1}{36}
\end{eqnarray}

So,

\begin{equation}
Cov(N_{rn}, N_{sn}) =
\cases{
   n \cdot \frac{5}{36}, & if r = s \cr
   -n \cdot \frac{1}{36}, & if r $\neq$ s \cr
}
\end{equation}

Note by the way that the reason I didn't include an $N_{6n}$ is that it
is a linear combination of the other variables.

\end{document}

