1 / 129

APSTAT - Unit 4b

APSTAT - Unit 4b. Inference Continued. Chapter 23. Inference about means One Sample Z-Test for Mean One Sample T-Test for Mean One Sample T-Interval for Mean. One Sample Z - Test for Mean. Example. The 2005 SAT: Mean 1080, Standard Deviation 180 Priory Students n = 32, mean 1200

jarvis
Télécharger la présentation

APSTAT - Unit 4b

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. APSTAT - Unit 4b Inference Continued

  2. Chapter 23 • Inference about means • One Sample Z-Test for Mean • One Sample T-Test for Mean • One Sample T-Interval for Mean

  3. One Sample Z - Test for Mean • Example. The 2005 SAT: • Mean 1080, Standard Deviation 180 • Priory Students n = 32, mean 1200 • Two Possibilities (Just like for Proportions…) • Higher WPS scores just happened by chance (natural variation of a sample) • The likelihood of 50 people averaging 1150 is so remote we must conclude that Priory Students are better at SAT than national average.

  4. Let’s Do It! WPS SAT Example • Step 1 Define Parameter: • m, the true mean score of WPS SAT test-takers • Step 2 Hypotheses • H0: m = 1080, Priory students perform at the same level as the National Average • Ha: m > 1080, Priory students perform better than the National Average

  5. WPS SAT Example Continued • Step 3 Assumptions: • SRS Assume/not stated • Normal Distribution n>30 • s is known Yep! • Step 4 Name It, Show it, DO IT • One Sample Z-Test for a Mean

  6. Z=3.77 P=0.000082 1250 1080 WPS SAT Example Continued • Step 5 P-value and sketch of normal curve: • P(z>3.77)= 0.0000816 • Step 6 Interpret P-value and Conclusion • A P-Value of .0000816 indicates that there is less than a 1 in 10000 chance that a result this distant from the m happened merely by chance. Therefore, reject H0 in favor of Ha. It is very likely that WPS students performed far better on average than the National Average on the 2005 SAT

  7. Two-Sided Example • Mr R is convinced that his blood-sugar count is not normal. He tests himself 35 times and finds his count to be 90. If the healthy mean for blood sugar count is 84 with a standard deviation of 23, is Mr. R’s blood sugar count abnormal?

  8. Let’s Do It! WPS SAT Example • Step 1 Define Parameter: • m, Riebhoff’s true mean blood sugar level • Step 2 Hypotheses • H0: m = 84, Boff’s blood sugar level is normal • Ha: m≠ 84, Boff’s blood sugar level is abnormal

  9. WPS SAT Example Continued • Step 3 Assumptions: • SRS Assume/not stated • Normal Distribution n>30 • s is known Yep! • Step 4 Name Test and DO IT • One Sample Z-Test for a Mean

  10. WPS SAT Example Continued • Step 5 P-value and sketch of normal curve: • 2.P(z≠1.54) = 2(.06178) = 0.1236 • Step 6 Interpret P-value and Conclusion • A P-Value of .1236 indicates that a sample mean this different from the true mean would occur about once in every eight samples of this size simply by chance. Therefore we fail to reject H0. There is not enough evidence that Mr R’s blood sugar level is different than the population mean. +1.54 m -1.54

  11. Confidence and Significance… • Hmm, think about a significance level of a = .05 • Now think about a confidence interval of C = .95 P = 0.95 P = 0.025 P = 0.025 Z = -1.96 Or -2 (empirical) Z = 1.96 Or 2 (empirical)

  12. Apples Problem, CI Style • Step 1 Define Parameter • m, • Step 2 Hypotheses • H0: • Ha: • Step 3 Assumptions Recall:

  13. Apples Problem, CI Style • Step 4 Name Test and DO IT • Confidence Interval for Sample Mean

  14. m = 120 119.14 122.5 125.86 Apples Problem, CI Style • Step 5 Sketch of Interval: • Step 6 Interpret Interval and Conclusion • We are 95% confident that the true population mean falls between 119.14 and 125.86. Because the population mean of 120 IS included in this interval, we must fail to reject H0. The mean weight of this shipment cannot be considered abnormal.

  15. Inference as a decision • Example: • I am the Major League Baseball equipment checker dude. • In each shipment of baseballs, I select 36 balls at random to make sure they comply with MLB Standards. • The rules state that the balls are to be 5.2 oz each • Over the course of a great number of years, the standard deviation of weights (of accepted balls) has been 0.15 (we will accept this as s)

  16. Here is the start of my test • m: the true mean weight of the balls in the shipment • Hypothesis • H0: m = 5.2, Shipment mean is 5.2 • Ha: m≠ 5.2, Shipment mean is not 5.2 • My decision will be to accept or reject the shipment. If I reject, the balls will be sent back to the manufacturer. I will use an a of 0.05

  17. Let’s Continue • My ball sample had a mean of 5.15, Do I accept or reject the shipment? • Assumptions: • SRS Stated • Normal Distribution 36 sample size should give a normal-ish distribution • s is known Yep!

  18. Mas • Step 4 Name Test and DO IT • One Sample Z-Test for a Mean

  19. Mas Mas • Step 5 P-value and sketch of normal curve: • 2.P(z>2.00) = 2(.02275) = 0.0455 • Step 6 Interpret P-value and Conclusion • We will reject this shipment of balls since .0455<.05. There is enough evidence that this shipment of balls is not acceptable by MLB standards Z=-1.96 Z=1.96 Z-Score = 2.0 Accept

  20. T-Procedures – No s given • In most situations, knowing m and s is not likely. • We must find a way to estimate s • What we do have: • x-bar: Our unbiased estimate of m • s: the standard deviation from our sample. An unbiased estimate of s

  21. Before: Now: So…… Standard Error (SE) of the sample mean Like z, with a twist. You’ll see

  22. What is this t thang, baby? Like z, • Shows how far from m in standard deviation units. • Bell Shaped BUT, unlike z • Curve changes as sample size changes • If n is small, more probability rests in tail of t-distribution curve • As n increases, becomes more like z-distribution (standard normal)

  23. m T-distribution curve T (n=3) T (n=9) Standard Normal

  24. UH OH!!! • If curve changes as n changes, we will need a crazy chart • To use it we need something new: • DEGREES OF FREEDOM (k) • k = n – 1 • We describe the t-distribution curve with the following: • t(k) – means a t-distribution with k degrees of freedom

  25. m Lets do it • Last page in book or Table B on AP handout • Critical Value t* • EX: n = 10, P = .025 to right of t* Sketch it! P=.025 df= t*=

  26. m Lets do it again! • Find Critical Value t* • EX: n = 18, P = .98 to left of t* P=.98 df= t*= Sketch it!

  27. Assumptions • SRS • Normal population or large n • Our Book’s Rule Of Thumb • n<15, ok if pretty close to normal • n>15, ok if no outliers or super skew • n>40, all good in my ‘hood • If outliers, you may eliminate them • Other texts • n>30 if non-normal population (but always check for outliers and skew if given raw data) • s is unknown

  28. Significance test. • Does body fat increase after 1 wk of McDonalds-only eating? • Sample changes in body fat % from a random sample of 8 people. 1.3 0.8 2.1 1.6 -0.2 1.5 -1.0 2.0 Find: n= df= xbar= s= Put in List on TI, You’ll see why

  29. Test is on! PARAMETER- m: __________________________ HYPOTHESES- H0: m = 0, _____________________ Ha: m > 0, _____________________

  30. More… ASSUMPTIONS SRS Normalness • s is not given TEST – One sample t-test for mean Sketch graph!

  31. More…. P(VALUE) P(t>2.616)= ***NOTE - T-distribution table • reverse of normal distribution table • Probability on the OUTSIDE, t-score on the INSIDE Look on t-dist table df=7, t=2.616 Find what probability this is between

  32. TI version of t-distribution table • Z test we would do normalcdf(blah) • T test we do: • Tcdf(low, high, df) • That is it.

  33. More……. Interpretation A p-value between .01 and .02 would indicate that the sample mean would occur roughly 1 in 50 to 1 in 100 samples of this size simply by chance if H0 were true. We will therefore reject H0 in favor of Ha. It is likely that eating only fast food would be a factor in increasing a person’s body fat count.

  34. Now to make you crazy and angry • Remember, to do a test correctly you must throw down all the PHAT PI action. There is no shortcut in what you need to show. • Now, • hit STAT>TESTS>T-TEST • Input:Data, m0=0, List:L1, >, calculate • OH MY!!!!!!

  35. Mas TI LOVE! • Go back to STAT>TESTS>T-TEST • You can also enter stats, instead of drawing on data from a list • Boo ya!

  36. Confidence Intervals Based on t(k)

  37. Let’s hop right in • We do a random sample of the length (in inches) of 8 senior male feet and find the following: • N=8 x-bar=12 s=2.4 • Construct a 95% CI • Do Assumptions (no need to do a Hypothesis test, why?)

  38. Senior Feet Test – One sample confidence interval for mean of a population t* is from table, C=.95, df=7

  39. Senior Feet… Interpret CI We are 95% confident that the true mean of WPS senior foot size is between 9.99 and 14.01 inches.

  40. Chapter 24 • Comparing Means • Two Sample Z-Test for Mean • Two Sample T-Test for Mean • Two Sample T-Interval for Mean

  41. Random Sample from Population 2 Random Sample from Population 1 Comparing two means • Two sample problems • Compare characteristics of two populations • Separate samples COMPARE

  42. Group 2 Treatment B Group 1 Treatment A Comparing two means • Another example: COMPARE ***Matched pairs is different, not a 2 sample problem…

  43. Assumptions for two sample t-test • 2 SRS from different and independent populations • Normal Population or large enough sample size • Typically n1 + n2 >40 • s and m are unknown

  44. Two Sample Z Statistic ONE SAMPLE Looking at difference of means TWO SAMPLE Remember, we cant add standard deviations…

  45. Two Sample T Statistic ONE SAMPLE TWO SAMPLE

  46. Important stuff • A Two-Sample t statistic does NOT have a t distribution • We are replacing 2 standard deviations with 2 standard errors • It’s ok though we can use it if: • We change our degrees of freedom a bit • 1 way – Big Ugly Formula (P.468) • Your TI does this • Easier Way – Just use smaller of n1-1 or n2-1

  47. Two Sample t* Confidence Interval • If you use CI as part of a test of significance: • If m0 is included in the interval, fail to reject H0 • If m0 is included in the interval, reject H0 in favor of Ha

  48. Testing Hypotheses • In a Two Sample Test: • Null Hypothesis • H0 : m1=m2 OR m1- m2 = 0 • Basically, there is NO difference between the means • Alternative Hypothesis • Ha : m1> (or < or ≠) m2 • OR m1- m2 > (or < or ≠) 0 • Basically, there is a difference between the means or one is greater than the other

  49. Pooled • Use Pooled Formula if data have exactly the same variance: • Honestly, since a pooled t-test is so sensitive to slight differences in variances, JUST USE REGULAR TWO-SAMPLE T-TEST.

  50. Do girls take more AP classes? An SRS is taken, here’s the data: P H A

More Related