Semester 3 Chapter 17 Hypothesis Testing
Hypothesis Testing
1. In hypothesis test, we test a certain given theory or belief about a population parameter. Using some
sample information, we may want to know whether a given claim (or statement) about a population
parameter is true or not. Then, we can either accept or reject the given theory or belief. This chapter
discusses how to make such tests of hypothesis about the population mean and the population
proportion.
2. The hypothesis test can be summarized in four steps.
a) Step 1: State the null hypothesis and alternative hypothesis
b) Step 2: Calculate the test statistic.
c) Step 3: Specify the significant level and determine the rejection region
d) Step 4: Make a decision.
Step 1 : State the null hypothesis and alternative hypothesis
1. Null Hypothesis (H0)
A Null Hypothesis is a claim (or statement) about a population parameter that is assumed to be true
until it is declared false. H0 is the hypothesis that we hope to reject. H0 states that a parameter has
some precise value: - The value that occurred in the past.
- The value claimed by some person
- The value that is supposed to occur
When trying to identify the null hypothesis, look for the following phrases:
- “It is known that…”
- “Previous research shows…”
- “The average of …..”
The null hypothesis is usually stated using the equality sign “=”. The cases of “≥” and “≤” are
covered by using “=”.
2. Alternative Hypothesis (H1)
An alternative hypothesis is a claim (or statement) about a population parameter that will be true if
the null hypothesis is false.
When writing the Alternate Hypothesis, make sure it never includes an “=” symbol. It should look
similar to one of the following:
- e.g. H1: µ < 40 minutes
- e.g. H1: µ > 40 minutes
- e.g. H1: µ ≠ 40 minutes
3. Sometimes the null hypothesis is “… at least (or at most) … a specified value”.
In this case, the H0 is µ ≥ ( or ≤ ). However, H0 is always stated using the equality sign “=”.
Therefor
H0 : = (at least ≥) or H0 : = (at most ≤)
H1 : < H1 : >
Edited By Lieu Ai Lin 175
Semester 3 Chapter 17 Hypothesis Testing
Example 17.1:
1. A teacher recorded all the grades of his previous batch of students, and found that the population
mean for all these student’s grades was 72. Based on the sample mean grade of 75.2 calculated
from a random sample of 40 students from the present batch of students, the teacher claims that the
present batch of students is better. Is the sample mean grade of 75.2 evidence enough to support the
teacher’s claim? Formulate the null hypothesis and alternative hypothesis
(i) to test the teacher’s claim
(ii) to test if there is a significant difference in ability the two batches of students.
(i) H0 : = 72 (ii) H0 : = 72
H1 : > 72 H1 : ≠ 72
2. 1500 randomly selected pine trees were tested for traces of the Bark Beetle infestation. It was
found that 153 of the trees showed such traces. Test the hypothesis that more than 10% of the
Tahoe trees have been infested. State the null and alternative hypothesis for the research.
H0 : p = 0.1
H1 : p > 0.1 *the purpose of the test is mentioned in H1
3. Someone claims that at least 50% of men who use Rogaine can be expected to show minimal to
dense growth. A random sample of 714 men was selected and found that at least 419 men show
minimal growth. Formulate the null and alternative hypothesis to test the claim.
H0 : p = 0.5
H1 : p < 0.5
Exercise 17.1:
1. Up until January 2000, the daily number of deaths and serious injuries suffered by drivers due to
road accidents in a certain country had mean 3.16. In January 2000, the wearing of seat belts was
made compulsory. During a period of 1000 days after that, there was a total of 2978 deaths and
serious injuries.
Formulate the null and alternative hypothesis to test for the effectiveness of seat belts in reducing
the casualty rate.
2. If 40% of the nation likes reading. Does the Johor state environment reflect the national
proportion? Test the hypothesis that Johor residents differ from the rest of the nation in their
affiliation, if of 200 locals surveyed, 75 like reading.
3. If 10% of California residents are vegetarians, test the hypothesis that people who gamble are less
likely to be vegetarians. If the 120 people polled, 10 claimed to be a vegetarian.
4. A drug is claimed to have a 40% success rate for curing patients with a certain disease. This is
suspected of being an exaggeration. To test this claim, 16 people were treated with one drug and it
was found that 3 were cured. Carry out a test at the 10% significance level.
5. A drug is claimed to have a 40% success rate for curing patients with a certain disease. A doctor
wishes to test whether this success rate is correct. The doctor gives the drug to 16 patients and finds
that 3 are cured. Carry out a hypothesis test using a 10% level.
6. A drug is claimed to have a 40% success rate for curing patients with a certain disease. A doctor
suspected that the rate can be better than that. To test the claim, the doctor gives the drug to 16
patients and finds that 3 are cured. Carry out a hypothesis test using a 10% level.
Edited By Lieu Ai Lin 176
Semester 3 Chapter 17 Hypothesis Testing
7. A company makes many food products. The food products are produced and packaged for
distribution around the world. If the packaging process is working properly, the mean fill per box is
16 g. Every hour quality analysts at the plant select a random sample of filled boxes and measure
their contents, to test whether the packaging process is working properly. State the null and
alternative hypothesis for the testing.
8. The TSA Company is responsible for screening passengers at KL airports, publishes on its Web site
the average waiting times for customers to pass through security. On Mondays between 9.00 and
10.00 am, the average waiting time at KL airport is supposed to be 15 minutes. Periodically, TSA
staff will select a random sample of passengers during this time slot and measure their actual wait
time. These sample data will be test using the null and alternative hypothesis. State the null and
alternative hypothesis used.
9. A survey made by the Human Resource Ministry states that the average monthly salary of an
executive is RM 4100 with a standard deviation of RM 680. However, a sample of 25 executives
selected recently gives an average monthly salary per month of RM 3850. Assuming that the
average monthly salary of an executive is normally distributed, test, at the 1% significant level,
whether the ministry’s claim is too high.
10. The length of a particular type of iron nails produced by a manufacturer has standard deviation 6.8
mm. The target length for an iron nail is 38 mm. A supervisor takes length measurement of a
random sample of 100 nails and obtains a sample mean length of 39.4 mm. Test whether the mean
length is on target. Use the 5% significant level.
Answer 17.1:
1. H0 : = 3.16
H1 : < 3.16
2. H0 : p = 0.4 * the purpose of the test is mentioned in H1
H1 : p 0.4
3. H0 : p = 0.1 * the purpose of the test is mentioned in H1
H1 : p < 0.1
4. H0 : p = 0.4
H1 : p < 0.4
5. H0 : p = 0.4
H1 : p 0.4
6. H0 : p = 0.4
H1 : p > 0.4
7. H0 : = 16 g * the purpose of the test is mentioned in H0
H1 : 16 g *not working properly means ≠
8. H0 : = 15 minutes (within 15 minutes ≤)
H1 : > 15 minutes
9. H0 : = RM 4100 *the claim is to high
H1 : < RM 4100 * we are interested whether it is <
Edited By Lieu Ai Lin 177
Semester 3 Chapter 17 Hypothesis Testing
10 H0 : = 38 mm *we are interested whether it is = 38mm
H1 : 38 mm * we do not bother whether it is < or >
Step 2: Calculate the test statistic for testing population mean
1. Sample mean x , is used to test the population mean.
2. When testing the population mean of a normal population X, the test statistic is X ,
where X ~ N (, 2 )
n
3. When testing the population mean of a non-normal population X, the test statistic is X ,
where X ~ N (, 2 ) approximately, under CLT
n
4. In standardized form, X is converted to Z-score.
z = x − o
n
where o is the mean which specified in H0
x is the sample mean
5. If 2 is unknown, then use estimate variance ˆ 2
z = x − o
ˆ
n
Step 3 : Specify the significant level and determine the rejection region
Significance level of %
1. There are four outcomes for making decision.
H0 is accepted
H0 is false Type II error Correct decision H0 is true
1–
Correct decision Type I error
1–
H0 is rejected
2. = The maximum probability of rejecting H0 when H0 is true
= The maximum probability of making Type I error
P(Type I error) = P(Reject H0 | H0 is true) ≤
is called the significance level in hypothesis test
= Probability of making Type II error (Not in STPM syllabus)
Edited By Lieu Ai Lin 178
Semester 3 Chapter 17 Hypothesis Testing
3. Explain % significance level :
E.g. :
5% significance level means that the probability of rejecting H0 when H0 is true is 0.05.
4. In context of the question,
% significance level means that there is a probability of that the test shows that (… as stated
100
in H1….), when actually (…..as stated in H0 …..).
Example 17.2:
1. 1500 randomly selected pine trees were tested for traces of the Bark Beetle infestation. It was
found that 153 of the trees showed such traces. Test at 2% significance level that more
than 10% of the Tahoe trees have been infested.
a) State the null and alternative hypothesis for the research.
b) State what you understand by the expression at “2% significance level” in the context of the
question.
Solution:
(a) H0 : p = 0.1
H1 : p > 0.1
(b) “2% significance level” means that there is a probability of 0.02 that the test shows that
more than 10% of the Tahoe trees have been infested, when in fact it is10% of the Tahoe
trees have been infested
2. On a remote island, a zoologist measures the tail lengths of a random sample of 50 squirrels. In a
species of squirrel known to her, the tail lengths have mean 14.0cm. She carries out a test, at the 5%
significance level, of whether squirrels on the island have the same mean tail length as the species
known to her.
a) State the appropriate hypothesis for the test.
b) Explain the meaning of “5% significance level” in the context of the question.
Solution:
(a) H0 : µ = 14.0cm
H1 : µ ≠ 14.0cm
(b) “5% significance level” means that there is a probability of 0.05 that the test shows that
the mean tail lengths of the squirrels on the island is not 14.0 cm, when in fact the
mean tail lengths of the squirrels on the island is 14.0 cm.
Exercise 17.2:
1. The management of a firm producing mugs is not satisfied with 20% of mugs being defective and
introduces a new process to reduce the proportion of defective mugs. A random sample of 20 mugs,
produced by the new process, contains just one which is defective. Test, at the 5% level of
significance, whether it is reasonable to suppose that the proportion of defective mugs has been
reduced.
a) Stating your null and alternative hypotheses clearly.
b) Explain the meaning of “5% significance level” in the context of the question.
2. Mary’s father claims that on average a person takes 20 minutes to find a parking space in the area.
Mary disagrees and she takes a random sample of 30 times that she drove to work. She found that
the mean time taken to find a parking space is 17 minutes. Assuming that the time taken to find a
parking space follows a normal distribution with standard deviation equal to 10 minutes. Test, at
the 3 % level of significance, whether Mary’s father is overstating the mean time taken to find a
parking space.
Explain the meaning of “3% level of significance” in the context of the question.
Edited By Lieu Ai Lin 179
Semester 3 Chapter 17 Hypothesis Testing
3. The proportion of fans of a certain football club who are able to explain to offside rule correctly is .
A random sample of 10 fans of the football club is selected and 6 fans are able to explain the
offside rule correctly. A test is carried out with the null hypothesis
0 : = 0.8 against the alternative hypothesis 1 : < 0.8 at the 10% significance level.
Explain the meaning of “10% level of significance” in the context of the question.
4. A manufacturer of alkaline batteries may want to certain that fewer than 5% of its batteries are
defective. Suppose 300 batteries are randomly selected from a large shipment and 10 defective
batteries are found. At a 1% of significance level, does this provide sufficient evidence for the
manufacturer to conclude that the fraction defective in the entire shipment is less than 0.03.
Explain the meaning of “1% level of significance” in the context of the question.
5. People who diet can expect to lose an average of 3 kg in a month. In a book, the authors claim that
people who follow a new diet will lose an average of more than 3 kg in a month. The weight losses
of the 180 people in a random sample who had followed the new diet for a month were noted. The
mean was 3.3 kg and the standard deviation was 2.8 kg. A test a carried out to test the authors’
claim at the 2% significance level.
Explain the meaning of “2% level of significance” in the context of the question.
Answer 17.2:
1. (a) H0 : p = 0.2
H1 : p < 0.2
(b) “5% significance level” means that there is a probability of 0.05 that the test shows that
the proportion of defective mugs is less than 0.2, when in fact the proportion of defective mugs
is 0.2.
2. (a) H0 : = 20 minutes
H1 : < 20 minutes
(b) “3% significance level” means that there is a probability of 0.03 that the test shows that
the mean time taken to find a parking space is less than 20 minutes, when actually the mean time
taken is 20 minutes.
3. “10% significance level” means that there is a probability of 0.10 that the test shows that
the proportion of fans who are able to explain correctly is less than 0.8, when in fact the proportion
is 0.8.
4. (a) H0 : p = 0.03
H1 : p < 0.03
(b) “1% significance level” means that there is a probability of 0.01 that the test shows that
the fraction defective in the entire shipment is less than 0.03, when actually the fraction
defective is 0.03
5. (a) H0 : = 3 kg
H1 : > 3 kg
(b) “2% significance level” means that there is a probability of 0.02 that the test shows that
people who follow a new diet will lose an average of more than 3 kg in a month, when in fact the
average is 3 kg in a month.
Edited By Lieu Ai Lin 180
Semester 3 Chapter 17 Hypothesis Testing
Rejection Region
1. Rejection region is a set of values that leads to the rejection of the null hypothesis.
a) Rejection region by using critical value
b) Rejection region by using probability value
2. For upper-tail test
H1 : >
The test statistics, z = x − o
n
By using critical value:
Critical values = z
Rejection region:
H0 is rejected if z z
3. For H1 : < :
The test statistics, z = x − o
n
By using critical value:
Critical values = − z
Rejection region:
H0 is rejected if z −z
4. For H1 : ≠ :
The test statistics, z = x − o
n
By using critical value:
Critical values = Z
2
Rejection region:
H0 is rejected if z Z or z −Z
22
Edited By Lieu Ai Lin 181
Semester 3 Chapter 17 Hypothesis Testing
5. In normal cases, rejection region is found based on critical value. However,
a) If is unknown, then the critical value Z is unknown or
b) If x or or n is unknown, then the test statistics z is unknown.
In this case rejection region can be found by using probability value.
Step 4: Make a decision.
1. The value of Z calculated is compared with critical value.
a) If Z calculated falls in the rejection region, then H0 is rejected.
b) If Z calculated does not fall in the rejection region, then H0 is not rejected.
2. If H0 is rejected, then the conclusion: It is sufficient evidence to conclude that … as stated in H1.
3. If H0 is not rejected, then the conclusion: It is insufficient evidence to conclude that … as stated in
H1.
Hypothesis Testing For Population Mean
Example 17.3:
1. Testing population mean: large sample, known population variance, any population
distribution
The length of a particular type of iron nails produced by a manufacturer has standard deviation 6.8
mm. The target length for an iron nail is 38 mm. A supervisor takes length measurement of a
random sample of 100 nails and obtains a sample mean length of 39.4 mm. Test whether the
mean length is on target. Use the 5% significant level.
Step 1: Let = the mean length of an iron nail
H0 : = 38 mm *we are interested whether it is = 38mm
H1 : 38 mm * we do not bother whether it is < or >
Step 2: z= x− = 39.4 − 38 = 2.058
6.8
n 100
Step 3: = 0.05 = 0.025 Rejection Rejection
2 Region Region
Critical value = Z0.025 = ±1.96 –1.96 1.96
H0 is rejected if z < –1.96 or z > 1.96
Step 4: Since z = 2.056 > 1.96 and thus H0 is rejected.
At 5% significant level, it is sufficient evidence to conclude that the mean
length is not 38 mm.
Hence, the mean length is not on target.
2. Testing population mean: large sample, unknown population variance, any population
distribution
A sample of 60 watches of a particular brand is checked for accuracy at 10:00:00 hours. Let
denotes the true mean watch reading when the actual time is 10:00:00 hours. The resulting sample
mean and sample standard deviation are 10:00:01.2 hours and 1.8 seconds respectively. Use a
significant level of 1% to decide whether the evidence from the sample suggests the watches
are fast.
Step 1: H0 : = 10:00:00 hours
H1 : > 10:00:00 hours * the watch are fast means > 10:00:00
Edited By Lieu Ai Lin 182
Semester 3 Chapter 17 Hypothesis Testing
Step 2: s = 1.8 s2 = 1.82
ˆ 2 = n s2 = 60 1.82
Step 3:
Step 4: n −1 60 −1
ˆ = 60 1.82 = 1.8152
60 −1
z= x− = 1.2 − 0 = 5.1207
ˆ 1.8152
n 60 Rejection
Region
= 0.01
Critical value = z0.01 = 2.326 2.326
H0 is rejected if z >2.326
Since z = 5.1207 > 2.326 and thus H0 is rejected.
At 1% significant level, it is sufficient evidence to conclude that the true mean
watch reading is faster than 10:00:00 hours.
Hence, the watches are fast
3. Testing population mean: small sample, normal distribution, known population variance,
A survey made by the Human Resource Ministry states that the average monthly salary of an
executive is RM 4100 with a standard deviation of RM 680. However, a sample of 25 executives
selected recently gives an average monthly salary per month of RM 3850. Assuming that the
average monthly salary of an executive is normally distributed, test, at the 1% significant level,
whether the ministry’s claim is too high.
Step 1: Let = the mean monthly salary of an executive claimed by the Human
Resource Ministry
H0 : = RM 4100 *The ministry’s record is RM4100
H1 : < RM 4100 * It is believe that it should be less than RM4100
Step 2: z= x− = 3850 − 4100 = −1.838
Step 3: 680
Step 4:
n 25 Rejection
Region
= 0.01
Critical value = z0.01 = –2.326 –2.326
H0 is rejected if z < –2.326
Since z = –1.838 > –2.326 and thus H0 is not rejected.
At 1% significant level, it is insufficient evidence to conclude that the average
monthly salary of an executive is less than RM4100.
Hence, the ministry’s claim is not too high.
Edited By Lieu Ai Lin 183
Semester 3 Chapter 17 Hypothesis Testing
4. A particular brand of rabbit feed is packed into packets. The manufacturer claims that the content of
each packet is 2 kg. The mass, x kg, of 20 packets of rabbit feed was measured, and it was found
that x = 39.2 and x2 = 77.022
a) Find unbiased estimates of the population mean and variance. [1.96, 0.01]
b) Assuming that the mass of rabbit feed is normally distributed. It is found that a test at % level of
significance, the actual mass had been overstated. Find the set of possible values of .
Solution:
(b) H0 : = 2
H1 : < 2
z = 1.96 − 2 = −1.7889
0.01/ 20
Let % = the significance level
Critical value = z
H0 is rejected if z < z
H0 is rejected if P(Z < z) < P(Z < z)
H0 is rejected if P(Z < –1.7889) ≤
The actual mass had been overstated H0 is rejected
P(Z < –1.7889) ≤
0.0367 ≤
3.67% ≤ %
Hence, the set of possible values of is 3.67 % ≤ ≤ 100%
5. A random sample of 100 data is taken from a population with mean and standard deviation 15.
Find the sample mean so that a decision can be made in favour of the hypothesis > 35 at the 10%
significance level.
Step 1: H0 : = 35
H1 : > 35
X ~ N 35, 152 approximately Rejection
100 Region
z = x − 35 1.282
15
100
Critical value = Z0.1 = 1.282
H0 is rejected if z > 1.282
In order to reject H0, z > 1.282
x − 35 1.282
15
100
x 36.92
Edited By Lieu Ai Lin 184
Semester 3 Chapter 17 Hypothesis Testing
Exercise 17.3:
1. A traffic officer notes the speeds of vehicles as they pass a certain point. In the past the mean of
these speeds has been 62.3 km/h and the standard deviation has been 10.4 km/h. A speed limit is
introduced, and following this, the mean of the speeds of 75 randomly chosen vehicles passing the
point is found to be 59.9 km/h.
a) Making an assumption that should be stated, test at the 2% significance level whether the mean
speed has decreased since the introduction of the speed limit.[Assume SD unchanged: Not reject H0]
b) Explain whether it was necessary to use the Central Limit Theorem in part (a).
2. The duration, in hours, spent on internet per week of a student has mean and variance 2. A
random sample of the duration spent on internet per week for 120 students is summarized as
follows: x = 2400 , x2 = 116544
a) Find the unbiased estimates for variance 2. [ x = 20 , ˆ 2 = 576 ]
b) The disciplinary teacher claims that students spent more than 23 hours weekly on internet. Perform
hypothesis test on the claim at the 10% significance level. [Not rejected]
3. Records show that the distance driven by a bus driver in a week is normally distributed with mean
1150 km and standard deviation 105 km. New driving regulations are introduced and in the next
20 weeks he drives a total of 21 800 km.
a) Stating any assumption(s), test, at the 1% significance level, whether his mean weekly driving
distance has decreased.
b) A similar test at the 1% significance level was carried out using the data from another 20 weeks.
State the probability of a Type I error and describe what is meant by a Type I error in this context.
4. A farmer knows from experience that the weights of any crop of tomatoes grown organically are
normally distributed with mean 220 g. For the current crop, the farmer tried a new fertiliser which
the manufacturer claims will increase the mean weight of the tomatoes. He decided to test the
manufacturer’s claim by taking a random sample of 50 tomatoes. The mass of each tomatoes, x g,
in the sample is measured and the following results are obtained:
(x − 200) = 1581 and (x − 200)2 = 94091
a) Carry out the appropriate test, at the 1% significance level. H1> 220 [H0 is rejected]
b) State, giving a reason, whether this test would remain valid if the distribution of the weight of the
tomatoes had not been normal.
5. The time taken for the pupils in Ming’s year group to do their English homework have a normal
distribution with standard deviation 15.7 minutes. A teacher estimates that the mean time is 42
minutes. The times taken by a random sample of 3 students from the year group were 27, 35 and 43
minutes. Carry out a hypothesis test at the 10% significance level to determine whether the
teacher’s estimate for the mean should be accepted, stating the null and alternative hypothesis.
[H0 is not rejected]
6. A manufacturer invented a new device to be attached to the engine of cars to improve fuel
consumption. A test is to be carried out to investigate the effect of the device on the rate of fuel
consumption of cars. The device was attached to the engines of 100 cars of a particular model in
which rate of fuel consumption is known to have a mean of 0 km per litre. The results are
summarized as follows:
(x −16) = 173.4 and (x −16)2 = 323.12
A statistical test is carried out at 8% level of significance and it is found that the device has no
impact on rate of fuel consumption. Find the range of values of 0. [17.7 < 0 < 17.8]
Edited By Lieu Ai Lin 185
Semester 3 Chapter 17 Hypothesis Testing
7. Metal bolts are produced in large numbers and have lengths which are normally distributed with
mean 2.62 cm and standard deviation 0.30 cm.
a) Find the probability that a random sample of 45 bolts will have a mean length of more than 2.55 cm.
b) The machine making these bolts is given an annual service. This may change the mean length of
bolts produced but does not change the standard deviation. To test whether the mean has changed,
a random sample of 30 bolts is taken and their lengths noted. The sample mean length is m cm.
Find the set of values of m which result in rejection at the 10% significance level of the hypothesis
that no change in the mean length has occurred. (a) 0.941; (b) m < 2.53 or m > 2.71
8. On a remote island, a zoologist measures the tail lengths of a random sample of 50 squirrels. In a
species of squirrel known to her, the tail lengths have mean 14.0cm. She carries out a test, at the 5%
significance level, of whether squirrels on the island have the same mean tail length as the species
known to her. She assumes that the tail lengths of squirrels on the island are normally distributed
with standard deviation 3.6 cm.
The sample mean tail length is denoted by ̅ cm. Use an algebraic method to calculate the set of
values of ̅ for which the null hypothesis would not be rejected. [13.0≤ ̅ ≤ 15.0]
9. The masses of components produced at a particular workshop are normally distributed with
standard deviation 0.8 g. It is claimed that the mean mass is 6 g. To test this claim the mean mass of
a random sample of 50 components is calculated and a hypothesis test at 5% level of significance
carried out. On the basis of the test, the claim is accepted. Between what values did the mean mass
of the 50 components in the sample lies? (5.7783, 6.2217)
10. Electronic Road Pricing (ERP) is an electronic system of road pricing based on a pay-as-you-use
principle. ERP has been effective in maintaining an optimal speed of 60 km/h for expressways. In
general, ERP rates will be increased if the optimal speed is less than 60 km/h. The relevant
authority reviewed the traffic conditions on a particular expressway by measuring the speed of 150
randomly selected cars as they pass a camera. The speed, x km/h, was recorded. The results are
summarized by:
(x − 50) = 1335 and (x − 50)2 = 23580 .
a) Find the unbiased estimates of the population mean and variance. [58.9, 78.5]
b) State, with a reason, whether in doing the above test, it is necessary to assume that the speed of the
cars have a normal distribution.
c) A test is carried out to test whether the ERP rates need to be increased for this particular
expressway. Find the smallest level of significance, correct to 2 decimal places, at which the test
would result in the rejection of the null hypothesis. [6.43%]
Answer 17.3:
1. b) Yes, population distribution unknown
2. Step 1: H0 : = 23
H1 : > 23
*we are interested whether the claim is true > 23
3. a) Assume population SD is same as 105; H0 is rejected
b) 0.01; The test concludes that the mean distance has decreased when actually it has not decreased
4.b) The test would still remain valid if the distribution of the weight of the tomatoes had
not been normal, since the sample size n = 50 > 30 is large, and so by Centre Limit
X ~ , ˆ 2
n
Theorem:
Edited By Lieu Ai Lin 186
Semester 3 Chapter 17 Hypothesis Testing
5. b) H1 ≠ 1850 km 6. H1 ≠ 42
11. b) It is not necessary to assume that the speed of the cars have a normal distribution,
11. c) since the sample size n = 150 > 30 is large, and so by Centre Limit Theorem:
X ~ N (, ˆ 2 / n)
H0 : = 60
H01: < 60
Hypothesis Testing For Population Proportion
1. In testing the population proportion P , the sample proportion ps is used
where Ps ~ N Po , Po (1 − Po ) approximately, using CLT
n
In standardized form, Ps is converted to Z-score.
z = Ps − Po
Po (1 − Po )
n
where Po is the proportion which specified in H0
Ps is the sample proportion
When n is large
1. Same working steps as hypothesis testing for population mean.
test statistics z = Ps − Po
Po (1 − Po )
n
When n is small
1. Rejection region is found by using Binomial probability value
a) Upper tail test Ps = k
H1 : p > n
Rejection Region
n
Calculate P(X ≥ k) = nCx p0 x (1 − p0 )n− x
x=k
P(X ≥ k) > P(X ≥ k) <
k k
If P(X ≥ k) > , then H0 is not rejected. If P(X ≥ k) < , then H0 is rejected.
Therefore, H0 is rejected if the P(X ≥ k) ≤
Edited By Lieu Ai Lin 187
Semester 3 Chapter 17 Hypothesis Testing
b) Lower tail test
H1 : p < Rejection Region
k nCx p0 x (1 − p0 )n− x
Calculate P(X ≤ k) =
x=0
P(X ≤ k ) > P(X ≤ k) <
k k
If P(X ≤ k) > , then H0 is not rejected. If P(X ≤ k) < , then H0 is rejected.
Therefore,
H0 is rejected if the P(X ≤ k) ≤
c) Two-tailed test Mean of X Rejection Rejection
H1 : p Region Region
Calculate P(X ≤ k) if k < nP0 , or 2 2
P(X ≥ k) if k > nP0 .
X
Therefore,
H0 is rejected if P(X ≤ k) ≤ Or P(X ≥ k) ≤
22
2. However,
a) if k is unknown and the sample size is large, then rejection region is found by using critical value.
test statistics z = Ps − Po
Po (1 − Po )
n
b) if k is unknown and the sample size is small, then the Binomial probability value is unknown.
In this case, find the critical value x where P( X x) = x Cr pr (1 − p)n−r in order to
r =0
determine the rejection region.
H1
k <
P( X k) = Cx p x (1 − p)n−x
x=0
P( X = k +1 p)n−x >
k + 1) Cx p x (1 −
x=0
Since P( X k) P( X k + 1) , thus the critical value x = k
The rejection region : H0 is rejected if P( X k) or
H0 is rejected if x {0,1,2,.....,k}
Edited By Lieu Ai Lin 188
Semester 3 Chapter 17 Hypothesis Testing
Example 17.4:
1. Testing population proportion: large sample
A botanist has produced a new variety of hybrid rice grain that has better ability to resist stem borer
than other varieties. He knows that 82% of the seeds from the parent plants germinate. He claims
the hybrid has the same germination rate. 300 seeds from the hybrid plants are tested and 233
germinated. Test the botanist’s claim at the 2% significance level.
Step 1: Let p = the proportion of seeds from the new hybrid plant germinated
H0 : p = 0.82
H1 : p 0.82 * different germination rate
Step 2: z= ps − p0 = 233 − 0.82 = −1.952
Step 3: 300
Step 4:
p0 (1− p0 ) 0.82(1− 0.82)
n 300
= 0.02 = 0.01 Rejection Rejection
2 Region Region
Critical value = z0.01 = ±2.326 –2.326 2.326
H0 is rejected if z < –2.326 or z > 2.326
Since z = –1.952 > –2.326 and thus H0 is not rejected.
At 2% significant level, it is insufficient evidence to conclude that the rate of
germination for the hybrid plant is not 0.82.
Hence, the hybrid does not have the same germination rate.
2. Testing population proportion: small sample (One-tailed test)
An airline claims that, on average, 6% of its flights are delayed each day. However some customers
complaint that the proportion of delayed flights is more than 6%. From 20 sample flights selected
randomly, 2 are delayed. Test a hypothesis that the proportion of delayed flights is 6% at the
significance level of 0.05.
Step 1: Let p = the proportion of delayed flights
H0 : p = 0.06 *the purpose of the test is mentioned in H0
H1 : p > 0.06 *we also interested whether the customers’ complaint is
correct.
Step 2: Since small sample size,
P(X ≥ 2)
= 1 −20 C0 (0.06)0 (0.94)20 −20 C1(0.06)1(0.94)19
= 1 – (0.94)20 – 1.2(0.94)19
= 0.3396
Step 3: = 0.05 0.05
Step 4: H0 is rejected if the P(X ≥ 2) ≤ 0.05
Since P(X ≥ 2) = 0.3396 > 0.05, thus H0 is not rejected.
At 5% significant level, it is insufficient evidence to conclude that the average
of delayed flight is more than 6% each day.
Hence, the proportion of delayed flights is 6%.
Edited By Lieu Ai Lin 189
Semester 3 Chapter 17 Hypothesis Testing
3. Testing population proportion: small sample (One-tailed test)
A drug is claimed to have a 40% success rate for curing patients with a certain disease. This is
suspected of being an exaggeration. To test this claim, 16 people were treated with one drug and it
was found that 3 were cured. Carry out a test at the 10% significance level.
Step 1: Let p = the proportion of patients cured
H0 : p = 0.4
H1 : p < 0.4
Step 2: The sample size is small, 0.10
P(X ≤ 3) = 3 16Cx (0.4) x (0.6)16− x
x=0
= 0.06515
Step 3: = 0.10
H0 is rejected if P(X ≤ 3) ≤ 0.10
Step 4: Since P(X ≤ 3) = 0.06515 < 0.10, thus H0 is rejected.
At 10% significant level, it is sufficient evidence to conclude that the success
rate is less than 0.4.
Hence, the drug has a success rate less than 40%.
4. Testing population proportion: small sample (Two-tailed test)
A drug is claimed to have a 40% success rate for curing patients with a certain disease. A doctor
wishes to test whether this success rate is correct. The doctor gives the drug to 16 patients and
finds that 3 are cured. Carry out a hypothesis test using a 10% level.
Step 1: Let p = the proportion of patients cured
H0 : p = 0.4 *We are not indicating whether the success
H1 : p 0.4 rate is believed to be too high or too low.
Step 2: Since small sample size and np = 16 0.4 = 6.4
3 < 6.4
P(X ≤ 3)
= 16 C0 (0.4)0 (0.6)16 +16 C1(0.4)1(0.6)15
+16 C2 (0.4)2 (0.6)14 +16 C3 (0.4)3 (0.6)13
= 0.06515
Step 3: = 0.10 0.05 0.05
= 0.05
2
H0 is rejected if P(X ≤ 3) ≤ 0.05
Step 4: Since P(X ≤ 3) = 0.06515 > 0.05, thus H0 is not rejected.
At 10% significant level, it is insufficient evidence to conclude that the success
rate is not 0.4.
Hence, the drug has a 40% success rate.
Edited By Lieu Ai Lin 190
Semester 3 Chapter 17 Hypothesis Testing
5. The manager of Happy Airline claims that there is at most 4% of its flights arriving an airport are
delayed. On 13 September, out of 28 flights, 2 are delayed. Determine smallest significance level
for which the hypothesis that the proportion of delayed flights is 4% is rejected.
H0 : p = 0.04
H1 : p > 0.04 *we are interested whether the data is correct
2 = 0.07 0.04
where 28
1
1 − 28Cx (0.04) x (0.96)28− x = 0.3091
P(X ≥ 2) = x=0
Let = the significance level
H0 is rejected if the P(X ≥ 2) <
Since H0 is rejected, 0.3091 <
> 30.91%
The minimum = 30.91%
Hence, the significance level is 30.91%
6. A company wishes to determine the proportion of defective bulbs has decreased. A random sample
of 500 bulbs is taken, find the maximum number of defective bulbs is permitted for the null
hypothesis p = 0.03 to be rejected at the 5% significance level.
H0 : p = 0.03
H1 : p < 0.03
ps = k
500
k − 0.03 Rejection
z = 500 Region
0.03(0.97) –1.645
500
Critical value = Z0.05 = - 1.645
H0 is rejected if z < - 1.645
For the null hypothesis p = 0.03 to be rejected,
k − 0.03
z = 500
0.03(0.97) −1.645
500
k < 8.725 The maximum number of defective bulbs is permitted is 8.
7 The National Health Morbidity Survey data revealed that 60% of Malaysian adults had a normal
body weight. A random sample of 12 adults is selected. A hypothesis test is carried out to
determine whether the survey has overestimated the claim at 10% significance level.
a) State the null hypothesis and alternate hypothesis.
b) Find the critical region for the test.
Hence, find the probability of a Type I error.
c) It is found that four Malaysian adults in the random sample have a normal body weight.
State with a reason, the conclusion that should be drawn.
Edited By Lieu Ai Lin 191
Semester 3 Chapter 17 Hypothesis Testing
Solution:
(a) Ho : p = 0.6
H1 : p < 0.6
x
(b) P( X x) = 12Cx (0.6)x (0.4)12−x
r =0
4
P( X 4) = 12Cx (0.6)x (0.4)12−x = 0.057310 < 0.10
x=0
5
P( X 5) = 12Cx (0.6)x (0.4)12−x = 0.15821 > 0.10
x=0
Since P( X 4) 0.10 P( X 5) , the critical value x = 4
the critical region : H0 is rejected if x {0, 1, 2, 3, 4}
P(Type I error) = P(reject Ho|Ho is true) = 0.057310
(c) Since X = 4 is in the rejection region, H0 is rejected.
At 10% significance level, there is sufficient evidence to conclude that the survey has
overestimated the claim.
Exercise 17.4:
1. A soft drink maker claims that a majority of adults prefer its leading beverage over that of its main
competitor’s. To test this claim 500 randomly selected people were given the two beverages in
random order to taste. Among them, 270 preferred the soft drink maker’s brand, 211 preferred the
competitor’s brand, and 19 could not make up their minds. Determine whether there is sufficient
evidence, at the 5% level of significance, to support the soft drink maker’s claim against the default
that the population is evenly split in its preference. [H0 is rejected]
2. The Colorectal Cancer Screening Guidelines recommend a colonoscopy every ten years for adults
aged 50 to 75. A public-health researcher believes that only a minority are following this
recommendation. She interviews a simple random sample of 500 adults aged 50–70 in Metropolis
and finds that 235 of them have had a colonoscopy in the past ten years. At the 0.05 level of
significance, is her belief correct? [H0 is not rejected]
3. In an election, a candidate A is interested to find whether majority of the voter will vote for him. In
a random sample of 200 voters, 88 will vote for him. Carry out a test at the 5% significance level to
determine whether majority of the votes will vote candidate A.
4. Before attending a basketball course, a player found that 60% of his shots made a score. After
attending the course the player claimed he had improved. In his next game he tried 12 shots and
scored in 10 of them. Assuming shots to be independent, test this claim at the 10% significance
level. [H0 is rejected]
5. In a certain city it is necessary to pass a driving test in order to be allowed to drive a car. The
probability of passing the driving test at the first attempt is 0.36 on average. A particular driving
instructor claims that the probability of his pupils passing at the first attempt is higher than 0.36. A
random sample of 8 of his pupils showed that 7 passed at the first attempt.
Carry out an appropriate hypothesis test to test the driving instructor’s claim, using a significance
level of 5%. [H0 is rejected]
6. At the 2009 election, 1/3 of the voters in Chington voted for the Citizens Party. One year later, a
researcher questioned 20 randomly selected voters in Chington. Exactly 3 of these 20 voters said
that if there were an election next week they would vote for the Citizens Party. Test at the 2.5%
significance level whether there is evidence of a decrease in support for the Citizens Party, since
the 2009 election. [H0 is not rejected]
Edited By Lieu Ai Lin 192
Semester 3 Chapter 17 Hypothesis Testing
7. Isaac claims that 30% of cars in his town are red. His friend Hardip thinks that the proportion is
less than 30%. The boys decided to test Isaac’s claim at the 5% significance level and found
that 2 cars out of a random sample of 18 were red. Carry out the hypothesis test and state your
conclusion. [H0 is not rejected]
8. Joshi suspects that a certain die is biased so that the probability of showing a six is less than 1/6. He
plans to throw the die 25 times and if it shows a six on fewer than 2 throws, he will conclude that
the die is biased in this way. Find the probability of Type I error and state the significance level of
the test.
Answer 17.4: Let p = the proportion of adults who preferred the maker’s brand
1. Step 1:
H0 : p = 0.50
Step 2:
Step 3: H1 : p > 0.50 * majority of adults prefer its leading beverage
Step 4:
2. Step 1: z= ps − p0 = 270 − 0.50 = 1.789
500
Step 2:
Step 3: p0 (1 − p0 ) 0.50(1 − 0.50)
Step 4:
n 500 Rejection
Region
= 0.05
Critical value = z0.05 = 1.645 1.645
H0 is rejected if z > 1.645
Since z = 1.789 > 1.645 and thus H0 is rejected.
At 5% significant level, it is sufficient evidence to conclude that majority of
adults prefer the company’s beverage.
Hence, ….
Let p = the proportion of adults aged 50 to 75 who followed the ecommendation
H0 : p = 0.50
H1 : p < 0.50 * minority mean under 50%
z= ps − p0 = 235 − 0.50
500 = −1.342
p0 (1 − p0 ) 0.50(1 − 0.50)
n 500 Rejection
= 0.05 Region
Critical value = z0.05 = 1.645
H0 is rejected if z < –1.645
–1.645
Since z = –1.342 > –1.645 and thus H0 is not rejected.
At 5% significant level, it is insufficient evidence to conclude that only a
minority are following the recommendation
Hence, ….
Edited By Lieu Ai Lin 193
Semester 3 Chapter 17 Hypothesis Testing
3. H0 : p = 0.5 *majority 7. H1< 0.3
4. H1> 0.6 H1 : p > 0.5 6. H1< 1/3
5. H1> 0.36
8. H0 : p = 1/6
H1: p < 1/6
P(X < 2) = 1 25Cx 1 x 5 25−x = 0.0629
x=0 6 6
Rejection region : H0 is rejected if P(X < 2) <
Since H0 is rejected
0.0629 <
> 6.29%
Hence, probability of Type I error = 0.0629, significance level = 6.29%
Edited By Lieu Ai Lin 194