Lectures on Probability · No. 1

The Discrete
Universe

A guided tour from the single coin flip to the architecture of real-world uncertainty

Eleven Chapters Discrete Distributions For the curious student
Prologue

Why probability?

A short word before we begin.

The world rarely tells us what will happen. It tells us, at best, what tends to happen — how often, how much, how long until. Probability is the mathematics of tendency. It is the language we use when our knowledge is partial, when outcomes vary, when the future is open.

We will build that language one piece at a time. Every distribution in this lecture descends from a single, almost trivial idea — a coin that lands heads or tails. From this atom we will assemble counts, waits, samples, processes, and finally the kind of compound, dependent uncertainty that describes real life: insurance claims, web traffic, epidemics, queues at the post office.

The promise of this lecture is simple. By the end, you will see that the bestiary of named distributions — Bernoulli, binomial, geometric, Poisson, multinomial — is not a list to memorize. It is a family. Each member is born from the others by a precise operation: counting, waiting, taking limits, removing replacement, dropping independence. Once you see the family tree, the names become memorable because they cannot be otherwise.

Chapter I

The atom.

A single trial, two outcomes, one number.

Begin with the simplest possible random experiment. You flip a coin once. It lands heads or tails. You shoot a free throw — make or miss. A patient takes a new drug — recovers or does not. A customer visits your site — buys or leaves.

In every case, there are exactly two outcomes. Call one of them success (encoded as 1) and the other failure (encoded as 0). Let $p$ denote the probability of success. The whole experiment is captured by the single number $p$.

This is the Bernoulli trial, named for Jacob Bernoulli (1654–1705), and it is the atom of discrete probability. Every distribution we meet from here will be built from copies of it.

Definition · Bernoulli

The single-trial distribution

A random variable $X$ has the Bernoulli distribution with parameter $p \in [0,1]$, written $X \sim \text{Bern}(p)$, if

$$P(X=1) = p, \qquad P(X=0) = 1-p.$$

Its mean and variance are

$$\mathbb{E}[X] = p, \qquad \text{Var}(X) = p(1-p).$$

Notice the variance. It is largest when $p = 1/2$ — when we are most uncertain — and shrinks to zero as $p$ approaches 0 or 1, when the outcome becomes nearly determined. Variance is uncertainty made numerical.

Example

A precision machine on the factory floor stamps out flawless widgets 94% of the time; the remaining 6% leave with a defect. For a single widget, let $X = 1$ if it passes inspection, $0$ if not. Then $X \sim \text{Bern}(0.94)$, with mean $0.94$ and variance $0.94 \times 0.06 = 0.0564$.

The expected value here is not a forecast for any individual widget — no single piece is "94% acceptable." It is the long-run fraction of clean output across many runs.

probability X = 0 (failure) X = 1 (success) 0.30 0.70 1 0
0.70
Figure 1. The Bernoulli probability mass. Adjust p and watch the two bars trade height; everything else in this lecture grows from this single picture.
Chapter II

The sum.

Counting how often the atom succeeds.

One coin is dull. The interesting question begins when we flip $n$ of them and count the heads. If the flips are independent and each has success probability $p$, then the count of successes is the binomial random variable.

The logic is direct. The probability of a particular sequence with exactly $k$ successes (in some order) is $p^k (1-p)^{n-k}$ — one factor of $p$ for each success, one factor of $1-p$ for each failure. There are $\binom{n}{k}$ such sequences, since we are choosing which $k$ of the $n$ positions hold the successes. Multiply.

Definition · Binomial

The count of successes in n trials

If $X_1, \dots, X_n$ are independent Bernoulli$(p)$ trials and $S = X_1 + \dots + X_n$, then $S \sim \text{Bin}(n,p)$ with

$$P(S=k) = \binom{n}{k} p^k (1-p)^{n-k}, \quad k=0,1,\dots,n.$$
$$\mathbb{E}[S] = np, \qquad \text{Var}(S) = np(1-p).$$

The mean and variance fall out for free: expectation and variance of a sum of independent variables are the sums of their expectations and variances. The Bernoulli atom contributes $p$ to the mean and $p(1-p)$ to the variance; multiply by $n$.

The binomial is the workhorse of applied statistics. Polls, A/B tests, quality control, clinical trials — anywhere you count successes among a fixed number of attempts.

The shape of the distribution

For small $n$, the binomial is jagged and asymmetric (unless $p = 1/2$). As $n$ grows, the bell shape emerges. This is no coincidence — it is the Central Limit Theorem, which says any sum of many small independent contributions tends toward a normal distribution. The binomial is our first encounter with this universal phenomenon.

Example · Quality control

A factory produces widgets with defect rate $p = 0.02$. In a shipment of $n = 100$, what is the probability that at most 3 are defective?

P(S ≤ 3) = Σ C(100,k)·(0.02)ᵏ·(0.98)¹⁰⁰⁻ᵏ for k = 0,1,2,3 ≈ 0.859

The expected number of defects is $np = 2$, and the standard deviation is $\sqrt{np(1-p)} \approx 1.4$. So "3 or fewer" is well within one standard deviation of the mean — a likely outcome.

20
0.50
Figure 2. The binomial mass function. Slide n upward and watch the Central Limit Theorem appear before your eyes — the discrete bars trace a smoother and smoother bell.
· Interlude ·

Two relaxations.

