\magnification=\magstep1
\centerline{Mathematics 375 -- Probability Theory}
\centerline{Solutions for Midterm Exam 1 -- October 7, 2011} 
\bigskip
\noindent
I.  (15)  To test the effectiveness of a seal designed to keep a tire patch
airtight, a needle was inserted into the tire and air pressure
was increased until leakage was observed.  The pressures (in lb per square
inch) where leakage first occurred on 10 trials were:
$$8.1, 8.5, 8.3, 8.8, 8.2, 7.8, 8.9, 7.5, 8.3, 8.0$$
How many of the data points are within 1 standard
deviation of the mean?  How well does this fit the ``empirical rule?''
\bigskip
\noindent
{\it Solution:}  We have the sample mean is
$$\overline{y} = {8.1+8.5+8.3+8.8+8.2+7.8+8.9+7.5+8.3+8.0\over 10} = 8.24$$
and 
$$\eqalign{
s^2 &= {(8.1^2+8.5^2+8.3^2+8.8^2+8.2^2+7.8^2+8.9^2+7.5^2+8.3^2+8.0^2) -{1\over 10}(82.4)^2 \over 9} \cr
&\doteq .1827\cr}$$
Therefore, the sample standard devation is $s \doteq \sqrt{.1827} \doteq .4274$.
The interval $[\overline{y} - s,\overline{y} + s] \doteq [7.8126,8.6674]$.  Six
of the ten data points fall into this interval.  This is not too far from
the $68\%$ we expect for normally distributed data from the empirical rule (especially considering that with $n = 10$ measurements, the value
6 gives one of the two closest possibilities to 6.8).
\bigskip
\noindent
II.  Students on a boat send signals back to the shore by stringing
(exactly) 9 colored flags along a vertical rope (without overlapping).
The signal is determined solely by the relative positions of the flags.  
\item{A)} (5) How many different signals can they send if
they have flags of 9 different colors?
\bigskip
\item{} {\it Solution:}  This is the number of permutations of 9 distinct objects
taken 9 at a time, or $9\cdot 8\cdot 7\cdot \cdots \cdot 2 \cdot 1 =  9!$. 
\bigskip
\item{B)} (10)  Now suppose they have 4 red flags and 5 green flags. If a random 
arrangement of flags is constructed, what is the probability that
all the green flags appear {\it consecutively}?
\bigskip
\item{} {\it Solution:}  Think of putting the 9 flags into 9 slots.  The arrangement
is determined by where the 5 green flags go, so there are ${9\choose 5}$ different
arrangements.  The ones in which green flags appear consecutively can be 
counted by noticing that the string of green flags can start in position 1,2,3,4, or 5,
but not after that since there is not enough room for them all.  This gives
$$P({\rm green\ consecutive}) = {5\over {9\choose 5}} = {5\over 126} \doteq .03968.$$ 
This can also be derived by thinking of the arrangements as permutations:
$$P({\rm green\ consecutive}) = {5\cdot 5!\cdot 4! \over 9!}.$$
(The factors of $5!$ and $4!$ in the numerator give the ways of permuting
the red and green flags separately; the arrangements are indistinguishable
if we think of all green flags and all red flags as the same.)
\bigskip
\noindent
III.   The first three parts of this question deal with this
situation:  Let $A_1,A_2,A_3$ be events in a sample space $S$.
Let $P(A_1) = .4$, $P(A_2) = .2$, $P(A_3) = .4$, and assume
$A_i \cap A_j = \emptyset$ if $i \ne j$.  
Finally, let $B$ be another event with $P(B|A_1) = .1$,
$P(B|A_2) = .2$ and $P(B|A_3) = .05$.  
\item{A)} (10) What is $P(B)$?
\bigskip
\item{} {\it Solution:}  The given information implies that the 
$A_i$ form a partition of $S$.  By the Law of Total Probability,
$$\eqalign{
P(B) &= P(B|A_1)P(A_1) + P(B|A_2)P(A_2) + P(B|A_3)P(A_3)\cr
 &= (.1)(.4) + (.2)(.2) + (.05)(.4)\cr
 &= .1.\cr}$$
