\magnification=\magstep1
\overfullrule=0pt
\centerline{Mathematics 375 -- Probability and Statistics 1}
\centerline{Solutions -- Problem Set 10}
\centerline{December 10, 2003}
\bigskip
\noindent
{\it General Comment:}  A {\it lot} of work can be saved on this
assignment by using results of previous problems.  Also, in general
it is not necessary, or even an especially good idea in many cases,
to compute the marginal densities and use those to get variances,
etc.  Using the joint density is usually easier.
\bigskip
\noindent
57.  a)  The marginal density of $Y_1$ is computed as follows.
Note that we try to split up the integral so that 
the integrand is a product of functions of $y_1$ and $y_2$ alone.
That allows factors depending only on $y_1$ to be taken outside
the integral sign: 
$$\eqalign{f_1(y_1) &= 
\int_0^\infty \left(1 - \alpha(1 - 2e^{-y_1})(1 - 2e^{-y_2})\right)e^{-y_1-y_2}\ dy_2\cr
&= e^{-y_1}\int_0^\infty e^{-y_2}\ dy_2 
- \alpha (1 - 2e^{-y_1}) e^{-y_1} \int_0^\infty (1 - 2e^{-y_2})e^{-y_2}\ dy_2\cr
&=  e^{-y_1}\int_0^\infty e^{-y_2}\ dy_2  - 
- \alpha (1 - 2e^{-y_1}) e^{-y_1} \cdot \left(\int_0^\infty e^{-y_2}\ dy_2 - \int_0^\infty 2e^{-2y_2}\ dy_2\right)\cr
&= e^{-y_1}\cdot 1 - \alpha (1 - 2e^{-y_1}) e^{-y_1} (1 - 1) \cr
&= e^{-y_1}\cr}$$
(since the integrals in the next to last line are all integrals
of exponential densities over the interval where they are nonzero,
hence each equals 1).

b)  We have $f_2(y_2) = e^{-y_2}$ by the symmetry of the joint 
density.  

c)  By a general result (Theorem 5.4), $Y_1$ and $Y_2$ are independent
if and only if $f(y_1,y_2) = f_1(y_1)f_2(y_2)$.  Here, this is true
if and only if
$$e^{-y_1 -y_2} =  \left(1 - \alpha(1 - 2e^{-y_1})(1 - 2e^{-y_2})\right)e^{-y_1-y_2} = e^{-y_1-y_2} - \alpha(1 - 2e^{-y_1})(1 - 2e^{-y_2})e^{-y_1-y_2} $$
which is true if and only if $\alpha = 0$.
\bigskip
\noindent
62.  Since we are given that $Y_1$ has a binomial distribution,
$E(Y_1) = np = 2/3$, and $V(Y_1) = npq = 4/9$.  Since 
the probability function table is symmetric, it follows that
$Y_2$ has the same distribution, and $E(Y_1 - Y_2) = E(Y_1) - E(Y_2) = 0$.
\bigskip
\noindent
66.  Here $Y_1$ and $Y_2$ have a uniform joint distribution over
the triangle with vertices $(0,0), (2,0), (0,1)$.  So 
$$E(Y_1) = \int_0^2 \int_0^{y_1/2} y_1\ dy_2\ dy_1 = 4/3$$
and 
$$E(Y_2) = \int_0^2 \int_0^{y_1/2} y_2\ dy_2\ dy_1 = 1/3$$
b)  Also, 
$$E(Y_1^2) = \int_0^2 \int_0^{y_1/2} y_1^2\ dy_2\ dy_1 = 2,$$
so $V(Y_1) = E(Y_1^2) - (E(Y_1))^2 = 2 - (4/3)^2 = 2/9$.
Similarly,
$$E(Y_2^2) = \int_0^2 \int_0^{y_1/2} y_2^2\ dy_2\ dy_1 = 1/6,$$
so $V(Y_1) = E(Y_1^2) - (E(Y_1))^2 = 1/6 - (1/3)^2 = 1/18$.

\noindent
c)  By part a, $E(Y_1 - Y_2) = E(Y_1) - E(Y_2) = 4/3 - 1/3 = 1$.