The binomial sits on two pillars. Pull each one out, see what survives.

The binomial distribution rests on two assumptions: that every trial has the same success probability, and that the trials are independent. Both are convenient mathematical fictions. Real-world counts almost always violate at least one. Before continuing down the family tree, let us ask honestly — what happens when these pillars come down?

The story is more elegant than you might expect. Each pillar can be removed in isolation, and each removal produces a named distribution with the same mean as the binomial but a different variance. Better still: the two relaxations push the variance in opposite directions. By the end of this interlude, you will have a diagnostic tool for any real-world count dataset.

§ 1 · Different probabilities — the Poisson-Binomial

Imagine a clinical trial in which patients respond to treatment with individual probabilities $p_1, p_2, \dots, p_n$ — younger patients respond at higher rates, older patients lower. Or a sales team where each rep converts at her own pace. Or a quality-control sample in which units come from suppliers of varying reliability. The trials are still independent, but the probabilities differ.

The count of successes $S = X_1 + \dots + X_n$ now follows the Poisson-Binomial distribution. Its PMF has no closed form — it is a sum over all $\binom{n}{k}$ subsets of size $k$ of products of $p_i$'s and $(1-p_j)$'s — but the mean and variance are perfectly clean.

Definition · Poisson-Binomial

Independent trials with different success probabilities

If $X_1, \dots, X_n$ are independent Bernoulli trials with $X_i \sim \text{Bern}(p_i)$, then $S = \sum X_i$ has the Poisson-Binomial distribution with

$$P(S = k) = \sum_{|A| = k} \;\prod_{i \in A} p_i \prod_{j \notin A} (1 - p_j),$$

where the sum runs over all subsets $A \subseteq \{1,\dots,n\}$ of size $k$. The first two moments collapse to clean expressions:

$$\mathbb{E}[S] = \sum_{i=1}^n p_i, \qquad \text{Var}(S) = \sum_{i=1}^n p_i(1-p_i).$$

Here is the surprising fact, and it deserves to be stated as a theorem in miniature. Among all probability vectors with the same total mean, the variance is largest when the $p_i$ are all equal — that is, in the binomial case. Heterogeneity in the inputs reduces variance in the output.

The proof is one line. Write $\bar{p} = \frac{1}{n}\sum p_i$. Then

$$\text{Var}(S) = \sum p_i - \sum p_i^2 = n\bar{p} - \sum p_i^2.$$

By the Cauchy–Schwarz inequality, $\sum p_i^2 \geq n \bar{p}^2$, with equality if and only if all $p_i$ equal $\bar{p}$. Therefore $\text{Var}(S) \leq n\bar{p}(1-\bar{p})$ — the binomial variance — with equality only in the homogeneous case.

The intuition is worth dwelling on, because it is initially counterintuitive. Surely more variability among inputs means more variability in the output? Not here. A trial with $p = 0.99$ is nearly certain to succeed; one with $p = 0.01$ is nearly certain to fail. Their contributions to the count are nearly deterministic. Only trials near $p = 1/2$ are maximally uncertain. The binomial places every trial at the same level of randomness; spreading the $p_i$ apart pushes some toward the deterministic extremes and drains uncertainty out of the sum.

Example · Treatment across severity strata

A medical treatment cures $95\%$ of mild cases, $85\%$ of moderate cases, and $70\%$ of severe cases. A clinic treats 100 patients of each severity. How many recoveries should we expect, and with what variability?

E[S] = 100·0.95 + 100·0.85 + 100·0.70 = 250
Var(S) = 100·(0.95·0.05 + 0.85·0.15 + 0.70·0.30) = 39.25
Binomial baseline (same mean, p̄=0.833): Var = 300·0.833·0.167 ≈ 41.75

The Poisson-Binomial variance is about 6% lower than what a binomial assuming a uniform cure rate $p = 0.833$ would predict. A study that ignored the severity stratification would slightly overestimate its uncertainty — and produce confidence intervals wider than necessary.

0.00
Figure 3. Twenty trials, mean $\bar{p}=0.5$. As the spread $\delta$ grows (half the trials at $\bar{p}-\delta$, half at $\bar{p}+\delta$), the Poisson-Binomial PMF (teal) narrows against the binomial baseline (gray). At $\delta = 0.5$ the count becomes deterministic — half always succeed, half always fail.

§ 2 · Correlated trials — the Beta-Binomial

Now drop the second pillar (while keep the first). The trials are no longer independent. Voters in the same household lean alike. Defective parts cluster in time as a machine drifts out of calibration. People in an outbreak infect each other. In each case, knowing the outcome of one trial gives you information about the next.

How do we model correlation? The cleanest device is to imagine that the success probability $p$ is itself uncertain — drawn once from some prior distribution, and then the trials are conditionally independent given $p$. All trials inherit the same realized $p$, which couples them. Marginally, the trials are correlated; conditionally on $p$, they are independent.

The phrase conditionally independent given $p$ is doing a great deal of work in that sentence, and it deserves a paragraph of its own — because it is one of the most useful ideas in probability, and one of the most commonly mishandled.

Picture it this way. Imagine a drawer of biased coins — some lean toward heads, some toward tails, most somewhere in between. You reach in once, draw out a single coin without looking at its bias, and flip it $n$ times. The hidden bias of the coin you happened to grab is the realized $p$. Now ask: are the flips independent?

