0% found this document useful (0 votes)
119 views257 pages

Ie106 Module 3

Uploaded by

Mayden Pabalan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views257 pages

Ie106 Module 3

Uploaded by

Mayden Pabalan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 257

Applied Statistics and Probability

for Engineers
Seventh Edition
Douglas C. Montgomery George C. Runger

Chapter 9
Tests of Hypotheses for a Single Sample
Chapter 9 Title Slide
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 1
9 Tests of Hypotheses for a Single Sample
CHAPTER OUTLINE
9.1 Hypothesis Testing 9.4 Tests of the Variance & Standard
9.1.1 Statistical Hypotheses Deviation of a Normal Distribution.
9.1.2 Tests of Statistical Hypotheses 9.4.1 Hypothesis Tests on the Variance
9.1.3 1-Sided & 2-Sided Hypotheses 9.4.2 Type II Error & Choice of Sample Size
9.1.4 𝑃-Values in Hypothesis Tests 9.5 Tests on a Population Proportion
9.1.5 Connection between Hypothesis 9.5.1 Large-Sample Tests on a Proportion
Tests & Confidence Intervals 9.5.2 Type II Error & Choice of Sample Size
9.1.6 General Procedure for 9.6 Summary Table of Inference Procedures
Hypothesis Tests
for a Single Sample
9.2 Tests on the Mean of a Normal
9.7 Testing for Goodness of Fit
Distribution, Variance Known
9.2.1 Hypothesis Tests on the Mean
9.8 Contingency Table Tests
9.2.2 Type II Error & Choice of Sample Size 9.9 Non-Parametric Procedures
9.2.3 Large-Sample Test 9.9.1 The Sign Test
9.3 Tests on the Mean of a Normal 9.9.2 The Wilcoxon Signed-Rank Test
Distribution, Variance Unknown 9.9.3 Comparison to the 𝑡-test
9.3.1 Hypothesis Tests on the Mean 9.10 Equivalence Testing
9.3.2 Type II Error & Choice of Sample Size 9.11 Combining 𝑃-values
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
Chapter 9 Contents 2
Learning Objectives for Chapter 9
After careful study of this chapter, you should be able to do the following:
1. Structure engineering decision-making problems as hypothesis tests
2. Test hypotheses on the mean of a normal distribution using a Z-test or a t-test
3. Test hypotheses on the variance or standard deviation of a normal distribution
4. Test hypotheses on a population proportion
5. Use the P-value approach for making decisions in hypothesis tests
6. Compute power & Type II error probability and make sample size selection decisions for tests
on means, variances and proportions
7. Explain & use the relationship between confidence intervals & hypothesis tests
8. Use the chi-square goodness-of-fit test to check distributional assumptions
9. Apply contingency table tests
10. Apply nonparametric tests
11. Use equivalence testing
12. Combine P-values
Chapter 9 Learning Objectives Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
3
Hypothesis Testing

Two-sided Alternative Hypothesis


Let 𝐻0: 𝜇 = 50 centimeters per second and 𝐻1: 𝜇 ≠ 50 centimeters per second
• The statement 𝐻0: 𝜇 = 50 is called the null hypothesis.
• The statement 𝐻1: 𝜇 ≠ 50 is called the alternative hypothesis.
One-sided Alternative Hypothesis
• 𝐻0: 𝜇 = 50 centimeters per second 𝐻0: 𝜇 = 50 centimeters per second
or
• 𝐻1: 𝜇 < 50 centimeters per second 𝐻1: 𝜇 > 50 centimeters per second

Sec 9.1.1 Statistical Hypotheses


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
4
Hypothesis Testing
Test of a Hypothesis
• A procedure leading to a decision about a particular hypothesis

• Hypothesis-testing procedures rely on using the information in a random sample from


the population of interest

• If this information is consistent with the hypothesis, then we will conclude that the
hypothesis is true; if this information is inconsistent with the hypothesis, we will conclude
that the hypothesis is false.

Sec 9.1.2 Tests of Statistical Hypotheses


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
5
Tests of Statistical Hypotheses

Sec 9.1.2 Tests of Statistical Hypotheses


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
6
Decisions in Hypothesis Testing

Sometimes the type 𝐼 error


probability is called the
significance level, or the -
error, or the size of the test.

Sec 9.1.2 Tests of Statistical Hypotheses

Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
7
Computing the Probability of Type 𝑰 Error

 = P( X  48.5 when  = 50) + P( X  51.5 when  = 50)

This implies that 5.74% of all random samples would


lead to rejection of the hypothesis 𝐻0: 𝜇 = 50.

Sec 9.1.2 Tests of Statistical Hypotheses

Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
8
Computing the Probability of Type 𝑰𝑰 Error

 = P(48.5  X  51.5 when  = 52)

This implies that the probability that we will fail to


reject the false null hypothesis is 0.2643.

Sec 9.1.2 Tests of Statistical Hypotheses

Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
9
Power of a Statistical Test

• The power is computed as 1 − 𝛽, and power can be interpreted as the probability of correctly
rejecting a false null hypothesis.

• For example, consider the propellant burning rate problem when we are testing 𝐻 0: 𝜇 = 50 centimeters
per second against 𝐻 1: 𝜇 ≠ 50 centimeters per second. Suppose that the true value of the mean is
𝜇 = 52.

• When 𝑛 = 10, we found that 𝛽 = 0.2643, so the power of this test is 1 – 𝛽 = 1 − 0.2643 = 0.7357

Sec 9.1.2 Tests of Statistical Hypotheses

Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
10
One-Sided and Two-Sided Hypotheses
Two-Sided Test One-Sided Tests
H0:  = 0 H0:  = 0 H0:  = 0
or
H1:  ≠ 0 H1:  > 0 H1:  < 0

Sec 9.1.3 One-Sided and Two-Sided Hypotheses

Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
11
𝑷-value

P-value is the observed significance level.

Sec 9.1.4 P-Values in Hypothesis Tests

Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
12
𝑷-values in Hypothesis Tests

• Consider the two-sided hypothesis test 𝐻0:  = 50 against 𝐻1:   50 with 𝑛 16 and  = 2.5.
Suppose that the observed sample mean is 𝑥ҧ = 51.3 centimeters per second.

• The P-value of the test is the probability above 51.3 plus the probability below 48.7.

Sec 9.1.4 P-Values in Hypothesis Tests

Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
13
Connection Between Hypothesis Tests
and Confidence Intervals
• A close relationship exists between the test of a hypothesis for 𝜃, and the confidence interval
for 𝜃.

• If [𝑙, 𝑢] is a 100(1 − 𝛼) confidence interval for the parameter 𝜃, the test of size 𝛼 of the
hypothesis
𝐻0:  = 0
𝐻1:   0

will lead to rejection of 𝐻0 if and only if 𝜃0 is not in the 100(1 − ) 𝐶𝐼 [𝑙, 𝑢].

Sec 9.1.5 Connection between Hypothesis Tests and Confidence Intervals

Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
14
General Procedure for Hypothesis Tests

Sec 9.1.6 General Procedure for Hypothesis Tests

Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
15
Hypothesis Tests on the Mean

Sec 9.2.1 Hypothesis Tests on the Mean


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
16
Example 9.2a | Propellant Burning Rate
• Air crew escape systems are powered by a solid propellant. The burning rate of this
propellant is an important product characteristic. Specifications require that the mean
burning rate must be 50 centimeters per second and the standard deviation is  = 2
centimeters per second. The significance level of  = 0.05 and a random sample of n =
25 has a sample average burning rate of centimeters per second. Draw conclusions.
• The seven-step procedure is
1. Parameter of interest: The parameter of interest is , the mean
burning rate.
2. Null hypothesis: H0:  = 50 centimeters per second
3. Alternative hypothesis: H1:   50 centimeters per second

Sec 9.2.1 Hypothesis Tests on the Mean


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
17
Example 9.2b | Propellant Burning Rate
4. Test statistic: The test statistic is z = x −  0
0
/ n
5. Reject H0 if: Reject H0 if the P-value is less than 0.05. The boundaries of the critical
region would be 𝑧0.025 = 1.96 𝑎𝑛𝑑 𝑧0.025 = −1.96.
6. Computations: Since x = 51.3 and  = 2,
51.3 − 50
z0 = = 3.25
2/ 25

7. Conclusion: Since z0 = 3.25 and the p-value is = 2[1 − (3.25)] = 0.0012, we reject
𝐻0:  = 50 at the 0.05 level of significance.
Practical Interpretation: The mean burning rate differs from 50 centimeters per second,
based on a sample of 25 measurements.

Sec 9.2.1 Hypothesis Tests on the Mean


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
18
Type II Error and Choice of Sample Size

Sec 9.2.2 Type II Error and Choice of Sample Size


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 19
Type II Error and Choice of Sample Size

Sec 9.2.2 Type II Error and Choice of Sample Size


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
20
Example 9.3a | Propellant Burning Rate Type II
Error
• Consider the rocket propellant problem of Example 9.2. The true burning rate is 49
centimeters per second. Find  for the two-sided test with  = 0.05,  = 2, and n = 25?
• Here  = 1 and z/2 = 1.96. From Equation 9.20,

 25   25 
 =  1.96 −  −   − 1.96 −
 


     
=  (− 0.54) −  (− 4.46) = 0.295

• The probability is about 0.3 that the test will fail to reject the null hypothesis when the true
burning rate is 49 centimeters per second.
• Practical Interpretation: A sample size of n = 25 results in reasonable, but not great
power = 1 − 𝛽 = 1 − 0.3 = 0.70.

Sec 9.2.2 Type II Error and Choice of Sample Size

Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 21
Example 9.3b | Propellant Burning Rate Type II
Error
• Suppose that the analyst wishes to design the test so that if the true mean burning rate differs from
50 centimeters per second by as much as 1 centimeter per second, the test will detect this (i.e.,
reject H0:  = 50) with a high probability, say, 0.90. Now, we note that  = 2,  = 51 − 50 = 1,  =
0.05, and  = 0.10.
• Since z/2 = z0.025 = 1.96 and z = z0.10 = 1.28, the sample size required to detect this departure from
H0:  = 50 is found by Equation 9.22 as
( z  / 2 + z ) 2  2 (1.96 + 1.28) 2 2 2
n −~ = −~ 42
2 (1)2

• The approximation is good here because,  (− z/2 −  n /) =  (− 1.96 − (1) 42/2 ) = (− 5.20) −
~ 0

which is small relative to .


• Practical Interpretation: To achieve a much higher power of 0.90 we need a considerably large
sample size, n = 42 instead of n = 25.
Sec 9.2.2 Type II Error and Choice of Sample Size
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 22
Large-Sample Test
• A test procedure for the null hypothesis H0:  = 0 assuming that the population is
normally distributed and that 2 known is developed. In most practical situations, 2 will be
unknown. Even, we may not be certain that the population is normally distributed.
• In such cases, if n is large (say, n  40) the sample standard deviation s can be
substituted for  in the test procedures. Thus, while we have given a test for the mean of
a normal distribution with known 2, it can be easily converted into a large-sample test
procedure for unknown 2 regardless of the form of the distribution of the population.
• Exact treatment of the case where the population is normal, 2 is unknown, and n is small
involves use of the t distribution.

Sec 9.2.3 Large-Sample Test


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
23
Hypothesis Tests on the Mean

