\documentclass[11pt]{article}
\def\Z{\mathbb{Z}}
\def\Q{\mathbb{Q}}
\def\R{\mathbb{R}}
\def\C{\mathbb{C}}
\usepackage{latexsym,amsmath,amssymb}
\usepackage[all]{xy}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\textheight}{8.0in}
\begin{document}
\centerline{Mathematics 375 -- Probability and Statistics 1}
\centerline{Solutions for Problem Set 9}
\centerline{November 12, 2009}
\vskip 10pt
\noindent
5.25.  (a)  The marginal densities are
$$f_1(y_1) = \int_0^\infty e^{-y_1 - y_2}\ dy_2 =  \left. -e^{-y_1 - y_2}\right|_0^\infty = e^{-y_1}$$
if $y_1 > 0$ and zero otherwise.  
Similarly, 
$$f_2(y_2) = \int_0^\infty e^{-y_1 - y_2}\ dy_1 =  \left. -e^{-y_1 - y_2}\right|_0^\infty = e^{-y_2}$$
if $y_2 > 0$ and zero otherwise.
These are both exponential densities with $\beta = 1$.

(b)  $P(1 < Y_i < 2.5) = \int_{1}^{2.5} e^{-y_i}\ dy_i = e^{-1} - e^{-2.5}$ for $i = 1,2$.

(c)  The conditional density is only defined for $y_2 > 0$ (since we must have $f_2(y_2) > 0$
in Definition 5.7).

(d)  The conditional density $f(y_1|y_2) = \frac{e^{-y_1-y_2}}{e^{-y_2}} = e^{-y_1}$.

(e) Similarly, $f(y_1|y_2) = e^{-y_2}$.

(f) The conditional and marginal densities for both variables are \emph{equal}.

(g)  The marginal and conditional probabilities in any interval will also be
equal.
\vskip 10pt
\noindent
5.26.  (a)  The marginal densities are 
\begin{align*}
f_1(y_1) &= \int_0^1 4y_1y_2\ dy_2 = 2y_1, \text{ and similarly }\\
f_2(y_2) &= \int_0^1 4y_1y_2\ dy_1 = 2y_2.
\end{align*}
Looking ahead to the next section, note that these
satisfy the criterion of Theorem 5.4.  So $Y_1$ and $Y_2$
are independent.

(b)  To compute the denominator in the conditional probability, 
we can use the marginal density from part a:
\begin{align*}
P(Y_1 \le 1/2 | Y_2 \ge 3/4) 
&= \frac{P(Y_1 \le 1/2, Y_2 \ge 3/4)}{P(Y_2 \ge 3/4)}\\
&= \frac{\int_0^{1/2}\int_{3/4}^1 4y_1y_2\ dy_2\ dy_1}{\int_{3/4}^1 2y_2\ dy_2}\\
&= \frac{\int_0^{1/2} 2y_1\ dy_1 \int_{3/4}^1 2y_2\ dy_2}{\int_{3/4}^1 2y_2\ dy_2}\\
&= \int_0^{1/2} 2y_1\ dy_1\\
&= 1/4.
\end{align*}
(The cancellation works this way because of independence.)  
\vskip 10pt
\noindent
5.54.  No -- $Y_1, Y_2$ cannot be independent when 
the interval of $y_2$ values where the density is 
nonzero depends on $y_1$.  (You can also see this directly
by computing $f_1(y_1)$ and $f_2(y_2)$.  The region
where the joint density is nonzero is the triangle
with vertices at $(0,0), (2,0), (2,1)$.  So
$$f_1(y_1) = \int_0^{y_1/2} 1\ dy_2 = \frac{y_1}{2}$$
(when $0 \le y_1 \le 2$; 0 otherwise).
Similarly,
$$f_2(y_2) = \int_{2y_2}^2 1\ dy_1 = 2 - 2y_2$$
(when $0 \le y_2 \le 1$; 0 otherwise).
The product $f_1(y_1)f_2(y_2)$ is not the same as $f(y_1,y_2)$.)
\vskip 10pt
\noindent
5.59.   No -- same reason as 5.54.  The marginal densities
are 
$$f_1(y_1) = \int_0^{y_1} e^{-y_1}\ dy_2 = y_1 e^{-y_1}$$
and
$$f_2(y_2) = \int_{y_2}^\infty e^{-y_1}\ dy_1 = e^{-y_2}.$$
Note that $f(y_1,y_2) \ne f_1(y_1)f_2(y_2)$.  
\vskip 10pt
\noindent
5.65.  (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: 
\begin{align*}
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\\
&= 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\\
&=  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)\\
&= e^{-y_1}\cdot 1 - \alpha (1 - 2e^{-y_1}) e^{-y_1} (1 - 1) \\
&= e^{-y_1}
\end{align*}
(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).  Hence $Y_1$ is exponentially distributed
with mean $\beta = 1$.  