If I tell you which coin you drew — that is, if I reveal the value of $p$ — then yes, completely. Knowing flip 1 came up heads tells you nothing new about flip 2, because flip 2's behavior is already pinned down by the known bias of the coin in hand. Given $p$, the flips are independent.

If I do not tell you which coin you drew, the flips are no longer independent at all. They are correlated, and visibly so. Suppose you flip the unknown coin nine times and see nine heads. What do you predict for flip ten? Almost certainly heads — because nine heads is strong evidence you grabbed a heads-biased coin, and that bias persists through every remaining flip. Information flows from $X_1, \dots, X_9$ to $X_{10}$ entirely through the unobserved $p$.

This is the device in one sentence: the trials are independent given the latent $p$, but marginally correlated through it. Conditioning on the latent variable severs the link; integrating it out re-couples the trials.

The mathematics makes this completely transparent. By the conditional-independence assumption, $\mathbb{E}[X_i X_j \mid p] = p \cdot p = p^2$, and so by the law of total expectation,

$$\mathbb{E}[X_i X_j] \;=\; \mathbb{E}\bigl[\mathbb{E}[X_i X_j \mid p]\bigr] \;=\; \mathbb{E}[p^2].$$

But $\mathbb{E}[X_i] = \mathbb{E}[X_j] = \mathbb{E}[p]$, so the covariance between any two distinct trials is

$$\text{Cov}(X_i, X_j) \;=\; \mathbb{E}[p^2] - (\mathbb{E}[p])^2 \;=\; \text{Var}(p).$$

The covariance between any two trials equals the variance of the prior on $p$. If the prior is a spike (no uncertainty about $p$), the covariance vanishes and the trials are independent — recovering the binomial. If the prior is broad (substantial uncertainty about $p$), the trials are tightly coupled. Shared uncertainty produces shared fate. A single line of algebra is the entire mechanism behind the intra-class correlation $\rho$ that appears in the variance formula below.

Binomial · independent atoms X₁ X₂ X₃ X₄ X₅ no common cause Cov(Xᵢ, Xⱼ) = 0 Beta-Binomial · shared latent p p X₁ X₂ X₃ X₄ X₅ shared parent · all trials inherit p Cov(Xᵢ, Xⱼ) = Var(p)
Figure 3½. The graphical-model picture. On the left, the binomial: $n$ atoms with no shared parent, hence independent. On the right, the Beta-Binomial: a single latent $p$ (drawn dashed to mark it as unobserved) feeds into every trial, and integrating $p$ out leaves correlations among the $X_i$.

The natural prior for a probability is the Beta distribution, which lives on $[0,1]$ and has two parameters $\alpha, \beta > 0$ controlling its shape. Pair a Beta prior on $p$ with $n$ conditionally independent Bernoulli trials, and the resulting count $S$ has the Beta-Binomial distribution.

Definition · Beta-Binomial

Correlated trials via a shared latent probability

If $p \sim \text{Beta}(\alpha, \beta)$ and $X_1,\dots,X_n \mid p \sim \text{Bern}(p)$ independently, then $S = \sum X_i$ has the Beta-Binomial distribution with

$$P(S=k) = \binom{n}{k}\, \frac{B(k+\alpha,\, n-k+\beta)}{B(\alpha,\beta)}, \qquad k=0,1,\dots,n,$$

where $B(\cdot,\cdot)$ is the Beta function. Writing $p = \alpha/(\alpha+\beta)$ for the prior mean,

$$\mathbb{E}[S] = np, \qquad \text{Var}(S) = np(1-p)\bigl[1 + (n-1)\rho\bigr], \quad \rho = \frac{1}{\alpha+\beta+1}.$$

The mean is identical to the binomial. But the variance is multiplied by the factor $1 + (n-1)\rho$, where $\rho$ is the intra-class correlation — the correlation between any two trials. Correlation introduced this way increases variance, and the larger $n$ becomes, the more correlation matters. Doubling the sample size does not double the information content; it only adds independent information up to the correlation budget.

The concentration $\alpha + \beta$ controls how tightly the prior is concentrated around its mean:

  • $\alpha + \beta \to \infty$: the prior collapses to a spike at $p$. There is no randomness in the success probability, no induced correlation, and $\rho \to 0$. The binomial is recovered.
  • $\alpha + \beta = 2$ (uniform prior): a moderate correlation $\rho = 1/3$. The PMF is noticeably flatter than the binomial.
  • $\alpha + \beta \to 0$: the prior piles up at $0$ and $1$. The trials become perfectly correlated: either nearly all succeed or nearly all fail. The PMF becomes U-shaped.
Example · The cluster-sampled poll

A pollster surveys 1000 voters, but for cost reasons they sample 250 households of 4 — and household members vote alike, with intra-household correlation $\rho \approx 0.3$. What is the effective sample size?

Variance inflation: 1 + (4-1)·0.3 = 1.9
Effective n = 1000 / 1.9 ≈ 526

The nominal 1000-person poll has the precision of a true random sample of 526 voters. The margin of error is about 38% larger than naive calculation suggests. This is why serious surveys correct for cluster effects — and why ignoring correlation is one of the most common, and most dangerous, errors in applied statistics.

40.0
Figure 4. Twenty trials, prior mean $p = 0.5$. At high concentration ($\alpha+\beta$ large) the Beta-Binomial (teal) matches the binomial baseline (gray). As concentration drops, the distribution flattens and eventually becomes bimodal — the trials are now so correlated that you mostly see "almost all heads" or "almost all tails."

