\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 5}
\centerline{October 21, 2011}
\vskip 10pt
\noindent
\vskip 10pt
\noindent
3.67.  This is geometric with $p = .3$.  So $P(Y = 5) = (.7)^4(.3) \doteq .072$.
\vskip 10pt
\noindent
3.68.  The expected number is $\frac{1}{.3} \doteq 3.3$ by Theorem 3.8.
\vskip 10pt
\noindent
3.71. (a)  For a geometric random variable $Y$, 
$$P(Y > a) = \sum_{y=a+1}^\infty q^{y-1} p = \frac{pq^a}{1 - q} = q^a$$
(where we used the geometric series sum formula -- this is a 
geometric series with first term $q^ap$ and ratio $q$).  

(b) Using the definition of conditional probability
and part a),
$$P(Y> a + b \mid Y > a) = \frac{P(Y>a+b)}{P(Y > a)} = \frac{q^{a+b}}{q^a} = q^b.$$
(Note $Y>a+b$ implies $Y > a$, so the event $(Y > a+b) \cap (Y > a)$
is the same as $Y > a + b$.)

(c)  This is the same as $P(Y > b)$.  In other words,
for geometric random variables, the probability that
$Y > a + b$ given that $Y > a$ (i.e. the probability that 
the first success occurs after trial $a + b$, given that
the first success occurs after trial $a$) is the same
as the probability that the first success occurs after trial $b$.
Geometric random variables thus are ``memoryless'' in 
the sense that starting from the $a$-th trial (with no previous
successes), the probability
that the first success occurs more than $b$ trials later is the same 
as if we started from the beginning with the $0$th trial.  
The previous non-successes don't affect the probability 
of later successes -- no ``memory''.
\vskip 10pt
\noindent
3.72.  This is the situation of 3.71 with $a = 10$ and $b = 1$.
The probability is the same as $P(Y > 1)$ for a geometric
random variable with $p = q = 1/2$.  Hence $P(Y > 1) = 1 - (1/2) = 1/2$.
\vskip 10pt
\noindent
3.75.  (a) Geometric with $p = .1, q = .9$.  $P(Y = 3) = (.9)^2(.1) = .081$.
(b) $P(Y \ge 3) = 1 - P(Y \le 1) = 1 - .1 - (.9)(.1) = .81$.   
\vskip 10pt
\noindent
3.87.  We have 
\begin{align*}
E(1/Y) &= \sum_{y=1}^\infty \frac{1}{y} q^{y-1} p\\
&= \frac{p}{q} \sum_{y=1}^\infty \frac{q^y}{y}\\
&= -\frac{p}{q}\ln(1 - q)\\
&= \frac{p}{q}\ln\left(\frac{1}{p}\right).
\end{align*}
3.102.  This is a hypergeometric probability.  Lumping the 5 non-green
marbles together, the probability is
$$\frac{\binom{5}{3}\binom{5}{0}}{\binom{10}{3}} 
= \frac{5\cdot 4 \cdot 3}{10\cdot 9 \cdot 8} = \frac{1}{12}.$$
\vskip 10pt
\noindent
3.103.  Hypergeometric:
$$\frac{\binom{6}{5}\binom{4}{0}}{\binom{10}{5}} = \frac{1}{42}.$$
\vskip 10pt
\noindent
3.105.  (a)  $Y$ is hypergeometric because the teachers
are selected \emph{without replacement} from the finite pool of $8$ candidates.

(b) The number of internship candidates chosen is hypergeometric with
$N = 8$, $r = 5$ (the internship candidates) $n = 3$ (the chosen ones).
So the desired probability is 
$$P(Y = 2) + P(Y = 3) = \frac{\binom{5}{2}\binom{3}{1}}{\binom{8}{3}} + 
\frac{\binom{5}{3}\binom{3}{0}}{\binom{8}{3}} \doteq .536 + .179 \doteq .714.$$
(c) Using the formulas from Theorem 3.10,
$\mu = \frac{nr}{N} = \frac{15}{8} = 1.875$, and 
$$
\sigma^2 = n \cdot \frac{r}{N}\cdot\frac{N-r}{N}\cdot\frac{N-n}{N-1} 
= 3 \cdot \frac{5}{8}\cdot\frac{3}{8}\cdot\frac{5}{7} = \frac{225}{448}.
$$
So the standard deviation is 
$\sigma = \sqrt{\frac{225}{448}} \doteq .709$.
\vskip 10pt
\noindent
3.106.  The cost is determined by the number $Y$ of defectives
found among the 5 chosen machines.  This is hypergeometric with 
$N = 10$, $n = 5$, $r = 4$.  So the mean of the 
total repair cost is 
$$E(50Y) = 50\cdot \frac{5\cdot 4}{10} = 100,$$
and the variance is
$$V(50Y) = 50^2 \cdot 5 \frac{4}{10}\frac{6}{10}\frac{5}{9} = 1666.67.$$
\vskip 10pt 
\noindent
3.108.  The number of defectives found is hypergeometric with $N = 20$, 
$r = 3$.  We want to choose $n$ so that 
$$P(Y = 0) = \frac{\binom{3}{0}\binom{17}{n}}{\binom{20}{n}} \le .2.$$
The smallest $n$ for which this is true is $n = 8$ (found by trial and error).
\vskip 10pt
3.121.  We have $P(Y = y) = \frac{2^y e^{-2}}{y!}$.  So 
(a) $P(Y = 4) \doteq .09$.  (b)  $P(Y \ge 4) = 1 - P(Y \le 3) \doteq .143$.
(c) $P(Y < 4) \doteq .857$. (d)  $P(Y\ge 4\mid Y \ge 2) \doteq 
\frac{.143}{.594} = .241$.
\vskip 10pt
\noindent
3.122. (a)  
$P(Y \le 3) = \displaystyle{\sum_{y=0}^3 \frac{7^y e^{-7}}{y!}} \doteq .0818$.  