\item{B)} (5) Are $B$ and $A_2$ independent events?  Why or why not?
\bigskip
\item{} {\it Solution:}  Since $P(B) \ne P(B|A_2)$, the answer is 
immediately ``no.''
\bigskip
\item{C)} (10) Find $P(A_1 \cup A_2 | B)$.  
\bigskip
\item{}  There are a number of different ways to do this.
The most direct is probably to use the definition of 
conditional probability:
$$\eqalign{
P(A_1\cup A_2|B) &= {P((A_1 \cup A_2) \cap B) \over P(B)}\cr
&= {P(((A_1\cap B) \cup (A_2\cap B)) \over P(B)}\cr
&= {P(A_1\cap B) + P(A_2\cap B)\over P(B)}\cr}$$
(the last follows since $P(A_1 \cap A_2) = 0$).  We know
that $P(A_1 \cap B) = P(B|A_1)P(A_1) = .04$ and $P(A_2\cap B) = P(B|A_2)P(A_2) = .04$.
So the desired probability is ${.04 + .04\over .1} = .8$
\bigskip   
\item{D)} (15) Now, working in general, state and prove Bayes' Rule.  
\bigskip
\item{} {\it Solution:}  See text and class notes.  
\bigskip
\noindent
IV.  
\item{A)}  (20)  A jar contains 7 red and 11 white balls.  Draw {\it two
balls} at random, {\it replacing the first ball after it is drawn}.  
Let $X$ be the number of balls drawn that are red.  Thinking of $X$ as a 
discrete random variable, find its probability function, and compute 
its expected value and variance.
\bigskip
\item{} {\it Solution:}  Since the first ball is replaced, the probabilities
of getting a red or white ball on the second draw are the same as on the first.
The number of reds is $X \sim Binomial(2,7/18)$ (a binomial distribution
with $n = 2$ and $p = 7/18$).
The probability function is 
$$\eqalign{P(X = 0) &= {2\choose 0} (7/18)^0 (11/18)^2 \doteq .3735\cr
           P(X = 1) &= {2 \choose 1}(7/18)(11/18) \doteq .4753\cr
           P(X = 2) &= {2\choose 2} (7/18)^2 (11/18)^0 \doteq .1512\cr}$$
The expected value is $E(X) = (0) (.3735) + (1) (.4753) + (2)(.1512) \doteq .7777$ (exact
value is $2\cdot 11/18 = 7/9$ from the formula for binomial random variables).  
The variance is $E(X^2) - (E(X))^2 \doteq .4753$ (exact value $2\cdot (7/18) \cdot (11/18) = 77/162$).  
(Note that it is a general fact that $V(Y) = P(Y = 1)$ for any $Y \sim Binomial(2,p)$.)   
\bigskip
\item{B)}  (10)  Now consider drawing two balls {\it without replacing 
the first ball after it is drawn}, and let $Z$ be the number 
of red balls drawn.  Give the probability function for this $Z$. 
\bigskip
\item{} {\it Solution:}  The probabilities are as follows:
$$\eqalign{P(Z = 0) &= {{7 \choose 0} {11 \choose 2} \over {18\choose 2}} = (11/18)(10/17) \doteq .3595\cr
           P(Z = 1) &=  {{7 \choose 1} {11 \choose 1} \over {18\choose 2}} = (11/18)(7/17) + (7/18)(11/17) \doteq .5033\cr
           P(Z = 2) &=  {{7 \choose 2} {11 \choose 0} \over {18\choose 2}} = (7/18)(6/17) \doteq .1373 \cr}$$
(The problem did not ask for this, but note that the expected value becomes $E(Z) \doteq .7779$.  
The exact value is actually also $7/9$ as in part A.
The variance becomes $V(Z) \doteq .4474$.  Note:  $Z$ has a {\it hypergeometric} distribution.)

\vfill\eject
\noindent
{\it Extra Credit}  (10)
\bigskip
The probability that a randomly chosen male has a circulation problem
is $.25$.  Males who have a circulation problem are twice as 
likely to be smokers as those who do not have a circulation problem.
What is the probability that a male has a circulation problem, given
that he is a smoker?   
\bigskip
\noindent
{\it Solution:}  Let $C$ represent the event that a chosen male has the 
circulation problem, so $P(C) = .25$.  Let $S$ be the event that the
male is a smoker.  The second sentence says $P(S|C) = 2 P(S|\overline{C})$.
We want $P(C|S)$.  Applying Bayes' Rule,
$$\eqalign{
P(C|S) &= {P(S|C)P(C)\over P(S|C)P(C) + P(S|\overline{C})P(\overline{C})}\cr
&= {P(S|C)(.25)\over P(S|C)(.25) + P(S|C)(.75)/2}\cr
&= {.25\over .625}\cr
&=.4\cr}$$

\bye