9.3.1 Hypothesis Tests on the Mean


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
24
Example 9.6a | Golf Club Design
• An experiment was performed in which 15 drivers produced by a particular club maker were selected at random
and their coefficients of restitution measured. It is of interest to determine if there is evidence (with  = 0.05) to
support a claim that the mean coefficient of restitution exceeds 0.82.
• The observations are:
0.8411 0.8191 0.8182 0.8125 0.8750
0.8580 0.8532 0.8483 0.8276 0.7983
0.8042 0.8730 0.8282 0.8359 0.8660
• The sample mean and sample standard deviation are x = 0.83725 and s = 0.02456. The objective of the
experimenter is to demonstrate that the mean coefficient of restitution exceeds 0.82, hence a one-sided
alternative hypothesis is appropriate.
The seven-step procedure for hypothesis testing is as follows:
1. Parameter of interest: The parameter of interest is the mean coefficient of restitution, .
2. Null hypothesis: H0:  = 0.82
3. Alternative hypothesis: H1:   0.82
9.3.1 Hypothesis Tests on the Mean
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
25
Example 9.6b | Golf Club Design
4. Test Statistic: The test statistic is x − 0
t0 =
s/ n
5. Reject H0 if: Reject H0 if the P-value is less than 0.05.

6. Computations: Since x = 0.83725, s = 0.02456,  = 0.82, and n = 15, we have


0.83725 − 0.82
t0 = = 2.72
0.02456/ 15
7. Conclusions: From Appendix A Table II, for a t distribution with 14 degrees of freedom, t0 = 2.72
falls between two values: 2.624, for which  = 0.01, and 2.977, for which  = 0.005. Since, this is a
one-tailed test the P-value is between those two values, that is, 0.005 < P < 0.01. Therefore, since
P < 0.05, we reject H0 and conclude that the mean coefficient of restitution exceeds 0.82.
Practical Interpretation: There is strong evidence to conclude that the mean coefficient of restitution
exceeds 0.82.
9.3.1 Hypothesis Tests on the Mean
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
26
Type II Error and Choice of Sample Size
• The type II error of the two-sided alternative would be
 = P (−t /2,n −1  T0  t /2,n −1 |   0)
= P ( −t /2,n −1  T0  t /2,n −1 )

• Curves are provided for two-sided alternatives on Charts VIIe and VIIf .
The abscissa scale factor d on these charts is defined as
 − 0 
d= =
 
• For the one-sided alternative   0 or   0 , use charts VIIg and VIIh. The
abscissa scale factor d on these charts is defined as
 − 0 
d= =
 
9.3.2 Type II Error and Choice of Sample Size
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
27
Example 9.7 | Golf Club Design Sample Size
• Consider the golf club testing problem from Example 9.6. If the mean coefficient of
restitution exceeds 0.82 by as much as 0.02, is the sample size n = 15 adequate to
ensure that H0:  = 0.82 will be rejected with probability at least 0.8?
• To solve this problem, we will use the sample standard deviation s = 0.02456 to estimate
. Then d = / = 0.02/0.02456 = 0.81.
• By referring to the operating characteristic curves in Appendix Chart VIIg (for  = 0.05)
with d = 0.81 and n = 15, we find that  = 0.10, approximately.

• Thus, the probability of rejecting H0:  = 0.82 if the true mean exceeds this by 0.02 is
approximately 1 −  = 1 − 0.10 = 0.90, and we conclude that a sample size of n = 15 is
adequate to provide the desired sensitivity.

9.3.2 Type II Error and Choice of Sample Size


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
28
Hypothesis Tests on the Variance

9.4.1 Hypothesis Tests on the Variance


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
29
Example 9.8 | Automated Filling
• An automated filling machine is used to fill bottles with liquid detergent. A random sample of 20 bottles results in
a sample variance of fill volume of s2 = 0.0153 (fluid ounces)2. If the variance of fill volume exceeds 0.01 (fluid
ounces)2, an unacceptable proportion of bottles will be underfilled or overfilled. Is there evidence in the sample
data to suggest that the manufacturer has a problem with underfilled or overfilled bottles? Use  = 0.05, and
assume that fill volume has a normal distribution.
• Using the seven-step procedure results in the following:

9.4.1 Hypothesis Tests on the Variance


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
30
Type II Error and Choice of Sample Size
For the two-sided alternative hypothesis: s
l=
s0
Example 9.9 | Automated Filling Sample Size
• Consider the bottle-filling problem from Example 9.8. If the variance of the filling process exceeds 0.01 (fluid
ounces)2, too many bottles will be underfilled. Thus, the hypothesized value of the standard deviation is 0 = 0.10.
Suppose that if the true standard deviation of the filling process exceeds this value by 25%, we would like to
detect this with probability at least 0.8. Is the sample size of n = 20 adequate?
 0.125
• To solve this problem, note that we require  = = = 1.25
0 0.10

• This is the abscissa parameter for Chart VIIk. From this chart, with n = 20 and 𝜆 = 1.25, we find that 𝛽 ≅ 0.6.
Therefore, there is only about a 40% chance that the null hypothesis will be rejected if the true standard deviation
is really as large as  = 0.125 fluid ounce.
• To reduce the -error, a larger sample size must be used. From the operating characteristic curve with  = 0.20
and  = 1.25, we find that n = 75, approximately. Thus, if we want the test to perform as required above, the
sample size must be at least 75 bottles.

9.4.2 Type II Error and Choice of Sample Size


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 31
Large-Sample Tests on a Proportion

9.5.1 Large-Sample Tests on a Proportion


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 32
Example 9.10 | Automobile Engine Controller
A semiconductor manufacturer produces controllers used in automobile engine applications. The customer
requires that the process fallout or fraction defective at a critical manufacturing step not exceed 0.05 and that the
manufacturer demonstrate process capability at this level of quality using  = 0.05. The semiconductor
manufacturer takes a random sample of 200 devices and finds that four of them are defective. Can the
manufacturer demonstrate process capability for the customer?
1. Parameter of Interest: The parameter of interest is the process fraction defective p.
2. Null hypothesis: H0:p = 0.05
3. Alternative hypothesis: H1: p < 0.05
x − np0
4. Test Statistic: z0 = where x = 4, n = 200, and p0 = 0.05.
np0 (1 − p0 )
Practical
5. Reject H0 if: Reject H0: p = 0.05 if the p-value is less than 0.05.
4 − 200(0.05) Interpretation: We
6. Computations: The test statistic is z0 = 200(0.05)(0.95) = −1.95 conclude that the
7. Conclusions: Since z0 = −1.95, the P-value is  (−1.95) = 0.0256, so we reject H0 and process is capable
conclude that the process fraction defective p is less than 0.05.

9.5.1 Large-Sample Tests on a Proportion Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
33
Large-Sample Tests on a Proportion

Another form of the test statistic Z0 is

9.5.1 Large-Sample Tests on a Proportion Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
34
Type II Error and Choice of Sample Size
 p − p + z/2 p0 (1 − p0 ) /n   p − p − z /2 p0 (1 − p0 ) /n 
• For a two-sided alternative  =  0

 −  0
 


 p(1 − p) / n   p(1 − p) /n 

 p0 − p − z  p0 (1 − p0 ) /n 
• If the alternative is p < p0  = 1 −  
 p(1 − p) /n 
 
 p0 − p + z  p0 (1 − p0 ) /n 
• If the alternative is p > p0  =  
 p(1 − p) /n 
 

9.5.2 Type II Error and Choice of Sample Size


Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 35
Example 9.11 | Automobile Engine Controller
Type II Error
• Consider the semiconductor manufacturer from Example 9.10. Suppose that its process
fallout is really p = 0.03. What is the -error for a test of process capability that uses n =
200 and a = 0.05?
 0.05 − 0.03 − (1.645) 0.05(0.95) / 200 
 =1−   
 0.03(1 − 0.03) / 200 
= 1 − (− 0.44) = 0.67
• Suppose that the semiconductor manufacturer was willing to accept a -error as large as
0.10 if the true value of the process fraction defective was p = 0.03. If the manufacturer
continues to use a = 0.05, what sample size would be required?
é1.645 0.05 ( 0.95) + 1.28 0.03( 0.97) ù
2

n =ê ú
êë 0.03 - 0.05 úû

-~ 832
• Conclusion: Note that n = 832 is a very large sample size. However, we are trying to detect a fairly
small deviation from the null value p0 = 0.05.
9.5.2 Type II Error and Choice of Sample Size
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 36
Testing for Goodness of Fit
• Based on chi-square distribution
• Requires a random sample of size n from the population whose probability distribution is
unknown
• Let Oi be the observed frequency in the ith class interval.
• Let Ei be the expected frequency in the ith class interval.

9.7 Testing for Goodness of Fit Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
37
Example 9.12a | Printed Circuit Board
Defects-Poisson Distribution
• The number of defects in printed circuit boards is hypothesized to follow
a Poisson distribution. A random sample of n = 60 printed boards has
been collected, and the following number of defects observed.

• The estimate of the mean number of defects per board is the sample
average, (32·0 + 15·1 + 9·2 + 4·3)/60 = 0.75. From the Poisson
distribution with parameter 0.75, we may compute pi, the theoretical,
hypothesized probability associated with the ith class interval. We may
find the pi as follows: e −0.75 (0.75)0
p = P( X = 0) =
1 = 0.472
0!
e −0.75 (0.75)1
p 2 = P( X = 1) = = 0.354
1!
e −0.75 (0.75)2
p3 = P( X = 2) = = 0.133
2!
p 4 = P( X  3) = 1 − ( p1 + p 2 + p3 ) = 0.041

9.7 Testing for Goodness of Fit Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
38
Example 9.12b | Printed Circuit Board
Defects-Poisson Distribution
• The expected frequencies are computed by multiplying the sample size n
= 60 times the probabilities pi. That is, Ei = npi. The expected frequencies
follow:

• Because the expected frequency in the last cell is less than 3, we combine
the last two cells.

9.7 Testing for Goodness of Fit Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
39
Example 9.12c | Printed Circuit Board
Defects-Poisson Distribution
The seven-step hypothesis-testing procedure may now be applied, using  = 0.05, as follows:
1. Parameter of interest: The variable of interest is the form of the distribution of defects in printed circuit
boards.
2. Null hypothesis: H0: The form of the distribution of defects is Poisson.
3. Alternative hypothesis: H1: The form of the
(oi − Ei )2 of defects is not Poisson.
k distribution

Test statistic: The test statistic is   = 



4. Ei
i =1

5. Reject H0 if: Reject H0(32


if the P-value is(15
− 28.32 )2
less than 0.05.
− 21.24 )2
  = +
6. Computations: 28.32 21.24

+
(13 − 10.44)2 = 2.94
10.44
 
2
= 2.71  
2
= 3.84   = 2.94
7. Conclusions: We find from Appendix Table III that and Because lies
between these values, we conclude that the P-value is between 0.05 and 0.10. Therefore, since the P-value
exceeds 0.05 we are unable to reject the null hypothesis that the distribution of defects in printed circuit boards
is Poisson. The exact P-value computed from Minitab is 0.0864.
9.7 Testing for Goodness of Fit Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 40
Contingency Table Tests

c
1
Assuming independence, the estimators of ui and vj are: uˆ i =
n
 Oij
j =1
r
1
vˆ j =
n
 Oij
i =1

