\magnification=\magstep1
\centerline{Mathematics 375 -- Probability and Statistics I}
\centerline{Solutions -- Midterm Exam 2 Practice Problems}
\centerline{November 12, 2009}
\bigskip
\noindent
I.  If $Y$ denotes the number of underage students who get carded,
then $Y$ is hypergeometric with $N = 10$, $r = 4$, $n = 5$.  So
$$P(Y = 2) = {{4 \choose 2} {6\choose 3}\over {10 \choose 5}} = {10\over 21} \doteq .48 $$
\bigskip
\noindent
II.  By examining the form of the density function, we see
that $Y$ has a {\it beta distribution} with $\alpha = \beta = 3$.
Hence:
\item{A)}  The constant $c$ must be 
$$c = {1\over B(3,3)} = {\Gamma(6)\over \Gamma(3)\Gamma(3)} = {5!\over 2!2!} = 30$$
\item{B)}  The variance is 
$$V(Y) = {\alpha\beta\over (\alpha+\beta)^2(\alpha+\beta+1)} = {3\cdot 3\over 36\cdot 7}
 = {1\over 28}$$
\item{C)}  The cumulative distribution function is the antiderivative
$F(y)$ of the density with $F(-\infty) = 0$ and $F(+\infty) = 1$.  This
is
$$F(y) = \cases{0 & if $y < 0$\cr
                10y^3 - 15y^4 + 6y^5 & if $0 \le y < 1$\cr
                1 & if $y \ge 1$\cr}$$
\item{D)} This is 
$$\int_{.1}^{.25} 30y^2(1-y)^2\ dy = F(.25) - F(.1) \doteq .09496.$$
\bigskip
\noindent
III.  The lifetime $Y$ of a single switch has the exponential density
$$f(y) = \cases{{1\over 2}e^{-y/2} & if $y > 0$\cr
                    0 & otherwise\cr}$$
