Model / stats · All operations

Use a probability distribution

Distribution functions, density estimation.

Status

In arcform

Not built yet

arcform does not do this yet. Its place on the roadmap

Shape of the result
a table describing the input rather than holding its rows
Level
needs a DuckDB extension

Variants

Evaluate a probability distribution

Compute densities, probabilities or samples from a named probability distribution.

What other tools call it

Meridian's classification; an independent blind rating agreed on 86.2% of 312 rows (exact class, version 2).

mlpack (3)
  • Distributionsread 2026-09-27

    Probability distribution classes

  • mlpack_detread 2026-09-27

    Density estimation trees: train one, or predict density at query points

  • mlpack_kderead 2026-09-27

    Kernel density estimation at query points, with dual-tree algorithms

Background

A probability distribution describes how probabilities are assigned to the possible results of a random phenomenon.[1] A random variable assigns a value to each outcome of a probabilistic experiment and induces a probability distribution on the values it can take.[1] Probability distributions are often described by cumulative distribution functions, probability mass functions or probability density functions.[1]

When to use it

The quantile function of a probability distribution is the inverse of its cumulative distribution function.[2] A statistical application may need key percentage points of a distribution, such as its 2.5% and 97.5% levels, to assess the statistical significance of an observation whose distribution is known.[2] The quantile of the standard normal distribution at 0.975 is 1.96.[3] Quantile functions are used in both statistical applications and Monte Carlo methods.[2]

Unlike a probability, a probability density function can take on values greater than one.[4] The probability for a continuous random variable to take on any particular value is zero.[4] The probability of a continuous random variable falling within a range of values is given by the integral of its probability density function over that range.[4] Treat a density value as a relative likelihood to compare with other density values, and turn to the cumulative distribution function when the question is the chance of a range. (Meridian's view)

The method

The cumulative distribution function of a real-valued random variable X, evaluated at x, is the probability that X will take a value less than or equal to x.[5] For a continuous distribution, the cumulative distribution function at a value is the area under the probability density function up to that value.[1] Probability mass functions are used for discrete distributions, while probability density functions are used for many continuous distributions.[1] The probability density function of a continuous random variable can be determined from its cumulative distribution function by differentiating.[5]

Inverse transform sampling, also known as inversion sampling, is a basic method for generating sample numbers at random from any probability distribution given its cumulative distribution function.[6] Inverse transform sampling takes uniform samples of a number between 0 and 1, interpreted as a probability.[6] Computationally, inverse transform sampling involves computing the quantile function of the distribution.[6] For the normal distribution, the lack of an analytical expression for the quantile function means that other methods, such as the Box–Muller transform, may be preferred computationally.[6] Inversion sampling is now the default method for sampling from a normal distribution in the statistical package R.[6]

In mlpack, the GaussianDistribution, GammaDistribution and LaplaceDistribution classes each compute probabilities of points, sample from the distribution and fit the distribution to observations.[7]

Compared with the alternatives

Parametric statistics assumes that the distribution the observed data was drawn from can be described by a finite set of unknown parameters.[8] Nonparametric statistics does not assume explicit finite-parametric mathematical forms for distributions when modelling data.[8] Most well-known statistical methods are parametric.[8] Nonparametric methods make fewer assumptions, so their applicability is much more general than that of the corresponding parametric methods.[9] When the form of a distribution is in doubt, an estimate from the sample is a gentler place to start than a named distribution chosen on faith. (Meridian's view)

Sources

  1. [1]Probability distributionsecondary source
  2. [2]Quantile functionsecondary source
  3. [3]Normal distributionsecondary source
  4. [4]Probability density functionsecondary source
  5. [5]Cumulative distribution functionsecondary source
  6. [6]Inverse transform samplingsecondary source
  7. [7]mlpack documentationdocumentation
  8. [8]Parametric statisticssecondary source
  9. [9]Nonparametric statisticssecondary source