









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Introduction and One-Sample Tests
J.C. Wang
Department of Statistics Western Michigan University
I (^) Goal : To learn about Hypotheses Testing Procedures. To learn hypothesis-testing methodology as a technique for analyzing differences and making decisions. I (^) Objectives : I (^) H 0 vs. H 1 I (^) Type I vs. Type II errors I (^) One-tailed vs. Two-tailed tests I (^) p-Value I (^) Develop relationship among α, β, and n I (^) Apply methodology
Hypothesis Testing Four parts of statistical testing Test statistic P Value Conclusion
One-Sample Z Test One-Sample Z Test Example Summary of One-Sample Z Test
One-Sample t Test One-Sample t Test Example 1 One-Sample t Test Example 2 Summary of One-Sample t Test
one-tailed test
I (^) Hypotheses has two parts: Null hypothesis, H 0 and Alternate hypothesis, H 1 I (^) Keyword: less than =⇒ left-tailed test
H 0 : μ ≥ μ 0 vs. H 1 : μ < μ 0 , where μ 0 is a constant.
I (^) Keywords: greater than =⇒ right-tailed test
H 0 : μ ≤ μ 0 vs. H 1 : μ > μ 0 , where μ 0 is a constant.
one-tailed test
p-value comes in two distributions: I (^) Normal distribution
p-value = normalCDF(|TS|, 9999 )
I (^) Student t distribution
p-value = tCDF(|TS|, 9999 , df )
where |TS| is the absolute value of the test statistic
two-tailed test
p-value comes in two distributions: I (^) Normal distribution
p-value = 2 × normalCDF(|TS|, 9999 )
I (^) Student t distribution
p-value = 2 × tCDF(|TS|, 9999 , df )
where |TS| is the absolute value of the test statistic
in a hypothesis test
If the p-value < α (Significance level), then reject the Null Hypothesis (H 0 ); otherwise, do not reject the Null Hypothesis (H 0 ).
cereal box packaging example
Let’s consider our cereal example. You are the manager of the packaging process at a cereal manufacturing plant. You want to determine if the cereal filling process is in control. The process requires no corrective action if the correct amount of cereal per box is 368 grams. To study this, you decide to take a random sample of 25 boxes, weigh each one, and then evaluate the difference between the sample statistic and the hypothesized population parameter by comparing the mean weight from the sample to the expected mean of 368 grams specified by the company. The sample mean is 372.5 and the process standard deviation is 15. Is there evidence that the weight is different from 368 grams? You have selected α = 0 .05 as your significance level.
continued
I (^) What is the test statistic?
z =
pt.est − H 0 value SE
I (^) What is the p-value? A : p-value = 2 ×normCDF( 1. 5 , 9999 ) = 2 ×. 0668 =. 1336 I (^) What is the conclusion, i.e., is there evidence that the weight is different from 368 grams? A : No, since p-value 6 < α = 0 .05. Do not reject H 0 and conclude that there is not enough evidence that the true average weight differ from 368 grams.
using TI calculators
I (^) Do this : STAT → TESTS ↓ Z-TEST → STATS ↓ μ:368 ↓ σ:15 ↓ x:372.5 ↓ n: 25 ↓ μ: 6 = μ 0 ↓ CALCULATE I (^) Readout : Z-Test μ 6 = 368 z=1. p=. x = 372. 5 n=
summary
I (^) Assumptions I (^) Large sample (sample size n ≥ 30, say) or normal data I (^) ‘Known’ population standard deviation σ I (^) Test statistic (TS): (note: μ 0 = hypothesized value)
z =
pt.est − μ 0 SE
x − μ 0 √^ σ n I (^) Hypothesis test : one of I (^) Left-tailed—H 0 : μ ≥ μ 0 vs. H 1 : μ < μ 0. I (^) Right-tailed—H 0 : μ ≤ μ 0 vs. H 1 : μ > μ 0. I (^) Two-tailed—H 0 : μ = μ 0 vs. H 1 : μ 6 = μ 0.
summary, continued
I (^) p-value : #ofTails × P(Z > |TS|) = #ofTails × normCDF(|TS|, 9999 ) Reject H 0 if p-value < α. I (^) Critical value : CVal = c × zα/#ofTails = c × invNORM( 1 − α/#ofTails), where c = −1 for left-tailed and c = 1, otherwise. I (^) Rejection rule using critical value : reject H 0 I (^) (Left-tailed) if TS < CVal I (^) (Right-tailed) if TS > CVal I (^) (Two-tailed) if |TS| > CVal. That is, reject H 0 if TS > CVal or TS < −CVal. And we write ±CVal for critical value.
continued
I (^) How many tails is this test? A : One; Note the keyword, at least or less than. I (^) What are the hypotheses? A : H 0 : μ ≥ 21 vs. H 1 : μ < 21 I (^) What is the significance level? A : α = 0. 05 I (^) What is the sample size? A : n = 10
continued, using TI calculator
I (^) Do this : (assumed data in L 1 ) STAT → TESTS ↓ T-TEST → DATA ↓ μ 0 : 21 ↓ List:L 1 ↓ Freq:1 ↓ μ :< μ 0 ↓ CALCULATE I (^) Readout : T-Test μ < 21 t = − 1. 2137 p=0. x = 17. 8 Sx=8. n=
continued
I (^) What is the standard error?
s √ n
I (^) What is the test statistic (TS)?
t =
pt.est − H 0 - value SE
I (^) How many tails in this test? A : One. Note: keyword=at least.
continued
I (^) What is the p-value? p-value = #ofTails × tCDF(|TS|, 9999 , df ) = 1 × tCDF( 1. 2137 , 9999 , 9 ) = 0. 1279 I (^) What is the critical value?
CVal = −tα,df = −tINV( 1 −α, df ) = −tINV(. 95 , 9 ) = − 1. 8331.
Reject H 0 if TS < CVal. Here, − 1. 2137 6 < − 1 .8331, so do not reject H 0. Note also: for left-tailed test, CVal = −tINV( 1 − α, df ) = tINV(α, df ).
continued
I (^) Is the sample average significantly below 20%, or is it just chance variation? A : Significantly below (reasoned later). I (^) If you conduct a test of significance on the following hypothesis: ‘Does the data provide scientific evidence that elderly males spend less than 20% of their sleep time in REM?’, how would you write the null and alternative hypotheses? A : H 0 : μ ≥ 20 vs. H 1 : μ < 20. I (^) What is the test statistic you would use?
t =
continued
I (^) What distribution curve would you use to compute the p-value? A : t-curve. I (^) Calculate a (one-tailed) p-value for your test. p-value = tCDF(| − 2. 5785 |, 9999 , 12 ) = 0. 0121 I (^) What is the conclusion of your test? A : Since p-value < α = 0 .05, we reject H 0 and conclude that elderly males spend less than 20% of their sleep time in REM.
summary
I (^) Assumptions I (^) Large sample (sample size n ≥ 25, say) or normal data I (^) Unknown population standard deviation σ I (^) Test statistic (TS): (note: μ 0 = hypothesized value)
t =
pt.est − μ 0 SE
x − μ 0 √^ s n I (^) Hypothesis test : one of I (^) Left-tailed—H 0 : μ ≥ μ 0 vs. H 1 : μ < μ 0. I (^) Right-tailed—H 0 : μ ≤ μ 0 vs. H 1 : μ > μ 0. I (^) Two-tailed—H 0 : μ = μ 0 vs. H 1 : μ 6 = μ 0.
summary, continued
I (^) p-value : #ofTails × P(t > |TS|) = #ofTails × tCDF(|TS|, 9999 , df ) Reject H 0 if p-value < α. I (^) Critical value : CVal = c × tα/#ofTails,df = c × invT( 1 − α/#ofTails, df ), where c = −1 for left-tailed and c = 1, otherwise. I (^) Rejection rule using critical value : reject H 0 I (^) (Left-tailed) if TS < CVal I (^) (Right-tailed) if TS > CVal I (^) (Two-tailed) if |TS| > CVal. That is, reject H 0 if TS > CVal or TS < −CVal. And we write ±CVal for critical value.