HasSampleVariance
Result trait for accumulators that expose variance-family quantities. Derived properties variance / stdDev / sampleVariance / sampleStdDev all fall out of sst (sum of squared deviations) and totalWeights without storing redundant fields.
Implemented by every Welford-shaped result (com.eignex.kumulant.stat.summary.WeightedVarianceResult, com.eignex.kumulant.stat.summary.MomentsResult, the decay-family counterparts) and indirectly by HasShapeMoments and HasRegression.
The population vs sample distinction matters when sample size is small. Use sampleVariance / sampleStdDev when treating the observations as draws from an underlying distribution; use variance / stdDev when treating the observations as the complete population.
Inheritors
Properties
sampleStdDev
Unbiased sample standard deviation: sqrt([sampleVariance]).
sampleVariance
Unbiased sample variance: [sst] / ([totalWeights] - 1). Zero when totalWeights <= 1.
sst
Sum of squared deviations from the running mean: Sum (x - mean)^2 * weight.
Implementors must override this or variance; the two are defined in terms of each other, so overriding neither recurses until the stack runs out. Every Result in the library overrides sst, which is the cheaper of the two to carry.