Chapter3 - 2
Chapter3 - 2
Sub-Topic
Introduction to hypothesis testing.
Terms in hypothesis testing.
Type I and Type II errors.
Type of hypothesis testing.
Testing of hypothesis on a single population mean.
Testing of hypothesis on a difference between two population means.
Testing of hypothesis on a single population variance.
Testing of hypothesis on a variance population ratios.
Learning Objective
By the end of this chapter, students should be able to
Understand the basic of hypothesis testing.
Identify the terms in hypothesis testing.
Know the types of error.
Know the types of hypothesis testing.
Know the procedure to test a claim about single and different mean.
Know the procedure to test a claim about single and ratio variance.
195
Chapter 5 : Hypothesis Testing
Hypothesis testing is also called significance testing. The objective of the procedure
is to test claims about parameters based on a random sample. A hypothesis test allows
us to draw conclusions or make decisions regarding population from sample data.
Statistical hypothesis testing is a decision-making process for evaluating claims about
a population. In hypothesis testing, the researcher must define the population under
study, state the particular hypotheses that will be investigated, give the significance
level, select a sample from the population, collect the data, perform the calculations
required for the statistical test and reach a conclusion. Researchers are interested in
answering many types of questions. For example such as “Will a new drug lower
blood pressure?” or “Will seat belts reduce the severity of injuries caused by
accidents?”. These types of questions can be addressed through statistical hypothesis
testing, which is a decision-making process for evaluating claims about a population.
In general, we do not know the true value of population parameters, they must be
estimated. However, we do have hypotheses about what the true values are. The
major purpose of hypothesis testing is to choose between two competing hypotheses
about the value of population parameter. For example, one hypothesis might claim
that the wages of men and women are equal, while the alternative might claim that
men make more than women.
Definition 1
A hypothesis is a statement about a population parameter.
Definition 2
The two complementary hypotheses in a hypothesis testing problems are called the
null hypothesis and the alternative hypothesis. They are denoted by H0 and H1,
196
Chapter 5 : Hypothesis Testing
respectively. Both the null and alternative hypothesis should be stated before any
statistical test of significance is conducted. In other words, we technically are not
supposed to do the data analysis first and then decide on the hypotheses afterwards.
Definition 3
A hypothesis test is a rule that specifies for which sample values the decision is made
to reject H0 , i.e accept H1 and for which sample values not to reject H0.
Definition 4
The hypothesis actually to be tested is usually given the symbols H0, and is
commonly referred to as null hypothesis. The null hypothesis is assumed to be true
unless there is strong evidence to the contrary (similar to how a person is assumed to
be innocent until proven guilty). The null hypothesis always includes the equal sign,
which is H0 : μ = μ0.
Definition 5
The other hypothesis, which is assumed to be true when the null hypothesis is false, is
referred to as the alternative hypothesis. The alternative hypothesis always includes
three signs which is H1 : μ ≠ μ0, H1 : μ > μ0 and H1 : μ < μ0.
Definition 6
Test statistic is the sample statistic used to decide whether to reject or fail to reject the
null hypothesis.
Definition 7
Critical region is the set of all values which would cause us to reject H0.
Definition 8
Critical values are the values which separate the critical region from the non-critical
region. The critical values are determined independently of the sample statistics.
197
Chapter 5 : Hypothesis Testing
Definition 9
Significance level (alpha) is the probability of rejecting the null hypothesis when it is
true. The value of α = 0.05 and α = 0.01 are common. If no level of significance is
given, use α = 0.05. The level of significance is the complement of the level of
confidence in estimation.
Definition 10
Decision is a statement based upon the null hypothesis. It is either reject the null
hypothesis or fail to reject the null hypothesis. We will never accept the null
hypothesis.
Definition 11
Conclusion is a statement which indicates the level of evidence (sufficient or
insufficient), at what level of significance and whether the original claim is rejected
(null) or supported (alternative).
Type I and Type II errors are two well-known concepts in quality engineering, which
are related to hypothesis testing. Often engineers are confused by these two concepts
simply because they have many different names. We list a few of them here.
Type I errors are also called :
Producer’s risk.
False alarm.
False negative.
α error.
Type II errors are also called :
Consumer’s risk.
Misdetection.
False positive.
198
Chapter 5 : Hypothesis Testing
β error.
Type I and Type II errors can be defined in terms of hypothesis testing.
A Type I error (α) is the probability of rejecting a true null hypothesis.
A Type II error (β) is the probability of failing to reject a false null hypothesis.
Or simply :
A Type I error (α) is the probability of telling you things are wrong, given that
things are correct.
A Type II error (β) is the probability of telling you things are correct, given
that things are wrong.
One concept related to Type II errors is "power." Power is the probability of rejecting
H0 when H1 is true. The value of power is equal to 1 . It is the power to detect the
change. The decision to reject or not to reject the null hypothesis is based on a test
statistic computed from values of a random sample. Hence, such a decision is subject
to error because of sampling variation. We denoted the probabilities of Type I and
Type II errors by
199
Chapter 5 : Hypothesis Testing
Definition 12
Type I error is rejecting the null hypothesis when it is true.
Definition 13
Type II error is failing to reject the null hypothesis when it is false.
Example 1
Indicate whether the following statements are type I or type II error.
Answer Example 1
(a) Type I error.
(b) Type II error.
Example 2
Assume that we are conducting a hypothesis test of the claim that μ < 0.06. Here are
the null and alternative hypotheses : H0 : μ = 0.06 and H1 : μ < 0.06.
Give the statements identifying
(a) Type I error.
(b) Type II error.
200
Chapter 5 : Hypothesis Testing
Answer Example 2
(a) A type I error is the mistake of reject a true null hypothesis. Conclusion, there
is sufficient evidence to support μ < 0.06, when in reality μ = 0.06.
(b) A type II error is the mistake of fail to reject the null hypothesis when it is
false. Fail to reject μ = 0.06 (fail to support μ < 0.06) when in reality μ < 0.06.
Tests of hypothesis can be carried out on one or two samples. One sample tests are
used to test if the population parameter (μ) is different from a specified value. Two
sample tests are used to detect the difference between the parameters of two
populations (μ1 and μ2). Two sample tests can further be classified as unpaired or
paired two sample tests. While in unpaired two sample tests the sample data are not
related, in paired two sample tests the sample data are paired according to some
identifiable characteristic. For example, when testing hypothesis about the effect of a
treatment on (say) a landfill, we would like to pair the data taken at different points
before and after implementation of the treatment.
One-tailed test
Here the alternate hypothesis H0 is one-sided and we test whether the test statistic
falls in the critical region on only one side of the distribution.
201
Chapter 5 : Hypothesis Testing
Example 3
In a manufacturing plant, plastic sheathing is specified to be at least two mils thick by
one of the many quality measures. Set up the null and alternative hypothesis for a
quality monitoring system that ensures the desired level of quality.
Answer Example 3
The machine operator would act by adjusting the extruder rollers on the machine only
if the plastic sheathing was too thin.
Null hypothesis, H0 : μ = μ0
Alternative hypothesis, H1 : μ < μ0
Where μ0 = 2 mils
Two-tailed test
Here the alternate hypothesis H1 is formulated to test for difference in either direction,
i.e., for either an increase or a decrease in the random variable. Hence the test statistic
is tested for occurrence within either of the two critical regions on the two extremes
of the distribution.
One sample test
For the lake example we need to know if the mean concentration of the lake is
the same as or different from a specified value of 10 mg/L.
Hence, H0 : μ = 10 mg/L vs H1 : μ ≠ 10 mg/L.
202
Chapter 5 : Hypothesis Testing
Example 4
In nuclear power plant, the cold start procedure consists if bringing the reactor to 35%
of power, and then to 65% of power, before full operation, a process that may take 12
hours. At each stage, engineers take measurements of several critical reactor
attributes. For examples, if binding energy for a given fuel rod does not have a mean
rate of 11.5MeV at 35% power, then the reactor could cascade into a critical
configuration and leak radiation at subsequent power levels. Set up the hypothesis for
a decision system at the 35% power level stage.
Answer Example 4
The plant operators would not continue to power up the reactor if the binding energy
did not meet specification. The action to be taken would be to shut down.
Null hypothesis, H0 : μ = μ0
Alternative hypothesis, H1 : μ ≠ μ0
Where μ0 = 11.5
Exercise 5.4
State the null and alternative hypotheses for each conjecture.
1. A researcher thinks that if pregnant women use vitamin pills, the mean birth
weight of the babies will increase. The average birth weights of the population
are 3.2 kilograms.
203
Chapter 5 : Hypothesis Testing
3. A psychologist feels that playing soft music during a test will change the
results of the test. The psychologist is not sure whether the grades will be
higher or lower. In the past, the mean of the scores was 95.
4. The mean waiting bus for travel to Gunung Tahan is 3.1 hours. Some roads
are restricted to buses only during office hours. A test is performed to see how
this bus has affected the mean waiting time.
5. The mean for incoming call received by Amir is 6 calls per hour. Amir
claimed that a call received will shorten the incoming calls.
9. A football league reported that the average number of touchdowns per game
was 5. A study is done to determine if the average number of touchdowns has
decreased.
204
Chapter 5 : Hypothesis Testing
11. A recent drug survey showed an increase in use of drugs and alcohol among
local high school students as compared to the national percent. Suppose that a
survey of 100 local youths and 100 national youths is conducted to see if the
percentage of drug and alcohol use is higher locally than nationally.
205
Chapter 5 : Hypothesis Testing
another 36 people are given a vaccine that does not contain the drug. Conduct
a hypothesis test to determine if the person that get the vaccine without the
drug and get some disease is more than the people that get the vaccine with
the drug and get some disease.
206
Chapter 5 : Hypothesis Testing
Step 1
Write the original claim and identify whether it is the null hypothesis or the
alternative hypothesis.
Step 2
Use the alternative hypothesis to identify the type of test.
Write down all information from the problem and with specific case.
State the distribution should use. Find the critical value using the tables and state the
decision rule.
Step 3
Compute the test statistic.
Step 4
Make a decision to reject or fail to reject the null hypothesis. A picture showing the
critical value and test statistic may be useful.
Step 5
Write the conclusion.
207
Chapter 5 : Hypothesis Testing
score formula for sample means. The test statistic is very similar to that for the Z-
score, except that σ has been replaced by s and Z has been replaced by T. The critical
value is obtained from the t-table with the degrees of freedom for this test is n - 1.
Otherwise, if the population standard deviation, σ, also unknown with large sample
size (n ≥ 30), then the population mean has a normal distribution, and we will be
using the Z-score formula for sample means.
_
x
Case C : n ≥ 30 with statistics test : Z Test .
s n
_
x
Case D : n < 30 with statistics test : TTest .
s n
Example 5
A random sample of 120 recorded deaths in Filipina during the past years showed an
average life span of 71.8 years. Assuming a population standard deviation of 8.9
years, does this seem to indicate that the mean life span today is greater than 70 years
? Use a 0.01 level of significance.
Answer Example 5
Step 1
H0 : µ = 70 years
H1 : µ > 70 years (Claim)
Step 2
The right-tailed test. With n = 120, σ = 8.9 (known) and α = 0.01. This is Case A.
Use standard normal distribution. Critical value ZC > 2.33.
Decision Rule : Reject H0 if the test value, ZTest falls in the rejection region, ZC >
2.33.
Step 3
x 71.8 70
Z Test 2.22
8.9
n 120
208
Chapter 5 : Hypothesis Testing
Step 4
The test value is 2.22 which is less than the critical value, ZC > 2.33. The decision is
do not reject the null hypothesis.
Step 5
There is not enough evidence to support the claim that the mean life span today is
greater than 70 years.
Example 6
A researcher wishes to test the claim that the average age of lifeguards in Perhentian
Island is different than 33 years. He selects a sample of 14 guards and finds the mean
of the sample to be 32.1 years, with a sample standard deviation of 2 years. Is there
any evidence to support the claim by using alpha 0.05 ?
Answer Example 6
Step 1
H0 : µ = 33
H1 : µ ≠ 33 (Claim)
Step 2
The right-tailed test. With n = 14, s = 2 (σ unknown) and α = 0.05. This is Case D.
Use t-distribution. Critical value is tC < - 1.771 or tC > 1.771.
Decision Rule : Reject H0 if test value, Ttest falls in the rejection region, t C < - 1.771
or tC > 1.771.
Step 3
_
x 32.1 33
TTest 1.6837
s 2
n 14
Step 4
The test value is -1.6837 which is lower than the critical value, tC < - 1.771. The
decision is to do not reject the null hypothesis.
Step 5
There is not enough evidence to support the claim that the average age of lifeguards
209
Chapter 5 : Hypothesis Testing
Example 7
Random sample of 8 observations are taken to determine if there is evidence that the
concentration of an average certain material less than 11ppm. By using alpha equal
0.025, test the claim.
11.0 10.7 9.4 7.8
11.3 9.1 10.2 10.5
Answer Example 7
Step 1
H 0 : 11
H1 : 11 (Claim)
Step 2
The left-tailed test. With n = 8, σ unknown and α = 0.025. This is Case D.
11 10.7 9.4 7.8 11.3 9.1 10.2 10.5
x
8
80
10
8
11 102 10.7 102 9.4 102 7.8 102 11.3 102 9.1 102
10.2 10 10.5 10
2 2
s
8 1
9.48
7
1.1637
Use t-distribution. Critical value is tC < - 2.365.
Decision Rule : Reject H0 if test value, TTest falls in the rejection region, tC < - 2.365.
210
Chapter 5 : Hypothesis Testing
Step 3
_
x 10 11
TTest 2.4305
s 1.1637
n 8
Step 4
The test value is - 2.4305 which is lower than the critical value, tC < - 2.365. The
decision is to reject the null hypothesis.
Step 5
There is enough evidence to support the claim that the concentration of an average
certain material less than 11ppm.
Example 8
The score of driving test has a normal distribution with mean 70 if given the standard
deviation of sample is eight. A driving school’s instructor claimed that if the
candidate learned more than three hours per week, the mean score would be different
than 70. A driving test was given to a random sample of 50 candidates with the mean
score was 78.
(a) State the null and alternative hypotheses.
(b) Identify the type I error and type II error that correspond to the hypothesis
above.
(c) Test the claim at 5% level of significance.
Answer Example 8
(a) H 0 : 70
H1 : 70 (Claim)
(b) Type I error : Reject H0 (The mean score is exactly 70).
Type II error : Do not reject H0 (The mean score is actually different than 70).
(c) Step 1
H 0 : 70
H 1 : 70 (Claim)
211
Chapter 5 : Hypothesis Testing
Step 2
The right-tailed test. With 70 , s 8 , n 50 , x 78 and 0.05 . This
is Case C.
Use standard normal distribution. Critical value is ± ZC = ± 1.645.
Decision Rule : Reject H0 if ZTest falls in the rejection region, ZC < -1.645 or
ZC > 1.645.
Step 3
x 78 70
Z Test 7.07106
s 8
n 50
Step 4
The test value is 7.07106 which are greater than critical value, ZC > 1.645.
The decision is to reject null hypothesis.
Step 5
There is enough evidence to support the claim that the score would be
different than 70 if the candidate learned more than 3 hours per week.
Example 9
In the year 2004, the mean family size was 4.09. A sample of 22 families taken this
year by a researcher produced a mean family size of 5.01 with a population standard
deviation is 0.14. Using a 0.01 level of significance, test the hypothesis to claim that
the mean family size has decreased since 2004.
Answer Example 9
Step 1
H0 : µ = 4.09
H1 : µ < 4.09 (Claim)
Step 2
__
The left-tailed test. With n = 22, x 5.01 , σ = 0.14, α = 0.01. This is Case B.
Use standard normal distribution. Critical value is ZC < - 2.33.
212
Chapter 5 : Hypothesis Testing
Decision Rule : Reject H0 if ZTest falls in the rejection region, ZC < - 2.33.
Step 3
x 5.01 4.09
Z Test 30.8227
0.14
n 22
Step 4
The test value is 30.8227 which is lower greater than the critical value, ZC < - 2.33.
The decision is do not reject the null hypothesis.
Step 5
There is not enough evidence to support the claim that the mean family size has
decreased since 2004.
Exercise 5.5
1. A garment manufacturing company recorded the amount of time that it took to
make a pair of jeans on 8 different occasions. The time in minutes is as
follows.
12.5 13.0 11.9 10.2 13.1 13.6 13.8 14.0
Assume that the measurements were taken from the population with a normal
distribution. It is of interest to know if a sample data suggest that the average
time it takes this company to make a pair of jeans is less than 13.5 minutes.
State the null and alternative hypothesis, and then conduct an appropriate test
by using 0.05 of significance level.
213
Chapter 5 : Hypothesis Testing
3. A researcher claims that the average salary of assistant professors is more than
RM42000. A sample of 30 assistant professors has mean salary of RM43260.
Test the claim at 5% level of significance that assistant professors earn more
than RM42000 a year. The standard deviation of the population is RM5230.
4. The score of driving test has a normal distribution with mean 70 and standard
deviation of population is 8. A driving school’s instructor claimed that if the
candidate learned more than three hours per week, the mean score would be
more than 70. A driving test was given to a random sample of 50 candidates
with the mean score was 78.
(a) State the null and alternative hypotheses.
(b) Identify the type I error and type II error that correspond to the
hypothesis above.
(c) Test the claim at 5% level of significance.
5. The researcher claim that the average cost of men’s athletic shoes is less than
RM80. He selects a random sample of 36 pairs of shoes from a catalog and
finds the following costs. Test the hypothesis 0.10 level of significance.
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
6. The Medical Rehabilitation Education Foundation claim that the average cost
of rehabilitation for stroke victims is RM24672. To see of the average cost of
rehabilitation is different at a particular hospital, a researcher selected a
random sample of 35 stroke victims at the hospital and found that the average
costs of their rehabilitation is RM25226. The standard deviation of the
population is RM3251. Test the hypothesis 0.01 level of significance.
7. A researcher wishes to test the claim that the average age of lifeguards in
Ocean City is greater than 24 years. She selects a sample of 36 guards and
214
Chapter 5 : Hypothesis Testing
finds the mean of the sample to be 24.7 years, with a standard deviation
sample of 2 years. Test the hypothesis 0.05 level of significance.
8. A researcher claim that the average wind speed in a certain city difference
from 8 miles per hour. A sample of 32 days has an average wind speed of 8.2
miles per hour. The standard deviation of the sample is 0.6 mile per hour. Test
the hypothesis 0.05 level of significance.
9. The mean lifetime for a sample of 125 lamps is 1205 hours with standard
deviation 105 hours. However, the company claims that their lamps average
lifetime is difference from 1300 hours. Test the claim at 1% level of
significance.
11. Drills being manufactured are supposed to have a mean length of 4cm. From
past experience, we know that the standard deviation is equal to 1cm and the
lengths are normally distributed. A random sample of 10 drills had a mean of
4.5cm. Test the hypothesis that the mean is 4.0 with α = 0.05.
215
Chapter 5 : Hypothesis Testing
14. Researchers studying the effects of diet on growth would like to know of a
vegetarian diet affects the height of a child. The researchers randomly selected
12 vegetarian children that are six years old. The average height of the
children is 42.5 inches with a standard deviation of 3.8 inches. The average
height for all six year old children is 45.75 inches. Conduct a hypothesis test
to determine whether there is overwhelming evidence at α = 0.05 that six year
old vegetarian children are not the same height as other six year old children.
Assume the heights of six year old vegetarian children are approximately
normally distributed.
15. In attempting to control the strength of the wastes discharged into a nearby
river, a paper firm has taken a number of measures. Members of the firm
believe that they have reduced the oxygen-consuming power of their wastes
from a previous mean of 500. If given sample size 25 with the variance of 0.9,
with significance level of α = 0.01. Test the claim if mean less than 550.
216
Chapter 5 : Hypothesis Testing
(b) Type I error – Reject H0 when the mean score is equal 70.
Type II error – Do not reject H0 when the mean score is more than 70.
(c) Reject the H0.
5. Reject the H0.
6. Do not reject H0.
7. Reject the H0.
8. Do not reject H0.
9. Reject the H0.
10. Reject the H0.
11. Do not reject H0.
12. Reject H0.
13. Do not reject H0.
14. Reject H0.
15. Reject H0.
217
Chapter 5 : Hypothesis Testing
B Known n1 , n2 30 ( X 1 X 2 ) ( 1 2 )
Z Test
12 22
n1 n2
C Unknown n1 , n2 30 ( X 1 X 2 ) ( 1 2 )
Z Test
s12 s2
2
n1 n2
D Unknown (Equal) n1 , n2 30 ( X 1 X 2 ) ( 1 2 )
TTest
1 1
Sp
n1 n 2
v n1 n2 2
E Unknown (Not equal) n1 n 2 30 ( X 1 X 2 ) ( 1 2 )
TTest
1 2
n
s1 s 22
v 2(n 1)
F Unknown (Not equal) n1 , n2 30 ( X 1 X 2 ) ( 1 2 )
TTest
s12 s2
2
n1 n2
218
Chapter 5 : Hypothesis Testing
2
s12 s22
v 12
n n2
2
s1
2
s22
1 n2
n
n1 1 n2 1
Example 10
A sample of 35 teachers from Kedah has an average salary of RM32100, with a
standard deviation of RM1220. A sample of 32 teachers from Johor has an average
salary of RM31290, with a standard deviation of RM1320. Using alpha 0.01, perform
the hypothesis testing whether any significant difference in teachers’ salaries between
the two places. Assume the salaries are normally distributed.
Answer Example 10
Step 1
H0 : 1 2
H1 : 1 2 (Claim)
Step 2
Kedah Johor
Sample size 35 32
Sample mean 32100 31290
Sample standard deviation 1220 1320
The two-tailed test. With α = 0.05 and the data above. This is Case C.
Use standard normal distribution. Critical value is ZC < -2.58 or ZC > 2.58.
219
Chapter 5 : Hypothesis Testing
Decision Rule : Reject H0 if the ZTest falls in the rejection regions, ZC < -2.58 or ZC >
2.58.
Step 3
(32100 31290) (0)
Z Test 2.60107
(1220) 2 (1320) 2
35 32
Step 4
The test value is 2.60107 which are greater than the critical value, ZC > 2.58. The
decision is to do not reject the null hypothesis.
Step 5
There is not enough evidence to support the claim that there is significant difference
in teachers’ salaries between the two places.
Example 11
The music was turned on during the working hours of a business with 45
employees. There productivity level averaged 5.2 with a standard deviation of
2.4. On a different day, the music was turned off and there were 40 workers. The
workers' productivity level averaged 4.8 with a standard deviation of 1.2. Test the
claim whether employees with music playing perform better than employees without
music playing using 0.05 level of significance.
Answer Example 11
Step 1
H0 : 1 2
H1 : 1 2 (Claim)
Step 2
Turned On Turned Off
Sample size 45 40
Sample mean 5.2 4.8
Sample standard deviation 2.4 1.2
220
Chapter 5 : Hypothesis Testing
The right-tailed test. With α = 0.05 and data above. This is Case A.
Use standard normal distribution. Critical value is ZC > 1.645.
Decision Rule : Reject H0 if the test value, ZTest falls in the rejection regions,
ZC > 1.645.
Step 3
(5.2 4.8) (0)
Z Test 0.9877
(2.4) 2 (1.2) 2
45 40
Step 4
The test value is 0.9877 which is less than the critical value, ZC > 1.645. The decision
is to do not reject the null hypothesis.
Step 5
There is not enough evidence to support the claim that employees with music playing
perform better than employees without music playing.
Example 13
In Mathematics quiz, the sample sizes of two parts are 10 students. For Part I, the
mean score was 35 with standard deviation of 2.5, while in Part II, the mean score
was 24 with standard deviation of 2.1. Test the difference between the performances
of the two parts using 0.01 of significance level. Assume that the variances of
population are unknown but not equal.
Answer Example 13
Step 1
H 0 : I II
H1 : I II (Claim)
Step 2
Part I Part II
Sample size 10 10
Sample mean 35 24
221
Chapter 5 : Hypothesis Testing
The two-tailed test. With α = 0.01 and data above. This is Case E.
We use t-distribution. Critical value is TC < - 2.878 or TC > 2.878.
Decision Rule : Reject H0 if the test value, Ttest falls in the rejection region, TC < -
2.878 or TC > 2.878.
Step 3
TTest
35 24 0 10.65403
1
10
2.52 2.12
Step 4
The test value is 10.65403 which are greater than the critical value, TC > 2.878. The
decision is to reject the null hypothesis.
Step 5
There is enough evidence to support the claim that there is a significant difference
between the performances of two parts.
Example 14
The data survey credit card holders in Malaysia such as below.
Year 2005 2006
Sample mean 756 784
Sample size 14 24
Sample standard deviation 12 9
Test at 0.1 significance level of the mean credit card holders in 2005 and 2006 were
different. Assume that variances of population are unknown but not equal.
222
Chapter 5 : Hypothesis Testing
Answer Example 14
Step 1
H0 : A B
H1 : A B (Claim)
Step 2
Year 2005 2006
Sample mean 756 784
Sample size 14 24
Sample standard deviation 12 9
The two-tailed test. With α = 0.1 and data above. This is Case F.
Use t-distribution. Critical value are TC < - 1.717 or TC > 1.717.
2
12 2 9 2
v 2
14 24 186.61511
2
21.6155 22
12 2 92 8.63338
14 24
14 1 24 1
Decision Rule : Reject H0 if the test value, TTest falls in the rejection region, TC < -
1.717 or TC > 1.717.
Step 3
TTest
756 784 0 7.57567
12 2 92
14 24
Step 4
The test value is -7.57567 which is less than the critical value, TC < - 1.717. The
decision is to reject the null hypothesis.
Step 5
There is enough evidence to support the claim that there is a significant difference
between the mean credit card holders in 2005 and 2006.
223
Chapter 5 : Hypothesis Testing
Example 15
The data is about the average of mileage record by two type of engine in Toyota
company. The sample size of engine type I is 18 with sample mean 114. While the
sample size of engine type II is 14 with sample mean 123. If sample standard
deviation both of engines are 1.6 and 1.7 respectively, test the hypothesis use 0.025
level of significance the average of mileage engine type I is lower than the average of
mileage engine type II. Assume that the variances population unknown but equal.
Answer Example 15
Step 1
H0 : I II
H1 : I II (Claim)
Step 2
The left-tailed test. With α = 0.025. This is Case D.
Use t-distribution. Critical value is TC < - 2.042.
S p2
18 11.62 14 11.72 2.703
18 14 2
S p 1.64408
Decision Rule : Reject H0 if the test value, TTest falls in the rejection region,
TC < - 2.042.
Step 3
(114 123) (0)
TTest 15.36189
1 1
1.64408
18 14
Step 4
The test value is -15.36189 which is less than the critical value, TC < - 2.042. The
decision is to reject the null hypothesis.
Step 5
There is enough evidence to support the claim that the average gas mileage for engine
224
Chapter 5 : Hypothesis Testing
type I is significantly less than the average gas mileage for engine type II.
Exercise 5.6
1. A sample of 32 teachers from Langkawi Island has an average salary of
RM2310 per month, with a standard deviation of RM122. A sample of 36
teachers from Tioman Island has an average salary of RM2612 per month,
with a standard deviation of RM111. Test the hypothesis if there are
significant differences in teachers’ salaries between the two islands use 0.05
of significance level.
2. Two types of drugs were used on 5 and 7 patients for reducing their weights in
Jerry’s 'slim-beauty' health club. Drug A was allopathic and drug B was
Herbal. The decrease in the weight after using drugs for six months was as
follows.
Drug A : 10 12 13 11 14
Drug B : 8 9 12 14 15 10 9
Test the hypothesis if there are significant differences in drug B and drug A by
using 0.001 of significance level. Assume that the variances of population are
unknown but equal.
3. The average annual cost of car insurance in 2004 for residents of Kuala
Lumpur was RM891, while for residents of Pulau Pinang was RM789. If
given that the sample size of both states is 14 with standard deviation of
sample, 3 and 6 respectively. Test the hypothesis if mean annual cost of car
insurance Kuala Lumpur is greater than the mean annual cost of car insurance
Pulau Pinang. Use 0.10 of significance level. Assume that the variances of
population are unknown but not equal.
225
Chapter 5 : Hypothesis Testing
4. Two types of batteries are tested for their length of life and following results
are obtained. Is there a significant difference in the two batteries ? Test the
claim using 0.05 of significance level.
Battery A Battery B
Sample size 12 10
Sample mean 500 560
Variance population 100 121
226
Chapter 5 : Hypothesis Testing
15 years and those who left the company. The performance is measured by the
company’s annual performance appraisals which produce ratings on a 5 point
scale, 1 for low performance and 5 for high performance. The data are
summarized in the table. Use α = 0.05 to test the hypothesis.
Stayers Leavers
Sample size 174 355
Sample mean 3.51 3.24
Sample standard deviation 0.51 0.52
227
Chapter 5 : Hypothesis Testing
The test of a single variance is performed using a chi-square test and the chi-square
distribution. Let X1, … , Xn be a random sample from a population which is N(μ ,σ 2)
where μ and σ2 are unknown. We consider now how to test a hypothesis about the
population variance, σ2. We shall present the results without justification. To test
H0 : σ2 = σ20 versus H1 : σ2 ≠ σ20 we use the test statistic such as below.
(n 1) s 2
2T ~ 2 n 1
2
0
with the degree of freedom is n – 1 and always assumed that H0 is true. Conditions for
testing are
The population has a normal distribution.
The data is from a random sample.
The observations must be independent of each other.
Testing is done in the same manner as before. Remember, all hypothesis testing is
done under the assumption the H0 true.
Example 16
A manufacturer of car batteries claims that the life of his batteries is approximately
normally distributed with a standard deviation equal to 0.7 year. If a random sample
of 15 of these batteries has a standard deviation of 0.5 years, test the hypothesis of
variance population greater than 0.49 year by using 0.01 of significance level.
Answer Example 16
Step 1
H0 : σ2 = 0.49
H1 : σ2 > 0.49 (Claim)
Step 2
Use α = 0.01. Critical value is 2 C 2 0.01,14 29.141 .
Use chi-square distribution.
228
Chapter 5 : Hypothesis Testing
Decision Rule : Reject H0 if the test value, 2Test falls in the rejection region.
Step 3
(n 1) s 2 (15 1)(0.5) 2
2 Test 7.14285 .
2 (0.7) 2
Step 4
The test value is 7.14285 which is less than the critical value, 2 C 29.141 . The
decision is to reject the null hypothesis.
Step 5
There is enough evidence to support the claim that the life of his batteries with
variance greater than 0.49 year.
Example 17
An extra preparation class is advertised to improve the scores with random sample of
30 data and a standard deviation is 2.1 hours which is approximately normally
distributed. Assume the standard deviation of the scores is 1.7 hours. Use alpha equal
0.025, test the hypothesis.
Answer Example 17
Step 1
H0 : σ2 = 2.89
H1 : σ2 > 2.89 (Claim)
Step 2
Give α = 0.025. The test is a Chi-Square test. We use chi-square distribution.
The critical value is 2C 2 , v 2 0.025, 29 45.722 .
Decision Rule : Reject H 0 if the test value, 2Test falls in the rejection region.
Step 3
(n 1) s 2 (30 1)(2.1) 2
2
Test 44.2525
2 (1.7) 2
229
Chapter 5 : Hypothesis Testing
Step 4
The test value is 44.2525 which is less than the critical value, 2 C 45.722 which is
not in the critical region. The decision is do not reject the null hypothesis.
Step 5
There is not enough evidence to support the claim that an extra preparation class is
advertised to improve the scores.
Exercise 5.7
1. The score of driving test has a standard deviation of sample 8. A driving
school’s instructor claimed that if the candidate learned not more than three
hours per week, the standard deviation score would be less than 16. A driving
test was given to a random sample of 51 candidates. Use alpha equal 0.01, test
the hypothesis.
2. A researcher wishes to test the claim that the standard deviation of lifeguards
in Sipadan Island is difference than 3.4 years. He selects a sample of 16
guards and finds the standard deviation of 6 years. Is there any evidence to
support the claim by using alpha 0.01 ?
230
Chapter 5 : Hypothesis Testing
5. By using 0.01 significant levels, test the claim that variance of women
supermodels weight is less than the variance of women weights in general.
The population standard deviation of the weights is 29 pounds. The weights
(in pounds) of nine randomly selected supermodels are shown in below.
8. With individual lines at its various windows, a post office finds that the
standard deviation for normally distributed waiting times for customers on
Friday afternoon is 7.2 minutes. The post office experiments with a single
main waiting line and find that for a random sample of 25 customers, the
waiting times for customers have a standard deviation of 3.5 minutes. With a
significance level of 5%, test the claim that a single line causes lower
variation among waiting times (shorter waiting times) for customers.
231
Chapter 5 : Hypothesis Testing
to be sucked out of the tank during flight, which is equally undesirable from
the point of view of flight safety. A test at the 2% significance level is to be
conducted with a random sample of 20 fuel-tank lids to see whether the
population variance of lid diameters equals 0.0001 inches squared, as
specified by engineers.
10. A laser machine tool is supposed to cut watch gears in precise thickness
averaging 500 microns with standard deviation of 4 microns. We take a
random sample of 10 watch gears and they have these thicknesses in microns.
500 490 510 501 499 502 497 503 500 499
Use the sample to test the claim that the tool cuts gears with a thickness
variance of 4 microns. Use a significance level of 0.01.
11. For randomly selected adults IQ scores are normally distribution with a mean
of 100 and standard deviation of 15. A sample of 24 randomly selected
college professors resulted in IQ scores having a standard deviation of 10.
Test the claim that the IQ scores for college professors is the same as the
general population that is 15. Use a 0.05 level of significance.
12. Tests in Mr. Wildmans past statistics classes have scores with a standard
deviation equal to 14.1. One of his current classes now has 27 test scores with
a standard deviation of 9.3. Use a 0.01 level of significance to test the claim
that this current class has less variation than past classes.
232
Chapter 5 : Hypothesis Testing
Introduction
The F-distribution is formed by the ratio of two independent chi-square variables
divided by their respective degrees of freedom. Since F is formed by chi-square,
many of the chi-square properties carry over to the F distribution such as below.
The F-values are all non-negative.
The distribution is non-symmetric.
The mean is approximately 1.
There are two independent degrees of freedom, one for the numerator and the
other one for the denominator.
There are many different F distributions, one for each pair degrees of freedom.
The F-test is designed to test if two population variances are equal. It does this by
comparing the ratio of two variances. So, if the variances are equal, the ratio of the
variances will be one. All hypothesis testing is done under the assumption the null
hypothesis is true. If the null hypothesis is true, then the F test-statistic which is
F S 21 S 22 can be simplified (dramatically). This ratio of sample variances will be
test statistic used. If the null hypothesis is false, then, we will reject the null
hypothesis that the ratio was equal to 1 and our assumption that they were equal. The
F test statistic is simply the ratio of two sample variances. There are several different
F-tables. Each one has a different level of significance. So, find the correct level of
significance first, and then look up the numerator degrees of freedom and the
233
Chapter 5 : Hypothesis Testing
denominator degrees of freedom to find the critical value. We will notice that all of
the tables only give level of significance for right tail tests. Because the F distribution
is not symmetric, and there are no negative values, we may not simply take the
opposite of the right critical value to find the left critical value. The way to find a left
critical value is to reverse the degrees of freedom, look up the right critical value, and
then take the reciprocal of this value.
Assumptions
The larger variance should always be placed in the numerator.
The test statistic is F = s12 / s22 where s12 > s22.
Divide alpha by 2 for a two tail test and then find the right critical value.
If standard deviations are given instead of variances, they must be squared.
When the degrees of freedom aren't given in the table, go with the value with
the larger critical value (this happens to be the smaller degrees of freedom).
This is so that you are less likely to reject in error (type I error).
The populations from which the samples were obtained must be normal.
The samples must be independent.
234
Chapter 5 : Hypothesis Testing
Example 18
An experiment was performed to compare the abrasive wear of two different
laminated materials. Eleven pieces of material 1 were tested by expose each piece to a
machine measuring wear. Ten pieces of material 2 were similarly tested. In each case,
the depth of wear was observed. The samples of material 1 gave an average (coded)
wear of 85 units with a sample standard deviation of 4, while the samples of material
2 gave an average of 81 and a sample standard deviation of 5. Use a 0.1 level of
significance to test the ratio of two populations.
Answer Example 18
Step 1
H 0 : 21 2 2
H1 : 21 2 2 (Claim)
Step 2
Material 1 Material 2
Sample mean 85 81
Sample size 11 10
Sample standard deviation 4 5
1 1
F0.95 (10, 9) 0.3306
F0.05 (9, 10) 3.025
We use F-distribution.
Decision Rule : Reject H0 if the test value falls in the rejection region, FC 0.3306
or FC 3.14 .
Step 3
s 21 4 2
FTest 0.64 .
s 2 2 55
235
Chapter 5 : Hypothesis Testing
Step 4
The test value is 0.64 which is between both of critical value, FC 0.3306 and
Exercise 5.8
1. In a study of the effects supplement use, brand A and brand B users of
supplement in college were tested for body fitness, with the results given
below. Use a 0.1 significance level to test the claim that the population of
brand B supplement users has a variance different from that brand A users.
Brand A Brand B
Sample size = 25 Sample size = 13
Standard deviation = 2.4 Standard deviation = 2.1
236
Chapter 5 : Hypothesis Testing
consumed by each rat in ml/kg of body weight was recorded and the results
are summarized in the following table.
Amphetamine Saline
n 15 10
__ 115 135
x
s 40 15
237
Chapter 5 : Hypothesis Testing
s2 1.04 0.51
8. A professor has two classes, X and Y. Class X had 13 students and class Y has
25 students. On the same test, although there was no significant difference in
mean grades, class X had a standard deviation of 10 while class Y had a
standard deviation of 13. We can conclude at 1% level of significance, that the
variability of class Y is greater than that of X ?
238
Chapter 5 : Hypothesis Testing
EXERCISE CHAPTER 5
1. Resting pulse rate is an important measure of the fitness of a person’s
cardiovascular system with a lower rate (greater fitness). The mean pulse rate
for all adult males is approximately 72 beats per minute. A random sample of
25 male students currently enrolled in the Faculty of Science was selected and
the mean pulse rate resting pulse rate was found to be 80 beats per minute
with a standard deviation of 20 beats per minute. The experimenter wishes to
test if the students are less fit, on average, than the general population.
(a) What are the null and alternative hypothesis ?
(b) Is there any evidence to support the claim at 0.05 ?
(c) Is there any evidence to support the claim at 0.001 ?
2. The average time it takes for a person to experience pain relief from aspirin is
25 minutes. A new ingredient is added to help speed up relief. Let denote
the average time to obtain pain relief with the new product. An experiment is
conducted to verify if the new product is better. A random sample of forty
patients in a certain hospital was selected and the mean time for a person
relieved from aspirin was found to be 23 minutes with a standard deviation of
five minutes.
(a) What are the null and alternative hypothesis ?
(b) Is there any evidence to support the claim at α = 0.05 ?
(c) Is there any evidence to support the claim at α = 0.05 ?
3. In order to study the harmful effects of DDT poisoning, the pesticide was fed
to 40 randomly chosen rats out of a group of 80 rats. The other 40 rats were
used as the control group. Table shows the summary of the study about the
amount of tremor detected in the bodies of each rat after the experiment. A
biologist claims that the average tremors of the experiment group (fed with
pesticide) exceed the average tremors of the control group by less than seven
times. Assume that both variances are unknown.
239
Chapter 5 : Hypothesis Testing
Poisoned Control
x p 7.6 xc 9.483
s p 6.313 sc 1.973
n p 40 nc 40
4. Nine birds and ten cats were tested to determine if there is a difference in the
average number of days that the animal can survive without food. The birds
averaged 11 days with a standard deviation of 2 days while the cats averaged
12 days with a standard deviation of 3 days. What can be concluded at 0.01
level of significance ? Assume that the population variances are equal but
unknown.
240
Chapter 5 : Hypothesis Testing
9. A recent drug survey showed an increase in use of drugs and alcohol among
local high school seniors as compared to the national percent. Suppose that a
survey of 100 local seniors and 100 national seniors is conducted to see if the
percentage of drug and alcohol use is higher locally than nationally. Locally,
65 seniors reported using drugs or alcohol within the past month, while 60
national seniors reported using them. Use a 0.05 level of significance to test
the claim.
241
Chapter 5 : Hypothesis Testing
11. We are interested in whether the percents of female suicide victims for ages
15 to 24 are the same for the white and the black races in the United States.
We randomly pick one year, 1992, to compare the races. The number of
suicides estimated in the United States in 1992 for white females is 4930. 580
were aged 15 to 24. The estimate for black females is 330. 40 were aged 15
to 24. We will let female suicide victims be our population. (Source: the
National Center for Health Statistics, U.S. Dept. of Health and Human
Services). Use a 0.01 level of significance to test the claim.
12. At Rachel’s 11th birthday party, 8 girls were timed to see how long (in
seconds) they could hold their breath in a relaxed position. After a two-
minute rest, they timed themselves while jumping. The girls thought that the
jumping would not affect their times, on average. Test their hypothesis by
using a 0.01 level of significance.
Relaxed time (seconds) Jumping time (seconds)
26 21
47 40
30 28
22 21
23 25
45 43
37 35
29 32
13. Elizabeth Mjelde, an art history professor, was interested in whether the value
from the Golden Ratio formula ((larger + smaller dimension)/larger
dimension) was the same in the Whitney Exhibit for works from 1900 – 1919
242
Chapter 5 : Hypothesis Testing
as for works from 1920 – 1942. 37 early works were sampled. They
averaged 1.74 with a standard deviation of 0.11. 65 of the later works were
sampled. They averaged 1.746 with a standard deviation of 0.1064. Do you
think that there is a significant difference in the Golden Ratio calculation?
(Source: data from Whitney Exhibit on loan to San Jose Museum of Art). Use
a 0.01 level of significance to test the claim.
Wife’s score 2 2 3 3 4 2 1 1 2 4
Husband’s score 2 2 1 3 2 1 1 1 2 4
15. Ten individuals went on a low–fat diet for 12 weeks to lower their cholesterol.
Evaluate the data below. Do you think that their cholesterol levels were significantly
lowered? Use a 0.1 level of significance to test the claim.
243
Chapter 5 : Hypothesis Testing
360 300
280 300
260 240
16. Eight runners were convinced that the average difference in their individual
times for running one mile versus race walking one mile was at most 2
minutes. Below are their times. Do you agree that the average difference is at
most 2 minutes? Use a 0.02 level of significance to test the claim.
17. Marketing companies have collected data implying that teenage girls use more ring
tones on their cellular phones than teenage boys do. In one particular study of 40
randomly chosen teenage girls and boys (20 of each) with cellular phones, the
average number of ring tones for the girls was 3.2 with a standard deviation of 1.5.
The average for the boys was 1.7 with a standard deviation of 0.8. Conduct a
hypothesis test to determine if the averages are approximately the same or if the girls’
average is higher than the boys’ average. Use a 0.01 level of significance to test
the claim.
18. Parents of teenage boys often complain that auto insurance costs more, on
average, for teenage boys than for teenage girls. A group of concerned parents
244
Chapter 5 : Hypothesis Testing
examines a random sample of insurance bills. The average annual cost for 36
teenage boys was $679. For 23 teenage girls, it was $559. From past years, it
is known that the population standard deviation for each group is $180.
Determine whether or not you believe that the average cost for auto insurance
for teenage boys is greater than that for teenage girls. Use a 0.05 level of
significance to test the claim.
19. A group of transfer bound students wondered if they will spend the same
average amount on texts and supplies each year at their four-year university as
they have at their community college. They conducted a random survey of 54
students at their community college and 66 students at their local four-year
university. The sample means were $947 and $1011, respectively. The
population standard deviations are known to be $254 and $87, respectively.
Conduct a hypothesis test to determine if the averages are statistically the
same by using a 0.1 level of significance.
20. Some manufacturers claim that non-hybrid sedan cars have a lower average
miles per gallon (mpg) than hybrid ones. Suppose that consumers test 21
hybrid sedans and get an average 31 mpg with a standard deviation of 7 mpg.
Thirty-one non-hybrid sedans average 22 mpg with a standard deviation of 4
mpg. Suppose that the population standard deviations are known to be 6 and
3, respectively. Conduct a hypothesis test to the manufacturers claim by using
a 0.01 level of significance.
245
Chapter 5 : Hypothesis Testing
SUMMARY CHAPTER 5
Step 3
Compute the test statistic.
Step 4
Make a decision to reject or fail to reject the null hypothesis. A picture showing the
critical value and test statistic may be useful.
Step 5
Write the conclusion.
246
Chapter 5 : Hypothesis Testing
B Known n1 , n2 30 ( X 1 X 2 ) ( 1 2 )
Z Test
12 22
n1 n2
C Unknown n1 , n2 30 ( X 1 X 2 ) ( 1 2 )
Z Test
s12 s2
2
n1 n2
D Unknown (Equal) n1 , n2 30 ( X 1 X 2 ) ( 1 2 )
TTest
1 1
Sp
n1 n 2
v n1 n2 2
E Unknown (Not equal) n1 n 2 30 ( X 1 X 2 ) ( 1 2 )
TTest
1 2
n
s1 s 22
v 2(n 1)
F Unknown (Not equal) n1 , n2 30 ( X 1 X 2 ) ( 1 2 )
TTest
s12 s2
2
n1 n2
2
s12 s22
v 12
n n2
2
s12 s22
n1 n2
n1 1 n2 1
247
Chapter 5 : Hypothesis Testing
248