9.8 Contingency Table Tests Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
41
Contingency Table Tests
Therefore, the expected frequency of each cell is
c r
1
Eij = nuˆ i vˆ j =
n
 Oij  Oij
j =1 i =1
Then, for large n, the statistic
r c
(Oij - Eij )2
c =å å
2
0
i=1 j=1 Eij

has an approximate chi-square distribution with (r −1)(c − 1) degrees of freedom if the null 
hypothesis is true. We should reject the null hypothesis if the value of the test statistic   is too

large. The P-value would be calculated as the probability beyond   on the  (r −1)(c −1)
( )
distribution, or P = p  (r −1)(c −1)    . For a fixed-level test, we would reject the hypothesis of
 
independence if the observed value of the test statistic   exceeded  (r −1)(c −1) .

9.8 Contingency Table Tests Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
42
Example 9.14a | Health Insurance Plan
Preference
A company has to choose among three health insurance plans. Management wishes to
know whether the preference for plans is independent of job classification and wants to
use α= 0.05. The opinions of a random sample of 500 employees are shown in Table 9.3.

To find the expected frequencies, we must first compute


uˆ2 = (160/500) = 0.32, vˆ1 = (200/500) = 0.40, vˆ2 = (200/500) = 0.40, and
uˆ1 = (340/500) = 0.68, vˆ3 = (100/500) = 0.20
9.8 Contingency Table Tests Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
43
Example 9.14b | Health Insurance Plan
Preference
• The expected frequencies may now be computed from Equation 9.49.
• For example, the expected number of salaried workers favoring health insurance plan 1 is
E11 = nuˆ1vˆ1 = 500(0.68)(0.40) = 136
• The expected frequencies are shown in the table below

9.8 Contingency Table Tests Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
44
Example 9.14c | Health Insurance Plan
Preference
The seven-step hypothesis-testing procedure may now be applied to this problem.
1. Parameter of Interest: The variable of interest is employee preference among health
insurance plans.
2. Null hypothesis: H0: Preference is independent of salaried versus hourly job classification.
3. Alternative hypothesis: H1: Preference is not independent of salaried versus hourly job
classification.
r c (oij − Eij )2
4. Test statistic: The test statistic is   = 
i =1 j = 1 Eij

5. Reject H0 if: We will use a fixed-significance level test with a = 0.05. Therefore, since r = 2 and
c = 3, the degrees of freedom for chi-square are (r – 1)(c – 1) = (1)(2) = 2, and we would reject
H0 if c 20 = 49.63 > c 20.05,2 = 5.99

9.8 Contingency Table Tests Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
45
Example 9.14d | Health Insurance Plan
Preference
5. Reject H0 if: We will use a fixed-significance level test with a = 0.05. Therefore, since r = 2
and c = 3, the degrees of freedom for chi-square are (r – 1)(c – 1) = (1)(2) = 2, and we would
reject H0 if
2 3 (o − E )2
6. Computations:   =
 
ij ij

i =1 j =1 Eij

=
(160 − 136)2 +
(140 − 136)2 +
(40 − 68)2
136 136 68

+
(40 − 64)2 +
(60 − 64)2 +
(60 − 32)2
64 64 32
= 49.63

 
7. Conclusions: Since   = 49.63    = 5.99 , we reject the hypothesis of independence and
conclude that the preference for health insurance plans is not independent of job
classification. The P-value for  = 49.63 P = 1.671  10–11 (This value was computed from
computer software).
9.8 Contingency Table Tests Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
46
Nonparametric Procedures
The Sign Test
• Used to test hypotheses about the median 𝝁 ෥ of a continuous distribution.
• Suppose that the hypotheses are
• Test procedure: Let X1, X2,... ,Xn be a random sample from the population of interest.
• Form the differences , i =1,2,…,n.
• An appropriate test statistic is the number of these differences that are positive, say R+.
• P-value for the observed number of plus signs r+ can be calculated directly from the binomial
distribution.
• If the computed P-value is less than or equal to the significance level α, we will reject H0 .
• The two-sided alternative may also be tested
• If the computed P-value is less than the significance level α, we will reject H0.

9.9.1 The Sign Test Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
47
Example 9.15a | Propellant Shear Strength
Sign Test
• Montgomery, Peck, and Vining (2012) reported on a
study in which a rocket motor is formed by binding
an igniter propellant and a sustainer propellant
together inside a metal housing.
• The shear strength of the bond between the two
propellant types is an important characteristic.
• The results of testing 20 randomly selected motors
are shown in Table 9.5. Test the hypothesis that the
median shear strength is 2000 psi, using α = 0.05.

9.9.1 The Sign Test Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
48
Example 9.15b | Propellant Shear
Strength Sign Test
The seven-step hypothesis-testing procedure is:
1. Parameter of Interest: The variable of interest is the median of the distribution of propellant shear
strength.
2. Null hypothesis:
3. Alternative hypothesis:
4. Test statistic: The test statistic is the observed number of plus differences in Table 9.5, i.e., r+=14.
5. Reject H0 if: The P-value corresponding to r+ = 14 is less than or equal to α= 0.05
6. Computations : r+ = 14 is greater than n/2 = 20/2 = 10, we calculate the P-value from
 1
P = 2 P  R +  14 when p = 
 2
20
 20 
= 2    ( 0.5 ) ( 0.5 )
r 20 − r

r =14  r 

= 0.1153
7. Conclusions: Since the P-value is greater than α= 0.05 we cannot reject
the null hypotheses that the median shear strength is 2000 psi.
9.9.1 The Sign Test Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
49
The Wilcoxon Signed-Rank Test
The Wilcoxon Signed-Rank Test
• A test procedure that uses both direction (sign) and magnitude.
• Suppose that the hypotheses are H 0 :  = 0 H1 :   0
• Test procedure : Let X1, X2,... ,Xn be a random sample from continuous and symmetric distribution with mean
(and Median) μ. Form the differences .
• Rank the absolute differences X i - m0 in ascending order, and give the ranks to the signs of their corresponding
differences.
• Let W+ be the sum of the positive ranks and W– be the absolute value of the sum of the negative ranks, and let
W = min(W+, W−).
• Critical values of W, can be found in Appendix Table IX.
• If the computed value is less than the critical value, we will reject H0 .
• For one-sided alternatives H1 :   0 reject H0 if W– ≤ critical value
H1 :   0 reject H0 if W+ ≤ critical value

9.9.2 The Wilcoxon Signed-Rank Test Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
50
Example 9.16a | Propellant Shear Strength-
Wilcoxon Signed-Rank Test
• We illustrate the Wilcoxon signed-rank test by applying it to the propellant shear strength
data from Table 9.5. Assume that the underlying distribution is a continuous symmetric
distribution.
• The seven-step hypothesis-testing procedure is applied as follows:
1. Parameter of Interest: The variable of interest is the mean (or median) of the
distribution of propellant shear strength.
2. Null hypothesis: H 0 :  = 2000 psi
3. Alternative hypothesis: H1 :   2000 psi
+ −
4. Test statistic: The test statistic is 𝑤 = min(𝑤 , 𝑤 )
5. Reject H0 if: W ≤ 52 (from Appendix Table IX).
+
6. Computations : The sum of the positive ranks is 𝑤 = (1 + 2 + 3 + 4 + 5 + 6 + 11 +
13 + 15 + 16 + 17 −
+ 18 + 19 + 20) = 150, and the sum of the absolute values of the
negative ranks is 𝑤 = (7 + 8 + 9 + 10 + 12 + 14) = 60.

9.9.2 The Wilcoxon Signed-Rank Test Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
51
Example 9.16b | Propellant Shear Strength-
Wilcoxon Signed-Rank Test
+ −
𝑤 = min(𝑤 , 𝑤 ) = min(150 , 60) = 60

7. Conclusions: Since w = 60 is not ≤ 𝑤0 = 52 we fail to


reject the null hypotheses that the mean or median shear
strength is 2000 psi.

9.9.2 The Wilcoxon Signed-Rank Test Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
52
The Wilcoxon Signed-Rank Test

9.9.2 The Wilcoxon Signed-Rank Test Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
53
Equivalence Testing
• A test that is used when we want to reject the null hypothesis (and support the alternative)
in the form of:
𝐻0 : 𝜇 ≠ 80 𝑣𝑠. 𝐻1 : 𝜇 = 80
• To test the above, the following two sets of one-sided alternative hypotheses are tested:

where 𝛿 is called the equivalence band, a practical threshold or limit within which the mean
is considered to be the same as standard.
• Note that these are just two one-sided tests. For this reason, a test of equivalence is
sometimes called two one-sided tests (TOST).
9.10 Equivalence Testing Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
54
Important Terms and Concepts
• Acceptance Region • Hypotheses • Reference distribution for a test statistic
• Alternative Hypothesis • Hypothesis testing • Rejection region
• 𝛼 and 𝛽 • Independence test • Sampling distribution
• Chi-square tests • inference • Sample size determination for hypothesis tests
• Combining P-values • Non-parametric or distribution-free methods • Sign test
• Confidence interval • Normal approximation to non-parametric tests • Significance level of a test
• Connection between hypothesis tests and • Null distribution • Statistical hypotheses
confidence intervals
• Null hypothesis • Statistical vs. practical significance
• Contingency table
• Observed significance level • Symmetric continuous distributions
• Critical region for a test statistic
• One-and two-sided alternative hypotheses • T-test
• Critical Values
• Operating Characteristic (OC) curves • Test statistic
• Equivalence testing
• Parametric • Type I & Type II errors
• Fixed significance level
• Power of a statistical test • Wilcoxen signed-rank test
• Goodness-of-fit test
• P-value • Z-test
• Homogeneity test
• Ranks

Chapter 9 Important Terms and Concepts Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
55
Introductory Statistics
Tenth Edition
Prem Mann

Chapter 9
Hypothesis Tests About The Mean And
Proportion
This slide deck contains animations. Please disable animations if they cause issues with your device.
Copyright ©2021 John Wiley & Sons, Inc.
LEARNING OBJECTIVES
After completing this section, you should be able to:
• Explain the conditions required to use the normal distribution to
perform a test of hypothesis about a population proportion.
• Determine whether a sample size is large enough to use the
normal distribution to perform a test of hypothesis about a
population proportion.
• Use the normal distribution to illustrate the critical value, the
rejection region and the nonrejection region for a given
alternative hypothesis and level of significance.
• Apply the five-step method using a critical value approach to
perform a test of hypothesis about a population proportion.
• Apply the four-step method using a p-value approach to perform
a test of hypothesis about a population proportion.
9.4 Hypothesis Tests About a Population
Proportion: Large Samples
Test Statistic
The value of the test statistic z for the sample proportion, p̂ ,
is computed as
𝑝Ƹ − 𝑝 𝑝𝑞
𝑧= where 𝜎𝑝ො =
𝜎𝑝ො 𝑛

The value of p that is used in this formula is the one from


the null hypothesis. The value of q is equal to 1 – p. The
value of z calculated for p̂ using the above formula is also
called the observed value of z.
Copyright ©2021 John Wiley & Sons, Inc. 3
Example 9-9
• According to a Gallup poll conducted a few years ago, 20% of
traditional college graduates (those who earned their degree
before age 25) were emotionally attached to their alma mater
(www. gallup.com).
• Suppose this result is true for the population of traditional
college graduates of that year.
• In a recent random sample of 2000 traditional college
graduates, 22% said that they are emotionally attached to their
alma mater.
• Find the p-value to test the hypothesis that the current
percentage of traditional college graduates who are emotionally
attached to their alma mater is different from 20%.
• What is your conclusion if the significance level is 5%?
Copyright ©2021 John Wiley & Sons, Inc. 4
Example 9-9: Solution
Step 1: H0 : p = .20 (The current % is not different from 20%)
H1 : p ≠ .20 (The current % is different from 20%)

