kumulant

HasShapeMoments

Result trait for accumulators that expose third and fourth central moments plus skewness and kurtosis. Extends HasSampleVariance; every shape moment result is also a variance result.

Implemented by com.eignex.kumulant.stat.summary.MomentsResult. Use it when the shape of the distribution matters; heavy tails (kurtosis), asymmetry (skewness), departures from normality in general.

Biased (skewness, kurtosis) and unbiased (unbiasedSkewness, unbiasedKurtosis) variants are both exposed. Pick biased for the moment estimate itself, unbiased when feeding into a small-sample inference test.

Inheritors

Properties

Link copied to clipboard
open val kurtosis: Double

Biased excess kurtosis: (m4 / w) / variance^2 - 3. Heavy tails are positive; the - 3 normalises so that a Gaussian has excess kurtosis 0.

Link copied to clipboard
open val m2: Double

Raw 2nd central moment: Sum (x - mean)^2 * weight. Identical to sst.

Link copied to clipboard
abstract val m3: Double

Raw 3rd central moment: Sum (x - mean)^3 * weight.

Link copied to clipboard
abstract val m4: Double

Raw 4th central moment: Sum (x - mean)^4 * weight.

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 skewness: Double

Biased skewness: (m3 / w) / variance^1.5. Standardised third moment; 0 for symmetric distributions, positive for right tails, negative for left tails.

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

Sample-size-adjusted (unbiased) excess kurtosis. Zero when totalWeights <= 3.

Link copied to clipboard

Sample-size-adjusted (unbiased) skewness. Zero when totalWeights <= 2.

Link copied to clipboard
open val variance: Double

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

kurtosis

Biased excess kurtosis: (m4 / w) / variance^2 - 3. Heavy tails are positive; the - 3 normalises so that a Gaussian has excess kurtosis 0.

m2

open val m2: Double(source)

Raw 2nd central moment: Sum (x - mean)^2 * weight. Identical to sst.

m3

abstract val m3: Double(source)

Raw 3rd central moment: Sum (x - mean)^3 * weight.

m4

abstract val m4: Double(source)

Raw 4th central moment: Sum (x - mean)^4 * weight.

skewness

Biased skewness: (m3 / w) / variance^1.5. Standardised third moment; 0 for symmetric distributions, positive for right tails, negative for left tails.

unbiasedKurtosis

Sample-size-adjusted (unbiased) excess kurtosis. Zero when totalWeights <= 3.

unbiasedSkewness

Sample-size-adjusted (unbiased) skewness. Zero when totalWeights <= 2.