§ 3 · Heterogeneity vs. correlation — a diagnostic

Pause and admire what we have just discovered. The two relaxations of the binomial point in opposite directions:

DistributionMeanVariance vs. BinomialStory
Binomial np np(1−p) · baseline iid trials, identical p
Poisson-Binomial Σ pᵢ ≤ binomial · underdispersed independent, heterogeneous p
Beta-Binomial np ≥ binomial · overdispersed correlated via shared latent p

This is more than a curiosity. It is a diagnostic you can carry into any applied setting. When you collect count data and the sample variance comes out smaller than the binomial would predict, suspect hidden heterogeneity — different sub-populations with different rates, an unmeasured covariate, a structured experiment masquerading as a simple count. When the sample variance comes out larger, suspect correlation — clusters, contagion, a shared latent state.

The two stories produce different statistical signatures, and the experienced practitioner reads them like a doctor reads a chart. In real data, both effects are usually present at once, and disentangling them is the job of a hierarchical model — a Bernoulli atom whose probability $p_i$ is itself drawn from a distribution that depends on covariates and shared random effects. That construction will reappear in Chapter X, when we put it all together.

For now, return to the main path. We were waiting.

Chapter III

The wait.

How many trials until the first success?

Switch the question. Instead of counting successes in a fixed number of trials, fix the goal — one success — and count the trials. How many free throws until you make one? How many job applications until you get an offer? How many spins until the roulette ball lands on red?

This is the geometric distribution. To get the first success on trial $k$, you must fail $k-1$ times and then succeed once. Independent trials multiply, giving

$$P(X = k) = (1-p)^{k-1} p, \quad k = 1, 2, 3, \dots$$

The probabilities form a geometric sequence — hence the name. They decay by a factor of $1-p$ each step.

Definition · Geometric

The waiting-time distribution

If $X$ is the number of independent Bernoulli$(p)$ trials needed for the first success, then $X \sim \text{Geom}(p)$ with

$$P(X=k) = (1-p)^{k-1} p, \qquad \mathbb{E}[X] = \frac{1}{p}, \qquad \text{Var}(X) = \frac{1-p}{p^2}.$$

The mean has a beautifully intuitive form. If your success probability is $1/10$, you expect roughly $10$ trials per success. This is one of those rare formulas the body learns before the mind.

Memorylessness

The geometric distribution has a property both useful and slightly troubling: it has no memory. Suppose you've already failed five times. What is the distribution of the additional number of trials still needed? Exactly the same as it was at the start — Geom$(p)$.

Formally, $P(X > m + n \mid X > m) = P(X > n)$. The trials don't know how long you've been waiting. A roulette wheel is not "due" for a red after a long streak of black. This is the gambler's fallacy made mathematically precise — and refuted.

Memorylessness is the discrete cousin of a property that will reappear when we meet the exponential distribution and the Poisson process. It is the mathematical signature of a memoryless world.

Example · The fragile pitch

A founder estimates each investor pitch has a 15% chance of leading to a term sheet. How many pitches until the first yes?

E[X] = 1 / 0.15 ≈ 6.7 pitches

And the probability of needing more than $20$ pitches is $(1-0.15)^{20} \approx 0.039$ — about 4%. After 20 nos, only 4% of founders in this position are still waiting.

0.30
Figure 5. The geometric mass function — a strict, monotone decay. The smaller p, the longer the tail.
Chapter IV

The long wait.

Trials until the r-th success.

Now generalize. Instead of waiting for one success, wait for $r$. How many trials until you make your third free throw? Receive your fifth job offer? Sell your hundredth product?

This is the negative binomial distribution. The trick: to land the $r$-th success exactly on trial $n$, you need (i) the $n$-th trial to succeed, and (ii) exactly $r-1$ successes scattered among the previous $n-1$ trials. Multiply the two and you get the formula.

Definition · Negative Binomial

The r-th success arrives

If $N$ is the number of trials until the $r$-th success, then $N \sim \text{NB}(r,p)$ with

$$P(N=n) = \binom{n-1}{r-1} p^r (1-p)^{n-r}, \quad n = r, r+1, \dots$$
$$\mathbb{E}[N] = \frac{r}{p}, \qquad \text{Var}(N) = \frac{r(1-p)}{p^2}.$$

The relationships are clean. Setting $r=1$ recovers the geometric. The negative binomial is the sum of $r$ independent geometric waits: wait for success #1, then for success #2, and so on. That fact alone gives you the mean — sum of $r$ copies of $1/p$ — and the variance.

The distribution gets its strange name from the fact that its probabilities can be written using negative binomial coefficients (a generalization of $\binom{n}{k}$ to non-integer arguments). The name stuck. Treat it as a label.

Example · The tournament

A team needs $r=4$ wins to win a best-of-seven series. If they win each game with probability $p = 0.55$, the expected number of games until the 4th win is $4 / 0.55 \approx 7.3$. So this matchup is a coin flip — series go the distance.

Chapter V

The finite urn.

When sampling changes the population.

Step back to the binomial. We assumed the trials were independent — each had the same success probability $p$. That works when the population is effectively infinite, or when we sample with replacement. But what if it isn't?

