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 statisticf
for a length-n
draw ofx
.
Methods¶
Mean¶
#
Statistics.mean
— Method.
1 | mean(uv::AbstractUncertainValue, n::Int) |
Compute the mean of an uncertain value over an n
-draw sample of it.
Mode¶
#
StatsBase.mode
— Method.
1 | mode(uv::AbstractUncertainValue, n::Int) |
Compute the mode of an uncertain value over an n
-draw sample of it.
Quantile¶
#
Statistics.quantile
— Method.
1 | quantile(uv::AbstractUncertainValue, q, n::Int) |
Compute the quantile(s) q
of an uncertain value over an n
-draw sample of it.
IQR¶
#
StatsBase.iqr
— Method.
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.
Median¶
#
Statistics.median
— Method.
1 | median(uv::AbstractUncertainValue, n::Int) |
Compute the median of an uncertain value over an n
-draw sample of it.
Middle¶
#
Statistics.middle
— Method.
1 | middle(uv::AbstractUncertainValue, n::Int) |
Compute the middle of an uncertain value over an n
-draw sample of it.
Standard deviation¶
#
Statistics.std
— Method.
1 | std(uv::AbstractUncertainValue, n::Int) |
Compute the standard deviation of an uncertain value over an n
-draw sample of it.
Variance¶
#
Statistics.var
— Method.
1 | variance(uv::AbstractUncertainValue, n::Int) |
Compute the variance of an uncertain value over an n
-draw sample of it.
Generalized/power mean¶
#
StatsBase.genmean
— Method.
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.
Generalized variance¶
#
StatsBase.genvar
— Method.
1 | genvar(uv::AbstractUncertainValue, n::Int) |
Compute the generalized sample variance of an uncertain value over an n
-draw sample of it.
Harmonic mean¶
#
StatsBase.harmmean
— Method.
1 | harmmean(uv::AbstractUncertainValue, n::Int) |
Compute the harmonic mean of an uncertain value over an n
-draw sample of it.
Geometric mean¶
#
StatsBase.geomean
— Method.
1 | geomean(uv::AbstractUncertainValue, n::Int) |
Compute the geometric mean of an uncertain value over an n
-draw sample of it.
Kurtosis¶
#
StatsBase.kurtosis
— Method.
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
).
k-th order moment¶
#
StatsBase.moment
— Function.
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
.
Percentile¶
#
StatsBase.percentile
— Method.
1 | percentile(x::AbstractUncertainValue, p, n::Int) |
Compute the percentile(s) p
of an uncertain value over an n
-draw sample of it.
Renyi entropy¶
#
StatsBase.renyientropy
— Method.
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.
Run-length encoding¶
#
StatsBase.rle
— Method.
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.
Standard error of the mean¶
#
StatsBase.sem
— Method.
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))
.
Skewness¶
#
StatsBase.skewness
— Method.
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
.
Span¶
#
StatsBase.span
— Method.
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.
Summary statistics¶
#
StatsBase.summarystats
— Method.
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.
Total variance¶
#
StatsBase.totalvar
— Method.
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.
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.