kumulant

MomentsResult

@Serializable
@SerialName(value = "MomentsResult")
data class MomentsResult(val totalWeights: Double, val mean: Double, val m2: Double, val m3: Double, val m4: Double) : Result, HasSampleVariance, HasShapeMoments, HasCenterScale(source)

First four central moments (m2..m4) plus mean and total weight.

Constructors

Link copied to clipboard
constructor(totalWeights: Double, mean: Double, m2: Double, m3: Double, m4: Double)

Properties

Link copied to clipboard
open override val center: Double

Center of the distribution; typically a mean, median, or smoothed level.

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 override val m2: Double

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

Link copied to clipboard
open override val m3: Double

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

Link copied to clipboard
open override val m4: Double

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

Link copied to clipboard

Weighted running mean.

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 override val scale: Double

Scale of the distribution; typically a standard deviation, MAD, or span.

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 override 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
open override 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.

MomentsResult

constructor(totalWeights: Double, mean: Double, m2: Double, m3: Double, m4: Double)(source)

center

open override val center: Double(source)

Center of the distribution; typically a mean, median, or smoothed level.

m2

open override val m2: Double(source)

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

m3

open override val m3: Double(source)

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

m4

open override val m4: Double(source)

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

mean

Weighted running mean.

scale

open override val scale: Double(source)

Scale of the distribution; typically a standard deviation, MAD, or span.

sst

open override val sst: Double(source)

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

totalWeights

open override val totalWeights: Double(source)

Cumulative weight of observations folded into this result.