Professional Documents
Culture Documents
Fundamentals of hypothesis
testing: One sample tests
BB113 Statistics and its applications
Jan. – Apr. 2020
Textbook: Chapter 9
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 1
Objectives
𝐻0 : 𝜇 = 330 𝐻0 : 𝑋ത = 330
𝐻1 : 𝜇 ≠ 𝜇0 Two-tailed test
𝐻0 : 𝜇 = 4.5 minutes
𝐻1 : 𝜇 ≠ 4.5 minutes
Population
Sample
Sampling
Distribution of X
X
20 μ = 50
If H0 is true ... then you reject
If it is unlikely that you
the null hypothesis
would get a sample
that μ = 50.
mean of this value ... ... When in fact this were
the population mean…
Region of Region of
Rejection Rejection
Region of
Non-Rejection
Critical Values
◼ Type I Error:
◼ Reject the null hypothesis, when it is true and should
not be rejected.
◼ A type I error is a “false alarm.”
◼ The probability of a Type I Error is 𝛼.
◼ Called level of significance of the test.
◼ Set by researcher in advance.
◼ Type II Error:
◼ Do not reject the null hypothesis, when it is false and
should be rejected.
◼ Type II error represents a “missed opportunity” to take
some corrective action.
◼ The probability of a Type II Error is 𝛽.
Actual Situation
30
Critical values
Rejection Region
Rejection region
• The set of values for the test statistic that leads to rejection of
the null hypothesis
Nonrejection region
• The set of values for the test statistic that leads to nonrejection
of the null hypothesis
Critical value(s)
• The value(s) of the test statistic that separate the rejection and
nonrejection regions.
• A critical value is considered part of the rejection region
◼ Remember
◼ If the p-value is low then H0 must go.
Hypothesis
Tests for
Known Unknown
(Z test) (t test)
σKnown
Known σUnknown
Unknown
(Z test) (t test)
The test statistic is:
X −μ
ZSTAT =
σ
n
-Zα/2 0 +Zα/2 Z
Lower Upper
critical critical
value value
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 37
Left-Tailed Tests
DCOVA
𝑯𝟎 : 𝝁 = 𝝁𝟎
◼ There is one
𝑯𝟏 : 𝝁 < 𝝁𝟎
cutoff value
(critical value),
defining the
regions of 𝛼
rejection.
𝜇0 X
Reject H0 Do not reject H0
-Zα 0 Z
Lower
critical
value
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 38
Right-Tailed Tests
DCOVA
𝑯𝟎 : 𝝁 = 𝝁𝟎
◼ There is one
𝑯𝟏 : 𝝁 > 𝝁𝟎
cutoff value
(critical value),
defining the
regions of 𝛼
rejection.
𝜇0 X
Do not reject H0 Reject H0
0 +Zα Z
Upper
critical
value
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 39
Hypothesis Testing Example 1
DCOVA
◼ In 2005, the mean retail price of all history books
was $78.01.
◼ This year, the mean retail price for 40 randomly
selected history books is $81.44.
◼ At 1% significance level, do the data provide
sufficient evidence to conclude that this year’s
mean retail price of all history books has increased
from the 2005 mean of $78.01?
◼ Assume that the population standard deviation of
prices for this year’s history books is $7.61.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 40
Hypothesis Testing Example 1
DCOVA
Step 1: State the null and alternative hypotheses.
Let 𝜇 denote this year’s mean retail price for all history
books.
𝐻0 : 𝜇 = $78.01 (mean price has not increased)
𝐻1 : 𝜇 > $78.01 (mean price has increased)
0.01
Z
0 2.33
Do not reject H0 Reject H0
From step 3, 𝑧𝑆𝑇𝐴𝑇 = 2.85 > 2.33, the value falls in the
rejection, we reject 𝐻0 .
58.4658 ≤ 𝜇 ≤ 60.5862
◼ Probably not!
◼ In virtually all real world business situations,
σ is not known.
◼ If there is a situation where σ is known then
µ is also known (since to calculate σ you
need to know µ.)
◼ If you truly know µ there would be no need to
gather a sample to estimate it.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 62
Hypothesis Testing for the Mean:
σ Unknown
DCOVA
◼ If the population standard deviation is unknown,
you instead use the sample standard deviation S.
◼ Because of this change, you use the t distribution
instead of the Z distribution to test the null
hypothesis about the mean.
◼ When using the t distribution you must assume
the population you are sampling from follows a
normal distribution.
◼ All other steps, concepts, and conclusions are the
same.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 63
t Test of Hypothesis for the Mean
(σ Unknown) DCOVA
◼ Convert sample statistic ( X ) to a tSTAT test statistic
Hypothesis
Tests for
σKnown
Known σUnknown
Unknown
(Z test) (t test)
The test statistic is:
X −μ
t STAT =
S
n
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 64
Critical Value Approach to
Hypothesis Testing (𝜎 unknown)
Graphical display of rejection regions for two-tailed, left-
tailed, and right-tailed tests
Data
Null Hypothesis µ= $ 168.00
Level of Significance 0.05
Sample Size 25
Sample Mean $ 172.50
Sample Standard Deviation $ 15.40
Intermediate Calculations
Standard Error of the Mean $ 3.08 =B8/SQRT(B6)
Degrees of Freedom 24 =B6-1
t test statistic 1.46 =(B7-B4)/B11
Two-Tail Test
p-value > α Lower Critical Value
Upper Critical Value
-2.0639
2.0639
=-T.INV.2T(B5,B12)
=T.INV.2T(B5,B12)
So do not reject H0 p-value 0.157 =T.DIST.2T(ABS(B13),B12,2)
Do Not Reject Null Hypothesis =IF(B18<B5, "Reject null hypothesis",
"Do not reject null hypothesis")
166.14 ≤ μ ≤ 178.86
Reject H0
= .10
0
Do not reject Reject
H0 1.318 H0
tSTAT = .55
Data
Null Hypothesis µ= 52.00
Level of Significance 0.1
Sample Size 25
Sample Mean 53.10
Sample Standard Deviation 10.00
Intermediate Calculations
Standard Error of the Mean 2.00 =B8/SQRT(B6)
Degrees of Freedom 24 =B6-1
t test statistic 0.55 =(B7-B4)/B11
DCOVA
◼ Sample proportion in the category of interest is
denoted by 𝑝.Ƹ
◼ The sampling
distribution of p is Hypothesis
approximately Tests for p
normal, so the test
statistic is a ZSTAT
value: np 5 np < 5
and or
𝑝Ƹ − 𝑝 n(1-p) 5 n(1-p) < 5
𝑍𝑆𝑇𝐴𝑇 =
𝑝(1 − 𝑝)
𝑛 Not discussed
in this chapter
◼ An equivalent form
to the last slide, Hypothesis
but in terms of the Tests for X
number in the
category of
interest, X: X5 X<5
and or
𝑋 − 𝑛𝑝 n-X 5 n-X < 5
𝑍𝑆𝑇𝐴𝑇 =
𝑛𝑝(1 − 𝑝)
Not discussed
in this chapter
DCOVA
Calculate the p-value and compare to
(For a two-tail test the p-value is always two-tail.)
Do not reject H0
Reject H0 Reject H0 p-value = 0.0136:
/2 = .025 /2 = .025
P(Z −2.47) + P(Z 2.47)
0.0068 0.0068
= 2(0.0068) = 0.0136
-1.96 0 1.96
Z = -2.47 Z = 2.47