### Ch9

```Chapter 9
Hypothesis Testing
McGraw-Hill/Irwin
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
H0:   0 vs. Ha:  > 0
 One-Sided, “Less Than” Alternative
H0 :   0 vs. Ha :  < 0
 Two-Sided, “Not Equal To” Alternative
H0 :  = 0
vs. Ha :   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  0
x

x  0

n
9-4
Type I and Type II Errors
Table 9.1
9-5
Typical Values
 Low alpha gives small chance of rejecting a
true H0
 Typically,  = 0.05
 Strong evidence is required to reject H0
 Usually choose α between 0.01 and 0.05
  = 0.01 requires very strong evidence is to reject
H0
 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.
2.
3.
4.
5.
State the null and alternative hypotheses
Specify the significance level a
Select the test statistic
Determine the critical value rule for rejecting H0
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
H0:   50
Ha:  > 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 H0
 Reject H0 in favor of Ha 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 H0 if the calculated test
statistic z is > 1.645
9-10
Steps in Testing a “Greater Than”
Alternative in Trash Bag Case #3
z 
Figure 9.1
x  50

n

50 . 575  50
1 . 65
 2 . 20
40
9-11
Steps in Testing a “Greater Than”
Alternative in Trash Bag Case #4
6. Decide whether to reject H0 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
z0.05 = 1.645
 Therefore reject H0: μ ≤ 50 in favor of Ha: μ >
50 at the 0.05 significance level
7. Interpret the statistical results in managerial
terms and assess their practical importance
9-12
Effect of α
 At α = 0.01, the rejection point is z0.01 = 2.33
 In the trash example, the test statistic
z = 2.20 is < z0.01 = 2.33
 Therefore, cannot reject H0 in favor of Ha at
the α = 0.01 significance level
 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 H0
9-13
The p-Value
 The p-value is the probability of the obtaining
the sample results if the null hypothesis H0 is
true
 Sample results that are not likely if H0 is true
have a low p-value and are evidence that H0
is not true
 The p-value is the smallest value of α for which we
can reject H0
 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 H0 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
 H0:  ≥ 19.5 vs.
 Ha:  < 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 H0
 The rejection rule is to reject H0 if the calculated
test statistic –z is less than –2.33
5. Collect the sample data and calculate the
value of the test statistic
z 
x  19 . 5

n

18 . 1077  19 . 5
4 .2
  2 . 67
65
9-17
Steps in Testing a “Less Than”
Alternative in Payment Time Case #3
6. Decide whether to reject H0 by using the
test statistic and the rejection rule
 In the payment time case, z = –2.67 is less than
z0.01 = –2.33
 Therefore reject H0: μ ≥ 19.5 in favor of
Ha: μ < 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 H0 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
 H0:  = 330 vs.
 Ha:  ≠ 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 H0
 Rejection points are zα = 1.96, –zα = – 1.96
 Reject H0 in favor of Ha if the test statistic z
satisfies either:


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
  1 . 00
100
6. Decide whether to reject H0 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
 The p-value is 0.1587 · 2 = 0.3174
6. Reject H0 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 H0
If p < 0.05, there is strong evidence to
reject H0
If p < 0.01, there is very strong
evidence to reject H0
If p < 0.001, there is extremely
strong evidence to reject H0
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:
t 
x
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
x  0
 Define a new test statistic t 
s
n
 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  p 0
p 0 1  p 0 
n
9-29
Case
z 
pˆ  p 0
p 0 1  p 0 
n

. 063  . 10
. 10 1  . 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…
 H0: µ = µ0 vs
 Ha: µ < µ0 or Ha: µ > µ0 or Ha: µ ≠ µ0
 Want to make the probability of a Type I error
equal to α and randomly select a sample of
size n
9-32
Calculating β
Continued
 The probability β of a Type II error
corresponding to the alternative value µa for
µ is equal to the area under the standard
normal curve to the left of
z* 
0  a

n
 Here z* equals zα if the alternative hypothesis
is one-sided (µ < µ0 or µ > µ0)
 Also z* ≠ zα/2 if the alternative hypothesis is
two-sided (µ ≠ µ0)
9-33
Sample Size
 Assume that the sampled population is
normally distributed, or that a large sample is
taken
 Test H0:  = 0 vs.
Ha:  < 0 or Ha:  > 0 or Ha:  ≠ 0
 Want to make the probability of a Type I error
equal to  and the probability of a Type II
error corresponding to the alternative value
 for  equal to b
9-34
Sample Size
n 
Continued
z *  z b 
 0
2

 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 s2 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) s2 / σ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 ( n  1 ) s

,
2
 2

 /2
1 / 2

2
2




9-38
Hypothesis Testing for Population
Variance
 Test of H0: σ2 = σ20
 Test Statistic:
 
2
( n  1) s
2
0
2
 Reject H0 in favor of
 Ha: σ2 > σ20 if 2 > 2α
 Ha: σ2 < σ20 if 2 < 21-α
 Ha: σ2 ≠ σ20 if 2 > 2α or 2 < 21-α
9-39
Selecting an Appropriate Test Statistic
for a Test about a Population Mean
Figure 9.18
9-40
```