Math 151 , Day 37, Monday, April 30, 2007 .After classHit reload .

HW Day37   P. 355, choosing n for a desired C and m.   Check,  sample size 14.17.  Chapter 15, Signifincance testing (the "other" big topic in inference)   Read Ch. 15, first to p. 364, then to p. 376.  Check: p. 381  Hypotheses: 15.26, 27.  Test statistic15.28.   P-value (one-sided) 15.31, 32.
Hand in  Wednesday .
Sample size for C.I. (& review of CI computations)You can check using the bottom section of the Confidence Interval Excel sheet.
p. 356, 14.10 Estimating mean IQ
p. 358 14.24 Hotel managers
p. 360, 14.33 calibrating a scale

Continue with shoebox numbers: on  a  separate sheet:   If you haven't already, get a sample of size 4 from each of the two shoeboxes (in class, or outside my door.) (White from red-top box, Yellow from green box.): Bring Wed: 

A.  For each of your samples of size n=4  from the two shoeboxes *(keep track of which box they came from!): 
test H0:  µ=20 vs.  Ha:   µ  > 20.  Do it like this: 
--Find xbar (may  have already).
--Standardize your xbar, thus finding a z (assuming the population mean is 20, and the population s.d. is 4, so the s.d. for Xbar is 2)
--Use the standard normal table to find the probability to the right of your z.  (this is the "P-value" for your x-bar.)
--Is your P-value smaller (less likely) than alpha = .10? (Y/N) If Yes, your result is "significant at the alpha = .10 level"
--Do you think the box has mean > 20?
Be ready to add your results to the circulating sheets  Wednesday.
*Boxes outside my door, if you didn't get your samples in class or over the weekend.

<>Beginning Ch. 15
p. 364, 15.1  Anemia

Stating null and alternative hypotheses 
p. 366, 15.3 Anemia
p. 366, 15.4 Student attitudes (15.2, and more, done in class)
p. 367, 15.6 travel time
p. 367, 15.7 stating hypotheses
- - - - - - - - - - - -
Test statistic:  xbar to z
p. 368, 15.8, 15.9, 15.10  (same old examples)
- - - - - - - - - - - - 
Calculating p-value (one-sided)
p. 371, 15.12, 15.13, 15.14  (Same examples).   Calculate by hand.
p. 371, 15.11, Applet.  Do the one given (two-sided), then check your answers for 15.12, 13, 14 (one-sided)  using the applet.

Read, 
to discuss
Optional 
(more practice) 
 

+ + + + + + + + 
Stating null and alternative hypotheses 
p.340, 6.41,42 
- - - - - - - - - - - - - - 

Your shoebox results:  Write your xbars (one on each pad--yellow or white)  and make a dot for each on the circulating dotplot.
Exams not finished.
Final exam:
Wed. May 16, 2-5 pm.  If this is a problem for you, please let me know soon.
  Full exam schedule is at   http://www.wells.edu/academic/dates.htm#exams

     Buffer against one low hour exam:
The final % exam grade minus 10 points will be substituted for the lowest hour exam grade, if it is higher.

Examples:
Ex1 Ex2 Ex3
Ex4 final % final -10
Student 1 Original 85 80 85
60 85 75, replaces lower 60
Treated 85 80 85
75 85 <--ß These will be used.
Student 2 Original 85 80 80
70 75 65, lower than 70, don't replace.
Treated 85 80 80
70 75
Student 3 Original 85 50 75
55 85 75, replaces lower 50
Treated 85 75 75
55 85 <--ßThese will be used

This is to encourage those who are nervous about Exam 4, and to encourage all to try to put it together for the final.

RECAP:
Confidence Interval of the form  estimate + margin-of-error  for the mean µ with Confidence level C: (p.349-50)

(Table A, or Table C, t dist. bottom row)
  Tradeoffs: for sharper (narrower) margin of error, must  accept lower confidence level, OR take larger sample.

Planning ahead:  Choose sample size big enough to satisfy desired: margin of error, confidence level. p. 355
Given C and m = margin of error,  (and sigma), find n.
   Method:  Use C to find z*.  Plug in to formula for m, and solve for n.  Or memorize formula for n and plug in to it.
