Biology, images, analysis, design...
|"It has long been an axiom of mine that the little things are infinitely the most important" |
Paired t- test
Worked example 1
We will base our first example on a trial of a deworming drug against cyathostome worms in
The worm burdens at post mortem examination, 56 days after infection, are given here. Since observations are paired by weight category, the paired t- test is the appropriate statistical test. The null hypothesis is that the treatment has no effect, so the mean difference between paired observations would be zero. The alternative hypothesis is that treatment reduces the number of worms so we will be carrying out a one-tailed test.
For this you need to ask if the differences between treated and untreated are normally distributed. We have assessed this using QQ-plots (rankit plots would have been a better choice given the small sample size, but they are not available on most software packages)
The first plot suggests that the distribution is skewed. This was expected given that parasite numbers are generally overdispersed. Square root (√(Y+0.5)) and log (log10(Y+1)) transformations indicate that only the square root transformation will normalize this distribution - a log transformation will actually make the situation worse! This is problematic because the confidence interval for a difference cannot be interpreted on the detransformed scale for a square root transformation. Hence since the deviation from normality is not very great, we will carry out the analysis on both the untransformed data and square root transformed data.
A one-tailed comparison gives a P-value of
To avoid needless controversy, let us calculate 2-sided 95% confidence limits - on the basis that each limit is equivalent to a 1-sided 97.5% limit, and compatible with our 1-tailed alternate hypothesis (treatment reduces burden).
The normal approximation 95% confidence limits of the untransformed difference (20323) are given by:
20323 + (2.571 × 2437) = 26588
The lower limit of which is equivalent to a one-sided 97.5% limit of 14059 (compared to the 1-sided 95% limit of 15412.65, given above).
None of our differences being negative, a square-root transformation is reasonable. The detransformed mean difference between pairs is
In conclusion we can say the ivermectin treatment was associated with a highly significant reduction in the number of worms.
Although this statistical test is valid, it is only one way of looking at the data. We could for example use a quite different variable here, for example the proportion of ponies with any worms (a dichotomous variable). Here we would be comparing a proportion of 1.0 (for untreated) with 0.33 (for treated), a less dramatic improvement than if we use number of worms as the variable.
Worked example 2
Our second worked example uses hypothetical data, but is based on results of an observational before-and-after study published by Thakur et al. (1998). Fifteen patients suffering from kala-azar are treated with sodium stibogluconate and pre- and post-treatment haemoglobin level of each patient is determined. The null hypothesis is that the treatment has no effect. The alternative hypothesis is that treatment affects the haemoglobin level so we will be carrying out a two-tailed test. Pre- and post-treatment levels are given in the table below:
Mean haemoglobin level was 6.39 g/dl pre-treatment and 8.62 g/dl post-treatment. This is a paired before-and-after study using a measurement variable, so the paired t-test should be an appropriate way to analyse the data. But before we examine the distribution of the differences, let us first look at the distributions of the pre and post treatment levels separately. Given the larger sample size we will use histograms for ease of interpretation:
Clearly the distribution of the data has changed from something approximating to a normal distribution to a skewed distribution. This is not immediately relevant for a paired t-test because we are interested in the distribution of differences. But the change in distribution should prompt some serious thought about what is happening before proceeding to a statistical test.
In fact it turned out that that treatment was only effective (assessed by whether parasites are present) in 12 of the 15 patients. Patient numbers 8,11 and 13 are treatment failures and have to be treated again with another drug. In this situation it makes sense to not only investigate the overall impact of the drug on haemoglobin levels, but also examine the situation just for treatment successes.
The distributions of the differences for all patients and for treatment successes only are shown below:
The 95% normal approximation confidence interval of the difference is given by:
Treatment successes only
The 95% normal approximation one-sided confidence interval of the difference is given by:
In each case the treatment effect is highly significant (P<0.001). Therefore we can say that treatment with the drug is associated with an increased haemoglobin level in patients.