Note 9
Note 9
Hypothesis Testing
1
Hypothesis Testing
Researchers are interested in answering many types of
questions. For example,
Is the earth warming up?
Does a new medication lower blood pressure?
Does the public prefer a certain color in a new fashion line?
Is a new teaching technique better than a traditional one?
Do seat belts reduce the severity of injuries?
These types of questions can be addressed through
statistical hypothesis testing, which is a decision-making
process for evaluating claims about a population.
2
Steps in Hypothesis Testing
3
Steps in Hypothesis Testing
4
Situation A
A medical researcher is interested in finding out whether
a new medication will have any undesirable side effects.
The researcher is particularly concerned with the pulse
rate of the patients who take the medication. Will the
pulse rate increase, decrease, or remain unchanged
after a patient takes the medication? The researcher
knows that the mean pulse rate for the population under
study is 82 beats per minute.
The hypotheses for this situation are
H 0 : 82 H1 : 82
This is called a two-tailed hypothesis test.
5
Situation B
A chemist invents an additive to increase the life of an
automobile battery. The mean lifetime of the automobile
battery without the additive is 36 months.
H 0 : 36 H1 : 36
This is called a right-tailed (upper-tailed, one-tailed,
one-sided) hypothesis test.
6
Situation C
A contractor wishes to lower heating bills by using a
special type of insulation in houses. If the average of the
monthly heating bills is $78, her hypotheses about
heating costs with the use of insulation are
H 0 : 78 H1 : 78
7
Claim
When a researcher conducts a study, he or she is
generally looking for evidence to support a claim.
Therefore, the claim should be stated as the alternative
hypothesis, or research hypothesis.
8
Hypothesis Testing
After stating the hypotheses, the
researcher’s next step is to design the
study. The researcher selects the
correct statistical test, chooses an
appropriate level of significance, and
formulates a plan for conducting the
study.
9
Hypothesis Testing
A statistical test uses the data
obtained from a sample to make a
decision about whether the null
hypothesis should be rejected.
The numerical value obtained from a
statistical test is called the test value.
In the hypothesis-testing situation,
there are four possible outcomes.
10
Hypothesis Testing
In reality, the null hypothesis may or may
not be true, and a decision is made to
reject or not to reject it on the basis of
the data obtained from a sample.
A type I error occurs if one rejects the
null hypothesis when it is true.
A type II error occurs if one does not
reject the null hypothesis when it is false.
11
Hypothesis Testing
12
Hypothesis Testing
The level of significance is the
maximum probability of committing a
type I error. This probability is
symbolized by a (alpha). That is,
P(type I error) = a.
Likewise,
P(type II error) = b (beta).
13
Hypothesis Testing
Typical significance levels are:
0.10, 0.05, and 0.01
14
Hypothesis Testing
Null Hypothesis(“=”)v.s. Alternative Hypothesis(claim)
16
The critical value method
17
Hypothesis Testing
The critical value, C.V., separates the critical region
from the noncritical region.
18
z Test for a Mean
The z test is a statistical test for the mean of a population.
It can be used when n 30, or when the population is
normally distributed and is known.
The formula for the z test is
X
z
n
where
X = sample mean
μ = hypothesized population mean
= population standard deviation
n = sample size
19
Hypothesis Testing
Finding the Critical Value for α = 0.01 (Right-Tailed Test)
20
Hypothesis Testing
Finding the Critical Value for α = 0.01 (Left-Tailed Test)
Because of symmetry,
z = –2.33 for α = 0.01 (Left-Tailed Test)
21
Hypothesis Testing
Finding the Critical Value for α = 0.01 (Two-Tailed Test)
z = ±2.58
22
Example: Days on Dealers’ Lots
A researcher wishes to see if the mean number of days
that a basic, low-price, small automobile sits on a dealer’s
lot is 29. A sample of 30 automobile dealers has a mean
of 30.1 days for basic, low-price, small automobiles.
23
Example: Days on Dealers’ Lots
Step 1 State the hypotheses and identify the claim.
24
Example: Days on Dealers’ Lots
Step 4 Make the decision. Since the test value, +1.59,
is less than the critical value, +1.65, and is not
in the critical region, the decision is to not reject
the null hypothesis.
25
Example: Days on Dealers’ Lots
Step 5 Summarize the results.
26
Important Comments
Even though in the above Example the sample
mean of 30.1 is higher than the hypothesized
population mean of 29, it is not significantly higher.
27
Example: Cost of Men’s Shoes
A researcher claims that the average cost of men’s athletic
shoes is less than $80. He selects a random sample of 36
pairs of shoes from a catalog and finds the following costs
(in dollars). (The costs have been rounded to the nearest
dollar.) Is there enough evidence to support the
researcher’s claim at α = 0.10? Assume = 19.2.
60 70 75 55 80 55 50 40 80 70 50 95
120 90 75 85 80 60 110 65 80 85 85 45
75 60 90 90 60 95 110 85 45 90 70 70
28
Example: Cost of Men’s Shoes
A researcher claims that the average cost of men’s athletic
shoes is less than $80. He selects a random sample of 36
pairs of shoes from a catalog and finds the following costs
(in dollars). (The costs have been rounded to the nearest
dollar.) Is there enough evidence to support the
researcher’s claim at α = 0.10? Assume = 19.2.
60 70 75 55 80 55 50 40 80 70 50 95
120 90 75 85 80 60 110 65 80 85 85 45
75 60 90 90 60 95 110 85 45 90 70 70
29
Example: Cost of Men’s Shoes
A researcher claims that the average cost of men’s athletic
shoes is less than $80. He selects a random sample of 36
pairs of shoes from a catalog and finds the following costs
(in dollars). (The costs have been rounded to the nearest
dollar.) Is there enough evidence to support the
researcher’s claim at α = 0.10? Assume = 19.2.
X 75 80
z 1.56
n 19.2 36
30
Example: Cost of Men’s Shoes
Step 4: Make the decision.
Since the test value, –1.56, falls in the critical
region, the decision is to reject the null
hypothesis.
31
Example: Cost of Men’s Shoes
32
Example: Cost of Rehabilitation
The Medical Rehabilitation Education Foundation reports
that the average cost of rehabilitation for stroke victims is
$24,672. To see if the average cost of rehabilitation is
different at a particular hospital, a researcher selects a
random sample of 35 stroke victims at the hospital and
finds that the average cost of their rehabilitation is
$26,343. The standard deviation of the population is
$3,251. At α = 0.01, can it be concluded that the average
cost of stroke rehabilitation at a particular hospital is
different from $24,672?
33
Example: Cost of Rehabilitation
Step 2: Find the critical value.
Since α = 0.01 and a two-tailed test, the critical
values are z = ±2.58.
34
Example: Cost of Rehabilitation
Step 4: Make the decision.
Reject the null hypothesis, since the test value
falls in the critical region.
35
The P-value method
36
Hypothesis Testing
The P-value (or probability value) is the probability of
getting a sample statistic (such as the mean) or a more
extreme sample statistic in the direction of the
alternative hypothesis when the null hypothesis is true.
P-Value
Test Value
37
Hypothesis Testing
In this section, the critical value method for
solving hypothesis-testing problems compares
z-values:
critical value
test value
P-value
38
Example: Cost of College Tuition
A researcher wishes to test the claim that the average
cost of tuition and fees at a four-year public college is
greater than $5700. She selects a random sample of 36
four-year public colleges and finds the mean to be $5950.
The population standard deviation is $659. Is there
evidence to support the claim at a 0.05? Use the P-value
method.
39
Example: Cost of College Tuition
Step 2: Compute the test value.
X 5950 5700
z 2.28
n 659 36
40
Example: Cost of College Tuition
Step 4: Make the decision.
Since the P-value is less than 0.05, the decision is
to reject the null hypothesis.
43
Example: Wind Speed
Step 4: Make the decision.
The decision is to not reject the null hypothesis,
since the P-value is greater than 0.05.
44
Guidelines for P-Values With No α
If P-value 0.01, reject the null hypothesis. The
difference is highly significant.
If P-value > 0.01 but P-value 0.05, reject the
null hypothesis. The difference is significant.
If P-value > 0.05 but P-value 0.10, consider
the consequences of type I error before
rejecting the null hypothesis.
If P-value > 0.10, do not reject the null
hypothesis. The difference is not significant.
45
Significance
The researcher should distinguish between
statistical significance and practical
significance.
When the null hypothesis is rejected at a
specific significance level, it can be concluded
that the difference is probably not due to chance
and thus is statistically significant. However, the
results may not have any practical significance.
It is up to the researcher to use common sense
when interpreting the results of a statistical test.
46
Significance
For example, suppose that a new fuel additive
increases the miles per gallon that a car can get
by 1/4 mile for a sample of 1000 automobiles.
47
t Test for a Mean
The t test is a statistical test for the mean of a population
and is used when the population is normally or
approximately normally distributed, is unknown.
The formula for the t test is
X
t
s n
The degrees of freedom are d.f. = n – 1.
48
Example: Substitute Salaries
An educator claims that the average salary of substitute
teachers in school districts in Allegheny County,
Pennsylvania, is less than $60 per day. A random sample of
eight school districts is selected, and the daily salaries (in
dollars) are shown. Is there enough evidence to support the
educator’s claim at α = 0.10? Assume the salary is normally
distributed.
60 56 60 55 70 55 60 55
X 58.88 60
t 0.624
s n 5.08 8
51
Example: Substitute Salaries
Step 4: Make the decision.
Do not reject the null hypothesis since –0.624 falls
in the noncritical region.
52
Example: Jogger’s Oxygen Uptake
A physician claims that joggers’ maximal volume oxygen
uptake is greater than the average of all adults. A sample
of 15 joggers has a mean of 40.6 milliliters per kilogram
(ml/kg) and a standard deviation of 6 ml/kg. If the average
of all adults is 36.7 ml/kg, is there enough evidence to
support the physician’s claim at α = 0.05? Assume the
data is approximately normally distributed.
54
55
Example : Jogger’s Oxygen Uptake
Step 4: Make the decision.
The decision is to reject the null hypothesis, since
the P-value < 0.05.
56
Whether to use z or t
57
z Test for a Proportion
Since a normal distribution can be used to approximate
the binomial distribution when np 5 and nq 5, the
standard normal distribution can be used to test
hypotheses for proportions.
The formula for the z test for a proportion is
pˆ p
z
pq n
where
X
pˆ sample proportion
n
p population proportion
n sample size
58
Example: Avoiding Trans Fats
A dietician claims that 60% of people are trying to avoid
trans fats in their diets. She randomly selected 200 people
and found that 128 people stated that they were trying to
avoid trans fats in their diets. At α = 0.05, is there enough
evidence to reject the dietitian’s claim?
59
Example: Avoiding Trans Fats
Step 3: Compute the test value.
X 128
pˆ 0.64
n 200
pˆ p 0.64 0.60
z 1.15
pq n 0.60 0.40 200
60
Example: Avoiding Trans Fats
Step 4: Make the decision.
Do not reject the null hypothesis since the test
value falls outside the critical region.
61
Example: Family/Medical Leave Act
The Family and Medical Leave Act provides job protection
and unpaid time off from work for a serious illness or birth
of a child.
A sample of 100 people who used the leave said that 53%
found it easy to use the leave. At α = 0.01, has the
percentage changed?
62
Example 8-18: Family/Medical Leave Act
Step 1 State the hypotheses and identify the claim.
63
Example: Family/Medical Leave Act
Step 4 Make the decision. Do not reject the null
hypothesis, since the test value falls in the
noncritical region.
64
Example: Family/Medical Leave Act
Step 5 Summarize the results.
65
2 Test for a Variance or a Standard Deviation
2
n 1 s 2
2
with degrees of freedom d.f. = n – 1 and
n = sample size
s2 = sample variance
2 = population variance
66
Assumptions for the Test for a
2
67
Example: Variation of Test Scores
An instructor wishes to see whether the variation in scores
of the 23 students in her class is less than the variance of
the population. The variance of the class is 198. Is there
enough evidence to support the claim that the variation of
the students is less than the population variance (2 =225)
at α = 0.05? Assume that the scores are normally
distributed.
68
69
Example: Variation of Test Scores
Step 3: Compute the test value.
2 n 1 s 2
22 198
19.36
2
225
70
Example: Variation of Test Scores
Step 4: Make the decision.
Do not reject the null hypothesis since the test
value 19.36 falls in the noncritical region.
71
Example: Nicotine Content
A cigarette manufacturer wishes to test the claim that the
variance of the nicotine content of its cigarettes is 0.644.
Nicotine content is measured in milligrams, and assume
that it is normally distributed. A sample of 20 cigarettes
has a standard deviation of 1.00 milligram. At α = 0.05, is
there enough evidence to reject the manufacturer’s claim?
72
73
Example: Nicotine Content
Step 3: Compute the test value.
The standard deviation s must be squared in the
formula.
n 1 s 19 1.00
2 2
2
29.5
2
0.644
74
Example: Nicotine Content
Step 4: Make the decision.
Do not reject the null hypothesis, since the test
value falls in the noncritical region.
75
Additional Topics Regarding Hypothesis Testing
76
Example: Sugar Production
Sugar is packed in 5-pound bags. An inspector suspects
the bags may not contain 5 pounds. A sample of 50 bags
produces a mean of 4.6 pounds and a standard deviation
of 0.7 pound. Is there enough evidence to conclude that
the bags do not contain 5 pounds as stated at α = 0.05?
Also, find the 95% confidence interval of the true mean.
77
Example: Sugar Production
Step 3: Compute the test value.
X 4.6 5.0
t 4.04
s n 0.7 50
Step 4: Make the decision.
Since -4.04 < -2.010, the null hypothesis is
rejected.
78
Example: Sugar Production
The 95% confidence interval for the mean is
79
Power of a Statistical Test
The power of a test measures the sensitivity of
the test to detect a real difference in parameters if
one actually exists. The higher the power, the
more sensitive the test. The power is 1 – β.
80
Example: Days on Dealers’ Lots
A researcher wishes to see if the mean number of days
that a basic, low-price, small automobile sits on a dealer’s
lot is 29. A sample of 30 automobile dealers has a mean
of 30.1 days for basic, low-price, small automobiles.
81
Example: Days on Dealers’ Lots
Step 1 State the hypotheses and identify the claim.
82
Example: Days on Dealers’ Lots
Step 4 Make the decision. Since the test value, +1.59,
is less than the critical value, +1.65, and is not
in the critical region, the decision is to not reject
the null hypothesis.
83
Example: Days on Dealers’ Lots
Step 5 Summarize the results.
84
Power of a Statistical Test
We cannot compute β for : μ > 29 because the
true μ is unknown. We can only compute it when
μ is given. For example, if we know μ = 30, then
85
Power of a Statistical Test
Now we consider α = 0.1
86