Core statistics
This package implements most 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
, which controls how many times the uncertain values are resampled to compute the statistics.
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.
1 | middle(uv::AbstractUncertainValue, n::Int) |
#
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::UncertainDataset, 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::UncertainDataset, n::Int) |
Computes the element-wise median of a dataset of uncertain values. Takes the median of an n
-draw sample for each element.
1 | middle(d::UncertainDataset, n::Int) |
#
Statistics.std
— Method.
1 | std(d::UncertainDataset, 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::UncertainDataset, 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::UncertainDataset, 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::UncertainDataset, d2::UncertainDataset, n::Int; kwargs...) |
Compute the covariance between two UncertainDataset
s by realising both datasets n
times.
#
Statistics.cor
— Method.
1 | cor(d1::UncertainDataset, d2::UncertainDataset, n::Int; kwargs...) |
Compute the Pearson correlation between two UncertainDataset
s by realising both datasets n
times.