Math 151 , Spring 2005, Day 38 Wed. May 4 Hit reload

Exam still not finished.  See Day 37

Day 38 Wed. May 4: (Re)Read  Chapter 23, Means; 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 
Using SPSS: ( Handout,)
A.  Redo the example on the handout (Cola sweetness loss). Type in the 10 data values.
B. Redo the example from last lecture (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.

Postpone:  
Sample size: (by hand) sample size for means is now optional
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. 
Paired samples:
p. 491 #13 a-d (e optional) Sleep (by hand)  Use Table T to get a benchmark significance level, instead of P-value. (Optional, find the P-value using Activstats:  The table tool (23-1, activity 3) or T the Density tool  (Ch. 23--"normal dist" looking button on menu bar does t distribution))
E. Redo the Mileageexample on the SPSS handout (back side).  The data is at   SPSS file, or in columns in Datasets page.
p. 489 # 7 Temperatures Use SPSS.  Data is on the lab computers, in  Math151 D&V\spss data files  D&V\dv01_25_07.sav
p. 493 # 22 Uninsured Use SPSS.  Data is on the lab computers, in  Math151 D&V\spss data files  D&V\uninsure.sav
p. 491 #12 Summer school Use SPSS. Type in the data.  Choose the columns so the Paired Data procedure subtracts the way you want it to.

Read,
  to 
discuss 
Optional 

Homework questions? Day 37

Get SPSS Handout
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 with n-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.)
  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 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.  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-Sp05/Days38.htm  1pm 5/6/05
This page belongs to Sally Sievers who is solely responsible for its content. Please see our statement of responsibility.