Skip to content

oneWayAnova

oneWayAnova(groups): OneWayAnovaResult

Defined in: one-way-anova.ts:39

One-way analysis of variance: whether several groups share a common mean.

The two sums of squares are accumulated exactly. Their terms are deviations from a mean, so they straddle zero by construction and a naive running total can cancel away every significant bit of either accumulator — the same reason linearRegressionSlope compensates.

Named oneWayAnova rather than anova because the one-way layout is a genuine restriction, not an implementation detail: a two-way or repeated measures design takes a different input shape and answers a different question, and would be a different function rather than an option here.

readonly readonly number[][]

One array of observations per group. Not modified.

OneWayAnovaResult

The F ratio, its two degrees of freedom and the p-value.

When there are fewer than two groups, any group is empty, or there are no more observations than groups.