Professional Documents
Culture Documents
Chapter 9 Hypothesis Testing
Chapter 9 Hypothesis Testing
Chapter 9 Hypothesis Testing
An introductory example
Over a number of years a primary school has recorded the reading ages of children at
the beginning and end of each academic year. The teachers have found that during Year
3 the increase in reading age is normally distributed with mean 1.14 years and
standard deviation 0.16 years.
This year they are going to try a new reading scheme. At the end of the year the
teachers will use the mean increase in reading age, x , of the 40 children in Year 3 to
help them answer the question: ‘Does the new reading scheme give better results
than the old one in our school?’
It is easy to check whether x is greater than 1.14 years. It is not easy to know whether
a value of x greater than 1.14 years reflects the effectiveness of the new scheme or
is just due to random variation between children. This chapter describes a statistical
method for arriving at a decision. The following sections break down the process into
several stages.
1
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
In this example, where the mean of the past increases in reading age is 1.14 years, the
null hypothesis can be expressed by
The other theory is that the new reading scheme is more effective than the old one. This
is called alternative hypothesis and is given the symbol H1. So the alternative
hypothesis in this case is
The procedure which is used to decide between these two opposing theories is called a
hypothesis test or sometimes a significant test. In this example the test will be one –
tail because the alternative hypothesis proposes a change in the mean in only one
direction (an increase in the mean). It is also possible to have one-tail test in which the
alternative hypothesis proposes a decrease in the mean. Tests in which the alternative
hypothesis suggests a difference in mean in either direction are called two – tail.
2
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
Example 1
For the following situations give null and alternative hypotheses and say whether a
hypothesis test would be one-tail or two-tail.
a) In the past an athlete has run 100 meters in 10.3 seconds on average. He has been
following a new training program which he hopes will decrease the time he takes to
run 100 meters. He is going to time himself on his next six runs.
b) The bags of sugar coming off a production line have masses which vary slightly but
which should have a mean value of 1.01 kg. A sample is to be taken in order to test
whether there has been any change in the mean.
3
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
For a hypothesis test on the population mean, µ, the null hypothesis, H0, proposes a
value, µ0, for µ,
H0 : µ = µ0.
The alternative hypothesis, H1, suggests the way in which µ might differ from µ0. H1
can take three forms:
4
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
5
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
x
The value of the standardized and original variables are related by z 2 or
n
x
z
, where Z ~ N(0, 1).
n
If there is a significance level, both graphs will have their own rejection regions, the
cut off of the rejection region which one is using value of x and other using z-value
(critical value).
If the sample mean is in the acceptance region, you do not reject H0.
There is insufficient evidence to say that new reading scheme is more effective.
6
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
1.14 x
The rejection region is chosen so that it is ‘unlikely’ for the sample mean to fall in the
rejection region when H0 is true. Significance level is the probability of rejecting H0 is
true. Figure below shows the rejection region and the acceptance regions for the
children’s reading scheme example give that the significance level is 5%.
The value, c, which separates the rejection and acceptance regions, is called a critical
value. It can be calculated as follows.
x
The values of the standardized and original variables are related by z or
2
n
x
z
, where Z ~N(0, 1).
n
x 1.14 x 1.14
Substituting in this equation gives 1.645 or 1.645 0.16 .
0.162
40 40
7
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
Rearranging gives
At the end of the year the observed value for the sample mean was x = 1.19 years. Since
this value is in the rejection region, you can conclude that it is more likely to be due to
an increase in the population mean. This suggests that the new reading scheme does
give better results than the old one.
z
0
H0 : µ = a
H1: µ > a
0
z
H0 : µ = a
H1: µ < a
Rejection region,
8
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
0
z
H0 : µ = a
H1: µ ≠ a
Rejection region,
z
0
H0 : µ = a
H1: µ ≠ a
Rejection region,
9
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
Example 2
In the past a machine has produced rope which has a breaking load which is normally
distributed with mean 1 000 N and standard deviation 21 N. A new process has been
introduced. In order to test whether the mean breaking load has changed a sample of 50
pieces of rope is taken, the breaking system of each piece measured and the mean
calculated.
a) Define suitable null and alternative hypotheses for testing whether the breaking load
has changed.
b) Taking the sample mean as the test statistic, find the rejection region for X for a
hypothesis test at the 5% significance level.
10
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
Example 3
The blood pressure of a group of hospital patients with a certain type of heart disease
has mean 85.6. A random sample of 25 of these patients volunteered to be treated with a
new drug and a week later their mean blood pressure was found to be 70.4. Assuming a
normal distribution with standard deviation 15.5 for blood pressures, and using 1%
significance level, test whether the mean blood pressure for all patients treated with the
new drug is less than 85.6.
11
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
Example 4
Mathematics mark of students in SMK Jess is normally distributed with mean 70 and
standard deviation 16 in year 2014. A handbook equipped with downloaded
Mathematics learning applications is gifted to every student to test whether the
handbook has improved Mathematics’ knowledge among students. A sample of 20
students is chosen and their average Mathematics mark in year 2015 had been recorded.
A hypothesis test conducted at 2% significance level has proved that handbook has
improved Mathematics’ knowledge among students. Find the acceptance range of
sample mean.
12
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
This chapter takes further the idea of hypothesis testing introduced in the previous part.
When you have completed it you should
be able to formulate hypotheses and carry out a test of a population mean using a
normal approximation.
Hypothesis Testing
1) Write the null and alternative hypothesis.
2) Find the critical value using the tables
3) Compute the test statistic
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)Write the conclusion.
Example 5
A new surgical technique has been developed in an attempt to reduce the time that
patients have to spend in hospital after a particular operation. In the past, the mean time
spent in hospital was 5.3 days. For the first 50 patients on whom the new technique was
tried, the mean time spent in hospital was 5.0 days with an estimated population
variance of 0.42 days2. Is there any evidence at the 2% significance level that the new
technique has reduced the time spent in hospital?
13
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
Example 6
The times taken by workers to complete a task are normally distributed with standard
deviation 2.2 minutes. The factory manager claims that the mean time is 16.0 minutes.
The times taken by random sample of 5 workers were 17.8, 22.4, 16.3, 23.1 and 11.4
minutes. A hypothesis test was conducted to determine whether the factory manager’s
claim should be accepted.
14
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
Example 7
An inspector of items from as production line takes, on average, 21.75 seconds to check
each item. After the installation of a new lighting system the times, t seconds, to check
each of 50 randomly chosen items from the production line are summarized by Σ t = 1
107 and Σ t 2 = 24 592.35.
a) Calculate an unbiased estimate of the population variance of the time to check an
item under the new lighting system.
b) Test at the 5% significance level whether there is evidence that the population mean
time has changed from 21.75 seconds.
15
TAR UC – C.P.U.S. Foundation in Computing & Accounting– Statistics (FPMA1014)
Example 8
The plants planted by Mr. Lee in his orchard have a mean height of 45.6 cm. A new
fertilizer has been used in planting to help the plants grow taller. After a period, a
random sample of 100 plants is chosen and their heights, x cm, measured. The results
are summarized by
Σx = 4 600 Σx2 = 212 000.
Test at 3% significance level, whether the fertilizer is effective in helping the plants
grow taller.
16