Biology, images, analysis, design...
|"It has long been an axiom of mine that the little things are infinitely the most important" |
z-test for independent proportions
Worked example IWe take for our first example results of a trial in Uganda to compare the efficacy of two artemisinin combination therapies for the treatment of uncomplicated falciparum malaria. Children with the disease were randomized to receive either amodiaquine + artesunate or artemether - lumefantrine. Both treatments were similarly effective but the risk of recurrent malaria due to new infections appeared to differ:
This has a P-value of 0.002 so we can reject the null hypothesis and accept that the proportions are significantly different. We therefore proceed to calculate the risk difference and its 95% normal approximation confidence interval.
We therefore obtain a risk difference of 14.6% with a 95% normal approximation confidence interval of 5.39% to 23.73%. The authors obtained a similar exact confidence interval (5.9% to 24.2%.) using the package STATA.
Worked example II
Our second example is the same as one we use for Pearson's chi square test. We stay with trials of antimalarials but here consider a fictitious trial to assess the side effects of two prophylactic drugs. Individuals with falciparum malaria are randomly allocated to two treatment groups - one group receives drug A and the other drug B. The proportion of patients suffering neuropsychiatric side effects is compared between drug A and drug B.
This has a P-value of 0.098 indicating that the proportions are not significantly different at the conventionally accepted level of P = 0.05.
However, if you had not used the continuity correction, the z-value would have come out at 1.987, which would have indicated that the proportions were indeed (just) significantly different (P = 0.047). Similarly, if you had had any justification to use a one-tailed test (say there was already evidence that drug B produced more neuropsychiatric reactions), the test would have come out significant (P = 0.049).
Since statisticians differ over whether or not the correction should be used, the only conclusion one can draw is that drug B may have had a higher incidence of undesirable side effects. Do not fall into the trap of the P = 0.05 syndrome and believe that a value of 0.098 really tells you anything different from a value of 0.047. What the result is trying to tell you is that further trials should be carried out with a larger sample size and hence greater power to detect any real difference between the drugs.
Worked example III - a cautionary tale
Our last worked example is based on research carried out to investigate the seroprevalence of toxoplasmosis in
Sample sizes and proportions are quite large, so the continuity correction is not used.
Applying the standard formula for the z-test to compare independent proportions:
This value of z is referred to the probability calculator on your software package which gives a P-value of 0.0135. If you square the z-value to get 6.1026, and refer it to the χ2 distribution with 1 df, you will obtain precisely the same P-value.
This would appear to indicate that the seroprevalence rate is significantly higher in the coastal savanna zone than in the forest. But our confidence in this statement depends on whether the assumptions of the statistical test were met. Unfortunately it seems that it is the farms that were sampled randomly, not the individual pigs. It is quite possible that in the coastal savanna many pigs came from just one farm with an unusually high rate. Hence we are not dealing with randomly selected independent samples, so our test is invalid.