Step 2: To check whether the sample is large, we calculate the


values of np and nq:
np = 2000(.20) = 400 > 5
nq = 2000(.80) = 1600 > 5 where q = 1 – p
Consequently, we will use the normal distribution to find the
p-value for this test.
The sample size is considered as large
when np and
Copyrightnq are
©2021 both
John Wiley greater
& Sons, Inc. than 5. 5
Example 9-9: Solution
Step 3: The ≠ sign in the alternative hypothesis indicates
that the test is two-tailed.
𝑝Ƹ − 𝑝 𝑝Ƹ − 𝑝 .22 − .20
𝑧= = = = 2.24
σ𝑝ො 𝑝𝑞 (.20)(.80)
𝑛 2000

Copyright ©2021 John Wiley & Sons, Inc. 6


Figure 9.15 The Required p-Value

p-value = 0.025

Copyright ©2021 John Wiley & Sons, Inc. 7


Example 9-9: Solution
H0 : p = .20  H1 : p ≠ .20 ✓

Step 4: Since p-value = 0.025 < α = .05, we reject H0.

We conclude that the sample data provide evidence


that the current percentage of traditional college
graduates who are emotionally attached to their
alma mater is different from 20%.

Copyright ©2021 John Wiley & Sons, Inc. 8


Example 9-9: Solution (Using critical value)
Step 3:
The critical values of z, obtained from the standard
normal distribution table, are −1.96 and 1.96, as shown
below

Copyright ©2021 John Wiley & Sons, Inc. 9


The Critical Values of z

Copyright ©2021 John Wiley & Sons, Inc. 𝟐. 𝟐𝟒 10


Example 9-9: Solution
Step 4: Computing for the test value

pq (.20)(.80)
 pˆ = = = .00894427
n 2000
pˆ − p .22 − .20
z= = = 2.24
 pˆ .00894427

Copyright ©2021 John Wiley & Sons, Inc. 11


Example 9-9: Solution
Step 5:
• The value of the test statistic z = 2.24 for 𝑝Ƹ falls in the rejection
region.
• As a result, we reject H0 and conclude that the sample evidence
shows that the current percentage of traditional college graduates
who are emotionally attached to their alma mater is different from
0.20.
• Consequently, we can state that the difference between the
hypothesized population proportion of 0.20 and the sample
proportion of 0.22 is most likely large enough to be attributed to
sampling error alone when α = 0.05.

Copyright ©2021 John Wiley & Sons, Inc. 12


Example 9-12
Direct Mailing Company sells computers and computer
parts by mail. The company claims that at least 90% of all
orders are mailed within 72 hours after they are received.
The quality control department at the company often takes
samples to check if this claim is valid. A recently taken
sample of 150 orders showed that 129 of them were
mailed within 72 hours. Do you think the company’s
claim is true? Use a 2.5% significance level.

Copyright ©2021 John Wiley & Sons, Inc. 13


Example 9-12: Solution (1 of 4)

Step 1: H0 : p ≥ .90 H1 : p < .90

Step 2: To check whether the sample is large, we calculate


the values of np and nq:

np = 150(.90) = 135 > 5

nq = 150(.10) = 15 > 5

Consequently, we will use the normal distribution to make

the test.
Copyright ©2021 John Wiley & Sons, Inc. 14
Example 9-12: Solution (2 of 4)
Step 3: Significance level = .025. The < sign in the
alternative hypothesis indicates that the test is left-
tailed, and the rejection region lies in the left tail.
The critical values of z for .0250 area in the left tail is
−1.96.

Copyright ©2021 John Wiley & Sons, Inc. 15


Example 9-12: Solution (3 of 4)
𝑝Ƹ − 𝑝 .86 − .90
Step 4: 𝑧= = = −1.63
𝑝𝑞 (.90)(.10)
𝑛 150

−𝟏. 𝟔𝟑
Copyright ©2021 John Wiley & Sons, Inc. 16
−𝟏. 𝟔𝟑
Copyright ©2021 John Wiley & Sons, Inc. 17
Example 9-12: Solution (4 of 4)
Step 5: The value of test statistic z = −1.63 is greater
than the critical value of z = −1.96, and it falls in the
nonrejection region. Therefore, we fail to reject H0.

We can state that the difference between the sample


proportion and the hypothesized value of the population
proportion is small, and this difference may have
occurred owing to the chance alone.

Copyright ©2021 John Wiley & Sons, Inc. 18


- Sir Choy
CHAPTER 9
HYPOTHESIS TESTS
ABOUT THE MEAN AND
PROPORTION

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
9.1 Hypothesis Tests: An Introduction

 Two Hypotheses

 Rejection and Non-rejection Regions

 Two Types of Errors

 Tails of a Test

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Two Hypotheses

Definition

A null hypothesis (H0) is a claim (or statement)


about a population parameter that is assumed to
be true until it is declared false.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Two Hypotheses

Definition

An alternative hypothesis (H1) is a claim about a


population parameter that will be declared true if the
null hypothesis is declared to be false.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Two Types of Errors

Table 9.1 Four Possible Outcomes for a Court Case

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Two Types of Errors
Definition

A Type I error occurs when a true null hypothesis is rejected.


The value of 𝜶 represents the probability of committing this type
of error; that is,
𝜶 = P(H0 is rejected | H0 is true)

The value of 𝜶 represents the significance level of the test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Two Types of Errors
Definition

A Type II error occurs when a false null hypotheses is not


rejected. The value of β represents the probability of
committing a Type II error; that is,
β = P (H0 is not rejected | H0 is false)

The value of 1 – β is called the power of the test. It


represents the probability of not making a Type II error.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Table 9.2 Four Possible Outcomes for a Test of Hypothesis

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Tails of a Test

Definition

➢ A two-tailed test has rejection regions in both tails.

➢ A left-tailed test has the rejection region in the left tail.

➢ A right-tailed test has the rejection region in the right tail


of the distribution curve.

left-tailed two-tailed right-tailed

Null hypothesis is rejected if the test statistic or test value lies on


the rejection region. Otherwise, H0 is not rejected.
A Two-Tailed Test

 According to the U.S. Bureau of Labor Statistics, workers in


the United States who were employed earned an average of
$47,230 a year in 2014. Suppose an economist wants to
check whether this mean has changed since 2014.
Suppose an economist wants to check whether this mean
has changed since 2014. The key word here is changed.

 The mean annual earning of employed Americans has


changed since 2014. This is an example of a two tailed test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
A Two-Tailed Test
 Let μ be the mean annual earning of employed Americans.

 The two possible hypotheses are

◼ H0 : μ = $47,230
The mean annual earning of employed
Americans has not changed since 2014.

◼ H1 : μ ≠ $47,230
The mean annual earning of employed
Americans has changed since 2014.
A Two-Tailed Test

❑ Whether a test is two–tailed or one–tailed is determined


by the sign in the alternative hypothesis.

❑ If the alternative hypothesis has a not equal to (≠) sign,


it is a two–tailed test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.2 A Two-Tailed Test

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
A Left-Tailed Test

▪ Consider the example of the mean amount of soda in all soft-


drink cans produced by a company.
▪ The company claims that these cans, on average, contain 12
ounces of soda.
▪ However, if these cans contain less than the claimed amount
of soda, then the company can be accused of cheating.
▪ Suppose a consumer agency wants to test whether the mean
amount of soda per can is less than 12 ounces.
▪ Note that the key phrase this time is less than, which
indicates a left-tailed test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
A Left-Tailed Test

 Let μ be the mean amount of soda in all cans. The two


possible decisions are

◼ H0 : μ = 12 ounces (The mean is equal to 12 ounces)

◼ H1 : μ < 12 ounces (The mean is less than 12 ounces)

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
A Left-Tailed Test

▪ In this case, we can also write the null hypothesis as


H0 : μ ≥ 12

▪ This will not affect the result of the test as long as the sign in
H1 is less than (<).

▪ When the alternative hypothesis has a less than (<) sign, the
test is always left–tailed.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.3 A Left-Tailed Test

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
A Right-Tailed Test

▪ According to www.city-data.com, the average price of


homes in West Orange, New Jersey, was $471,257 in 2013.

▪ Suppose a real estate researcher wants to check whether


the current mean price of homes in this town is higher than
$471,257.

▪ The key phrase in this case is higher than, which indicates a


right-tailed test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
A Right-Tailed Test

 Let μ be the current mean price of homes in this town. The


two possible decisions are

◼ H0 : μ = $471,257 (The current mean price of homes in


this town is not higher than $ 471,257)

◼ H1 : μ > $471,257 (The current mean price of homes in


this town is higher than $ 471,257)

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
A Right-Tailed Test

When the alternative hypothesis has a greater than (>) sign,


the test is always right–tailed.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.4 A Right-Tailed Test

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Table 9.3 Signs in H0 and H1 and Tails of a Test
Two Procedures

Two procedures to make tests of hypothesis

1. The p-value approach

2. The critical-value approach

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
9.2 Hypothesis Tests About µ : σ Known

Three Possible Cases

Case I. If the following three conditions are fulfilled:

1. The population standard deviation σ is known

2. The sample size is small (i.e., n < 30)

3. The population from which the sample is selected is


normally distributed.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Hypothesis Tests About µ : σ Known

Three Possible Cases

Case II. If the following two conditions are fulfilled:

1. The population standard deviation σ is known

2. The sample size is large (i.e., n ≥ 30)

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Hypothesis Tests About µ : σ Known

Three Possible Cases

Case III. If the following three conditions are fulfilled:

1. The population standard deviation σ is known

2. The sample size is small (i.e., n < 30)

3. The population from which the sample is selected is


not normally distributed (or its distribution is
unknown).

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Hypothesis Tests About µ : σ Known

Three Possible Cases

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Hypothesis Tests About µ : σ Known

Definition

▪ Assuming that the null hypothesis is true, the p-value can be


defined as the probability that a sample statistic (such as the
sample mean) is at least as far away from the hypothesized
value in the direction of the alternative hypothesis as the one
obtained from the sample data under consideration.

▪ Note that the p–value is the smallest significance level at


which the null hypothesis is rejected.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.5 The p–Value for a Right-Tailed Test

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.6 The p–Value for a Two-Tailed Test

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Calculating the z Value for 𝒙

When using the normal distribution, the value of z for ഥ for


𝒙
a test of hypothesis about μ is computed as follows:

𝑥lj − 𝜇 𝜎
𝑧= where 𝜎𝑥lj =
𝜎𝑥lj 𝑛

ഥ using this formula is also called


The value of z calculated for 𝒙
the observed value of z.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Steps to Perform a Test of Hypothesis Using the p–Value
Approach

1. State the null and alternative hypothesis.

2. Select the distribution to use.

3. Calculate the p–value.

4. Make a decision.

5. Make a conclusion.
Example 9-1

▪ At Canon Food Corporation, it used to take an average of 90