An urn holds $N$ balls; $K$ are red, $N - K$ are blue. We draw $n$ balls without replacement. How many are red? The trials are no longer independent. Drawing a red one shifts the proportions for the next draw.

This is the hypergeometric distribution. The combinatorial bookkeeping is direct: the number of ways to draw exactly $k$ reds and $n-k$ blues, divided by the number of ways to draw any $n$ balls.

Definition · Hypergeometric

Sampling without replacement

If $X$ is the number of red balls drawn from an urn of $N$ balls (of which $K$ are red) when $n$ are drawn without replacement, then

$$P(X=k) = \frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}.$$
$$\mathbb{E}[X] = n \cdot \frac{K}{N}, \qquad \text{Var}(X) = n \cdot \frac{K}{N}\cdot\frac{N-K}{N}\cdot\frac{N-n}{N-1}.$$

The mean is identical to the binomial — replace $p$ with $K/N$. The variance is smaller than the binomial by a factor of $\frac{N-n}{N-1}$, called the finite population correction. Sampling without replacement is more informative; you can't get fooled by drawing the same ball twice. So your estimates are tighter.

When $N$ is large compared to $n$, the correction approaches 1, and the hypergeometric becomes indistinguishable from the binomial. This is why pollsters can usually use binomial-style formulas: the U.S. has 250 million voters and a poll surveys 1,000. The correction is negligible.

Example · The card draw

You draw 5 cards from a standard 52-card deck. What is the probability of exactly 2 aces? Here $N=52$, $K=4$, $n=5$, $k=2$:

P(X=2) = C(4,2)·C(48,3) / C(52,5) ≈ 0.0399

About 4%. The binomial approximation with $p = 4/52$ gives $\approx 0.0382$ — close, but not exact, because 5 out of 52 is non-negligible.

Chapter VI

Many faces.

When each trial has more than two outcomes.

A coin has two faces. A die has six. A six-way election, a customer choosing among five products, a survey with three response options — none of these fit into the binary mold. We need a generalization in which each trial has $k$ possible outcomes, not just 2.

This is the multinomial distribution. Each trial lands in one of $k$ categories with probabilities $p_1 + p_2 + \dots + p_k = 1$. After $n$ independent trials, you record the count vector $(X_1, X_2, \dots, X_k)$, where $X_i$ is the number of trials landing in category $i$.

Definition · Multinomial

The k-way generalization of the binomial

If each trial independently lands in category $i$ with probability $p_i$ (where $\sum p_i = 1$), and we count the totals after $n$ trials, then

$$P(X_1=n_1, \dots, X_k=n_k) = \frac{n!}{n_1!\, n_2!\, \cdots n_k!}\, p_1^{n_1} p_2^{n_2} \cdots p_k^{n_k}$$

where $n_1 + n_2 + \dots + n_k = n$. The marginal distribution of any single $X_i$ is $\text{Bin}(n, p_i)$.

The structure mirrors the binomial. The combinatorial coefficient $\frac{n!}{n_1!\cdots n_k!}$ counts the number of ways to assign the $n$ trials into the $k$ categories with the specified totals; the product $p_1^{n_1}\cdots p_k^{n_k}$ is the probability of any one such assignment.

An important subtlety: the categories are not independent. If $X_1$ comes out high, the others must collectively come out lower — they share a fixed total. This shows up as a negative covariance: $\text{Cov}(X_i, X_j) = -np_ip_j$ for $i \neq j$.

Example · The election

Three candidates A, B, C have true support $0.45$, $0.40$, $0.15$. A poll surveys $n = 1000$ voters. The multinomial gives the joint distribution of the three vote counts. The expected counts are $450$, $400$, $150$, with marginal standard deviations near $\sqrt{1000 \cdot 0.45 \cdot 0.55} \approx 15.7$ for A.

Chapter VII

The rare event.

A miraculous limit.

Consider a binomial situation in which $n$ is enormous and $p$ is tiny, but their product $\lambda = np$ is moderate. A million people in a city, each with a tiny probability of suffering a particular accident on any given day; the expected number of accidents is some manageable number $\lambda$. Or a billion atoms in a sample, each with a vanishing probability of decay per second.

Watch what happens to the binomial formula in this limit. Let $n \to \infty$ and $p \to 0$ with $np = \lambda$ held fixed. After some careful algebra,

$$\binom{n}{k} p^k (1-p)^{n-k} \;\;\longrightarrow\;\; e^{-\lambda} \frac{\lambda^k}{k!}.$$

The binomial collapses to a one-parameter family. This is the Poisson distribution, named for Siméon Poisson (1781–1840), and it is the law of rare events.

Definition · Poisson

The rare-event distribution

$X \sim \text{Pois}(\lambda)$ if

$$P(X=k) = e^{-\lambda} \frac{\lambda^k}{k!}, \quad k = 0, 1, 2, \dots$$
$$\mathbb{E}[X] = \lambda, \qquad \text{Var}(X) = \lambda.$$

Mean and variance are equal. This is a strong empirical signature: when you see real data with mean ≈ variance, the Poisson is your first guess.

The Poisson distribution is everywhere. Phone calls arriving at a switchboard. Mutations in a strand of DNA. Goals in a soccer match. Buses pulling into a stop. Bombs falling on London during the Blitz, in fact — Bortkiewicz's celebrated study of Prussian cavalry deaths-by-horse-kick was an early data fit.

