4.9.8 · D2Probability Theory & Statistics

Visual walkthrough — Common continuous distributions — Uniform, Normal, Exponential, Gamma, Beta

2,207 words10 min readBack to topic

We build every symbol before we use it. If you have never seen , an integral, or the letter , start at line one and do not skip.


Step 1 — The picture of "random events in time"

WHAT. Draw a horizontal time-line starting at . Sprinkle dots on it — each dot is one event (a bus arriving, an atom decaying, a customer entering). The dots land at random, but at a steady long-run pace.

WHY. Every distribution on this page is secretly a question about these dots. "How long until the first dot?" → Exponential. "How long until the third dot?" → Gamma. Before we can answer, we must pin down what "steady pace" means numerically.

PICTURE. Look at the figure. The dots are scattered along the line; the little brace marks the wait from the start until the first dot.

Figure — Common continuous distributions — Uniform, Normal, Exponential, Gamma, Beta

The one rule we assume about the dots (this is the Poisson Process): the number of dots in a stretch of length has a Poisson distribution with mean , and separate stretches don't influence each other. From Discrete Distributions, a Poisson count with mean satisfies

  • is the expected count in the stretch of length .
  • is (the number ) raised to the power ; it is a positive number less than that shrinks toward as grows.
  • means , the count of orderings of things.

We only need one value of this: .


Step 2 — From "no event yet" to the survival curve

WHAT. Ask: what is the probability that in the first units of time, zero dots appear?

WHY. "The first event hasn't happened by time " is exactly the same sentence as "the wait is longer than ". So computing hands us for free — no new machinery.

PICTURE. The figure shows the empty stretch (no dots) and the curve sliding from down toward as we widen the window.

Figure — Common continuous distributions — Uniform, Normal, Exponential, Gamma, Beta

Set and in the Poisson formula. Because and :

Read the two edges of the curve (these are the degenerate checks):

  • At : . You cannot have already waited a negative time, so of course you are still waiting.
  • As : . Wait long enough and the event is essentially certain to have happened.
  • If is huge: the curve plunges immediately — dense dots, short waits. If : the curve flattens near — you may wait forever. Both match intuition.

Step 3 — Turn survival into a density (the Exponential is born)

WHAT. Convert the survival curve into the probability density of the wait .

WHY. A density tells you how concentrated the wait is — where the outcomes bunch up. We need one tool to get there: the derivative, which measures how fast a curve is changing.

WHY the derivative and not something else? Because "how much probability lands in a tiny window near " is precisely "the rate of change of accumulated probability" — and rate-of-change is what a derivative computes. No other tool answers that question.

PICTURE. Top panel: climbing from to . Bottom panel: its slope, the decaying density . The steepest part of the climb sits above the tallest part of the density.

Figure — Common continuous distributions — Uniform, Normal, Exponential, Gamma, Beta

Compute the slope. The derivative of with respect to is (the chain rule: bring down the inner slope ). So


Step 4 — The mean wait, seen as an area

WHAT. Find the average wait .

WHY. The single number people actually want ("how long, typically?"). We compute it with the expectation integral — the continuous version of a weighted average.

PICTURE. The shaded region is ; its balance point sits at , marked with a triangle fulcrum.

Figure — Common continuous distributions — Uniform, Normal, Exponential, Gamma, Beta

Rather than integrate by parts, we borrow the Gamma Function — the tool built exactly for integrals of the shape :

Substitute (so , ) into the mean:

