Escolar Documentos
Profissional Documentos
Cultura Documentos
Hypothesis Test
Outline
4.1 Hypothesis Test for Population Mean
4.2 Hypothesis Test for Population Variance
Objectives
At the end of this chapter, the students should be able to
1. Formulate problems in the form of statistical hypothesis and test them.
2. Perform hypothesis test for population means and variances.
3. Understand Type I and Type II error for hypothesis testing.
Hypothesis Test
We can estimate a parameter from sample data by (1) a point estimator – a single
number or (2) a confidence interval – an entire interval of plausible values. Sometimes, our
objective is not estimating but to decide which of two contradictory claims about the
parameter is correct. The method to accomplish this statistical inference is called hypothesis
testing. Hypothesis testing is the process of testing the validity of the claim made on the
population parameter.
1
Hypothesis Test for One Population Mean, Difference between Two Population Means,
Mean Difference of Paired Samples
The following table shows the test statistic of the hypothesis test for one population
mean, difference between two population means and mean difference of paired samples.
2 2
H o : 1 − 2 = 0 + 2
1
n1 n2
variances, 12 and 22 are
known
Difference between means of
two normal distributions, t calc =
(x 1 )
− x 2 − (1 − 2 )
;
1 1
Sp +
H o : 1 − 2 = 0 n1 n 2
variances, 12 = 22 and
unknown
df = n1 + n2 − 2, sp =
(n1 − 1) s12 + (n2 − 1) s22
n1 + n2 − 2
Difference between means of
two normal distributions, t calc =
(x 1 )
− x 2 − (1 − 2 )
;
S12 S2 2
+
H o : 1 − 2 = 0 n1 n2
variances, 2 and
1
2 2
unknown
(s )
2
1
2
n1 + s22 n2
df =
(s ) + (s )
2 2 2 2
1 n1 2 n2
n1 − 1 n2 − 1
Mean difference for paired
samples from normal d − d
distributions, t calc = ; df = n − 1 where n is no. of pairs
sd
Ho : d = 0 n
2
4.1.1 One Population Mean
In Malaysia, the average IQ score of students is 101.5. The variable is normally distributed,
and the population standard deviation is 15. A teacher of a smart school thinks that the
average IQ of students in her school is higher than the average of 101.5. To prove her point,
she administers an IQ test to 30 randomly selected students. Among the sampled students,
the average IQ is 106.4. Based on these results, should the teacher accept or reject her
original hypothesis? Assume a significance level of 0.05.
Solution:
Step 1 Hypothesis:
𝐻𝑜 : 𝜇 = 101.5
𝐻1 : 𝜇 > 101.5
Step 5 Conclusion: There is enough evidence to accept the teacher’s original hypothesis
that the IQ of the smart students is higher than the national average IQ.
The mean sodium content of a certain brand of corn flakes is stated as 130 milligrams. An
experiment is conducted on the sodium content of 30 boxes of corn flakes of this brand. The
data (in milligrams) gives mean of 131 and standard deviation of 0.9. At 5% significance
level ( = 0.05 ), is there enough evidence to reject the claim that the mean sodium content
is 130 milligrams?
Solution:
Step 1 Hypothesis:
𝐻𝑜 : 𝜇 = 130
𝐻1 : 𝜇 ≠ 130
3
Step 3 Rejection area: Reject H0 if tcal −t / 2,n−1 = −2.045 or tcal t / 2,n−1 = 2.045
Step 5 Conclusion: There is enough evidence to reject the claim that mean sodium content
of this brand of corn flakes is 130 milligrams.
Note:
The following table shows the rejection area of the hypothesis test for one population
mean based on different alternative hypothesis (H1). Note that this guide on rejection area
also applies to the hypothesis test for difference between two population means and mean
difference of paired samples.
4
4.1.2 Difference between Two Population Means
A study using two random samples of 35 people each found that the average amount of time
those in the age group of 26-35 years spent per week on leisure activities was 39.6 hours,
and those in the age group of 46-55 years spent 35.4 hours. Assume that the population
standard deviation for those in the first age group found by previous studies is 6.3 hours, and
the population standard deviation of those in the second group found by previous studies
was 5.8 hours. At = 0.05 , can it be concluded that there is a significant difference in the
average times each group spends on leisure activities?
Solution:
Step 1 Hypothesis:
𝐻𝑜 : 𝜇1 − 𝜇2 = 0
𝐻1 : 𝜇1 − 𝜇2 ≠ 0
zcalc =
(x1 )
− x2 − ( 1 − 2 )
12 22
+
n1 n2
=
(39.6 − 35.4) − 0
6.32 5.82
+
35 35
= 2.90
Step 4 Decision:
Step 5 Conclusion:
There is enough evidence to support the claim that the average of the times
spent on leisure activities is different for the groups.
5
Example 4 Hypothesis Test for Difference between Two Population Means of a
Normal Distribution 1 − 2 ( Variances 12 = 22 and Variances are Unknown )
A study is done on the telephone bills of the employees in two different departments in a
company, which are Sales department and Design department. A random sample of 8
employees from each of these two departments is selected. The mean and the standard
deviation for the Sales department are x1 = 92.733 and s1 = 2.39 (unit in RM), respectively.
The mean and the standard deviation for the Design department are x 2 = 92.255 and
s2 = 2.98 , respectively. Assume that the data are approximately normally distributed with
same variances. Is there evidence to support that the telephone bills of the employees in
Sales department are higher than Design department? Use = 0.05 .
Solution:
Step 1 Hypothesis:
𝐻𝑜 : 𝜇1 − 𝜇2 = 0
𝐻1 : 𝜇1 − 𝜇2 > 0
Sp = = = 2.70
n1 + n2 − 2 8+8−2
t calc =
(x 1 )
− x 2 − (1 − 2 )
1 1
Sp +
n1 n 2
=
(92.733 − 92.255) − 0
1 1
2.70 +
8 8
= 0.35
Step 4 Decision:
Step 5 Conclusion:
There is not enough evidence to support that the telephone bills of the
employees in Sales department are higher than Design department.
6
Example 5 Hypothesis Test for Difference between Two Population Means of a
Normal Distribution 1 − 2 ( Variance 12 22 and Variances are Unknown )
It is claimed that a machine with higher speed will produce more noise.
A random sample in site A: mean of speed, x1 = 285, s1 = 10, n1 = 11
A random sample in site B: mean of speed x2 = 300, s2 = 15, n2 = 16
Is there evidence to support that site B with higher mean of speed, which impact noise? Use
= 0.05 . Assume that both populations are normally distributed but the variances are not
equal.
Solution:
Step 1 Hypothesis:
𝐻𝑜 : 𝜇1 − 𝜇2 = 0
𝐻1 : 𝜇1 − 𝜇2 < 0
t calc =
(x 1 )
− x 2 − (1 − 2 )
=
(285 − 300) − 0 = - 3.117
S12 S 2 2 102 152
+ +
n1 n2 11 16
2 2
s12 s22 102 152
+ +
n1 n2 11 16
= = = 24.99
2 2 2 2 2 2 2 2
degree of freedom, s 1
s 2
10 15
n
1 + 2 n 11 + 16
n −1 n2 − 1 10 15
= 24
Step 4 Decision:
Step 5 Conclusion:
7
4.1.3 Mean Difference of Paired Samples
Example 6 Hypothesis Test for Mean Difference for Paired Samples from Normal
Distributions d
A researcher compared the effectiveness of taking a special vitamin to reduce weight. The
weight of nine adults is checked before and after taking the vitamin. The data (in pound) are
shown in the following table.
Adult Before After
1 118.0 106.1
2 115.1 99.2
3 132.2 106.3
4 133.9 106.2
5 120.4 106.6
6 140.0 117.6
7 136.5 103.7
8 153.7 108.6
9 155.9 105.2
a) Can you conclude that the weight has been reduced at = 0.05 ? Assuming the
variable is approximately normally distributed.
b) In the context of the problem, state the Type I error that may be made.
Solution:
a) Step 1 Hypothesis: (Let d = before – after)
𝐻𝑜 : 𝜇𝑑 = 0
𝐻1 : 𝜇𝑑 > 0
Step 5 Conclusion: There is enough evidence to conclude that the weight has
been reduced.
8
4.2 Hypothesis Test for Population Variance
Suppose that we wish to test the hypothesis that the variance of a normal
population 2 equals a specified value, say 02 , or equivalently, that the standard
deviation is equal to 0 . Let x1,x 2 ,...,xn be a random sample of n observations from this
population. To test hypothesis about the population variance, the steps are presented in the
table below.
4. Decision
5. Conclusion
An automatic filling machine is used to fill bottles with liquid medicine. A random sample of
20 bottles results in a sample variance of fill volume of s2 = 0.0153 ml2. The machine is
considered to have problem if the variance of fill volume exceeds 0.01 ml2. Is there
evidence in the sample data to suggest that the machine has a problem? Use = 0.05 ,
and assume that fill volume has a normal distribution.
Solution:
Step 1 State the hypothesis:
H0 : 2 = 0.01
H1 : 2 0.01
Step 5 Conclusion: There is not enough evidence to conclude that the variance of
fill volume exceeds 0.01 ml2.
9
Example 8 Hypothesis Test on the Population Variance
Solution:
Step 5 Conclusion: There is enough evidence to conclude that the variance is not equal
to 2.2.
10
4.2.2 Ratio between Two Population Variances
Suppose that we wish to test the hypothesis on the variances from two normal
populations, the steps are presented here.
4. Decision
5. Conclusion
A random sample of 7 observations from the first population resulted in a standard deviation
of 12. A random sample of 8 observations from the second population resulted standard
deviation of 5. At the 0.1 significance level, is there a difference in the variation of the two
populations?
Solution:
Step 1 Hypothesis:
Ho : 𝜎12 = 𝜎22
H1 : 𝜎12 ≠ 𝜎22
S12 122
Step 2 Test statistic: F0 = = 2 = 5.76
S22 5
1 1
Reject H0 if F0 3.87 or F0 = = 0.24
F0.05,7,6 4.21
11
Example 10 Hypothesis Test on the Variances from Two Populations
A random sample of 7 observations from the first population resulted in a standard deviation
of 12. A random sample of 8 observations from the second population resulted standard
deviation of 5. At the 0.05 significance level, can we conclude that there is more variation in
the first population?
Solution:
Step 1 Hypothesis:
Ho : 𝜎12 = 𝜎22
H1 : 𝜎12 > 𝜎22
S12 122
Step 2 Test statistic: F0 = = 2 = 5.76
S22 5
12
Chapter 4 Hypothesis Test
1. A researcher claims that the yearly consumption of soft drinks per person is 52
gallons. In a sample of 50 randomly selected people, the mean of the yearly
consumption was 56.3 gallons. The standard deviation of the population is 3.5 gallons.
At the 0.05 level of significance, is the researcher’s claim valid?
2. A lab assistant claims that the average temperature in a lab is always above 220 C .
Over 1 week, 18 measurements on temperature are collected and it shows that the
temperature in the lab has a mean of 280C and standard deviation of 2.50C. Can we
support the assistant’s claim? ( = 0.05 )
3. A study claims that the workers in a certain company spend an average 18 hours to
produce an item of the product. A researcher wanted to test this claim. She took a
sample of 10 workers and asked them about the time they used to produce an item of
the product. The responses are as follows:
14 25 22 38 16 26 19 23 41 33
Assume that the time spent by all the workers is normally distributed. Using the 5%
significance level, can you reject the claim of the earlier study?
4. A company is always concerned about the productivity of their products. With the old
strategy, on average 22 items are produced per day. The management wants to
increase the productivity and implement the new strategy in production. To check if the
new strategy is more efficient than the old strategy, the management took a random of
18 samples and found that the mean of the sample is 28 items, with standard deviation
of 2.5 items.
Testing at the 1% significance level, would you conclude that the new strategy is more
efficient than the old strategy? Assume that the number of items produced has an
approximately normal distribution.
5. A psychologist wants to study the mean age of children start walking. He took a
random sample of 20 children and found that the mean age at which these children
started walking was 12.9 months with a standard deviation of 0.70 months. Using the
1% significance level, can you conclude that the mean age at which all children start
walking is different from 12.5months? Assume that the ages at which all children start
walking have an approximately normal distribution.
6. Grand Auto Corporation produces auto batteries. The company claims that its top of-
the-line never die batteries are good, on average, for more than 65 months. A
consumer protection agency tested 15 such batteries to check this claim. It found the
mean life of these 15 batteries to be 63 months. With a standard deviation of 1 month,
13
at 5% significance level, can you conclude that the claim of the company is true?
Assume that the life of such a battery has an approximately normal distribution.
6. Engineers are designing the safety devices for use in a new theme park ride. They feel
that the mean height of those riding this sort of ride exceeds 62 inches. The heights
(inches) of those riding a similar ride are shown below.
60 63 71 61 67
63 70 59 53 70
65 60 60 54 68
14
Exercise 4.2 - Hypothesis Test for Two Population Means
1. The average length of “short hospital stays” for men is slightly longer than that for
women, 5.2 days versus 4.5 days. A random sample of recent hospital stays for both
men and women revealed the following. At 0.01 level of significance, is there sufficient
evidence to conclude that the average hospital stay for men is longer than the average
hospital stay for women?
Men Women
Sample size 32 30
Sample mean 5.5 days 4.2 days
Population standard deviation 1.2 days 1.5 days
2. A sample of 14 cans of Brand I diet soda gave the mean number of calories of 23 per
can with a standard deviation of 3 calories. Another sample of 16 cans of Brand II diet
soda gave the mean number of 25 per can with standard deviation of 4 calories. At the
1% significance level, can you conclude that the mean numbers of calories per can are
different for these two brands of diet soda? Assume that the calories per can of diet
soda are normally distributed for each of the two brands and that the standard
deviations for the two populations are equal.
3. A sample of 15 students from university A showed that the mean time they spend in
revision subject of construction is 28.50 hours per week with a standard deviation of 4
hours. Another sample of 16 students from university B showed that the mean time
spent by them in the revision of the subject is 23.25 hours per week with a standard
deviation of 5 hours. Using 2.5% significance level, can you conclude that the mean
time spent in revision by student from university A is greater than students in university
B? Assume that the time spent have a normal distribution for both populations and that
the standard deviation for the two populations are equal.
4. A sample of 14 cans of Brand I diet soda gave the mean number of calories per can as
23 with a standard deviation of 3 calories. Another sample of 16 cans of Brand II diet
soda gave the mean number of calories of 25 per can with a standard deviation of 4
calories. Test at the 1% significance level whether the mean numbers of calories per
can of diet of soda are different for these two brands. Assume that the calories per can
of diet soda are normally distributed for each of these two brands and that the
standard deviations for the two populations are not equal.
15
A (Standard) B (Proposed)
Mean Strength 565 548
Standard Deviation 10.3 15.8
Sample size 15 16
7. In semi conductor manufacturing, wet chemical etching is often used to remove silicon
from the backs of wafers prior to metalization. The etch rate is an important
characteristic in this process and known to follow a normal distribution. Two different
etching solutions have been compared using two random samples of 10 wafers for
each solution. The observed etch rates are as follows (in mils per minutes).
Solution 1 Solution 2
9.9 10.6 10.2 10.0
9.4 10.3 10.6 10.2
9.3 10.0 10.7 10.7
9.6 10.3 10.4 10.4
10.2 10.1 10.5 10.3
Do the data reject the claim that the mean etch rate is the same for both solutions? In
reaching your conclusion, use = 0.05 and assume that both population variances are
equal.
Using the 5% significance level can you conclude that the means are different?
16
[ Answer: tcal = 1.39, do not reject Ho ]
8. A general contractor wants to compare the lifetimes of two major brands of electric
water heaters, T and N. The contractor obtains the following data on lifetimes (years).
T N
6.7 7.2 7.8 7.5 7.6 9.4
7.4 7.6 5.7 9.0 6.4 6.3
7.1 6.6 6.2 7.8 6.9 8.7
8.2 5.5 6.9 6.2 8.2 4.7
9.2 10.4 9.0
Assuming equal variances, do the data provide sufficient evidence to conclude that on
the average, water heaters N outlast water heaters T, use a 5% significance level?
17
Exercise 4.3 - Hypothesis Test for Paired Samples
2. A scientist claims that a chemical added to latex paints can reduce cracks on exposed
wood surfaces. To justify this, each piece of wood was divided into 2; half was painted
with the regular latex paint (untreated paint) and the other half with latex paint that had
the chemical added (treated paint). Exposure crack rating each half is shown the
following table.
Wood 1 2 3 4 5 6 7 8 9 10
Untreated 1.7 2.3 2.6 3.8 3.0 4.2 3.1 4.8 4.9 6.6
Treated 1.0 2.1 2.4 3.0 2.1 3.7 3.0 4.8 4.6 6.2
3. An aircraft design engineer claims that painting an airplane reduces its speed. Six
planes were tested before and after painting. The table below gives the top speed
recorded.
Airplane 1 2 3 4 5 6
Top speed before 290 294 288 293 290 289
Top speed after 290 298 287 294 285 285
4. Independent samples were used to decide whether nonsupervisory mine workers earn
a smaller average hourly wage than nonsupervisory construction workers. The same
hypothesis test will be performed using paired samples. Nonsupervisory construction
workers and mine workers are paired by matching workers with similar experience and
job classification. A random sample of 14 pairs yields the following paired differences
for hourly wages (mining minus construction).
Use these data to decide whether nonsupervisory mine workers earn smaller average
hourly wage than nonsupervisory construction workers. Perform the appropriate
hypothesis test at the 5% significance level.
18
Exercise 4.4 - Hypothesis Test for One Population Variance
1. A rivet is to be inserted into a hole. A random sample of n=15 parts is selected, and
the hole diameter is measured. The sample standard deviation is s = 0.008
millimeters. Is there strong evidence to indicate that the standard deviation of hole
diameter exceeds 0.01 millimeters? Use = 0.01
3. A tool-die company has an order to machine a component for an airbag assembly that
will go into the upcoming model year for a certain automobile. In the manufacturing
specifications from the automobile manufacturer, there is a call for a variance of
0.0005 inch in this component. A random sample of 10 components yields a variance
of 0.0010 inch. Since these components will expose the manufacturer of both the
components and the automobiles to law suits should the airbags fail upon deployment,
the rejection level is set at 10%. The tool-die company stops production and make
adjustments if the variance exceeds 0.0005. Should the tool-die company stop
production and make adjustments? Assume a normal distribution.
Hints:
H 0 : 2 = 0.0005
Step 1
H 1 : 2 0.0005
[ Answer: 2 = 18, reject Ho ]
4. The machine that a pharmaceutical company uses to fill bottles with a popular cough
medicine has a standard deviation of 0.18 ounces. The manufacturer of another bottle
filling machine claims that its product has a smaller standard deviation and therefore
produces a more consistent product than the company's present machine. To test this
claim, the pharmaceutical company samples 41 bottles on the new machine and finds
a standard deviation of 0.15 ounces. At a 0.05 level of significance, test the
manufacturer's claim.
Hints:
H 0 : = 0.18
Step 1
H1 : 0.18
[ Answer: 2 = 27.8, do not reject Ho ]
5. One of the quality control tests used in the manufacture of a 9 volt alkaline battery is
the variance. The process is considered out of control when the variance exceeds 0.21
volts squared. A sample of 24 batteries had a variance of 0.39 volts squared. At a 0.05
level of significance, is the process out of control? Does an adjustment need to be
made or should the manufacturing process continue?
19
6. The variance of scores on a standardized mathematics test for all semester one
students was 150 in 2003. A sample of scores for 20 students who took this test gave
a variance of 170. Test whether at 5% significance, the variance of all semester one
on this test is different from 150. Assume that the scores of all semester one students
on this test are normally distributed.
20
Exercise 4.5 - Hypothesis Test for Two Population Variances
1. It is found from a study that the sample standard deviations for two samples with
sample size 5 and 9 are 2.895 and 4.338 respectively. Based on an appropriate test of
hypothesis, can we conclude that the variance in first sample is significantly smaller
than second sample at the 1% level of significance?
2. The sample means in force for plastic type X and Y are 34.515 and 29.575
respectively, while the sample standard deviations are 2.785 and 4.218 respectively.
Given that a random sample of 4 measurements are taken from each of plastic type X
and Y. Based on an appropriate test of hypothesis, can we conclude that the variance
in force for plastic type Y is significantly greater than type X at 1% level of
significance?
21