Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nonparametric Tests (1)

Similar presentations


Presentation on theme: "Nonparametric Tests (1)"— Presentation transcript:

1 Nonparametric Tests (1)
Sign test Wilcoxon Signed-Rank Test Wilcoxon Rank-Sum Test

2 Types of data Cardinal data: on a scale where it is meaningful to measure the distance “100.5, 172, 201.3,…” interval scale: if the zero point is arbitrary Example: body temperature ratio scale: zero point is fixed Example: body weight Ordinal data: can be ordered but do not have specific numeric values “poor, below average, average, good, excellent” Nominal data: categories without ordering “Dog, Cat, Rat, Fish, Bird”

3 Sign test “Is there consistent differences between pairs of observations?” Data: Paired observations (xi, yi), i=1,…, n For each pair, comparisons expressed as x > y, x = y, or x < y For ordinal data, we can measure the relative ordering Hypothesis: di = xi – yi ∆ = the population median of the di H0: ∆ = 0 H1: ∆ ≠ 0

4 Sign test C: number of people for whom di > 0
n: number of people with nonzero di It’s a test on the binomial proportion. Recall for binomial with parameters (n, p), C approximately follows a normal distribution with mean: np SD: [np(1-p)]1/2 Under the null hypothesis, p=1/2 mean: n/2 SD: [n/4]1/2

5 Sign test Normal approximation
Recall section 7.10 One-Sample Inference for the Binomial Distribution the “1/2” term serves as a continuity correction and better approximates the binomial distribution by the normal distribution.

6 Sign test

7 Sign test The exact test Under the null, C~Binom(n, ½)

8 Wilcoxon Signed-Rank Test
A nonparametric version of the paired t-test. Data: Paired observations (xi, yi), i=1,…, n di = xi – yi Here xi and yi are ordinal, so is di Hypothesis: ∆ = the population median of the di H0: ∆ = 0 H1: ∆ ≠ 0

9 Wilcoxon Signed-Rank Test
Example: Difference in degree of redness between two ointments If we apply the sign test,

10 Wilcoxon Signed-Rank Test
Example: Difference in degree of redness between two ointments The sign test yields insignificant result due to similar +/- frequency. But does it make sense?

11 Wilcoxon Signed-Rank Test
 Arrange the differences di in order of absolute value. Count the number of differences with the same absolute value. Ignore the observations where di = 0, and rank the remaining observations from 1 for the observation with the lowest absolute value, up to n for the observation with the highest absolute value. If there is a group of several observations with the same absolute value, assign the average rank (lowest rank in the range highest rank in the range)/2 as the rank for each difference in the group.

12 Wilcoxon Signed-Rank Test

13 Wilcoxon Signed-Rank Test
Hypothesis: H0: the distribution of di is symmetric about zero H1: the distribution of di is not symmetric about zero Test statistic: rank sum (R1), for the group of people with positive di Under the null, E(R1)=n(n+1)/4 Var(R1)=n(n+1)(2n+1)/24 n is the number of nonzero differences

14 Wilcoxon Signed-Rank Test
Finding p-value with normal approximation (and correction for ties) If the number of nonzero di’s is ≥ 16

15 Wilcoxon Signed-Rank Test
Back to the example:

16 Wilcoxon Signed-Rank Test
An assumption of the signed-rank test is that one has a continuous and symmetric, but not necessarily normal, distribution. It can be applied to cardinal data as well, particularly if the sample size is small and the assumption of normality appears grossly violated. If the actual distribution turns out to be normal, then the signed-rank test has less power than the paired t test, which is the penalty paid for relaxed assumption.

17 Wilcoxon Rank-Sum Test
A nonparametric version of the unpaired t-test. Hypotheses: H0: FD = FSL H1: FD(x)= FSL(x-Δ), where Δ≠0. FD and FSL are cumulative distribution function (c.d.f.) of the two groups. Example data: comparing the visual acuity of people who have different genetic types of retinitis pigmentosa (RP)

18 Wilcoxon Rank-Sum Test
Ranking: Combine the data from the two groups, and order the values from lowest to highest. Assign ranks to the individual values. If a group of observations has the same value, then assign the average rank for each observation in the group.

19 Wilcoxon Rank-Sum Test
The test statistic: Sum of the ranks in the first sample (R1) Under the null, E(R1) = n1(n1+n2+1)/2 Var(R1)=n1n2(n1+n2+1)/12

20 Wilcoxon Rank-Sum Test


Download ppt "Nonparametric Tests (1)"

Similar presentations


Ads by Google