Hypothesis Testing
Hypothesis Testing
Hypothesis test
• A process that uses sample statistics to test a claim
about the value of a population parameter.
• For example: An automobile manufacturer
advertises that its new hybrid car has a mean mileage
of 50 miles per gallon. To test this claim, a sample
would be taken. If the sample mean differs enough
from the advertised mean, you can decide the
advertisement is wrong.
Hypothesis Tests
Statistical hypothesis
• A statement, or claim, about a population parameter.
• Need a pair of hypotheses
• one that represents the claim
• the other, its complement
• When one of these hypotheses is false, the other must
be true.
Stating a Hypothesis
Actual Truth of H0
Decision H0 is true H0 is false
Do not reject H0 Correct Decision Type II Error
Reject H0 Type I Error Correct Decision
Level of significance
• Your maximum allowable probability of making a
type I error.
Denoted by α, the lowercase Greek letter alpha.
• By setting the level of significance at a small value,
you are saying that you want the probability of
rejecting a true null hypothesis to be small.
• Commonly used levels of significance:
α = 0.10 α = 0.05 α = 0.01
• P(type II error) = β (beta)
Statistical Tests
• After stating the null and alternative hypotheses and
specifying the level of significance, a random sample
is taken from the population and sample statistics are
calculated.
• The statistic that is compared with the parameter in
the null hypothesis is called the test statistic.
Population Test statistic Standardized test
parameter statistic
μ x z ( n ≥ 30)
t (n < 30)
p p̂ z
σ2 s2 χ2
P-values
z
–3 –2 –1 0 1 2 3
Test
statistic
Two-tailed Test
• The alternative hypothesis Ha contains the not-equal-
to symbol (≠). Each tail has an area of ½P.
H0: μ = k
Ha: μ ≠ k P is twice the
P is twice the area to area to the right
the left of the of the positive
negative standardized standardized test
test statistic. statistic.
z
–3 –2 –1 0 1 2 3
Test Test
statistic statistic
Example: Identifying The Nature of a Test
For each claim, state H0 and Ha. Then determine
whether the hypothesis test is a left-tailed, right-tailed,
or two-tailed test. Sketch a normal sampling distribution
and shade the area for the P-value.
1. A school publicizes that the proportion of its students
who are involved in at least one extracurricular activity
is 61%.
Solution:
H0: p = 0.61
Ha: p ≠ 0.61
Two-tailed test
Example: Identifying The Nature of a Test
For each claim, state H0 and Ha. Then determine
whether the hypothesis test is a left-tailed, right-tailed,
or two-tailed test. Sketch a normal sampling distribution
and shade the area for the P-value.
2. A car dealership announces that the mean time for an
oil change is less than 15 minutes.
Solution:
H0: μ ≥ 15 min P-value
area
Ha: μ < 15 min
z
-z 0
Left-tailed test
Example: Identifying The Nature of a Test
For each claim, state H0 and Ha. Then determine
whether the hypothesis test is a left-tailed, right-tailed,
or two-tailed test. Sketch a normal sampling distribution
and shade the area for the P-value.
3. A company advertises that the mean life of its
furnaces is more than 18 years.
Solution:
P-value
H0: μ ≤ 18 yr area
Ha: μ > 18 yr
z
z 0
Right-tailed test
Making a Decision
Decision Rule Based on P-value
• Compare the P-value with α.
If P ≤ α , then reject H0.
If P > α, then fail to reject H0.
Claim
Decision Claim is H0 Claim is Ha
There is enough evidence to There is enough evidence to
Reject H0 reject the claim support the claim
There is not enough evidence There is not enough evidence
Fail to reject H0 to reject the claim to support the claim
Example: Interpreting a Decision
You perform a hypothesis test for the following claim.
How should you interpret your decision if you reject
H0? If you fail to reject H0?
1. H0 (Claim): A school publicizes that the proportion
of its students who are involved in at least one
extracurricular activity is 61%.
Solution:
• The claim is represented by H0.
Solution: Interpreting a Decision
Solution:
• The claim is represented by Ha.
• H0 is “the mean time for an oil change is greater than
or equal to 15 minutes.”
Solution: Interpreting a Decision
Reject H0.
7. Write a statement to interpret the decision in the
context of the original claim.
Hypothesis Testing for the Mean (Large
Samples)
Objectives
2. α = 0.01?
Solution:
Because 0.0237 > 0.01, you should fail to reject the
null hypothesis.
Finding the P-value
P = 0.0129
z
-2.23 0
Because 0.0129 > 0.01, you should fail to reject H0.
Example: Finding the P-value
Find the P-value for a two-tailed hypothesis test with a
test statistic of z = 2.14. Decide whether to reject H0 if
the level of significance is α = 0.05.
Solution:
For a two-tailed test, P = 2(Area in tail of test statistic)
1 – 0.9838
P = 2(0.0162)
= 0.0162
0.9838 = 0.0324
z
0 2.14
Because 0.0324 < 0.05, you should reject H0.
Z-Test for a Mean μ
½α = 0.025 ½α = 0.025
z
–z0 = z–1.96
0 0 z0 =z01.96
No
s known ?
Yes Popul.
approx.
Yes normal
Use s to
No ?
estimate s
s known ?
No
Yes Use s to
estimate s
x x x x
z z z t Increase n
/ n s/ n / n s/ n to > 30
Determining the Sample Size
for a Hypothesis Test About a Population
Mean
( z z ) 2 2
n
( 0 a )2
where
z = z value providing an area of in the tail
z = z value providing an area of in the tail
= population standard deviation
0 = value of the population mean in H0
a = value of the population mean used for the
Type II error
Note: In a two-tailed hypothesis test, use z /2 not z
Problem
FTC periodically conducts statistical studies designed to
test the claims that the manufacturers make about their
products. Hill top coffee states that the can contains 3
pounds of coffee. Show how FTC can check Hilltop coffee
claim using hypothesis testing.
Suppose 36 samples of coffee cans provide sample mean
of 2.92 pounds with standard deviation of 0.18. and level of
significance is 1%.
The Golf Association establishes rules that
manufacturers of golf equipment must meet if their
products are to be acceptable.
Maxflight uses a high technology manufacturing process
to produce golf balls with a mean driving distance of
295 yards. Sometimes however the process gets out os
adjustment and produces golf balls with different mean
distance. The company worries about losses .
MaxFlight’s quality control program involves taking 50
golf balls to monitor the manufacturing process. sample
mean produced is 297.6 yards with standard deviation
12. the quality control team selected .05 as level of
significance. Conduct hypothesis testing .