What unites these phenomena? Three conditions, sometimes called the Poisson postulates: (i) events happen one at a time, (ii) the rate of events is approximately constant, and (iii) what happens in disjoint intervals is independent. Whenever those hold, the Poisson distribution is essentially forced.

Why the Poisson is the simplest nontrivial distribution

The binomial has two parameters; the Poisson has one. By forgetting how many trials there were and remembering only their average effect, the Poisson is what survives when the underlying mechanism becomes invisible. It is the distribution of pure rate.

Example · The call center

A call center receives an average of $\lambda = 4$ calls per minute. Then the number of calls in a given minute is approximately Pois(4). The probability of zero calls in a minute is $e^{-4} \approx 0.018$. The probability of more than 8 calls is about 2%. Staff scheduling can be derived from these tails.

4.0
Figure 6. The Poisson mass function. As λ grows, the distribution shifts right and broadens — but always with mean = variance = λ.
Chapter VIII

Time itself.

From counting to processes.

The Poisson distribution counts events in a fixed interval. But events happen in time. We don't just want to know how many calls arrive in an hour — we want to know when they arrive. We want a process, not a snapshot.

The Poisson process is the answer. It is a random function $N(t)$ giving the number of events that have occurred by time $t$. The construction has remarkable properties:

Definition · Poisson Process

The simplest counting process in continuous time

$\{N(t) : t \geq 0\}$ is a Poisson process with rate $\lambda > 0$ if

  1. $N(0) = 0$,
  2. events in disjoint time intervals are independent,
  3. $N(t) \sim \text{Pois}(\lambda t)$ — the count in any interval of length $t$ is Poisson with mean $\lambda t$.

Equivalently: the inter-arrival times are independent Exponential$(\lambda)$ random variables, with mean $1/\lambda$.

The exponential inter-arrival is the continuous-time cousin of the geometric. Both describe waiting until the next event. Both are memoryless. The Poisson process is the natural marriage of the Poisson distribution (counting events in an interval) and the exponential distribution (waiting between them).

Once you accept the Poisson process, an enormous range of phenomena becomes tractable. Web requests arriving at a server. Customers entering a store. Earthquakes above magnitude 5. Photons reaching a telescope. None of them are really Poisson — but the model is often close enough to be useful, and the deviations from Poisson are themselves diagnostic.

Example · The bus stop

Buses arrive according to a Poisson process at rate $\lambda = 1/12$ per minute (one every 12 minutes on average). You arrive at a random moment. How long until the next bus?

By memorylessness, the wait is Exponential$(1/12)$, with mean 12 minutes — even though buses arrive every 12 minutes on average. This is the famous inspection paradox: the interval you happen to land in is, on average, longer than a typical interval, because long intervals are more likely to contain you.

Chapter IX

Memory.

When trials know the previous one.

Every distribution so far has assumed independence. That assumption is a luxury. In reality, trials remember. Today's weather depends on yesterday's. A web user's next click depends on the page they're on. Tomorrow's stock price is anchored to today's.

The Markov chain is the simplest model of dependence. It assumes a system has a finite (or countable) number of states, and at each step it transitions from its current state to a new one according to fixed probabilities. The next state depends only on the current state — not on how the system got there.

This Markov property — the future is independent of the past, given the present — is a vast simplification of full history-dependence, and it is rich enough to model a stunning variety of phenomena.

Definition · Markov Chain

A sequence with one-step memory

A discrete-time Markov chain on states $\{1, 2, \dots, n\}$ is specified by an $n \times n$ transition matrix $P$, where $P_{ij}$ is the probability of moving from state $i$ to state $j$ in one step. Each row of $P$ sums to 1.

$$P(X_{t+1} = j \mid X_t = i, X_{t-1}, \dots, X_0) = P(X_{t+1} = j \mid X_t = i) = P_{ij}.$$

If $\pi_t$ is the row-vector of state probabilities at time $t$, then $\pi_{t+1} = \pi_t P$.

Starting from any initial distribution, the chain evolves by repeated matrix multiplication: $\pi_t = \pi_0 P^t$. For most chains of interest, this converges to a unique stationary distribution $\pi$ satisfying $\pi P = \pi$. The stationary distribution is the long-run fraction of time the chain spends in each state — independent of where it started.

Markov chains drive a remarkable amount of modern computation: Google's PageRank algorithm is the stationary distribution of a Markov chain on web pages; MCMC methods sample from complex posteriors by constructing chains whose stationary distribution is the target; hidden Markov models recognize speech and align gene sequences. Once you can write down a transition matrix, an enormous toolkit opens.

Example · The weather chain

Suppose tomorrow's weather depends only on today's. If today is sunny, tomorrow is sunny with probability 0.8 and rainy with 0.2. If today is rainy, tomorrow is rainy with probability 0.6 and sunny with 0.4. Then

P = [[0.8, 0.2], [0.4, 0.6]]

Solving $\pi P = \pi$ gives the stationary distribution $\pi = (2/3, 1/3)$. In the long run, two-thirds of days are sunny — regardless of today's weather.

Chapter X

The real world.

Compounding, mixing, and where it all goes.

Now we put it all together. Real-world uncertainty is rarely captured by a single named distribution. It is built — compounded, mixed, conditioned — from the atoms we have collected.

Compound distributions

