About Distribution Atlas
One page for each common probability distribution: what it models, its formulas, a plot you can play with, a probability calculator, a worked example, how it connects to the others, and how to use it in SciPy and NumPy. Written for students and for people who use these distributions in machine learning.
Every answer checked by code
The formulas are typed by hand, so the site also has every one of them as code, and tests that compare the two ways of getting each number. On every build:
- Each distribution, at 139 parameter settings in all: the density integrates (or the PMF sums) to 1; the mean, variance, moment generating function and entropy formulas match numerical integration of the density; the CDF matches the integrated density at five points; and the stated mode is a maximum.
- Quantiles: the calculator's inverse CDF is checked at nine probabilities for every distribution and setting (F of the quantile gives back the probability), closed forms are checked against solving F(x) = q numerically, and a few are pinned to SciPy's values. The calculator's other answers are checked against sums and integrals of the density.
- Special functions (gamma, digamma, the incomplete gamma and beta functions, erf, the normal quantile, modified Bessel functions, Owen's T) are checked against published values and identities.
- Worked examples: the answer printed on each page is recomputed from the distribution's code.
- Relations: 100 of the 107 relations between distributions are checked numerically, by convolving densities, transforming CDFs, normalizing prior × likelihood, or watching a limit close.
- Python: the SciPy and NumPy snippets are run against the site's own numbers (when SciPy is installed), which catches the usual rate-versus-scale mix-ups.
The same code draws the plots and runs the calculator, so what you see is what was tested.
Conventions
- Geometric: the number of trials up to and including the first success (as in SciPy and NumPy).
- Negative binomial: failures before the -th success.
- Exponential and gamma: rate parameters (, ); SciPy wants the scale .
- Entropy is in nats (natural logarithms) unless a page says bits.
- A discrete quantile is the smallest with , as in SciPy's
ppf.
Books
Privacy
The site sets no cookies of its own. It may use Google Analytics to count visits.