\magnification=\magstep1
\overfullrule=0pt
\centerline{Mathematics 375 -- Probability and Statistics I}
\centerline{Solutions for Midterm Exam 1 -- October 8, 2009}
\bigskip
\noindent
I.  To test the effectiveness of a seal for air leaks in automobile tires, 
after the seal was installed in a tire, 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:
$$$$
\item{A)} (10) Construct a relative frequency histogram for this
data on the interval $[86.5,96.5]$, subdividing into 5 equal ``bins''
$$(86.5,88.5],(88.5,90.5],(90.5,92.5],(92.5,94.5],(94.5,96.5].$$  
\bigskip
\item{} {\it Solution:}  The histogram should have a box of height
$2/10$ on the first interval, a box of height $2/10$ on the 
second interval, a box of height $3/10$ on the third interval, 
a box of height $1/10$ on the fourth interval, and a box of 
height $2/10$ on the last interval.
\item{C)} (15)   How many of the data points are within 1 standard
deviation of the sample mean?
\bigskip
\item{} {\it Solution:}  The sample mean is 
$$\overline{x} = {93 + 87 + 91 + 90 + 92 + 88 + 95 + 91 + 90 + 96\over 10} = 91.3.$$
The sample variance is 
$$
s^2 = {1\over 9} \sum_{i=1}^{10} (x_i - \overline{x})^2 \doteq 8.01.
$$
So the sample standard deviation is $s = \sqrt{8.01} \doteq 2.83$.  
The interval $[\overline{x}-s, \overline{x} + s] = [88.47,94.13]$.
Six of the 10 data values are in this interval.  (Note:  This is relatively 
close to the empirical rule of $68\%$.)
\bigskip
\noindent
II.  Sailors on a ship can send signal by arranging
(exactly) 8 colored flags along a rope line.
\item{A)} (5) How many different signals can they send if
they have flags of 8 different colors?
\bigskip
\item{} {\it Solution:}  This is the number of permutations
of 8 things, 8 at a time:  8! (factorial, not exclamation point).
\bigskip
\item{B)} (10) How many different signals can they send if
they have 4 red, 2 green, and 2 blue flags?  (There are no
differences between the flags of the same color.)
\bigskip
\item{} {\it Solution:}  The red flags can occur in any 
4 of the 8 positions along the rope line.  Once the 
reds are placed, the greens go in 2 of the remaining 4, and then
the blues go in the remaining two slots.  By the ``$m\cdot n$ rule,''
this gives 
$${8\choose 4}\cdot {4\choose 2} \cdot {2 \choose 2} = 420$$
possible arrangements.  Note:  this is the same as the multinomial
coefficient
$$\left(\matrix{&8&\cr 4&2&2\cr}\right).$$ 
\item{C)} (10) In the situation of part B, if a random 
arrangement of flags is constructed, what is the probability that
at least 5 other flags appear between the two blue flags?
\bigskip
\item{} {\it Solution:}  The answer from part B will be the denominator
of the ratio giving the probability we want to compute.  The numerator
is the number of arrangements of the 8 flags where the two blues are
separated by at least 5 other flags.  Note that the possible 
locations for the blue flags are as shown:
$$
BXXXXXBX, BXXXXXXB, {\rm\ or\ } XBXXXXXB.
$$
In each case, the red and green flags can be placed in ${6\choose 4}{2\choose 2}$
ways (reasoning as in part B).  Therefore the probability we want is
$$
{ 3 {6\choose 4}{2\choose 2} \over {8\choose 4}\cdot {4\choose 2} \cdot {2 \choose 2}} = 
{3 {6 \choose 4}\over {8\choose 4}{4 \choose 2}}.
$$
\bigskip
\noindent
III.  Let $A_1,A_2,A_3$ be events in a sample space $S$.
Assume that $S = A_1\cup A_2 \cup A_3$, where $A_i \cap A_j = \emptyset$
if $i\ne j$.  Let $P(A_1) = .35$, $P(A_2) = .4$, $P(A_3) = .25$.
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) State the Law of Total Probability and use it to 
compute $P(B)$.  
\bigskip
\item{}  The LTP says that if we have a partition $S = A_1 \cup \cdots \cup A_k$
into events with $A_i \cap A_j = \emptyset$ whenever $i \ne j$, then for all 
events $B$, 
$$P(B) = P(B|A_1)P(A_1) + \cdots + P(B|A_k)P(A_k).$$
Applying this here:
$$P(B) = (.1)(.35) + (.2)(.4) + (.05)(.25) = .1275.$$
\item{B)} (5) Are $B$ and $A_2$ independent events?  Why or why not?
\bigskip
\item{} {\it Solution:}  No.  The events $B$ and $A_2$ are not independent,
since $P(B \cap A_2) = P(B|A_2)P(A_2) = .08$ is not the same as $P(B)P(A_2) = (.1275)(.4) = .051$.
\item{C)} (10) What is $P(A_1 \cup A_2|B)$?  State the name(s) of any general rule(s)
you are using.
\bigskip 
\item{} {\it Solution:}  Using the definition of conditional probabilities,
$P(A_1 \cup A_2|B) = {P((A_1 \cup A_2) \cap B) \over P(B)}$.  Using standard
properties of set operations, $(A_1 \cup A_2) \cap B = (A_1 \cap B) \cup (A_2 \cap B)$.
Since $A_1 \cap A_2 =\emptyset$, it follows that $(A_1 \cap B)\cap (A_2\cap B) = \emptyset$
also.  Therefore, $P((A_1 \cup A_2) \cap B) = P(A_1 \cap B) + P(A_2 \cap B)$ by the additive rule.
It follows by Bayes' Rule that the probability we want is 
$${P(B|A_1)P(A_1) + P(B|A_2)P(A_2)\over P(B)} = 1 - {P(B|A_3)\over P(B)} = 1 - (.098) \doteq .902.$$
\bigskip
\noindent
IV.  
\item{A)}  (10)  Let $Y$ have a binomial distribution with 
parameters $n = $ number of trials and $p = $ success probability on 
each trial.  Show that $E(Y) = np$.  
\bigskip
\item{} {\it Solution:}  See the class notes or the text.
\bigskip
\item{B)}  (15)  An army regiment has 20 different squads, 16 with 25
soldiers each, 3 with 100 soldiers each, and one with 300 soldiers,
for a total of 1000 soldiers.  Select a soldier at random out of
the 1000 and let the random variable $X$ equal the size of the squad
to which that soldier belongs.  Find the probability mass function,
the expected value, and the variance of $X$.   
\bigskip
\item{} {\it Solution:}  The possible values with nonzero probabilities
are $x = 25, 100, 300$.  The probability that $X$ takes one of these
values is the probability that the randomly selected soldier belongs to 
a squad of that size:
$$\eqalign{
P(X = 25) &= {400\over 1000} = .4\cr
P(X = 100) &= {300 \over 1000} = .3\cr
P(X = 300) &= {300 \over 1000} = .3\cr
P(X = x) &= 0 {\rm\ for\ all\ other\ } x.\cr
}$$
The expected value is $E(X) = (25)(.4) + (100)(.3) + (300)(.3) = 130$.
The variance is 
$$V(X) = E((X - 130)^2) = (25 - 130)^2(.4) + (100 - 130)^2(.3) + (300 - 130)^2(.3) = 13350.$$
(The standard deviation would be more meaningful here:  $\sigma = \sqrt{13350} \doteq 115.5$.
\bigskip
\noindent
{\it Extra Credit}  (10)
\bigskip
Let $X$ be a discrete random variable which takes as values all 
natural numbers $k \ge 1$.  Assuming that $E(X)$ exists, show that
$$E(X) = \sum_{k = 1}^\infty P(X \ge k).$$  (Also, why do we need to add the hypothesis that $E(X)$ exists in a case like this?)
\bigskip
\noindent
{\it Solution:}  We start from the definition of the expected value
and then regroup the terms in the sum (this is justified since the 
infinite series must be absolutely convergent -- it has all non-negative
terms!) :
$$\eqalign{
E(X) &= \sum_{k=1}^\infty k P(X = k)\cr
     &= P(X = 1) + 2 P(x = 2) + 3 P(X = 3) + \cdots \cr
     &= P(X = 1) + P(X = 2) + P(X = 3) + \cdots \cr
     &  \qquad\qquad\quad\ \  + P(X = 2) + P(X = 3) + \cdots \cr
     &  \qquad\qquad\qquad\qquad\quad\quad\ \ \  + P(X = 3) + \cdots \cr
     &  \qquad\qquad\qquad\qquad\qquad\qquad\quad\   + \cdots \cr
     &= P(X \ge 1) + P(X \ge 2) + P(X \ge 3) + \cdots \cr
     &= \sum_{k=1}^\infty P(X \ge k).\cr
}$$
The hypothesis on $E(X)$ is necessary for this kind of random variable since
for some other $Y$, $\sum_{y = 1}^\infty P(Y = y)$ would exist and sum to 1, 
but the series $\sum_{y=1}^\infty y P(Y=y)$ might {\it diverge}.  
An example would be a random variable
with 
$$P(Y = y) = {6\over \pi^2}{1 \over y^2}.$$  
The series $\sum_{y = 1}^\infty {1\over y^2}$ converges ($p$-series with $p = 2$).
The sum is actually ${\pi^2\over 6}$, and that accounts for the normalization
factor in the formula for $P(Y = y)$ above.   But 
$\sum_{y=1} y {1 \over y^2} = \sum_{y = 1}^\infty {1\over y}$ diverges (harmonic
series).
\bye
