Point-estimate statistics

These estimators operate on single uncertain values, which can be of any type, such as populations, theoretical distributions, KDE distributions or fitted distributions. They compute the statistic in question by drawing a length-n draw of the uncertain value, then computing the statistic on that draw.

Syntax

The syntax for computing the statistic f for single instances of an uncertain value x is

  • f(x::AbstractUncertainValue, n::Int, args...; kwargs...), which estimates the statistic f for a length-n draw of x.

Methods

Mean

Statistics.meanMethod
mean(uv::AbstractUncertainValue, n::Int)

Compute the mean of an uncertain value over an n-draw sample of it.

source

Mode

StatsBase.modeMethod
mode(uv::AbstractUncertainValue, n::Int)

Compute the mode of an uncertain value over an n-draw sample of it.

source

Quantile

Statistics.quantileMethod
quantile(uv::AbstractUncertainValue, q, n::Int)

Compute the quantile(s) q of an uncertain value over an n-draw sample of it.

source

IQR

StatsBase.iqrMethod
iqr(uv::AbstractUncertainValue, n::Int)

Compute the interquartile range (IQR), i.e. the 75th percentile minus the 25th percentile, over an n-draw sample of an uncertain value.

source

Median

Statistics.medianMethod
median(uv::AbstractUncertainValue, n::Int)

Compute the median of an uncertain value over an n-draw sample of it.

source

Middle

Statistics.middleMethod
middle(uv::AbstractUncertainValue, n::Int)

Compute the middle of an uncertain value over an n-draw sample of it.

source

Standard deviation

Statistics.stdMethod
std(uv::AbstractUncertainValue, n::Int)

Compute the standard deviation of an uncertain value over an n-draw sample of it.

source

Variance

Statistics.varMethod
variance(uv::AbstractUncertainValue, n::Int)

Compute the variance of an uncertain value over an n-draw sample of it.

source

Generalized/power mean

StatsBase.genmeanMethod
genmean(uv::AbstractUncertainValue, p, n::Int)

Compute the generalized/power mean with exponent p of an uncertain value over an n-draw sample of it.

source

Generalized variance

StatsBase.genvarMethod
genvar(uv::AbstractUncertainValue, n::Int)

Compute the generalized sample variance of an uncertain value over an n-draw sample of it.

source

Harmonic mean

StatsBase.harmmeanMethod
harmmean(uv::AbstractUncertainValue, n::Int)

Compute the harmonic mean of an uncertain value over an n-draw sample of it.

source

Geometric mean

StatsBase.geomeanMethod
geomean(uv::AbstractUncertainValue, n::Int)

Compute the geometric mean of an uncertain value over an n-draw sample of it.

source

Kurtosis

StatsBase.kurtosisMethod
kurtosis(uv::AbstractUncertainValue, n::Int, m = mean(uv, n))

Compute the excess kurtosis of an uncertain value over an n-draw sample of it, optionally specifying a center m).

source

k-th order moment

StatsBase.momentFunction
moment(x::AbstractUncertainValue, k, n::Int, m = mean(x, n))

Compute the k-th order central moment of an uncertain value over an n-draw sample of it, optionally specifying a center m.

source

Percentile

StatsBase.percentileMethod
percentile(x::AbstractUncertainValue, p, n::Int)

Compute the percentile(s) p of an uncertain value over an n-draw sample of it.

source

Renyi entropy

StatsBase.renyientropyMethod
renyientropy(uv::AbstractUncertainValue, α, n::Int)

Compute the Rényi (generalized) entropy of order α of an uncertain value over an n-draw sample of it.

source

Run-length encoding

StatsBase.rleMethod
rle(x::AbstractUncertainValue, n::Int)

Compute the run-length encoding of an uncertain value over a n-draw sample of it as a tuple. The first element of the tuple is a vector of values of the input and the second is the number of consecutive occurrences of each element.

source

Standard error of the mean

StatsBase.semMethod
sem(x::AbstractUncertainValue, n::Int)

Compute the standard error of the mean of an uncertain value over a n-draw sample of it, optionally specifying a center m, i.e. sqrt(var(x_draw, corrected = true) / length(x_draw)).

source

Skewness

StatsBase.skewnessMethod
skewness(x::AbstractUncertainValue, n::Int, m = mean(x, n))

Compute the standardized skewness of an uncertain value over an n-draw sample of it, optionally specifying a center m.

source

Span

StatsBase.spanMethod
span(x::AbstractUncertainValue, n::Int)

Compute the span of a collection, i.e. the range minimum(x):maximum(x), of an uncertain value over an n-draw sample of it. The minimum and maximum of the draws of x are computed in one pass using extrema.

source

Summary statistics

StatsBase.summarystatsMethod
summarystats(uv::AbstractUncertainValue, n::Int)

Compute summary statistics of an uncertain value over an n-draw sample of it. Returns a SummaryStats object containing the mean, minimum, 25th percentile, median, 75th percentile, and maximum.

source

Total variance

StatsBase.totalvarMethod
totalvar(uv::AbstractUncertainValue, n::Int)

Compute the total sample variance of an uncertain value over an n-draw sample of it. For a single uncertain value, this is equivalent to the sample variance.

source

Theoretical and fitted distributions

For theoretical distributions, both with known and fitted parameters, some of the stats functions may be called without the n argument, because the underlying distributions are represented as actual distributons. For these, we can compute several of the statistics from the distributions directly.