Module statistics

Source

Structs§

BernoulliDistribution
Bernoulli distribution with success probability p. If p has a null value, the success probability is unknown. For a more in-depth discussion, see:
ExponentialDistribution
Exponential distribution with an optional shift. The probability density function (PDF) is defined as follows:
GaussianDistribution
Gaussian (normal) distribution, represented by its mean and variance. For a more in-depth discussion, see:
GenericDistribution
A generic distribution whose functional form is not available, which is approximated via some summary statistics. For a more in-depth discussion, see:
UniformDistribution
Uniform distribution, represented by its range. If the given range extends towards infinity, the distribution will be improper – which is OK. For a more in-depth discussion, see:

Enums§

Distribution
This object defines probabilistic distributions that encode uncertain information about a single, scalar value. Currently, we support five core statistical distributions. New variants will be added over time.

Functions§

combine_bernoullis
This function takes a logical operator and two Bernoulli distributions, and it returns a new Bernoulli distribution that represents the result of the operation. Currently, only AND and OR operations are supported.
combine_gaussians
Applies the given operation to the given Gaussian distributions. Currently, this function handles only addition and subtraction operations. If the result is not a Gaussian random variable, it returns None. For details, see:
compute_mean
Computes the mean value for the result of the given binary operation on two unknown quantities represented by their Distribution objects.
compute_median
Computes the median value for the result of the given binary operation on two unknown quantities represented by its Distribution objects. Currently, the median is calculable only for addition and subtraction operations on:
compute_variance
Computes the variance value for the result of the given binary operation on two unknown quantities represented by their Distribution objects.
create_bernoulli_from_comparison
Creates a new Bernoulli distribution by computing the resulting probability. Expects op to be a comparison operator, with left and right having numeric distributions. The resulting distribution has the Float64 data type.
new_generic_from_binary_op
Creates a new Generic distribution that represents the result of the given binary operation on two unknown quantities represented by their Distribution objects. The function computes the mean, median and variance if possible.