\noindent
d)  Probably the easiest way to compute $V(Y_1 - Y_2)$ is to 
compute
$$E((Y_1 - Y_2)^2) = \int_0^2 \int_0^{y_1/2} (y_1 - y_2)^2\ dy_2\ dy_1 = 7/6$$
Then $V(Y_1-Y_2) = 7/6 - (1)^2 = 1/6$.   The last question in part 
d is asking for an interval which is guaranteed to contain $Y_1 - Y_2$
with high probability.  By the empirical rule or Tchebysheff's theorem,
one such interval would be $(\mu - 2\sigma, \mu + 2\sigma) = 
(1 - 2/\sqrt{6}, 1 + 2/\sqrt{6})$.  
\bigskip
\noindent
69.  For this problem and several later ones as well, we will use
the fact from 5.53 (on Problem Set 9) that with this joint
density, $Y_1$ and $Y_2$ are independent, and moreover,
\item{$\bullet$}  $Y_1$ has a gamma distribution with $\alpha = 2$
and $\beta = 2$ (i.e. $f_1(y_1) = {1\over 4} y_1 e^{-y_1/2}$).
\item{$\bullet$} $Y_2$ has an exponential distribution with $\beta = 2$
(i.e. $f_2(y_2) = {1\over 2} e^{-y_2/2}$).  

\noindent
Then by independence,
$$E(Y_2/Y_1) = E(Y_2) E(1/Y_1) = 2E(1/Y_1)$$
In addition, letting $u = y_1/2$, 
$$E(1/Y_1) = \int_0^\infty {1\over y_1} {1\over 4} y_1 e^{-y_1/2}\ dy_1 
={1\over 2} \int_0^\infty e^{-u}\ du = {1\over 2}\Gamma(1) = {1\over 2}$$
So $E(Y_2/Y_1) = 2/2 = 1$.
\bigskip
\noindent
70.  Instead of splitting up the expected value or computing
marginal densities, the fastest way to compute this is simply
to take
$$E(Y_1 - Y_2) = \int_0^1 \int_0^{y_1} (y_1-y_2){1\over y_1}\ dy_2\ dy_1 = 
\int_0^1 y_1/2\ dy_1 = 1/4.$$

\bigskip
\noindent
73.  Using the results shown in problem 57 above saves a lot of work here!
a)  Since $Y_1$ and $Y_2$ are both exponentially distributed with 
$\beta = 1$, $E(Y_1) = E(Y_2) = 1$.  b)  For the same reason,
$V(Y_1) = V(Y_2) = 1$.  (We're using the general formulas for 
exponential random variables from Theorem 4.10 or the table inside
the back cover of the text.)  c) $E(Y_1 - Y_2) = 1 - 1 = 0$ by 
part a.  d)  Here we do have to work a bit.  But note that we 
can try to split up the double integral into terms where 
the integrand is a product of functions of $y_1$ and $y_2$ alone.
That allows us to evaluate a double integral as product of two
one-variable integrals:
$$\eqalign{
E(Y_1Y_2) &= \int_0^\infty \int_0^\infty y_1 y_2 \left(1 - \alpha(1 - 2e^{-y_1})(1 - 2e^{-y_2})\right)e^{-y_1-y_2}\ dy_2\ dy_1\cr
&= \int_0^\infty \int_0^\infty y_1 y_2 e^{-y_1-y_2}\ dy_2\ dy_1\cr
&\qquad - \alpha \int_0^\infty \int_0^\infty y_1y_2(1 - 2e^{-y_1})(1 - 2e^{-y_2})e^{-y_1-y_2}\ dy_2\ dy_1\cr
&= \int_0^\infty y_1 e^{-y_1}\ dy_1 \cdot \int_0^\infty y_2 e^{-y_2}\ dy_2\cr
&\qquad - \alpha \int_0^\infty y_1(1 - 2e^{-y_1}) e^{-y_1}\ dy_1 \cdot \int_0^\infty y_2(1 - 2e^{-y_2}) e^{-y_2}\ dy_2\cr
&= \int_0^\infty y_1 e^{-y_1}\ dy_1 \cdot \int_0^\infty y_2 e^{-y_2}\ dy_2\cr
&\qquad - \alpha \left(\int_0^\infty y_1e^{-y_1}\ dy_1 - \int_0^\infty 2y_1e^{-2y_1}\ dy_1\right) 
           \cdot \left(\int_0^\infty y_2e^{-y_2}\ dy_2 - \int_0^\infty 2y_2e^{-2y_2}\ dy_2\right)\cr
&= \Gamma(2)\Gamma(2) - \alpha(\Gamma(2) - \Gamma(2)/2)(\Gamma(2) - \Gamma(2)/2)\cr
&= 1 - \alpha/4}$$

\noindent
e)  Using parts b and d, and a formula from later, we have 
$$V(Y_1 - Y_2) = V(Y_1) + V(Y_2) - 2 Cov(Y_1,Y_2) = 2 - 2(E(Y_1Y_2) - E(Y_1)E(Y_2)) = 2 + \alpha/2$$
The last question is similar to the last part of 66.  The interval
$(\mu - 2\sigma, \mu + 2\sigma)$ contains $Y_1 - Y_2$ with probability
$\cdot .95$ by the empirical rule, or with probability $\ge .75$
by Tchebysheff's theorem.