minutes for new workers to learn a food processing job.
▪ Recently the company installed a new food processing
machine.
▪ The supervisor at the company wants to find if the mean
time taken by new workers to learn the food processing
procedure on this new machine is different from 90 minutes.
▪ A sample of 20 workers showed that it took, on average, 85
minutes for them to learn the food processing procedure on
the new machine.
▪ It is known that the learning times for all new workers are
normally distributed with a population standard deviation of
7 minutes.
▪ Find the p–value for the test that the mean learning time for
the food processing procedure on the new machine is
different from 90 minutes.
▪ What will your conclusion be if α = .01?
Example 9-1 Solution:

Step 1: H0: μ = 90 H1: μ ≠ 90

Step 2: Use the normal distribution to find the p–value since


the population standard deviation σ is known, the sample size
is small (n < 30), and the population distribution is normal.

Step 3:

𝑥lj − 𝜇 𝑥lj − 𝜇 85 − 90
𝑧= = 𝜎 = = −3.19
𝜎𝑥lj 7
𝑛 20
Figure 9-7 The p-Value for a Two-Tailed Test

p-value = 2(.0007)
= 0.0014
Calculating the test statistic and all the possible p-values
using Excel

p-value
Decision Rule:

▪ If p-value < significance level 𝜶, we reject the


null hypothesis at this significance level.

▪ Otherwise, do not reject H0.

Recall:
The significance level 𝜶 is the probability of rejecting the null
hypothesis when it is true.
p-value = 2(.0007)
= 0.0014
Example 9-1: Solution

What will your conclusion


be if α = .01?

Step 4: Since p-value = 0.0014 < α = 0.01, we reject the


null hypothesis at this significance level.

Step 5: We conclude that the mean time for learning the


food processing procedure on the new machine is different
from 90 minutes.
Example 9-2

▪ The management of Priority Health Club claims


that its members lose an average of 10 pounds or
more within the first month after joining the club.
▪ A consumer agency that wanted to check this
claim took a random sample of 36 members of this
health club and found that they lost an average of
9.2 pounds within the first month of membership
with a standard deviation of 2.4 pounds.
▪ Find the p–value for this test.
▪ What will your decision be if α = .01?
What if α = .05?
Prem Mann, Introductory Statistics, 9/E
Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-2: Solution

Step 1: H0: μ ≥ 10 H1: μ < 10

Step 2: The population standard deviation σ is


known, the sample size is large (n > 30). Due to the
Central Limit Theorem, we will use the normal
distribution to find the p–value and perform the
test.

The central limit theorem states that the distribution of sample


means approximates a normal distribution as the sample size gets
larger, regardless of the population's distribution. Sample sizes
equal to or greater than 30 are often considered sufficient for this
theorem to hold.
Example 9-2: Solution

Step 3:
𝑥lj − 𝜇 𝑥lj − 𝜇 9.2 − 10
𝑧= = 𝜎 = = −2.00
𝜎𝑥lj 2.4
𝑛 36

p-value = .0228
Example 9-2: Solution

Step 4: Since p-value = 0.0228 > α = .01, we do not reject


the null hypothesis at this significance level.

Consequently, we conclude that the mean weight lost within


the first month of membership by the members of this club is
not lower than 10 pounds.

Step 4: Since p-value = 0.0228 < α = .05, we reject the null


hypothesis at this significance level.
Step 5: We conclude that the mean weight lost within the first
month of membership by the members of this club is less than
10 pounds.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Hypothesis Tests About µ : σ Known

Test Statistic

In tests of hypotheses about μ using the normal distribution,


the random variable
𝑥lj − 𝜇 𝜎
𝑧= where 𝜎𝑥lj =
𝜎𝑥lj 𝑛

is called the test statistic. The test statistic can be defined


as a rule or criterion that is used to make the decision
whether or not to reject the null hypothesis.
Prem Mann, Introductory Statistics, 9/E
Copyright © 2015 John Wiley & Sons. All rights reserved.
Hypothesis Tests About µ : σ Known

Steps to Perform a Test of Hypothesis with the Critical-


Value Approach

1. State the null and alternative hypotheses.


2. Select the distribution to use.
3. Determine the rejection and nonrejection regions.
4. Calculate the value of the test statistic.
5. Make a decision and conclusion.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-3

▪ The TIV Telephone Company provides long-distance


telephone service in an area.
▪ According to the company’s records, the average length of all
long-distance calls placed through this company in 2015 was
12.44 minutes.
▪ The company’s management wanted to check if the mean
length of the current long-distance calls is different from
12.44 minutes.
▪ A sample of 150 such calls placed through this company
produced a mean length of 13.71 minutes with a standard
deviation of 2.65 minutes.
▪ Using the 2% significance level, can you conclude that the
mean length of all current long-distance calls is different
from 12.44 minutes?

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-3: Solution
Step 1: H0 : μ = 12.44
H1 : μ ≠ 12.44

Step 2: The population standard deviation σ is known, and


the sample size is large (n > 30). Due to the Central Limit
Theorem, we will use the normal distribution to perform the
test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-3: Solution

Step 3: α = .02
▪ The ≠ sign in the alternative hypothesis indicates that the
test is two-tailed.
▪ Area in each tail = α/2 = .02/2 = .01.
▪ The z values for the two critical points are -2.33 and 2.33.
test statistic
Calculating the Value of the Test Statistic

When using the normal distribution, the value of the test


ഥ for a test of hypothesis about μ is computed
statistic z for 𝒙
as follows:

𝒙lj − 𝝁 𝒙lj − 𝝁
𝒛= = 𝝈
𝝈𝒙lj
𝒏
The value of z for 𝒙
ഥ is also called the observed value of z.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-3: Solution
Step 4: 𝑥lj − 𝜇 13.71 − 12.44
𝑧= 𝜎 = = 5.87
2.65
𝑛 150

𝟓. 𝟖𝟕
Example 9-3: Solution

Step 5:

▪ This value of z = 5.87 is greater than the critical value of


z = 2.33, and it falls in the rejection region in the right tail
in Figure 9.9.

▪ Hence, we reject H0 and conclude that based on the


sample information, it appears that the mean length of all
such calls is not equal to 12.44 minutes.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-4

▪ The mayor of a large city claims that the average net worth
of families living in this city is at least $300,000.
▪ A random sample of 25 families selected from this city
produced a mean net worth of $288,000.
▪ Assume that the net worths of all families in this city have a
normal distribution with the population standard deviation
of $80,000.
▪ Using the 2.5% significance level, can you conclude that the
mayor’s claim is false?

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-4: Solution
Step 1: H0 : μ ≥ $300,000 H1 : μ < $300,000

Step 2: The population standard deviation σ is known, the


sample size is small (n < 30), and the population distribution is
normal. Consequently, we will use the normal distribution to
perform the test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
H1 : μ < $300,000

Example 9-4: Solution


Step 3: α = .025
▪ The < sign in the alternative hypothesis indicates that the
test is left-tailed.
▪ Area in the left tail = α = .025.
▪ The critical value of z is -1.96.
test statistic
Example 9-4: Solution
Step 4: 𝑥lj − 𝜇 288,000 − 300,000
𝑧= 𝜎 = = −0.75
80,000
𝑛 25

−𝟎. 𝟕𝟓
Example 9-4: Solution
Step 5: This value of z = -.75 is greater than the critical
value of z = -1.96, and it falls in the nonrejection region. As
a result, we fail to reject H0. Therefore, we can state that
based on the sample information, it appears that the mean
net worth of families in this city is not less than $300,000.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
9.3 Hypothesis Tests About µ : σ Not Known
Three Possible Cases

Case I. If the following three conditions are fulfilled:

1. The population standard deviation σ is not known


2. The sample size is small (i.e., n < 30)
3. The population from which the sample is selected is
normally distributed.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Hypothesis Tests About µ : σ Not Known
Three Possible Cases

Case II. If the following two conditions are fulfilled:

1. The population standard deviation σ is not known


2. The sample size is large (i.e., n ≥ 30)

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Hypothesis Tests About µ : σ Not Known
Three Possible Cases

Case III. If the following three conditions are fulfilled:

1. The population standard deviation σ is not known


2. The sample size is small (i.e., n < 30)
3. The population from which the sample is selected is not
normally distributed (or the shape of its distribution is
unknown).

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Hypothesis Tests About µ : σ Not Known
Three Possible Cases

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Hypothesis Tests About µ : σ Not Known
Test Statistic
The value of the test statistic t for the sample mean ഥ
𝒙 is
computed as
x − s
t= where s x =
sx n

ഥ by using this formula is also


The value of t calculated for 𝒙
called the observed value of t.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-5
A psychologist claims that the mean age at which children
start walking is 12.5 months. Carol wanted to check if this
claim is true. She took a random sample of 18 children and
found that the mean age at which these children started
walking was 12.9 months with a standard deviation of .80
month. It is known that the ages at which all children start
walking are approximately normally distributed. Find the p-
value for the test that the mean age at which all children
start walking is different from 12.5 months. What will your
conclusion be if the significance level is 1%?

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-5: Solution
Step 1: H0 : μ = 12.5 H1 : μ ≠ 12.5
Step 2: The population standard deviation σ is not known,
the sample size is small (n < 30), and the population is
normally distributed. Consequently, we will use the t
distribution to find the p-value for the test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-5: Solution
Step 3: The ≠ sign in the alternative hypothesis indicates
that the test is two-tailed

s .80
sx = = = .18856181
n 18
x −  12.9 − 12.5
t= = = 2.121
sx .18856181

and df = n – 1 = 18 – 1 = 17
.02 < p-value < .05

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.11 The Required p-Value

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-5: Solution
Step 4: For any α greater than .05, we will reject the null
hypothesis. For any α less than .02, we will not reject the
null hypothesis. For our example, α = .01, which is less
than the lower limit of the p-value ranges of .02. As a
result, we fail to reject H0 and conclude that the mean age
at which all children start walking is not significantly
different from 12.5 months.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-6
Grand Auto Corporation produces auto batteries. The
company claims that its top-of-the-line Never Die batteries
are good, on average, for at least 65 months. A consumer
protection agency tested 45 such batteries to check this
claim. It found the mean life of these 45 batteries to be 63.4
months with a standard deviation of 3 months. Find the p-
value for the test that mean life of all such batteries is less
than 65 months. What will your conclusion be if the
significance level is 2.5%?

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-6: Solution
Step 1: H0 : μ ≥ 65 H1 : μ < 65
Step 2: The population standard deviation σ is not known and
the sample size is large (n > 30). Consequently, we will use the
t distribution to find the p-value for the test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-6: Solution
Step 3: The < sign in the alternative hypothesis indicates
that the test is left-tailed.
s 3
sx = = = .44721360
n 45
x − 63.4 − 65
t= = = −3.578
sx .44721360

and df = n – 1 = 45 – 1 = 44
p-value < .001

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.12 The Required p-Value

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Rejection and Nonrejection Regions
Figure 9.1 Nonrejection and Rejection Regions for the Court Case

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-7
Refer to Example 9-5. A psychologist claims that the mean
age at which children start walking is 12.5 months. Carol
wanted to check if this claim is true. She took a random
sample of 18 children and found that the mean age at which
these children started walking was 12.9 months with a
standard deviation of .80 month. Using the 1% significance
level, can you conclude that the mean age at which all
children start walking is different from 12.5 months? Assume
that the ages at which all children start walking have an
approximately normal distribution.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-7: Solution
Step 1: H0 : μ = 12.5 H1 : μ ≠ 12.5
Step 2: The population standard deviation σ is not known,
the sample size is small (n < 30), and the population is
normally distributed. Consequently, we will use the t
distribution to perform the test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-7: Solution
Step 3: The significance level = .01. The ≠ sign in the
alternative hypothesis indicates that the test is two-tailed
and the rejection region lies in both tails.

