A coin flip, a count of rare events, a bell curve, a probability vector that's itself uncertain — four completely different-looking situations, and machine learning reaches for a named distribution to model every one of them.
Toggle between the four. Each one has an exact formula behind it, and every bar (or curve point) on screen is that formula evaluated at a specific value — nothing here is approximated or simulated.
Each distribution answers a different shape of question:
- — the Bernoulli's single parameter: the probability of outcome 1.
- — the Poisson's rate parameter: the expected count.
- — the Gaussian's mean and standard deviation.
A Dirichlet distribution is one level up: instead of putting mass on numbers, it puts mass on probability vectors themselves. Its expected vector has a strikingly simple form:
- — the concentration parameter for category (a pseudo-count of prior observations).
- — the expected probability the Dirichlet assigns to category .
- Bernoulli is the atom
Every other discrete distribution here is built by combining or generalizing Bernoulli trials.
- Poisson counts, Gaussian measures
Poisson lives on non-negative integers (counts); the Gaussian lives on the whole real line (measurements) and is fully determined by just its first two moments.
- Dirichlet is a distribution over distributions
Where Bernoulli/Poisson/Gaussian describe one random number, the Dirichlet describes an entire random categorical distribution — exactly the object a classifier's softmax output is trying to estimate.
Poisson's bars and the Gaussian's curve both come from a single closed-form line of code — the same determinism that made the coin-flip Bernoulli exact also makes and the bell-curve formula exact, just with more decimal places to track by hand.
- Poisson(λ=2): compute P(X=0)
- Poisson(λ=2): compute P(X=1) and P(X=2) — and notice they tie
When is a whole number, and are always exactly equal — the distribution has two tied modes.
- Dirichlet(α=[2,3,5]): compute the expected vector
The concentration parameters' own proportions become the expected probabilities — no extra machinery needed.
For Poisson(λ=2), what is P(X=2)?
Almost every probabilistic model in this course is one of these four shapes wearing a different hat: a classifier's output layer is Bernoulli or categorical, a count-based likelihood is Poisson, a continuous noise model is Gaussian, and a prior over class probabilities is Dirichlet.