Chapter 5
Chapter 5
GTNI
Chapter 5
Hypothesis Testing
◼ population mean
Example: The mean monthly cell phone bill
of this city is μ = $42
◼ population proportion
Example: The proportion of adults in this
city with cell phones is p = .68
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-3
The Null Hypothesis, H0
H0 : μ = 3 H0 : X = 3
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-4
The Null Hypothesis, H0
(continued)
proven guilty
◼ Refers to the status quo
◼ Always contains “=” , “≤” or “” sign
◼ May or may not be rejected
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-5
The Alternative Hypothesis, H1
◼ Is the opposite of the null hypothesis
◼ e.g., The average number of TV sets in U.S.
homes is not equal to 3 ( H1: μ ≠ 3 )
◼ Challenges the status quo
◼ Never contains the “=” , “≤” or “” sign
◼ May or may not be supported
◼ Is generally the hypothesis that the
researcher is trying to support
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-6
Hypothesis Testing Process
Claim: the
population
mean age is 50.
(Null Hypothesis:
Population
H0: μ = 50 )
Now select a
random sample
Is X= 20 likely if μ = 50?
If not likely, Suppose
the sample
REJECT mean age Sample
Null Hypothesis is 20: X = 20
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc.
Reason for Rejecting H0
Sampling Distribution of X
X
20 μ = 50
If H0 is true
... then we
If it is unlikely that
reject the null
we would get a
... if in fact this were hypothesis that
sample mean of
the population mean… μ = 50.
this value ...
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-8
Level of Significance,
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-9
Level of Significance
and the Rejection Region
Level of significance = Represents
critical value
H0: μ = 3 /2 /2
H1: μ ≠ 3 Rejection
Two-tail test 0 region is
shaded
H0: μ ≤ 3
H1: μ > 3
Upper-tail test 0
H0: μ ≥ 3
H1: μ < 3
Lower-tail test 0
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-10
How to make a decision
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-11
Errors in Making Decisions
◼ Type I Error
◼ Reject a true null hypothesis
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-12
Errors in Making Decisions
(continued)
◼ Type II Error
◼ Fail to reject a false null hypothesis
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-13
Outcomes and Probabilities
Actual Situation
Decision H0 True H0 False
Do Not
No error Type II Error
Reject
Key: (1 - ) (β)
Outcome H0
(Probability) Reject Type I Error No Error
H0 () (1-β)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-14
Type I & II Error Relationship
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-15
Hypothesis Tests for the Mean
Hypothesis
Tests for
Known Unknown
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-16
Test of Hypothesis
for the Mean (σ Known)
◼ Convert sample result ( x ) to a z value
Hypothesis
Tests for
σ Known σ Unknown
Alternate rule:
Reject H0 if X μ0 + Z ασ/ n
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-19
p-Value Approach to Testing
(continued)
◼ Convert sample result (e.g., x ) to test statistic (e.g., z
statistic )
◼ Obtain the p-value x - μ0
◼ For an upper
p - value = P(Z , given that H0 is true)
σ/ n
tail test:
x - μ0
= P(Z | μ = μ0 )
σ/ n
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-21
Example: Find Rejection Region
(continued)
◼ Suppose that = .10 is chosen for this test
= .10
x − μ0
Reject H0 if z = 1.28
σ/ n
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-22
Example: Sample Results
(continued)
x − μ0 53.1 − 52
z= = = 0.88
σ 10
n 64
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-23
Example: Decision
(continued)
Reach a decision and interpret the result:
Reject H0
= .10
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-26
Upper-Tail Tests
Critical value
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-27
Lower-Tail Tests
H0: μ ≥ 3
◼ There is only one H1: μ < 3
critical value, since
the rejection area is
in only one tail
μ x
Critical value
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-28
Two-Tail Tests
◼ In some settings, the H0: μ = 3
alternative hypothesis does
H1: μ 3
not specify a unique direction
/2 /2
◼ There are two
critical values,
3 x
defining the two
Reject H0 Do not reject H0 Reject H0
regions of
-z/2 0 +z/2 z
rejection
Lower Upper
critical value critical value
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-29
Hypothesis Testing Example
Test the claim that the true mean # of TV
sets in US homes is equal to 3.
(Assume σ = 0.8)
◼ State the appropriate null and alternative
hypotheses
◼ H0: μ = 3 , H1: μ ≠ 3 (This is a two tailed test)
◼ Specify the desired level of significance
◼ Suppose that = .05 is chosen for this test
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-30
Hypothesis Testing Example
(continued)
= .05/2 = .05/2
-z = -1.96 0 +z = +1.96
-2.0
Since z = -2.0 < -1.96, we reject the null hypothesis
and conclude that there is sufficient evidence that the
mean number of TVs in US homes is not equal to 3
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-33
Example: p-Value
◼ Example: How likely is it to see a sample mean of
2.84 (or something further from the mean, in either
direction) if the true mean is = 3.0?
x = 2.84 is translated to
a z score of z = -2.0
P(z −2.0) = .0228 /2 = .025 /2 = .025
.0228 .0228
P(z 2.0) = .0228
p-value
= .0228 + .0228 = .0456 -1.96 0 1.96 Z
-2.0 2.0
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-34
Example: p-Value
(continued)
◼ Compare the p-value with
◼ If p-value < , reject H0
◼ If p-value , do not reject H0
σ Known σ Unknown
x − μ0 x − μ0
Reject H0 if t = − t n-1, α/2 or if t = t n-1, α/2
s s
n n
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-37
Example: Two-Tail Test
( Unknown)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-38
Example Solution:
Two-Tail Test
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-39
Example
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-40
Solution
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-41
Solution
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 10-42
Matched Pairs
Tests Means of 2 Related Populations
Matched ◼ Paired or matched samples
Pairs ◼ Repeated measures (before/after)
◼ Use difference between paired values:
di = xi - yi
◼ Assumptions:
◼ Both Populations Are Normally Distributed
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 11-43
Test Statistic: Matched Pairs
The test statistic for the mean
Matched difference is a t value, with
Pairs n – 1 degrees of freedom:
d − D0
t=
sd
n
Where
D0 = hypothesized mean difference
sd = sample standard dev. of differences
n = the sample size (number of pairs)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 11-44
Decision Rules: Matched Pairs
Paired Samples
Lower-tail test: Upper-tail test: Two-tail test:
H0: μx – μy 0 H0: μx – μy ≤ 0 H0: μx – μy = 0
H1: μx – μy < 0 H1: μx – μy > 0 H1: μx – μy ≠ 0
/2 /2
R.K. 0 0 0 n −1
M.O. 4 0 - 4
-21 = 5.67
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 11-46
Matched Pairs: Solution
◼ Has the training made a difference in the number of
complaints (at the = 0.01 level)?
Reject Reject
H0: μx – μy = 0
H1: μx – μy 0
/2 /2
= .01 d = - 4.2 - 4.604 4.604
- 1.66
Critical Value = ± 4.604
d.f. = n - 1 = 4
Decision: Do not reject H0
(t stat is not in the reject region)
Test Statistic:
Conclusion: There is not a
d − D 0 − 4.2 − 0
t= = = − 1.66 significant change in the
s d / n 5.67/ 5 number of complaints.
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 11-47
Key Concept
In Part 1 we discuss situations in which the standard
deviations of the two populations are unknown and are
not assumed to be equal.
In Part 2 we discuss two other situations: (1) The two
population standard deviations are both known; (2) the
two population standard deviations are unknown but are
assumed to be equal.
Because is typically unknown in real situations, most
attention should be given to the methods described in
Part 1.
Part 1: Independent Samples
with σ1 and σ2 Unknown and Not
Assumed Equal
Definitions
Height of
175 180 173 176 178
Husband
Height of
160 165 163 162 166
Wife
Notation
μ1 = population mean
n
x1 = size of the first sample
1
= sample mean
( x1 − x2 ) − ( 1 − 2 )
t=
2 2
s s
1
+ 2
n1 n2
Requirement check:
The data:
Creativity
Scores
Red
Background
n = 35 x = 3.39 s = 0.97
Blue
n = 36 x = 3.97 s = 0.63
Background
Example
H 0 : 1 = 2
H1 : 1 2
( x1 − x2 ) − ( 1 − 2 )
t=
2 2
s s
+ 1 2
n1 n2
(3.39 − 3.97) − 0
= = −2.979
2 2
0.97 0.63
+
35 36
Example
Step 6: Because we are using a t distribution,
the critical value of t = –2.441 is found from
Table A-3. We use 34 degrees of freedom.
Example
( x1 − x2 ) − ( 1 − 2 )
z=
12 22
+
n1 n2
A manager of a large grocery store chain believes that happy employees are
more productive than unhappy ones. He randomly samples 60 of his grocery
checkout clerks and classifies them into one of two groups: those who smile a
lot (Group 1) and those who don’t (Group 2). After sorting the random sample,
there just happens to be 30 in each group.
He then examines their productivity scores (based on how quickly and
accurately they’re able to assist customers) and gets the following data for
each group:
Group 1 score mean: 33.3
Group 2 score mean: 14.4
The population of productivity scores is normally distributed with a standard
deviation of 17.32, which is assumed to be the population standard deviation
that applies both to Group 1 and Group 2.
Conduct an appropriate test to see whether a difference in productivity levels
exists between the two groups among all employees, using α = 0.05.
Solution