Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the...

44
σ known (C) Kathleen A. Acker, Ph.D. 1

Transcript of Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the...

Page 1: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

σ known

(C) Kathleen A. Acker, Ph.D. 1

Page 2: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

For Inferential Statistics we need a test that takes into account the possibility of sample error. The test used depends upon parameter under study.

We begin with hypothesis testing about sampling means.We know that the distribution of sampling means follows a Normal Distribution.

We shall assume that the population standard deviation is known.

(C) Kathleen A. Acker, Ph.D. 2

Page 3: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Traditional Method of Hypothesis Testing

Step 1: Identify hypothesis under consideration.

Right tailed, left tailed, two tailed

Step 2: Find a critical value.

Step 3: Calculate a test statistic

Compare the critical value and the test statistic to reach an answer.

Step 4: State your conclusion.

(C) Kathleen A. Acker, Ph.D. 3

Page 4: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

In the first approach to hypothesis testing, we will compare the value of a Test Statistic to the value of a Critical Value.

Critical Value: Determination of the critical value depends upon the level of significance, α.

In general you will default to α=0.05 or α=0.01, however we are going to learn how to find a critical value for any level of significance.

(C) Kathleen A. Acker, Ph.D. 4

Page 5: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Let us work first with a two tailed test and let use a level of significance of α = 0.05.

0.5 – (0.05/2) = 0.475.

z value is ±1.96.

This is the critical value. (C) Kathleen A. Acker, Ph.D. 5

Page 6: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

One-tailed test with α = 0.05

Visually this is the area in the tail of the distribution. All α = 0.05 falls into one tail.

0.5 - 0.05 = 0.45.

This corresponds toz = 1.645

This is the critical value.

(C) Kathleen A. Acker, Ph.D. 6

Page 7: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Please fill in the table with the appropriate z- values.

You can use this as a quick reference of Critical Values.

α 1-tail 2-tail

0.10

0.05 1.645 1.96

0.04

0.02

0.01

(C) Kathleen A. Acker, Ph.D. 7

Page 8: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Please fill in the table with the appropriate values.

You can use this as a quick reference of Critical Values.

α 1-tail 2-tail

0.10 1.285 1.645

0.05 1.645 1.96

0.04 1.75 2.055

0.02 2.055 2.325

0.01 2.325 2.575

(C) Kathleen A. Acker, Ph.D. 8

Page 9: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

According to a 2004 study conducted by the University of Michigan, eighth grade boys spend an average of 23 hours a week playing video games. The population standard deviation is known to be σ =2.3 hours.

A professor at a competing university has decided to replicate the study. Data collected from 40 eighth grade boys yielded that they played video games on average 22.25 hours a week.

Test that the new study presents enough information to suggest that the average amount of time spent playing video games has changed since the University of Michigan study.

Test the hypothesis at α= 0.05.

(C) Kathleen A. Acker, Ph.D. 9

Page 10: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Step 1: State the hypothesis under consideration.

H0:μ= 23

H1:μ≠ 23

This is a two tailed test

Step 2: Determine the critical value. At α = 0.05 , the two tailed test CV is z = +/-1.96

(C) Kathleen A. Acker, Ph.D. 10

Page 11: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Step 3: Test Statistic

statistic-parameter

standard errorz

(C) Kathleen A. Acker, Ph.D. 11

n

xz

/

n

xz

/

06.2

40/3.2

2325.22

z

z

Page 12: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Compare the Critical Value and the Test Statistic Step 4: draw a conclusion.

(C) Kathleen A. Acker, Ph.D. 12

CV CVTS

Reject Null

There is statistical evidence to suggest that the average amount of time spent playing video games by eighth grade boys has changed from 23 hours a week.

Page 13: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

How would your answer change if α = 0.01? The critical value would be z = +/- 2.575.

(C) Kathleen A. Acker, Ph.D. 13

TS

Fail to

Reject Null

CV CV

The new study does not present statistical evidence demonstrating that the average number of hours a week eighth grade boys spend playing video games is different to 23.

Page 14: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

According to a 2004 study conducted by the University of Michigan, eighth grade boys spend an average of 23 hours a week playing video games. The population standard deviation is known to be σ = 2.3 hours.

A professor at a competing university has decided to replicate the study. Data collected from 40 eighth grade boys yielded that they played video games on average 22.25 hours a week.

Test that the new study presents enough information to suggest that the average amount of time spent playing video games has decreased since the University of Michigan study.

Test the hypothesis at α = 0.05.

(C) Kathleen A. Acker, Ph.D. 14

Page 15: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

State the hypothesis under consideration.

H0:μ= 23

H1:μ < 23

Determine the critical value. α = 0.05 The critical value is z = -1.645

(C) Kathleen A. Acker, Ph.D. 15

Page 16: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Calculate the Test Statistic

n

xz

/

06.2

40/3.2

2325.22

z

z

(C) Kathleen A. Acker, Ph.D. 16

Page 17: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Draw a conclusion.

(C) Kathleen A. Acker, Ph.D. 17

CVTS

Reject Null

There is statistical

evidence to suggest

that the average

amount of time spent

playing video games

by eighth grade boys

has decreased from

23 hours a week.

Page 18: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

We can calculate a corresponding critical value based on the scale of the original data.

If the sample mean (22.25) is large than 22.29 or smaller than 23.71, then we would fail to reject the null. Here we reject the null.

(C) Kathleen A. Acker, Ph.D. 18

x zn

0.05 23.71x

x zn

Upper

cut offLower

cut off

0.05

2.323 1.96 22.29

40x

Page 19: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Critical values with both scales

(C) Kathleen A. Acker, Ph.D. 19

CV CVTS

22.25

0

23

z

22.28 23.71

Page 20: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Method II: p-valueStep 1: Identify hypothesis under consideration.

Right tailed, left tailed, two tailed

Step 2: Calculate a test statistic

Step 3: Determine p-value.

Step 4: State your conclusion.

Compare p and α to reach a conclusion.

(C) Kathleen A. Acker, Ph.D. 20

Page 21: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

According to a 2004 study conducted by the University of Michigan, eighth grade boys spend an average of 23 hours a week playing video games. The population standard deviation is known to be σ = 2.3 hours.

A professor at a competing university has decided to replicate the study. Data collected from 40 eighth grade boys yielded that they played video games on average 22.25 hours a week.

Test that the new study presents enough information to suggest that the average amount of time spent playing video games has decreased since the University of Michigan study.

Test the hypothesis at α = 0.05.

(C) Kathleen A. Acker, Ph.D. 21

Page 22: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Step 1: State the hypothesis under consideration.

H0:μ= 23

H1:μ< 23

This test is one-tailed.

Step 2: Calculate the Test Statistic

(C) Kathleen A. Acker, Ph.D. 22

22.25 232.06

/ 2.3 / 40

xz

n

Page 23: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Step 3: Calculate the area in the tail after the test statistic.

This area is a probability and it is the p-value.

p-value: P(z < -2.06) = 0.5- 0.4803 = 0.0197.

(C) Kathleen A. Acker, Ph.D. 23

Page 24: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Step 4: Draw a conclusion:0.0197 < 0.05 => p < αReject the Null.

If α= 0.01, then we would fail to reject.

If the test were two-tailed compare p and α/20.0197 < 0.025We reject the null.

(C) Kathleen A. Acker, Ph.D. 24

Page 25: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Method III: Confidence Interval

Step 1: Identify hypothesis under consideration.

Right tailed, left tailed, two tailed

Step 2: Calculate interval

Step 3: State your conclusion.

Determine if your parameter is within the interval and use the answer to reach a conclusion.

(C) Kathleen A. Acker, Ph.D. 25

Page 26: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

(C) Kathleen A. Acker, Ph.D. 26

x zn

Point Estimate (Critical Value)(Standard Error)

Page 27: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

According to a 2004 study conducted by the University of Michigan, eighth grade boys spend an average of 23 hours a week playing video games. The population standard deviation is known to be σ = 2.3 hours.

A professor at a competing university has decided to replicate the study. Data collected from 40 eighth grade boys yielded that they played video games on average 22.25 hours a week.

Find a 95% confidence interval of the population mean.

(C) Kathleen A. Acker, Ph.D. 27

Page 28: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Begin by finding the Critical Value.

Since the confidence level is 95%, α= 0.05. The corresponding two tailed critical value is z =1.96 .

(C) Kathleen A. Acker, Ph.D. 28

