Tests of Hypothesis
Tests of Hypothesis
Tests of Hypothesis
1
Hypothesis Tests
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.
2
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.
3
Stating a Hypothesis
5
Example: Stating the Null and Alternative
Hypotheses
Write the claim as a mathematical sentence. State the null
and alternative hypotheses and identify which represents
the claim.
1. A university publicizes that the proportion of its
students who graduate in 4 years is 82%.
Solution:
H0: p = 0.82 Equality condition (Claim)
Ha: p ≠ 0.82 Complement of H0
6
Example: Stating the Null and Alternative
Hypotheses
Write the claim as a mathematical sentence. State the null
and alternative hypotheses and identify which represents
the claim.
2. A water faucet manufacturer announces that the mean
flow rate of a certain type of faucet is less than 2.5
gallons per minute.
Solution:
H0: μ ≥ 2.5 gallons per minute Complement of Ha
Ha: μ < 2.5 gallons per minute Inequality
(Claim)
condition
7
Example: Stating the Null and Alternative
Hypotheses
Write the claim as a mathematical sentence. State the null
and alternative hypotheses and identify which represents
the claim.
3. A cereal company advertises that the mean weight of
the contents of its 20-ounce size cereal boxes is more
than 20 ounces.
Solution:
H0: μ ≤ 20 ounces Complement of Ha
Ha: μ > 20 ounces Inequality
(Claim)
condition
8
Types of Errors
9
Types of Errors
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
10
Level of Significance
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)
11
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
12
Nature of the Test
13
Left-tailed Test
• The alternative hypothesis Ha contains the less-than
inequality symbol (<).
H0: μ k
Ha: μ < k
P is the area to
the left of the
test statistic.
z
-3 -2 -1 0 1 2 3
Test
statistic
14
Right-tailed Test
• The alternative hypothesis Ha contains the greater-
than inequality symbol (>).
H0: μ ≤ k
Ha: μ > k P is the area
to the right
of the test
statistic.
z
-3 -2 -1 0 1 2 3
Test
statistic
15
Two-tailed Test
• The alternative hypothesis Ha contains the not equal
inequality symbol (≠). Each tail has an area of ½P.
H0: μ = k
Ha: μ k
P is twice the
P is twice the
area to the right
area to the left of
of the positive
the negative test
test statistic.
statistic.
z
-3 -2 -1 0 1 2 3
Test Test
statistic statistic 16
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 university publicizes that the proportion of its
students who graduate in 4 years is 82%.
Solution:
H0: p = 0.82 ½ P-value ½ P-value
Ha: p ≠ 0.82 area area
z
Two-tailed test -z 0 z
17
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 water faucet manufacturer announces that the
mean flow rate of a certain type of faucet is less than
2.5 gallons per minute.
Solution:
H0: μ ≥ 2.5 gpm P-value
area
Ha: μ < 2.5 gpm
z
-z 0
Left-tailed test
18
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 cereal company advertises that the mean weight of
the contents of its 20-ounce size cereal boxes is
more than 20 ounces.
Solution:
P-value
H0: μ ≤ 20 oz area
Ha: μ > 20 oz
z
0 z
Right-tailed test
19
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.
20
Example: Interpreting a Decision
21
Solution: Interpreting a Decision
22
Example: Interpreting a Decision
24
Steps for Hypothesis Testing
1. State the claim mathematically and verbally. Identify
the null and alternative hypotheses.
H0: ? Ha: ?
2. Specify the level of significance. This sampling distribution
α= ? is based on the assumption
that H0 is true.
3. Determine the standardized
sampling distribution and
draw its graph. z
0
4. Calculate the test statistic
and its standardized value.
Add it to your sketch. 0
z
Test statistic
25
Steps for Hypothesis Testing
Reject H0.
7. Write a statement to interpret the decision in the
context of the original claim.
26
Using P-values to Make a Decision
27
Example: Interpreting a P-value
The P-value for a hypothesis test is P = 0.0237. What is
your decision if the level of significance is
1. 0.05?
Solution:
Because 0.0237 < 0.05, you should reject the null
hypothesis.
2. 0.01?
Solution:
Because 0.0237 > 0.01, you should fail to reject the
null hypothesis.
28
Finding the P-value
29
Example: Finding the P-value
Find the P-value for a left-tailed hypothesis test with a
test statistic of z = -2.23. Decide whether to reject H0 if
the level of significance is α = 0.01.
Solution:
For a left-tailed test, P = (Area in left tail)
P = 0.0129
z
-2.23 0
Because 0.0129 > 0.01, you should fail to reject H0
30
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
31
Z-Test for a Mean μ
32
Using P-values for a z-Test for Mean μ
In Words In Symbols
1. State the claim mathematically State H0 and Ha.
and verbally. Identify the null
and alternative hypotheses.
2. Specify the level of significance. Identify .
3. Determine the standardized test x
z
statistic. n
4. Find the area that corresponds Use Table
to z.
33
Using P-values for a z-Test for Mean μ
In Words In Symbols
5. Find the P-value.
a. For a left-tailed test, P = (Area in left tail).
b. For a right-tailed test, P = (Area in right tail).
c. For a two-tailed test, P = 2(Area in tail of test
statistic).
6. Make a decision to reject or Reject H0 if P-value
fail to reject the null hypothesis. is less than or equal
to . Otherwise,
fail to reject H0.
7. Interpret the decision in the
context of the original claim.
34
Example: Hypothesis Testing Using P-
values
In an advertisement, a pizza shop claims that its mean
delivery time is less than 30 minutes. A random
selection of 36 delivery times has a sample mean of
28.5 minutes and a standard deviation of 3.5 minutes. Is
there enough evidence to support the claim at = 0.01?
Use a P-value.
35
Solution: Hypothesis Testing Using P-
values
37
Rejection Regions and Critical Values
Finding Critical Values in a Normal Distribution
1. Specify the level of significance .
2. Decide whether the test is left-, right-, or two-tailed.
3. Find the critical value(s) z0. If the hypothesis test is
a. left-tailed, find the z-score that corresponds to an area
of ,
b. right-tailed, find the z-score that corresponds to an area
of 1 – ,
c. two-tailed, find the z-score that corresponds to ½ and
1 – ½.
4. Sketch the standard normal distribution. Draw a vertical
line at each critical value and shade the rejection region(s).
38
Example: Finding Critical Values
½α = 0.025 ½α = 0.025
z
-z0 = -1.96z0 0 z0 =z01.96
39
Decision Rule Based on Rejection
Region
To use a rejection region to conduct a hypothesis test,
calculate the standardized test statistic, z. If the
standardized test statistic
1. is in the rejection region, then reject H0.
2. is not in the rejection region, then fail to reject H0.
Fail to reject H0. Fail to reject Ho.
41
Using Rejection Regions for a z-Test for a
Mean μ
In Words In Symbols
x
6. Find the standardized test z or if n 30
statistic. n
use s.
7. Make a decision to reject or fail If z is in the rejection
to reject the null hypothesis. region, reject H0.
Otherwise, fail to
8. Interpret the decision in the reject H0.
context of the original claim.
42
Example: Testing with Rejection Regions
43
Solution: Testing with Rejection Regions
44
Example: Testing with Rejection Regions
45
Solution: Testing with Rejection Regions
50
Using the t-Test for a Mean μ
(Small Sample)
In Words In Symbols
1. State the claim mathematically State H0 and Ha.
and verbally. Identify the null
and alternative hypotheses.
2. Specify the level of significance. Identify .
3. Identify the degrees of freedom d.f. = n – 1.
and sketch the sampling
distribution.
4. Determine any critical value(s). Use Table
51
Using the t-Test for a Mean μ
(Small Sample)
In Words In Symbols
5. Determine any rejection
region(s).
x
6. Find the standardized test t
statistic. s n
53
Solution: Testing μ with a Small Sample
55
Solution: Testing μ with a Small Sample
-1.816
56
State the null and alternative hypotheses.
A company claims the mean lifetime of its
AA batteries is more than 16 hours.
Slide 7- 57 .
State the null and alternative hypotheses.
A company claims the mean lifetime of its
AA batteries is more than 16 hours.
Slide 7- 58 .
State the null and alternative hypotheses.
A student claims the mean cost of a
textbook is at least $125.
Slide 7- 59 .
State the null and alternative hypotheses.
A student claims the mean cost of a
textbook is at least $125.
Slide 7- 60 .
True or false:
Testing the claim that at least 88% of
students have a cell phone would be a
right-tail test.
A. True
B. False
Slide 7- 61 .
True or false:
Testing the claim that at least 88% of
students have a cell phone would be a
right-tail test.
H 0 : p 0.88
A. True H a : p 0.88
B. False
Slide 7- 62 .
You are testing the claim that the mean cost of a
new car is more than $25,200. How should you
interpret a decision that rejects the null
hypothesis?
A. There is enough evidence to reject the claim.
B. There is enough evidence to support the
claim.
C. There is not enough evidence to reject the
claim.
D. There is not enough evidence to support the
claim.
Slide 7- 63 .
You are testing the claim that the mean cost of a
new car is more than $25,200. How should you
interpret a decision that rejects the null
hypothesis?
A. There is enough evidence to reject the claim.
B. There is enough evidence to support the
claim.
C. There is not enough evidence to reject the
claim.
D. There is not enough evidence to support the
claim.
True or false:
Given H0: μ = 40 Ha: μ ≠ 40 and P = 0.0436.
You would reject the null hypothesis at the
0.05 level of significance.
A. True
B. False
Slide 7- 65 .
True or false:
Given H0: μ = 40 Ha: μ ≠ 40 and P = 0.0436.
You would reject the null hypothesis at the
0.05 level of significance.
A. True
B. False
p
Slide 7- 66 .
Find the critical value, z0, for a left-tailed
test at the 0.10 level of significance.
A. z0 = –1.645
B. z0 = 1.645
C. z0 = –1.28
D. z0 = 1.28
Slide 7- 67 .
Find the standardized test statistic z for the
following situation:
Claim: μ >15; x 13.6 s = 3.4 n = 40
A. z = 2.60
B. z = –2.60
C. z = –0.07
D. z = 12.90
Slide 7- 68 .
Find the standardized test statistic z for the
following situation:
Claim: μ >15; x 13.6 s = 3.4 n = 40
D. z = 12.90
Slide 7- 69 .
Find the critical value(s), t0, for a two-tailed
test, α = 0.05, and n = 8.
Slide 7- 70 .
Find the critical value(s), t0, for a two-tailed
test, α = 0.05, and n = 8.
Slide 7- 71 .
Find the standardized test statistic z for the
following situation:
Claim: p ≠ 0.23; x = 52 n = 200
A. z = 0.97
B. z = 1.01
C. z = 0.51
D. z = –1.01
Slide 7- 72 .
Find the standardized test statistic χ2 for
the following situation:
Claim: σ < 5.2; s = 4.47 n = 20
A. χ2 = 25.71
B. χ2 = 16.33
C. χ2 = 14.04
D. χ2 = 14.78
Slide 7- 73 .
Example 1.
An electrical company claims that the lives of the light bulbs it
manufactures are normally distributed with a mean of 1,000
hours and a standard deviation of 150 hours. What can you say
about this claim if a random sample of 100 bulbs produced by
this company has a mean life of 980 hours? Use a .05 level of
significance.
74
Solution:
H0: The average life of all the bulbs produced by
the firm is 1,000 hours
(μ=1,000)
H1: The average life of all the bulbs produced by
the firm is not equal to 1,000 hours (μ≠ 1,000).
Significance level: α =.05, two-tailed test
Test statistic: Z statistic
Critical region: z > 1.96 or z < -1.96
75
76
Example 2.
An instructor gives his class an achievement test
which, as he knows from years of experience,
yields a mean μ = 80. His present class of 40
obtains a mean of 85 and a standard deviation of
8. Can he claim that his present class is a superior
class? Employ α= .01.
77
78
Decision:
Since the computed value of z is greater than the
critical value 2.33, we may reject H0 and accept H1.
Therefore, the instructor is justified in assuming
that his present class is a superior class.
79
Example: 3.
A new production process is being considered to replace
the old process presently used. This new process was
tested for 8 consecutive hours with the following results:
80
Solution:
H0: The new process does not change the average
output per hour (μ=120).
H1: The new process increases the average output per
hour (μ >120).
Significance level: α= .01, one tailed-test
Test statistic T statistic with df = 8-1 = 7.
Critical region: t > 2.998
81
82