= \frac{1}{\lambda}\underbrace{\int_0^\infty u\,e^{-u}\,du}_{=\,\Gamma(2)\,=\,1!\,=\,1} = \frac{1}{\lambda}.$$ > [!formula] Mean and variance of $\text{Exp}(\lambda)$ > $$\mu = \frac{1}{\lambda}, \qquad \operatorname{Var}(T) = \frac{1}{\lambda^2}.$$ > **The rate–mean flip:** rate $\lambda = 0.5$/min ⇒ mean wait $1/0.5 = 2$ min. Fast rate, short wait. > [!mistake] "$\lambda$ is the mean." > It *feels* right because $\lambda$ is the only knob. But $\lambda$ is a pace; the mean is its **reciprocal** $1/\lambda$. Look at the fulcrum in the figure — it sits at $1/\lambda$, not at $\lambda$. --- ## Step 5 — Stack the waits: the Gamma is a sum of Exponentials **WHAT.** Instead of the first dot, ask for the wait $Y$ until the **$\alpha$-th** dot (take $\alpha$ a whole number for now, say $\alpha = 3$). **WHY.** By memorylessness (parent §3), after each dot the clock resets: the process forgets. So the wait to the $3$rd dot is just **three independent Exponential waits laid end to end**. **PICTURE.** Three coloured bars — three Exp$(\lambda)$ waits — placed head-to-tail; their total length is $Y$. ![[deepdives/dd-maths-4.9.08-d2-s05.png]] $$Y \;=\; \underbrace{T_1}_{\text{Exp}(\lambda)} + \underbrace{T_2}_{\text{Exp}(\lambda)} + \underbrace{T_3}_{\text{Exp}(\lambda)}.$$ Means and variances of independent parts **add**: $$\mathbb{E}[Y] = 3\cdot\frac1\lambda = \frac{3}{\lambda}, \qquad \operatorname{Var}(Y) = 3\cdot\frac1{\lambda^2} = \frac{3}{\lambda^2}.$$ Replacing $3$ by a general $\alpha$: $\ \mathbb{E}[Y]=\alpha/\lambda,\ \operatorname{Var}(Y)=\alpha/\lambda^2$. This *is* the Gamma mean the parent quoted — now you see **why** it is $\alpha$ copies of the exponential answer. --- ## Step 6 — The shape of the Gamma density (and why the constant is what it is) **WHAT.** Write down the density of $Y \sim \text{Gamma}(\alpha,\lambda)$ and understand every piece. **WHY.** Summing $\alpha$ exponentials no longer peaks at $0$ — you must first *collect* several events, so tiny totals become unlikely and a **hump** grows. We need the exact curve. **PICTURE.** Densities for $\alpha = 1, 2, 3, 5$ at fixed $\lambda$. As $\alpha$ climbs, the peak lifts off zero and the bump drifts right and widens. ![[deepdives/dd-maths-4.9.08-d2-s06.png]] > [!formula] The Gamma density, term by term > $$f(y) \;=\; \underbrace{\frac{\lambda^{\alpha}}{\Gamma(\alpha)}}_{\substack{\text{normalizer:}\\ \text{makes area}=1}}\;\underbrace{y^{\alpha-1}}_{\substack{\text{rising}\\ \text{start}}}\;\underbrace{e^{-\lambda y}}_{\substack{\text{falling}\\ \text{tail}}}, \qquad y > 0.$$ > - $y^{\alpha-1}$ pulls the density **up** from $0$ near the origin (for $\alpha>1$ it starts at height $0$ — you can't finish $3$ events in no time). > - $e^{-\lambda y}$ eventually wins and drags it back down. > - Their product is the hump you see in the figure. **Why the constant $\lambda^\alpha/\Gamma(\alpha)$?** It is forced. Demand $\int_0^\infty f = 1$; the leftover integral is exactly a [[Gamma Function]] once you substitute $u=\lambda y$: $$\int_0^\infty y^{\alpha-1}e^{-\lambda y}\,dy \;=\; \frac{1}{\lambda^{\alpha}}\underbrace{\int_0^\infty u^{\alpha-1}e^{-u}\,du}_{=\;\Gamma(\alpha)} \;=\; \frac{\Gamma(\alpha)}{\lambda^{\alpha}},$$ so the normalizer must be its reciprocal, $\lambda^{\alpha}/\Gamma(\alpha)$. **Check the edge:** at $\alpha = 1$, $\Gamma(1)=1$ and $y^{0}=1$, giving $f(y)=\lambda e^{-\lambda y}$ — the Exponential from Step 3. The family closes on itself. ✓ --- ## Step 7 — Where the other three distributions attach **WHAT.** Place Uniform, Normal and Beta on the same tree so nothing feels orphaned. **WHY.** The parent presented five stories; here is how they connect through the machinery we just built. **PICTURE.** A small tree: the Poisson dots feed Exponential → Gamma; a "flat ignorance" branch gives Uniform; a "sum of many effects" branch gives Normal via the CLT; and Gamma pieces recombine into Beta. ![[deepdives/dd-maths-4.9.08-d2-s07.png]] - **Uniform** — set the rate story aside: assume *total ignorance* inside $[a,b]$, forcing a flat $f = 1/(b-a)$. Its variance $(b-a)^2/12$ is pure algebra, no dots needed. - **Normal** — add up *many* independent waits (or any small effects) and the [[Central Limit Theorem]] bends the total toward the bell $N(\mu,\sigma^2)$. Indeed $\text{Gamma}(\alpha,\lambda)$ for large $\alpha$ already looks Normal — watch the $\alpha=5$ curve in Step 6 start to symmetrize. - **Beta** — if $U\sim\text{Gamma}(\alpha,\lambda)$ and $V\sim\text{Gamma}(\beta,\lambda)$ independently, then $U/(U+V)\sim\text{Beta}(\alpha,\beta)$: a random *proportion* in $[0,1]$, its mean $\alpha/(\alpha+\beta)$ echoing the Gamma means. The [[Beta Function]] $B(\alpha,\beta)=\Gamma(\alpha)\Gamma(\beta)/\Gamma(\alpha+\beta)$ is its normalizer, and it powers [[Conjugate Priors in Bayesian Inference]]. --- ## The one-picture summary One diagram compressing the whole walk: dots → survival $e^{-\lambda t}$ → its slope is the Exponential density → stack $\alpha$ of them → the Gamma hump, with the means $1/\lambda$ and $\alpha/\lambda$ marked. ![[deepdives/dd-maths-4.9.08-d2-s08.png]] > [!recall]- Feynman retelling (plain words) > Picture beads landing on a string at a steady average pace $\lambda$. The chance the string is *bead-free* up to length $t$ is $e^{-\lambda t}$ — start at $1$ (no waiting done yet), melt toward $0$ (wait long enough and a bead surely lands). How fast that melts, instant by instant, is the *density* of the first-bead wait: $\lambda e^{-\lambda t}$, tallest right at the start. Its balance point sits at $1/\lambda$ — the typical wait is the *flip* of the rate, fast pace = short wait. Want the third bead instead? Lay three of these waits nose-to-tail; the total can't be tiny (you need three beads first), so its density is a hump: that's Gamma, with mean $3/\lambda$. Bolt on "flatten it" and you get Uniform; "add up hordes of little effects" and the bell (Normal) appears; "compare two Gamma piles as a fraction" and you get a random probability between 0 and 1, the Beta. One string of beads, five distributions. > [!recall]- Quick self-test > Survival of the wait to the first Poisson event ::: $S(t)=e^{-\lambda t}$ > Why is the Exponential density $\lambda e^{-\lambda t}$ ::: it is the derivative (slope) of the CDF $F(t)=1-e^{-\lambda t}$ > Mean of $\text{Exp}(\lambda)$ and why the flip ::: $1/\lambda$; $\lambda$ is a rate (pace), the mean is its reciprocal > Mean of $\text{Gamma}(\alpha,\lambda)$ and its picture ::: $\alpha/\lambda$; it is $\alpha$ exponential waits stacked end to end, means add > What $\Gamma(\alpha)$ does in the density ::: it normalizes the area to 1 via $\int_0^\infty y^{\alpha-1}e^{-\lambda y}dy=\Gamma(\alpha)/\lambda^\alpha$