\magnification=\magstep1
\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Lab Project 4 -- Hypothesis Testing}
\centerline{March 29 and 31, 2006}
\bigskip
\noindent
{\it Background}
\bigskip
We have now discussed various tests of hypotheses for means,
variances, etc. of normal distributions.  In this lab we will
work through several realistic examples to illustrate the 
thinking process statisticians would use to select appropriate
tests, and interpret the results.  
\bigskip
\noindent
{\it New Maple Command}
\bigskip
There is another graphical routine in our statistics
package that produces what are called 
``box-and-whisker'' plots for lists of numerical data.  You
will need to use these at several points in this lab.  The 
idea is the following.  To get a rough visual picture of
the distribution of a data set, as an alternative to the relative
frequency histogram, we can use a {\it box-and-whisker}
plot.  The idea of this graphical display is to show the
locations of the {\it minimum}, the {\it 25}th percentile,
the median or {\it 50}th percentile, the {\it 75}th percentile
and the maximum of the data values by drawing a box
with vertical bars at the 25th, 50th, 75th percentile values,
together with two thinner ``whiskers'' extending out to the 
minimum and maximum.  The new procedure in the Maple package
is designed to draw one of these plots for any collection
of lists, ``stacked vertically,'' in one graphical display so that 
we can visually compare data sets in a rough way.  Check the 
on-line documentation for more information and a usage example.  
\bigskip
\noindent
{\it Lab Questions}
\bigskip
\noindent
A) An office furniture manufacturer has developed a 
new glue application process for assembling tables.  To 
compare the new process with the old one currently in use, 
random samples with $n = 30$ are selected from
inventories produced with the two processes. 
Each table is subjected to ``destructive testing''
in which the force (in pounds) needed to break the glue in 
the table was measured.  Let $X$ be the force in pounds
needed to break one of the new tables, and $Y$ be the force
in pounds needed to break one of the old tables.  The goal
is to determine whether the new gluing process has significantly
increased the strength of the tables.  The data collected was 
as follows:
$$X: 
\matrix{1250 & 1210 & 990 & 1310 & 1320 & 1200 & 1290 & 1360 & 1200 & 1150\cr
        1120 & 1360 & 1310 & 1110 & 1320 & 980 & 950 & 1430 & 1100 & 1080\cr
        960 & 1050 & 1310 & 1240 & 1420 & 1170 & 1470 & 1060 & 1230 & 1300 \cr}$$
and 
$$Y: 
\matrix{1180 & 1360 & 1310 & 1190 & 920 & 1060 & 1440 & 1010 & 1000 & 950\cr
        1310 & 980 & 1310 & 1030 & 960 & 800 & 1280 & 1080 & 900 & 1030\cr
        930 & 1050 & 1010 & 1310 & 940 & 860 & 1450 & 1070 & 840 & 1100 \cr}$$
\bigskip
\item{1)} Construct box-and-whisker plots for these data sets (plotted together)
and make an informal conjecture about whether or not the new process (the $X$
data) has increased the strength of the tables, compared with the $Y$ data.
\item{2)} Describe an appropriate test of the null hypothesis
$H_0: \mu_X = \mu_Y$ versus $H_a: \mu_X > \mu_Y$.  Say what your
assumptions about the data are, what your 
test statistic is, what the rejection region will be, and so forth.
\item{3)}  Carry out your test at the $\alpha = .01$ level of 
significance.  Give a clear and concise statement of the conclusion
you draw from your test.
\item{4)}  What is the attained significance level of your test
(the $p$-value)?  Use the appropriate CDF function in the 
Maple package to determine an accurate estimate
of $p$, not just a range of possible values. What does this say?
\bigskip
\noindent
B)  Let $X$ be the lengths of male spiders of a particular large species
and let $Y$ be the lengths of female spiders of the same
species (both in mm).
Assume that the distributions of $X,Y$ are normal:
$N(\mu_X,\sigma^2_X)$ and $N(\mu_Y,\sigma^2_Y)$ respectively.
A random sample of $n_X = 9$ $X$ values were taken:
$$20.4, 21.7, 21.9, 21.4, 21.1, 23.6, 18.9, 22.6, 21.3$$
Similarly, a random sample of $n_Y = 13$ observations of $Y$ were
made:
$$20.5, 20.4, 20.3, 21.1, 21.2, 20.9, 21.0. 21.3, 20.9, 20.0, 20.4, 20.8, 20.3$$
Is there a statistically demonstrable 
difference in the length distributions of two sexes, though?
Here is one possible procedure for testing for equality of two
normal distributions in the small sample case:
\bigskip
\item{$\bullet$}  First, test for equality of variances.
\item{$\bullet$}  If there is no demonstrable difference in 
the variances, test for equality of the means using the 
$t$-test for equality of means that we discussed in class 
(using the pooled estimator $S_p$ for the common variance).
\item{$\bullet$}  If there is a demonstrable difference
in the variances, the basic $t$-test is not all that
reliable in some cases.  With small sample sizes, most experienced
statisticians would use a different
approximating distribution due to Welch:
Use the test statistic:
$$t = {\overline{X} - \overline{Y}\over \sqrt{{S_X^2\over n_X} + {S_Y^2\over n_Y}}},$$
but set up the rejection region for the test using a $t$-distribution 
with $r$ degrees of freedom where 
$$r = \left[{(S_X^2/n_X + S_Y^2/n_Y)^2\over 
(S_X^2/n_X)^2/(n_X-1) + (S_Y^2/n_Y)^2/(n_Y-1)}\right]\leqno(1)$$
(where $[z] = $ greatest integer less than or equal to $z$).  
\bigskip
\noindent 
In this problem, you will 
follow this procedure to test this data:
\item{1)}  Test the null hypothesis $H_0 : \sigma_X^2 = \sigma_Y^2$
against the alternative hypothesis $H_a : \sigma_X^2 \ne \sigma_Y^2$.
You may select the significance level $\alpha$.  Interpret your 
results and give the attained significance level ($p$-value).
\item{2)}  Test the null hypothesis $H_0: \mu_X = \mu_Y$ against
the alternative hypothesis $H_a : \mu_X^2 \ne \mu_Y^2$.  Select
the test statistic, etc. based on the results of your test from 
part 1 and explain your choice.  Also clearly state the conclusion
you draw from the test.
\item{3)}  Construct box-and-whisker plots of the two data sets
and reconcile with your results in parts 1 and 2.
\bigskip
\noindent
{\it Assignment}
\bigskip
Group write-ups due {\it at the end of the class on Friday, March 31}.  
\bye
  