\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{Group Discussion 4 -- Chi-Square Tests for ``Goodness of Fit''}
\centerline{April 14, 2010}
\vskip 10pt
\noindent
{\it Background and Goals}
\vskip 10pt
To test whether a given box model ``fits'' a collection
of observed data or not, we have introduced the chi-square statistic
and hypothesis testing using the chi-square table from page 
A106.  Given a box model with tickets of several types, plus some observed data
from a chance process supposedly modeled by the box model:
\begin{itemize}
\item  The null hypothesis $H_0$ for a chi-square test is
that the box model {\it is consistent} with the observed data
(and any deviations from the expected values are just due to chance
variation).
\item The alternative hypothesis $H_a$ can be a different possible way
to explain what happened with the data, or it could just come down to 
saying that the box model {\it does not fit} the data in some way.
\item The {\it test statistic} is computed.  For these tests, we use
$$\chi^2 = \text{sum of } \frac{({\rm observed} - {\rm expected\ (from\ } H_0))^2}{{\rm expected}}.$$
This value is compared with the chi-square table, using 
``degrees of freedom'' equal to the number of possible 
outcomes (number of terms in the sum for the $\chi^2$ statistic), minus 1.  
\item The chance that the test statistic would come out that
way, or even ``more extremely'' is the {\it observed significance
level}, or $p$-value of the test.
\end{itemize}
Your solutions for the following problems will be due at the end of
class on Monday, April 12.  
\vskip 10pt
\noindent
{\it Discussion Questions}
\begin{enumerate}
\item[A.]  In class last Friday, we worked out a first example of 
one of these tests where the box model specified $600$ draws with
replacement from the box $[1,2,3,4,5,6]$, but the observed data
for the number of 1's, 2's, 3's, 4's, 5's, and 6's from throwing
 a die $600$ times was:
$$70, 130, 100, 80, 120, 100.$$
Recall that we saw that the observed $\chi^2$-statistic value of 26
or something more extreme would be very unlikely for a fair die.
\begin{enumerate}
\item[1.]  Suppose now we did $60$ throws rather than $600$ and the data 
came out:
$$7,13,10,8,12,10.$$
Let's think about this case.  Before carrying out the $\chi^2$ test, do you 
think this is less likely, as likely, or more likely if the die is fair than
the case we did in class?  Explain your reasoning.
\item[2.]  Carry out the $\chi^2$ test, estimate the $p$-value
from the table, and interpret your result.  
\item[3.]  Now suppose we did $60,000$ throws and the numbers of 
1's, 2's, ... , 6's were:
$$10,193 \quad 9,889 \quad 9,993 \quad 9,928 \quad 10,043 \quad 9,954$$
What does your intuition say in this case?  Does the $\chi^2$ test
confirm that?    
\end{enumerate}
\item[B.]  The International Rice Research Institute (IRRI) in the Phillipines develops
new strains of rice which combine desirable properties such as
disease resistance and resistance to insects.  They use a model 
for what happens when strains are cross-bred.  One project involved
raising  strains of rice to be resistant to a particular insect
pest.  The model indicates that the cross-breeding should produce
$1/4$ strains where all plants of that strain are resistant, 
$1/2$ strains that are mixed, and $1/4$ strains that are not
at all resistant.   Of 374 strains produced, the IRRI found the following
data:
\[
\begin{array}{rrr}
           \text{Trait} &\vline & \text{Number of Strains}\\ \hline
           \text{all plants resistant} &\vline & 97 \\
           \text{mixed} & \vline & 184  \\
           \text{no plants resistant}  &\vline & 93 \\
\end{array}
\]
\begin{enumerate}
\item[1.]  Before carrying out the $\chi^2$ test, do you 
think the data looks reasonably close to the $1/4,1/2,1/4$ fractions?
Explain your reasoning.
\item[2.]  Carry out the $\chi^2$ test, estimate the $p$-value
from the table, and interpret your result.  
\end{enumerate}
\item[C.]   Historically, the percentages of U.S. Caucasians with blood
each of the possible blood types have been:
\[
\begin{array}{rrrrrrr}
A & \vline & B & \vline & AB & \vline & O\\ \hline
41 & \vline & 10 & \vline & 4 & \vline & 45 \\
\end{array}
\]
In 2008, a random sample of 200 U.S. Caucasians was selected and the 
number with each blood type was found to be:
\[
\begin{array}{rrrrrrr}
A & \vline & B & \vline & AB & \vline & O\\ \hline
89 & \vline & 18 & \vline & 12 & \vline & 81 \\
\end{array}
\]
Is there reason to believe the current percentages are different from the 
historical percentages?  
\end{enumerate}
\end{document}