\item{A)}  The probability that a single switch fails during the 
first year is the same as the probability that its life is less
than 1:
$$P(Y < 1) = \int_0^1 {1\over 2}e^{-y/2}\ dy = -e^{-y/2}|_0^1 = 1 - e^{-1/2}
\doteq .3935$$
\item{B)}  The probability that at most 30 out of 100 of these switches
will fail in the first year is computed by the binomial probability 
formula (since we assume the switches operate independently):
$$\sum_{y=0}^{30} {100\choose y} (.3935)^y (.6065)^{100-y}.$$
\bigskip
\noindent
IV.  
\item{A)}  Let $Y$ be the weight of one poodle
$$P(7.3 < Y < 9.1) = P\left({7.3-8\over .9} < {Y-8\over .9} < {9.1-8\over .9}\right)$$
This is the same as 
$$P\left(-.78 < {Y-8\over .9} < 1.22\right)$$
We know $Z = {Y-8\over .9}$ is a standard normal, so we can use
the {\it standard normal table} (p. 792) to find this probability.  
By the symmetry of the normal density,
$$P(-.78 < Z < 0) = P(0 < Z < .78) = .5 - .2177 = .2823$$
We also have 
$$P(0 < Z < 1.22) = .5 - .1112 = .3888$$
Hence
$$P(-.78 < Z < 1.22) = .2823 + .3888 = .6711$$
\bigskip
\item{B)}  The only reasonable way to do this problem is to think of 
the moment-generating function approach.  $E(Y^3) = m'''(0)$ where
$m(t)$ is the mgf for a normal random variable.  The  general form
of this is
$$m(t) = e^{{\sigma^2 t\over 2} + \mu t}$$
Hence differentiating with the chain and product rules:
$$\eqalign{
m'(t) &= e^{{\sigma^2 t\over 2} + \mu t} ( \sigma^2 t + \mu)\cr
m''(t) &= e^{{\sigma^2 t\over 2} + \mu t} (( \sigma^2 t + \mu)^2 + \sigma^2)\cr
m'''(t) &= e^{{\sigma^2 t\over 2} + \mu t} (( \sigma^2 t + \mu)^3 + 3\sigma^2(\sigma^2t + \mu))\cr
\Rightarrow m'''(0) &= \mu^3 + 3\sigma^2 \mu\cr}$$
With $\mu = 8$ and $\sigma = .9$, this yields $E(Y^3) = 531.44$.
\bigskip
\noindent
V. This is the density for a Gamma-distributed random 
variable with $\alpha = 2$ and $\beta = 1$.  Hence
$$m(t) = (1 - t)^{-2}$$
(This can also be computed directly as
$$E(e^{tY}) = \int_0^\infty e^{ty}\cdot y e^{-y}\ dy.)$$
\bigskip
\noindent
VI.  Let $Y$ be the number of missiles among the 4 selected
that {\it will fire}.  Then $Y$ has a hypergeometric distribution
with $P(Y = y) = {{7\choose y}{3\choose 4 - y}\over {10\choose 4}}$.
\item{A)}  $P(Y = 4) = {{7\choose 4}{3\choose 0}\over {10\choose 4}}$.
\item{B)}  $P(2 \le Y \le 4) = {\sum_{y=2}^4 {7\choose y}{3\choose 4 - y} \over {10\choose 4}}$.
\bigskip
\noindent
VII.  
\item{A)} The mean survival time is $E(Y) = \alpha\beta = 12$.
\item{B)}  First 
$$E(C) = 10 + (.10)E(Y^2) = 10 + (.10)(V(Y) + (E(Y))^2) = 10 + (.10)(72+144) = 31.6.$$
Then to compute the variance of the cost:
$$\eqalign{
E(C^2) - (E(C))^2 &= E(100 + 2Y^2 + {1\over 100}Y^4) - (31.6)^2\cr
&= 100 + 2E(Y^2) + {1\over 100} E(Y^4) - (31.6)^2\cr
&= 100 + 2(216) + {1\over 100 \cdot \Gamma(2)\cdot 36} \int_0^\infty y^5 e^{-y/6}\ dy - (31.6)^2\cr
&= 532 + {1\over 100 \cdot 36} \cdot 6^6 \Gamma(6) - (31.6)^2\cr
&=1088.64\cr}$$
\item{C)} (15) The number $N$ that survive is a
binomial random variable, so 
$$P(N \ge 2) = \sum_{n=2}^6 {6\choose n} p^n q^{6-n}$$
where $p = P(Y > 15) = {1\over 36} \int_{15}^\infty y e^{-y/6}\ dy \doteq .287$.  
The probability is about $.55$.
\bigskip 
\noindent
VIII.  Let $Y = $ the motor lifetime, as a random variable. 
The warrantee length should be set at $Y = y_0$ so that the area in the {\it lower tail} of 
the normal distribution is $.03$:  $P(Y < y_0) = .03$.  
Standardizing, we get $Z = {Y - 10\over 2} < {y_0 - 10\over 2}$.  
From the normal table, ${y_0 - 10\over 2} = -1.88$.
So $y_0 = 10 - 3.76 = 6.24$ years.  (Note that shorter warrantee periods would 
give even smaller probability of motor failure, but they would be less attractive
to customers.  So the longest warrantee period giving something
less than or equal to .03 would be the one to choose to make the 
warrantee as attractive as possible, while satisfying the company's
requirements.)
\bigskip
\noindent
IX.  
\item{A)}  By a general result proved in class, 
$$m_X(t) = e^{bt} m_Y(at) = e^{\lambda(e^{at} -1) + bt}$$
\item{B)}  We write down the integral computing the moment
generating function for $Y = Z^2$, then substitute $u = \sqrt{1 - 2t} z$ 
to integrate.
The integration only yields a finite result when $1 - 2t > 0$:
$$\eqalign{
E(e^{tY}) &= E(e^{tZ^2})\cr
&= \int_{-\infty}^{\infty} e^{tz^2} {1\over \sqrt{2\pi}} e^{-z^2/2}\ dz\cr
&= \int_{-\infty}^{\infty} {1\over \sqrt{2\pi}} e^{-(1-2t)z^2/2}\ dz\cr
&= \int_{-\infty}^{\infty} {1\over \sqrt{2\pi}} e^{-u^2/2}\ {dz\over \sqrt{1-2t}}\cr
&= \int_{-\infty}^{\infty} {1\over \sqrt{2\pi}} e^{-u^2/2}\ dz \cdot {1\over \sqrt{1-2t}}\cr
&= 1 \cdot  {1\over \sqrt{1-2t}}\cr
&= {1\over (1 - 2t)^{1/2}}.\cr
}$$
By the standard forms, we see that this is the moment generating function 
for a random variable with a $\Gamma(1/2,2)$-distribution.  This is 
also known as a $\chi^2$ distribution with $1$ degree of freedom.
\bye