Area in each tail = α /2 = .01/2 = .005.


df = n – 1 = 18 – 1 = 17.
The critical values for t for 17 df and .005 area in each tail
are -2.898 and 2.898.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.13 The Required p-Value

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-7: Solution
Step 4:
s .80
sx = = = .18856181
n 18
x −  12.9 − 12.5
t= = = 2.121
sx .18856181
The value of the test statistic t = 2.121 falls between the
two critical points, -2.898 and 2.898, which is the
nonrejection region. Consequently, we fail to reject H0.
As a result, we can state the difference between the
hypothesized population mean and the sample mean is so
small that it may have occurred because of sampling error.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-8
The management at Massachusetts Savings Bank is always
concerned about the quality of service provided to its
customers. With the old computer system, a teller at this
bank could serve, on average, 22 customers per hour. The
management noticed that with this service rate, the waiting
time for customers was too long. Recently the management
of the bank installed a new computer system in the bank,
expecting that it would increase the service rate and
consequently make the customers happier by reducing the
waiting time.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-8
To check if the new computer system is more efficient than
the old system, the management of the bank took a
random sample of 70 hours and found that during these
hours the mean number of customers served by tellers was
27 per hour with a standard deviation of 2.5. Testing at the
1% significance level, would you conclude that the new
computer system is more efficient than the old computer
system?

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-8: Solution
Step 1: H0 : μ = 22 H1 : μ > 22
Step 2: The population standard deviation σ is not known and
the sample size is large (n > 30). Consequently, we will use the
t distribution to perform the test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-8: Solution
Step 3: Significance level = .01. The > sign in the
alternative hypothesis indicates that the test is right-tailed
and the rejection region lies in the right tail.
Area in the right tail = α = .01.
df = n – 1 = 70 – 1 = 69.
The critical value for t for 69 df and .01 area in the right tail
is 2.382.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.14

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-8: Solution
Step 4:
s 2.5
sx = = = .29880715
n 70
x − 27 − 22
t= = = 16.733
sx .29880715

The value of the test statistic t = 16.733 is greater than the


critical value of t = 2.382, and it falls in the rejection
region. Consequently, we reject H0. As a result, we
conclude that the value of the sample mean is too large
compared to the hypothesized value of the population
mean, and the difference between the two may not be
attributed to chance alone.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Tests of Hypothesis for μ Using the t Distribution
What If the Sample Size Is Too Large?

1. Use the t value from the last row (the row of ∞) in Table
V of Appendix B.
2. Use the normal distribution as an approximation to the t
distribution.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
9.4 Hypothesis Tests About a Population Proportion: Large
Samples
Test Statistic
The value of the test statistic z for the sample proportion, p̂ ,
is computed as

pˆ − p pq
z= where  pˆ =
 pˆ n

The value of p that is used in this formula is the one from the
null hypothesis. The value of q is equal to 1 – p. The value of z
calculated for p̂ using the above formula is also called the
observed value of z.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-9
According to a Gallup poll conducted February 4 to March 7,
2014, 20% of traditional college graduates (those who earned
their degree before age 25) were emotionally attached to their
alma mater (www.gallup.com). Suppose this result is true for
the 2014 population of traditional college graduates. In a
recent random sample of 2000 traditional college graduates,
22% said that they are emotionally attached to their alma
mater. Find the p-value to test the hypothesis that the current
percentage of traditional college graduates who are
emotionally attached to their alma mater is different from
20%. What is your conclusion if the significance level is 5%?

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-9: Solution
Step 1: H0 : p = .20 H1 : p ≠ .20
Step 2: To check whether the sample is large, we calculate the
values of np and nq:
np = 2000(.20) = 400 > 5
nq = 2300(.80) = 1600 > 5
Consequently, we will use the normal distribution to find the
p-value for this test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-9: Solution
Step 3: The ≠ sign in the alternative hypothesis indicates
that the test is two-tailed.

𝑝𝑞 .20 (.80)
𝜎𝑝ො = = = .00894427
𝑛 2000
𝑝Ƹ − 𝑝 .22 − .20
𝑧= = = 2.24
𝜎𝑝ො .00894427

p-value = 2(.01250) = .0250

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.15 The Required p-Value

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-9: Solution
Step 4: We can state that for any α greater than .0749 we
will reject the null hypothesis. For our example, α = .025,
which is less than the p-value of .0479. As a result, we fail
to reject H0 and conclude that the machine does not need
aa adjustment.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-10
When working properly, a machine that is used to make
chips for calculators does not produce more than 4%
defective chips. Whenever the machine produces more
than 4% defective chips, it needs an adjustment. To check
if the machine is working properly, the quality control
department at the company often takes samples of chips
and inspects them to determine if they are good or
defective. One such random sample of 200 chips taken
recently from the production line contained 12 defective
chips. Find the p-value to test the hypothesis whether or
not the machine needs an adjustment. What would your
conclusion be if the significance level is 2.5%?

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-10: Solution
Step 1: H0: p ≤ .04 H1: p > .04
Step 2: To check whether the sample is large, we calculate
the values of np and nq:
np = 200(.04) = 8 > 5
nq = 200(.96) = 192 > 5
Consequently, we will use the normal distribution to find the
p-value for this test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-10: Solution
Step 3: The > sign in the alternative hypothesis indicates
that the test is right-tailed.

pq (.04)(.96)
 pˆ = = = .01385641
n 200
pˆ − p .06 − .04
z= = = 1.44
 pˆ .01385641

p-value = .0749

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.16 The Required p-Value

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-10: Solution
Step 4: We can state that for any α greater than .0749 we
will reject the null hypothesis, and for any α less than or
equal to .0749 we will not reject the null hypothesis. For
our example, α = .025, which is less than the p-value of
.0749. As a result, we fail to reject H0 and conclude that the
machine does not need an adjustment.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-11
Refer to Example 9–9. According to a Gallup poll conducted
February 4 to March 7, 2014, 20% of traditional college
graduates (those who earned their degree before age 25)
were emotionally attached to their alma mater
(www.gallup.com). Suppose this result is true for the 2014
population of traditional college graduates. In a recent
random sample of 2000 traditional college graduates, 22%
said that they are emotionally attached to their alma mater.
Using a 5% significance level, can you conclude that the
current percentage of traditional college graduates who are
emotionally attached to their alma mater is different from
20%?

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-11: Solution
Step 1: H0 : p = .20 H1 : p ≠ .20
Step 2: To check whether the sample is large, we calculate the
values of np and nq:
np = 2000(.20) = 400 > 5
nq = 2000(.80) = 1600 > 5
Consequently, we will use the normal distribution to find the
p-value for this test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-11: Solution
Step 3: The ≠ sign in the alternative hypothesis indicates that
the test is two-tailed.
The significance level = .05. Therefore, the total area of the
two rejection regions is .05, and the rejection region in each
tail of the sampling distribution is α /2 = .05/2 = .025.
The critical values of z, obtained from the standard normal
distribution table, are -1.96 and 1.96, as shown in Figure
9.17.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.17 The Critical Values of z

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-11: Solution
Step 4:
𝑝𝑞 .20 (.80)
𝜎𝑝ො = = = .00894427
𝑛 2000
𝑝Ƹ − 𝑝 .22 − .20
𝑧= = = 2.24
𝜎𝑝ො .00894427

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-11: Solution
Step 5: The value of the test statistic z = 2.24 falls in the
rejection region. As a result, we reject H0 and conclude that
the current percentage of traditional college graduates who
are emotionally attached to their alma mater is different
from .20. Consequently, we can state that the difference
between the hypothesized population proportion of .20 and
the sample proportion of .22 is too large to be attributed to
sampling error alone when α = .05.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-12
Direct Mailing Company sells computers and computer parts
by mail. The company claims that at least 90% of all orders
are mailed within 72 hours after they are received. The
quality control department at the company often takes
samples to check if this claim is valid. A recently taken
sample of 150 orders showed that 129 of them were mailed
within 72 hours. Do you think the company’s claim is true?
Use a 2.5% significance level.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-12: Solution
Step 1: H0 : p ≥ .90 H1 : p < .90
Step 2: To check whether the sample is large, we calculate
the values of np and nq:
np = 150(.90) = 135 > 5
nq = 150(.10) = 15 > 5
Consequently, we will use the normal distribution to make
the test.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-12: Solution
Step 3: Significance level = .025. The < sign in the
alternative hypothesis indicates that the test is left-tailed,
and the rejection region leis in the left tail.
The critical values of z for .0250 area in the left tail is -1.96.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Figure 9.18 The Critical Values of z

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-12: Solution
Step 4:

pq (.90)(.10)
 pˆ = = = .02449490
n 150
pˆ − p .86 − .90
z= = = −1.63
 pˆ .02449490

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
Example 9-12: Solution
Step 5: The value of test statistic z = -1.63 is greater than
the critical value of z = -1.96, and it falls in the
nonrejection region. Therefore, we fail to reject H0. We can
state that the difference between the sample proportion and
the hypothesized value of the population proportion is
small, and this difference may have occurred owing to the
chance alone.

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
TI-84

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
TI-84

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
TI-84

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
TI-84

Prem Mann, Introductory Statistics, 9/E


Copyright © 2015 John Wiley & Sons. All rights reserved.
- Sir Choy
Introductory Statistics
Tenth Edition
Prem Mann

Chapter 10
Estimation and Hypothesis Testing: Two
Populations
This slide deck contains animations. Please disable animations if they cause issues with your device.
Copyright ©2021 John Wiley & Sons, Inc.
10.1 Inferences About the Difference Between
Two Population Means for Independent Samples:
σ1 and σ2 Known
• Independent versus Dependent Samples
• Mean, Standard Deviation, and Sampling Distribution
of x1 − x2
• Interval Estimation of μ1 – μ2
• Hypothesis Testing About μ1 – μ2

Copyright ©2021 John Wiley & Sons, Inc. 2


Independent versus Dependent Samples

Definition
Two samples drawn from two populations are
independent if the selection of one sample from one
population does not affect the selection of the second
sample from the second population. Otherwise, the
samples are dependent.

Copyright ©2021 John Wiley & Sons, Inc. 3


Example 10-1

Suppose we want to estimate the difference between the


mean salaries of all male and all female executives. To do
so, we draw two samples, one from the population of male
executives and another from the population of female
executives. These two samples are independent because
they are drawn from two different populations, and the
samples have no effect on each other.

Copyright ©2021 John Wiley & Sons, Inc. 4


Example 10-2

Suppose we want to estimate the difference between the


mean weights of all participants before and after a weight
loss program. To accomplish this, suppose we take a
sample of 40 participants and measure their weights
before and after the completion of this program. Note that
these two samples include the same 40 participants. This
is an example of two dependent samples.

Copyright ©2021 John Wiley & Sons, Inc. 5