(b)  We have $f_2(y_2) = e^{-y_2}$ by the symmetry of the joint 
density.  So $Y_2$ is also exponential with mean $\beta = 1$.  

(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$.
\vskip 10pt
\noindent
5.76.  This can be done most easily by using the
marginal densities for the $Y_i$ (although there
are several other valid methods too).  Note that 
$f_1(y_1) = \int_0^1 4y_1y_2\ dy_2 = 2y_1$ if $0 \le y_1 \le 1$, and zero otherwise.
Similarly for $f_2(y_2)$ by the symmetry of the joint
density.  

(a)  $E(Y_1) = \int_0^1 y_1 f_1(y_1)\ dy_1 = \int_0^1 2y_1^2\ dy_1 = \frac{2}{3}$.

(b)  Then the variance is:
$$V(Y_1) = E(Y_1^2) - \left(\frac{2}{3}\right)^2 = \int_0^1 2y_1^3\ dy_1 - \frac{4}{9}
= \frac{1}{2} - \frac{4}{9} = \frac{1}{18}.$$

(c)  By linearity, $E(Y_1 - 3Y_2) = E(Y_1) - 3E(Y_2) = \frac{2}{3} - 2 = \frac{-4}{3}$.
This can also be computed, for instance, as the integral:
$$\int_0^1 \int_0^1 (y_1 - 3y_2)\cdot 4y_1 y_2\ dy_2\ dy_1.$$
\vskip 10pt
\noindent
5.79.   To integrate over this region, is probably easiest to 
integrate with respect to $y_1$ first:
\begin{align*}
E(Y_1Y_2) &= \int_0^1 \int_{y_2-1}^{-y_2+1} y_1y_2\ dy_1\ dy_2\\ 
&= \int_0^1 y_2 \frac{(-y_2 + 1)^2 - (y_2 - 1)^2}{2}\ dy_1\\
&= 0,
\end{align*}
since everything cancels out in the integrand.
%\vskip 10pt
%\noindent
%5.80. Using the joint density, we multiply out and integrate term by term:
%\begin{align*}
%E(30Y_1 + 25Y_2) &= \int_0^1 \int_0^1 (30y_1 + 25y_2)(y_1 + y_2)\ dy_2\ dy_1\\
%&= \int_0^1 \int_0^1 30y_1^2 + 55y_1 y_2 + 25 y_2^2\ dy_2\ dy_1\\
%&= \int_0^1 30y_1^2 + \frac{55}{2}y_1 + \frac{25}{3}\ dy_1\\
%&=\frac{385}{12}.
%\end{align*}
\vskip 10pt
\noindent
5.91.  From Exercise 5.76 on the last problem set, $E(Y_1) = E(Y_2) = \frac{2}{3}$.
Then 
$$
E(Y_1Y_2) = \int_0^1\int_0^1 4y_1^2y_2^2\ dy_2\ dy_1 = \frac{4}{9}.
$$
Hence ${\rm Cov}(Y_1,Y_2) = E(Y_1Y_2) - E(Y_1)E(Y_2) = 0$.  This 
is not a surprise since we know $Y_1$ and $Y_2$ are independent (see solution 
to Exercise 5.26 on the last problem set).  
\vskip 10pt
\noindent
5.94.  ``Uncorrelated'' means that it is given that ${\rm Cov}(Y_1,Y_2) = 0$.  

(a) By the bilinearity of the covariance (part c of Theorem 5.12),
\begin{align*}
{\rm Cov}(U_1,U_2) &= {\rm Cov}(Y_1+Y_2,Y_1-Y_2)\\
&= {\rm Cov}(Y_1,Y_1) + {\rm Cov}(Y_2,Y_1) - {\rm Cov}(Y_1,Y_2) - {\rm Cov}(Y_2,Y_2)\\
&= V(Y_1) + 0 - 0 - V(Y_2)\\
&= V(Y_1) - V(Y_2).
\end{align*}

(b) $\rho = \frac{V(Y_1) - V(Y_2)}{V(Y_1)V(Y_2)}$.

(c)  It is possible for ${\rm Cov}(U_1,U_2)$ to be zero.  This happens
if and only if $V(Y_1) = V(Y_2)$.  
\vskip 10pt
\noindent
5.97.  (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 = \frac{7}{\sigma_1\sigma_2} = \frac{7}{\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$.  
%\vskip 10pt
%\noindent
%5.109.  Using Theorem 5.12, 
%$$V(30Y_1 + 25Y_2) = 900 V(Y_1) + 1500 {\rm Cov}(Y_1,Y_2) + 625 V(Y_2).$$
%We compute:
%\begin{align*}
%E(Y_1) &= \int_0^1 \int_0^1 y_1(y_1+y_2)\ dy_1\ dy_2 = \frac{7}{12}\\
%E(Y_2) &= \frac{7}{12} \text{ by symmetry }\\
%E(Y_1^2) &= \int_0^1 \int_0^1 y_1^2(y_1+y_2)\ dy_1\ dy_2 = \frac{5}{12}\\
%E(Y_1Y_2) &=  \int_0^1 \int_0^1 y_1y_2(y_1+y_2)\ dy_1\ dy_2 = \frac{1}{3}\\
%E(Y_2^2) &= \frac{5}{12} \text{ by symmetry }.
%\end{align*}
%Then
%$$V(Y_i) = E(Y_i^2) - E(Y_i)^2 = \frac{5}{12} - \left(\frac{7}{12}\right)^2 = \frac{11}{144}.$%$
%Similarly,
%$${\rm Cov}(Y_1,Y_2) = E(Y_1Y_2) - E(Y_1)E(Y_2) = \frac{1}{3} - \frac{49}{144} = \frac{-1}
%{144}.$$
%So finally, 
%$$V(30Y_1 + 25Y_2) = \frac{1525\cdot 11 - 1500}{144} = \frac{15275}{144} \doteq 106.1.$$
%By Tchebysheff's Theorem, and interval containing $30Y_1 + 25Y_2$ at least
%$75\%$ of the time would be $[\mu - 2\sigma, \mu + 2\sigma] \doteq [11.48,52.68]$.  
\vskip 10pt
\noindent
6.1.  
(a) Letting $U_1 = 2Y-1$, $U_1 \le u \Leftrightarrow Y \le (u+1)/2$.
Then the cdf for $U_1$ is
$$F(u) = \int_0^{(u+1)/2} 2(1 - y)\ dy = -((1-u)/2)^2 + 1$$
(for $-1 \le u\le 1$, and zero otherwise).  To find the pdf for 
$U$, we differentiate
$$f(u) = F'(u) = (1-u)/2 \text{ if } -1 \le u \le 1;   0  \text{otherwise}$$

(b)  Derivation for $U_2$ is very similar to part (a).  Answer:
$$f(u) = (1+u)/2 \text{ if } -1 \le u \le 1, 0  \text{ otherwise }.$$

(c)  $U_3 = Y^2$.  We have $Y^2 \le u \Leftrightarrow =\sqrt{u}\le Y\le \sqrt{u}$.
Only positive values of $y$ occur with nonzero densities, though, so
the cdf for $U_3$ is 
$$F(u) = \int_0^{\sqrt{u}} 2(1-y)\ dy = -(1 - \sqrt{u})^2$$
(for $0 \le u\le 1$, and zero otherwise).  The pdf for 
$U_3$ is  $f(u) = F'(u) = \frac{1 - \sqrt{u}}{\sqrt{u}}$
(for $0 < u \le 1$, zero otherwise).

(d)  Using these pdf's:  
\begin{align*}
E(U_1) &= \int_{-1}^1 u(1-u)/2\ du = -1/3\\
E(U_2) &= \int_{-1}^1 u(1+u)/2\ du = 1/3\\
E(U_3) &= \int_0^1 u\cdot \frac{1 - \sqrt{u}}{\sqrt{u}}\ du
=\int_0^1 \sqrt{u} - u\ du = 1/6
\end{align*}

(e)  Using the methods from Chapter 4:  We know $Y$ has 
a Beta distribution with $\alpha = 1$, $\beta = 2$ from
the form of the pdf for $Y$.  So $E(Y) = 1/3$ and $V(Y) = 1/18$.
Hence $E(U_1) = 2(1/3) - 1 = -1/3$, 
$E(U_2) = 1 - 2(1/3) = 1/3$, and 
$E(U_3) = E(Y^2) = V(Y) + E(Y)^2 = 1/18 + (1/3)^2 = 1/6$.
Everything checks!
%\vskip 10pt
%\noindent
%6.7. (a) Let $Z$ be a standard normal random variable and $U = Z^2$.  Then for any given $u > %0$
%$U \le u \Leftrightarrow -\sqrt{u} \le Z \le \sqrt{u}$.  So 
%$$F_U(u) = P(U \le u) = P(-\sqrt{u} < Z \le \sqrt{u}) 
%= \int_{-\sqrt{u}}^{\sqrt{u}} \frac{1}{\sqrt{2\pi}} e^{-y^2/2}\ dy.$$
%We will now differentiate this function of $u$ to find the density
%function for $U$, using the Fundamental Theorem of Calculus:
%\begin{align*}
%\frac{d}{du}\int_{-\sqrt{u}}^{\sqrt{u}} \frac{1}{\sqrt{2\pi}} e^{-y^2/2}\ dy &= 
%\frac{u^{-1/2} e^{-u/2}}{2\sqrt{2\pi}} +  \frac{u^{-1/2} e^{-u/2}}{2\sqrt{2\pi}}\\
%&= \frac{u^{-1/2} e^{-u/2}}{\sqrt{\pi}\cdot 2^{1/2} }.
%\end{align*}
%
%(b) This is the form of a $\Gamma$ density function with $\alpha = 1/2$ and 
%$\beta = 2$ because $\Gamma(1/2) = \sqrt{\pi}$.
%
%(c) Another name for this is the $\chi^2$ distribution with one degree
%of freedom.
\vskip 10pt
\noindent
6.8.  (a)  The inequality $U < u$ is equivalent to $1 - Y < u$ so $Y > 1 - u$.  Now,
$$F_U(u) = P(1 - Y < u) = \int_{1-u}^1 \frac{1}{B(\alpha,\beta)} y^{\alpha-1} (1 - y)^{\beta -1}\ dy.$$
To see what is happening here, make the substitution $z = 1 - y$, so $y = 1 - z$, and $dz = -dy$.
We get
$$F_U(u) = \int_u^0 \frac{1}{B(\alpha,\beta)} (1-z)^{\alpha-1} z^{\beta -1} (-dz) = 
\int_0^u \frac{1}{B(\alpha,\beta)} (1-z)^{\alpha-1} z^{\beta -1}\ dz.$$
Differentiating this with respect to $u$, using the FTC, we get:
$$f_U(u) = \frac{1}{B(\alpha,\beta)} u^{\beta-1} (1-u)^{\alpha-1}$$

(b) Since the beta function is symmetric in its arguments, this is the 
form for the density function of a variable with a beta distribution with
parameters $\beta$ and $\alpha$ (i.e. \emph{reversed} from the parameters of $Y$).

(c) $E(U) = \frac{\beta}{\alpha + \beta} = 1 - \frac{\alpha}{\alpha+\beta} = 1 - E(Y)$
as we expect from our general facts about linearity of expected values.

(d) We can see $V(U) = V(Y)$ because of the symmetry of 
$\frac{\alpha\beta}{(\alpha + \beta)^2(\alpha + \beta + 1)}$
in $\alpha,\beta$.  
\vskip 10pt
\noindent
6.38.  We have
\begin{align*}
m_U(t) &= E(e^{tU})\\
&= E(e^{t(a_1Y_1+a_2Y_2)})\\
&= E(e^{(a_1t)Y_1} \cdot e^{(a_2 t)Y_2})\\
&= E(e^{(a_1t)Y_1}) \cdot E(e^{(a_2 t)Y_2}) \text{ by Theorem 6.2 (independence)}\\
&= m_{Y_1}(a_1t) \cdot m_{Y_2}(a_2 t),
\end{align*}
which is what we wanted to show.  
\vskip 10pt
\noindent
6.39.  By the preceding exercise, if $Y_i$ are the lives of the two components and
$U = \frac{1}{2}Y_1 + \frac{1}{2}Y_2$ is the average life, then
$$m_U(t) = m_{Y_1}(\frac{1}{2} t) \cdot m_{Y_2} (\frac{1}{2} t) = \frac{1}{\left(1 - \frac{t}{2}\right)^2}.$$
By the uniqueness theorem, this implies that $U$ has a $\Gamma$ distribution with 
$\alpha = 2$ and $\beta = \frac{1}{2}$.  The density function is the $\Gamma$ density:
$$f(u) = \frac{1}{\Gamma(2) (1/2)^2} u e^{-\frac{u}{1/2}} = 4ue^{-2u}$$
(for $u > 0$, and $0$ otherwise).
%\vskip 10pt
%\noindent
%6.40.  This is a $\chi^2$ distribution with 2 d.f. by Theorem 6.4.
\vskip 10pt
\noindent
6.41.  By Theorem 6.3, $U$ has a normal distribution with mean $\mu_U = (a_1 + \cdots + a_n)\mu$
and $\sigma_U^2 = (a_1^2 + \cdots + a_n^2)\sigma^2$.  The density function for $U$ is the
usual normal density:
$$ f_U(u) = \frac{1}{\sqrt{2\pi\sigma_U^2}} e^{\frac{(u - \mu_U)^2}{2\sigma_U^2}}.$$  
\vskip 10pt
\noindent
6.42.  Using the result from Exercise 6.41, $U = Y_2 - Y_1$
is normally distributed with $\mu_U = -1000$
and $\sigma_U^2 = 300^2 + 400^2 = 500^2$.  The probability
that the elevator is overloaded is found by standardizing
and using the table for the standard normal
$$P(Y_2 - Y_1 > 0) = P\left(\frac{(Y_2 - Y_1) + 1000}{500} > 2\right) = 
P(Z > 2) = .0228.$$
\vskip 10pt
\noindent
6.46.  Using Exercise 6.38 (with $a_2 = 0$) we have
$$m_W(t) = m_Y(\frac{2}{\beta} t) = \frac{1}{(1 - \beta \frac{2}{\beta} t)^{n/2}} = 
\frac{1}{(1 - 2t)^{n/2}}.$$
By the uniqueness theorem, this implies that $W$ has a $\chi^2$ distribution 
with $n$ d.f. 
\end{document}