,    n = (z* sigma / m)2
     Note:  z* sigma still on top.  m and n change places, and whole thing is squared!
           Round up!  If you get n = 5.06, you need a sample of size 6 to get your margin of error at least as short as you want.
                      ConfidenceInterval.xls  Excel spreadsheet will check your calculations.  Show your work on HW!

Why does the CI formula work? (optional)

In practice: pp. 388-391
SRS--other random samples get other formulas. 
   Nonrandom or biased  samples simply can't do C.I.

    Sometimes we can plausibly think of data as SRS from large population (rolling dice, repeated weighings on scale)
     -- For experiments, randomizing into groups allows us to use the methods; but be careful about generalizing far beyond our "volunteers" type.
     Ask how reasonably "like" a SRS the sample is.

Xbars are  normal!  OK IF 1) population is normal, or 2) n big enough for Central Limit theorem.
    Outliers?  Trouble (xbar is sensitive).   Slight outliers ok (see next)
    Skewness?  "Moderate" sample size allows CLTh to overcome all but strong skewness. (Numbers for "moderate" in Ch. 18)
Sigma for population is known.  Rarely true in practice. 
          Large n? Could substitute s calculated from sample as "good" estimate of sigma.
          Small n--Ch. 18, a slight modification of these methods takes care of unknown sigma.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 

"Statistics means never having to say you're certain."
Confidence interval Estimation made our best guess at an unknown population mean.
Testing will investigate a claim made that the unknown mean is actually a particular value.
~~~~~~~~~~~~~~~~
 
Ch. 15: "Significance tests use an elaborate vocabulary, but the basic idea is simple: an outcome that would "rarely" happen if a claim were true--is good evidence that the claim is NOT true." (p.363 top)
Suppose someone claims that the average height of Wells women over the years is 70" (5'10").  I take samples (151 classes) every year.  This year my sample has mean 62.81" (n = 20ish). Standard deviation for heights of women in population is supposed to be about 2.5" , so s.d. for means from samples of 20 is about 2.5/4.48= 0.56. IF the real mean is 70", my sample is astonishingly unusual (62.81-70)/0.56= -7.19 /0.56 = -12.8, 12.88 s.d's below the mean.  Conclude the claim is Not true.

- - - - - - - - - - - - - - - - - - - - - - - -
Extended Standard Normal Table
  z         P(Z < z)                         P(Z > z)   = same in scientific notation: E-03 = 10-3