Mean, Standard Deviation, and Sampling
Distribution of x1 − x2
Three conditions:
1. The two samples are independent
2. The standard deviations σ1 and σ2 of the two populations are
known
3. At least one of the following two conditions is fulfilled:
i. Both samples are large (i.e., n1 ≥ 30 and n2 ≥ 30)
ii. If either one or both sample sizes are small, then both
populations from which the samples are drawn are normally
distributed
Then the sampling distribution of x1 − x2 is (approximately)
normally distributed.

Copyright ©2021 John Wiley & Sons, Inc. 6


Figure 10.1

Copyright ©2021 John Wiley & Sons, Inc. 7


Sampling Distribution, Mean, and Standard
Deviation of x1 − x2
When the conditions listed on the previous page are
satisfied, the sampling distribution of x1 − x2 is
(approximately) normal with its mean and standard
deviation as follows:

 12  22
 x − x = 1 − 2 and  x − x = +
1 2 1 2
n1 n2

Copyright ©2021 John Wiley & Sons, Inc. 8


Confidence Interval for μ1 – μ2 (1 of 2)

When using the normal distribution, the (1–α)100%


confidence interval for μ1 – μ2 is
(𝑥lj 1 − 𝑥lj 2 ) ± 𝑧 ∙ 𝜎𝑥lj 1 −𝑥lj 2

The value of z is obtained from the normal distribution


table for the given confidence level. The value of
 x1 − x2 is calculated as explained earlier. Here x1 − x2
is the point estimator of μ1 – μ2

Copyright ©2021 John Wiley & Sons, Inc. 9


Example 10-3 (1 of 2)

An economist wanted to know the mean ages of current


male and female CEOs of U.S. companies with at least
200 employees. She took a random sample of 60 such
male CEOs and found that their mean age was 52 years.
Another random sample of 45 such female CEOs selected
by her produced their mean age of 56 years. Assume that
the population standard deviations for the ages of such
male and female CEOs are 6 and 5 years, respectively.

Copyright ©2021 John Wiley & Sons, Inc. 10


Example 10-3 (2 of 2)

Let μ1 and μ2 be the mean ages of all such male and female
CEOs, respectively.
a) What is the point estimate of μ1 – μ2?
b) Construct a 97% confidence interval for μ1 – μ2.

Copyright ©2021 John Wiley & Sons, Inc. 11


Example 10-3: Solution (1 of 3)

a) Point estimate of μ1 – μ2 = the value of x1 − x2

Thus, Point estimate of μ1 – μ2 = 52 − 56 = −4 years

Copyright ©2021 John Wiley & Sons, Inc. 12


Example 10-3: Solution (2 of 3)

b)

12  22 (6) 2 (5) 2


 x1 − x2 = + = + = 1.0749677 years
n1 n2 60 45

Copyright ©2021 John Wiley & Sons, Inc. 13


Example 10-3: Solution (3 of 3)

b) 97% confidence level. The value of z is 2.17


(𝑥lj 1 − 𝑥lj 2 ) ± 𝑧 ∙ σ(𝑥lj 1 −𝑥lj 2 )
= (52 − 56) ± 2.17(1.0749677)
= −4 ± 2.33 = −6.33 to 1.67 years

Thus, with 97% confidence we can state that the difference


between the mean ages of male and female CEOs of all U.S.
companies with at least 200 employees is between −6.33 and
−1.67 years, which means that all such male CEOs may be
younger than all such female CEOs by 1.67 to 6.33 years.
The value z x − x = 2.33 years is called the margin of error for
1 2

this estimate.
Copyright ©2021 John Wiley & Sons, Inc. 14
Hypothesis Testing About μ1 – μ2 (1 of 6)

1. Testing an alternative hypothesis that the means of two


populations are different is equivalent to μ1 ≠ μ2, which
is the same as μ1 − μ2 ≠ 0.

Copyright ©2021 John Wiley & Sons, Inc. 15


Hypothesis Testing About μ1 – μ2 (2 of 6)

2. Testing an alternative hypothesis that the mean of the


first population is greater than the mean of the second
population is equivalent to μ1 > μ2, which is the same
as μ1 − μ2 > 0.

Copyright ©2021 John Wiley & Sons, Inc. 16


Hypothesis Testing About μ1 – μ2 (3 of 6)

3. Testing an alternative hypothesis that the mean of the


first population is less than the mean of the second
population is equivalent to μ1 < μ2, which is the same
as μ1 − μ2 < 0.

Copyright ©2021 John Wiley & Sons, Inc. 17


Hypothesis Testing About μ1 – μ2 (4 of 6)

Test Statistic z for x1 − x2


When using the normal distribution, the value of the test
statistic z for x1 − x2 is computed as
( x1 − x2 ) − ( 1 − 2 )
z=
 x −x
1 2

The value of μ1 – μ2 is substituted from H0. The value of


 x − x is calculated as earlier in this section.
1 2

Copyright ©2021 John Wiley & Sons, Inc. 18


Example 10-4

An economist wanted to know the mean ages of current


male and female CEOs of U.S. companies with at least
200 employees. She took a random sample of 60 such
male CEOs and found that their mean age was 52 years.
Another random sample of 45 such female CEOs selected
by her produced their mean age of 56 years. Assume that
the population standard deviations for the ages of such
male and female CEOs are 6 and 5 years, respectively.
Test at a 1% significance level if the population means for
such male and female CEOs are different.

Copyright ©2021 John Wiley & Sons, Inc. 19


Example 10-4: Solution (1 of 5)

Step 1:
H0: μ1 – μ2 = 0 (The two population means are not different.)
H1: μ1 – μ2 ≠ 0 (The two population means are different.)

Copyright ©2021 John Wiley & Sons, Inc. 20


Example 10-4: Solution (2 of 5)

Step 2:
Population standard deviations, σ1 and σ2, are known
Both samples are large; n1 > 30 and n2 > 30
Therefore, we use the normal distribution to perform
the hypothesis test.

Copyright ©2021 John Wiley & Sons, Inc. 21


Example 10-4: Solution (3 of 5)

Step 3:
α = .01.
The ≠ sign in the alternative hypothesis indicates that
the test is two-tailed
Area in each tail = α / 2 = .01 / 2 = .005
The critical values of z are 2.58 and −2.58

Copyright ©2021 John Wiley & Sons, Inc. 22


Figure 10.2

Copyright ©2021 John Wiley & Sons, Inc. 23


Example 10-4: Solution (4 of 5)

Step 4:

12  22 (6) 2 (5) 2


 x1 − x2 = + = + = 1.0749677 years
n1 n2 60 45

Copyright ©2021 John Wiley & Sons, Inc. 24


Example 10-4: Solution (5 of 5)
Step 5:
Because the value of the test statistic z = −3.72 falls in the rejection
region, we reject the null hypothesis H0. Therefore, we conclude
that the evidence from the sample data supports the decision that the
mean ages of male and female CEOs of U.S. companies with at
least 200 employees are different.

−3.72

Copyright ©2021 John Wiley & Sons, Inc. 25


10.2 Inferences About the Difference Between
Two Population Means for Independent Samples:
σ1 and σ2 Unknown but Equal
• Interval Estimation of μ1 – μ2
• Hypothesis Testing About μ1 – μ2

Copyright ©2021 John Wiley & Sons, Inc. 26


Pooled Standard Deviation for Two Samples

The pooled standard deviation for two samples is


computed as
(n1 − 1) s12 + (n2 − 1) s22
sp =
n 1 + n2 − 2

where n1 and n2 are the sizes of the two samples and


s12 and s22 are the variances of the two samples,
respectively. Here sp is an estimator of σ.

Copyright ©2021 John Wiley & Sons, Inc. 27


Estimator of the Standard Deviation of x1 − x2

Estimator of the Standard Deviation of x1 − x2


The estimator of the standard deviation of x1 − x2 is

1 1
sx1 − x2 = s p +
n1 n2

Copyright ©2021 John Wiley & Sons, Inc. 28


Interval Estimation of μ1 – μ2

Confidence Interval for μ1 – μ2


The (1 – α)100% confidence interval for μ1 – μ2 is
( x1 − x2 )  ts x1 − x2
where the value of t is obtained from the t distribution
table for the given confidence level and n1 + n2 – 2
degrees of freedom, and sx1 − x2 is calculated as explained
earlier.

Copyright ©2021 John Wiley & Sons, Inc. 29


Example 10-5 (1 of 2)
A consumer agency wanted to estimate the difference in the
mean amounts of caffeine in two brands of coffee. The agency
took a sample of 15 one-pound jars of Brand I coffee that
showed the mean amount of caffeine in these jars to be 80
milligrams per jar with a standard deviation of 5 milligrams.
Another sample of 12 one-pound jars of Brand II coffee gave a
mean amount of caffeine equal to 77 milligrams per jar with a
standard deviation of 6 milligrams.

Copyright ©2021 John Wiley & Sons, Inc. 30


Example 10-5 (2 of 2)

Construct a 95% confidence interval for the difference


between the mean amounts of caffeine in one-pound jars
of these two brands of coffee. Assume that the two
populations are normally distributed and that the standard
deviations of the two populations are equal.

Copyright ©2021 John Wiley & Sons, Inc. 31


Example 10-5: Solution (1 of 2)

(n1 − 1) s12 + (n2 − 1) s22 (15 − 1)(5) 2 + (12 − 1)(6) 2


sp = =
n1 + n2 − 2 15 + 12 − 2
= 5.46260011
1 1 1 1
sx1 − x2 = s p + = (5.46260011) + = 2.11565593
n1 n2 15 12

Copyright ©2021 John Wiley & Sons, Inc. 32


Example 10-5: Solution (2 of 2)

Area in each tail =  2 = .5 −(.95/2) = .025


Degrees of freedom = n1 + n2 − 2 = 25
t = 2.060
( x1 − x2 )  ts x1 − x2 = (80 − 77)  2.060(2.11565593)
= 3 ± 4.36
= −1.36 to 7.36 milligrams

Copyright ©2021 John Wiley & Sons, Inc. 33


Hypothesis Testing About μ1 – μ2 (5 of 6)

Test Statistic t for x1 − x2


The value of the test statistic t for x1 − x2 is computed as
( x1 − x2 ) − ( 1 − 2 )
t=
S x1 − x2

The value of μ1 – μ2 in this formula is substituted from


the null hypothesis and S x − x is calculated as
1 2

explained earlier.

Copyright ©2021 John Wiley & Sons, Inc. 34


Example 10-6 (1 of 2)

A sample of 14 cans of Brand I diet soda gave the mean


number of calories of 23 per can with a standard deviation
of 3 calories. Another sample of 16 cans of Brand II diet
soda gave the mean number of calories of 25 per can with
a standard deviation of 4 calories.

Copyright ©2021 John Wiley & Sons, Inc. 35


Example 10-6 (2 of 2)

At the 1% significance level, can you conclude that the


mean number of calories per can are different for these
two brands of diet soda? Assume that the calories per can
of diet soda are normally distributed for each of the two
brands and that the standard deviations for the two
populations are equal.

Copyright ©2021 John Wiley & Sons, Inc. 36


Example 10-6: Solution (1 of 5)

Step 1:
H0: μ1 – μ2 = 0
(The mean numbers of calories are not different.)
H1: μ1 – μ2 ≠ 0
(The mean numbers of calories are different.)

Copyright ©2021 John Wiley & Sons, Inc. 37


Example 10-6: Solution (2 of 5)

Step 2:
• The two samples are independent.
• The σ1 and σ2 are unknown but equal.
• The sample sizes are small but both populations are
normally distributed.
• We will use the t distribution.