(b)  $P(Y \ge 2) = 1 - P(Y = 0) - P(Y = 1) \doteq .993$.

(c)  $P(Y = 5) = \frac{7^5 e^{-7}}{5!} \doteq .128$.
\vskip 10pt
\noindent
3.126. (a) The arrivals over the two-hour period are a Poisson
process with $\lambda = 14$.  So the probability that there are
exactly 2 arrivals is $\displaystyle{\frac{14^2 e^{-14}}{2!}}$.
 

(b) {\it Method 1 -- ``direct approach'':} Let $I$ be the number of customers arriving between 1 and 2 and
$II$ the number between 3 and 4.  Let $T = I + II$ be the total number.  We can 
get $T = 2$ in three different ways ($I = 2$ and $II = 0$, or
$I = 1$ and $II = 1$, or $I = 0$ and $II = 2$.)  Then 
using independence:
\begin{align*}
P(T = 2) &= \sum_{k=0}^2 P(I = k) P(II = 2-k)\\
&= \sum_{k=0}^2 \frac{7^k e^{-7}}{k!}\cdot\frac{7^{2-k}e^{-7}}{(2-k)!}\\
&= e^{-14}\left( \frac{7^2}{2} + 7^2 + \frac{7^2}{2}\right)\\
&= e^{-14} \frac{4\cdot 7^2}{2!}\\
&= \frac{14^2 e^{-14}}{2!}
\end{align*}
(same as in part (a)!)

\vskip 10pt
\noindent
{\it Method 2 -- ``clever'':}  The fact that there are two contiguous
hours in part (a) is really irrelevant for the total number $T$ of 
customers arriving if the 
numbers from the two hours are independent.  The same method used
in (b) works in (a) as well.

\vskip 10pt
\noindent
{\it Comment:}  In fact, this problem illustrates a \emph{general} fact
about Poisson random variables.  If you have $X$ Poisson with 
parameter $\lambda$ and $Y$ Poisson with parameter $\mu$ and 
$X,Y$ are independent, then $Z = X+Y$ also has a Poisson distribution
with parameter $\lambda + \mu$.  One proof comes from an argument 
like the ``direct approach'' above:
\begin{align*}
P(Z = z) &= \sum_{x=0}^z P(X = x)P(Y = z - x)\\
&= \sum_{x=0}^z P(X = x)P(Y = z - x)\\
&= \sum_{x=0}^z \frac{\lambda^x e^{-\lambda}}{x!} \cdot
\frac{\mu^{z-x} e^{-\mu}}{(z-x)!}\\
&= e^{-(\lambda+\mu)} \sum_{x=0}^z \frac{1}{x! (z-x)!} \lambda^x \mu^{z-x}\\
&= \frac{e^{-(\lambda+\mu)}}{z!} \sum_{x=0}^z \binom{z}{x} \lambda^x \mu^{z-x}\cr
&=\frac{e^{-(\lambda+\mu)}}{z!} (\lambda + \mu)^z
\end{align*}
(using the binomial theorem).  This is exactly the 
right probability function for a Poisson random variable
with parameter $\lambda + \mu$.  

\vskip 10pt
\noindent
4.1.  (a)  We have
$$F(y) = P(Y \le y) = \begin{cases} 0 & y < 1 \\
                                   .4 & 1 \le y < 2\\
                                   .7 & 2 \le y < 3\\
                                   .9 & 3 \le y < 4\\
                                    1 & y \ge 4.
                      \end{cases}$$
