\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 Theory}
\centerline{Solutions for Problem Set 7}
\centerline{November 4, 2011}
\vskip 10pt
\noindent
\vskip 10pt
\noindent
4.88.  (a) Let $Y$ be the magnitude of the earthquake.  The density for
$Y$ is then $f(y) = \frac{e^{-y/2.4}}{2.4}$ for $y > 0$.  
$$P(Y > 3) = \int_3^\infty \frac{e^{-y/2.4}}{2.4}\ dy = e^{-3/2.4} \doteq
.2865.$$
(b)  Similarly.
$$P(2 < Y < 3) = \int_2^3 \frac{e^{-y/2.4}}{2.4}\ dy = e^{-2/2.4} - e^{-3/2.4}
\doteq .1481.$$
\vskip 10pt
\noindent
4.95.  (a) We have by the definition of the discrete random variable $X$:
\begin{align*}
P(X=k) &= \int_{k-1}^k \frac{1}{\beta} e^{\frac{-y}{\beta}}\ dy\\
&= \left.-e^{\frac{-y}{\beta}}\right|_{k-1}^k\\
&= -e^{\frac{-k}{\beta}} + e^{\frac{-(k-1)}{\beta}}\\
&= \left(e^{\frac{-(k-1)}{\beta}}\right)\left(1 - e^{\frac{1}{\beta}}\right)\\
&= \left(e^{\frac{-1}{\beta}}\right)^{k-1} \left(1 - e^{\frac{-1}{\beta}}\right).
\end{align*}

(b) This is the form ($q^{k-1}p$) for the probability  function 
for a {\it geometric} random variable with $p = 1 - e^{\frac{-1}{\beta}}$.
\vskip 10pt
\noindent 
4.96.  (a)  We want $1 = k \int_0^\infty y^3 e^{-y/2}\ dy$.  The best way
to do this part is to note that this looks like the Gamma density in
the case $\alpha = 4$ and $\beta = 2$.  Hence the constant $k$ must
be:
$$k = \frac{1}{2^4 \Gamma(4)} = \frac{1}{16\cdot 3!} = \frac{1}{96}.$$
(Harder way: Integrating 
by parts three times, or using a table of integrals, we find $k = 96$.)  
(b)  This is a $\chi^2$ random variable with $\nu = 8$. 
(c)  The mean and standard deviation follow by the formulas from 
Theorem 4.9 -- $\mu = 8$, $\sigma^2 = 16$.  
(d) Not assigned, but here is how you could do this.
 The interval $\mu \pm 2\sigma$ is $[0,16]$.  We have
