The OpenD Programming Language

mir.stat.distribution

This package publicly imports mir.stat.distribution.* modules.

import mir.math.common: pow;
import mir.stat.distribution;
import mir.test: shouldApprox;

4.binomialPMF(6, 2.0 / 3).shouldApprox == (15.0 * pow(2.0 / 3, 4) * pow(1.0 / 3, 2));

Each individual distribution module contains - where feasible - functions for: - Probability density/mass functions (e.g. mir.stat.distribution.*PDF/mir.stat.distribution.*PMF) - Cumulative distriution functions (e.g. mir.stat.distribution.*CDF) - Complementary cumulative distribution functions (e.g. mir.stat.distribution.*CCDF) - Inverse cumulative distribution functions (e.g. mir.stat.distribution.*InvCDF) - Log probaiity density/mass functions (e.g. mir.stat.distribution.*LPDF/mir.stat.distribution.*LPMF)

In addition, convenience modules are provided (mir.stat.distribution.pdf, mir.stat.distribution.cdf, mir.stat.distribution.invcdf) that publicly import only the respective functions from each individual distribution module (note: the pdf module also contains pmfs).

Some (discrete) distributions include multiple algorithms for calculating the included functions. The default is a direct calculation with others being approximations. As a convention, these modules leave it to the user to determine when to switch between the different approximations. Care should be taken if more extreme parameters are used as it can have an impact on speed.

ModulesDescription
Convenience Modules (with public imports)
mir.stat.distributionStatistical Distributions
mir.stat.distribution.pdfProbability Density/Mass Functions
mir.stat.distribution.cdfCumulative Distribution Functions
mir.stat.distribution.invcdfInverse Cumulative Distribution Functions
Univariate Discrete Distributions
mir.stat.distribution.bernoulliBernoulli Distribution
mir.stat.distribution.binomialBinomial Distribution
mir.stat.distribution.geometricGeometric Distribution
mir.stat.distribution.hypergeometricHypergeometric Distribution
mir.stat.distribution.negative_binomialNegative Binomial Distribution
mir.stat.distribution.poissonPoisson Distribution
mir.stat.distribution.uniform_discreteDiscrete Uniform Distribution
Univariate Continuous Distributions
mir.stat.distribution.betaBeta Distribution
mir.stat.distribution.beta_proportionBeta Proportion Distribution
mir.stat.distribution.cauchyCauchy Distribution
mir.stat.distribution.chi2Chi-squared Distribution
mir.stat.distribution.cornish_fisherCornish-Fisher Expansion
mir.stat.distribution.exponentialExponential Distribution
mir.stat.distribution.fF Distribution
mir.stat.distribution.gammaGamma Distribution
mir.stat.distribution.generalized_paretoGeneralized Pareto Distribution
mir.stat.distribution.gevGeneralized Extreme Value (GEV) Distribution
mir.stat.distribution.laplaceLaplace Distribution
mir.stat.distribution.log_normalLog-normal Distribution
mir.stat.distribution.logisticLogistic Distribution
mir.stat.distribution.normalNormal Distribution
mir.stat.distribution.paretoPareto Distribution
mir.stat.distribution.rayleighRayleigh Distribution
mir.stat.distribution.students_tStudent's t Distribution
mir.stat.distribution.uniformContinuous Uniform Distribution
mir.stat.distribution.weibullWeibull Distribution
Multivariate Distributions
mir.stat.distribution.categoricalCategorical Distribution

Modules

bernoulli
module mir.stat.distribution.bernoulli

This module contains algorithms for the Bernoulli Distribution.

beta
module mir.stat.distribution.beta

This module contains algorithms for the Beta Distribution.

beta_proportion
module mir.stat.distribution.beta_proportion

This module contains algorithms for the Beta Proportion Distribution.

binomial
module mir.stat.distribution.binomial

This module contains algorithms for the Binomial Distribution.

categorical
module mir.stat.distribution.categorical

This module contains algorithms for the Categorical Distribution.

cauchy
module mir.stat.distribution.cauchy

This module contains algorithms for the Cauchy Distribution.

cdf
module mir.stat.distribution.cdf

This package publicly imports mir.stat.distribution.*CDF modules.

chi2
module mir.stat.distribution.chi2

This module contains algorithms for the Chi-squared Distribution.

cornish_fisher
module mir.stat.distribution.cornish_fisher

This module contains algorithms for the Cornish-Fisher Expansion.

exponential
module mir.stat.distribution.exponential