3.00   .9986501019683700    .0013498980316301    1.35E-03
4.00   .9999683287581670    .0000316712418331    3.17E-05
5.00   .9999997133484280    .0000002866515718    2.87E-07
6.00   .9999999990134120    .0000000009865877    9.87E-10
7.00   .9999999999987200    .0000000000012799    1.28E-12
8.00   .9999999999999990    .0000000000000007    6.66E-16  Below this, machine can't compute. If your assumptions lead you to a(n almost) impossible z value, question your assumptions!
(The basis of significance/hypothesis testing)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Need machinery
to analyze less "obvious" results--build in effect of standard deviation (if s.d. were 10" would my sample still be inconsistent with the claim?) and sample size (if n were only 4 would that change my result?) .
Do 15.2 p. 365:  Normal, s.d. = 30.  Claim:  pop. mean = 115.  n = 25.   IF mean is really 115, Xbars are N(115, 6).   Sketch!
      xbar = 118.6 .  118.6-115=3.6.  This is 3.6/6 = 0.6 s.d.'s above the mean, a pretty typical kind of value.
      xbar = 125.8    125.8-115=10.8.   This is 10.8/6 = 1.8 s.d's above the mean, high enough to be pretty unusual if the mean is really 115.
      xbar =  139     139-115=24. This is  24/6 =  4 s.d.'s above the mean, unreasonably high if the mean is really 115.
   So 125.8 or (more so!) 139 would be evidence that the mean for this group (older students) is NOT 115, is in fact higher.

Shoeboxes (white and yellow slips): Take a sample of size 4 from each,  record, return numbers.
   I claim the mean value  for both shoeboxes is µ = 20.  Am I telling you the truth?  I can't remember for sure.  I do know that the distribution in the box is normal,  standard deviation is 4.
I do remember that if  µ is not 20, then it is greater than 20. µ > 20.
Take a sample of size 4, find xbar.   Once for each shoebox! (should have found xbar already)
How far from 20 is it?  far enough that I believe the mean is not 20??

<>Measure your xbar's distance from 20  in standard deviations of Xbar's. (That is, find z for xbar, assuming µ = 20. Note s.d. for sampling dist of xbar is 2 (why?) ).   Example:  If I got an xbar = 24,  z = (24-20)/2 = 2 s.d.'s above mean. 
Is this a far-out value of z? Look in the normal table to see how much probability is in the tail to the right of it--gives a measure of far-out-ness independent of distribution ("P-value").   Prob. above 2 is about .025, more exactly (1-.9772) = .0228.   IF the mean is really 20, I would see an xbar as high as 24 (or higher) about 2 to 3 in a hundred times.  So xbar = 24 is pretty strong evidence that real mean isn't 20.

The game:
Before taking data, define
H0: "Null hypothesis" A claim or statement about the population we would like to show is NOT true.
   Stated usually as:  A parameter = a particular value.  H0: µ =1000 hrs.  ("Average lightbulb life".)     H0: µ =20 (shoebox mean=20)
Ha: "Alternative hypothesis" A claim or statement about the population we are trying to find evidence FOR.
    Stated usually as: The parameter  is >, or <, (one-tail tests) --
                       or NOT = the particular value. (two-tail)
    Ha:   µ  > 1000 hrs. (Suppose we have a New process that makes them burn longer. We hope.)    Ha: µ >20 (shoebox mean >20)
    Other possible alternatives: Ha:   µ  < 1000 hrs.  (Want evidence that Mfr.'s claim is inflated)
             (two-sided=two-tail) Ha:   µ  Not = 1000 hrs.  (Want evidence that Assembly line process is"off")

   Some authorities say you should always do two-sided tests.  Others say:  If you have a hope or suspicion; are only interested in one direction, then do it that way.  What's NOT OK is to look at your data and then decide your alternative hypothesis.

Take data.  Calculate test statistic, usually based on one that estimates the parameter in the hypotheses.  For µ, test statistic is the z-score of xbar, so a big z-score number means that xbar is far from µ.
    Is it an unlikely result if  H0 is true?  Then that is evidence against H0.

Measuring the strength of the evidence against H0 (a common measuring stick for all distributions and parameters):
P-value of a test:  The probability, computed assuming that H0 is true, that the observed outcome would take a value as extreme or more extreme than that actually observed (if we could repeat taking-data again).  p. 368. 
    The smaller the P-value, the stronger the data's evidence against H0 ( for Ha).

For a test of µ  , using xbar (sigma known), the P-value is
--the area of the tail beyond the observed xbar, in the direction of Ha (one tail)
(--or twice that area (two-tail).)
We usually calculate it by standardizing the observed xbar (assuming H0 true) and looking in the normal table. (p. 369 on)
H0: µ =20     Ha:   µ  > 20      How far from 20 is your xbar? Find z for xbar.   For xbar = 24, z = 2
Is this a far-out value of z? What is the probability of being farther out, i.e. being in the tail beyond this z?  That's the P-value.  P = .0228

<>Applet:  P-value of a test of significance automates this.  (Uses "raw" scale of xbars, rather than z-scores).  Use as check, guide.  For HW draw the picture and label the axes both in "raw" and in z- values.
Pick up here Wednesday:
Start with understanding "null and alternative hypothesis, p-value."   Those are the foundation. Then

A "Significance level" alpha is a probability level we decide on  in advance as being the "rarely" amount that will push us over into believing (well, sort of) that the H0 claim  is not true. (Historically older language than P-value)
We tend to use simple benchmark numbers for it, like .10 (1 in 10), .05 (1 in 20), .01 (1 in 100).
When the P-value is less  than (or equal to) a particular significance level alpha (say .05), we say,
    "The results are significant at the alpha = .05 level," or "The results are significant (P< .05)"
A particular scientific discipline may have a commonly accepted set of benchmarks, and language to go with it. (I think I remember .05 = "significant", .01 = "highly significant" in psychology?)
We will be less doctrinaire, use the language "significant at the alpha = ___ level." 
(However, "nobody" uses a significance level less rare  than .10, 1 in 10).


Sievers home  Math151-Sp07/Daysp37.htm  2pm 4/30/07
This page belongs to Sally Sievers who is solely responsible for its content. Please see our statement of responsibility.