\bigskip
\noindent
83. a) $Cov(Y_1,Y_1) = E(Y_1^2) - (E(Y_1))^2 = V(Y_1) = 2$
by the given information.  b,c,d)  If $Cov(Y_1,Y_2) = 7$, 
the correlation coefficient
$\rho = {7\over \sigma_1\sigma_2} = {7\over \sqrt{2}\cdot 2\sqrt{2}} = 7/4$.
That is not possible because $-1 \le \rho \le 1$ in all cases.
The largest and smallest values for $Cov(Y_1,Y_2)$ are $-4, 4$, corresponding
to cases where $Y_2$ is a decreasing or increasing linear function 
of $Y_1$.  

\bigskip
\noindent
85. a)  By the results of 73a,d, we have 
$$Cov(Y_1Y_2) = E(Y_1Y_2) - E(Y_1)E(Y_2) = (1 - \alpha/4) - 1 = -\alpha/4$$
b) From this formula, it is clear that $Cov(Y_1,Y_2) = 0 \Leftrightarrow \alpha = 0$.
c) Since $\sigma_1 = \sigma_2 = 1$ it is also true that
$\rho = 0 \Leftrightarrow \alpha = 0$.  If $Y_1,Y_2$ are independent, 
then $Cov(Y_1,Y_2) = 0 \Rightarrow \rho = 0$.  On the other hand, 
if $\rho = 0$, then $\alpha = 0$, and hence $Y_1,Y_2$ are independent
by the result of 57, part c.  Note that it {\it is not true
in general} that $Cov(Y_1,Y_2) = 0 \Rightarrow$  $Y_1,Y_2$ independent,
though.  Example 5.24 in the text gives a counterexample.

\bigskip
\noindent
91.  We begin by computing as follows:
$$\eqalign{
E(Y_1) &= \int_0^1\int_0^{1-y_1} y_1\ dy_2\ dy_1 = 1/3\cr
E(Y_2) &= \int_0^1\int_0^{1-y_1} y_2\ dy_2\ dy_1 = 1/3\cr
E(Y_1^2) &= \int_0^1\int_0^{1-y_1} y_1^2\ dy_2\ dy_1 = 1/6\cr
E(Y_1Y_2) &= \int_0^1\int_0^{1-y_1} y_1y_2\ dy_2\ dy_1 = 1/12\cr
E(Y_2^2) &= \int_0^1\int_0^{1-y_1} y_2^2\ dy_2\ dy_1 = 1/6\cr}$$
Then we can put these pieces together to get all the desired
information for the problem.  $E(Y_i)$ are already done, 
so $E(Y_1 + Y_2) = 1/3 + 1/3 = 2/3$.  Then 
$$V(Y_1 + Y_2) = V(Y_1) + V(Y_2) + 2Cov(Y_1,Y_2) = 
2\cdot \left({1\over 6} - \left({1\over 3}\right)^2\right) +
2\cdot \left({1\over 12} - \left({1\over 3}\right)^2\right) = {1\over 18}$$

\bigskip
\noindent
94.  Once again, using the results from previous problems simplifies
life immensely in this problem!  a)  From 5.53 on Problem Set 9, 
we know $Y_1$ and $Y_2$ are independent, and moreover,
\item{$\bullet$}  $Y_1$ has a gamma distribution with $\alpha = 2$
and $\beta = 2$.
\item{$\bullet$} $Y_2$ has an exponential distribution with $\beta = 2$.
So a)  $E(50 + 2Y_1 + 4Y_2) = 50 + 2\cdot 4 + 4 \cdot 2 = 66$.
Then for b), noting that the variance of a constant is zero,  
$$V(50 + 2Y_1 + 4Y_2) = 4V(Y_1) + 16V(Y_2) + 16Cov(Y_1,Y_2) =
4\cdot 8 + 16\cdot 4 + 16\cdot 0 = 96$$
(Recall $Y_1,Y_2$ independent $\Rightarrow$
$Cov(Y_1,Y_2) = 0$.)

\bigskip
\noindent
99.  This is a multinomial situation:
\item{a)}  ${6!\over 3!2!1!}(1/3)^6$
\item{b)}  $Y_1$ is binomial with $p = 1/3$, so $E(Y_1) = n/3$
and $V(Y_1) = npq = 2n/9$.
\item{c)}  $Cov(Y_2,Y_3) = -n(1/3)(1/3) = -n/9$
\item{d)}  $E(Y_2-Y_3) = 0$, and 
$$V(Y_2-Y_3) = V(Y_2) + V(Y_3) - 2Cov(Y_2,Y_3) = 2n/9 + 2n/9 - 2(-n/9) = 2n/3$$

\bigskip
\noindent
103.  Also multinomial.  The probability is
$${4!\over 2!1!1!}(.73)^2(.2)^1(.07)^1$$
  


\bye