\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{MONT 107N -- Understanding Randomness}
\centerline{Solutions For Final Examination}
\centerline{May 11, 2010}   
\vskip 10pt
\begin{enumerate}                                      
\item Short Answer.  
\begin{enumerate}
\item (10) How are the EV and SE for the sum of $n$ draws with replacement from a box computed?  
\item[] {\it Solution:}  The EV is $n$ times the average of the tickets in the box.
The SE is $\sqrt{n}$ times the SD of the tickets in the box.
\item (10) What does the Central Limit Theorem say?
\item[] {\it Solution:}  The Central Limit Theorem says that the probability histogram
for sum of $n$ draws with replacement from any box will tend to a (shifted, scaled)
normal curve as $n\to\infty$, in the sense that the area in the histogram for
for any range of sum values will tend to the area under the corresponding normal curve.
\item (10) What is a $99\%$ confidence interval for an average?
\item[] {\it Solution:}  The $99\%$ confidence interval is the interval
$$\text{sample average } \pm 3 \times \frac{\text{sample SD}}{\sqrt{n}}$$  
\item (10) What is the $p$-value of a test of significance? 
\item[] {\it Solution:}  The $p$-value is the chance that the observed value
of the test statistic, or something more extreme, would occur if the null hypothesis
is true.
\item (10) When is a $t$-test for an average used instead of a $z$-test?  
\item[]  The $t$-test is used when the size of the sample is small (usually $n < 30$), 
and it is known that the sampled values come from a population that has a normal distribution. 
\end{enumerate}
\item A statistician tosses a coin $100$ times.  His null hypothesis
is that the coin is fair, and his alternative is that 
the coin is biased in favor of heads.  The coin comes up heads $60$ times
 For each of the following, say whether the statement is true or false, and 
