Foundations to Frontier
Tests
A. Mathematical Foundations › A4 Probability Theory › Distributions

Discrete Distributions: Bernoulli, Binomial, Geometric, Poisson, Categorical, Multinomial

Six families cover most discrete modelling. A Bernoulli is one yes/no trial, a binomial counts successes, a geometric counts the wait for the first success, and a Poisson counts rare events. A categorical is one draw among K labels, and a multinomial counts each label over many draws. Each comes with a story, a mean and a variance. This page covers how they connect (Poisson as the law of rare events, superposition and thinning) and how they size radiation-hardened memory, reliability and classification.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Six stories about counting

Many random things are counts, and a few standard stories cover most of them:

  • one yes/no try (does this part pass inspection?);
  • how many successes in a fixed number of tries (how many of 10 free throws go in?);
  • how long until the first success (how many attempts until a connection works?);
  • how many rare events happen in a stretch of time (how many cosmic-ray hits on a chip today?);
  • which of several categories one item falls in, or how many of each among many items.

Each story has a named distribution family, with a formula and known averages, so you don’t have to re-derive them every time.

The discrete families
01234567891011121314151617181920
P(k) = C(n,k) pᵏ (1−p)ⁿ⁻ᵏ · mean = 6.000 · variance = 4.200 · sum of shown bars = 1.0000
Story: successes in n independent trials: engines working, packets delivered. Dashed line: the mean; shaded band: ± one standard deviation.
Why engineers care

Spacecraft memory gets hit by radiation. How often do two hits land in the same memory word before the error-correcting code can clean up? That’s a Poisson calculation, and it decides how often the computer must “scrub” its memory.

📝 Quick check (Level 0)
0/3 answered
  1. 1. 'How many of 10 tries succeed?' is modelled by the…
  2. 2. 'How many tries until the first success?' is modelled by the…
  3. 3. Rare events per hour are modelled by the…

Level 1: Beginner

★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.

The families

Family Story PMF Mean Variance
Bernoulli(pp) one trial pk(1−p)1−kp^k(1-p)^{1-k} pp p(1−p)p(1-p)
Binomial(n,pn,p) successes in nn trials (nk)pk(1−p)n−k\binom nkp^k(1-p)^{n-k} npnp np(1−p)np(1-p)
Geometric(pp) trials until the first success (1−p)k−1p(1-p)^{k-1}p 1/p1/p (1−p)/p2(1-p)/p^2
Poisson(λ\lambda) rare events in a window e−λλk/k!e^{-\lambda}\lambda^k/k! λ\lambda λ\lambda
Categorical(p\mathbf p) one draw among KK pip_i n/a n/a
Multinomial(n,pn,\mathbf p) counts of each class in nn draws n!∏ni!∏pini\frac{n!}{\prod n_i!}\prod p_i^{n_i} npinp_i npi(1−pi)np_i(1-p_i)

Examples:

  • 10 free throws at 70%: P(≥8)=∑k=810(10k)0.7k0.310−k≈0.383P(\ge8) = \sum_{k=8}^{10}\binom{10}k0.7^k0.3^{10-k}\approx0.383.
  • A chip with 2 upsets per day on average: P(none today)=e−2≈0.135P(\text{none today}) = e^{-2}\approx0.135.
📝 Quick check (Level 1)
0/3 answered
  1. 1. Binomial(10, 0.3) mean?
  2. 2. Geometric(0.2) mean (trials until success)?
  3. 3. For Poisson(λ), mean vs variance?

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.

How the families connect

  • Binomial = a sum of Bernoullis. X=∑i=1n1iX = \sum_{i=1}^n\mathbf 1_i, so EX=np\mathbb E X = np and Var⁡X=np(1−p)\operatorname{Var}X = np(1-p) by linearity and independence (A4.1-7).
  • Poisson = the law of rare events. As n→∞n\to\infty with np=λnp = \lambda fixed, Binomial(n,λ/nn, \lambda/n) → Poisson(λ\lambda). Le Cam’s bound gives total-variation error ≤np2\le np^2.
  • Superposition: independent Poisson(λ1\lambda_1) + Poisson(λ2\lambda_2) = Poisson(λ1+λ2\lambda_1 + \lambda_2).
  • Thinning: keep each Poisson event independently with probability qq and you get Poisson(qλq\lambda). Kept and dropped counts are independent.
  • Geometric is memoryless: P(X>s+t∣X>s)=P(X>t)P(X > s + t\mid X > s) = P(X > t). It’s the only discrete distribution with this property.
  • Multinomial generalizes binomial. Each count is Binomial(n,pin, p_i), and counts are negatively correlated: Cov⁡(Ni,Nj)=−npipj\operatorname{Cov}(N_i,N_j) = -np_ip_j.

Overdispersion

Real counts often have variance > mean, for example failures that cluster in bad batches. The Poisson model then underestimates the tails. A negative binomial (a Poisson with a gamma-distributed rate) is the standard fix (A4.2-5).

🐍 Exercise 1: the families, their moments, and the Poisson limit
Implement Bernoulli, binomial, geometric and Poisson PMFs (Poisson iteratively, to avoid huge factorials). Verify their means and variances, and measure the total-variation distance from Binomial(n, λ/n) to Poisson(λ) against Le Cam's bound λ²/n.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Poisson(2) + Poisson(3), independent, is…
  2. 2. Thinning Poisson(8) with q = 0.3 gives…
  3. 3. Multinomial counts Nᵢ, Nⱼ are…

Level 3: Advanced