Copyright ©2021 John Wiley & Sons, Inc. 38


Example 10-6: Solution (3 of 5)

Step 3:
The ≠ sign in the alternative hypothesis indicates that
the test is two-tailed.
α = .01.
Area in each tail =  / 2 = .01/ 2 = .005
df = n1 + n2 – 2 = 14 + 16 – 2 = 28
Critical values of t are -2.763 and 2.763.

Copyright ©2021 John Wiley & Sons, Inc. 39


Figure 10.3

Copyright ©2021 John Wiley & Sons, Inc. 40


Example 10-6: Solution (4 of 5)
Step 4:

(n1 − 1) s12 + (n2 − 1) s22 (14 − 1)(3) 2 + (16 − 1)(4) 2


sp = = = 3.57071421
n1 + n2 − 2 16 + 16 − 2
1 1 1 1
sx1 − x2 = s p + = (3.57071421) + = 1.30674760
n1 n2 14 16
( x1 − x2 ) − ( 1 − 2 ) (23 − 25) − 0
t= = = −1.531
sx1 − x2 1.30674760

Copyright ©2021 John Wiley & Sons, Inc. 41


Example 10-6: Solution (5 of 5)
Step 5:
The value of the test statistic t = −1.531
o It falls in the nonrejection region.
Therefore, we fail to reject the null hypothesis.

Consequently, we conclude that there is no difference in the


mean numbers of calories per can for the two brands of diet
soda.

−1.531
Copyright ©2021 John Wiley & Sons, Inc. 42
Example 10-7 (1 of 2)

A sample of 40 children from New York State showed that


the mean time they spend watching television is 28.50
hours per week with a standard deviation of 4 hours.
Another sample of 35 children from California showed
that the mean time spent by them watching television is
23.25 hours per week with a standard deviation of 5 hours.

Copyright ©2021 John Wiley & Sons, Inc. 43


Example 10-7 (2 of 2)

Using a 2.5% significance level, can you conclude that the


mean time spent watching television by children in New
York State is greater than that for children in California?
Assume that the standard deviations for the two
populations are equal.

Copyright ©2021 John Wiley & Sons, Inc. 44


Example 10-7: Solution (1 of 5)

Step 1:
H0: μ1 – μ2 = 0
H1: μ1 – μ2 > 0

Copyright ©2021 John Wiley & Sons, Inc. 45


Example 10-7: Solution (2 of 5)

Step 2:
• The two samples are independent.
• Standard deviations of the two populations are
unknown but assumed to be equal.
• Both samples are large.
• We use the t distribution to make the test.

Copyright ©2021 John Wiley & Sons, Inc. 46


Example 10-7: Solution (3 of 5)

Step 3:
α = .025
Area in the right tail of the t distribution = α = .025
df = n1 + n2 – 2 = 40 + 35 – 2 = 73
Critical value of t is 1.993

Copyright ©2021 John Wiley & Sons, Inc. 47


Figure 10.4

Copyright ©2021 John Wiley & Sons, Inc. 48


Example 10-7: Solution (4 of 5)
Step 4:

(n1 − 1) s12 + (n2 − 1) s22 (40 − 1)(4) 2 + (35 − 1)(5) 2


sp = = = 4.49352655
n1 + n2 − 2 40 + 35 − 2
1 1 1 1
sx1 − x2 = s p + = (4.49352655) + = 1.04004930
n1 n2 40 35
( x1 − x2 ) − ( 1 − 2 ) (28.50 − 23.25) − 0
t= = = 5.048
sx1 − x2 1.04004930

Copyright ©2021 John Wiley & Sons, Inc. 49


Example 10-7: Solution (5 of 5)
Step 5:
The value of the test statistic t = 5.048.
o It falls in the rejection region.
Therefore, we reject the null hypothesis H0

Hence, we conclude that children in New York State spend


more time, on average, watching TV than children in
California.

5.048
Copyright ©2021 John Wiley & Sons, Inc. 50
10.3 Inferences About the Difference Between
Two Population Means for Independent Samples:
σ1 and σ2 Unknown and Unequal
• Interval Estimation of μ1 – μ2
• Hypothesis Testing About μ1 – μ2

Copyright ©2021 John Wiley & Sons, Inc. 51


Degrees of Freedom for an Inference about
μ1 – μ2 (1 of 2)

Degrees of Freedom If
1. The two samples are independent
2. The standard deviations σ1 and σ2 of the two populations are
unknown and unequal
3. At least one of the following two conditions is fulfilled:
i. Both samples are large (i.e., n1 ≥ 30 and n2 ≥ 30)
ii. If either one or both sample sizes are small, then both
populations from which the samples are drawn are normally
distributed… (continued on next slide)

Copyright ©2021 John Wiley & Sons, Inc. 52


Degrees of Freedom for an Inference about
μ1 – μ2 (2 of 2)
Degrees of Freedom
then the t distribution is used to make inferences about μ1 – μ2
and the degrees of freedom for the t distribution are given by
2
s s  2 2

 + 
1 2

df =  12 2 
n n
2
 s1 
2
 s2 
2

   
 1 + 2
n n
n1 − 1 n2 − 1

The number given by this formula is always rounded


down for df.
Copyright ©2021 John Wiley & Sons, Inc. 53
Estimate of the Standard Deviation of x1 − x2

Estimator of the Standard Deviation of x1 − x2


The value of S x − x , is calculated as
1 2

s12 s22
S x1 − x2 = +
n1 n2

Copyright ©2021 John Wiley & Sons, Inc. 54


Confidence Interval for μ1 – μ2 (2 of 2)

The (1 – α)100% confidence interval for μ1 – μ2 is

( x1 − x2 )  ts x1 − x2

where the value of t is obtained from the t distribution


table for a given confidence level and the degrees of
freedom are given by the formula mentioned earlier.

Copyright ©2021 John Wiley & Sons, Inc. 55


Example 10-8 (1 of 2)

According to Example 10-5 of Section 10.2.1, a sample of


15 one-pound jars of coffee of Brand I showed that the
mean amount of caffeine in these jars is 80 milligrams per
jar with a standard deviation of 5 milligrams. Another
sample of 12 one-pound coffee jars of Brand II gave a
mean amount of caffeine equal to 77 milligrams per jar
with a standard deviation of 6 milligrams.

Copyright ©2021 John Wiley & Sons, Inc. 56


Example 10-8 (2 of 2)

Construct a 95% confidence interval for the difference


between the mean amounts of caffeine in one-pound
coffee jars of these two brands. Assume that the two
populations are normally distributed and that the standard
deviations of the two populations are not equal.

Copyright ©2021 John Wiley & Sons, Inc. 57


Example 10-8: Solution (1 of 2)

s12 s22 (5) 2 (6) 2


sx1 − x2 = + = + = 2.16024690
n1 n2 15 12
Area in each tail =  /2 = .025
2 2
 s12 s22   (5) 2 (6) 2 
 +   + 
df =  12 2  2 =  
n n 15 12
2
= 21.42  21
2 2
 s1   s2 
2 2
 (5)   (6) 
2

       
 1 + 2
n n  15  + 12 
n1 − 1 n2 − 1 15 − 1 12 − 1

Copyright ©2021 John Wiley & Sons, Inc. 58


Example 10-8: Solution (2 of 2)

t = 2.080
( x1 − x2 )  tsx1 − x2 = (80 − 77)  2.080(2.16024690)

= 3 ± 4.49 = −1.49 to 7.49

Copyright ©2021 John Wiley & Sons, Inc. 59


Hypothesis Testing About μ1 – μ2 (6 of 6)
Test Statistic t for x1 − x2

The value of the test statistic t for x1 − x2 is computed as


( x1 − x2 ) − ( 1 − 2 )
t=
sx1 − x2
The value of μ1 – μ2 in this formula is substituted from the
null hypothesis and s x1 − x2 is calculated as explained earlier.

Copyright ©2021 John Wiley & Sons, Inc. 60


Example 10-9 (1 of 2)

According to Example 10-6 of Section 10.2.2, a sample of


14 cans of Brand I diet soda gave the mean number of
calories per can of 23 with a standard deviation of 3
calories. Another sample of 16 cans of Brand II diet soda
gave the mean number of calories as 25 per can with a
standard deviation of 4 calories.

Copyright ©2021 John Wiley & Sons, Inc. 61


Example 10-9 (2 of 2)

Test at the 1% significance level whether the mean


numbers of calories per can of diet soda are different for
these two brands. Assume that the calories per can of diet
soda are normally distributed for each of these two brands
and that the standard deviations for the two populations
are not equal.

Copyright ©2021 John Wiley & Sons, Inc. 62


Example 10-9: Solution (1 of 6)

Step 1:
H0: μ1 – μ2 = 0
(The mean numbers of calories are not different)
H1: μ1 – μ2 ≠ 0
(The mean numbers of calories are different)

Copyright ©2021 John Wiley & Sons, Inc. 63


Example 10-9: Solution (2 of 6)

Step 2:
• The two samples are independent.
• Standard deviations of the two populations are
unknown and unequal.
• Both populations are normally distributed.
• We use the t distribution to make the test.

Copyright ©2021 John Wiley & Sons, Inc. 64


Example 10-9: Solution (3 of 6)

Step 3:
The ≠ in the alternative hypothesis indicates that the
test is two-tailed.
α = .01
Area in each tail =  / 2 = .01/ 2 = .005
The critical values of t are −2.771 and 2.771

Copyright ©2021 John Wiley & Sons, Inc. 65


Example 10-9: Solution (4 of 6)

2 2
s 2
s 
2
 (3) (4)  2 2

 
1 2
+  + 
df =  12 2  2 =  
n n 14 16
2
= 27.41  27
2 2
 s1   s2 
2 2
 (3)   (4) 
2

       
 1 + 2
n n  15  + 12 
n1 − 1 n2 − 1 14 − 1 16 − 1

Copyright ©2021 John Wiley & Sons, Inc. 66


Figure 10.5

Copyright ©2021 John Wiley & Sons, Inc. 67


Example 10-9: Solution (5 of 6)
Step 4:

s12 s22 (3)2 (14)2


s x1 − x2 = + = + = 1.28173989
n1 n2 14 16
( x1 − x2 ) − ( μ1 − μ2 ) (23 − 25) − 0
t= = = −1.560
s x1 − x2 1.28173989

Copyright ©2021 John Wiley & Sons, Inc. 68


Example 10-9: Solution (6 of 6)
Step 5:
The test statistic t = −1.560
o It falls in the nonrejection region.
Therefore, we fail to reject the null hypothesis.

Hence, there is no difference in the mean numbers of calories


per can for the two brands of diet soda.

-1.56

Copyright ©2021 John Wiley & Sons, Inc. 69


Copyright

Copyright © 2021 John Wiley & Sons, Inc.


All rights reserved. Reproduction or translation of this work beyond that permitted in
Section 117 of the 1976 United States Act without the express written permission of the
copyright owner is unlawful. Request for further information should be addressed to the
Permissions Department, John Wiley & Sons, Inc. The purchaser may make back-up
copies for his/her own use only and not for distribution or resale. The Publisher assumes
no responsibility for errors, omissions, or damages, caused by the use of these programs or
from the use of the information contained herein.

Copyright ©2021 John Wiley & Sons, Inc. 70

You might also like