Kruskal–Wallis test
Hypothesis tests · Method and input reference
Each line is a group. Repeated measures and Friedman require the same subjects in matching positions. Dunnett uses the first line as control. Parametric ANOVA assumes normal independent errors; repeated ANOVA assumes sphericity. Synthetic example: Four independent treatment arms, 40 blood-pressure observations per row (mmHg); arm 1 is control. Variances differ between arms.
Open calculator · Compare methods in the decision matrix
When to consider it
- Compare rank distributions across three or more independent groups.
Assumptions and scope
- Observations must be independent between subjects; repeated rows from one subject are not independent samples.
- Median interpretations need comparable distribution shapes; use Dunn with a planned multiplicity adjustment for follow-up.
Required inputs
- Groups (one group per line) — Numeric observations; preserve the row and column structure described above.
Review missing values and data coding before running. Sample inputs are synthetic teaching examples.
Implementation
Lifescio validates inputs and formats results; listed functions are the principal calculation routines, not an exhaustive transitive dependency list.
- scipy 1.15.3: scipy.stats.kruskal
These are pinned library versions; saved results record the versions actually used at runtime.