name: op-test-brown-forsythe
description: Homogeneity-of-variance test; one-way ANOVA on absolute deviations from per-group medians.
kind: operator
category: TEST
operator: TEST_BROWN_FORSYTHE
type: reference
applies_to: process, compose, predict
examples_tags: [hypothesis-test, tier-1-test, homogeneity-test, parametric, k-sample, buffered-pipeline]
Tests emit statistic / p-value / effect size; no Response.Components.
Use when
Checks whether the spread of a numeric field differs across groups: a robust test of equal variances.
Questions it answers:
- Is delivery time more variable at some warehouses than at others?
- How different is the spread of the measure across groups?
Use something else:
TEST_ANOVA_WELCHwhen you want to compare the group averages themselves.TEST_SHAPIRO_WILKwhen you want to check whether a measure is bell-shaped.
Params
alpha is a top-level key; the rest go in params.
| Name | Type | Default | Description |
|---|---|---|---|
alpha | float | 0.05 | Significance level in (0, 1); reject_null when p < alpha. |
partition_by | list | — | Post-test over 2+ groupers: one run per partition, the rows sharing these leading group keys (default all but the last; [] = one run). |
weight— frequency only: weighted group medians, ANOVA on Σw — equals the expanded rows, then ≥ 2per-group floor on Σw too (one row of weight 2 runs).detailsaddsum_weightsbesiden(raw rows).
Inputs
field (required) — numeric (decimal128 as its float64 echo, packed_bool as 0/1). split_by (required, ≥ 2 groups) — categorical (packed_bool levels "0"/"1").
Output
statistic = F (ANOVA on absolute deviations from per-group medians); df = k-1 (df_within = N-k in details); p_value via F-distribution survival. Flat details: groups, n, group_medians, abs_dev_means, ss_between, ss_within.
Reading the output
statistic: F on each row’s distance from its group median: larger values are stronger evidence that the groups differ in spread; the p-value says whether this F is large enough to be surprising.- Caveat: It tests spread only, not averages.
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.
Contract
- Types (
field):date,datetime,decimal128,f32,f64,packed_bool,u16,u32,u4,u64,u8; any other scalar type isPULSE_TEST_FIELD_NOT_NUMERIC. - Types (
split_by):categorical_*,packed_bool; any other scalar type isPULSE_FIELD_TYPE_UNSUPPORTED. - Weight: weighted under
frequencyweights only; aprobabilityweight isPULSE_WEIGHT_UNSUPPORTED. - Multiplicity: a
multiplicitymethod addsp_adjustedandsignificant_adjustedbeside the raw p; familiesrequest(default),compose(inside Compose). - Streaming: buffered only.
Gotchas
- Buffered — per-group medians require a sort.
- Not a pre-ANOVA gate: a large p is not evidence of equal spread.
- More robust than mean-based Levene under non-normality.
- Tier-2 variant
TEST_BROWN_FORSYTHE/median_postruns over result columns. A row with a null in a used column drops listwise (R’s NA default);details.ncounts the rows used. - Tiny groups destabilize the median;
n_i < 2or N ≤ k →PULSE_TEST_INSUFFICIENT_N. - Zero within-group spread (each group’s
|x − median|constant,ss_within= 0): F = +Inf (nullon the wire), p = 0 when groups differ; F and pnull(no rejection) when all deviations are equal — Ranova(lm(...))’s exact limit.
See
pulse_examples_search tags=[homogeneity-test]- Skills:
statistical-testing,op-test-anova-f,op-test-anova-welch