Test of Hypothesis: One-Sample Tests
Test of Hypothesis: One-Sample Tests
One-Sample Tests
Learning Objectives
H 0 : μ 30 H 0 : X 30
The Null Hypothesis, H0
Begin with the assumption that the null
hypothesis is true
Similar to the notion of innocent until
proven guilty
Population
Sample
The Hypothesis Testing
Process (continued)
Suppose the sample mean age was X = 20.
This is significantly lower than the claimed mean
population age of 50.
If the null hypothesis were true, the probability of
getting such a different sample mean would be
very small, so you reject the null hypothesis.
In other words, getting a sample mean of 20 is so
unlikely if the population mean was 50, you
conclude that the population mean must not be 50.
The Hypothesis Testing
Process (continued)
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
If the sample mean is close to the stated
population mean, the null hypothesis is not
rejected.
If the sample mean is far from the stated
population mean, the null hypothesis is rejected.
How far is “far enough” to reject H0?
The critical value of a test statistic creates a “line in
the sand” for decision making -- it answers the
question of how far is far enough.
The Test Statistic and
Critical Values
Sampling Distribution of the test statistic
Region of Region of
Rejection Rejection
Region of
Non-Rejection
Critical Values
Type I Error
Reject a true null hypothesis
Actual Situation
β when
β when σ
β when n
Level of Significance
and the Rejection Region
H0: μ = 30 Level of significance = a
H1: μ ≠ 30
a /2 a /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
For a two-tail test for the mean, σ known:
Convert sample statistic ( X ) to test statistic
(ZSTAT)
Determine the critical Z values for a specified
level of significance from a table or
computer
Decision Rule: If the test statistic falls in the
rejection region, reject H0 ; otherwise do not
reject H0
Two-Tail Tests
H0: μ = 30
There are two
cutoff values H1: μ ¹
(critical values), 30
defining the
regions of /2 /2
rejection
30 X
Reject H0 Do not reject H0 Reject H0
-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
1. State the null hypothesis, H0 and the alternative hypothesis,
H1
4. Collect data and compute the value of the test statistic and
the p-value
X μ 29.84 30 .16
ZSTAT 2.0
σ 0.8 0.08
n 100
p-Value Hypothesis Testing Example:
Calculating the p-value
4. (continued) Calculate the p-value.
How likely is it to get a ZSTAT of -2 (or something farther from the
mean (0), in either direction) if H0 is true?
0 Z
-2.0 2.0
p-value = 0.0228 + 0.0228 = 0.0456
p-value Hypothesis Testing
Example
(continued)
5. Is the p-value < α?
Since p-value = 0.0456 < α = 0.05 Reject H0
5. (continued) State the managerial conclusion
in the context of the situation.
There is sufficient evidence to conclude the average diameter
of a manufactured bolt is not equal to 30mm.
Connection Between Two-Tail Tests
and Confidence Intervals
For X = 29.84, σ = 0.8 and n = 100, the 95%
confidence interval is:
0.8 0.8
29.84 - (1.96) to 29.84 (1.96)
100 100
29.6832 ≤ μ ≤ 29.9968
Probably not!
σ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 H0: ______
$15.40. Test the appropriate
H1: ______
hypotheses at = 0.05.
(Assume the population distribution is normal)
Example Solution:
Two-Tail t Test
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 =-TINV(B5,B12)
2.0639 =TINV(B5,B12)
So do not reject H0 p-value 0.157 =TDIST(ABS(B13),B12,2)
Do Not Reject Null Hypothesis =IF(B18<B5, "Reject null hypothesis",
"Do not reject null hypothesis")
Example Two-Tail t Test Using A p-
value from Minitab
1
3
p-value > α
So do not reject H0
One-Sample T
4
Test of mu = 168 vs not = 168
166.14 ≤ μ ≤ 178.86
Critical value
Upper-Tail Tests
H0: μ ≤ 3
There is only one
critical value, since H1: μ > 3
the rejection area is
in only one tail a
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)
Reach a decision and interpret the result:
Reject H0
=
0.10
Reject H0
= .10
0
Do not reject Reject H0
H0 1.318
tSTAT = .55