Math 151 , Fall 2002, Friday Day 40, Dec.  6 Hit reload to get most current versionAfter Class

HW assignment Day 40
(Re)Read 7.2.  You are responsible for the material through p. 402; should read and understand the rest enough to be able to deal with the output from SPSS, and future encounters.  Up to p. 402 is the last material you're responsible for.
Hand in: (SPSS problems may be handed in Wednesday, if desired.  I encourage you to try them now...)
Two-sample-- (SPSS problems are marked.  Others by hand.)
p. 396, 7.30, 7.31 s, SE, d.f. 

 A.  (SPSS) (Mimicking the handout.)  Examples 7.7, 7.8, 7.10 in Moore, p.393 ff.  Produce (& Hand IN) the output shown in the handout. Write down the p-value for the test, & the 90% confidence interval for the difference of means.   We'll "always" use the "equal variances not assumed" option. 
 Note--If you bring in the data from the Excel or text file, the "groups" column will have 2's and 16's so you use 2 and 16 as the labels for group 1 and 2.  If you use "2" for group 1 and "16" for group 2, it will do (2-week-mean) - (16-week-mean).  It will also allow you to use "16" for group 1 and "2" for group 2--then it will do (16-week-mean) - (2-week-mean).  So (unlike the matched-pairs situation) you can choose which way to subtract. 

 p. 401, 7.34 beetles in oats (test) 
 p. 412, 7.49 voice onset time (test and CI) 

 (SPSS) p.399 7.32 logging  If you type in the data , remember you need all the tree species numbers in one column, and  a "groups" column for logged or unlogged.  (You can use strings or numbers for your logged/unlogged labels) 

 7.35 (a) chicks.   You can do this efficiently by hand with a back-to-back stemplot, or use SPSS.  SPSS won't do back-to-back stemplots, but you can get separate stemplots and side-by-side boxplots, using Analyze>Descriptive Statistics>Explore,  using the plots there.  Your response variable goes in the  Dependent list, your groups variable goes in the Factor list. 

 (SPSS) 7.35 b,c chicks 

 Reading other output: 
 p.404, 7.37 (DDT), 
 p.406, 7.39 self concept 
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
Will be assigned  Monday:   More complicated problems: putting together everything...  Read them over, do what you can,  bring questions ? 

 p. 400, 7.33 Math sublimina.(SPSS) This is a complicated design:  matched pairs, then 2-sample on the differences!  But notice chicks (7.35 ) was also  matchedpairs--weight gain =after-before--but they gave us the pre-subtracted numbers. 
 p.410, 7.45 fitness  Do b.  Then Look in the back at the answers for a and b. 
 p.422, 7.63 (SPSS) pasture fertilization 
 p.423 7.67 London bus people 
 p.425 7.72 reading biology 

Final exam Final exam is scheduled for Tuesday, Dec.17, 9-12  Please contact me ASAP if you have a problem/conflict.
Exam is closed book and notes, except bring One sheet of notes (both sides if you want) with anything you want on it.
Get handout of info, and review problems if you haven't.
~~~~~~~~~~~~~~~
Questions on HW:
Matched Pairs: Differences are often more normal in shape than the separate variables ("weirdness" is often the same for both items in a pair, and disappears in subtraction.  Another reason why this is a nice experimental design.)

Sec. 7.2, Comparing two means
"Two-sample tests".  Two SRS's, independent, from distinct  populations. (Populations are normally distributed)
Often--comparing means from an experiment with two treatments (usually control and "treatment"). Cf. p. 140.
                /--- Group 1, n1---- Treatment 1---\
              /                                    \
 Random asst.                                       Compare results
              \                                    /
               \--- Group 2, n2---- Treatment 2---/
To examine  the difference of the  two means, µ1 - µ2:
We need fairly normal populations; no extreme outliers.  Back to back stemplots are good; boxplots will do.
We use the difference of the two x-bars, (xbar1 - xbar2) = diff.
We need the Standard Error of  xbar1 - xbar2 , and then we can proceed as before, more or less.
The Standard Error is calculated like the hypotenuse of a right triangle (Pythagorean Theorem),  from the individual standard errors.
    SEdiff  = sqrt[SE(xbar1)2 + SE(xbar2)2 ]  P. 394 has another way of writing the same thing.

"t" = (xbar1 - xbar2)-0
              SEdiff
Unfortunately, this doesn't quite have an exact t-distribution, and its exact distribution is very hard to deal with.

For doing by hand:  df = smaller of (n1- 1) and (n2- 1).
Will give a "conservative" result--slightly wider C.I., slightly less significance, than a "sharper" value.  If your results hinge on the difference between this result and the computer result, they're too close for comfort anyway.

From a computer:  df = complicated formula on p. 403.  Produces non-integer degrees of freedom.  Very good approximation to the exact distribution, if both sample sizes are at least 5. Unsuitable for doing by hand.

Once we have (xbar1 - xbar2) , SEdiff and the df, our formulas pattern on the earlier ones. Example
CI :  estimate + t* . SEestimate
    CI for µ1 - µ2, difference of means,  is (xbar1 - xbar2) + t* . SEdiff
Test:  H0: µ1 - µ2 = 0 same as µ1 = µ2 , "no difference"
           Ha: µ1 - µ2 > 0 same as µ1 > µ2   Be careful with these, that you know which direction you want.
      or Ha: µ1 - µ2 < 0 same as µ1 < µ2 Often we label our variables "1" and "2" so that we expect µ1 > µ2
      or Ha: µ1 - µ2 <> 0 same as µ1 <> µ2  (not equal)
        Calculate t, find P-value (approximate, conservative)

--SPSS will do our computations when we are given raw data.
Handout for SPSS two-sample, section 7.2 (backside is optional: tables built in to SPSS)
We use the Not-equal-variances line of the results.

Monday I'll discuss this briefly:
There is a third way of doing these; the "pooled two-sample t-procedure ." =="Equal variances assumed" (See  Moore p.406.) It was the only choice in many circumstances before the above good  approximations were developed, computing power increased, and robustness was explored. The newer ways are usually preferable.


Activstats Optional: two-sample with pooled variance, Activstats ch. 21-3.  Don't neglect the green star.
   This was the only technique until "recently."  It's the basis for the much used Analysis of Variance, for comparing more than 2 independent groups.
Sievers home  Math151-Fall02/Day-40.htm  6pm 12/6 /02
This page belongs to Sally Sievers who is solely responsible for its content. Please see our statement of responsibility.