\magnification=\magstep1
\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Group Lab Project 3 -- More on Confidence Intervals}
\centerline{February 20, 2006 -- {\it due:} February 27}
\bigskip
\noindent
{\it Background}
\bigskip
\noindent
We have now discussed constructing:
\bigskip
\item{$\bullet$} Large-sample confidence
intervals for means, differences of subpopulation means,
proportions and differences of subpopulation
proportions (using pivotal quantities that are standard normal)
\item{$\bullet$}  Small-sample confidence intervals 
for means and differences of means under the assumption
that the population has a normal distribution 
(using pivotal quantities that have $t$-distributions)
\item{$\bullet$}  Confidence intervals for variances
or standard deviations (using pivotal quantities that
have $\chi^2$ distributions).
\bigskip
\noindent
In today's lab we will begin by applying some of this to an applied 
problem.  Then, we will consider the problem of finding {\it shortest
confidence intervals} for standard deviations, given the confidence level
$\alpha$.  Finally, we will consider the problem of constructing
a confidence interval for a {\it ratio} of subpopulation variances.
\bigskip
\noindent
{\it Lab Problems}
\bigskip
\noindent
A)  A lab technician tests blood samples from 25 men and computes
the total serum cholesterol level (LDL + HDL) for each.  The data obtained 
were as follows:
$$\matrix{199 & 272 & 261 & 248 & 235 & 192 & 203 & 278 & 268\cr
           230 & 242 & 305 & 286 & 310 & 345 & 289 & 326 & \cr
           335 & 297 & 328 & 400 & 228 & 205 & 338 & 252 & \cr}$$
(Ouch!!  Not a healthy-eating, regular-exercise group on the whole --
current guidelines say level should be no higher than 200 in
adult males to minimize risk of heart disease and strokes.)
\bigskip
\item{1)}  To compute confidence intervals, we need
to know values like the $z_{\alpha/2}$, or $t_{\alpha/2}(\nu)$, 
or $\chi^2_{\alpha/2}$.
in our general formulas.
Our book's tables are good, but they do not contain every possible
case we might need.  Any needed values from the standard normal,
$t$, $\chi^2$, or $F$ distributions can also be obtained 
via the {\tt NormalCDF}, {\tt TCDF}, {\tt ChiSquareCDF}, and {\tt FCDF}
functions in the Maple
package.  (Recall
there's on-line documentation available on the course homepage.)
For instance, by ``trial and error'' determine an
approximation of $z_{.02}$ that seems to be good to at least 4 decimal
places.   Compare with the best estimate
you can get using the book's standard normal table.
\item{2)} Similarly, determine an approximation to $t_{.02}(10)$, 
and compare with the values in the text.
\item{3)}  Determine an approximation to $\chi^2_{.02}(10)$ and 
 compare with the values in the book's tables.
\bigskip
\noindent
In deriving our formulas for the $(1-\alpha)\times 100\%$
confidence interval for the variance, 
we used an interval where the ``tails'' of the $\chi^2$-distributions
had equal probabilities (areas) $\alpha/2$.  This gives the general form
$$\left[{(n-1)S^2\over \chi^2_{\alpha/2}(n-1)}, {(n-1)S^2\over \chi^2_{1-\alpha/2}(n-1)}\right]$$
for the $(1-\alpha)\times 100\%$ confidence interval,
where, as in the notation of the text book's $\chi^2$ tables,
if $Y$ has a $\chi^2$ distribution,
$$P(Y \ge \chi^2_\beta) = \beta.$$
Of course, this method also gives confidence intervals for 
standard deviations by taking square roots:
$$\left[\sqrt{{(n-1)S^2\over \chi^2_{\alpha/2}(n-1)}}, \sqrt{{(n-1)S^2\over \chi^2_{1-\alpha/2}(n-1)}}\right]$$

\item{4)}  Determine a $95\%$ confidence interval for 
the population standard deviation $\sigma$ for the cholesterol data.

\bigskip
\noindent
This method is something of a {\it compromise} -- it gives a 
definite procedure to get the confidence intervals, but it does not 
always give the {\it shortest possible confidence intervals}.   
\bigskip

\item{5)}  {\it Why} might it be of interest to get the shortest
possible confidence interval $[\widehat{\theta_L},\widehat{\theta_U}]$ where 
$P(\widehat{\theta_L} \le \sigma < \widehat{\theta_U}) = 1 - \alpha$?

