Math 151 , Spring 2006, Day 39 Fri. May 5  Hit reload After class

Day 39 (Re)Read  Chapter 23, Means; (Sample size, pp. 441-2 optional) Next Ch. 25, Paired Samples and Blocks. p. 483, Activstats uses the same dataset only does wife -husband, p. 25-1 activity 2
Hand in 
5, 6 Cattle, Teachers  Nothing new except about mean instead of proportion. 
7 Pulse rates Note the ME is half the total length of the CI 
9 Normal temperature.(CI) Do this by hand now: we'll learn how to do it on SPSS "next" 
13, 15 Hot dogs (CI)
21 Marriage (test)
25 Cars (test)
B)  For your 4 numbers from the shoebox, find an 80% confidence interval for the mean of the shoebox population, by hand.  Be ready to share it in class.

Postpone the rest:
Using SPSS: (
Handout,one sample t)

A.  Redo the example on the handout (Cola sweetness loss). Type in the 10 data values.  (Also: Look at a stem and leaf.  Should we be using t on this dataset?  Two sets of textbook authors say yes, tho it looks somewhat skewed.)
B. Redo the example on Day 38 page (Milk bacteria) Data is on the lab computers, in  Math151 D&V\SPSS for Class 05\MilkBacteria_t.sav.  Or You can copy and paste the data from Datasets page.
C.  Redo the computations from p. 449, #9. The data is not where it's supposed to be.  You can copy and paste the data from Datasets page.
p. 449 #27 Chips Ahoy  You can copy and paste the data from Datasets page.  For c,  Do the test with SPSS, and get the P-value.
Next, paired-sample (with SPSS)

Read,
  to 
discuss 
Optional 
Sample size: (by hand) pp. 441-2 
p. 449 #11 Normal temperatures II
D.  What would be a good sample size if you want a 95% CI with  a ME no more than 1, and you think the standard deviation in the population is about 1?   Assume that sampling is very expensive, so you really want  the smallest n that will do the job. 
To the circulating list, add your y-bar and s from your sample of 4 #s from the shoebox.
Exam still not finished.  Monday for sure!  Sorry!
Get SPSS Handout.
One-sample t-procedures, notes Day 38
Continue here Monday
Substitute SE for SD--use the sample standard deviation in place of sigma.  This adds "slop"--more variability-- to our estimates.  IFthe population is (nearly) normal:
is the one-sample t statistic which follows the "Student's t"  model withn-1degrees of freedom.
You should check for at least approximate normality in the data set.  (see p. 435)  Make a histogram or dotplot.  As sample size increases, t becomes more "robust" (OK if not exactly normal.)  Problem:  Few data points won't give good idea of true shape.
  Need unimodal, symmetric, no outliersOver n = 40ish,  skewness ok.   Outliers? Do with/without outliers, see if much difference.  (If conditions not met, there are other tools--CI for median, "sign" test.)

SPSS (get Handout,) does these:  Analyze>CompareMeans>One-Sample T Test.
  (Activstats 23-3, activity 3.  (This is more body temperature data, but not the same data as in D&V #9))
Test value = Null hypothesis value.
   "Sig. (2-tailed)" is P-value for 2-tailed test.  For one-tailed test (if data result is in HA direction) divide by 2!
   Analyze>Descriptive Statistics>Explore. Statistics button, set desired Confidence Level.

Sample size for desired CI (Optional) p. 441-2  As with proportion, we can solve for n in the ME formula:
Have to guesstimate s, standard deviation.  But  t* also involves n, so for a first estimate, use z* instead.  If  n is small,
use this n to choose degrees of freedom and t*, and estimate again.  Round up.
Example:  Suppose we have a normal  variable whose standard deviation  is about 1.3 and we want to find a 90% confidence interval for it with a margin of error less than 0.5.
Using table T we find that z* for a 90% confidence interval is 1.645.  Therefore
        n =  (1.645)2(1.3)2/0.52   =  18.28, round up to 19.  df = 18.  Recalculate with t18 = 1.734; get n =  20.3.  Use n = 21. (Only 2 bigger than the estimate with z)
- - - - - - - - - - - - - - -  - - - - - - -
Paired Samples (Chapter 25)   These same methods work on paired data--two measurements on same individual or on a matched pair of individuals.
   before--after, left hand--right hand, Drug A vs. Drug B on the same individual, or on a matched pair.
For each pair, find the difference in the observed values.  Then treat these differences as if they are "the" data set, from a normal population, and do One-sample t procedures.
Usually (always?) the null hypothesis will be " µ = 0", there is "no difference" between the treatments.
Examplewax paper sandwich bags:  Is the wax layer the same inside and out?
25 bags:  measure (wax outside - wax inside) for each.  (pounds per square foot).
Differences:   xbar = .093,  s = .723   n = 25    SEM = .723/5 = .1446
H0 : µ = 0 (mean difference is 0)                  t = (.093 - 0)/SEM = .093/.1446 = .643.
Ha : µ Not = 0 (there is a difference)            t is less than .685 (d.f. = 24)
                                                                          which is right-tail t* for probability .25
       Because test is 2-sided, double the tail: .50.  P value is greater than .50.
                                           No evidence for difference.
Matched-pairs data (differences) are often more normal in shape than the separate variables ("oddness" is often the same for both items in a pair, and disappears in subtraction.  Another reason why this is a nice experimental design. )

SPSS for Matched pairs:  See Handout, backside of One-Sample t.  (ActivStats p. 25-1, Activity 2)
--You can use the built-in Analyze>Compare Means>Paired-Samples T-Test.
   Disadvantages:  It always subtracts the rightmost variable from the leftmost.  You don't get a list of the differences.
--Create a new variable of the Differences:  Transform>Compute:
       Target variable: Difference, Numeric Expression: firstVariable - secondVariable.
       Do One Sample on Difference.
Handout example:  SPSS file,  in columns in Datasets page.


Sievers home  Math151-Sp06/Daysp39.htm  2pm 5/5/06
This page belongs to Sally Sievers who is solely responsible for its content. Please see our statement of responsibility.