You are on page 1of 6

Statistics 1

Unit 1.4

Hypothesis Testing

This is best illustrated by example.

In a statistical investigation, we often put forward a hypothesis – the null hypothesis H 0 – about a population
parameter. In order to test this hypothesis, we take a sample from the population and perform a statistical test.
If we decide to reject H0, we do so in favour of an alternative hypothesis H0.

Z is a suitable test statistic, which can be used even if we do not know if the original data is normally
distributed, but provided the sample is large enough (Central Limit Theorem).

Example

A soft drinks manufacturer makes cans of juice whose contents are normally distributed with and

The machinery is given a routine service and production resumes.


After the service a random sample of 16 cans is taken and the mean contents of the sample is found to be

Does this provide evidence that the mean contents have decreased?
[We assume that has not changed.]

There are two hypotheses:

(a) The Null Hypothesis that the mean is still 305.


(b) The Alternative Hypothesis that the mean is now less than 305.

This is a 1-tail test, because of the word "decreased" in the question.

The question we must consider here is: "If is true, how likely is a sample mean of 299 or less?"
If a sample mean of 299 or less is very unlikely then we have evidence that the mean has decreased and so
we reject
Otherwise we accept

First, we decide on a significance level, say 5%.


Most questions on this give a significance level, but if none is given, choose your own.

Now calculate Here

We may do the test either by calculating a p-value or by using a critical region.


Both methods are illustrated below.

Using a p-value
1-tail

[Again, remember we are working under assumption that remains true. The probability calculated
indicates that if this is the case, the chance of our sample producing these results is very low. I.e. it shouldn’t
or is very unlikely to happen.

As such we have evidence may not be true.]

Hence reject We have evidence at the 5% level that the mean has changed.

Z-test : Using a critical region

A sketch can help here. From p.8 in the tables it can be seen that for 5% in the left tail,

1-tail

Observed value
Critical Region

The observed value is well within the critical region, so we have evidence at the 5% level to reject and
accept
Reject We have evidence at the 5% level that the mean has decreased.

We will now do the same example again with one word changed.
Example

A soft drinks manufacturer makes cans of juice whose contents are normally distributed with and

The machinery is given a routine service and production resumes.


After the service a random sample of 16 cans is taken and the mean contents of the sample is found to be

Does this provide evidence that the mean contents have changed?
[We assume that has not changed.]

With "changed" replacing "decreased" the test now becomes a 2-tail test.
Here we are testing what the probability of being a distance of 6 (305-299) or more away from the mean
given out sample mean.

Using a p-value

The p-value method becomes long winded for two tails tests. However, the solution is below.
Same calculation as before, but the p-value will be the calculated probability as illustrated below:

It becomes clear, through symmetry, that


2-tail your calculations may be acceptably
reduced to the following:

[Again, remember we are working under assumption that remains true. The probability calculated
indicates that if this is the case, the chance of our sample producing these results is very low. I.e. it shouldn’t
or is very unlikely to happen.
As such we have evidence may not be true.]

Hence reject We have evidence at the 5% level that the mean has changed.

[or due to symmetry, one tail can be checked against 2.5% i.e. 0.025

Therefore 0.082<0.025, etc…..]

Z-test : Using a Critical Region


When working on a two tailed question, the z-test, using a critical region is most widely used and accepted in
method in industry and your exam.

A sketch of a 2-tail region will help:

Note that for in each tail we have from p.8 in tables.

2-tail

Observed value
Critical Region

The observed value is well within the critical region, so we have evidence at the 5% level to reject and
accept
Reject We have evidence at the 5% level that the mean has decreased.

Notes

For some questions you will have to select your own significance level. 5% or 1% are the most suitable.

Read the question carefully: the words "increased" or "decreased" suggest a one-tail test, while the words
"changed" or "different" suggest a two-tail test.

For some questions you will have to select whether it is a one-tail or two-tail test. You will get full marks for
either method in this case.

When writing a conclusion the word "evidence" is important: for example, if we get a p-value of in a
5% test the correct conclusion in rejecting is that we have evidence that is not true. We cannot state
with certainty that is false: the p-value of means that even if the population mean is still 305, a
result at least as extreme as this will occur by chance of the time, so there is a small probability of
rejecting a true
Questions

1. A packing process packages ground coffee into bags. The weight of each bag is normally distributed
with mean 500g and standard deviation 10g. A random sample of 25bags is taken and the sample
mean is found to be 495g. Test the claim that there has been a change in the population mean at the
5% level and state the p-value.

2. A fast food outlet claims that the weight of it’s’ burger is normally distributed with mean 6 ounces
and standard deviation 0.5 ounces. A random sample of 12 burgers was found to have a mean weight
of 5.8 ounces.
Test the claim that the mean weight is less than 6 ounces at the 5% level of significance and state the
p-value.

3. A machine is set to roll aluminium foil sheets that are 40.0 thousands of an inch thick. For a quality
control process, the operator periodically takes five measurements of sheet thickness. On one
occasion the results were:
40.1 39.0 39.8 39.2 39.4

i. Obtain the sample mean. On the assumption that sheet thickness measurements are normally
distributed with standard deviation , test the hypothesis that the machine is operating
satisfactorily at the 5% level.
ii. A 95% confidence interval for mean thickness is calculated to be (39.15, 39.85). Explain how
this interval can be used to confirm your answer to part ii.

4. The management at a large hospital determined that the time taken, in minutes, to admit a patient was
.
a) Calculate the probability that the mean time to admit a random sample of 10 patients is less than
17.7 minutes.

A new computer system for dealing with patient records was installed at the hospital and the
management team was interested in whether any reduction in the mean time to admit patients had
resulted. Following the introduction of the system, a random sample of times was as follows:
23 20 16 10 20 12 23 18 16 19
b) Verify that the sample mean is 17.7.
c) Conduct an appropriate statistical test to evaluate the evidence for a reduction in mean waiting
time. (CSYS 1999)

5. The time taken by a maintenance team to overhaul a type of marine diesel engine is normally
distributed with mean 20 hours and standard deviation 4 hours, i.e.
a) Calculate the probability that the mean time taken to overhaul a random sample of 16 of these
engines is less than 18 hours.
b) After a period of retraining, the team achieved a mean time of 18 hours for a random sample of 16
engines. Comment on this performance. (CSYS 1998)
There is a question on this nearly every year. All questions seem to be low sample size with no statement of
normal distribution. Therefore the required assumptions are that each of the variables sampled are
independent have an identical normal distribution. (The CLT cannot be stated due to the low sample
size).

2013 – A4
Weight gain in lambs of a breed of sheep reared on a particular diet regime is known to have a mean 160
g/day and standard deviation 24 g/day. A random sample of lambs of this breed were fed the diet
supplemented by fish meal and the weight gains were:

218, 201, 143, 184, 172, 193, 163, 216, 127, 163, 156, 173

a) Stating any assumptions required, use a z-test to determine whether or not the data provide evidence
that the fish meal supplememnts leads to a change in mean weight gain for the breed.
(5)

You might also like