\bigskip
\noindent
We will next see how to select $a,b$ (different from 
$b = \chi^2_{\alpha/2}$ and $a = \chi^2_{1-\alpha/2}$ as above)
in order to {\it minimize} the length of the interval
$$\left[\sqrt{{(n-1)S^2\over b}}, \sqrt{{(n-1)S^2\over a}}\right]$$
subject to the constraint that 
$$\int_a^b f(y)\ dy = 1 - \alpha,$$
where $f(y)$ is the $\chi^2(n-1)$ pdf.  
It turns out that finding the appropriate $a,b$ is equivalent to 
solving the two equations:
$$\eqalign{\int_a^b f(y)\ dy &= 1 - \alpha\cr
      a^{n/2}e^{-a/2} - b^{n/2}e^{-b/2} &=0 \cr}\leqno(2)$$
The following Maple procedure does this computation:
\bigskip
\leftline{\tt ShortestSigmaCI:=proc(alpha,n)}
\leftline{\tt local a,b,eq1,eq2,g,x,s;}
\leftline{\tt g:=x\^{}((n-1)/2-1)*exp(-x/2)/(2\^{}((n-1)/2)*GAMMA((n-1)/2));}
\leftline{\tt eq1:=int(g,x=a..b)=1-alpha;}
\leftline{\tt eq2:=evalf(a\^{}(n/2)*exp(-a/2)=b\^{}(n/2)*exp(-b/2));}
\leftline{\tt s:=fsolve($\{$eq1,eq2$\}$,$\{$a,b$\}$,$\{$a=0..n-1,b=n-1..infinity$\}$);}
\leftline{\tt return s;}
\leftline{\tt end:}

\bigskip
\item{6)}  Enter this procedure into your worksheet and 
use it to determine the $a,b$ for the shortest confidence
$95\%$ intervals for the standard deviation with $n = 3,4,5,6,7,8,9,10$.
Compare with the ``compromise'' intervals for this $\alpha$ and $n$.
How much are we gaining?  (Note:  $n$ is the number of samples here -- 
the corresponding $\chi^2$ distribution has $n - 1$ degrees of freedom.)
\item{7)}  (For after the lab)  Show that the solution of 
(2) above does give the minimum length interval. (Hint:
This is a constrained optimization problem.  What method 
from MATH 241 applies to these?)
\bigskip
\noindent
B)  (This one will require some thought before you 
start plugging numbers into Maple!)  A group of pediatric nurses
were interested in the effect of prenatal care on the birthweight
of babies.  Mothers were divided into two groups, and their
babies' weights were compared.  The mothers in group 1
had 5 or fewer prenatal care sessions, and their
babies had birthweights:
$$49,108,110,82,93,114,134,114,96,52,101,114,120,116$$
(all in ounces).
The mothers in group 2
had 6 or more prenatal care sessions, and their
babies had birthweights:
$$133,108,93,119,119,98,106,87,153,116,129,97,110,131$$
(also in ounces).  One question they were trying to address
with this study was:  
\medskip
\noindent
{\it Was there more variation in the birthweights of the babies whose 
mothers had fewer prenatal care visits  than in 
the birthweights of the babies whose mothers had more visits?}
\bigskip
\item{1)}  Explain why $\theta = \sigma_1^2/\sigma_2^2$ is an
appropriate target parameter to consider, and 
why the statistic $\widehat{\theta} = S_1^2/S_2^2$ is a reasonable
estimator ($S_i^2 = $ sample variance for group $i = 1,2$).  
\item{2)} What is the 
value of this statistic here, and what does it suggest?
\item{3)}  But now, the next question is:  How reliable is
that conclusion?  How likely is it that we could 
get a different conclusion for different random samples from the 
same distributions?  To answer this we can try to construct
a confidence interval for the ratio $\theta = \sigma_1^2/\sigma_2^2$.
To do this, explain why $(S_1^2/\sigma_1^2)/(S_2^2/\sigma_2^2)$
is an appropriate ``pivotal quantity'' to use to derive
confidence intervals for $\sigma_1^2/\sigma_2^2$.  Recall this means that:
\itemitem{$\bullet$}  $\sigma_1^2/\sigma_2^2$ must be the 
only unknown part and 
\itemitem{$\bullet$} the distribution of the pivotal quantity 
must be {\it known}.  
\item{3)}  Explain how to get a $(1-\alpha)\times 100\%$ confidence
interval for $\sigma_1^2/\sigma_2^2$, and use your method
to find a $95\%$ confidence interval for $\sigma_1^2/\sigma_2^2$
using the data above.  What does this suggest about your 
conclusion from part 2?

\bye