Skip to content

Point estimates on values

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.

1
mean(uv::AbstractUncertainValue, n::Int)

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

source

Mode

# StatsBase.modeMethod.

1
mode(uv::AbstractUncertainValue, n::Int)

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

source

Quantile

# Statistics.quantileMethod.

1
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.

1
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.

1
median(uv::AbstractUncertainValue, n::Int)

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

source

Middle

# Statistics.middleMethod.

1
middle(uv::AbstractUncertainValue, n::Int)

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

source

Standard deviation

# Statistics.stdMethod.

1
std(uv::AbstractUncertainValue, n::Int)

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

source

Variance

# Statistics.varMethod.

1
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.

1
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.

1
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.

1
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.

1
geomean(uv::AbstractUncertainValue, n::Int)

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

source

Kurtosis

# StatsBase.kurtosisMethod.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.

1
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.