(b)  The graph is a step function with jump discontinuities at
$y = 1, 2, 3, 4$.   
\vskip 10pt
\noindent
4.2.  (a)  We have $P(Y = 1) = .2$, $P(Y = 2) = (.8)(.25) = .2$, 
$P(Y = 3) \doteq (.8)(.75)(.3333) = .2$, $P(Y = 4) \doteq (.8)(.75)(.6667)(.5) = .200$,
$P(Y = 5) = (.8)(.75)(.6667)(.5) = .200$.
(b)  The distribution function is
$$F(y) = P(Y \le y) = \begin{cases} 0 & y < 1 \\
                                   .2 & 1 \le y < 2\\
                                   .4 & 2 \le y < 3\\
                                   .6 & 3 \le y < 4\\
                                   .8 & 4 \le y < 5\\
                                    1 & y \ge 5.
                      \end{cases}$$
(c)  $P(Y < 3) = .4$, $P(Y \le 3) = .6$, and $P(Y = 3) = .2$.  
(d)  There is no contradiction.  $Y$ is not a continuous random
variable so the equation $P(Y = a) = 0$ does not apply. 
Note that $F(y)$ has jump discontinuities at $y = 1,2,3,4,5$.   
\vskip 10pt
\noindent
4.6.  (a) The probability function for the (discrete) geometric
random variable is $p(y) = q^{y-1}p$.  Hence if $y = i \ge 1$,
\begin{align*}
F(i) &= P(Y \le i) = P(Y = 1) + \cdots + P(Y = i)\\
     &= p(1 + q + q^2 + \cdots + q^{i-1})\\
     &= p\cdot \frac{1 - q^i}{1 - q}\\
     &=1 - q^i
\end{align*}
(where we used the formula for the sum of a finite geometric series
to get the next to last line, then simplified using $q = 1 - p$).
Now, if $y > 0$ is not an integer, we get $F(y) = F(i)$
where $i$ is the largest integer $\le y$.  Hence 
$$
F(y) = \begin{cases} 0  & \text{ if } y < 0\\
                       1-q^i & \text{ if } i \le y < i+1 \text{ for } i = 0, 1, 2, \ldots.
         \end{cases}
$$

b)  $\displaystyle{\lim_{y\to -\infty}F(y) = 0}$ by the definition.  Then,
$$\lim_{y\to +\infty}F(y) = \lim_{i\to\infty} 1 - q^i = 1$$
since $q < 1$.  Finally, we want to show $F(y)$ is non-decreasing.  If $y_1 \le y_2$ and
$y_1$ or $y_2$ is negative then $F(y_1) = 0$ and the inequality $0 = F(y_1) \le F(y_2)$
is satisfied.  So we can assume $0 < y_1 \le y_2$.  If this is true, then
it must be true that $i_1 = [y_1] \le i_2 = [y_2]$ (I'm using the 
shorthand notation $[x] = $ greatest integer $\le x$ here).  Hence since $0 < q < 1$, 
$$0 < y_1 \le y_2 \Rightarrow q^{i_2} \le q^{i_1} \Rightarrow
-q^{i_1} \le -q^{i_2} \Rightarrow 1-q^{i_1} \le 1-q^{i_2} \Rightarrow F(y_1) \le F(y_2).$$

\noindent
4.8.  (a)  We must have 
$\int_{-\infty}^{+\infty} f(y)\ dy = \int_0^1 k y(1 - y)\ dy = 1$.
This gives the equation $k \left.\left(\frac{y^2}{2} - \frac{y^3}{3}\right)\right|_0^1 = 1$, so $\frac{k}{6} = 1$, and $k = 6$.  

(b)  
\begin{align*}
P(.4 \le Y\le 1) &= \int_{.4}^1 6y(1-y)\ dy\\
&= \left. 3y^2 - 2 y^3\right|_{.4}^1\\
&= .648.
\end{align*}

(c)  This is the same as (b) because $Y$ is a continuous
random variable, so including the endpoints or not makes
no difference.

(d)  By the definition of conditional probability, 
$$
P(Y\le .4 | Y \le .8) = \frac{P(Y\le .4)}{P(Y\le .8)} = 
\frac{\int_0^{.4} 6y(1 - y)\ dy}{\int_0^{.8} 6y(1 - y)\ dy} \doteq .393.
$$

