Professional Documents
Culture Documents
Hypothesis
Testing
A Real Life Problem
The light bulbs manufactured by Bright Lights
are designed to last for 1000 hours on average.
How can the company be sure that the average
lifetime of a large batch of bulbs really is 1000
hours?
2
Confidence Intervals
You could take a sample of lightbulbs, find their
mean lifetime and construct a confidence
interval. If the interval contains 1000 hours, then
you could assume that the true mean is 1000
hours.
OR…
3
Hypothesis Testing with a Sample
The other approach would be:
Hypothesis Testing
Whereas, Confidence intervals just state a range of values
where a point estimate may lie.
Hypothesis testing compares a sample (test) statistic to the
boundaries (called the critical region) of the population
parameters.
We begin by formulating a hypothesis about the relationship
between the statistic and the parameter and we conclude
by deciding whether to reject this hypothesis or not.
4
Hypothesis Testing – The Steps
Step B:
The alternative hypothesis is denoted by:
(two-tailed test) H1 : 0
H1 : 0
(one-tailed tests) H :
1 0
x 0 1100 1000
Z
s 120
n 30
100
21.9089
4.56
Breakdown of the Steps - Example
The distribution of the lifetime of all bulbs made by Bright lights is normal and the
standard deviation of the population is known to be 120 hours. A sample of 30 bulbs
were tested and the mean lifetime was found to be 1100 hours. Is this consistent, at
the 5% level of significance, with the supposed true mean of 1000 hours?
Step D: Work out the critical value (rejection region)
At the 5% significance level the critical value is: Go to Student t
Distribution
Tables:
Breakdown of the Steps - Example
The distribution of the lifetime of all bulbs made by Bright lights is normal and the
standard deviation of the population is known to be 120 hours. A sample of 30 bulbs
were tested and the mean lifetime was found to be 1100 hours. Is this consistent, at
the 5% level of significance, with the supposed true mean of 1000 hours?
Step D: Work out the critical value (rejection region)
At the 5% significance level the critical value is: ±1.96
Breakdown of the Steps - General
Step E: State the conclusion
If the test statistic lies in the rejection region, then the null hypothesis, H 0 , is
rejected. There is enough evidence to conclude/suggest/support the claim
that....
If the test statistic lies between the two critical values then the null
hypothesis, H 0 , is not rejected. There is no evidence to suggest/conclude
that…
Breakdown of the Steps - Example
The distribution of the lifetime of all bulbs made by Bright lights is normal and the
standard deviation of the population is known to be 120 hours. A sample of 30 bulbs
were tested and the mean lifetime was found to be 1100 hours. Is this consistent, at
the 5% level of significance, with the supposed true mean of 1000 hours?
Step E: Conclusion
Since the test value (4.56) lies in the critical region, we reject H 0
There is sufficient evidence to conclude that there has been a
change in the mean lifetime of light bulbs.
Lightbulb Solution
The distribution of the lifetime of all bulbs made by Bright lights is normal and the standard
deviation of the population is known to be 120 hours. A sample of 30 bulbs were tested and the
mean lifetime was found to be 1100 hours. Is this consistent, at the 5% level of significance, with
the supposed true mean of 1000 hours?
Step A: H 0 : 1000
Step B: H1 : 1000
Step C: Calculate the test statistic (z): x 0 1100 1000
Z
s 120
n 30
100
21.9089
4.56
Step D: Work out the critical value (rejection region)
At the 5% significance level the critical value is: ±1.96
Step E: Since the test value lies in the critical region, we reject H
0
There is sufficient evidence to conclude that there has been a change in the mean
lifetime of light bulbs.
Practice Question – Factory Components
A component produced for the electrical
industry is supposed to have a mean outside
diameter of 10cm. The mean diameter of a
sample of 36 components taken from today’s
output is 9.94cm with a standard deviation of
0.018cm. Does this suggest, at the 1% level of
significance, that the production process is not
meeting the specifications?
Practice Question – Factory Component
A component produced for the electrical industry is supposed to have a mean outside
diameter of 10cm. The mean diameter of a sample of 36 components taken from today’s
output is 9.94cm with a standard deviation of 0.018cm. Does this suggest, at the 1% level
of significance, that the production process is not meeting the specifications?
Step A: H 0 :
Step B: H1 :
Practice Question – Factory Component
A component produced for the electrical industry is supposed to have a mean outside
diameter of 10cm. The mean diameter of a sample of 36 components taken from today’s
output is 9.94cm with a standard deviation of 0.018cm. Does this suggest, at the 1% level
of significance, that the production process is not meeting the specifications?
Step A: H 0 : 10
Step B: H1 : 10
H0 :
Step A:
H1 :
Step B:
H0 :
Step A: 33mpg
H1 :
Step B:
Step A: H0 :
Step B:
H1 :
An Example of a Small Sample Test for a
Population Mean
A tomato grower has developed a new variety of tomato. This variety is supposed to
give good crops without the need for a greenhouse. One of the supposed attributes of
this tomato is that the average yield per plant is at least 4kg of fruit. A gardening
magazine decides to test his claim and grows 8 plants in controlled conditions. The
yield from these 8 plants has a mean of 3.74 kg of tomatoes and a standard deviation
of 0.8466.
Does this data support the grower’s claim at the 5% level of significance?
Step A: H 0 : 4kg
Step B: H1 : 4kg
This is a one-tailed test since the claim is that the yield should be at least 4kg.
The alternative hypothesis is less than 4kg, because the gardening magazine is
attempting to disprove the claim.
An Example of a Small Sample Test for a
Population Mean
A tomato grower has developed a new variety of tomato. This variety is supposed to
give good crops without the need for a greenhouse. One of the supposed attributes of
this tomato is that the average yield per plant is at least 4kg of fruit. A gardening
magazine decides to test his claim and grows 8 plants in controlled conditions. The
yield from these 8 plants has a mean of 3.74 kg of tomatoes and a standard deviation
of 0.8466.
Does this data support the grower’s claim at the 5% level of significance?
Step A: H 0 : 4kg
Step B: H1 : 4kg
x 0
Step C: Calculate the test statistic (t): t
s
n
An Example of a Small Sample Test for a
Population Mean
Step A: H 0 : 4kg
Step B: H1 : 4kg
Step B: H1 : 4kg
Step E: Conclusion -
An Example of a Small Sample Test for a
Population Mean
Step A: H 0 : 4kg
Step B: H1 : 4kg
x 0 3.74 4
Step C: Calculate the test statistic (t): t
s
0.8466
n 8
0.26
0.2993
0.869
Step E: Since the test value doesn’t fall in the critical region, we do not reject
H0
There isn’t enough evidence to conclude the average yield per plant isn’t at least 4kg.
(In other words, it hasn’t been possible to disprove the grower’s claim).
Practice Exercise – Household Chores
A study claims that all adults spend an average of more
than 14 hours on chores during a week. A researcher
wanted to check if this claim is true. A random sample
of 15 adults taken by this researcher showed that these
adults spend on average 14.89 hours on chores during
the week, with a standard deviation of 2.8 hours.
Test the claim that adults spend more than 14 hours on
chores during the week. Use 0.01
Step E: Since the test value doesn’t fall in the critical region, we do not reject
H0
There isn’t enough evidence to conclude that adults spend more than 14 hours on
chores during the week.
Hypothesis Tests Involving Two Population
Means
The tests we have looked at so far are for a single
sample. In many situations we may have collected two
samples and we want to test to see if the two
populations means are the same. As in the single
sample case we have different tests for large and small
samples.
Hypothesis Tests Involving Two Population
Means – Large Samples
Step A: The null hypothesis is denoted by: H 0 : 1 2 0
Step B: The alternative hypothesis is denoted by:
(two : 1 test)
H1 tailed 2 0
H1 : 1 2
(one
H1 tailed
: 1 tests)
2
Step C: Calculate the test statistic (z): Z x1 x2
s12 s22
n1 n2
Where x x is the difference the difference between the means
1 2
Some questions will require you to calculate the mean and standard deviation
of one or both samples, but for time’s sake, the mean and standard deviation
for sample 1 are -3.25 and 4.862 respectively, and the equivalent figures for the
control group are 0.833 and 4.579 respectively.
Small Sample Tests for Two
Population Means – An Example
Step A: H 0 : x1 x2 0
Step B: H1 : x1 x2 0
(if we assume that the magazine is not biased in its opinion of the pill)