Math204 NonParThree
Math204 NonParThree
Math204 NonParThree
For a non-parametric test, we can use the Wilcoxon Signed Rank test, which proceeds as follows:
1. Compute the within-individual differences
xi = yi1 − yi2 i = 1, . . . , n
If any xi = 0, then that data point is discarded and the sample size adjusted.
2. Sort the absolute values s1 , . . . , sn of x1 , x2 , . . . , xn into ascending order, and assign ranks 1 up
to n. If there are ties, assign average ranks.
1
To test H0 vs (1), we perform a one-sided test using the statistic T− ; the critical value in the test is
denoted T0 , and is determined by the table on p. 839 of McClave and Sincich:
If T− ≤ T0 , we reject H0 in favour of Ha (1)
To test H0 vs (2), we perform a one-sided test using the statistic T+ ; the critical value is T0 and
If T+ ≤ T0 , we reject H0 in favour of Ha (2)
To test H0 vs (3), we perform a two-sided test using the statistic T = min{T− , T+ }; the critical value is
T0 and
If T ≤ T0 , we reject H0 in favour of Ha (3)
Notes :
1. The only assumption behind the test is that the difference data xi are drawn independently from
a continuous distribution.
2. Large Sample Test: For n ≥ 25, we can use a large sample version of the test based on T+ , and
the Z statistic
n(n + 1)
T+ −
Z=r 4
n(n + 1)(2n + 1)
24
If H0 is true, then Z ∼
: Normal(0, 1), so that the test at α = 0.05 uses the following critical values
For Ha (1) use CR = 1.645
For Ha (2) use CR = −1.645
For Ha (3) use CR = ±1.960
From the table on p 839, for n = 12 − 1 = 11, we find that the α = 0.025/0.05 (one/two-sided)
significance level critical value is T0 = 11. Thus using T+ , we cannot reject either of the null hypotheses
(2) and (3), as T+ > T0 . Note that Z = −1.734, so if the approximation was valid, we would be able to
reject (2) at α = 0.05.
2
2. T HREE OR MORE INDEPENDENT SAMPLES :
T HE K RUSKAL -WALLIS AND F RIEDMAN T ESTS
We now seek non-parametric tests that can be used for multiple independent samples, such as those
found in the Completely Randomized Design (CRD) and Randomized Block Design (RBD) described
in the ANOVA section.
The non-parametric equivalents of the Fisher-F tests ANOVA for these two designs are
• The Kruskal-Wallis H test for a Completely Randomized Design
• Friedman’s test for a Randomized Block Design
2. For the approximation to be valid, there should be at least five observations in each sample, and
the number of ties should be small.
Group 1 1 1 1 1 2 2 2 2 3 3 3 3 3
y 2.9 3.0 2.5 2.6 3.2 3.8 2.7 4.0 2.4 2.8 3.4 3.7 2.2 2.0
Rank 8 9 4 5 10 13 6 14 3 7 11 12 2 1
Hence R1 = 36, R2 = 36 and R3 = 33, and the test statistic H = 0.7714. To complete the test, we
compare with the α = 0.05 quantile of the Chisquared(k − 1) = Chisquared(2) distribution. We have
Chisq0.05 (2) = 5.99 > H ∴ No evidence to reject H0
and a p-value of p = 0.680.
3
2.2 Friedman Test
In a RBD, we have k treatment groups, and a blocking factor. For example, we might have k repeated
measurements on the same b experimental units, and n = bk observations in total. To compute the test
statistic, Fr , we proceed as follows.
1. Within each block separately, sort the k data values into ascending order, and assign ranks. If
there are ties in the data, then average ranks are used.
2. For the approximation to be valid, it is recommended that b or k is at least five, and the number
of ties should be small.
EXAMPLE 3: Skin potential under hypnosis
A study was conducted to investigate whether hypnosis has the same effect on skin potential for four
different emotions. Eight subjects were asked to display fear, joy, sadness and calmness under hypno-
sis, and the resulting skin potential (measured in millivolts) was recorded for each emotion. Thus in
this experiment, b = 8 and k = 4.