Chapter 9

Hypothesis Testing

McGraw-Hill/Irwin

Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved.

Chapter Outline

9.1 The Null and Alternative Hypotheses and

Errors in Testing

9.2 z Tests about a Population Mean: σ Known

9.3 z Tests about a Population Mean: σ Unknown

9.4 z Tests about a Population Proportion

9.5 Type II Error Probabilities and Sample Size

Determination (Optional)

9.6 The Chi-Square Distribution (Optional)

9.7 Statistical Inference for a Population Variance

(Optional)

9-2

9.1 Null and Alternative Hypotheses and Errors in Hypothesis Testing

 One-Sided, “Greater Than” Alternative

H

0

:   

  

0

0 vs.

H a

:  > 

0

 One-Sided, “Less Than” Alternative

H

0

: vs.

H a

:  < 

0

 Two-Sided, “Not Equal To” Alternative

H

0

:  = 

0 vs. H a

:   

0 where 

0 is a given constant value (with the appropriate units) that is a comparative value

9-3

The Idea of a Test Statistic z

 x

 x

0  x

 

0 n

9-4

Table 9.1

Type I and Type II Errors

9-5

Typical Values

 Low alpha gives small chance of rejecting a true H

0

 Typically,  = 0.05

Strong evidence is required to reject H

0

Usually choose α between 0.01 and 0.05

  = 0.01 requires very strong evidence is to reject

H

0

 Tradeoff between  and β

 For fixed n, the lower  , the higher β

9-6

9.2 z Tests about a Population Mean:

σ Known

 Test hypotheses about a population mean using the normal distribution

 Called z tests

 Require that the true value of the population standard deviation σ is known

 In most real-world situations, σ is not known

When σ is unknown, test hypotheses about a population mean using the t distribution

 Here, assume that we know σ

9-7

Steps in Testing a “Greater Than”

Alternative

1.

State the null and alternative hypotheses

2.

Specify the significance level a

3.

Select the test statistic

4.

Determine the critical value rule for rejecting H0

5.

Collect the sample data and calculate the value of the test statistic

6.

Decide whether to reject H0 by using the test statistic and the critical value rule

7.

Interpret the statistical results in managerial terms and assess their practical importance

9-8

Steps in Testing a “Greater Than”

Alternative in Trash Bag Case #1

1.

State the null and alternative hypotheses

H

0

H a

:   50

:  > 50

2.

Specify the significance level α = 0.05

3.

Select the test statistic z

 x

50

 x

 x

50

 n

9-9

Steps in Testing a “Greater Than”

Alternative in Trash Bag Case #2

4.

Determine the critical value rule for deciding whether or not to reject H

0

Reject H

0 in favor of H a if the test statistic z is greater than the rejection point z

α

This is the critical value rule

 In the trash bag case, the critical value rule is to reject H

0 if the calculated test statistic z is > 1.645

9-10

Figure 9.1

Steps in Testing a “Greater Than”

Alternative in Trash Bag Case #3 z

 x

50

 n

50 .

575

50

1 .

65 40

2 .

20

9-11

Steps in Testing a “Greater Than”

Alternative in Trash Bag Case #4

6.

Decide whether to reject H

0 by using the test statistic and the rejection rule

 Compare the value of the test statistic to the critical value according to the critical value rule

In the trash bag case, z = 2.20 is greater than z

0.05

= 1.645

Therefore reject H

0

: μ ≤ 50 in favor of H

50 at the 0.05 significance level a

: μ >

7.

Interpret the statistical results in managerial terms and assess their practical importance

9-12

Effect of α

 At α = 0.01, the rejection point is z

0.01

 In the trash example, the test statistic z = 2.20 is < z = 2.33

= 2.33

0.01

Therefore, cannot reject H

0 in favor of H the α = 0.01 significance level a at

This is the opposite conclusion reached with

α=0.05

So, the smaller we set α, the larger is the rejection point, and the stronger is the statistical evidence that is required to reject the null hypothesis H

0

9-13

The p-Value

 The p-value is the probability of the obtaining the sample results if the null hypothesis H

0 is true

 Sample results that are not likely if H is not true

0 is true have a low p-value and are evidence that H

0

 The p-value is the smallest value of α for which we can reject H

0

 The p-value is an alternative to testing with a z test statistic

9-14

Steps Using a p-value to Test a

“Greater Than” Alternative

4.

Collect the sample data and compute the value of the test statistic

5.

Calculate the p-value by corresponding to the test statistic value

6.

Reject H

0 if the p-value is less than α

9-15

Steps in Testing a “Less Than”

Alternative in Payment Time Case #1

1.

State the null and alternative hypotheses

H

0

:  ≥ 19.5 vs.

H a

:  < 19.5

2.

Specify the significance level α = 0.01

3.

Select the test statistic z

 x

19 .

5

 x

 x

19 .

5

 n

9-16

Steps in Testing a “Less Than”

Alternative in Payment Time Case #2

4.

Determine the rejection rule for deciding whether or not to reject H

0

The rejection rule is to reject H

0 test statistic –z is less than –2.33

if the calculated

5.

Collect the sample data and calculate the value of the test statistic z

 x

19 .

5

 n

18 .

1077

4 .

2

19 .

5

 

2 .

67

65

9-17

Steps in Testing a “Less Than”

Alternative in Payment Time Case #3

6.

Decide whether to reject H

0 by using the test statistic and the rejection rule

In the payment time case, z = –2.67 is less than z = –2.33

0.01

Therefore reject H

H a

0

: μ ≥ 19.5 in favor of

: μ < 19.5 at the 0.01 significance level

7.

Interpret the statistical results in managerial terms and assess their practical importance

9-18

Steps Using a p-value to Test a

“Less Than” Alternative

4.

