Core statistics
This package implements many of the statistical algorithms in StatsBase
for uncertain values and uncertain datasets.
The syntax for calling the algorithms is the same as in StatsBase
, but the functions here accept an additional positional argument n
. This additional argument controls how many times the uncertain values are resampled to compute the statistics. For theoretical distributions, both with known and fitted parameters, some of the stats functions may be called without the n
argument.
Statistics of single uncertain values¶
#
Statistics.mean
— Method.
1 | mean(uv::AbstractUncertainValue, n::Int) |
Compute the mean of an uncertain value over an n
-draw sample of it.
#
Statistics.median
— Method.
1 | median(uv::AbstractUncertainValue, n::Int) |
Compute the median of an uncertain value over an n
-draw sample of it.
#
Statistics.middle
— Method.
1 | middle(uv::AbstractUncertainValue, n::Int) |
Compute the middle of an uncertain value over an n
-draw sample of it.
#
Statistics.std
— Method.
1 | std(uv::AbstractUncertainValue, n::Int) |
Compute the standard deviation of an uncertain value over an n
-draw sample of it.
#
Statistics.var
— Method.
1 | variance(uv::AbstractUncertainValue, n::Int) |
Compute the variance of an uncertain value over an n
-draw sample of it.
#
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.
Statistics on datasets of uncertain values¶
The following statistics are available for uncertain datasets (collections of uncertain values).
#
Statistics.mean
— Method.
1 | mean(d::AbstractUncertainValueDataset, n::Int) |
Computes the element-wise mean of a dataset of uncertain values. Takes the mean of an n
-draw sample for each element.
#
Statistics.median
— Method.
1 | median(d::AbstractUncertainValueDataset, n::Int) |
Computes the element-wise median of a dataset of uncertain values. Takes the median of an n
-draw sample for each element.
#
Statistics.middle
— Method.
1 | middle(d::AbstractUncertainValueDataset, n::Int) |
Compute the middle of n
realisations of an AbstractUncertainValueDataset
.
#
Statistics.std
— Method.
1 | std(d::AbstractUncertainValueDataset, n::Int; kwargs...) |
Computes the element-wise standard deviation of a dataset of uncertain values. Takes the standard deviation of an n
-draw sample for each element.
#
Statistics.var
— Method.
1 | var(d::AbstractUncertainValueDataset, n::Int; kwargs...) |
Computes the element-wise sample variance of a dataset of uncertain values. Takes the sample variance of an n
-draw sample for each element.
#
Statistics.quantile
— Method.
1 | quantile(d::AbstractUncertainValueDataset, p, n::Int; kwargs...) |
Compute element-wise quantile(s) p
of a dataset consisting of uncertain values. Takes the quantiles of an n
-draw sample for each element.
#
Statistics.cov
— Method.
1 | cov(d1::AbstractUncertainValueDataset, d2::AbstractUncertainValueDataset, n::Int; kwargs...) |
Compute the covariance between two AbstractUncertainValueDataset
s by realising both datasets n
times.
#
Statistics.cor
— Method.
1 | cor(d1::AbstractUncertainValueDataset, d2::AbstractUncertainValueDataset, n::Int; kwargs...) |
Compute the Pearson correlation between two AbstractUncertainValueDataset
s by realising both datasets n
times.