Lecture 6 (Hypothesis Testing-One Sample T-Test)
Lecture 6 (Hypothesis Testing-One Sample T-Test)
Hypothesis Testing:
One-Sample Tests
Learning Outcomes
• population mean
Example: The mean monthly cell phone bill
in this city is μ = $42
• population proportion
H0 : μ = 30 H 0 : X = 30
The Null Hypothesis, H0
(continued)
Population
Sample
The Hypothesis Testing Process
(continued)
• Suppose the sample mean age was X = 20.
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…
The Test Statistic and Critical Values
Region of Region of
Rejection Rejection
Region of
Non-Rejection
Critical Values
Actual Situation
• β when
• β when σ
• β when n
Level of Significance and the Rejection Region
H0: μ = 30 Level of significance =
H1: μ ≠ 30
/2 /2
30
Critical values
Rejection Region
Hypothesis
Tests for
Known Unknown
(Z test) (t test)
Z Test of Hypothesis for the Mean (σ Known)
• Convert sample statistic ( X ) to a ZSTAT test statistic
Hypothesis
Tests for
σKnown
Known σUnknown
Unknown
(Z test) (t test)
The test statistic is:
X −μ
ZSTAT =
σ
n
Critical Value Approach to Testing
-Zα/2 0 +Zα/2 Z
Lower Upper
critical critical
value value
6 Steps in Hypothesis Testing
1. State the null hypothesis, H0 and the alternative
hypothesis, H1
2. Choose the level of significance, , and the sample size,
n
3. Determine the appropriate test statistic and sampling
distribution
4. Determine the critical values that divide the rejection
and nonrejection regions
6 Steps in Hypothesis Testing
(continued)
= 0.05/2 = 0.05/2
• Remember
• If the p-value is low then H0 must go
The 5 Step p-value approach to Hypothesis Testing
4. Collect data and compute the value of the test statistic and the p-
value
X − μ 29.84 − 30 − 0.16
Z STAT = = = = −2.0
σ 0.8 0.08
n 100
p-Value Hypothesis Testing Example:
Calculating the p-value
(continued)
0 Z
-2.0 2.0
p-value = 0.0228 + 0.0228 = 0.0456
p-value Hypothesis Testing Example
(continued)
0.8 0.8
29.84 - (1.96) to 29.84 + (1.96)
100 100
29.6832 ≤ μ ≤ 29.9968
• If you truly know µ there would be no need to gather a sample to estimate it.
Hypothesis Testing:
σ Unknown
• If the population standard deviation is unknown, you instead
use the sample standard deviation S.
σKnown
Known σUnknown
Unknown
(Z test) (t test)
The test statistic is:
X −μ
t STAT =
S
n
Example: Two-Tail Test
( Unknown)
The average cost of a hotel
room in New York is said to be
$168 per night. To determine if
this is true, a random sample of
25 hotels is taken and resulted
in an X of $172.50 and an S of
$15.40. Test the appropriate
hypotheses at = 0.05. H0: μ = 168
H1: μ 168
(Assume the population distribution is normal)
Example Solution:
Two-Tail t Test
166.14 ≤ μ ≤ 178.86
μ X
Critical value
Upper-Tail Tests
H0: μ ≤ 3
◼ There is only one
critical value, since H1: μ > 3
the rejection area is
in only one tail
Critical value
Example: Upper-Tail t Test
for Mean ( unknown)
A phone industry manager thinks that
customer monthly cell phone bills have
increased, and now average over $52 per
month. The company wishes to test this claim.
(Assume a normal population)
= 0.10
X−μ 53.1 − 52
t STAT = = = 0.55
S 10
n 25
Example: Decision (continued)
= 0.10
Reject H0
= .10
0
Do not reject Reject
H0 1.318 H0
tSTAT = .55