★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.

Derivations

  • Binomial PMF. Any specific sequence with kk successes has probability pk(1−p)n−kp^k(1-p)^{n-k}, and there are (nk)\binom nk such sequences (A4.1-4). ∎
  • Geometric memorylessness. P(X>m)=(1−p)mP(X > m) = (1-p)^m, so P(X>s+t)P(X>s)=(1−p)t\frac{P(X > s+t)}{P(X > s)} = (1-p)^t. ∎
  • Poisson limit. With p=λ/np = \lambda/n:
(nk)(λn)k(1−λn)n−k=λkk!⋅n(n−1)⋯(n−k+1)nk⏟→1⋅(1−λn)n⏟→e−λ⋅(1−λn)−k⏟→1\binom nk\Big(\frac\lambda n\Big)^k\Big(1 - \frac\lambda n\Big)^{n-k} = \frac{\lambda^k}{k!}\cdot\underbrace{\frac{n(n-1)\cdots(n-k+1)}{n^k}}_{\to1}\cdot\underbrace{\Big(1 - \frac\lambda n\Big)^n}_{\to e^{-\lambda}}\cdot\underbrace{\Big(1 - \frac\lambda n\Big)^{-k}}_{\to1}

∎

  • Superposition. By convolution, ∑je−λ1λ1jj!e−λ2λ2k−j(k−j)!=e−(λ1+λ2)k!(λ1+λ2)k\sum_j\frac{e^{-\lambda_1}\lambda_1^j}{j!}\frac{e^{-\lambda_2}\lambda_2^{k-j}}{(k-j)!} = \frac{e^{-(\lambda_1+\lambda_2)}}{k!}(\lambda_1 + \lambda_2)^k, using the binomial theorem. ∎

Where the Poisson comes from physically

Events that occur independently, one at a time, at a constant average rate form a Poisson process. The counts in any window of length tt are Poisson(λt\lambda t), and the gaps between events are exponential (A4.2-2). Examples:

  • radioactive decays;
  • photon arrivals at a star tracker’s detector, which is photon “shot noise”, with variance = mean;
  • micrometeoroid impacts;
  • network packets, at moderate load.
Exercise 3.1: Use indicators to derive Var(Binomial(n, p))

X=∑1iX = \sum\mathbf 1_i with independent indicators, so Var⁡X=∑Var⁡1i=np(1−p)\operatorname{Var}X = \sum\operatorname{Var}\mathbf 1_i = np(1-p).

📝 Quick check (Level 3)
0/3 answered
  1. 1. (1 − λ/n)ⁿ → ?
  2. 2. The only memoryless discrete distribution is the…
  3. 3. Photon shot noise has variance equal to…

Level 4: Expert

★★★★★ Expert⏱ 45 minResearchers: original papers and open problems.

Radiation upsets and memory scrubbing

In orbit, energetic particles flip memory bits (single-event upsets) at roughly 10−710^{-7} to 10−1010^{-10} upsets per bit per day, depending on the device, orbit and shielding. Error-correcting codes such as SECDED (single-error correct, double-error detect; Hamming, 1950) fix one flipped bit per word but fail if two accumulate before the word is rewritten. Scrubbing periodically reads and corrects all memory. With λ=rate×bits×h\lambda = \text{rate}\times\text{bits}\times h per word per scrub interval hh, a double error has probability P(N≥2)≈λ2/2P(N\ge2)\approx\lambda^2/2. Summed over the mission, the risk is roughly proportional to hh, which sets the scrub rate. This analysis is standard for spacecraft computers (Saleh, Serrano and Patel, 1990).

🐍 Exercise 2 (research): sizing memory scrubbing against radiation
Compute the probability of an uncorrectable double upset per word between scrubs, summing the Poisson tail directly to avoid cancellation. Find the longest scrub interval meeting a mission-level risk target for 128 MiB over 5 years, and check the rare-event formula by simulation at an exaggerated rate.

The families in AI and robotics

  • Classification. A softmax output is a categorical distribution, and cross-entropy is its negative log-likelihood (A3.3-4). Counts of labels across a dataset are multinomial, and their Dirichlet prior comes next (A4.2-3).
  • Language and token models sample from categoricals at every step. Temperature reshapes the categorical’s probabilities.
  • Event cameras and photon counting produce Poisson-like event streams. Denoising and reconstruction use Poisson likelihoods (Gallego et al., 2022).
  • Reliability. k-out-of-n systems and fleet failure counts are binomial. Rare failures are Poisson, and overdispersed ones are negative binomial (Rausand and Høyland, 2004).
  • Exploration in RL. ε-greedy exploration makes the number of steps until a random action geometric.

References

  1. D. Bertsekas, J. Tsitsiklis (2008). Introduction to Probability, 2nd ed., Ch. 2, 6. Athena Scientific.
  2. L. Le Cam (1960). “An approximation theorem for the Poisson binomial distribution.” Pacific Journal of Mathematics, 10(4).
  3. R. Hamming (1950). “Error detecting and error correcting codes.” Bell System Technical Journal, 29(2).
  4. A. Saleh, J. Serrano, J. Patel (1990). “Reliability of scrubbing recovery-techniques for memory systems.” IEEE Transactions on Reliability, 39(1).
  5. G. Gallego et al. (2022). “Event-based vision: a survey.” IEEE TPAMI, 44(1).
  6. M. Rausand, A. Høyland (2004). System Reliability Theory, 2nd ed. Wiley.
  7. J. Kingman (1993). Poisson Processes. Oxford.