kumulant

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

Link copied to clipboard

Unbiased sample standard deviation: sqrt([sampleVariance]).

Link copied to clipboard

Unbiased sample variance: [sst] / ([totalWeights] - 1). Zero when totalWeights <= 1.

Link copied to clipboard
open val sst: Double

Sum of squared deviations from the running mean: Sum (x - mean)^2 * weight.

Link copied to clipboard
open val stdDev: Double

Population standard deviation: sqrt([variance]).

Link copied to clipboard
abstract val totalWeights: Double

Cumulative weight of observations folded into this result.

Link copied to clipboard
open val variance: Double

Population variance: [sst] / [totalWeights]. Zero on an empty stream.

sampleStdDev

Unbiased sample standard deviation: sqrt([sampleVariance]).

sampleVariance

Unbiased sample variance: [sst] / ([totalWeights] - 1). Zero when totalWeights <= 1.

sst

open val sst: Double(source)

Sum of squared deviations from the running mean: Sum (x - mean)^2 * weight.

stdDev

open val stdDev: Double(source)

Population standard deviation: sqrt([variance]).

totalWeights

abstract val totalWeights: Double(source)

Cumulative weight of observations folded into this result.

variance

Population variance: [sst] / [totalWeights]. Zero on an empty stream.