$$\int_0^{16} \frac{y^3 e^{-y/2}}{96}\ dy \doteq .9576$$
(I used Maple to compute this approximate value; you could also integrate
by parts three times).  
\vskip 10pt
\noindent
4.105.  (a)  If $Y$ is the four-week total, then by Theorem 4.8, 
$E(Y) = 3.2$ and $V(Y) = 6.4$.  (b)  Not assigned, but using
numerical integration, this is how it would go:  This probability is the value
$$P(Y > 4) = \int_4^\infty \frac{y^{2.2} e^{-y/2}}{\Gamma(3.2) 2^{3.2}}\ dy \doteq 
.2896.$$
\vskip 10pt
\noindent
4.111.  We have, letting $u = y/\beta$:
\begin{align*}
E(Y^a) &= \int_0^\infty y^a\cdot\frac{y^{\alpha - 1} e^{-y/\beta}}{\Gamma(\alpha) \beta^\alpha}\ dy\\
&= \int_0^\infty \frac{y^{a + \alpha - 1} e^{-y/\beta}}{\Gamma(\alpha)\beta^\alpha}\ dy\\
&= \frac{1}{\Gamma(\alpha)} 
\int_0^\infty \frac{(\beta u)^{a + \alpha - 1} e^{-u}}{\Gamma(\alpha)\beta^{\alpha}}\ \beta \ du \\
&= \frac{\beta^a}{\Gamma(\alpha)} \int_0^\infty u^{a + \alpha - 1} e^{-u}\ du\\
&= \frac{\beta^a \Gamma(a + \alpha)}{\Gamma(\alpha)},
\end{align*}
since the integral on the right on the second to last line computes $\Gamma(a + \alpha)$.  
(b)  We must have $a + \alpha > 0$, since we only defined $\Gamma(x)$ for $x > 0$.
(For those of you taking complex analysis, there is a way to define $\Gamma(x)$
for some negative real $x$ as well, using the technique of \emph{analytic continuation}, 
but we are not doing that in this course.)
(c)  If we take $a = 1$, then by the functional equation for the $\Gamma$ function,
$$\frac{\beta \Gamma(1 + \alpha)}{\Gamma(\alpha)} = 
\frac{\beta \alpha \Gamma(\alpha)}{\Gamma(\alpha)} = \alpha\beta.$$
(d)   With $a = 1/2$, we only need $\alpha > 0$.  We get
$$E(\sqrt{Y}) =  \frac{\sqrt{\beta} \Gamma(\alpha + 1/2)}{\Gamma(\alpha)}.$$
(e)  The cases where $a$ is an integer can be simplified
using the functional equation for the $\Gamma$ function.  
With $a = -1$, we need $\alpha > 1$, and then
$$E(1/Y) = \frac{\Gamma(\alpha - 1)}{\beta \Gamma(\alpha)} = \frac{\Gamma(\alpha-1)}{\beta (\alpha-1)\Gamma(\alpha -1)} = 
\frac{1}{\beta(\alpha - 1)}.$$
With $a = -1/2$, we need $\alpha > 1/2$ and then
$$E(1/\sqrt{Y}) = \frac{\Gamma(\alpha - 1/2)}{\sqrt{\beta} \Gamma(\alpha)}.$$
Finally, with $a = -2$, we need $\alpha > 2$ and then
$$E(1/Y^2) = \frac{\Gamma(\alpha - 2)}{\beta^2 \Gamma(\alpha)} = 
\frac{\Gamma(\alpha - 2)}{\beta^2 (\alpha - 1)(\alpha - 2) \Gamma(\alpha - 2)}
= \frac{1}{\beta^2 (\alpha - 1)(\alpha - 2)}.$$
\vskip 10pt
\noindent
4.128.  We recognize the density as the Beta density with $\alpha = 1$ and
$\beta = 3$.  We want to set the budget for repairs at a level $b$ so that
$P(Y > b) = \int_b^1 3(1 - y)^2\ dy = .1$.  This gives the equation
$$.1 = \left.-(1 - y)^3\right|_b^1 = (1 - b)^3$$
Hence we want $b = .5358 \times \$ 100 = \$53.58$.  
\vskip 10pt
4.129.  The mean of $C$ can be computed from the formulas
for $E(Y)$ and $V(Y) = E(Y^2) + (E(Y))^2$ from Theorem 4.11: 
\begin{align*}
E(C) &= E(10 + 20Y + 4Y^2)\\
&= 10 + 20E(Y) + 4E(Y^2)\\ 
&= 10 + 20(1/3) + 4(1/18 + (1/3)^2)\\
&= 52/3.
\end{align*}
So the average cost is about $\doteq 17.3 \times \$100 = \$1730$.  For
the variance of the cost we can compute like this:
\begin{align*}
V(C) &= E(C^2) - (E(C))^2\\
 &= \int_0^1 (10 + 20y + 4y^2)^2 \cdot 2(1 - y)\ dy - (52/3)^2\\
 &= \frac{1652}{5} - \left(\frac{52}{3}\right)^2\\
 &\doteq 29.96
