Professional Documents
Culture Documents
C2 Lecture 7 Part 2 T-Test
C2 Lecture 7 Part 2 T-Test
Lecture 7 Part2
The T-test
Answer:
I Hypotheses: H0 : µ = 1000, H1 : µ > 1000
I Critical value: +1.65
I Test statistic: σ
x̄−A 1022−1000
= 3.81 to 2 d.p.
/ n =
√ √
50/ 75
In a Z-test the sample is large (n ≥ 25). You are given the sample
mean and population or sample standard deviation
The dierence between a Z-test and a T-test
In a Z-test the sample is large (n ≥ 25). You are given the sample
mean and population or sample standard deviation
In a T-test the sample is small (n < 25). You usually have to work
out the sample mean and the sample standard deviation. Also in a
T-test you have to work out the degrees of freedom to use in the
critical value table.
The null hypothesis and the alternative hypothesis for the
Z-test and T-test
critical value
-critical value
I If the test statistic lies beyond the critical value(s) (in the
rejection region) we reject H0 . THE SAMPLE PROVIDES
SUFFICIENT EVIDENCE TO REJECT H0 at the specied
signicance level.
I If the test statistic does not lie beyond the critical value, we
accept H0 . THE SAMPLE DOES NOT PROVIDE
SUFFICIENT EVIDENCE TO REJECT H0 at the specied
signicance level.
Type I and Type II errors
0.4
0.3
y 0.2
0.1
x
−4 −2 2 4
I Decision: −2.26 < 0.06 < 2.26 .The test statistic is not in the
rejection region so we accept the null hypothesis.
I Conclusion: The average bulb lifetime is 1000 hours. (The
sample of 10 light bulbs does not provide sucient evidence at
a 5% signicance level to reject the light bulb company's
claim.)
T-test - example 2
An average person is said to be able run to 100m in 14.2 seconds.
We think that this is a bit on the slow side. We decide to test at a
5% level of signicance.
T-test - example 2
An average person is said to be able run to 100m in 14.2 seconds.
We think that this is a bit on the slow side. We decide to test at a
5% level of signicance.
I H0 : µ = 14.2
H1 : µ < 14.2.
We ask 7 people to run 100m. Their times are as follows:
12.6, 13.2, 11.7, 14.6, 11.3, 12.0, 13.5
I H0 : µ = 20.
I H1 : µ 6= 20.
T-test - example 4
I The chocolate company claims that a bag of malteasers has an
average of 20 malteasers inside. In the name of science we buy
6 bags to see if this is right to a 1% level of signicance. The
bags have the following number of malteasers:
19, 16, 18, 19, 22, 14
I H0 : µ = 20.
I H1 : µ 6= 20.
I Degree of freedom is 6-1=5.
T-test - example 4
I The chocolate company claims that a bag of malteasers has an
average of 20 malteasers inside. In the name of science we buy
6 bags to see if this is right to a 1% level of signicance. The
bags have the following number of malteasers:
19, 16, 18, 19, 22, 14
I H0 : µ = 20.
I H1 : µ 6= 20.
I Degree of freedom is 6-1=5.
I We are doing a two-tailed test as our alternative hypothesis
says µ 6= 20. Look up 1% with 5 degrees of freedom for the
critical values.
I The critical values are −4.03 and 4.03.
T-test - example 4
I Sample mean: x̄ = 18.
T-test - example 4
I Sample mean: x̄ = 18.
I Sample standard deviation:
x2 − nx̄2
P
2
s = = 7.6
n−1
T-test - example 4
I Sample mean: x̄ = 18.
I Sample standard deviation:
x2 − nx̄2
P
2
s = = 7.6
n−1
I Sample variance:
s = 2.757 to 3 d.p.
I Test statistic
x̄ − A 18 − 20
s/√n
= 2.757 √ = −1.78 to 2 d.p.
/ 6
T-test - example 4
I Sample mean: x̄ = 18.
I Sample standard deviation:
x2 − nx̄2
P
2
s = = 7.6
n−1
I Sample variance:
s = 2.757 to 3 d.p.
I Test statistic
x̄ − A 18 − 20
s/√n
= 2.757 √ = −1.78 to 2 d.p.
/ 6
T-test - example 4
I Sample mean: x̄ = 18.
I Sample standard deviation:
x2 − nx̄2
P
2
s = = 7.6
n−1
I Sample variance:
s = 2.757 to 3 d.p.
I Test statistic
x̄ − A 18 − 20
s/√n
= 2.757 √ = −1.78 to 2 d.p.
/ 6