Professional Documents
Culture Documents
Hypothesis testing
7.1
Solution:
Look at the wording of a) to c) carefully. You can get clues as to
whether you are dealing with a one-tailed test (where H1 will use a
< or >), or a two-tailed test (where H1 will involve 6=) according to
the use of words like:
increase
higher
greater
diminished
changed
different from
7.2
Real situation
H0 true
Correct
H0 true
H0 false
Type II error
Probability (1 )
called the confidence
interval of the test
H0 false
Probability (1 ) called
the power of the test
Solution:
Your completed table should look like this:
Real situation
H0 true
H0 true
Correct
H0 false
Type II error
Probability =
H0 false
Probability (1 )
called the confidence
interval of the test
Type I error
Probability called the
significance level
of the test
Probability (1 ) called
the power of the test
Correct
7.3
Solution:
Here the manufacturer is claiming that 90% of the population will
be relieved over 8 hours. That is = 0.9.
A sample of n = 200, and 160 gained relief. That is p =
160
200
= 0.8.
0.8 0.9
q
0.90.1
200
0.1
0.0212
= 4.71698.
=
This goes beyond the tables (the z given is ()4.417, so this result is
highly significant the p-value is nearly zero). Looked at another
way, you could look at Table 10 (Percentage points of the
t-distribution) and take the bottom line (where = ).
Note that the 5% value is 1.645 for a one-tailed test and the 1%
and the 0.1% values are 2.326 and 3.090 respectively. This
confirms that the result is highly significant. So we reject H0 and the
manufacturers claim is not met. The population given relief from
the sample taken is significantly less than the 90% he claims.
7.4
11.6
13.5
13.9
12.1
11.9
13.0
Solution:
In part a) you are asked to do a two-sided test; in part b) it is a
one-sided test. Which is more appropriate will depend on the
purpose of the experiment, and your suspicions before you conduct
it.
If you suspected before collecting the data that the mean voltage
was less than 12 volts, the one-sided test could be appropriate.
If you had no prior reason to believe that the mean was less
than 12 volts you would do a two-sided test.
General rule: decide on whether it is a one- or two-sided test
before calculating the test statistic.
a) We are to test H0 : = 12 v. H1 : 6= 12. The key points here are
that n is small and that 2 is unknown. We can use the t-test
and this is valid provided the data are normally distributed. The
test statistic value is
t=
12.7 12
x 12
=
= 2.16.
s/ 7
0.858/ 7
7.5
Solution:
Significant at the 5% level means there is a less than 5% chance of
getting data as extreme as those observed if the null hypothesis was
true. This implies that the data are incompatible with the null
hypothesis, which we reject.
Significant at 10% but not at 5% is often interpreted as meaning
there is some doubt about the null hypothesis, but not enough to
reject it.
Here we are testing a proportion: H0 : = 0.25 v. H1 : > 0.25.
Note that this is a one-sided test we have reason to believe that
the sales campaign has increased sales, and we believe this before
collecting any data. As this is a test for proportions and n is large,
we compute the test statistic value
100
300 0.25
=
= 3.33.
0.000625
(1 )/n
z=p
7.6
Solution:
a) Appropriate hypotheses are H0 : = 0.4 v. H1 : < 0.4.
b) The estimate of the proportion covered by insurance is 133
337 , or
39.5%. For the formal test, as this is a test for proportions and n
is large, we use the test statistic:
z=p
133
337 0.4
=
= 0.20.
0.02669
( (1 ))/n
7.7
Solution:
Here we are testing the difference between two proportions with a
one-sided test. Also n1 and n2 are both large. Let:
1 = (population) proportion of households with unacceptable
levels of lead in the community without anticorrosives.
2 = (population) proportion of households with unacceptable
levels of lead in the community with anticorrosives.
We wish to test H0 : 1 = 2 v. H1 : 1 > 2 . The test statistic is
p1 p2
q
p(1 p) ( n11
50
16
250 320
=q
+ n12 )
0.116(1 0.116)
1
250
1
320
= 5.55,
50+16
where p is the pooled sample proportion, i.e. p = 250+320
= 0.116.
This test statistic value (5.55) is highly significant, so there is strong
evidence that anticorrosives reduce lead levels.
7.8
Meat Sample
1
2
3
4
5
6
7
8
Method
I
II
23.1 22.7
23.2 23.6
26.5 27.1
26.6 27.4
27.1 27.4
48.3 46.8
40.5 40.4
25.0 24.9
Meat Sample
9
10
11
12
13
14
15
16
Method
I
II
38.4 38.1
23.5 23.8
22.2 22.5
24.7 24.4
45.1 43.5
27.6 27.0
25.0 24.9
36.7 35.2
Solution:
Since the same meat is being put through two different tests, we are
clearly dealing with paired samples. We wish to test
H0 : 1 = 2
v.
H1 : 1 6= 2 ,
v.
H1 : 1 2 6= 0.
If we list the differences from the original data table then we get
0.4
0.3
-0.4
-0.3
-0.6
-0.3
-0.8
0.3
-0.3
1.6
1.5
0.6
0.1
0.1
0.1
1.5
Differences
n
16
Sample mean
0.238
S.E. of mean
0.745
= 0.186
16
7.9
Area A
38
38
29
45
42
Area B
32
38
22
30
34
Area A
33
27
32
32
34
Area B
28
32
34
24
Solution:
It is clear that the data for the two areas cannot be regarded as
paired, because there is no detail about the days to which the
figures refer (and because there are different numbers of values for
the two areas anyhow).
The sample sizes are 10 and 9 for A and B respectively, so we need
to decide whether we can use the combination of a pooled estimate
of the variance and a t distribution test on the appropriate number
of degrees of freedom.
So begin by calculating the sample means and variances (or
standard deviations), to begin to understand the pattern:
n
Mean
St. dev.
A
10
35
5.68
B
9
30.44
5.08
Because the events to which the data refer are of the same type, it is
reasonable to assume that the population variances of the numbers
of offences are the same (especially since the sample standard
deviations turn out to be quite similar: it can be shown that, if the
ratio of the sample variances is between roughly 13 and 3, then there
is no reason to suppose that the population variances are different).
We test H0 : A B = 0 v. H1 : A B 6= 0. The pooled variance is
s2p =
1
1
29.2243
+
= 5.406 0.21 = 2.484
10 9
on 17 d.f.s.
on 17 d.f.s.
on 17 d.f.s.
For a two-tailed test at the 5% level the critical value from t17 is
2.110, so the evidence is not significant at the 5% level. For a
two-tailed test at the 10% level the critical value from t17 is 1.740, so
the evidence is significant at the 10% level.
We cannot conclude with confidence that there is a difference in the
number of parking offences between the two areas, but there is a
suspicion that there may be such a difference. It would be preferable
to examine more data in order to come to a firmer conclusion.
Solutions prepared by Dr James Abdey.