explain. 
\begin{enumerate}
\item (10)  If the coin was fair, there would be about a $3\%$ chance of getting $60$ or more
heads in $100$ tosses.
\item[] {\it Solution:} This is {\it TRUE}.  Making $100$ tosses of a fair coin is like drawing 100 times
with replacement from the box $[0,1]$.  The expected number of heads
is $100\times \frac{1}{2} = 50$, and the SE for the number of heads is 
$\sqrt{100}\times \sqrt{\frac{1}{2}\cdot\frac{1}{2}} = 5$.  Using the normal approximation,
the chance of getting $60$ or more heads is approximated by the area in the upper tail
of the normal curve starting at $\frac{59.5 - 50}{5} = 1.9$.  From the normal table,
his area is $\frac{1}{2}(100\% - A(1.9)) = \frac{1}{2}(100\% - 94.26\%) \doteq 2.87\%$,
which is ``about $3\%$.''
(Recall that in computing chances for numbers of discrete events using the normal curve,
the corresponding area for a single number extends from that number minus .5 to that number
plus .5.  This is the ``continuity correction.'')   
\item (10) Given that $60$ heads are observed, there is only about a $3\%$ chance
that the coin is fair.
\item[] {\it Solution:}  This is {\it FALSE}.  A particular coin is either fair or not.
There is no chance there.  The chance is in the tossing, not in the coin itself.  
\end{enumerate}
\item A gambler is playing roulette. On each play, he bets $\$1$ on a ``split'' (two adjacent
numbers), which pays 17 to 1. That is, if one of his 2 numbers comes up, 
he will win $\$17$ on a $\$1$ bet. Otherwise, he loses the $\$1$.
\begin{enumerate}
\item (5) Construct a box model for the payoff on this bet.  
(Hint: Recall there are a total of 38 slots on a roulette wheel.)
\item[] {\it Solution:}  The box is $[17,17,36\times -1]$
\item (10) Compute the average and SD of the box.
\item[] {\it Solution:}  The average is $(17+17+34\times(-1))/38 \doteq -.053$.
The SD, by the ``shortcut method,'' is:
$$SD = (17 - (-1)) \sqrt{\frac{2}{38}\cdot\frac{36}{38}} \doteq 4.02.$$
\item (10) If the bet is played 100 times, compute the EV and the SE for the payoff.
\item[] {\it Solution:} The EV is $100  \times -.053 = -5.3$ (that is the gambler is expected to lose about
$\$5.30$ overall.  The SE is $\sqrt{100} \times \$4.02 = \$40.2$.
\item (10) What are the gambler's chances of 
coming out ahead on 100 spins of the wheel?
\item[] {\it Solution:}
We want to estimate the chance that the net ``payoff'' is at least $0$.  In standard
units, this corresponds to 
$$z = \frac{0 - (-5.3)}{40.2} \doteq .13$$
From the normal table, we can estimate the chance as being between
$$\frac{1}{2}(100\% - A(.10)) = \frac{1}{2}(100\% - 7.97) \doteq 46\%$$
and 
$$\frac{1}{2}(100\% - A(.15)) = \frac{1}{2}(100\% - 11.92) \doteq 44\%$$
(Not bad, but the casino always wins in the end!)
\end{enumerate}
\item  An airline does a market research survey on travel patterns.  It takes a simple
random sample of $225$ people and works out the $95\%$ confidence interval for
the average distance they traveled on vacation in the previous year.  The computed interval
extends from 488 to 592 miles.   Say whether each statement below is true or false
and give reasons.  If there is not enough information given to decide, explain what
other information you would need.
\begin{enumerate}
\item (5) The average distance traveled was about 540 miles.
\item[] {\it Solution:} \emph{TRUE} -- As in question 1 part c, 
the midpoint of the confidence interval
is the observed average.  The midpoint is $(488 + 592)/2 = 540$.   
\item (5) The SD of the distances traveled was about 200 miles.
\item[] {\it Solution:}  \emph{FALSE} -- The confidence interval extends $2\times \frac{\text{SD}}{\sqrt{225}}$
in both directions from the midpoint.  $52 = 2\times \frac{\text{SD}}{15}$ implies
the SD had to be about $390$.  
\item (5) The probability histogram for averages of samples of size 225
drawn from the population is probably close to (scaled, shifted) normal curve.
\item[] {\it Solution:}  \emph{TRUE} -- This is far enough into the large sample range that
the Central Limit Theorem would apply in almost every case.  
\item (5) The probability histogram for the distances traveled by randomly chosen
individuals in the population is close to a (scaled, shifted) normal curve.
\item[] {\it Solution:} \emph{NEED MORE INFORMATION} -- There is no way to 
tell whether that is true from the information given.  (Like many real-world distributions,
this one could have a long right tail if there were a few people who traveled very 
long distances, while the majority traveled much smaller distances.)
\item (5) If the sample size is increased to $450$, the width of the 
confidence interval will always be about half as wide.   
\item[] {\it Solution:}  \emph{FALSE}  If the SD stayed the same, we would expect
the width to decrease by a factor of $\frac{1}{\sqrt{2}} \doteq .707$, not $\frac{1}{2} = .5$.
The SD of the sample could also change.  
\end{enumerate}
\item A simple random sample of 1000 persons is taken to determine the 
percentage of Democrats in a large population.  It turns out that
$543$ of the people in the sample are Democrats.
\begin{enumerate}
\item (10)  Compute a $95\%$ confidence interval for the percentage
of Democrats in the population.
\item[] {\it Solution:}  The observed percentage in the sample is $\frac{543}{1000} = 54.3\%$.
The SE is estimated by the ``bootstrap method:''
$$\text{SE for percent} \doteq \sqrt{\frac{(.543)(.457)}{1000}} \times 100\% = 1.58\%.$$
Then the confidence interval is 
$$\text{observed} \pm 2\text{ SE} \doteq 54.3\% \pm 3.2\%$$
\item (10)  True or False and explain:  There is about a $5\%$ chance that
the actual percentage of Democrats is outside the interval found in part A.  
\item[] {\it Solution:}  \emph{FALSE} -- The chance is in the sampling process, not
in the location of the actual percentage of Democrats.  The correct interpretation 
is that about $5\%$ of samples would yield intervals that did not contain
the actual percentage of Democrats.  
\end{enumerate}
\item The National Assessment of Educational Progress tested 17-year-olds on mathematics
in 1990 and again in 2004.  In 1990, the average score was 305 and the SD was 34.  In
2004, the average score was 307 and the SD was 27.  In both years, simple random
samples of size 1000 were used.  Can the difference be explained as chance variation, 
or have average mathematics scores really gone up?
\begin{enumerate}
\item (5) Should you use a one-sample or a two-sample $z$-test for this kind of question?
\item[] {\it Solution:}  This calls for a two-sample $z$-test, since there are two
completely independent groups of students who would have taken the tests in the two
different years.  
\item (10) Formulate null and alternative hypotheses in terms of a box model.  (Say how 
many boxes there are, how many tickets go in each, and what is on the tickets -- scores
or 0/1's.) 
\item[] {\it Solution:}  There are two boxes, one for the population of students that
took the test in each year. There is a ticket for each student each time.
The tickets have their scores, not 0/1.  The null hypothesis would be that the averages
of the two boxes are the same; the alternative is that the 2004 average is higher.
\item (10) Carry out the test, find the associated $p$-value, and discuss your results.
\item[] {\it Solution:}  We use the 2-sample $z$-test formulas.  The test statistic is
$$z = \frac{307 - 305}{\sqrt{\frac{(35)^2}{1000} + \frac{(27)^2}{1000}}} \doteq 1.43.$$
From the normal table, we see that the $p$-value is found between
$$\frac{1}{2}(100\% - A(1.40)) = \frac{1}{2}(100\% - 83.85) = 8\% \Leftrightarrow p = .08$$
and 
$$\frac{1}{2}(100\% - A(1.45)) = \frac{1}{2}(100\% - 85.29) = 7.4\% \Leftrightarrow p = .074$$
Usually $p$-values like these are not considered small enough to reject the null hypothesis.  We conclude
the difference could have been due to chance.  (And the 2-point difference in average score 
hardly seems \emph{practically significant} in any case!)
\end{enumerate}
\item A New York Times/CBS poll conducted between April 5 and April 12, 2010 
included the question ``Do you approve or disapprove of the way your Representative in Congress is
handling his or her job?''  The poll was carried out in two stages.  First a large national 
simple random sample was asked the question. 
The results were that $46\%$ of respondents said they approved, $36\%$ said they disapproved, and
$18\%$ said they had no opinion. 
Then the same question was asked of a separate sample of 881 people, 
all of whom had identified themselves as supporters of the ``Tea Party'' 
movement.  The responses broke down like this:
\[
\begin{array}{cccccccc}\hline
         & \text{Approve} &  \text{Disapprove}  &  \text{No opinion} & \text{Total}\\ \hline
\text{``Tea Party'' Sample} &   352   &   432   &    97   &    881\\
\end{array}
\]
(Data is adapted from the New York Times web site.)  It seems from the numbers that 
``Tea Party'' supporters may differ from the general population when it comes to
their opinions concerning their Congressional Representatives.  
But is this a real difference, or could it just be a product of chance
variation in the sampling process?   
\begin{enumerate}
\item (5) Formulate a null and alternative hypothesis for this question.
\item[] {\it Solution:}  The null hypothesis would be that there is really no difference,
and the observed differences were due to chance.  The alternative would be that
``Tea Partiers'' really do have a different opinion about the jobs that their 
Congressional Representatives are doing.
\item (5) What significance test should you use to decide between these?
\item[] {\it Solution:}  This calls for a $\chi^2$ test.  The idea is 
to see whether the data from the 
``Tea Partiers'' matches the national percentages out of $n = 881$.  
In other words, do a ``goodness of fit'' test.   
\item (10) Carry out your test of signficance. What do you get for a test statistic and observed
          significance level ($p$-value)?
\item[] {\it Solution:}  If the ``Tea Partiers'' were really the same as the general
population in this regard, then the expected numbers of people in the 
Approve, Disapprove, and No opinion categories would be:
$$.46 \times 881 \doteq 405.3, \quad .36 \times 881 \doteq 317.2, \quad
.18 \times 881 \doteq 158.6.$$
We use these to compute the $\chi^2$ statistic using the entries from the second row:
$$\chi^2 = \frac{(352-405.3)^2}{405.3} + \frac{(432 - 317.2)^2}{317.2} + \frac{(97 - 158.6)^2}{158.6} 
\doteq 72.5.$$
From the $\chi^2$ table with $2$ degrees of freedom, we see that $p < .01$ (much, much smaller!)
\item (5) Does this data give evidence of a real difference between ``Tea Party''
supporters and the public as a whole?  Explain.  
\item[] {\it Solution:} This is extremely strong evidence that ``Tea Partiers'' have a 
different set of opinions on this question.  (They are much less likely to approve, and
also much less likely not to have an opinion!) 
\end{enumerate}
\end{enumerate}
\centerline{\it Have a safe, enjoyable, and productive summer!}
\end{document}
