Biology, images, analysis, design...
|"It has long been an axiom of mine that the little things are infinitely the most important" |
Runs tests One-sample runs test & the Wald-Wolfowitz test
Worked example 1
Our first worked example is taken from the study by Pearce et al.
In this example the number of runs (r) = 5, the number of non-shedding weeks (m) = 12 and the number of shedding weeks (n) = 5. Since both n and m are < 20 we cannot use the normal approximation. Using Siegel's tables the observed value (5) is not equal or smaller than the value in table FI (4). Hence the result is not significant (P > 0.05).
R does not have an exact runs test, but StatXact gives a two-sided permutation test P-value of 0.126 or a two-sided Monte Carlo P-value of 0.127. Note the one sided P-value (assuming an alternative hypothesis of clustering) is close to being significant at the conventional level (P = 0.063).
Worked example 2
We have a sample of pupae of an insect and we are interested whether males and female emerge in random order or whether the order of emergence is non-random.
For a two-tailed test P = 0.0004, so we can conclude that the order of emergence is non-random. In this example we may well have decided in advance to carry out a one-tailed test - with the alternative hypothesis that emergence is clumped - given that regular alternation would not be biologically credible. In this case P = 0.0002.
Worked example 3
This example uses the same data on the effect of drug treatment on the length of time from treatment to lambing that we used in Unit 8 with the
Since we have two independent samples with skewed distributions we decide (admittedly rather unwisely) to use the Wald-Wolfowitz test. The ranked combined sample is shown below:
The number of runs (r) = 6, the number of control animals (m) = 5 and the number of treated animals (n) = 11. Since both n and m are < 20 we cannot use the normal approximation. Using Siegel's tables the observed value (6) is neither equal to nor smaller than the value in table F (4). Hence the result is not significant (P > 0.05).
One should note that even if the test result had been significant, interpretation would have been difficult. The interest in the trial was clearly to assess the effect of the drug on the 'average' lambing time, whether assessed by the median or the mean. The Wald-Wolfowitz test could only have indicated whether there was any difference between the distributions.