Two-Way Layout: Data X(i,j) where 1 le i le nn Subjects or Blocks 1 le j le kk Treatments or Treatment Groups Model: X(i,j) = mu(i,j) plus error or mu + theta_i + tau_j plus error Test H_0: mu(i,j) = theta_i and there is no effect of Treatment Example 1: Methods for rounding first base in baseball k=3 methods with average times to second base for n=22 baseball players Method 1: Round out near first base Method 2: Narrow angle at first base Method 3: Wide angle at first base Table 7.1 (p274) and Figure 7.1 (p275) in text n=22 blocks (subjects) and k=3 treatment groups Player, Round Out, Narrow Angle, Wide Angle 1. 5.40 5.50 5.55 2. 5.85 5.70 5.75 3. 5.20 5.60 5.50 4. 5.55 5.50 5.40 5. 5.90 5.85 5.70 6. 5.45 5.55 5.60 7. 5.40 5.40 5.35 8. 5.45 5.50 5.35 9. 5.25 5.15 5.00 10. 5.85 5.80 5.70 11. 5.25 5.20 5.10 12. 5.65 5.55 5.45 13. 5.60 5.35 5.45 14. 5.05 5.00 4.95 15. 5.50 5.50 5.40 16. 5.45 5.55 5.50 17. 5.55 5.55 5.35 18. 5.45 5.50 5.55 19. 5.50 5.45 5.25 20. 5.65 5.60 5.40 21. 5.70 5.65 5.55 22. 6.30 6.30 6.25 FRIEDMAN RANKS are WITHIN-BLOCK ranks, here 1 le R(i,j) le 3 Times for n=22 players with within-subject ranks/midranks 1. 5.40(1.0) 5.50(2.0) 5.55(3.0) 2. 5.85(3.0) 5.70(1.0) 5.75(2.0) 3. 5.20(1.0) 5.60(3.0) 5.50(2.0) 4. 5.55(3.0) 5.50(2.0) 5.40(1.0) 5. 5.90(3.0) 5.85(2.0) 5.70(1.0) 6. 5.45(1.0) 5.55(2.0) 5.60(3.0) 7. 5.40(2.5) 5.40(2.5) 5.35(1.0) 8. 5.45(2.0) 5.50(3.0) 5.35(1.0) 9. 5.25(3.0) 5.15(2.0) 5.00(1.0) 10. 5.85(3.0) 5.80(2.0) 5.70(1.0) 11. 5.25(3.0) 5.20(2.0) 5.10(1.0) 12. 5.65(3.0) 5.55(2.0) 5.45(1.0) 13. 5.60(3.0) 5.35(1.0) 5.45(2.0) 14. 5.05(3.0) 5.00(2.0) 4.95(1.0) 15. 5.50(2.5) 5.50(2.5) 5.40(1.0) 16. 5.45(1.0) 5.55(3.0) 5.50(2.0) 17. 5.55(2.5) 5.55(2.5) 5.35(1.0) 18. 5.45(1.0) 5.50(2.0) 5.55(3.0) 19. 5.50(3.0) 5.45(2.0) 5.25(1.0) 20. 5.65(3.0) 5.60(2.0) 5.40(1.0) 21. 5.70(3.0) 5.65(2.0) 5.55(1.0) 22. 6.30(2.5) 6.30(2.5) 6.25(1.0) Rank sums and rank averages for each treatment group: 1. 53.00 2.41 2. 47.00 2.14 3. 32.00 1.45 With no tie correction: S=10.63636 P= 0.0049 (df=2) With tie correction: Tiesum=24 Tiecorr=0.0454545 SP=11.14286 P= 0.0038 (df=2) Simulating P-values for the Friedman test: Permuting method values independently for each subject Initializing the random-number generator at 12345678 Carrying out Nsims=10000 Friedman permutations: Fscore = Sum of Squares over Treatment Groups of Treatment-Group Rank Sums: 6042 Number of simulations with values >= Fscore and total number: 20 10000 95% CI for true P-value bracketing estimate of true pvalue: (Since H and Fscore >= 0, P-values are inherently two-sided.) 0.0011 0.0020 0.0029