Collect the sample data and compute the value of the test statistic

5.

Calculate the p-value by corresponding to the test statistic value

6.

Reject H

0 if the p-value is less than α

9-19

Steps in Testing a “Not Equal To”

Alternative in Valentine Day Case #1

1.

State null and alternative hypotheses

H

0

:  = 330 vs.

H a

:  ≠ 330

2.

Specify the significance level α = 0.05

3.

Select the test statistic z

 x

330 x

 x

330 n

9-20

Steps in Testing a “Not Equal To”

Alternative in Valentine Day Case #2

4.

Determine the rejection rule for deciding whether or not to reject H

0

 Rejection points are z

α

= 1.96, –z

α

= – 1.96

 Reject H

0 in favor of H satisfies either: a if the test statistic z

 z greater than the rejection point z

α/2

, or

–z less than the rejection point –z

α/2

9-21

Steps in Testing a “Not Equal To”

Alternative in Valentine Day Case #3

5.

Collect the sample data and calculate the value of the test statistic z

 x

330 n

326

330

40 100

 

1 .

00

6.

Decide whether to reject H

0 by using the test statistic and the rejection rule

7.

Interpret the statistical results in managerial terms and assess their practical importance

9-22

Steps Using a p-value to Test a

“Not Equal To” Alternative

4.

Collect the sample data and compute the value of the test statistic

5.

Calculate the p-value by corresponding to the test statistic value

6.

 The p-value is 0.1587 · 2 = 0.3174

Reject H

0 if the p-value is less than 

9-23

Interpreting the Weight of Evidence

Against the Null Hypothesis

 If p < 0.10, there is some evidence to reject H

0

 If p < 0.05, there is strong evidence to reject H

0

 If p < 0.01, there is very strong evidence to reject H

0

 If p < 0.001, there is extremely

strong evidence to reject H

0

9-24

9.3 t Tests about a Population Mean:

σ Unknown

 Suppose the population being sampled is normally distributed

 The population standard deviation σ is unknown, as is the usual situation

 If the population standard deviation σ is unknown, then it will have to estimated from a sample standard deviation s

 Under these two conditions, have to use the t distribution to test hypotheses

9-25

Defining the t Random Variable:

σ Unknown

 Define a new random variable t: x

  t

 s n

 The sampling distribution of this random variable is a t distribution with n – 1 degrees of freedom

9-26

Defining the t Statistic: σ Unknown

 Let x be the mean of a sample of size n with standard deviation s

 Also, µ

0 is the claimed value of the population mean

 Define a new test statistic t

 x s

  n

0

 If the population being sampled is normal, and s is used to estimate σ, then …

 The sampling distribution of the t statistic is a t distribution with n – 1 degrees of freedom

9-27

t Tests about a Population Mean:

σ Unknown

9-28

9.4 z Tests Tests about a Population

Proportion z

 p

0

ˆ p

 p

0

1

 p

0

 n

9-29

Example 9.6: The Cheese Spread

Case z

 p

0

1

 p

0 p

0

 n

.

063

.

10

1

.

10

.

10

 

3 .

90

1 , 000

9-30

9.5 Type II Error Probabilities and

Sample Size Determination

(Optional)

 Want the probability β of not rejecting a false null hypothesis

 That is, want the probability β of committing a Type II error

 1 - β is called the power of the test

9-31

Calculating β

 Assume that the sampled population is normally distributed, or that a large sample is taken

 Test…

H

H

0 a

: µ = µ

: µ < µ

0

0 vs

 Want to make the probability of a Type I error equal to α and randomly select a sample of size n or H a

: µ > µ

0 or H a

: µ ≠ µ

0

9-32

Calculating β

Continued

 The probability β of a Type II error corresponding to the alternative value

µ is equal to the area under the standard normal curve to the left of

µ for z *

0

  a

 n

 Here z* equals z is one-sided ( µ <

 Also z* ≠ z two-sided (

α/2

µ ≠ µ

0

) if the alternative hypothesis

µ

0 or µ > µ

0

) if the alternative hypothesis is

9-33

Sample Size

 Assume that the sampled population is normally distributed, or that a large sample is taken

 Test H

0

:  = 

0

H a

:  < 

0 or H a vs.

:  >  or H a

:  ≠ 

0 equal to  and the probability of a Type II error corresponding to the alternative value

 for  equal to b

0

 Want to make the probability of a Type I error

9-34

Sample Size

Continued n

 z *

 z b

2

0

  a

2

 2

9-35

9.6 The Chi-Square Distribution

(Optional)

 The chi-square  ² distribution depends on the number of degrees of freedom

 A chi-square point  ²α is the point under a chi-square distribution that gives right-hand tail area 

Figures 9.14 and 9.15

9-36

9.7 Statistical Inference for

Population Variance

(Optional)

 If s 2 is the variance of a random sample of n measurements from a normal population with variance σ 2

 The sampling distribution of the statistic (n -

1) s 2 / σ 2 is a chi-square distribution with (n –

1) degrees of freedom

 Can calculate confidence interval and perform hypothesis testing

9-37

Confidence Interval for Population

Variance



( n

1 ) s

2

2

/ 2

,

( n

1 ) s

2

1

2

 

/ 2



9-38

Hypothesis Testing for Population

Variance

 Test of H

0

: σ 2 = σ 2

 Test Statistic:

2

0

( n

1 ) s

2

0

2

 Reject H

H

H

H a a a

: σ

: σ

2

2

0 in favor of

> σ

< σ

: σ 2 ≠ σ 2

2

2

0

0

0 if  2 >  2

α if  2 <  2

1-α if  2 >  2

α or  2 <  2

1-α

9-39

Figure 9.18

Selecting an Appropriate Test Statistic for a Test about a Population Mean

9-40