Consider an insurance company. The number of claims it receives in a year is approximately Poisson, say $N \sim \text{Pois}(\lambda)$. But each claim has a random monetary size $Y_i$, drawn from some claim-size distribution. The total annual payout is

$$S = \sum_{i=1}^{N} Y_i.$$

This is a compound Poisson random variable — a random sum, where the number of terms is itself random. By careful conditioning on $N$,

$$\mathbb{E}[S] = \mathbb{E}[N]\,\mathbb{E}[Y], \qquad \text{Var}(S) = \mathbb{E}[N]\,\mathbb{E}[Y^2].$$

This single object is the foundation of the actuarial science behind every insurance premium you have ever paid.

Overdispersion and mixtures

Real count data is often overdispersed — its variance exceeds its mean, violating the Poisson signature. The fix: let the rate $\lambda$ itself be random. If $\lambda$ is drawn from a Gamma distribution and $X \mid \lambda \sim \text{Pois}(\lambda)$, then unconditionally $X$ follows a Negative Binomial distribution. So the negative binomial we met in Chapter IV is also the distribution of counts when rates are heterogeneous. Two stories, one law.

Bayesian updating

So far we've treated parameters as fixed. But often we don't know $p$ or $\lambda$ — we want to learn them from data. Bayes's rule gives us the procedure: combine a prior belief over the parameter with the likelihood of the observed data to obtain a posterior. For Bernoulli/binomial data with a Beta prior on $p$, the posterior is again Beta — a clean self-replicating update. This conjugacy is why the Beta-Binomial pair appears in every A/B testing platform.

Where to go next

Three doors lead out of this lecture. The first leads to continuous distributions — the normal, the exponential, the gamma — which describe magnitudes rather than counts. The second leads to statistical inference, the project of inverting probability: starting from data, estimating the parameters and quantifying uncertainty. The third leads to stochastic processes, the study of random functions evolving in time — Brownian motion, queues, branching processes, all the elaborate descendants of the Poisson process.

All three doors open from the same room. The room you are now standing in.

Chapter XI

The loom.

Monte Carlo — when the math runs out, weave answers from random thread.

Every distribution we have built so far comes with a closed-form PMF, a clean expectation, a tractable variance. This was the gift of the family tree: each operation preserves enough structure to keep the algebra honest. But step into a real-world question — Will my retirement portfolio survive a 30-year drawdown? What is the probability that two competing software releases finish within a week of each other, given that each depends on a chain of stochastic subtasks? — and the closed forms vanish. The integrals refuse to factor. The conditioning piles up.

What remains is a procedure so simple it looks like cheating. Just do it. Generate ten thousand fake worlds — each one a complete random instance of the system — and count what fraction satisfies the condition you care about. The answer converges to the true probability. This is Monte Carlo, named for the casino in Monaco where Stanisław Ulam's uncle gambled his money away. Ulam, recovering from illness in 1946 and idly playing solitaire, asked himself what fraction of randomly dealt hands could be played to completion. He realized the question was easier to simulate than to compute. The atomic-bomb project was using the answer within a year.

§ 1 · The engine — the Law of Large Numbers

Why does this work? The justification is a single theorem we have been quietly relying on all along. If $X_1, X_2, \dots$ are iid copies of a random variable $X$ with $\mathbb{E}[X] = \mu$, then the sample mean

$$\hat\mu_N = \frac{1}{N}\sum_{i=1}^N X_i \;\longrightarrow\; \mu \quad\text{as}\quad N \to \infty.$$

This is the Law of Large Numbers, and it is the hinge on which all of Monte Carlo turns. To estimate any expectation, find a way to draw samples whose mean is the quantity you want. To estimate a probability $\Pr(A)$, draw samples and average the indicator $\mathbf{1}_A$ — its expectation is $\Pr(A)$ by definition. The recipe never changes.

The Monte Carlo recipe

Three lines, infinitely many problems

1.  Define a simulator — a function that draws one random instance of the system.
2.  Run it $N$ times, recording the quantity of interest each time.
3.  Take the sample mean. Report a confidence interval of width $\sim \sigma / \sqrt{N}$.

The Central Limit Theorem guarantees that $\hat\mu_N$ is approximately Gaussian around $\mu$ with standard deviation $\sigma / \sqrt{N}$. To halve your error, take four times the samples. To cut error tenfold, take a hundred times. The rate is brutal but universal — and it does not depend on the dimension of the problem, which is why Monte Carlo dominates wherever the state space is enormous.

§ 2 · A worked example — the troubled software release

Make the recipe concrete with a problem that does not yield to algebra. A software release ships when three independent workstreams all complete: a backend rewrite, a frontend migration, and a compliance review. Each workstream is itself a chain of subtasks whose durations are random, and any subtask in the chain can fail and require a retry.

Specifically: each workstream consists of a Negative-Binomial number of subtasks (chapter IV — waiting for the $r$-th success, where retries are failures) and each subtask takes a Gamma-distributed number of days. The release ships on the day all three workstreams have finished. What is the probability the release ships within 90 days?

There is no clean formula. The total time is a maximum of three sums of random sums of random durations. But there is a simulator — sketched in nine lines — and on each draw it returns a single number, the day of release. Run it ten thousand times and the empirical fraction below 90 is your answer. Try the slider below; each click of Run reseeds the world and weaves a fresh estimate.