This module contains algorithms for the Exponential Distribution.

f
module mir.stat.distribution.f

This module contains algorithms for the F Distribution.

gamma
module mir.stat.distribution.gamma

This module contains algorithms for the Gamma Distribution.

generalized_pareto
module mir.stat.distribution.generalized_pareto

This module contains algorithms for the Generalized Pareto Distribution.

geometric
module mir.stat.distribution.geometric

This module contains algorithms for the Geometric Distribution.

gev
module mir.stat.distribution.gev

This module contains algorithms for the Generalized Extreme Value (GEV) Distribution.

hypergeometric
module mir.stat.distribution.hypergeometric

This module contains algorithms for the Hypergeometric Distribution.

invcdf
module mir.stat.distribution.invcdf

This package publicly imports mir.stat.distribution.*InvCDF modules.

laplace
module mir.stat.distribution.laplace

This module contains algorithms for the Laplace Distribution.

log_normal
module mir.stat.distribution.log_normal

This module contains algorithms for the Log-normal Distribution.

logistic
module mir.stat.distribution.logistic

This module contains algorithms for the Logistic Distribution.

negative_binomial
module mir.stat.distribution.negative_binomial

This module contains algorithms for the Negative Binomial Distribution.

normal
module mir.stat.distribution.normal

This module contains algorithms for the Normal Distribution.

pareto
module mir.stat.distribution.pareto

This module contains algorithms for the Pareto Distribution.

pdf
module mir.stat.distribution.pdf

This package publicly imports mir.stat.distribution.*PDF & .*PMF modules.

poisson
module mir.stat.distribution.poisson

This module contains algorithms for the Poisson Distribution.

rayleigh
module mir.stat.distribution.rayleigh

This module contains algorithms for the Rayleigh Distribution.

students_t
module mir.stat.distribution.students_t

This module contains algorithms for the Student's t Distribution.

uniform
module mir.stat.distribution.uniform

This module contains algorithms for the continuous Uniform Distribution.

uniform_discrete
module mir.stat.distribution.uniform_discrete

This module contains algorithms for the Discrete Uniform Distribution.

weibull
module mir.stat.distribution.weibull

This module contains algorithms for the Weibull Distribution.

Public Imports

mir.stat.distribution.bernoulli
public import mir.stat.distribution.bernoulli;
mir.stat.distribution.beta
public import mir.stat.distribution.beta;
mir.stat.distribution.beta_proportion
public import mir.stat.distribution.beta_proportion;
mir.stat.distribution.binomial
public import mir.stat.distribution.binomial;
mir.stat.distribution.cauchy
public import mir.stat.distribution.cauchy;
mir.stat.distribution.chi2
public import mir.stat.distribution.chi2;
mir.stat.distribution.cornish_fisher
public import mir.stat.distribution.cornish_fisher;
mir.stat.distribution.exponential
public import mir.stat.distribution.exponential;
mir.stat.distribution.f
public import mir.stat.distribution.f;
mir.stat.distribution.gamma
public import mir.stat.distribution.gamma;
mir.stat.distribution.generalized_pareto
public import mir.stat.distribution.generalized_pareto;
mir.stat.distribution.geometric
public import mir.stat.distribution.geometric;
mir.stat.distribution.gev
public import mir.stat.distribution.gev;
mir.stat.distribution.hypergeometric
public import mir.stat.distribution.hypergeometric;
mir.stat.distribution.laplace
public import mir.stat.distribution.laplace;
mir.stat.distribution.log_normal
public import mir.stat.distribution.log_normal;
mir.stat.distribution.logistic
public import mir.stat.distribution.logistic;
mir.stat.distribution.negative_binomial
public import mir.stat.distribution.negative_binomial;
mir.stat.distribution.normal
public import mir.stat.distribution.normal;
mir.stat.distribution.pareto
public import mir.stat.distribution.pareto;
mir.stat.distribution.poisson
public import mir.stat.distribution.poisson;
mir.stat.distribution.rayleigh
public import mir.stat.distribution.rayleigh;
mir.stat.distribution.students_t
public import mir.stat.distribution.students_t;
mir.stat.distribution.uniform
public import mir.stat.distribution.uniform;
mir.stat.distribution.uniform_discrete
public import mir.stat.distribution.uniform_discrete;
mir.stat.distribution.weibull
public import mir.stat.distribution.weibull;

Meta

Authors

John Michael Hall, Ilya Yaroshenko