(e)  This is the same as (d) for the same reason as in
(c).
\vskip 10pt
\noindent
4.10.  (a) and (b)  We have
$\int_0^{y_0} 6y(1-y)\ dy = -2b^3 + 3b^2$.  This equals
$.95$ when $b \doteq .8646$.  (There are also two other
real roots, but they lie outside the interval $[0,1]$.  
(c) They are the same.  This is a continuous random variable.
\vskip 10pt
\noindent
4.15.  (a)  The function values $f(y) \ge 0$ for all $y$ by definition.  
We also have 
\begin{align*}
\int_{-\infty}^\infty f(y)\ dy &= \int_b^\infty \frac{b}{y^2}\ dy\\
&= \left. \frac{-b}{y} \right|_b^\infty\\
&= 1.
\end{align*}
Hence $f$ has the required properties.  
(b)  We have
$$F(y) = \begin{cases}
              0 & y \le b\\
            1 - \frac{b}{y} & b \le y < \infty.
         \end{cases}$$
(c) If $c > 0$, then 
$$P(Y > b + c) = 1 - P(Y \le b + c) =  1 - (1 - \frac{b}{b + c}) = \frac{b}{b + c}.$$
(d)  Using part (c) we have for $d > c$,
$$P(Y > b + d \mid Y > b + c) = \frac{\frac{b}{b+d}}{\frac{b}{b+c}} = \frac{b+c}{b+d}.$$  
 
\end{document}
\vskip 10pt 
\noindent
3.147.  We have by the formula for the sum of a geometric series:
\begin{align*}
E(e^{tY}) &= \sum_{y=1}^\infty e^{ty} q^{y-1} p\\
&= p e^t \sum_{y=1}^\infty (e^t q)^{y-1}\\
&= \frac{p e^t}{1 - q e^t}.
\end{align*}
\vskip 10pt
\noindent
3.148.  We have 
\begin{align*}
m'(t) &= \frac{d}{dt}\left(\frac{p e^t}{1 - q e^t}\right)\\
&= \frac{(1-qe^t)pe^t - pe^t(-qe^t)}{(1 - qe^t)^2}\\
&= \frac{pe^t}{(1 - qe^t)^2}.
\end{align*}
Hence $E(Y) = m'(0) = \frac{p}{(1 - q)^2} = \frac{1}{p}$ (as expected).
Then differentiating again with respect to $t$:
\begin{align*}
m''(t) &= \frac{(1 - qe^t)^2 p e^t + 2 p q e^t (1 - qe^t)}{(1 - qe^t)^4}\\
&= \frac{pe^t + pqe^{2t}}{(1 - qe^t)^3}.
\end{align*}
So $m''(0) = \frac{p + pq}{p^3} =  \frac{1 + q}{p^2}$.
Then 
$$V(Y) = \frac{1 + q}{p^2} - \frac{1}{p^2} = \frac{q}{p^2}.$$
This is also as expected from Theorem 3.8.
\vskip 10pt
\noindent
3.153.  By the Uniqueness Theorem for the moment generating function,
and the formulas from class and the text for moment generating
functions for standard types of random variables,
\begin{enumerate}
\item[(a)] Binomial, $n = 5$, $p = 1/3$.
\item[(b)] Geometric, $p = 1/2$.
\item[(c)] Poisson, $\lambda = 2$.
\end{enumerate}
\vskip 10pt
\noindent
3.156.  (a)  We always have $m(0) = E(e^0) = 1$.  (b) 
Since $W = 3Y$,  $m_W(t) = E(e^{tW}) = E(e^{(3t)Y}) = m_Y(3t)$.  
(c)  Similarly, since $X = Y - 2$, 
$$m_X(t) = E(e^{tX}) = E(e^{t(Y - 2)}) = E(e^{-2t} \cdot e^{tY})$$
Since $e^{-2t}$ is a constant-valued function of $t$, this
equals $e^{-2t} E(^{tY}) = e^{-2t} m_Y(t)$.  
\vskip 10pt
\noindent
3.157.  (a)  By general properties of moment generating
functions, $E(W) = m_W'(0) = \left.\frac{d}{dt} m_Y(3t) \right|_{t=0}$.
By the chain rule, this is $3m'(3t)|_{t=0} = 3 m_Y'(0) = 3 E(Y)$.  Similarly,
differentiating again another factor of 3 emerges
by the chain rule, so  $E(W^2) = 9 m_Y''(0) = 9E(Y^2)$.  Hence
$V(W) = 9 E(Y^2) - (E(Y))^2) = 9 V(Y)$.  
(b)  We have $m_X(t) = e^{-2t} m_Y(t)$, so by the product rule
$m_X'(t) = e^{-2t} m_Y'(t) - 2e^{-2t} m_Y(t)$.  Therefore,
$E(X) = m_X'(0) = m_Y'(0) - 2 m_Y(0) =  E(Y) - 2$.
Then differentiating again, 
$$m_X''(t) = e^{-2t} m_Y''(t) - 4 e^{-2t}m_Y'(t) + 4 e^{-2t} m_Y(t).$$
Substituting $t = 0$, 
$$E(X^2) = E(Y^2) - 4 E(Y) + 4.$$
Hence
$$V(X) = E(X^2) - (E(X))^2 = (E(Y^2) - 4 E(Y) + 4) - (E(Y) - 2)^2 = E(Y^2) - (E(Y))^2 = V(Y).$$
