TriaLab Power Studio · Method
Kruskal–Wallis test — several groups compared by ranks
Sizes a parallel trial of K groups analysed by the Kruskal–Wallis rank test, by Fan, Zhang & Zhang’s noncentral chi-square method. The effect is entered either for one group apart from the rest (its probability of exceeding an observation from any other group) or as the noncentrality per participant computed from all the pairwise probabilities. Equal allocation across groups.
Also known as: Kruskal-Wallis, rank ANOVA, nonparametric ANOVA, one-way ANOVA on ranks, multiple groups nonparametric, H test, noncentral chi-square.
Maturity
Validated: 6 published examples from 2 independent publications (Fan, Zhang & Zhang 2011; PASS) reproduce on every build (ADR-0001 §58).
What it solves for
- Sample size: offered.
- Power: offered.
- Detectable effect: offered.
- Precision: not offered — An omnibus rank test has no single contrast to put a confidence interval around; size a specific pairwise comparison with the Mann–Whitney kernel instead.
- Assurance: not offered — No source on disk states a prior on this design’s effect, so the assurance modifier is not admitted here.
- Duration: not offered — This design has no time axis: participants are assessed at a fixed follow-up, so calendar time does not enter the power function.
Size axes:
- Participants per group (all groups of equal size) (
participants_per_group), Count
Inputs
Every field as the form shows it, with its help. A field marked advanced sits behind Expert mode.
Common to every method
- Significance level (alpha) (
alpha): a number, above 0 and below 1; default 0.05; typically 0.01 to 0.05 (0.05 in most trials; 0.01 for confirmatory claims); entered as proportion (0-1) or percent The type I error rate. Interpreted as two-sided when testing plain equality and one-sided when a margin frame is active, following the usual convention. - Target power (
power_target): a number, above 0 and below 1; default 0.8; typically 0.8 to 0.9 (0.80 is conventional; 0.90 for definitive trials); entered as proportion (0-1) or percent The chance of a significant result if the assumed effect is real. Used when solving for sample size or detectable effect; ignored when solving for power.
The method’s own
- Number of groups (
groups): a whole number, at least 2; default 3; typically 2 to 6 (beyond about six groups, consider a dose-response model) How many parallel groups the trial compares, all of equal size. Two is legal and makes this Noether’s Mann–Whitney formula. - Probability that the odd group’s observation exceeds any other group’s (
p_exceed_apart): a number, above 0 and below 1; default 0.64; entered as proportion (0-1) or percent For the one configuration a single number describes: one group sits apart from the other K − 1, which are exchangeable. P(Y > X) for a random observation Y from the odd group and X from any other; one half means no effect. Under a normal shift of d standard deviations this is Φ(d/√2): 0.64 is about d = 0.5. - Noncentrality per participant, Λ (
noncentrality_per_participant): a number, at least 0 Fan’s noncentrality divided by the total sample size: Λ = 12 Σ_i λ_i (Σ_{k≠i} λ_k (p_ik − 1/2))², with λ_i the allocation fraction of group i and p_ik the probability that a group-i observation exceeds a group-k one. Compute it by hand from the pairwise probabilities when the configuration is not one group apart from the rest.
Sizes entered when another axis is solved for
- Participants per group (all groups of equal size) (
participants_per_group): a whole number, at least 1 Participants per group (all groups of equal size). Required when solving for power or detectable effect; produced by the solver when solving for sample size.
Ways to express an input
Effect — How the K groups differ: one group apart from the rest, or the noncentrality per participant for any configuration.
- One group apart from the rest, the form’s default: Every pair involving the odd group shares one exceedance probability; every other pair has one half. (fields
p_exceed_apart) - Noncentrality per participant: The canonical form, for any configuration of the groups. (fields
noncentrality_per_participant)
Modifiers admitted
dropout: Dropout
Published examples it reproduces (6)
Each is a worked example: the inputs as a user enters them, and the number the source prints, which the engine reproduces within the tolerance on every build (the Validation screen runs them on your machine).
| Source | Example | Solves for | Inputs | Published |
|---|---|---|---|---|
| Fan, Zhang & Zhang 2011, Biometrics 67:213-224, Table 1 scenario I (printed p. 218) | N(0,1) against N(1,4): P(Y > X) = Φ(1/√5) = 0.672640, two-sided alpha 0.05, power 0.80 => 87.78 in total, 44 per group | Sample size | alpha = 0.05; groups = 2; p_exceed_apart = 0.67264; power_target = 0.8; effect expressed as one_group_apart |
participants_per_group = 44 ± 0 |
| Fan, Zhang & Zhang 2011, Biometrics 67:213-224, Table 1 scenario III (printed p. 218) | N(0,1) against U(−2,4): P(Y > X) = Φ(−2) + [4(Φ(4) − Φ(−2)) − (φ(−2) − φ(4))]/6 = 0.6652527 => 95.80 in total, 48 per group | Sample size | alpha = 0.05; groups = 2; p_exceed_apart = 0.665253; power_target = 0.8; effect expressed as one_group_apart |
participants_per_group = 48 ± 0 |
| Fan, Zhang & Zhang 2011, Biometrics 67:213-224, Table 2 scenario V (printed p. 219) | N(0,1), N(1,4), N(0.5,1): Λ = 0.074331 from the three pairwise probabilities => 129.62 in total, 44 per group | Sample size | alpha = 0.05; groups = 3; noncentrality_per_participant = 0.074331; power_target = 0.8; effect expressed as noncentrality |
participants_per_group = 44 ± 0 |
| Fan, Zhang & Zhang 2011, Biometrics 67:213-224, Table 2 scenario VII (printed p. 219) | N(0,1), N(0.5,1), U(0,1): Λ = 0.069828 => 137.98 in total, 46 per group | Sample size | alpha = 0.05; groups = 3; noncentrality_per_participant = 0.069828; power_target = 0.8; effect expressed as noncentrality |
participants_per_group = 46 ± 0 |
| Fan, Zhang & Zhang 2011, Biometrics 67:213-224, Table 2 scenario IX (printed p. 219) | N(0,1), U(0,1), U(−1.5,2.5): Λ = 0.061997 => 155.41 in total, 52 per group | Sample size | alpha = 0.05; groups = 3; noncentrality_per_participant = 0.061997; power_target = 0.8; effect expressed as noncentrality |
participants_per_group = 52 ± 0 |
| PASS 2026 chapter 257, Example 1 (printed p. 257-4), at two groups | At K = 2 Fan’s method is Noether’s Mann–Whitney formula: P = 0.58, two-sided alpha 0.05, power 0.90 => 274 per group | Sample size | alpha = 0.05; groups = 2; p_exceed_apart = 0.58; power_target = 0.9 | participants_per_group = 274 ± 0 |
Sources
- Fan C, Zhang D, Zhang C-H. On sample size of the Kruskal-Wallis test with application to a mouse peritoneal cavity study. Biometrics. 2011;67(1):213-224.
- Kruskal WH, Wallis WA. Use of ranks in one-criterion variance analysis. J Am Stat Assoc. 1952;47(260):583-621.
- Chow S-C, Shao J, Wang H, Lokhnygina Y. Sample Size Calculations in Clinical Research. 3rd ed. Boca Raton: Chapman & Hall/CRC; 2017. §14.5.3.
This page was generated from TriaLab Power Studio 2.0.1's engine, as the method is built, and is published in English only. All methods →