To get started, type one of these: helpwin, helpdesk, or demo. For product information, visit www.mathworks.com. DATA FOR N=11 paired differences: Expanded data matrix: Columns are Ordinal, Before (X_i), After (Y_i), Z_i=Y_i-X_i, Sgn(Z_i>0), and Abs(Z_i) dd = 1 26 37 11 1 11 2 25 29 4 1 4 3 59 62 3 1 3 4 27 25 -2 0 2 5 34 47 13 1 13 6 38 40 2 1 2 7 51 58 7 1 7 8 48 52 4 1 4 9 39 42 3 1 3 10 37 34 -3 0 3 11 30 42 12 1 12 DATA SORTED BY ABS(Z) (with Z then Ord as tie-breakers): After dropping columns X and Y Add Tentative Ranks after sort Columns are now Ordinal, Z, Sgn, Abs(Z), and Tent.Rank ddx = 4 -2 0 2 1 6 2 1 2 2 10 -3 0 3 3 3 3 1 3 4 9 3 1 3 5 2 4 1 4 6 8 4 1 4 7 7 7 1 7 8 1 11 1 11 9 11 12 1 12 10 5 13 1 13 11 Tiegroup_Sizes = 2 3 2 COMPUTED MIDRANKS IN SORTED ORDER Columns are Ordinal, Z, Sgn, Abs(Z), Tent.Rank, and Midrank ddx = 4.0000 -2.0000 0 2.0000 1.0000 1.5000 6.0000 2.0000 1.0000 2.0000 2.0000 1.5000 10.0000 -3.0000 0 3.0000 3.0000 4.0000 3.0000 3.0000 1.0000 3.0000 4.0000 4.0000 9.0000 3.0000 1.0000 3.0000 5.0000 4.0000 2.0000 4.0000 1.0000 4.0000 6.0000 6.5000 8.0000 4.0000 1.0000 4.0000 7.0000 6.5000 7.0000 7.0000 1.0000 7.0000 8.0000 8.0000 1.0000 11.0000 1.0000 11.0000 9.0000 9.0000 11.0000 12.0000 1.0000 12.0000 10.0000 10.0000 5.0000 13.0000 1.0000 13.0000 11.0000 11.0000 MIDRANKS IN THE ORIGINAL DATA ORDER ddx = 1.0000 11.0000 1.0000 11.0000 9.0000 9.0000 2.0000 4.0000 1.0000 4.0000 6.0000 6.5000 3.0000 3.0000 1.0000 3.0000 4.0000 4.0000 4.0000 -2.0000 0 2.0000 1.0000 1.5000 5.0000 13.0000 1.0000 13.0000 11.0000 11.0000 6.0000 2.0000 1.0000 2.0000 2.0000 1.5000 7.0000 7.0000 1.0000 7.0000 8.0000 8.0000 8.0000 4.0000 1.0000 4.0000 7.0000 6.5000 9.0000 3.0000 1.0000 3.0000 5.0000 4.0000 10.0000 -3.0000 0 3.0000 3.0000 4.0000 11.0000 12.0000 1.0000 12.0000 10.0000 10.0000 WILCOXON SIGNED RANK TEST: Have ties, so have to use midranks. Tminus, Tplus, Tmean, N 5.5000 60.5000 33.0000 11.0000 LARGE-SAMPLE NORMAL APPROXIMATION for two-sided Wilcoxon signed-rank P-value for H_0:theta=0: IGNORING tie correction (TstdDev then Z then two-sided normal P): 11.2472 2.4450 0.0145 Tiesum = 36 TieCorrection = 0.0059 CORRECT APPROXIMATE P-VALUE WITH tie correction: (TstdDev then Z then two-sided normal P): 11.2138 2.4523 0.0142 SIMULATING THE TRUE Wilcoxon Signed-Rank P-VALUE: Using NSIMS random permutations: Nsims = 10000 INITIALIZING the random-number generator at Wseed = 2.0878e+005 FINISHED NSIMS simulations SIMULATED value for true 2-sided P-value: NGrEq=48 Nsims=10000 Pvalue=0.00960 (2-sided) 95%% Confidence Interval for true P-value (with Estimate in middle): Plow_PEst_Phigh = 0.0069 0.0096 0.0123 The Hodges-Lehmann estimator for theta for After=Before+theta is the median of the Walsh averages W_k=(Z_i+Z_j)/2: Walsh averages (n=11, nwa=66, nrows=7): ( 1) 11.0 7.5 7.0 4.5 12.0 6.5 9.0 7.5 7.0 4.0 (11) 11.5 4.0 3.5 1.0 8.5 3.0 5.5 4.0 3.5 0.5 (21) 8.0 3.0 0.5 8.0 2.5 5.0 3.5 3.0 0.0 7.5 (31) -2.0 5.5 0.0 2.5 1.0 0.5 -2.5 5.0 13.0 7.5 (41) 10.0 8.5 8.0 5.0 12.5 2.0 4.5 3.0 2.5 -0.5 (51) 7.0 7.0 5.5 5.0 2.0 9.5 4.0 3.5 0.5 8.0 (61) 3.0 0.0 7.5 -3.0 4.5 12.0 SORTED Walsh averages (n=11, nwa=66, nrows=7): ( 1) -3.0 -2.5 -2.0 -0.5 0.0 0.0 0.0 0.5 0.5 0.5 (11) 0.5 1.0 1.0 2.0 2.0 2.5 2.5 2.5 3.0 3.0 (21) 3.0 3.0 3.0 3.5 3.5 3.5 3.5 4.0 4.0 4.0 (31) 4.0 4.5 4.5 4.5 5.0 5.0 5.0 5.0 5.5 5.5 (41) 5.5 6.5 7.0 7.0 7.0 7.0 7.5 7.5 7.5 7.5 (51) 7.5 8.0 8.0 8.0 8.0 8.5 8.5 9.0 9.5 10.0 (61) 11.0 11.5 12.0 12.0 12.5 13.0 Zmean_MedZ_MedWalshAverages = 4.9091 4.0000 4.5000 EXACT CONFIDENCE INTERVALS based on the Wilcoxon signed-rank statistic: Estimator: 4.5 Table A4 for n=11 (n*(n+1)/2=66) has: P(T+ ge 55)=0.027 P(T+ ge 56)=0.021 P(T+ ge 57)=0.016 P(T+ ge 58)=0.012 P(T+ ge 59)=0.009 P(T+ ge 60)=0.007 P(T+ ge 61)=0.005 P(T+ ge 62)=0.003 Exact symmetric confidence intervals for theta: ( 1.0, 8.0) x=55 94.6% CI ( 0.5, 8.5) x=56 95.8% CI ( 0.5, 8.5) x=57 96.8% CI ( 0.5, 9.0) x=58 97.6% CI ( 0.5, 9.5) x=59 98.2% CI ( 0.0, 10.0) x=60 98.6% CI ( 0.0, 11.0) x=61 99.0% CI ( 0.0, 11.5) x=62 99.4% CI