Page 29: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Since the confidence level is 95%, α= 0.05, the two tailed CV value is z =1.96

x z x zn n

(C) Kathleen A. Acker, Ph.D. 29

21.537 22.963

2.3 2.322.25 1.96 22.25 1.96

40 40

21.537 22.963

Page 30: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Applying to Hypothesis TestingH0:μ= 23H1:μ≠ 23

The Confidence Interval

Reject the null hypothesis, at α=0.05.

There is statistical evidence to suggest that the average amount of time spent playing video games, by eighth boys, is different to 23 hours per week.

(C) Kathleen A. Acker, Ph.D. 30

21.537 22.963

Page 31: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Repeat the test with a 99% level of confidence.At α=0.01, CV is z = 2.575.The Confidence Interval is:

(C) Kathleen A. Acker, Ph.D. 31

2.3 2.322.25 2.575 22.25 2.575

40 40

22.25 0.936429 22.25 0.936429

21.314 23.186

x z x zn n

Page 32: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Conclusion:

The Confidence Interval contains the hypothesis parameter 23.

Therefore we fail to reject the null hypothesis, at α=0.01.

There is no statistical evidence to suggest that the average amount of time spent playing video games, by eighth boys, is different to 23 hours per week.

(C) Kathleen A. Acker, Ph.D. 32

Page 33: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Notice that with all three methods, we rejected the null at the α = 0.05 level of significance and failed to reject at α = 0.01 level of significance.

(C) Kathleen A. Acker, Ph.D. 33

Page 34: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

What if the test was one tailed?You can still construct an interval.

Note you are using the one tailed critical values for the corresponding level of significance.

x z x zn n

(C) Kathleen A. Acker, Ph.D. 34

Page 35: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Consider our previous left tailed example. Step 1: State the hypothesis under consideration.

H0:μ= 23

H1:μ< 23

Step 2: Calculate the confidence interval for α=0.05 and α=0.01.The corresponding one-tailed critical values are z = 1.645 and z = 2.325 respectively.

(C) Kathleen A. Acker, Ph.D. 35

Page 36: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

α =0.05

α =0.01

2.3 2.322.25 1.645 22.25 1.645

40 40

21.652 22.848

x z x zn n

2.3 2.322.25 2.325 22.25 2.325

40 40

21.40 23.09

x z x zn n

(C) Kathleen A. Acker, Ph.D. 36

Page 37: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

At α=0.05: The interval (21.652, 22.848) does not contain μ= 23. So we reject the null.

At α=0.01 The interval (21.40, 23.09) does contain μ= 23. So we fail to reject the null.

(C) Kathleen A. Acker, Ph.D. 37

Page 38: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Suppose there was a limit on the margin of error. How large of a sample would we need to meet this condition?

2

e zn

n ze

zn

e

(C) Kathleen A. Acker, Ph.D. 38

Page 39: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

How many eighth grade boys should be sampled to keep the margin of error limited to 0.1? Round up. Assume α=0.05.

2 21.96*2.3

2032.20.1

2033

zn

e

n

(C) Kathleen A. Acker, Ph.D. 39

Page 40: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

Stop. http://www.newsroom.msu.edu/site/indexer/

1943/content.htm

There are extra slides revisiting the comparison between a test statistic and critical value.

(C) Kathleen A. Acker, Ph.D. 40

Page 41: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

If |Test Statistic| > |Critical Value|

Thenreject the null hypothesis.

(C) Kathleen A. Acker, Ph.D. 41

Reject Null

TS

Page 42: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

If |Test Statistic| > |Critical Value|

Thenreject the null hypothesis.

(C) Kathleen A. Acker, Ph.D. 42

Reject Null

TS

Reject Null

TS

Page 43: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

If |Test Statistic| < |Critical Value|

ThenFail to reject the null hypothesis.

(C) Kathleen A. Acker, Ph.D. 43

Fail to

Reject Null

TS

Page 44: Introduction to Hypothesis Testing › M1430F14 › 22 - Hyp Test 1 for Means Sigma … · In the first approach to hypothesis testing, we will compare the value of a Test Statistic

If |Test Statistic| < |Critical Value|

Thenreject the null hypothesis.

(C) Kathleen A. Acker, Ph.D. 44

Fail to

Reject Null

TS