One-Way Layouts: Kruskal-Wallis test for equality of location parameters Model: X(i,j) dist X + theta_i --- Test H_0: Theta are identical Example 2: Testing smoothness of paper in four batches Data in 4 treatment groups with sizes 8,8,8,8: Group #1 (n=8) 387 415 438 445 455 460 477 580 Group #2 (n=8) 392 393 397 414 418 429 433 458 Group #3 (n=8) 340 350 390 400 430 430 440 450 Group #4 (n=8) 340 348 348 354 372 378 412 428 In one vertical table for analysis: (Columns are Ordinal, Value, Treatment group, Midrank, Tiegroups 1 387 1 9.0 2 2 415 1 17.0 2 3 438 1 24.0 2 4 445 1 26.0 0 5 455 1 28.0 0 6 460 1 30.0 0 7 477 1 31.0 0 8 580 1 32.0 0 9 392 2 11.0 0 10 393 2 12.0 0 11 397 2 13.0 0 12 414 2 16.0 0 13 418 2 18.0 0 14 429 2 20.0 0 15 433 2 23.0 0 16 458 2 29.0 0 17 340 3 1.5 0 18 350 3 5.0 0 19 390 3 10.0 0 20 400 3 14.0 0 21 430 3 21.5 0 22 430 3 21.5 0 23 440 3 25.0 0 24 450 3 27.0 0 25 340 4 1.5 0 26 348 4 3.5 0 27 348 4 3.5 0 28 354 4 6.0 0 29 372 4 7.0 0 30 378 4 8.0 0 31 412 4 15.0 0 32 428 4 19.0 0 Parallel display with midranks with treatment groups as columns: 387 ( 9.0) 392 (11.0) 340 ( 1.5) 340 ( 1.5) 415 (17.0) 393 (12.0) 350 ( 5.0) 348 ( 3.5) 438 (24.0) 397 (13.0) 390 (10.0) 348 ( 3.5) 445 (26.0) 414 (16.0) 400 (14.0) 354 ( 6.0) 455 (28.0) 418 (18.0) 430 (21.5) 372 ( 7.0) 460 (30.0) 429 (20.0) 430 (21.5) 378 ( 8.0) 477 (31.0) 433 (23.0) 440 (25.0) 412 (15.0) 580 (32.0) 458 (29.0) 450 (27.0) 428 (19.0) By Treatment Group: Number, Rank Sum, Rank Average: Group #1 n=8 197.0 24.63 Group #2 n=8 142.0 17.75 Group #3 n=8 125.5 15.69 Group #4 n=8 63.5 7.94 Kruskal-Wallis H = 12.8686 (with no tie correction) Tie-group sizes: 2 2 2 Tiesum and Tie correction: 18.0000 0.0005 Kruskal-Wallis H = 12.8721 (with tie correction) Large-sample chi-square approximation for H: P= 0.0049 (df=3) Doing nsims simulations for the true P-value nsims = 10000 Initializing the RNG from the system clock at startseed = 2.0860e+005 H=12.8721 and Hscore=9844.44 Number of simulations with values >= Hscore and total number: 18 10000 95% CI for true P-value bracketing estimate of true pvalue: (Since H and Hscore >= 0, P-values are inherently two-sided.) 0.0010 0.0018 0.0026 Test for an alternative of monotonic treatment-group medians: The Jonckheere-Terpstra test statistic is very similar to the Kendall nonparametric correlation statistic between values and treatment-group numbers jj = 84.5000 The Jonckheere-Terpstra test statistic mean and variance: (WITHOUT tie correction.) Jmean_Jvar_Zval_NormPval = 192.0000 885.3333 -3.6129 0.0002