Hi all, This Blog is an English archive of my PhD experience in Imperial College London, mainly logging my research and working process, as well as some visual records.

Tuesday, 28 August 2007

Fisher Sign Test

1. Theory


A robust nonparametric test which is an alternative to the paired t-test. This test makes the basic assumption that there is information only in the signs of the differences between paired observations, not in their sizes. Take the paired observations, calculate the differences, and count the number of +s n_+ and -s n_-, where

N=n_++n_-

is the sample size. Calculate the binomial coefficient

B=(N; n_+).

Then B/2^N gives the probability of getting exactly this many +s and -s if positive and negative values are equally likely. Finally, to obtain the P-value for the test, sum all the coefficients that are <=B and divide by 2^N.

2 Example .

The following data constitute a random sample of 15 measurements of the salinity contents in ppt:

{97.5, 95.2, 97.3, 96.0, 96.8, 100.3, 97.4, 95.3, 93.2, 99.1, 96.1, 97.6, 98.2, 98.5, 94.9}

We will use one-sample sign test to test the null hypothesis H0: $\tilde{\mu} = 98.5$ against the alternative hypothesis H1: $\alpha = 0.01$ level of significance; hence we have a 1-sided test. We replace all values greater than 98.5 with a plus sign and all values less than 98.5 with a minus sign. Values that equals 98.5 exactly are discarded; in our case we loose one value so n = 14, resulting in the following series:

{- - - - - + - - - + - - - -}
We find x = 2 values larger than the hypothetical median. The probability of $x \le 2$ is given by the binomial distribution (1.117) by adding up the probabilities for both x = 1 and x = 2. We find


\begin{displaymath}p = \binom{14}{1} \frac{1}{2}^{14} + \binom{14}{2} \frac{1}{2}^{14} = 0.0009 + 0.0056 = 0.0065 \end{displaymath} (2.31)

Since 0.0065 is less than 0.01, we must reject H0; we conclude that the median salinity from the sampled region is less than 98.5 ppt.

When np and n(1 - p) are both greater than 5, we are allowed to use the normal approximation to the binomial distribution. The sign test may then be based on the statistic


\begin{displaymath}z = \frac{x - np}{\sqrt{np(1-p)}} = \frac{2x - n}{\sqrt{n}} \end{displaymath} (2.32)

since p = 0.5. The test then simply compares the observed z statistic with the chosen $z_{\alpha/2}$critical values as in the standard parameteric case (or $z_\alpha$ for 1-sided tests).

No comments: