Title: Stats 5 95% C.I.
1- Lecture 21
- Contingency c2 test
2- Contingency c2 test
- Used to compare 2 (or more) sets of observed
data. - Example Investigate effectiveness of
prophylactic antibiotics in preventing dysentery
when working in a third world country. - 40 travellers randomised into 2 groups of
twenty. - One group receives antibiotics, other gets
placebos - Count numbers who do/do not get dysentery
3Contingency table
Occurrence of dysentery among subjects who did or
did not receive prophylactic antibiotics.
No antibiotics With
antibiotics Infected 16 8 Not infected
4 12
Results suggest antibiotics caused a reduction in
infection rates. Need to test.
4Null hypothesis A large group (population) of
users of the antibiotics would suffer the same
rate of dysentery as a population of controls.
5Antibiotic prophylaxis Null hypothesis
Controls
Sample
Sample suggests 80 20
Antibiotic treated
Sample
Sample suggests 40 60
Infected Not infected
6Antibiotic prophylaxis Alternative hypothesis
Controls
Sample
Sample suggests 80 20
Antibiotic treated
Sample
Sample suggests 40 60
7Factors influencing decision (1) Difference
between the two outcomes
No With
antibiotics antibiotics
Infected 13
12 Not infected 7 8
Little difference. Not convincing evidence of an
effect. NH credible.
No With
antibiotics antibiotics
Infected 19
2 Not infected 1 18
Large difference. Convincing evidence of an
effect. NH not credible.
8Factors influencing decision (2) Sample sizes
No With
antibiotics antibiotics
Infected 14
10 Not infected 6 10
Small samples. Large sampling errors.
NH credible.
No With
antibiotics antibiotics
Infected 1400
1000 Not infected 600 1000
Large samples. Very small sampling errors.
NH not credible.
9 Contingency c2 test
Difference between two outcomes
c2 test
c2
Sig
Sample sizes
10Performing a contingency c2 test using Minitab
11Enter the data exactly as in the original
contingency table
12Performing the contingency c2 test
Follow the menus Stat Tables Chi-square Test
...
13Indicate the columns containing the table
14Minitab output
Chi-Square Test Expected counts are printed
below observed counts No_antib Antib
Total 1 16 8 24
12.00 12.00 2 4 12 16
8.00 8.00 Total 20 20
40 Chi-Sq 1.333 1.333
2.000 2.000 6.667 DF 1, P-Value 0.010
c2 value
P lt 0.05 Significant
15Conclusion
There is significant evidence (P 0.01) that the
proportion of individuals who catch dysentery
differs according to whether or not antibiotics
are used. If this treatment were now to be used
by large numbers of individuals going to work in
the relevant third world country, we would expect
to see continued reductions in rates of dysentery.
1695 Confidence Interval for the change in a
proportion
t-Test Calculate 95 C.I. for the change in a
measured value. Two proportions Calculate 95
C.I. for the change in a proportion.
17Effect of antibiotic use
No antibiotics With
antibiotics Infected 16 8 Not infected
4 12
80 infection without antibiotics
40 infection with antibiotics
Point estimate of the effect of antibiotics is a
change of -40 in the rate of infection. Now
want to construct a 95 C.I. around this point
estimate.
18Equivalence zone
95 C.I. will be easier to interpret if we define
an equivalence zone in advance. Clinical advice
is that a change in infection rate of 10 or less
is not of great significance.
- Change of 10 or above - increase in infection
rate great enough to be serious - Change of between 10 and -10 - change too
small to have much impact - Change of -10 or below - reduction in infection
of real practical value.
19Using Minitab to generate 95 C. I. for the
change in a proportion.
Follow the menus Stat Basic Statistics 2
Proportions ...
20Press this button. Then enter data directly
Number of subjects in each group
Number Not infected
21Minitab output
Point estimate for change in rate of infection.
(-40)
Test and Confidence Interval for Two
Proportions Sample X N Sample p 1
4 20 0.200000 2 12 20
0.600000 Estimate for p(1) - p(2) -0.4 95 CI
for p(1) - p(2) (-0.677181, -0.122819) Test for
p(1) - p(2) 0 (vs not 0) Z -2.83 P-Value
0.005
95 C.I. for the change in the rate of infection.
(-67.7 to -12.3)
2295 Confidence Interval for change in rate of
infection due to antibiotic use (Equivalence
zone in grey)
20 10 0 -10 -20 -30 -40
-50 -60 -70
Percentage change in infection rate
Null hypothesis Effect of antibiotic is a zero
change.
Statistically significant zero is excluded from
the 95 C.I. Clinically significant change is
large enough to be of real clinical benefit
23Terms with which you should be familiar
24What you should be able to do
- Construct contingency tables.
- Recognise when it is appropriate to use a
contingency c2 test - Construct an appropriate null hypothesis for use
with a contingency c2 test - Describe the events assumed to have occurred
according to the null hypothesis - List the factors that will govern whether a
contingency c2 test will produce a significant
result
Continued ...
25What you should be able to do continued
- Use Minitab (etc) to carry out a contingency c2
test - Interpret the results of a contingency c2 test
- Use Mintab etc to produce a 95 C.I. for the
change in a proportion. - Determine whether a change in a proportion has
been demonstrated to be of practical
significance.