home *** CD-ROM | disk | FTP | other *** search
- .MCD 20000 0
- .CMD PLOTFORMAT logs=0,0 subdivs=1,1 size=5,15 type=l
- .CMD FORMAT rd=d ct=10 im=i et=3 zt=15 pr=3 mass length time charge
- .CMD SET ORIGIN 0
- .CMD SET TOL 0.001000
- .CMD MARGIN 0
- .CMD LINELENGTH 78
- .CMD SET PRNCOLWIDTH 8
- .CMD SET PRNPRECISION 4
- .TXT 0 42 1 39
- a1,38,48,37
- Copyright (c) 1988 by MathSoft, Inc.
- .TXT 2 -20 1 32
- a1,31,78,30
- THE WILCOXON SIGNED-RANK TEST
- .TXT 2 -22 5 81
- a5,80,78,347
- The Wilcoxon signed rank test uses a sample drawn from a symmetric population
- to test the hypothesis that the population median is 0. As an illustration,
- this model tests the hypothesis that two samples of size 40 are drawn from
- populations with equal medians. First read the two samples into an array X
- and form a vector of differences A:
- .EQN 6 1 1 21
- X:READPRN(WDATA)
- .EQN 0 24 2 18
- A:X{52}-X{52}
- .EQN 0 21 1 14
- n:rows(A)
- .EQN 0 17 1 16
- i:0;n-1
- .TXT 3 -63 1 75
- a1,74,78,73
- Now rank the absolute values of the numbers in A; first check for zeros:
- .EQN 2 0 2 16
- {55}(A≈0){49}=?
- .EQN 0 19 2 12
- D:(|A){49}
- .EQN 1 20 1 34
- f(a,b):.5*((a<b)+(a≤b))
- .EQN 1 -39 3 21
- R[i:.5+{55}f(D,D[i){49}
- .TXT 1 32 1 45
- a1,44,51,43
- Now sum the ranks with the original signs.
- .EQN 2 -3 2 31
- W:{55}(R*((A>0)-(A<0))){49}
- .TXT 1 -29 1 29
- a1,28,78,27
- The Wilcoxon statistic is:
- .EQN 0 63 1 9
- W=?
- .TXT 2 -63 1 15
- a1,14,78,13
- [Ctrl][PgDn]
- .TXT 2 1 2 81
- a2,80,78,150
- For samples of size n, n > 10, from a symmetric population with median 0, the
- statistic W is approximately normal with mean 0 and standard deviation
- .EQN 3 21 4 27
- σ:\((n*(n+1)*(2*n+1))/6)
- .TXT 5 -21 3 79
- a3,78,76,194
- To test at the α significance level, calculate z, the upper α/2 point for
- the normal distribution. Reject the hypothesis of equal population medians
- if W/σ is less than -z or greater than z.
- .TXT 4 0 1 12
- a1,11,77,10
- Choose α:
- .EQN 0 13 1 10
- α:.05
- .EQN 2 -13 1 14
- TOL~.00001
- .EQN 0 27 1 8
- x:1
- .EQN 1 36 3 9
- W/σ=?
- .EQN 1 -63 1 34
- z:root(1-cnorm(x)-.5*α,x)
- .EQN 0 48 1 9
- z=?
-