name: op-test-kruskal-wallis
description: Nonparametric k-group location test; ANOVA-like rank sums under tie correction.
kind: operator
category: TEST
operator: TEST_KRUSKAL_WALLIS
type: reference
applies_to: process, compose, predict
examples_tags: [hypothesis-test, tier-1-test, nonparametric, k-sample, comparison, buffered-pipeline]
Tests emit statistic / p-value / effect size; no Response.Components.
Use when
Rank-based check of whether values tend to be larger in some groups than in others, across two or more groups.
Questions it answers:
- Do satisfaction ratings tend to differ across the four regions?
- Do skewed repair times differ across product lines?
Use something else:
TEST_ANOVA_WELCHwhen the data are roughly normal and you want to compare averages.TEST_MANN_WHITNEY_Uwhen there are only two groups.
Params
alpha— float, default0.05, in(0, 1).weight— slot weight (nullopts out), kindfrequencyonly (a probability weight isPULSE_WEIGHT_UNSUPPORTEDnaming the kind): a row of weight w ranks as w identical rows — equals the test on the expanded rows.Detailsaddsum_weightsshaped liken;n/n_totalstay raw row counts.multiplicity— optional{method, family}; addsp_adjustedbeside the raw p (multiplicity-correction).
Inputs
Field (required) — numeric: u4/u8/u16/u32/u64, f32/f64, date. SplitBy (required, ≥ 2 groups) — categorical: categorical_u8/u16/u32, packed_bool.
Output
Statistic = tie-corrected H; DF = k − 1; PValue via χ² survival. Details: groups, n, rank_sums, n_total, tie_factor; effect_size.epsilon_squared = H·(n+1)/(n²−1), omitted when every value ties.
Reading the output
statistic: H measures how far each group’s average rank sits from the overall average rank, corrected for ties; larger values are stronger evidence that some groups tend to have higher values than others; the p-value says whether this H is large enough to be surprising.p_value: a p-value. Below alpha (0.05 unless the request sets another) the result is called significant; that is not the same as important, so read the effect size for how big it is.
Gotchas
- Buffered — combined values ranked across all groups under tie correction.
- Nonparametric alternative to one-way ANOVA for skewed or heavy-tailed data.
- Global only — no Dunn / Conover post-hoc; use pairwise
TEST_MANN_WHITNEY_Uwith amultiplicityblock (Holm/Bonferroni). - Groups under ~5 rows: shaky p; only N < 2k is refused (
PULSE_TEST_INSUFFICIENT_N). ε² unbanded. - Tests stochastic equality, not equal medians — differing shapes can reject on shape alone.
See
pulse_examples_search tags=[k-sample]- Skills:
statistical-testing,op-test-anova-f,op-test-mann-whitney-u,op-test-anova-welch