2000
90
Figure 7. Empirical histogram of release-day across $N$ simulated worlds (red bars), the cumulative-fraction estimate (gray curve), and the deadline (vertical rule). The headline number — $\Pr(\text{ship} \leq \text{deadline})$ — appears at top right with its 95% confidence band. Pull $N$ up and watch the band tighten as $\sigma/\sqrt{N}$.
Reading the simulation

At $N = 100$, the headline probability bounces around with each reseed by several percentage points — the band is wide. At $N = 2{,}000$ it has settled to a stable estimate. At $N = 20{,}000$ the band is tight enough to make decisions on. This is the rate you pay. A program manager wanting confidence to 0.5 percentage points needs roughly $N = (1.96 / 0.005)^2 \approx 150{,}000$ — affordable in milliseconds, and the entire content of "rigor" in this kind of forecasting.

§ 3 · Where Monte Carlo earns its keep

The toy example above generalizes, and in five directions the technique becomes indispensable rather than merely convenient.

DomainThe intractable objectWhat MC delivers
Finance path-dependent option price under stochastic vol price & Greeks via $10^6$ price-path simulations
Insurance tail of aggregate annual loss across correlated lines 1-in-200-year capital requirement
Epidemiology outbreak size under intervention X vs. Y policy comparison with full uncertainty bands
Project planning completion time of dependent stochastic tasks schedule risk & critical-path probabilities
Bayesian inference posterior over high-dimensional parameters MCMC samples → any posterior expectation

The last row deserves a sentence on its own. Modern Bayesian statistics — the engine behind everything from drug-trial analysis to large-language-model fine-tuning — is essentially Monte Carlo with a carefully designed sampler. The standard tool is Markov Chain Monte Carlo (MCMC), which constructs a Markov chain (chapter IX) whose stationary distribution is the posterior you want. Run the chain long enough and its empirical distribution converges to the truth. Every $\hat\mu_N$ in your statistical software is, under the hood, an LLN average over a chain.

§ 4 · Variance reduction — getting more from each sample

The $\sigma/\sqrt{N}$ rate is universal but the $\sigma$ in front is yours to shape. Three classical tricks routinely cut $\sigma$ by an order of magnitude or more:

  • Antithetic variates. For each random draw $U$, also use $1-U$. The two paired estimates are negatively correlated, and their average has half (or less) the variance of two independent estimates.
  • Control variates. Subtract a correlated quantity whose mean you already know analytically. The remaining residual has smaller variance — you are doing Monte Carlo only on the part you couldn't compute by hand.
  • Importance sampling. If the rare event in the tail is the entire question (a 1-in-1000-year loss; a defect in a billion parts), do not waste 999 of every 1000 simulations on the irrelevant bulk. Sample preferentially from where the action is, then re-weight.

Each of these is a way of reducing the constant $\sigma$ rather than fighting against the immutable $\sqrt{N}$. The most expensive sin in applied Monte Carlo is to spend compute on $N$ before spending thought on $\sigma$.

§ 5 · The honest convergence diagnostic

One closing warning. The Law of Large Numbers guarantees convergence as $N \to \infty$, but says nothing about how far you are at any finite $N$. The visible $\sigma / \sqrt{N}$ confidence band assumes your simulator is correct, your samples are independent, and the variance $\sigma^2$ is finite. All three can fail silently — a heavy-tailed loss distribution can have undefined variance; a buggy simulator can return plausible-looking numbers around the wrong mean; and an MCMC chain can appear to converge while still trapped in one mode of a bimodal posterior.

The discipline of Monte Carlo, then, has two halves. The first is the recipe — three lines, applicable everywhere. The second is the diagnostic — running multiple seeds, comparing against analytical limit cases, watching trace plots, computing effective sample sizes. The first half is what makes Monte Carlo democratic. The second half is what separates a forecast from a fairy tale.

And so the bestiary returns to where it began. The Bernoulli atom is the seed. The named distributions are its named offspring. And Monte Carlo is the technique by which we model anything else — anything at all — by simulating Bernoulli atoms in such elaborate combinations that no closed form survives the journey, but the Law of Large Numbers gets us there anyway.

The loom takes random thread and weaves any pattern you ask for. You only have to know how to describe what you want.

Epilogue

The family tree.

Eleven chapters on a single page.

Bernoulli(p) one trial · two outcomes Binomial(n,p) count in n trials Geometric(p) trials until 1st success Multinomial(n,pᵢ) k-way generalization sum of n wait for 1st k outcomes Poisson-Binomial different pᵢ · indep. Beta-Binomial same p · correlated vary pᵢ correlate Hypergeometric without replacement NegBinomial(r,p) trials until r-th success Poisson(λ) rare-event limit drop replacement sum of r geometrics n→∞, p→0, np=λ Markov Chain memory in sequence Poisson Process events over time Compound Poisson random sum of claims add memory add time sum amounts all real-world models start here queueing · insurance · epidemics · finance · ML

Each arrow is a single operation. Sum. Wait. Take a limit. Drop replacement. Add time. Add memory. The bestiary is generated.

This is the secret of the discrete universe: a small handful of moves applied to a single atom produce every named distribution in the textbook — and most of the unnamed ones besides. When you encounter a new probability problem, the question to ask yourself is no longer which distribution applies. It is: starting from the Bernoulli atom, what sequence of operations gets me there?

That is probability theory. The rest is calculation.

Probability is common sense reduced to calculation. — Pierre-Simon Laplace, 1814