\end{align*}
This would correspond to $V(C) = 29.96 \times 100^2 \doteq 299600$ dollars squared.
\vskip 10pt
\noindent
4.130.  We know $E(Y) = \frac{\alpha}{\alpha+\beta}$ from Theorem 4.11
and work in class.  We compute similarly,
\begin{align*}
E(Y^2) &= \frac{1}{B(\alpha,\beta)} \int y^2\cdot y^{\alpha-1} (1 - y)^{\beta - 1}\ dy\\
&= \frac{1}{B(\alpha,\beta)} \int y^{\alpha+1} (1 - y)^{\beta - 1}\ dy\\
&= \frac{B(\alpha+2,\beta)}{B(\alpha,\beta)}\\
&= \frac{\Gamma(\alpha+2)\Gamma(\beta) \Gamma(\alpha + \beta)}{\Gamma(\alpha)\Gamma(\beta) \Gamma(\alpha+\beta+2)}.
\end{align*}
 Then using the functional equation for
the $\Gamma$-function
\begin{align*}
&=\frac{(\alpha+1)\alpha\Gamma(\alpha)\Gamma(\beta) \Gamma(\alpha + \beta)}{\Gamma(\alpha)\Gamma(\beta) (\alpha+\beta+1)(\alpha+\beta)\Gamma(\alpha+\beta)}\\
&=\frac{(\alpha+1)\alpha}{(\alpha+\beta+1)(\alpha+\beta)}.
\end{align*}
So then
\begin{align*}
V(Y) &= \frac{(\alpha+1)\alpha}{(\alpha+\beta+1)(\alpha+\beta)} - 
\left(\frac{\alpha}{\alpha+\beta}\right)^2\\
&= \frac{(\alpha + \beta)(\alpha + 1)(\alpha) - (\alpha + \beta + 1)(\alpha^2)}{(\alpha+\beta)^2(\alpha + \beta + 1)}\\
&= \frac{\alpha\beta}{(\alpha+\beta)^2(\alpha + \beta + 1)},
\end{align*}
which is what we wanted to show.  
\vskip 10pt
\noindent
4.136. (a) $Y$ has an exponential distribution with $\beta =\theta$.
So by Example 4.13 with $\alpha = 1$ and $\beta = \theta$,
the moment generating function is $m_Y(t) = \frac{1}{1 - \theta t}$.

(b) Then 
$$E(Y) = m_Y'(0) = \left.\frac{\theta}{(1 - \theta t)^2}\right|_{t=0} = \theta$$
and 
$$E(Y) = m_Y''(0) = \left.\frac{2\theta^2}{(1 - \theta t)^3}\right|_{t=0} = 2\theta^2$$
Hence $V(Y) = E(Y^2) - E(Y)^2 = 2\theta^2 - \theta^2 = \theta^2$.   
\vskip 10pt
\noindent
4.137.  Letting $U = aY + b$, since $U$ is a function of $Y$,
we find its moment-generating function by integrating
$e^{t(ay + b)}$ times the density function $f(y)$:
\begin{align*}
m_U(t) 
&= \int_{-\infty}^\infty e^{t(ay + b)} f(y)\ dy \\
&=\int_{-\infty}^\infty e^{(at)y}\cdot e^{tb} f(y)\ dy\\
&=e^{tb}\int_{-\infty}^\infty e^{(at)y} f(y)\ dy\\
&=e^{tb}m_Y(at)
\end{align*}

Then to find $E(U)$ and $V(U)$, we compute as usual, 
using the product and chain rules (note:  $\frac{d}{dt}m_Y(at) = m_Y'(at)\cdot a$)  to find the necessary 
derivatives:
\begin{align*}
E(U) &= m_U'(0)\\
&= \left.\frac{d}{dt}(e^{tb}m_Y(at))\right|_{t=0}\\
&= \left.(be^{tb}m_Y(at) + e^{tb}m_Y'(at)a)\right|_{t=0}\\
&= bm_Y(0) + am_Y'(0)\\
&=b + a\mu,
\end{align*}
since $m_Y(0) = 1$ and $m_Y'(0) = E(Y) = \mu$.  Then
\begin{align*}
E(U^2) &= m_U''(0)\\
&= \left.\frac{d}{dt}(be^{tb}m_Y(at) + e^{tb}m_Y'(at)a)\right|_{t=0}\\
&= \left.(b^2e^{tb}m_Y(at) + 2b e^{tb}m_Y'(at)a + e^tb m_Y''(t)a^2)\right|_{t=0}\\
&= b^2 + 2ab\mu + a^2 E(Y^2).
\end{align*}
Hence 
$$V(U) = b^2 + 2ab\mu + a^2 E(Y^2) - (b + a\mu)^2 = 
a^2(E(Y^2) - \mu^2) = a^2\sigma^2.$$
\vskip 10pt
\noindent
4.139.   Using the formula of Exercise 4.138 and the moment-generating
function for a normal random variable, we have
$$m_X(t) = e^{4t}m_Y(-3t) = e^{4t}\cdot e^{\frac{\sigma^2(-3t)^2}{2} + \mu (-3t)}
= e^{\frac{(3\sigma)^2 t^2}{2} + (4 - 3\mu)t}$$
This is the moment-generating function for a normal random variable
with mean $4 - 3\mu$ and variance $9\sigma^2$.  Hence by 
the uniqueness theorem we quoted in class, $X$ is {\it normally} distributed.
\vskip 10pt
\noindent
4.140.  Using the standard forms (for instance from the table inside
the back cover of the textbook),  (a) $Gamma(2,4)$  (b) 
$Gamma(1,3.2) = Exponential(3.2)$ 
(c)  $Normal(-5,12)$.
\vskip 10pt
\noindent
4.145.  Note that this is sort of a ``reverse'' or ``negative'' exponential
density.  (a)  We have
\begin{align*}
E(e^{3Y/2}) &= \int_{-\infty}^0 e^{3y/2}\cdot e^y\ dy\\
            &= \int_{-\infty}^0 e^{5y/2}\ dy\\
            &= \left. \frac{2}{5} e^{5y/2}\right|_{-\infty}^0\\
            &= \frac{2}{5}.
\end{align*}
(b)  The moment generating function is found by a similar computation:
\begin{align*}
E(e^{tY}) &= \int_{-\infty}^0 e^{ty}\cdot e^y\ dy\\
            &= \int_{-\infty}^0 e^{(1+t)y}\ dy\\
            &= \left. \frac{1}{1+t} e^{(1+t)y}\right|_{-\infty}^0\\
            &= \frac{1}{1+t}.
\end{align*}
Note that $1 + t > 0$ in order for the integral to converge.  So the
mgf is only defined for $t > -1$.  
(c)  $V(Y) = m_Y''(0) - (m_Y'(0))^2$.  Since
\begin{align*}
m_Y'(t) &= -(1+t)^{-2}\\
m_Y''(t) &= 2(1+t)^{-3},
\end{align*}
 we have $m_Y'(0) = -1$, and 
$m_Y''(0) = 2$, so $V(Y) = 2 - (-1)^2 = 1$.  
\vskip 10pt
\noindent
4.146.  If $k = \sqrt{10} \doteq 3.162$, then Tchebysheff's theorem says
$$P(|Y - \mu| \ge 3.162\sigma) \le \frac{1}{10}.$$  
So one possible interval is $\mu \pm 3.162 \sigma$, or $25000 \pm 12648$,
or $[12352,37648]$.   
\vskip 10pt
\noindent
4.147.  By Tchebysheff's theorem, 
$P(|Y - \mu| < 2\sigma) \ge \frac{3}{4}$.  So if $\sigma = 1/2$, the interval
$\mu \pm 2\sigma$ will be $\mu \pm 1$.  

\end{document}
