Probability Theory and Statistics — lecture notes
Summary #
Quick-reference map of probability spaces, named laws, asymptotics, and statistics in these notes. Full derivations and worked examples stay in the linked chapters below.
Part I: Foundations #
I.0 Skill map #
| Topic | One-liner | Detail |
|---|---|---|
| Probability space | Triplet $(\Omega,\mathcal{F},\mathbb{P})$ | Ch 1 |
| Calculus of $\mathbb{P}$ | Complement, inclusion–exclusion, union bound, continuity | §1.4–§1.5 |
| Laplace | Fair finite $\Omega$: $\mathbb{P}[A]=\lvert A\rvert/\lvert\Omega\rvert$ | Ch 2 |
| Counting | $n!$, $P(n,k)$, $\binom{n}{k}$; ordered vs unordered | §2.2 |
| Conditioning | Restrict to $B$ and renormalize | Ch 3 |
| Total probability / Bayes | Partition then flip cause/effect | §3.2–§3.3 |
| Independence | Product rule; check all subcollections | Ch 4 |
I.1 Probability space #
When: modeling any random experiment.
Recipe
- Choose outcomes $\Omega$.
- Choose events $\mathcal{F}$ (usually $\mathcal{P}(\Omega)$ if finite/countable).
- Assign $\mathbb{P}$ via axioms (or via masses $p_\omega$, or Laplace).
Key formula: $\boxed{\mathbb{P}[\Omega]=1,\quad \mathbb{P}\ge 0,\quad \text{countable additivity on disjoint unions}}$ → §1.3
I.2 Laplace and counting #
When: finite $\Omega$ with equal outcomes.
Recipe
- Fix what an outcome is (ordered vs unordered).
- Count $|\Omega|$ and $|A|$.
- $\mathbb{P}[A]=|A|/|\Omega|$. Prefer complements for “at least one…”.
Key formula: $\boxed{\mathbb{P}[A]=\frac{|A|}{|\Omega|}}$ → §2.1
I.3 Conditional probability and Bayes #
When: information “given $B$”, medical tests, partitions.
Recipe
- $\mathbb{P}[A\mid B]=\mathbb{P}[A\cap B]/\mathbb{P}[B]$ ($\mathbb{P}[B]>0$).
- Total probability: $\mathbb{P}[A]=\sum_i\mathbb{P}[A\mid B_i]\mathbb{P}[B_i]$ for a partition $(B_i)$.
- Bayes: flip to $\mathbb{P}[B_j\mid A]$.
Key formula: $\boxed{\mathbb{P}[B_j\mid A]=\frac{\mathbb{P}[A\mid B_j]\mathbb{P}[B_j]}{\sum_i\mathbb{P}[A\mid B_i]\mathbb{P}[B_i]}}$ → §3.3
I.4 Independence #
When: “no influence” between events or experiments.
Recipe
- Events: $\mathbb{P}[A\cap B]=\mathbb{P}[A]\mathbb{P}[B]$ (pairwise is not enough for $n\ge 3$).
- Equivalent: $\mathbb{P}[A\mid B]=\mathbb{P}[A]$ when $\mathbb{P}[B]>0$.
- Construct via product experiments (independent coordinates / dice).
Key formula: $\boxed{\mathbb{P}[A\cap B]=\mathbb{P}[A]\,\mathbb{P}[B]}$ → §4.1
Part II: Discrete random variables #
II.0 Skill map #
| Topic | One-liner | Detail |
|---|---|---|
| Random variable | $X:\Omega\to\mathbb{R}$; law via CDF $F_X$ | Ch 5 |
| Discrete law | pmf $p_X(x)=\mathbb{P}[X=x]$ | §6.1 |
| Bernoulli / Binomial | one trial / $n$ i.i.d. successes | §6.2 |
| Geometric | waiting time for first success; memoryless | §6.3 |
| Poisson | rare counts; $\mathrm{Bin}(n,\lambda/n)\to\mathrm{Poisson}(\lambda)$ | §6.4 |
| Expectation | $\mathbb{E}[X]=\sum x\,p_X(x)$; linearity always | Ch 7 |
| Variance | $\mathrm{Var}(X)=\mathbb{E}[X^2]-(\mathbb{E}[X])^2$; add under independence | §7.6 |
II.1 Named discrete laws #
| Law | Support / meaning | Mean | Variance | Detail |
|---|---|---|---|---|
| $\mathrm{Ber}(p)$ | $\{0,1\}$ one trial | $p$ | $p(1-p)$ | §6.2.1 |
| $\mathrm{Bin}(n,p)$ | $\{0,\ldots,n\}$ #successes | $np$ | $np(1-p)$ | §6.2.2 |
| $\mathrm{Geom}(p)$ | $\{1,2,\ldots\}$ first success | $1/p$ | $(1-p)/p^2$ | §6.3 |
| $\mathrm{Poisson}(\lambda)$ | $\{0,1,\ldots\}$ rare count | $\lambda$ | $\lambda$ | §6.4 |
II.2 Expectation and variance recipes #
When: means, spreads, sums of indicators / Bernoullis.
Recipe
- Direct: $\mathbb{E}[X]=\sum_x x\,\mathbb{P}[X=x]$; LOTUS for $g(X)$.
- Nonnegative integer: tail sum $\mathbb{E}[T]=\sum_{n\ge 1}\mathbb{P}[T\ge n]$.
- Linearity: $\mathbb{E}[\sum X_i]=\sum\mathbb{E}[X_i]$ (no independence needed).
- Variance: compute $\mathbb{E}[X^2]$ or use Bernoulli-sum for Binomial.
Key formulas: $\boxed{\mathbb{E}[aX+bY]=a\mathbb{E}[X]+b\mathbb{E}[Y]}$ $\boxed{\mathrm{Var}(S)=np(1-p)\ \text{for }S\sim\mathrm{Bin}(n,p)}$ → §7.3–§7.6
Part III: Continuous laws and asymptotics #
III.0 Skill map #
| Topic | One-liner | Detail |
|---|---|---|
| Density | $\mathbb{P}[X\in A]=\int_A f_X$ | §8.1 |
| Uniform / Exp / Normal | flat / memoryless wait / bell | §8.2–§8.4 |
| Transforms | CDF of $Y=g(X)$, then differentiate | §8.5 |
| Continuous $\mathbb{E}$ | $\int g\,f$; Cauchy may fail | §8.6 |
| Joints | $f_{X,Y}$; marginals by integrating out | §9.1–§9.2 |
| Independence | $f_{X,Y}=f_X f_Y$ | §9.3 |
| LLN (GGZ) | $\bar X_n\to m$ a.s. | §9.4 |
| CLT (ZGWS) | standardized sum $\to\Phi$ | §9.5 |
III.1 Named continuous laws #
| Law | Density cue | Mean | Variance | Detail |
|---|---|---|---|---|
| $\mathcal{U}([a,b])$ | flat $1/(b-a)$ | $(a+b)/2$ | $(b-a)^2/12$ | §8.2 |
| $\mathrm{Exp}(\lambda)$ | $\lambda e^{-\lambda x}$ on $(0,\infty)$ | $1/\lambda$ | $1/\lambda^2$ | §8.3 |
| $\mathcal{N}(m,\sigma^2)$ | bell; standardize $Z=(X-m)/\sigma$ | $m$ | $\sigma^2$ | §8.4 |
III.2 LLN and CLT #
When: long-run averages and Normal approximations for large $n$.
Recipe
- LLN: i.i.d. with finite mean $m$ $\Rightarrow$ $\bar X_n\to m$.
- CLT: also finite variance $\sigma^2$ $\Rightarrow$ $\sqrt{n}\,(\bar X_n-m)/\sigma$ has CDF $\to\Phi$.
- For Binomial / Bernoulli frequencies, standardize with $\sigma=\sqrt{p(1-p)}$.
Key formula: $\boxed{\mathbb{P}\Bigl[\frac{\sqrt{n}\,(\bar X_n-m)}{\sigma}\le a\Bigr]\xrightarrow{n\to\infty}\Phi(a)}$ → §9.5
Part IV: Statistics #
Chapter 10.
IV.0 Skill map #
| Topic | One-liner | Detail |
|---|---|---|
| MLE | Maximize $L_x(\theta)$ or $\log L$ | §10.2–§10.3 |
| Confidence interval | Random interval with coverage $\ge 1-\alpha$ | §10.4 |
| Hypothesis test | $H_0$ vs $H_1$; level $\alpha$, power | §10.5 |
| Likelihood ratio | Reject $H_0$ when $L(\theta_0)/L(\theta_1)$ small | §10.5 |
| One-sided Binomial, large $n$ | Claim in $H_1$; CLT at the $H_0$ boundary; $c=\Phi^{-1}(1-\alpha)$ | §10.5.5 |
IV.1 Which statistical tool? #
| If you see… | Use… | Detail |
|---|---|---|
| “estimate $\theta$”, MLE | Write $L$, maximize $\log L$ | §10.2 |
| Bernoulli / Binomial | $\widehat{p}=\bar x$ | §10.2 |
| Exponential rate | $\widehat{\lambda}=1/\bar x$ | §10.3 |
| Normal mean, $\sigma$ known | $[\bar x\pm c/\sqrt{n}]$, $c=\Phi^{-1}(1-\alpha/2)$ | §10.4 |
| $H_0$ vs $H_1$, Niveau / Macht | Critical region; $\alpha=\mathbb{P}_{H_0}[\text{reject}]$ | §10.5 |
| “statistisch beweisen”, Binomial, ZGWS | Claim in $H_1$; one-sided CLT at the boundary | §10.5.5 |
Pipeline: data $\to$ MLE $\widehat{\theta}$ $\to$ CI for uncertainty $\to$ test to decide $H_0$ vs $H_1$.
Chapter 1 — Probability spaces & events (Wahrscheinlichkeitsräume) #
Build the triplet $(\Omega,\mathcal{F},\mathbb{P})$: sample space, events ($\sigma$-algebra), and a probability measure with its basic calculus.
1.1 Sample spaces #
1.1.1 Overview #
Idea
Probability ignores the physics of a coin toss. It only cares about possible results. That list (or continuum) of results is the sample space $\Omega$.
Definition (sample space / Grundraum) The set $\Omega$ of all possible outcomes of a random experiment is the sample space. An element $\omega\in\Omega$ is an outcome (Elementarereignis).
When to use
- First step of every model: name what an outcome is (a face, a tuple, a point, a sequence).
- Product spaces when several experiments are combined: dice, coins, bits.
Typical mistake
- Writing $\Omega=\{A,B\}$ for events instead of outcomes. Events are subsets of $\Omega$, not elements of $\Omega$ (unless you deliberately identify them).
Example: building $\Omega$
Goal: write $\Omega$ for several standard experiments.
Step 1 (coin): $\Omega=\{\mathrm{H},\mathrm{T}\}$ or $\{0,1\}$.
Step 2 (one die): $\Omega=\{1,2,3,4,5,6\}$.
Step 3 (three dice): $\Omega=\{1,\ldots,6\}^3$, so $\omega=(\omega_1,\omega_2,\omega_3)$.
Step 4 (countably many customers): $\Omega=\mathbb{N}=\{0,1,2,\ldots\}$.
Step 5 (droplet on a square): $\Omega=[0,1]^2$ (uncountable).
Check: each $\omega$ is one complete result of the experiment, not a “property” like “even”.
1.2 Events and $\sigma$-algebras #
1.2.1 Events as subsets #
Idea
An event is a statement about the outcome that is either true or false once $\omega$ is known — mathematically, the set of all $\omega$ for which the statement holds.
Definition (event / Ereignis) An event is a set $A\subset\Omega$. We write $\mathcal{F}$ for the collection of events we allow. The event $A$ occurs for $\omega$ if $\omega\in A$.
| Event | Meaning |
|---|---|
| $\emptyset$ | never occurs |
| $\Omega$ | always occurs |
| $A^c=\Omega\setminus A$ | “not $A$” |
| $A\cap B$ | “$A$ and $B$” |
| $A\cup B$ | “$A$ or $B$” |
| $A\Delta B=(A\setminus B)\cup(B\setminus A)$ | exactly one of $A,B$ |
When to use
- Translate German/English verbal statements into subsets before computing $\mathbb{P}$.
- Use Venn pictures to track overlaps before applying formulas.
Typical mistake
- Confusing “or” (union) with “xor” (symmetric difference). In probability, “or” usually means inclusive union.
Example: die events
Goal: formalize statements for $\Omega=\{1,2,3,4,5,6\}$.
Step 1: “even” $\mapsto A=\{2,4,6\}$.
Step 2: “at most 3” $\mapsto B=\{1,2,3\}$.
Step 3: $A\cap B=\{2\}$, $A\cup B=\{1,2,3,4,6\}$, $A^c=\{1,3,5\}$.
Check: $|A|=3$, and later under Laplace, $\mathbb{P}[A]=1/2$.
1.2.2 $\sigma$-algebras #
Idea
On finite $\Omega$ you can take every subset as an event ($\mathcal{F}=\mathcal{P}(\Omega)$). On uncountable $\Omega$ (e.g. $[0,1]$), some pathological sets are not measurable. A $\sigma$-algebra is the “nice” family closed under the operations you need for probability.
Definition ($\sigma$-algebra / $\sigma$-Algebra) A family $\mathcal{F}\subset\mathcal{P}(\Omega)$ is a $\sigma$-algebra if
- $\Omega\in\mathcal{F}$,
- $A\in\mathcal{F}\Rightarrow A^c\in\mathcal{F}$,
- $A_1,A_2,\ldots\in\mathcal{F}\Rightarrow \bigcup_{i=1}^\infty A_i\in\mathcal{F}$.
Consequences (still in $\mathcal{F}$)
- $\emptyset=\Omega^c\in\mathcal{F}$,
- countable intersections (De Morgan),
- finite unions and intersections.
When to use
- Finite / countable $\Omega$: take $\mathcal{F}=\mathcal{P}(\Omega)$ without hesitation.
- Continuous models (area, length): think “Borel sets” — rectangles, open sets, and countable unions/intersections of those. You rarely construct Borel sets by hand in this course; you use measurable regions (intervals, polygons, discs).
Typical mistake
- Thinking H3 only allows finite unions. The countable union is essential for continuity of $\mathbb{P}$ and for series of events.
Example: droplet on a square
Goal: name an event in $\Omega=[0,1]^2$.
Step 1: “falls in the upper half” $\mapsto A=[0,1]\times[1/2,1]$.
Step 2: $A$ is a Borel rectangle, hence an event.
Check: later $\mathbb{P}[A]=\mathrm{Area}(A)=1/2$.
Brief pointer (indicators). For $A\in\mathcal{F}$, the indicator $1_A:\Omega\to\mathbb{R}$ with $1_A(\omega)=1$ if $\omega\in A$ and $0$ otherwise is a (discrete) random variable (RV). Full RV theory comes later; here, $1_A$ is just a convenient encoding of “did $A$ occur?”.
1.3 Probability measures #
1.3.1 Frequency motivation and axioms #
Idea
Repeat an experiment $n$ times; let $n_A$ be how often $A$ occurs. For large $n$, the relative frequency $n_A/n$ stabilizes. Axioms abstract the properties that such limiting frequencies must obey.
Definition (probability measure / Wahrscheinlichkeitsmaß) A map $\mathbb{P}:\mathcal{F}\to[0,1]$ is a probability measure if
- P1: $\mathbb{P}[\Omega]=1$,
- P2 (countable additivity): if $A_1,A_2,\ldots$ are pairwise disjoint and $A=\bigcup_{i=1}^\infty A_i$, then
Definition (probability space / Wahrscheinlichkeitsraum) The triplet $(\Omega,\mathcal{F},\mathbb{P})$ is a probability space.
When to use
- Building any model: specify $\Omega$, choose $\mathcal{F}$, define $\mathbb{P}$ on events (not only on singletons when $\Omega$ is uncountable).
- Checking a candidate formula is a valid probability (normalize, nonnegativity, additivity).
Typical mistake
- Defining $\mathbb{P}[A]=\sum_{\omega\in A}p_\omega$ on an uncountable $\Omega$ where every singleton has probability $0$ (droplet). That formula works for countable $\Omega$ only.
Example: three fair dice (Laplace preview)
Goal: write the full space.
Step 1: $\Omega=\{1,\ldots,6\}^3$, $\mathcal{F}=\mathcal{P}(\Omega)$.
Step 2: $\mathbb{P}[A]=|A|/|\Omega|=|A|/216$.
Check: $\mathbb{P}[\Omega]=1$; disjoint unions add cardinalities, hence add probabilities.
Example: waiting for first tail
Goal: biased coin, stop at first tail; $\mathbb{P}[\text{stop at }k]=p^{k-1}(1-p)$.
Step 1: $\Omega=\{1,2,3,\ldots\}$, $\mathcal{F}=\mathcal{P}(\Omega)$.
Step 2: for $A\subset\Omega$, set $\mathbb{P}[A]=\sum_{k\in A}p^{k-1}(1-p)$.
Check: $\sum_{k=1}^\infty p^{k-1}(1-p)=1$, so P1 holds.
Example: uniform point in the square
Goal: continuous model where singletons vanish.
Step 1: $\Omega=[0,1]^2$, $\mathcal{F}=$ Borel $\sigma$-algebra.
Step 2: $\mathbb{P}[A]=\mathrm{Area}(A)$.
Check: $\mathbb{P}[\{(x,y)\}]=0$ for every fixed point, but regions with positive area have positive probability.
1.4 Calculus of probability #
1.4.1 Immediate consequences #
Idea
From P1–P2 alone you get the entire “calculator”: empty set, finite additivity, complements, and the two-set union formula.
Proposition (basic calculus) Let $\mathbb{P}$ be a probability measure on $(\Omega,\mathcal{F})$.
- $\mathbb{P}[\emptyset]=0$.
- Finite additivity: for pairwise disjoint $A_1,\ldots,A_k$,
- $\mathbb{P}[A^c]=1-\mathbb{P}[A]$.
- For any events $A,B$,
When to use
- Complement trick when $A^c$ is easier than $A$.
- Inclusion–exclusion for two (or more) overlapping events.
- Split $\Omega$ into disjoint pieces and add.
Typical mistake
- Writing $\mathbb{P}[A\cup B]=\mathbb{P}[A]+\mathbb{P}[B]$ when $A\cap B\neq\emptyset$ (double-counting the intersection).
Example: complement on a die
Goal: $\mathbb{P}[\text{not }6]$ for a fair die.
Step 1: $\mathbb{P}[\{6\}]=1/6$.
Step 2: $\mathbb{P}[\{6\}^c]=1-1/6=5/6$.
Check: five faces, each $1/6$, sum to $5/6$.
Example: two-set union
Goal: fair die; $A=\{2,4,6\}$, $B=\{1,2,3\}$. Find $\mathbb{P}[A\cup B]$.
Step 1: $\mathbb{P}[A]=1/2$, $\mathbb{P}[B]=1/2$, $\mathbb{P}[A\cap B]=\mathbb{P}[\{2\}]=1/6$.
Step 2: $\mathbb{P}[A\cup B]=1/2+1/2-1/6=5/6$.
Check: $A\cup B=\{1,2,3,4,6\}$ has five outcomes.
1.4.2 Monotonicity and the union bound #
Idea
Larger events cannot have smaller probability. Even without disjointness, the probability of a union is at most the sum of the probabilities — a crude but powerful upper bound.
Proposition (monotonicity) If $A\subset B$, then $\mathbb{P}[A]\le\mathbb{P}[B]$.
Proposition (union bound / Boole) For any sequence of events $A_1,A_2,\ldots$,
(The same holds for finite unions.)
When to use
- Monotonicity: sandwich an ugly event between simpler events.
- Union bound: many “bad” events; show the probability that at least one occurs is small.
Typical mistake
- Treating the union bound as equality. Equality needs disjointness (or almost-disjointness).
Example: droplet near the center
Goal: uniform point in $[0,1]^2$; $E_n=$ “distance to $(1/2,1/2)$ is at most $1/n$”. Bound $\mathbb{P}[E_n]$.
Step 1: the disk $E_n$ sits in the square $S_n=[1/2-1/n,1/2+1/n]^2$.
Step 2: $S_n$ has side $2/n$, so area $(2/n)^2=4/n^2$. Thus $\mathbb{P}[E_n]\le\mathbb{P}[S_n]=4/n^2\to 0$.
Check: $0\le\mathbb{P}[E_n]\le 4/n^2\to 0$, so $\mathbb{P}[E_n]\to 0$.
Example: long runs of 1’s (union-bound sketch)
Goal: roll a die $n$ times; show that very long runs of consecutive $1$’s become rare.
Step 1: let $A_k$ be “positions $k+1,\ldots,k+\ell$ are all $1$”, so $\mathbb{P}[A_k]=6^{-\ell}$.
Step 2: $A=\bigcup_{k=0}^{n-\ell}A_k$ is “some run of length $\ell$ exists”.
Step 3: union bound: $\mathbb{P}[A]\le n\cdot 6^{-\ell}$. Choose $\ell\sim(\log_6 n)+\varepsilon\log n$ so the right-hand side $\to 0$.
Check: you did not need exact dependence structure among the $A_k$.
1.5 Continuity of probability #
1.5.1 Increasing and decreasing sequences of events #
Idea
Probability is continuous along nested sequences: if events grow to a limit event, probabilities grow to the limit probability (and likewise for shrinking events).
Proposition (continuity)
- If $A_n\subset A_{n+1}$ for all $n$ (increasing), then
- If $B_n\supset B_{n+1}$ for all $n$ (decreasing), then
When to use
- Passing limits inside $\mathbb{P}$ for nested events.
- Later: proving properties of distribution functions $F_X(a)=\mathbb{P}[X\le a]$ (right-continuity, limits at $\pm\infty$).
Typical mistake
- Applying continuity to a non-monotone sequence without rewriting it as increasing/decreasing pieces.
Example: decreasing balls around a point
Goal: in the unit square with area measure, let $B_n$ be the disc of radius $1/n$ about a fixed interior point (intersected with the square).
Step 1: $B_{n+1}\subset B_n$, and $\bigcap_n B_n$ is empty or a singleton.
Step 2: $\mathbb{P}[B_n]\to 0=\mathbb{P}[\bigcap_n B_n]$.
Check: matches the intuition that a single point has probability $0$.
1.6 Method map (quick reference) #
| Task | Tool |
|---|---|
| Name outcomes | Choose $\Omega$ (§1.1) |
| Translate a verbal claim | Write the subset $A\subset\Omega$ (§1.2) |
| Finite / countable model | $\mathcal{F}=\mathcal{P}(\Omega)$; often define via $p_\omega$ |
| Continuous region model | Area / length on Borel sets |
| $\mathbb{P}[\text{not }A]$ | $1-\mathbb{P}[A]$ |
| Overlapping $A\cup B$ | $\mathbb{P}[A]+\mathbb{P}[B]-\mathbb{P}[A\cap B]$ |
| Upper-bound a messy union | Union bound |
| Nested $A_n\uparrow A$ | Continuity: $\mathbb{P}[A_n]\to\mathbb{P}[A]$ |
| Equal outcomes on finite $\Omega$ | Ch 2 |
1.7 Exercises #
Exercise 1. For a fair die, let $A=\{1,2\}$, $B=\{2,3,4\}$. Compute $\mathbb{P}[A]$, $\mathbb{P}[B]$, $\mathbb{P}[A\cap B]$, $\mathbb{P}[A\cup B]$, $\mathbb{P}[A^c]$.
Solution. Goal: apply Laplace and the basic calculus rules on one die. Step 1: $\Omega=\{1,\ldots,6\}$, $|\Omega|=6$; $\mathbb{P}[A]=2/6=1/3$, $\mathbb{P}[B]=3/6=1/2$. Step 2: $A\cap B=\{2\}$, so $\mathbb{P}[A\cap B]=1/6$; $\mathbb{P}[A\cup B]=\mathbb{P}[A]+\mathbb{P}[B]-\mathbb{P}[A\cap B]=1/3+1/2-1/6=2/3$. Step 3: $\mathbb{P}[A^c]=1-\mathbb{P}[A]=2/3$. Check: $|A\cup B|=|\{1,2,3,4\}|=4$, so $4/6=2/3$.
Exercise 2. Fair die rolled twice (ordered pairs). Let $A=$ “sum is 7”, $B=$ “first die is 1”. Compute $\mathbb{P}[A]$, $\mathbb{P}[B]$, $\mathbb{P}[A\cap B]$, $\mathbb{P}[A\cup B]$.
Solution. Goal: ordered pair of fair dice; events $A=\{\text{sum }=7\}$, $B=\{\text{first }=1\}$. Step 1: Laplace on $\Omega=\{1,\ldots,6\}^2$, $|\Omega|=36$. Step 2: $A=\{(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)\}$, so $|A|=6$, $\mathbb{P}[A]=6/36=1/6$. Step 3: $B=\{1\}\times\{1,\ldots,6\}$, $|B|=6$, $\mathbb{P}[B]=1/6$. Step 4: $A\cap B=\{(1,6)\}$, $\mathbb{P}[A\cap B]=1/36$. Step 5: $\mathbb{P}[A\cup B]=\mathbb{P}[A]+\mathbb{P}[B]-\mathbb{P}[A\cap B]=11/36$. Check: listing $A\cup B$ gives $6+6-1=11$ outcomes.
Chapter 2 — Laplace models & counting (Laplace-Modelle) #
Finite sample spaces where every outcome is equally likely: probability reduces to counting.
2.1 The Laplace model #
2.1.1 Definition #
Idea
Symmetry: if nothing distinguishes outcomes, each singleton gets the same mass $1/|\Omega|$, and an event’s probability is its relative size.
Definition (Laplace model) Let $\Omega$ be finite. The Laplace model is $(\Omega,\mathcal{F},\mathbb{P})$ with $\mathcal{F}=\mathcal{P}(\Omega)$ and
Equivalently, $\mathbb{P}[\{\omega\}]=1/|\Omega|$ for every $\omega$.
When to use
- Fair coins, fair dice, well-shuffled cards, random sample of $k$ distinct items from $n$ when each $k$-subset (or each $k$-tuple) is equally likely.
- Any finite experiment where the problem states “uniformly at random” / “fair” / “zufällig mit gleicher Wahrscheinlichkeit”.
Typical mistake
- Using Laplace when outcomes are not equally likely (biased coin, waiting times with geometric masses).
Example: even face
Goal: fair die; $A=\{2,4,6\}$.
Step 1: $|\Omega|=6$, $|A|=3$.
Step 2: $\mathbb{P}[A]=3/6=1/2$.
Check: matches Acciaio’s motivating equation.
2.2 Counting toolkit #
2.2.1 Product rule, permutations, combinations #
Idea
Counting is layered decisions: if stage $i$ has $n_i$ choices regardless of previous choices, multiply. When order matters you permute; when only the set matters you divide by the internal orders.
Formulas
| Situation | Count |
|---|---|
| Ordered $k$-tuples from $n$ types with replacement | $n^k$ |
| Injections / permutations of $k$ out of $n$ (no replacement, order matters) | $P(n,k)=n!/(n-k)!$ |
| Unordered $k$-subsets of an $n$-set | $\binom{n}{k}=n!/(k!(n-k)!)$ |
| Permutations of $n$ distinct objects | $n!$ |
| Binomial theorem | $(x+y)^n=\sum_{k=0}^n\binom{n}{k}x^ky^{n-k}$ |
Useful identities: $\binom{n}{0}=1$, $\binom{n}{k}=0$ if $k>n$ or $k<0$, and Pascal: $\binom{n}{k}=\binom{n-1}{k-1}+\binom{n-1}{k}$. Convention: $0!=1$.
When to use
- First decide: is an outcome an ordered tuple or an unordered set?
- Stick to one convention for both numerator and denominator.
Typical mistake
- Mixing conventions: counting $|A|$ with combinations but $|\Omega|$ with permutations (or vice versa), which systematically biases the answer.
Example: neighbors on a circle
Goal: $n\ge 3$ labelled points on a circle; pick $2$ uniformly; probability they are neighbors.
Step 1: unordered pairs: $\Omega=\{E\subset\{1,\ldots,n\}:|E|=2\}$, so $|\Omega|=\binom{n}{2}$.
Step 2: neighbor pairs: $A=\{\{1,2\},\{2,3\},\ldots,\{n,1\}\}$, so $|A|=n$.
Step 3:
Check: for $n=6$, $\mathbb{P}=2/5$.
2.3 Worked counting patterns #
2.3.1 Dice and cards #
Idea
Write $\Omega$ explicitly (or describe it so $|\Omega|$ is clear), characterize $A$ by the same type of object, then divide.
Example: two dice show different faces
Goal: two independent fair dice; ordered pairs.
Step 1: $|\Omega|=36$.
Step 2: $|A|=36-6=30$ (subtract doubles), or $6\cdot 5=30$.
Step 3: $\mathbb{P}[A]=30/36=5/6$.
Check: complement “same face” has probability $1/6$.
Example: poker-style hand (5 cards)
Goal: from a $52$-card deck, 5-card hand; probability of exactly $2$ aces (unordered hands).
Step 1: $|\Omega|=\binom{52}{5}$.
Step 2: choose $2$ aces from $4$, and $3$ non-aces from $48$: $|A|=\binom{4}{2}\binom{48}{3}$.
Step 3: $\mathbb{P}[A]=\binom{4}{2}\binom{48}{3}/\binom{52}{5}$.
Check: both numerator and denominator count unordered $5$-sets.
Example: birthday collision (sketch)
Goal: $k$ people, $365$ days, independent uniform birthdays; probability at least two share a birthday.
Step 1: $|\Omega|=365^k$ (ordered $k$-tuples with replacement).
Step 2: complement $A^c=$ all distinct: $|A^c|=P(365,k)$.
Step 3: $\mathbb{P}[A]=1-P(365,k)/365^k$.
Check: for moderate $k$ (around $23$) this is already near $1/2$ — classic counter-intuition, not a calculation error.
2.4 Modelling pitfalls #
2.4.1 Ordered vs unordered, distinguishable vs not #
Idea
Laplace does not care about “physical” labels — it cares whether your description of $\Omega$ makes every atom equally likely. Wrong $\Omega$ $\Rightarrow$ wrong uniform measure.
When to use
- Ask: “If I list two descriptions of the same physical draw, do they appear equally often in my $\Omega$?”
- Prefer ordered tuples with replacement / sequences of dice when independence is clear; use combinations when the experiment literally samples a set.
Typical mistake
- Bertrand-type paradoxes / boy-girl puzzles: ambiguous sample spaces dressed up as Laplace problems.
Example: two children, at least one boy (caution)
Goal: illustrate sensitivity to $\Omega$.
Model A (ordered, fair): $\Omega=\{BB,BG,GB,GG\}$, each $1/4$. Given “at least one boy”, condition on $\{BB,BG,GB\}$, so $\mathbb{P}[\text{two boys}\mid\text{at least one boy}]=1/3$.
Model B (other information): “the older is a boy” conditions on $\{BB,BG\}$, probability $1/2$.
Check: both can be Laplace; the conditioning event changed. See Ch 3.
2.5 Method map (quick reference) #
| Task | Tool |
|---|---|
| Fair finite experiment | $\mathbb{P}[A]=\lvert A\rvert/\lvert\Omega\rvert$ |
| Sequences / dice / bits | Product space, often $n^k$ |
| Hands / committees | Combinations $\binom{n}{k}$ |
| Arrangements | Permutations $n!$, $P(n,k)$ |
| “At least one …” | Complement counting |
| Neighbor / cycle symmetries | Count orbits carefully (fixed labels help) |
2.6 Exercises #
Exercise 1. Fair coin three times (ordered). Probability of exactly two heads.
Solution. Goal: Laplace count on $\{H,T\}^3$. Step 1: $|\Omega|=8$; favorable outcomes $HHT,HTH,THH$, so $|A|=3$. Step 2: $\mathbb{P}[A]=\binom{3}{2}/8=3/8$. Check: binomial $\mathrm{Bin}(3,1/2)$ gives the same mass at $2$.
Exercise 2. From $\{1,\ldots,10\}$, pick a $3$-subset uniformly. Probability it contains $1$.
Solution. Goal: uniform $3$-subset of $\{1,\ldots,10\}$; probability it contains $1$. Step 1: $|\Omega|=\binom{10}{3}$. Step 2: if $1\in A$, choose $2$ more from $\{2,\ldots,10\}$: $|A|=\binom{9}{2}$. Step 3: $\mathbb{P}=\binom{9}{2}/\binom{10}{3}=(36)/(120)=3/10$. Check: alternatively, probability $1$ is among three draws without replacement in unordered sampling equals $3/10$ by symmetry among the ten labels.
Exercise 3. $n$ people seated randomly at a round table (rotations identified). Probability that persons $A$ and $B$ sit next to each other. (Hint: fix $A$’s seat.)
Solution. Goal: circular seating with rotations identified; neighbors of $A$ and $B$. Step 1: fix $A$’s seat (removes rotational symmetry). Step 2: $B$ has $n-1$ equally likely seats; exactly $2$ are adjacent to $A$. Step 3: $\mathbb{P}=2/(n-1)$. Check: for $n=3$, probability $1$; for $n=4$, probability $2/3$.
Chapter 3 — Conditional probability & Bayes (Bedingte Wahrscheinlichkeit) #
Update probabilities after learning that an event $B$ occurred; reverse conditioning with Bayes; split via the law of total probability.
3.1 Conditional probability #
3.1.1 Definition and interpretation #
Idea
Given that $B$ occurred, the only outcomes that still matter lie in $B$. The new probability of $A$ is the fraction of $B$’s mass that also lies in $A$.
Definition (conditional probability / bedingte Wahrscheinlichkeit) If $\mathbb{P}[B]>0$,
Immediate facts
- $\mathbb{P}[B\mid B]=1$.
- $\mathbb{P}[A\cap B]=\mathbb{P}[A\mid B]\,\mathbb{P}[B]$ (multiplication rule), and similarly $\mathbb{P}[A\cap B]=\mathbb{P}[B\mid A]\,\mathbb{P}[A]$ when $\mathbb{P}[A]>0$.
- The map $A\mapsto\mathbb{P}[A\mid B]$ is itself a probability measure on $(\Omega,\mathcal{F})$.
When to use
- The problem gives information (“given even”, “given positive test”, “given first die shows $1$”).
- You need a joint probability and know one conditional factor.
Typical mistake
- Writing $\mathbb{P}[A\mid B]=\mathbb{P}[A]/\mathbb{P}[B]$ (forgetting the intersection).
- Conditioning on a null event ($\mathbb{P}[B]=0$).
Example: die, even information
Goal: fair die; $A=\{1,2,3\}$, $B=\{2,4,6\}$. Find $\mathbb{P}[A\mid B]$.
Step 1: $A\cap B=\{2\}$, so $\mathbb{P}[A\cap B]=1/6$, $\mathbb{P}[B]=1/2$.
Step 2: $\mathbb{P}[A\mid B]=(1/6)/(1/2)=1/3$.
Check: under “even”, the three outcomes $\{2,4,6\}$ are equally likely; only one is $\le 3$.
3.2 Law of total probability #
3.2.1 Partitions #
Idea
Slice $\Omega$ into mutually exclusive, exhaustive scenarios $B_i$. The event $A$ is the disjoint union of the pieces $A\cap B_i$; add those probabilities.
Definition (partition) Events $B_1,\ldots,B_n$ form a partition of $\Omega$ if they are pairwise disjoint and $\bigcup_{i=1}^n B_i=\Omega$.
Proposition (total probability / Satz von der totalen Wahrscheinlichkeit) If $B_1,\ldots,B_n$ partition $\Omega$ with $\mathbb{P}[B_i]>0$, then for every event $A$,
When to use
- Natural cases: disease / healthy; bit sent $0$ / $1$; machine type $1,\ldots,k$.
- Discrete RV taking values $x_1,\ldots,x_n$: condition on $\{X=x_i\}$.
Typical mistake
- Using overlapping $B_i$ (not a partition) and still summing as if disjoint.
- Forgetting a piece of the partition (probabilities of scenarios must sum to $1$).
Example: noisy bit channel
Goal: send bit $X\in\{0,1\}$ with $\mathbb{P}[X=0]=p_0$, $\mathbb{P}[X=1]=p_1=1-p_0$. Flip probability $\varepsilon$. Find $\mathbb{P}[Y=1]$ for received bit $Y$.
Step 1: partition via $\{X=0\}$, $\{X=1\}$.
Step 2: $\mathbb{P}[Y=1\mid X=1]=1-\varepsilon$, $\mathbb{P}[Y=1\mid X=0]=\varepsilon$.
Step 3:
Check: if $\varepsilon=0$, this collapses to $p_1$.
3.3 Bayes formula #
3.3.1 From prior to posterior #
Idea
Bayes converts “likelihood of data given hypothesis” into “probability of hypothesis given data”, weighting by the prior $\mathbb{P}[B_i]$ and normalizing by the total probability of the data.
Proposition (Bayes) If $B_1,\ldots,B_n$ partition $\Omega$ with $\mathbb{P}[B_i]>0$, and $\mathbb{P}[A]>0$, then
When to use
- Wording: “given that the test is positive…”, “given that we received $1$…”, “posterior probability…”.
- You know $\mathbb{P}[A\mid B_i]$ (forward model) but need $\mathbb{P}[B_i\mid A]$.
Typical mistake
- Equating $\mathbb{P}[B\mid A]$ with $\mathbb{P}[A\mid B]$ (transposing the conditional).
- Ignoring base rates (rare disease): a high $\mathbb{P}[\text{positive}\mid\text{sick}]$ does not imply a high $\mathbb{P}[\text{sick}\mid\text{positive}]$.
Example: reverse the channel
Goal: same bit model; find $\mathbb{P}[X=1\mid Y=1]$.
Step 1: Bayes with partition $\{X=0\},\{X=1\}$.
Step 2:
Check: if $\varepsilon\to 0$, the posterior $\to 1$ whenever $p_1>0$.
3.4 Trees and classic applications #
3.4.1 Medical test #
Idea
Draw a probability tree: first branch = true state (prior), second = test result (likelihood). Bayes reads the tree backwards along the paths that end in “positive”.
Example: Acciaio’s rare disease
Goal: prevalence $\mathbb{P}[S=1]=1/10000$; test correct with probability $0.99$ in both directions (so false positive rate $0.01$). Find $\mathbb{P}[S=1\mid T=1]$.
Step 1:
Step 2 (interpretation): among positive tests, false positives from the huge healthy population dominate the few true positives.
Check: roughly $1\%$ of people test positive wrongly ($\approx 100$ per $10000$), while only about $1$ true sick person tests positive — so about $1$ in $100$ positives is truly sick.
When to use
- Any two-stage experiment: type then measurement; cause then symptom; class then feature.
Typical mistake
- Reporting the accuracy $0.99$ as the answer to “probability sick given positive”.
3.5 Method map (quick reference) #
| Task | Tool |
|---|---|
| “Given $B$, chance of $A$?” | $\mathbb{P}[A\mid B]=\mathbb{P}[A\cap B]/\mathbb{P}[B]$ |
| Joint from conditional | $\mathbb{P}[A\cap B]=\mathbb{P}[A\mid B]\mathbb{P}[B]$ |
| Cases / mixtures | Total probability |
| Posterior of causes | Bayes |
| Rare event + noisy test | Tree + base rates |
| Fair die restricted to a face set | Renormalize uniform on that set |
3.6 Exercises #
Exercise 1. Fair die; $B=\{1,2,3,4\}$. Find $\mathbb{P}[\text{even}\mid B]$.
Solution. Goal: restrict to $B$ and renormalize. Step 1: even faces in $B$ are $\{2,4\}$, so $|A\cap B|=2$ with $A=\{\text{even}\}$. Step 2: $\mathbb{P}[A\mid B]=|A\cap B|/|B|=2/4=1/2$. Check: equivalently $\mathbb{P}[A\cap B]/\mathbb{P}[B]=(1/3)/(2/3)=1/2$.
Exercise 2. Urns: urn $1$ has $2$ red and $3$ blue; urn $2$ has $3$ red and $1$ blue. Pick urn uniformly, then one ball. Find $\mathbb{P}[\text{red}]$ and $\mathbb{P}[\text{urn }1\mid\text{red}]$.
Solution. Goal: random urn, then random ball; red probability and posterior of urn $1$. Step 1: partition $\{U_1,U_2\}$ with $\mathbb{P}[U_i]=1/2$. Step 2: $\mathbb{P}[R\mid U_1]=2/5$, $\mathbb{P}[R\mid U_2]=3/4$. Step 3 (total probability): $\mathbb{P}[R]=\tfrac12\cdot\tfrac25+\tfrac12\cdot\tfrac34=\tfrac{4}{20}+\tfrac{3}{8}=\tfrac{8}{40}+\tfrac{15}{40}=\tfrac{23}{40}$. Step 4 (Bayes): $\mathbb{P}[U_1\mid R]=\dfrac{\tfrac12\cdot\tfrac25}{\tfrac{23}{40}}=\dfrac{8}{23}$. Check: urn $2$ is redder, so posterior of urn $1$ given red is less than $1/2$.
Exercise 3. Fair die twice. Let $S$ be the sum. Compute $\mathbb{P}[\text{first die }=6\mid S=8]$.
Solution. Goal: conditional probability by listing equally likely outcomes on $\{S=8\}$. Step 1: outcomes with sum $8$: $(2,6),(3,5),(4,4),(5,3),(6,2)$ — five equally likely. Step 2: first die $=6$ only in $(6,2)$, so $\mathbb{P}=1/5$. Check: $\mathbb{P}[\text{first }=6,\,S=8]=\mathbb{P}[(6,2)]=1/36$ and $\mathbb{P}[S=8]=5/36$, ratio $1/5$.
Chapter 4 — Independence (Unabhängigkeit) #
Events (and later random variables) that do not inform each other: product formulas and the difference between pairwise and mutual independence.
4.1 Independence of two events #
4.1.1 Definition and equivalents #
Idea
$A$ and $B$ are independent when the joint occurrence factors into a product — learning that $B$ happened does not change the odds of $A$.
Definition (independence of two events) Events $A,B$ are independent if
Proposition (equivalence with conditioning) If $\mathbb{P}[A]>0$ and $\mathbb{P}[B]>0$, then the following are equivalent:
- $\mathbb{P}[A\cap B]=\mathbb{P}[A]\mathbb{P}[B]$,
- $\mathbb{P}[A\mid B]=\mathbb{P}[A]$,
- $\mathbb{P}[B\mid A]=\mathbb{P}[B]$.
Useful remarks
- If $\mathbb{P}[A]\in\{0,1\}$, then $A$ is independent of every event.
- If $A$ is independent of itself, then $\mathbb{P}[A]\in\{0,1\}$.
- $A$ independent of $B$ $\Leftrightarrow$ $A$ independent of $B^c$.
When to use
- Separate physical mechanisms (die 1 vs die 2; $x$- and $y$-coordinates of a uniform point in a square).
- Factoring probabilities in product spaces.
Typical mistake
- Confusing disjoint ($A\cap B=\emptyset$) with independent. Nontrivial disjoint events with positive probability are dependent (if $B$ occurred, $A$ cannot). Exception: if $\mathbb{P}[B]=0$ (or $\mathbb{P}[A]=0$), then $\mathbb{P}[A\cap B]=0=\mathbb{P}[A]\mathbb{P}[B]$, so they are independent.
Example: disjoint on $\\{1,2,3,4\\}$
Goal: $\Omega=\{1,2,3,4\}$, $A=\{1,2\}$, $B=\{4\}$. Decide independence.
Which tool: Check $\mathbb{P}[A\cap B]\stackrel{?}{=}\mathbb{P}[A]\mathbb{P}[B]$. Do not stop at “they are disjoint”.
Step 1: $A\cap B=\emptyset$, so $\mathbb{P}[A\cap B]=0$ for every $\mathbb{P}$.
Step 2: If every outcome has positive probability, then $\mathbb{P}[A]>0$ and $\mathbb{P}[B]>0$, hence $\mathbb{P}[A]\mathbb{P}[B]>0= \mathbb{P}[A\cap B]$ — dependent.
Step 3: If $\mathbb{P}[B]=0$ (mass only on $\{1,2,3\}$), then $\mathbb{P}[A]\mathbb{P}[B]=0=\mathbb{P}[A\cap B]$ — independent. Same if $\mathbb{P}[A]\in\{0,1\}$.
Check: Disjoint + positive probabilities $\Rightarrow$ dependent. Disjoint + a null event $\Rightarrow$ independent. That is why “independent for every $\mathbb{P}$” is false here.
Example: two dice
Goal: Laplace on $\Omega=\{1,\ldots,6\}^2$. Let $A=\{\text{first even}\}$, $B=\{\text{second odd}\}$, $C=\{\text{sum }\le 3\}$, $D=\{\text{both }\le 2\}$.
Step 1: $\mathbb{P}[A]=\mathbb{P}[B]=1/2$, $\mathbb{P}[A\cap B]=1/4$ $\Rightarrow$ $A,B$ independent.
Step 2: $C=\{(1,1),(1,2),(2,1)\}$ has $\mathbb{P}[C]=3/36=1/12$; $A\cap C=\{(2,1)\}$ has probability $1/36\neq\mathbb{P}[A]\mathbb{P}[C]$ $\Rightarrow$ $A,C$ dependent.
Step 3: check $A,D$: $D$ has $4$ outcomes, $\mathbb{P}[D]=4/36=1/9$; $A\cap D=\{(2,1),(2,2)\}$ has probability $2/36=1/18=\mathbb{P}[A]\mathbb{P}[D]$ $\Rightarrow$ independent.
Check: for two events, the product equality is independence. Disjoint + positive probabilities would give $0\neq\mathbb{P}[A]\mathbb{P}[D]$ (dependent), but here $A\cap D\neq\emptyset$ and the product holds.
4.2 Mutual independence of $n$ events #
4.2.1 All subcollections #
Idea
For three or more events, pairwise independence is not enough. Mutual independence demands a product formula for every nonempty subcollection.
Definition (independence of $n$ events) Events $A_1,\ldots,A_n$ are independent (mutually independent) if for every $J\subset\{1,\ldots,n\}$ with $J\neq\emptyset$,
In particular, for three events $A,B,C$ you need all four identities
When to use
- Exam questions that explicitly say “unabhängig” for three events — verify the triple product, not only pairs.
- Families of events generated by different coordinates of an independent experiment.
Typical mistake
- Checking only $\mathbb{P}[A\cap B\cap C]=\mathbb{P}[A]\mathbb{P}[B]\mathbb{P}[C]$ and skipping pairwise (or the converse).
Example: pairwise but not mutual (classic pattern)
Goal: two fair independent bits $X,Y\in\{0,1\}$; set $Z=X\oplus Y$ (XOR: $1$ iff $X\neq Y$). Show $A=\{X=1\}$, $B=\{Y=1\}$, $C=\{Z=1\}$ are pairwise independent but not mutually independent.
Step 1: four equally likely outcomes:
| $(X,Y)$ | $Z$ | in $A$? | in $B$? | in $C$? |
|---|---|---|---|---|
| $(0,0)$ | $0$ | no | no | no |
| $(0,1)$ | $1$ | no | yes | yes |
| $(1,0)$ | $1$ | yes | no | yes |
| $(1,1)$ | $0$ | yes | yes | no |
Each of $A,B,C$ has $2$ outcomes ⇒ probability $1/2$.
Step 2 (pairwise OK): $A\cap B=\{(1,1)\}$ has probability $1/4=\mathbb{P}[A]\mathbb{P}[B]$. Same for $A\cap C=\{(1,0)\}$ and $B\cap C=\{(0,1)\}$.
Step 3 (triple fails): $X=Y=1$ forces $Z=0$, so $A\cap B\cap C=\emptyset$ and $\mathbb{P}[A\cap B\cap C]=0\neq\tfrac18=\mathbb{P}[A]\mathbb{P}[B]\mathbb{P}[C]$.
Check: every pair factors; the triple does not — that is “pairwise but not mutual”.
Example: three events that work
Goal: in the two-dice Laplace space, the events $A$ (first even), $B$ (second odd), and $D$ (both $\le 2$) from Acciaio are mutually independent (verify all products).
Step 1: compute each pairwise intersection probability and the triple intersection by listing.
Step 2: confirm factorization in each case.
Check: when in doubt, list — $|\Omega|=36$ is small.
4.3 Preview: independent random variables #
4.3.1 CDF product formula (pointer only) #
Idea
Random variables are independent when every finite collection of “$X_i\le a_i$” events factors — equivalently, the joint CDF (cumulative distribution function) factors into a product. This is the bridge from event independence to the product structure used throughout the rest of the course.
Definition (independent RVs — preview) $X_1,\ldots,X_n$ are independent if for all $a_1,\ldots,a_n\in\mathbb{R}$,
An infinite sequence is independent if every finite initial segment is.
iid / i.i.d.: independent and identically distributed (same distribution function $F_{X_i}$).
When to use
- Modelling $n$ separate dice as coordinates on $\{1,\ldots,6\}^n$ with Laplace measure.
- Writing “let $X,Y$ be independent with distribution functions $F,G$” without constructing $\Omega$ explicitly (existence theorem in Acciaio).
Typical mistake
- Thinking $\mathrm{Cov}(X,Y)=0$ (later) is the same as independence — for general RVs it is weaker.
Example: die coordinates
Goal: $\Omega=\{1,\ldots,6\}^n$ Laplace; $X_i(\omega)=\omega_i$.
Step 1: for $a_i\in\{1,\ldots,6\}$,
Check: extends to general $a_i$ by clipping to $\{1,\ldots,6\}$.
Example: uniform square coordinates
Goal: $\Omega=[0,1]^2$ with area; $X(x,y)=x$, $Y(x,y)=y$.
Step 1: for $a,b\in[0,1]$, $\mathbb{P}[X\le a,Y\le b]=ab=\mathbb{P}[X\le a]\mathbb{P}[Y\le b]$.
Check: $X$ and $Y$ are independent continuous RVs (details later).
4.4 Building independent experiments #
4.4.1 Product thinking #
Idea
The standard way to enforce independence is to take a product sample space and a product (or Laplace/product) measure. Then events that depend on different coordinates factor.
When to use
- “Independently” in a problem statement $\mapsto$ product construction.
- Monte Carlo / repeated trials: iid sequence.
Typical mistake
- Encoding two “independent” coins on a $3$-element $\Omega$ with uneven atoms so that the algebra cannot realize the product measure.
Example: indicator factorization
Goal: if $A,B$ are independent, then $\mathbb{E}[1_A 1_B]=\mathbb{E}[1_A]\mathbb{E}[1_B]$ (preview of $\mathbb{E}$).
Step 1: $1_A 1_B=1_{A\cap B}$, so $\mathbb{E}[1_{A\cap B}]=\mathbb{P}[A\cap B]$.
Step 2: independence $\Rightarrow$ $\mathbb{P}[A]\mathbb{P}[B]=\mathbb{E}[1_A]\mathbb{E}[1_B]$.
Check: this is why independence of events is the special case of independence of the RVs $1_A$ and $1_B$.
4.5 Method map (quick reference) #
| Task | Tool |
|---|---|
| Two events independent? | Test $\mathbb{P}[A\cap B]\stackrel{?}{=}\mathbb{P}[A]\mathbb{P}[B]$ |
| Same via conditioning | $\mathbb{P}[A\mid B]\stackrel{?}{=}\mathbb{P}[A]$ |
| Three events | All pairs and the triple product |
| Disjoint positive events | Not independent (unless a null event) |
| Independent trials | Product $\Omega$, Laplace/product $\mathbb{P}$ |
| RVs (preview) | Factor joint CDF rectangle probabilities |
4.6 Exercises #
Exercise 1. Fair die; $A=\{\le 2\}$, $B=\{\text{even}\}$. Independent?
Solution. Goal: fair die; $A=\{1,2\}$, $B=\{2,4,6\}$. Step 1: $\mathbb{P}[A]=2/6=1/3$, $\mathbb{P}[B]=1/2$. Step 2: $A\cap B=\{2\}$, $\mathbb{P}[A\cap B]=1/6$. Step 3: $\mathbb{P}[A]\mathbb{P}[B]=1/6$. Check: equal $\Rightarrow$ independent. (Intuition: among even faces, one of three is in $A$, and $\mathbb{P}[A]=1/3$, matching $\mathbb{P}[A\mid B]$.)
Exercise 2. True or false: if $A$ is independent of $B$ and $A$ is independent of $C$, then $A$ is independent of $B\cup C$. Prove or give a counterexample.
Solution. Goal: show pairwise independence with $B$ and $C$ need not imply independence of $B\cup C$. Step 1: take $\Omega=\{1,2,3,4\}$ uniform; $A=\{1,2\}$, $B=\{1,3\}$, $C=\{1,4\}$. Step 2: $\mathbb{P}[A\cap B]=1/4=\mathbb{P}[A]\mathbb{P}[B]$ and $\mathbb{P}[A\cap C]=1/4=\mathbb{P}[A]\mathbb{P}[C]$, so $A\perp B$ and $A\perp C$. Step 3: $B\cup C=\{1,3,4\}$ and $A\cap(B\cup C)=\{1\}$, so $\mathbb{P}[A\cap(B\cup C)]=1/4\neq(1/2)(3/4)=3/8$. Check: the claim is false; independence does not automatically pass to unions.
Chapter 5 — Random variables & CDFs (Zufallsvariablen) #
Numerical summaries of a probability space: maps $X\colon\Omega\to\mathbb{R}$, the CDF $F_X$, and the discrete / continuous split.
5.1 Random variables #
5.1.1 Overview #
Idea
A random variable is not “a random number floating in space”: it is a measurable map from outcomes $\omega\in\Omega$ to real numbers. Measurability means every half-line event $\{X\le a\}$ is an event in $\mathcal{F}$, so its probability is defined.
Definition. Let $(\Omega,\mathcal{F},\mathbb{P})$ be a probability space. A random variable (r.v.) is a map $X\colon\Omega\to\mathbb{R}$ such that for every $a\in\mathbb{R}$,
Notation (omit $\omega$). Write
and
When to use
- You care about a numerical feature of a complicated experiment (profit, count, coordinate, waiting time).
- You want to push the model forward from $\Omega$ to $\mathbb{R}$ and work with one-dimensional events.
Typical mistake Treating $X$ as an event. Events are subsets of $\Omega$; random variables are functions $\Omega\to\mathbb{R}$. The event is $\{X\le a\}$, not “$X$”.
Example: gambling on a die
Goal: encode a payout as a random variable on a fair die.
Setup: $\Omega=\{1,2,3,4,5,6\}$ with the Laplace model $\mathbb{P}[A]=|A|/6$. Define
Step 1: check measurability — for each $a$, $\{X\le a\}$ is a subset of $\Omega$, hence in $\mathcal{F}=\mathcal{P}(\Omega)$.
Step 2: list the values: $X$ takes only $-1$, $0$, $2$.
Check: $\mathbb{P}[X=-1]=1/2$, $\mathbb{P}[X=0]=1/6$, $\mathbb{P}[X=2]=1/3$. Same $X$ reappears for $\mathbb{E}[X]$ in Ch 7.
5.1.2 Further examples on geometric sample spaces #
Idea
On continuous $\Omega$ (e.g. a square), random variables can be coordinates or areas. The same CDF language still applies; only the computation of $\mathbb{P}[X\le a]$ changes (areas instead of counting).
Example: first coordinate. On $\Omega=[0,1]^2$ with area probability, $Y(\omega_1,\omega_2)=\omega_1$ is a random variable: for $0\le a\le 1$,
Example: product area. $Z(\omega_1,\omega_2)=\omega_1\omega_2$ is a random variable. For $0\le a\le 1$,
and $\mathbb{P}[Z\le a]=\mathrm{Area}(E_a)=a+a\log(1/a)$ (convention $0\log(1/0)=0$).
When to use
- Continuous sample spaces where “list the outcomes” is impossible.
- Building intuition that “distribution” lives on $\mathbb{R}$, not on the original $\Omega$.
Typical mistake Confusing the map $X$ with its law: two different models can induce the same $F_X$. Later we often say “let $X$ have CDF $F$” without fixing $\Omega$.
5.2 Distribution functions (CDFs) #
5.2.1 Definition and basic identity #
Idea
The CDF stacks probability from $-\infty$ up to $a$. Once you know $F_X$, you know every interval probability of the form $\mathbb{P}(a,b]$ by subtraction.
Definition. The distribution function (CDF) of $X$ is
Rule (basic identity). For $a<b$,
Proof sketch. $\{X\le b\}=\{X\le a\}\cup\{a<X\le b\}$ (disjoint), so $\mathbb{P}[X\le b]=\mathbb{P}[X\le a]+\mathbb{P}[a<X\le b]$.
When to use
- Any probability about $X$ that can be written with half-lines or finite intervals.
- Comparing two laws by comparing CDFs.
Typical mistake Writing $\mathbb{P}[a\le X\le b]=F(b)-F(a)$ without care. The basic identity uses the left-open interval $(a,b]$. At continuity points of $F$ the distinction vanishes; at atoms it matters (§5.2.3).
Example: CDF of the die payout
Goal: compute $F_X$ for the gambling r.v. of §5.1.1.
Step 1: for $a<-1$, $\{X\le a\}=\varnothing$, so $F_X(a)=0$.
Step 2: for $-1\le a<0$, $\{X\le a\}=\{1,2,3\}$, so $F_X(a)=1/2$.
Step 3: for $0\le a<2$, $\{X\le a\}=\{1,2,3,4\}$, so $F_X(a)=2/3$.
Step 4: for $a\ge 2$, $\{X\le a\}=\Omega$, so $F_X(a)=1$.
Check: jumps of size $1/2$, $1/6$, $1/3$ at $-1$, $0$, $2$ match $\mathbb{P}[X=\cdot]$.
5.2.2 Properties that characterize CDFs #
Idea
Every CDF is nondecreasing, right-continuous, and runs from $0$ to $1$ at $\pm\infty$. Conversely, any such function is the CDF of some random variable on some probability space.
Theorem (properties of CDFs). Let $F=F_X$. Then:
- $F$ is nondecreasing.
- $F$ is right-continuous: $F(a)=\lim_{h\downarrow 0}F(a+h)$.
- $\lim_{a\to-\infty}F(a)=0$ and $\lim_{a\to+\infty}F(a)=1$.
Existence. If $F\colon\mathbb{R}\to[0,1]$ satisfies (1)–(3), there exist $(\Omega,\mathcal{F},\mathbb{P})$ and a r.v. $X$ with $F_X=F$. In practice one says: “let $X$ be a r.v. with distribution function $F$.”
When to use
- Sanity-check a candidate CDF.
- Define a law by writing down $F$ (no need to construct $\Omega$ by hand).
Typical mistake Expecting left-continuity. CDFs are right-continuous by convention (matching $\{X\le a\}$). Left limits encode atoms.
Example: uniform-on-$[0,1]$ CDF
Goal: recognize the CDF of the first coordinate $Y$ on the unit square.
Check: continuous and strictly increasing on $[0,1]$; later this is $\mathrm{Unif}[0,1]$ in continuous chapters.
5.2.3 Jumps and point masses #
Idea
The size of a jump of $F$ at $a$ is exactly the probability that $X$ equals $a$. Continuity of $F$ at $a$ means $\mathbb{P}[X=a]=0$.
Definition. Write $F(a-)=\lim_{h\downarrow 0}F(a-h)$ for the left limit.
Proposition. For every $a\in\mathbb{R}$,
When to use
- Reading atoms off a plotted CDF (stairs).
- Distinguishing discrete laws (jumps) from continuous laws (no jumps).
Typical mistake Reading the height $F(a)$ as $\mathbb{P}[X=a]$. Height is cumulative; the jump is the atom.
Example: indicator CDF
Goal: CDF of $X=1_A$ for an event $A$ with $\mathbb{P}[A]=p$.
Check: jump of size $p$ at $1$, jump of size $1-p$ at $0$. Matches $\mathrm{Ber}(p)$ in Ch 6.
5.3 Discrete vs continuous #
5.3.1 Two working classes #
Idea
Discrete r.v.s live on a countable set of values (stairs in the CDF). Continuous r.v.s have a density: the CDF is an integral, hence continuous, and single points have probability zero.
Definition (discrete). $X$ is discrete if its image
is at most countable. Equivalently: there is a finite or countable $E\subset\mathbb{R}$ with $X(\omega)\in E$ for all $\omega$. Then the law is described by the pmf (probability mass function)
Definition (continuous). $X$ is continuous if there exists a nonnegative density $f$ (pdf — probability density function) with
Then $F_X$ is continuous, so $\mathbb{P}[X=x]=0$ for every fixed $x$. Informally, $f(x)\,dx\approx\mathbb{P}[X\in[x,x+dx]]$.
When to use
- Choose discrete tools (sums, pmfs) vs continuous tools (integrals, densities).
- Decide whether $\mathbb{P}[X=x]$ can be positive.
Typical mistake Calling every “non-discrete” r.v. continuous. There exist mixed laws (jumps plus an absolutely continuous part); this course focuses on the pure discrete and pure continuous classes.
Example: classify the chapter examples
Die payout $X$: discrete (three values).
Coordinate $Y$ on the square: continuous (density $f=1_{[0,1]}$).
Product $Z=\omega_1\omega_2$: continuous (CDF absolutely continuous on $(0,1)$).
Indicator $1_A$: discrete (values $\{0,1\}$).
5.4 Indicator random variables #
5.4.1 Definition and link to events #
Idea
Indicators turn events into $0/1$ random variables. They are the atoms of discrete probability and the bridge to Bernoulli and to $\mathbb{E}[1_A]=\mathbb{P}[A]$.
Definition. For $A\in\mathcal{F}$,
Fact. $1_A$ is a random variable, and $1_A\sim\mathrm{Ber}(\mathbb{P}[A])$ in the sense of Ch 6.
When to use
- Counting how many of several events occur: $N=1_{A_1}+\cdots+1_{A_n}$.
- Translating probability statements into expectation statements (Ch 7).
Typical mistake Writing $1_A+1_B=1_{A\cup B}$ always. That fails when $A\cap B\neq\varnothing$; the correct identity is $1_{A\cup B}=1_A+1_B-1_{A\cap B}$.
Example: number of even dice among three
Goal: express a count via indicators.
Setup: three independent fair dice $X_1,X_2,X_3$. Let $A_i=\{X_i\text{ even}\}$, $N=1_{A_1}+1_{A_2}+1_{A_3}$.
Step 1: each $1_{A_i}\sim\mathrm{Ber}(1/2)$.
Step 2: $N\sim\mathrm{Bin}(3,1/2)$ by the Bernoulli-sum theorem in Ch 6.
Check: $\mathbb{P}[N=2]=\binom{3}{2}(1/2)^3=3/8$.
5.5 Reading probabilities from the CDF #
5.5.1 Interval triage #
Idea
Translate the event into a combination of $\{X\le\cdot\}$ and $\{X=\cdot\}$, then use $F$ and jumps.
Formulas (discrete-friendly)
| Event | In terms of $F$ / jumps |
|---|---|
| $\{X\le a\}$ | $F(a)$ |
| $\{X<a\}$ | $F(a-)$ |
| $\{X>a\}$ | $1-F(a)$ |
| $\{X\ge a\}$ | $1-F(a-)$ |
| $\{a<X\le b\}$ | $F(b)-F(a)$ |
| $\{X=a\}$ | $F(a)-F(a-)$ |
When to use
- Exam questions that give $F$ piecewise and ask for $\mathbb{P}[X\in\cdot]$.
- Checking consistency of a pmf against a staircase CDF.
Typical mistake Using $1-F(a)$ for $\mathbb{P}[X\ge a]$ when $a$ is an atom. Prefer $1-F(a-)$.
Example: mixed interval on the die payout
Goal: compute $\mathbb{P}[-1\le X<2]$ for the die payout $X$ from §5.1: $X\in\{-1,0,2\}$ with probabilities $(1/2,1/6,1/3)$.
Step 1: $\{-1\le X<2\}=\{X=-1\}\cup\{X=0\}$.
Step 2: probabilities $1/2+1/6=2/3$.
Via CDF: $F(2-)-F((-1)-)=2/3-0=2/3$.
Check: $\{X=2\}$ is excluded, matching the right-open / left-closed care.
5.6 Method map (quick reference) #
| Task | Tool |
|---|---|
| Encode a numerical feature of $\Omega$ | define $X\colon\Omega\to\mathbb{R}$ (§5.1) |
| Probabilities of half-lines / $(a,b]$ | CDF $F_X$, basic identity (§5.2) |
| Point mass $\mathbb{P}[X=a]$ | jump $F(a)-F(a-)$ (§5.2.3) |
| Decide sum vs integral toolkit | discrete vs continuous (§5.3) |
| Turn events into $0/1$ r.v.s | indicators (§5.4) |
| Read $\mathbb{P}[X\ge a]$ from a staircase | $1-F(a-)$ (§5.5) |
5.7 Exercises #
Exercise 1. On a fair die, let $X(\omega)=\omega^2$. Compute $F_X(10)$ and $\mathbb{P}[X=16]$.
Solution. Goal: push a die face through $X=\omega^2$ and read CDF / atom. Step 1: $F_X(10)=\mathbb{P}[X\le 10]=\mathbb{P}[\omega\in\{1,2,3\}]=1/2$. Step 2: $\mathbb{P}[X=16]=\mathbb{P}[\omega=4]=1/6$. Check: values of $X$ are $1,4,9,16,25,36$; only $\omega\le 3$ give $X\le 10$.
Exercise 2. A r.v. $X$ has CDF
Find the support (atoms), the pmf, and $\mathbb{P}[0<X\le 3]$.
Solution. Goal: recover the discrete law from a staircase CDF. Step 1 (atoms): jumps at $0$, $1$, $3$:
Step 2 (pmf): support $\{0,1,3\}$ with probabilities $(1/4,1/2,1/4)$; sum $=1$. Step 3 (interval): $\{0<X\le 3\}=\{X=1\}\cup\{X=3\}$, probability $1/2+1/4=3/4$, matching $F(3)-F(0)$. Check: $\mathbb{P}[X\le 1]=3/4=F(1)$; right-continuity holds at each jump point.
Chapter 6 — Discrete distributions (Diskrete Verteilungen) #
Named discrete laws, joint pmfs, independence criteria, and the Poisson approximation of the binomial.
6.1 Discrete laws and pmfs #
6.1.1 Definition #
Idea
For a discrete r.v., listing $\mathbb{P}[X=x]$ for every attainable $x$ is enough: every event about $X$ is a union of atoms $\{X=x\}$.
Definition. Let $X$ take values in a finite or countable set $E\subset\mathbb{R}$. The distribution (pmf) of $X$ is
Proposition. $\sum_{x\in E}p_x=1$.
Existence. Conversely, any $(p_x)_{x\in E}$ with $p_x\in[0,1]$ and $\sum_x p_x=1$ is the law of some discrete r.v. on some probability space. One may write: “let $X$ have distribution $(p_x)$.”
When to use
- Specifying a discrete law without building $\Omega$.
- Checking that a candidate formula is a valid pmf (nonnegative, sums to $1$).
Typical mistake Forgetting the support: writing a formula for $k=0,1,\ldots$ when the r.v. only lives on $\{1,2,\ldots\}$ (geometric) or $\{0,\ldots,n\}$ (binomial).
Example: fair die as a pmf
Goal: write the Laplace die as a discrete law.
Check: $\sum p_x=1$; $F_X(a)=\lfloor a\rfloor/6$ for $a\in[1,6]$, with the usual staircase extension outside.
6.2 Bernoulli and Binomial #
6.2.1 Bernoulli #
Idea
One yes/no trial: success with probability $p$, failure with probability $1-p$. The indicator of any event is Bernoulli.
Definition. $X\sim\mathrm{Ber}(p)$ for $0\le p\le 1$ if $X\in\{0,1\}$ and
When to use
- Single binary outcome; indicators $1_A$.
- Building block for Binomial via sums.
Typical mistake Parameter confusion: some texts write $\mathrm{Ber}(q)$ for failure probability. Stick to $p=\mathbb{P}[X=1]$.
Example: biased coin
Goal: model one toss with $\mathbb{P}[\text{heads}]=0.6$.
Set $X=1$ on heads. Then $X\sim\mathrm{Ber}(0.6)$, so $\mathbb{P}[X=0]=0.4$.
6.2.2 Binomial #
Idea
Count successes in $n$ independent Bernoulli($p$) trials. The pmf is the binomial theorem in probabilistic clothing.
Definition. $X\sim\mathrm{Bin}(n,p)$ if $X\in\{0,\ldots,n\}$ and
Sanity check. $\sum_{k=0}^n\binom{n}{k}p^k(1-p)^{n-k}=(p+(1-p))^n=1$.
Theorem (sum of i.i.d. Bernoullis). If $X_1,\ldots,X_n$ are i.i.d. $\mathrm{Ber}(p)$, then
Remark. $\mathrm{Bin}(1,p)=\mathrm{Ber}(p)$. If $X\sim\mathrm{Bin}(m,p)$, $Y\sim\mathrm{Bin}(n,p)$ are independent, then $X+Y\sim\mathrm{Bin}(m+n,p)$.
When to use
- Fixed number of independent identical trials; count successes.
- Sampling with replacement / with large population relative to sample.
Typical mistake Using Binomial for sampling without replacement from a finite population (use Hypergeometric — not in Acciaio Ch 2, but know the mismatch). Also: writing $\binom{n}{k}p^k$ and forgetting $(1-p)^{n-k}$.
Example: five biased coins
Goal: $\mathbb{P}[\text{exactly 2 heads}]$ for $n=5$, $p=1/3$.
6.3 Geometric and memorylessness #
6.3.1 Geometric as first success #
Idea
Keep tossing independent $\mathrm{Ber}(p)$ coins until the first success. The trial number of that success is Geometric($p$).
Definition. For $0<p\le 1$, $T\sim\mathrm{Geom}(p)$ if $T\in\{1,2,3,\ldots\}$ and
(Convention: for $p=1$, take $0^0=1$, so $\mathbb{P}[T=1]=1$.)
Construction. If $X_1,X_2,\ldots$ are i.i.d. $\mathrm{Ber}(p)$ and
then $T\sim\mathrm{Geom}(p)$ (with the harmless abuse that $\mathbb{P}[T=\infty]=0$).
Useful tail. $\mathbb{P}[T>n]=(1-p)^n$ (first $n$ trials all fail).
When to use
- Waiting time until first success in i.i.d. Bernoulli trials.
- Memoryless discrete waiting (next subsection).
Typical mistake Off-by-one support: some textbooks define Geometric as number of failures before first success (support $\{0,1,\ldots\}$). Acciaio / this recap uses trial of first success (support $\{1,2,\ldots\}$).
Example: first six on a die
Goal: probability that the first six appears on toss $4$.
Here $p=1/6$, so
Check: $\mathbb{P}[T>3]=(5/6)^3=125/216$.
6.3.2 Memorylessness #
Idea
Given that you have already failed $n$ times, the remaining wait until the first success is again $\mathrm{Geom}(p)$ — the past is forgotten.
Proposition (absence of memory). Let $T\sim\mathrm{Geom}(p)$ with $0<p<1$. Then for all integers $n\ge 0$ and $k\ge 1$,
Proof sketch. From $\mathbb{P}[T>n]=(1-p)^n$,
When to use
- Conditional waiting problems (“already waited 10 minutes / 10 trials…”).
- Recognizing Geometric among positive integer-valued laws (memoryless characterizes Geometric on $\{1,2,\ldots\}$ among discrete laws on that support).
Typical mistake Applying memorylessness to Binomial or Poisson — those are not memoryless.
Example: conditional wait after three failures
Goal: for $T\sim\mathrm{Geom}(1/2)$, compute $\mathbb{P}[T\ge 5\mid T>3]$.
By memoryless: equals $\mathbb{P}[T\ge 2]=(1/2)^{1}=1/2$.
Directly: $\mathbb{P}[T\ge 5]=(1/2)^4=1/16$, $\mathbb{P}[T>3]=(1/2)^3=1/8$, ratio $(1/16)/(1/8)=1/2$.
6.4 Poisson and Poisson–Binomial approximation #
6.4.1 Poisson law #
Idea
Poisson($\lambda$) models counts of rare events in a fixed window: nonnegative integers with mean $\lambda$, pmf decaying factorially.
Definition. For $\lambda>0$, $N\sim\mathrm{Poisson}(\lambda)$ if $N\in\{0,1,2,\ldots\}$ and
Sanity check. $\sum_{k\ge 0}e^{-\lambda}\lambda^k/k!=e^{-\lambda}e^{\lambda}=1$.
When to use
- Counts of rare independent incidents (typos, arrivals, defects) when $n$ is large and $p$ small with $np\approx\lambda$.
- Limit object for $\mathrm{Bin}(n,\lambda/n)$.
Typical mistake Using Poisson when trials are strongly dependent or when $p$ is not small. Also: confusing parameter $\lambda$ with a probability (it is a mean, can exceed $1$).
Example: $\mathbb{P}[N=0]$ and $\mathbb{P}[N=1]$
For $\lambda=2$: $\mathbb{P}[N=0]=e^{-2}$, $\mathbb{P}[N=1]=2e^{-2}$.
6.4.2 Poisson approximation of the binomial #
Idea
Fix the mean $\lambda=np$ while $n\to\infty$ and $p=\lambda/n\to 0$. Binomial probabilities converge to Poisson($\lambda$) probabilities — the classical rare-event limit.
Proposition. Fix $\lambda>0$. Let $X_n\sim\mathrm{Bin}(n,\lambda/n)$ and let $N\sim\mathrm{Poisson}(\lambda)$. Then for every fixed $k\in\mathbb{N}$,
Proof idea. Write
Application (newspaper typos). A page has $n=10^4$ characters; each mistyped with probability $p=10^{-3}$ (so $\lambda=np=10$). Then e.g.
When to use
- Approximate $\mathrm{Bin}(n,p)$ when $n$ large, $p$ small, $\lambda=np$ moderate.
- Quick rare-event probabilities without summing binomial coefficients.
Typical mistake Using the approximation when $p$ is not small (e.g. $n=10$, $p=0.4$). Always check $p\to 0$ with $np$ stable.
Example: compare at $k=0$
Goal: for $\lambda=5$, compare $\mathbb{P}[\mathrm{Bin}(50,0.1)=0]$ and $\mathbb{P}[\mathrm{Poisson}(5)=0]$.
Binomial: $(0.9)^{50}\approx 0.00515$. Poisson: $e^{-5}\approx 0.00674$. Close for a first approximation; the plot above shows the full pmfs track each other.
6.5 Joint distributions and independence #
6.5.1 Joint pmf and images #
Idea
The joint pmf of discrete $X_1,\ldots,X_n$ is the table $\mathbb{P}[X_1=x_1,\ldots,X_n=x_n]$. Any function $Z=\varphi(X_1,\ldots,X_n)$ is again discrete; its pmf sums the joint masses over the preimage $\varphi^{-1}(z)$.
Definition. For discrete $X_i$ with values in countable $E_i$, the joint distribution is
Independence $\Rightarrow$ product. If $X_1,\ldots,X_n$ are independent,
Proposition (image). For $\varphi\colon\mathbb{R}^n\to\mathbb{R}$ and $Z=\varphi(X_1,\ldots,X_n)$,
When to use
- Laws of sums, maxima, products of discrete r.v.s.
- Building a joint table from a story (two dice, two Poissons, etc.).
Typical mistake Assuming the joint is the product of margins without checking independence. Margins never determine the joint when dependence is possible.
Example: two independent Poissons
Goal: joint pmf of independent $X,Y\sim\mathrm{Poisson}(\lambda)$.
If instead $Z=X$, then $\mathbb{P}[X=k,Z=\ell]=1_{\{k=\ell\}}e^{-\lambda}\lambda^k/k!$ — same margins, wildly different joint.
6.5.2 Independence criteria for discrete r.v.s #
Idea
For discrete variables, independence is equivalent to factorization of every atom probability, and also to factorization of expectations of separated functions $f(X)g(Y)$.
Theorem (pair). For discrete $X,Y$, the following are equivalent:
- $X,Y$ are independent (in the CDF sense of the framework chapter).
- $\mathbb{P}[X=a,Y=b]=\mathbb{P}[X=a]\mathbb{P}[Y=b]$ for all $a,b$.
- $\mathbb{E}[f(X)g(Y)]=\mathbb{E}[f(X)]\mathbb{E}[g(Y)]$ whenever the expectations exist.
Theorem ($n$-tuple). Analogous factorization for atoms and for $\mathbb{E}[f_1(X_1)\cdots f_n(X_n)]$.
When to use
- Prove independence from a joint table (check all atoms, not just a few).
- Pull expectations of products apart (Ch 7).
Typical mistake Checking only $\mathbb{P}[X=a,Y=b]=\mathbb{P}[X=a]\mathbb{P}[Y=b]$ for “typical” $(a,b)$ and skipping the zeros / edges of the table.
Example: independence check on two dice
Goal: $X,Y$ faces of two independent fair dice; verify atom factorization.
$\mathbb{P}[X=i,Y=j]=1/36$ and $\mathbb{P}[X=i]\mathbb{P}[Y=j]=(1/6)(1/6)=1/36$ for all $i,j\in\{1,\ldots,6\}$.
6.5.3 Almost sure events (parenthesis) #
Idea
“Almost surely” means probability $1$. For discrete calculations one often writes $X\ge 0$ a.s. to justify formulas that need a sign condition.
Definition. An event $A$ occurs almost surely (a.s.) if $\mathbb{P}[A]=1$. Write $X\le Y$ a.s. if $\mathbb{P}[X\le Y]=1$.
When to use
- Hypotheses of expectation theorems (“$X\ge 0$ a.s.”).
- Ignoring null sets (e.g. geometric $T<\infty$ a.s.).
Typical mistake Confusing “a.s.” with “surely for every $\omega$”. On continuous spaces they differ; for finite discrete $\Omega$ with full support they coincide.
6.6 Method map (quick reference) #
| Task | Tool |
|---|---|
| Specify a discrete law | pmf $(p_x)$ summing to $1$ (§6.1) |
| One binary trial / indicator | $\mathrm{Ber}(p)$ (§6.2.1) |
| Count successes in $n$ i.i.d. trials | $\mathrm{Bin}(n,p)= $ sum of Bernoullis (§6.2.2) |
| Waiting time to first success | $\mathrm{Geom}(p)$; use tails $(1-p)^n$ (§6.3) |
| Conditional remaining wait | memoryless identity (§6.3.2) |
| Rare-event count / $n$ large, $p$ small | $\mathrm{Poisson}(\lambda)$ or Binomial≈Poisson (§6.4) |
| Law of $\varphi(X_1,\ldots,X_n)$ | sum joint masses on the preimage (§6.5.1) |
| Check independence | atom product (or $\mathbb{E}[f(X)g(Y)]$ factorization) (§6.5.2) |
6.7 Exercises #
Exercise 1. If $X\sim\mathrm{Ber}(0.2)$, compute $\mathbb{P}[X=0]$ and $F_X(0.5)$.
Solution. Goal: Bernoulli masses and CDF at a point between $0$ and $1$. Step 1: $\mathbb{P}[X=0]=1-0.2=0.8$. Step 2: $F_X(0.5)=\mathbb{P}[X\le 0.5]=\mathbb{P}[X=0]=0.8$. Check: $F_X$ jumps by $0.2$ at $1$, so for $a\in[0,1)$ one has $F_X(a)=0.8$.
Exercise 2. The joint pmf of $(X,Y)$ on $\{0,1\}^2$ is
| $Y=0$ | $Y=1$ | |
|---|---|---|
| $X=0$ | $0.1$ | $0.3$ |
| $X=1$ | $0.2$ | $0.4$ |
Are $X$ and $Y$ independent? Compute $\mathbb{P}[X+Y=1]$.
Solution. Goal: independence via the atom test; law of a sum via the image formula. Step 1: compute margins by summing rows/columns:
Step 2: compare one atom: $\mathbb{P}[X=0]\mathbb{P}[Y=0]=0.12\neq 0.1$. Stop — dependent. Step 3: $\{X+Y=1\}=\{(0,1),(1,0)\}$, disjoint, probabilities $0.3+0.2=0.5$. Check: image formula with $\varphi(x,y)=x+y$ sums exactly those two joint masses.
Chapter 7 — Expectation & variance — discrete (Erwartungswert und Varianz) #
Averages and spreads for discrete random variables: image formula, linearity, tail sum, Jensen, and variance under independence.
7.1 Expectation: definition #
7.1.1 Nonnegative and integrable cases #
Idea
Expectation is the probability-weighted average of the values of $X$. For nonnegative discrete $X$ it is always defined in $[0,\infty]$; for signed $X$ one needs $\mathbb{E}[|X|]<\infty$ (integrability).
Definition (nonnegative). If $X$ is discrete and $X\ge 0$ a.s., with values in countable $E$,
Definition (integrable). $X$ is integrable if $\mathbb{E}[|X|]<\infty$. Then
When to use
- Any “average value” question for a discrete r.v.
- As a building block for variance ($\mathbb{E}[X^2]$) and for $\mathbb{E}[\varphi(X)]$.
Typical mistake Writing $\sum x\,p_x$ for a signed r.v. without checking absolute convergence — rearrangements can fail if $\sum |x|p_x=\infty$.
Example: fair die
Goal: $\mathbb{E}[X]$ for uniform $X$ on $\{1,\ldots,6\}$.
Example: Bernoulli and indicator
If $X\sim\mathrm{Ber}(p)$, then $\mathbb{E}[X]=0\cdot(1-p)+1\cdot p=p$. In particular, for any event $A$,
Example: die payout
For the gambling $X$ of Ch 5 with values $-1,0,2$ and probabilities $1/2,1/6,1/3$,
Example: Poisson mean
If $N\sim\mathrm{Poisson}(\lambda)$, then $\mathbb{E}[N]=\lambda$. Indeed
7.2 Tail-sum formula #
7.2.1 Nonnegative integer-valued r.v.s #
Idea
For $X\in\{0,1,2,\ldots\}$, the mean equals the sum of the survival probabilities. You never need the pmf explicitly if you know the tails.
Proposition (tail sum). If $X$ is discrete with values in $\mathbb{N}=\{0,1,2,\ldots\}$, then
Proof sketch. Write $\mathbb{P}[X\ge n]=\sum_{k\ge n}\mathbb{P}[X=k]$ and switch sums by Fubini for nonnegative terms: each $k$ contributes to exactly $k$ of the inner indicators $1_{k\ge n}$.
Application (Geometric). For $T\sim\mathrm{Geom}(p)$, $\mathbb{P}[T\ge n]=(1-p)^{n-1}$ for $n\ge 1$, so
When to use
- Geometric and other waiting times with simple tails.
- Integer-valued nonnegative $X$ when survival is easier than the pmf.
Typical mistake Starting the sum at $n=0$ (that term is $1$ and spoils the formula) or applying the formula to signed / non-integer $X$.
Example: recover Geometric mean
Goal: $\mathbb{E}[T]$ for $T\sim\mathrm{Geom}(1/4)$.
Tail sum: $\mathbb{E}[T]=\sum_{n\ge 1}(3/4)^{n-1}=1/(1/4)=4$.
7.3 Image formula and linearity #
7.3.1 Expectation of $\varphi(X_1,\ldots,X_n)$ #
Idea
You do not need the law of $Z=\varphi(X)$ first: average $\varphi$ under the joint law of the inputs. For one variable, $\mathbb{E}[\varphi(X)]=\sum_x\varphi(x)\mathbb{P}[X=x]$.
Theorem (image / LOTUS — law of the unconscious statistician). Let $X_1,\ldots,X_n$ be discrete on countable $E$, and $\varphi\colon\mathbb{R}^n\to\mathbb{R}$. If
then $Z=\varphi(X_1,\ldots,X_n)$ is integrable and
If $\varphi\ge 0$, the formula holds in $[0,\infty]$ without the integrability check.
Special case $n=1$. $\mathbb{E}[\varphi(X)]=\sum_x\varphi(x)\mathbb{P}[X=x]$ whenever $\sum|\varphi(x)|p_x<\infty$ (or $\varphi\ge 0$).
When to use
- $\mathbb{E}[X^2]$, $\mathbb{E}[e^{tX}]$, $\mathbb{E}[|X-a|]$, etc., directly from the pmf.
- Avoiding an intermediate computation of the law of $\varphi(X)$.
Typical mistake Writing $\mathbb{E}[\varphi(X)]=\varphi(\mathbb{E}[X])$ — false in general (only affine $\varphi$, or Jensen inequalities for convex $\varphi$).
Example: second moment of Bernoulli
Goal: $\mathbb{E}[X^2]$ for $X\sim\mathrm{Ber}(p)$ via LOTUS (not via $\varphi(\mathbb{E}[X])$).
Check: $(\mathbb{E}[X])^2=p^2$, which equals $p$ only if $p\in\{0,1\}$. So $\mathbb{E}[X^2]\neq(\mathbb{E}[X])^2$ in general.
7.3.2 Linearity #
Idea
Expectation respects addition and scalar multiplication whether or not the variables are independent. This is the single most useful computational shortcut in discrete probability.
Theorem (linearity). If $X,Y$ are integrable discrete r.v.s and $\alpha\in\mathbb{R}$, then $\alpha X$ and $X+Y$ are integrable and
Hence for integrable $X_1,\ldots,X_n$ and scalars $\alpha_i$,
Application (Binomial mean). If $S\sim\mathrm{Bin}(n,p)$, couple $S$ with $S_n=X_1+\cdots+X_n$ for i.i.d. $\mathrm{Ber}(p)$. Then
(The direct sum $\sum_k k\binom{n}{k}p^k(1-p)^{n-k}$ is unnecessary.)
When to use
- Means of sums, counts via indicators, Binomial/ Poisson additivity stories.
- Any time a r.v. is written as a sum — try linearity before expanding the pmf.
Typical mistake Believing linearity needs independence. Independence is needed for $\mathbb{E}[XY]=\mathbb{E}[X]\mathbb{E}[Y]$ and for adding variances, not for adding expectations.
Example: expected number of sixes
Goal: roll $n$ fair dice; let $N$ be the number of sixes.
Write $N=\sum_{i=1}^n 1_{\{X_i=6\}}$. Each indicator has mean $1/6$, so $\mathbb{E}[N]=n/6$ — no Binomial expansion required (though $N\sim\mathrm{Bin}(n,1/6)$).
7.4 Jensen's inequality #
7.4.1 Convex maps and consequences #
Idea
Averaging first and then applying a convex function underestimates applying the function first and then averaging: the graph lies above its tangents.
Theorem (Jensen). Let $X$ be discrete and $\varphi\colon\mathbb{R}\to\mathbb{R}$ convex. If $\mathbb{E}[\varphi(X)]$ and $\mathbb{E}[X]$ are well-defined, then
Consequences.
- $|\mathbb{E}[X]|\le\mathbb{E}[|X|]$ for integrable $X$ (take $\varphi(x)=|x|$).
- If $\mathbb{E}[X^2]<\infty$, then $\mathbb{E}[|X|]\le\sqrt{\mathbb{E}[X^2]}$ (apply Jensen to $t\mapsto t^2$ on $|X|$, or note $\varphi(x)=x^2$ gives $(\mathbb{E}[X])^2\le\mathbb{E}[X^2]$ and combine with absolute values as in the lecture). In particular $\mathbb{E}[X^2]<\infty$ implies integrability of $X$.
When to use
- Justify that finite second moment $\Rightarrow$ finite first moment.
- Quick inequalities relating $\mathbb{E}[X]$, $\mathbb{E}[|X|]$, $\mathbb{E}[X^2]$.
Typical mistake Reversing Jensen for concave $\varphi$ (the inequality flips). Also applying Jensen to non-convex maps like $x\mapsto\sin x$.
Example: second moment dominates the square of the mean
For any discrete $X$ with $\mathbb{E}[X^2]<\infty$, Jensen with $\varphi(x)=x^2$ yields $(\mathbb{E}[X])^2\le\mathbb{E}[X^2]$. For $X\sim\mathrm{Ber}(p)$: $p^2\le p$, true for $p\in[0,1]$.
7.5 Expectation and independence #
7.5.1 Product rule #
Idea
Independence turns products of functions of separate variables into products of expectations — the computational twin of the atom product rule from Ch 6.
Reminder. For discrete $X,Y$, independence $\Leftrightarrow$ $\mathbb{E}[f(X)g(Y)]=\mathbb{E}[f(X)]\mathbb{E}[g(Y)]$ whenever defined (§6.5.2).
When to use
- Compute $\mathbb{E}[XY]$ under independence: $\mathbb{E}[XY]=\mathbb{E}[X]\mathbb{E}[Y]$.
- Kill cross terms in variance expansions (§7.6).
Typical mistake Using $\mathbb{E}[XY]=\mathbb{E}[X]\mathbb{E}[Y]$ without independence (counterexample: $Y=X$ with $\mathbb{P}[X=\pm 1]=1/2$ gives $\mathbb{E}[XY]=1\neq 0=\mathbb{E}[X]\mathbb{E}[Y]$). Independence also does not give $\mathbb{E}[X/Y]=\mathbb{E}[X]/\mathbb{E}[Y]$.
Example: product of independent Bernoullis
If $X,Y$ i.i.d. $\mathrm{Ber}(p)$, then $\mathbb{E}[XY]=\mathbb{E}[X]\mathbb{E}[Y]=p^2$. Directly: $XY\sim\mathrm{Ber}(p^2)$ because $XY=1$ iff both are $1$.
Example: $\\mathbb{E}[X/Y]\\neq\\mathbb{E}[X]/\\mathbb{E}[Y]$ even under independence
Goal: Independence is not enough for quotients.
Step 1: Let $X\equiv 1$ and $Y\sim\mathcal{U}([1,3])$ (so $X,Y$ are independent). Then $\mathbb{E}[X]=1$, $\mathbb{E}[Y]=2$, and $\mathbb{E}[X]/\mathbb{E}[Y]=1/2$.
Step 2: Density of $Y$ is $1/2$ on $[1,3]$, so
Check: $1/y$ is strictly convex on $(0,\infty)$, so Jensen already says $\mathbb{E}[1/Y]>1/\mathbb{E}[Y]$. The product rule is for $\mathbb{E}[f(X)g(Y)]$, not for $\mathbb{E}[X/Y]$ as a ratio of means.
7.6 Variance #
7.6.1 Definition and computational identity #
Idea
Variance is the mean squared deviation from the mean — a scale for typical fluctuations. The identity $\mathrm{Var}(X)=\mathbb{E}[X^2]-(\mathbb{E}[X])^2$ is the usual computation path.
Definition. If $\mathbb{E}[X^2]<\infty$, the variance is
The standard deviation is $\sqrt{\mathrm{Var}(X)}$.
Proposition (computational form).
Examples.
- If $X\equiv a$ a.s., then $\mathrm{Var}(X)=0$.
- If $\mathbb{P}[X=a]=\mathbb{P}[X=b]=1/2$, then $\mathrm{Var}(X)=\bigl(\frac{b-a}{2}\bigr)^2$.
- If $X\sim\mathrm{Ber}(p)$, then $\mathbb{E}[X^2]=p$, so $\mathrm{Var}(X)=p-p^2=p(1-p)$.
When to use
- Quantify spread; compare fluctuations of different laws with the same mean.
- Prepare for concentration / LLN (law of large numbers) heuristics: sums of i.i.d. have std. dev. growing like $\sqrt{n}$.
Typical mistake Forgetting to subtract $(\mathbb{E}[X])^2$, or computing $\mathbb{E}[(X-m)]$ (that is always $0$) instead of $\mathbb{E}[(X-m)^2]$.
Example: variance of the die payout
Goal: $\mathrm{Var}(X)$ for $X\in\{-1,0,2\}$ with probabilities $1/2,1/6,1/3$.
From earlier, $m=\mathbb{E}[X]=1/6$.
7.6.2 Variance of sums under independence #
Idea
Cross terms $\mathbb{E}[(X_i-m_i)(X_j-m_j)]$ vanish under pairwise independence, so variances add. Means grow like $n$; typical fluctuations grow only like $\sqrt{n}$.
Proposition. If $X_1,\ldots,X_n$ are pairwise independent with finite second moments and $S=X_1+\cdots+X_n$, then
Application (Binomial variance). For $S\sim\mathrm{Bin}(n,p)$, couple with i.i.d. Bernoullis:
Hence $\mathbb{E}[S]=np$ while $\sqrt{\mathrm{Var}(S)}=\sqrt{np(1-p)}$ grows like $\sqrt{n}$.
When to use
- Variance of sums of independent trials / indicators with weak dependence replaced by independence assumptions.
- Comparing signal ($np$) to noise ($\sqrt{np(1-p)}$).
Typical mistake Adding variances for dependent summands (e.g. without-replacement indicators). Also writing $\mathrm{Var}(aX)=a\mathrm{Var}(X)$ instead of $a^2\mathrm{Var}(X)$.
Example: std. dev. of number of heads
Goal: $n=100$ fair coins; $S\sim\mathrm{Bin}(100,1/2)$.
Roughly, outcomes in the $50\pm 10$ band (two std. devs) are typical; exact Binomial tails sharpen this later via concentration inequalities / normal approximation.
7.6.3 Binomial applications checklist #
Idea
Almost every Binomial exercise is: (1) identify $n,p$; (2) use the Bernoulli-sum representation for mean/variance; (3) use the pmf only when a specific $\mathbb{P}[S=k]$ is required.
Pattern
| Ask | Prefer |
|---|---|
| $\mathbb{E}[S]$ | linearity $\to np$ |
| $\mathrm{Var}(S)$ | independence of Bernoullis $\to np(1-p)$ |
| $\mathbb{P}[S=k]$ | pmf $\binom{n}{k}p^k(1-p)^{n-k}$ |
| $n$ large, $p$ small | Poisson($np$) approximation (Ch 6) |
When to use
- Exam triage for “$n$ independent trials” stories.
- Quickly discarding impossible approaches (expanding $\sum k\binom{n}{k}\cdots$ by hand).
Typical mistake Computing $\mathbb{E}[S]$ by differentiating the probability generating function when linearity is available in one line.
Example: expected number of matching birthdays fragment
Goal: $n$ people, approximate expected number of people born on Jan 1 (ignore leap years), $p=1/365$.
$S\sim\mathrm{Bin}(n,1/365)$, so $\mathbb{E}[S]=n/365$, $\mathrm{Var}(S)=n\cdot\frac{1}{365}\cdot\frac{364}{365}$. For large $n$ with $\lambda=n/365$ moderate, $S\approx\mathrm{Poisson}(\lambda)$.
7.7 Method map (quick reference) #
| Task | Tool |
|---|---|
| Average of discrete $X$ | $\mathbb{E}[X]=\sum x\,p_X(x)$ (§7.1) |
| $\mathbb{E}[1_A]$ | $\mathbb{P}[A]$ |
| Mean of nonnegative integer $X$ | tail sum $\sum_{n\ge 1}\mathbb{P}[X\ge n]$ (§7.2) |
| $\mathbb{E}[\mathrm{Geom}(p)]$ | $1/p$ via tails |
| $\mathbb{E}[\varphi(X)]$ without law of $\varphi(X)$ | image / LOTUS (§7.3.1) |
| Mean of a sum | linearity — no independence needed (§7.3.2) |
| $\mathbb{E}[\mathrm{Bin}(n,p)]$ | $np$ via Bernoulli sum |
| Bound / compare moments | Jensen (§7.4) |
| $\mathbb{E}[f(X)g(Y)]$ under independence | product of expectations (§7.5) |
| $\mathbb{E}[X/Y]$ vs $\mathbb{E}[X]/\mathbb{E}[Y]$ | not equal in general, even under independence |
| Spread | $\mathrm{Var}(X)=\mathbb{E}[X^2]-(\mathbb{E}[X])^2$ (§7.6) |
| Variance of independent sum | add variances; Binomial $np(1-p)$ (§7.6.2) |
7.8 Exercises #
Exercise 1. $X\sim\mathrm{Ber}(0.3)$. Compute $\mathbb{E}[X]$, $\mathbb{E}[X^2]$, $\mathrm{Var}(X)$.
Solution. Goal: Bernoulli mean and variance from the two-point support. Step 1: $\mathbb{E}[X]=0\cdot 0.7+1\cdot 0.3=0.3$. Step 2: $\mathbb{E}[X^2]=0^2\cdot 0.7+1^2\cdot 0.3=0.3$. Step 3: $\mathrm{Var}(X)=\mathbb{E}[X^2]-(\mathbb{E}[X])^2=0.3-0.09=0.21=0.3\cdot 0.7$. Check: general formula $\mathrm{Var}(\mathrm{Ber}(p))=p(1-p)$.
Exercise 2. A device fails each day independently with probability $p\in(0,1)$. Let $T$ be the day of first failure (so $T\sim\mathrm{Geom}(p)$). Let $A=\{T>10\}$.
- Compute $\mathbb{E}[1_A]$ and $\mathbb{E}[T\mid T>10]$ using memorylessness (interpret the conditional expectation as the mean of $10+\widetilde T$ with $\widetilde T\sim\mathrm{Geom}(p)$).
- If one instead runs $n$ independent devices and lets $S$ be the number still working after $10$ days, identify the law of $S$ and give $\mathbb{E}[S]$, $\mathrm{Var}(S)$.
Solution. Goal: combine indicators, Geometric memoryless, and Binomial mean/variance. Step 1 (single device). $A=\{T>10\}$ means the first $10$ days have no failure, probability $(1-p)^{10}$. Hence $\mathbb{E}[1_A]=\mathbb{P}[A]=(1-p)^{10}$. Step 2 (conditional mean). On $\{T>10\}$, write $T=10+T'$ where $T'$ is the additional wait until failure. Memorylessness (Ch 6) gives $T'\sim\mathrm{Geom}(p)$ independent of the past in the conditional law, so
Step 3 (many devices). Device $i$ still works after $10$ days iff its failure time exceeds $10$, an event of probability $q=(1-p)^{10}$. Independence across devices $\Rightarrow$ $S\sim\mathrm{Bin}(n,q)$. Step 4: $\mathbb{E}[S]=nq$, $\mathrm{Var}(S)=nq(1-q)$ by §7.6.2. Check: for $p=1$, $q=0$, so $S=0$ a.s., mean and variance $0$. For $p\to 0$ with $n$ fixed, $q\to 1$ and $\mathbb{E}[S]\to n$.
Chapter 8 — Continuous distributions (Stetige Verteilungen) #
Densities replace probability mass functions: Uniform, Exponential, Normal; transforms; expectation, variance, Jensen; Cauchy as a non-example.
8.1 Continuous random variables and densities #
8.1.1 Overview #
Idea
A continuous random variable has no atoms: $\mathbb{P}[X=a]=0$ for every single $a$. Probabilities live on intervals and are computed by integrating a nonnegative density $f$.
Definition (Continuous random variable). A random variable $X\colon\Omega\to\mathbb{R}$ is continuous if its CDF $F_X$ can be written as
for all $a\in\mathbb{R}$, for some nonnegative function $f\colon\mathbb{R}\to\mathbb{R}_+$ called a density of $X$ (often written $f_X$).
Immediate consequences
- $F_X$ is continuous, and $\mathbb{P}[X=a]=F_X(a)-F_X(a-)=0$ for every $a$.
- For $a\le b$, all interval variants agree:
- A density must integrate to one: $\int_{-\infty}^{\infty} f(x)\,dx=1$. Values of $f$ at finitely many points can be changed arbitrarily without changing the law.
When to use
- Outcomes are lengths, times, or measurement values with a continuum of possibilities.
- The CDF looks “smooth” (no jumps) and you need interval probabilities.
Typical mistake
- Reading $f(x)$ as a probability. Densities can exceed $1$; only integrals $\int_A f$ are probabilities.
- Writing $\mathbb{P}[X=a]=f(a)$ (that is discrete thinking). Continuously, $\mathbb{P}[X=a]=0$.
Example: from density to an interval probability
Goal: If $f(x)=\frac{1}{2}\mathbf{1}_{[0,2]}(x)$, find $\mathbb{P}[0.5\le X\le 1.5]$.
Step 1: Check $\int_0^2 \frac{1}{2}\,dx=1$, so $f$ is a density.
Step 2: $\mathbb{P}[0.5\le X\le 1.5]=\int_{0.5}^{1.5}\frac{1}{2}\,dx=\frac{1}{2}$.
Check: Same length as $[0,1]$ inside $[0,2]$, and density is flat, so probability $\frac{1}{2}$ matches Uniform intuition (§8.2).
8.1.2 Recognizing a continuous law from the CDF #
Idea
If $F_X$ is continuous and piecewise $C^1$, its derivative on each smooth piece is a density. This is the usual “differentiate the CDF” route after a transform.
Theorem (Density from $F_X$). Let $X$ be a random variable. Assume $F_X$ is continuous and piecewise $C^1$: there exist $-\infty=x_0<x_1<\cdots<x_n=+\infty$ such that $F_X$ is $C^1$ on every $(x_i,x_{i+1})$. Then $X$ is continuous, and a density is given by
with arbitrary values at the finitely many breakpoints $x_1,\ldots,x_{n-1}$.
Sketch of reason: On each open interval where $F$ is $C^1$, the fundamental theorem of calculus gives $F(b)-F(a)=\int_a^b F'$. Continuity of $F$ glues the pieces into $F(x)=\int_{-\infty}^x f$.
When to use
- You have computed $F_Y$ for $Y=g(X)$ and want $f_Y$.
- A problem states $F_X$ explicitly and asks for a density.
Typical mistake
- Differentiating a CDF that still has jumps (mixed / discrete component) and claiming a density exists on all of $\mathbb{R}$.
- Forgetting to treat intervals separately when $F$ is only piecewise smooth (e.g. at $0$ for $Y=X^2$).
8.2 Uniform distribution #
8.2.1 Overview #
Idea
Uniform on $[a,b]$ means “pick a point at random on the segment”: probability depends only on length, not on location inside $[a,b]$.
Definition. $X\sim\mathcal{U}([a,b])$ (with $a<b$) if it has density
CDF
Key property. For any subinterval $[c,c+\ell]\subset[a,b]$,
When to use
- No preferred location inside a known bounded interval (random angle, random seed on $[0,1]$, …).
- Building block for transforms (e.g. $X\sim\mathcal{U}([0,1])$, then $Y=X^n$).
Typical mistake
- Using density $1$ on $[a,b]$ when $b-a\neq 1$ (must be $1/(b-a)$).
- Confusing continuous Uniform with discrete Uniform on $\{1,\ldots,n\}$.
Example: Uniform interval probability
Goal: $X\sim\mathcal{U}([2,6])$. Find $\mathbb{P}[X\le 3]$ and $\mathbb{P}[3\le X\le 5]$.
Step 1: Length of support is $4$, so $f=\frac{1}{4}$ on $[2,6]$.
Step 2: $\mathbb{P}[X\le 3]=\int_2^3\frac{1}{4}\,dx=\frac{1}{4}=F_X(3)$.
Step 3: $\mathbb{P}[3\le X\le 5]=\frac{5-3}{4}=\frac{1}{2}$.
Check: $F_X(5)-F_X(3)=\frac{5-2}{4}-\frac{3-2}{4}=\frac{1}{2}$.
8.3 Exponential distribution #
8.3.1 Overview #
Idea
Exponential is the continuous analogue of Geometric: waiting time until the first “ring” of a memoryless alarm clock. Large waiting times are exponentially rare.
Definition. $T\sim\mathrm{Exp}(\lambda)$ with rate $\lambda>0$ if
CDF and tail
Memorylessness. For all $t,s\ge 0$,
Reason: $\mathbb{P}[T>t+s]/\mathbb{P}[T>t]=e^{-\lambda(t+s)}/e^{-\lambda t}=e^{-\lambda s}$.
When to use
- Waiting times / interarrival times with no aging (memoryless).
- Continuous analogue of Geometric (discrete memoryless law).
Typical mistake
- Confusing rate $\lambda$ with mean: $\mathbb{E}[T]=1/\lambda$, not $\lambda$.
- Writing density $\lambda e^{-\lambda x}$ for $x\in\mathbb{R}$ (support is $[0,\infty)$).
- Using $\mathbb{P}[T\ge t]=\lambda e^{-\lambda t}$ (that is the density, not the tail).
Example: Exponential waiting probability
Goal: $T\sim\mathrm{Exp}(2)$. Find $\mathbb{P}[T>1]$ and $\mathbb{P}[T>3\mid T>1]$.
Step 1: Tail formula: $\mathbb{P}[T>1]=e^{-2\cdot 1}=e^{-2}$.
Step 2: Memorylessness: $\mathbb{P}[T>3\mid T>1]=\mathbb{P}[T>2]=e^{-4}$.
Check: Directly, $\mathbb{P}[T>3]/\mathbb{P}[T>1]=e^{-6}/e^{-2}=e^{-4}$.
8.4 Normal distribution #
8.4.1 Overview #
Idea
Normal laws model “true value plus noise.” The density is a symmetric bell around the mean $m$; the variance $\sigma^2$ controls how wide the bell is. Linear images of Normals stay Normal — this is why the CLT (central limit theorem) limiting shape is so useful.
Definition. $X\sim\mathcal{N}(m,\sigma^2)$ with $m\in\mathbb{R}$ and $\sigma^2>0$ if
Standard Normal. $Z\sim\mathcal{N}(0,1)$ has density $\varphi$ and CDF $\Phi$:
Affine stability. If $X_1,\ldots,X_n$ are independent, $X_i\sim\mathcal{N}(m_i,\sigma_i^2)$, and $a_0,a_1,\ldots,a_n\in\mathbb{R}$, then
In particular, if $X\sim\mathcal{N}(0,1)$, then $m+\sigma X\sim\mathcal{N}(m,\sigma^2)$. Conversely, if $X\sim\mathcal{N}(m,\sigma^2)$, then
Three-sigma rule of thumb. Most mass sits in $[m-3\sigma,m+3\sigma]$:
which is independent of $(m,\sigma)$ after standardization.
When to use
- Measurement error / additive noise models.
- Any time you standardize to use a $\Phi$-table / software.
- Linear combinations of independent Normals (exact Normal, not only asymptotic). $\mathbb{P}[S<T]$ is $\mathbb{P}[S-T<0]$.
Typical mistake
- Writing $\mathcal{N}(m,\sigma)$ when the second parameter is variance $\sigma^2$ (check the course convention: Acciaio uses $\mathcal{N}(m,\sigma^2)$).
- Forgetting to square the coefficients in $\mathrm{Var}(\sum a_i X_i)=\sum a_i^2\sigma_i^2$.
- Treating $\Phi$ values as densities.
Example: standardize and use \(\Phi\)
Goal: $X\sim\mathcal{N}(2,9)$ (so $\sigma=3$). Approximate $\mathbb{P}[X\le 5]$ via $\Phi$.
Step 1: $Z=(X-2)/3\sim\mathcal{N}(0,1)$.
Step 2: $\mathbb{P}[X\le 5]=\mathbb{P}[Z\le 1]=\Phi(1)$.
Check: Numerically $\Phi(1)\approx 0.8413$.
Example: $\\mathbb{P}[S<T]$ for two independent Normals
Goal: $S\sim\mathcal{N}(-5,4^2)$ and $T\sim\mathcal{N}(10,3^2)$ independent. Compute $\mathbb{P}[S<T]$ and $\mathrm{Var}(S-2T)$. Which of these survive if you drop independence?
Which tool: Affine stability (§8.4): a linear image of independent Normals is Normal. Then standardize and read $\Phi$.
Step 1: $S-T\sim\mathcal{N}(-5-10,\,4^2+3^2)=\mathcal{N}(-15,25)$ under independence, so
Step 2: $S-2T\sim\mathcal{N}(-5-20,\,16+4\cdot 9)=\mathcal{N}(-25,52)$, hence $\mathrm{Var}(S-2T)=52$.
Step 3 (without independence): $\mathbb{E}[S-2T]=-25$ still holds (linearity never needs independence). The laws $\mathcal{N}(-15,25)$ and $\mathrm{Var}=52$ do not: variances add only under independence (or uncorrelation, not in this course). So $\mathbb{P}[S<T]$ via this Normal is not justified without independence.
Check: Always reduce $\mathbb{P}[S<T]$ to a probability for $S-T$. Do not try to integrate two separate densities unless you also have a joint.
8.5 Density of a transformed random variable #
8.5.1 Overview #
Idea
Knowing $f_X$ does not automatically give $f_{g(X)}$. First compute the CDF of $Y=g(X)$ by translating $\{g(X)\le y\}$ into a condition on $X$, then differentiate when the CDF is continuous and piecewise $C^1$.
Method (density of $Y=g(X)$)
- Compute $F_Y(y)=\mathbb{P}[g(X)\le y]$ (express the event in terms of $X$).
- If $F_Y$ is continuous and piecewise $C^1$, set $f_Y(y)=F_Y'(y)$ on each smooth piece (Theorem in §8.1.2).
Caveat. $g(X)$ need not be continuous. A constant map yields a discrete (Dirac) law with no density. The method needs $X$ and $g$ “nice enough.”
When to use
- Squaring, absolute values, powers, monotone maps of a continuous RV.
- Linear images of Normal (often faster via affine stability in §8.4).
Typical mistake
- Differentiating under the wrong branch when $g$ is not one-to-one (e.g. $Y=X^2$: both $-\sqrt{y}$ and $+\sqrt{y}$ contribute).
- Claiming $f_Y(y)=f_X(g^{-1}(y))$ without the Jacobian / chain-rule factor from differentiating $F_Y$.
Example: \(Y=X^2\) for standard Normal (chi-square with 1 d.f.)
Goal: $X\sim\mathcal{N}(0,1)$. Find the density of $Y=X^2$.
Step 1: For $y<0$, $F_Y(y)=0$. For $y\ge 0$,
Step 2: Differentiate for $y>0$. Chain rule and $\Phi'=\varphi$ give
For $y\le 0$, $f_Y(y)=0$.
Check: $f_Y\ge 0$ and $\int_0^\infty f_Y=1$ (Gamma / $\chi^2_1$ identity). Near $0^+$, $f_Y(y)\sim (2\pi y)^{-1/2}$ blows up — still integrable.
Example: \(Y=X^n\) for Uniform on \([0,1]\)
Goal: $X\sim\mathcal{U}([0,1])$, $n\in\mathbb{N}_{\ge 1}$. Density of $Y=X^n$.
Step 1: $Y\in[0,1]$. For $0<x\le 1$,
Step 2: Differentiate on $(0,1)$:
and $f_Y=0$ outside $[0,1]$.
Check: For $n=1$, recover Uniform. For $n=2$, $f_Y(x)=\frac{1}{2}x^{-1/2}$ on $(0,1]$.
Example: linear image of Normal (two routes)
Goal: $X\sim\mathcal{N}(0,1)$, $Y=2X+3$. Find the law of $Y$.
Route A (stability): $Y\sim\mathcal{N}(3,4)$ immediately.
Route B (CDF method): For all $y$,
Differentiate: $f_Y(y)=\varphi\!\bigl((y-3)/2\bigr)\cdot\frac{1}{2}$, which is the $\mathcal{N}(3,4)$ density.
Check: Mean $3$, variance $4$.
8.6 Expectation and variance (continuous) #
8.6.1 Expectation via the density #
Idea
Replace the discrete sum $\sum x\,\mathbb{P}[X=x]$ by the integral $\int x\,f(x)\,dx$. For a function $g(X)$, integrate $g(x)f(x)$ — you do not need the density of $g(X)$ first.
Definition (Nonnegative case). If $X$ is continuous with density $f$ and $X\ge 0$ a.s., set
Definition (Integrable case). $X$ is integrable if $\mathbb{E}[|X|]<\infty$. Then
Law of the unconscious statistician (LOTUS). If $\int |g(x)|f(x)\,dx<\infty$,
This is consistent with computing $\mathbb{E}[Y]$ from a density of $Y=g(X)$ when that density exists, and with the discrete formula when $Y$ is discrete.
Classical means
| Law | $\mathbb{E}[X]$ |
|---|---|
| $\mathcal{U}([a,b])$ | $(a+b)/2$ |
| $\mathrm{Exp}(\lambda)$ | $1/\lambda$ |
| $\mathcal{N}(m,\sigma^2)$ | $m$ |
Uniform: $\int_a^b x\cdot\frac{1}{b-a}\,dx=(a+b)/2$.
Exponential: integrate by parts $\int_0^\infty x\lambda e^{-\lambda x}\,dx=1/\lambda$.
Normal: write $X\stackrel{d}{=}m+\sigma Y$ with $Y$ standard; $\mathbb{E}[Y]=0$ because $y\varphi(y)$ is odd.
When to use
- Any continuous mean / moment computation.
- Prefer LOTUS over finding $f_{g(X)}$ when only $\mathbb{E}[g(X)]$ is needed.
Typical mistake
- Computing $\int g(y)f_X(y)\,dy$ with the wrong variable after a transform (mix $X$ and $Y$).
- Declaring $\mathbb{E}[X]$ for a non-integrable law (Cauchy — next block).
Example: mean of Uniform and Exponential
Goal: Verify $\mathbb{E}[X]=(a+b)/2$ for $X\sim\mathcal{U}([a,b])$ and $\mathbb{E}[T]=1/\lambda$ for $T\sim\mathrm{Exp}(\lambda)$.
Uniform: $\mathbb{E}[X]=\frac{1}{b-a}\int_a^b x\,dx=\frac{1}{b-a}\cdot\frac{b^2-a^2}{2}=\frac{a+b}{2}$.
Exponential: $\mathbb{E}[T]=\int_0^\infty x\lambda e^{-\lambda x}\,dx$. Parts: $u=x$, $dv=\lambda e^{-\lambda x}dx$ yields $\bigl[-x e^{-\lambda x}\bigr]_0^\infty+\int_0^\infty e^{-\lambda x}\,dx=1/\lambda$.
Check: Memoryless waiting with rate $2$ should average $1/2$.
8.6.2 Cauchy: expectation need not exist #
Idea
Heavy tails can make $\mathbb{E}[|X|]=\infty$. Then there is no usable mean — even symmetric “cancellations” in principal-value limits depend on how you cut the tails.
Definition (Cauchy). Density
Non-integrability.
Pathological limits. Different symmetric / asymmetric truncations give different finite limits for $\int_{-A}^{B} x/(\pi(1+x^2))\,dx$, so there is no natural value for “$\mathbb{E}[X]$”.
When to use
- Counterexample whenever someone claims “every continuous RV has a mean.”
- Warning that $\int x f(x)\,dx$ may fail to exist even if $f$ is even and nice-looking.
Typical mistake
- Claiming $\mathbb{E}[X]=0$ for Cauchy “by symmetry.” Symmetry alone does not define the integral when $\mathbb{E}[|X|]=\infty$.
8.6.3 Jensen’s inequality #
Idea
For a convex $g$, the graph lies above tangents: averaging first then applying $g$ underestimates averaging $g(X)$.
Theorem (Jensen). Let $g\colon\mathbb{R}\to\mathbb{R}$ be convex. If $X$ is continuous and $\mathbb{E}[X]$, $\mathbb{E}[g(X)]$ are well defined, then
When to use
- Comparing $\mathbb{E}[X^2]$ and $(\mathbb{E}[X])^2$ (variance nonnegative).
- Bounding $\mathbb{E}[e^{tX}]$, $\mathbb{E}[|X|]$, etc.
Typical mistake
- Reversing the inequality for concave $g$ (then $\ge$ becomes $\le$ after a sign flip / use $-g$).
- Applying Jensen when $\mathbb{E}[|X|]=\infty$.
Example: Jensen for \(g(x)=x^2\)
Goal: Deduce $\mathbb{E}[X^2]\ge(\mathbb{E}[X])^2$ when both sides exist.
Step 1: $x\mapsto x^2$ is convex.
Step 2: Jensen $\Rightarrow (\mathbb{E}[X])^2\le\mathbb{E}[X^2]$.
Check: Rearrange to $\mathrm{Var}(X)=\mathbb{E}[X^2]-(\mathbb{E}[X])^2\ge 0$.
8.6.4 Variance #
Idea
Variance is mean squared distance from the mean — same formula as discrete, with integrals replacing sums.
Definition. If $\mathbb{E}[X^2]<\infty$ and $m=\mathbb{E}[X]$,
The standard deviation is $\sigma_X=\sqrt{\mathrm{Var}(X)}$.
Proposition (basic properties). Assume $\mathbb{E}[X^2]<\infty$.
- $\mathrm{Var}(X)=\mathbb{E}[X^2]-(\mathbb{E}[X])^2$.
- $\mathrm{Var}(aX+\mu)=a^2\,\mathrm{Var}(X)$ for $a,\mu\in\mathbb{R}$.
- If $X_1,\ldots,X_n$ are pairwise independent with finite second moments and $S=\sum_i a_i X_i$, then $\mathrm{Var}(S)=\sum_i a_i^2\,\mathrm{Var}(X_i)$.
Classical variances
| Law | $\mathrm{Var}(X)$ |
|---|---|
| $\mathcal{U}([a,b])$ | $(b-a)^2/12$ |
| $\mathrm{Exp}(\lambda)$ | $1/\lambda^2$ |
| $\mathcal{N}(m,\sigma^2)$ | $\sigma^2$ |
Uniform sketch: $Y\sim\mathcal{U}([0,1])$ has $\mathbb{E}[Y^2]=\int_0^1 x^2\,dx=1/3$, mean $1/2$, so $\mathrm{Var}(Y)=1/3-1/4=1/12$. Then $X=a+(b-a)Y$ gives factor $(b-a)^2$.
Exponential: $\mathbb{E}[X^2]=2/\lambda^2$ by parts twice; subtract $(1/\lambda)^2$.
Normal: reduce to standard $Y$; integrate by parts to get $\mathbb{E}[Y^2]=1$, then scale by $\sigma^2$.
When to use
- Spread / standardization / CLT assumptions ($\mathrm{Var}(X_1)<\infty$).
- Scaling rules under affine maps.
Typical mistake
- Using $\mathrm{Var}(aX+\mu)=a\,\mathrm{Var}(X)$ (missing the square).
- Adding variances without an independence (or pairwise uncorrelation) hypothesis.
Example: variance of Exponential
Goal: Show $\mathrm{Var}(X)=1/\lambda^2$ for $X\sim\mathrm{Exp}(\lambda)$.
Step 1: $\mathbb{E}[X]=1/\lambda$.
Step 2: $\mathbb{E}[X^2]=\int_0^\infty x^2\lambda e^{-\lambda x}\,dx$. Parts twice $\Rightarrow\mathbb{E}[X^2]=2/\lambda^2$.
Step 3: $\mathrm{Var}(X)=2/\lambda^2-(1/\lambda)^2=1/\lambda^2$.
Check: Larger $\lambda$ (faster ringing) $\Rightarrow$ smaller mean and smaller variance.
8.7 Method map (quick reference) #
| Task | Tool |
|---|---|
| Interval probability for continuous $X$ | $\int_a^b f_X$ (endpoints irrelevant) |
| Density from a smooth CDF | $f=F'$ on smooth pieces (§8.1.2) |
| Flat on an interval | Uniform (§8.2) |
| Memoryless waiting time | Exponential (§8.3) |
| Bell / measurement noise / linear Normal algebra | Normal + standardize (§8.4) |
| $\mathbb{P}[S<T]$ for independent Normals | law of $S-T$, then $\Phi$ (§8.4) |
| Law of $Y=g(X)$ | CDF of $Y$, then differentiate (§8.5) |
| $\mathbb{E}[g(X)]$ without $f_Y$ | LOTUS $\int g f_X$ (§8.6) |
| Mean / variance cheat sheet | Uniform $(a+b)/2$, $(b-a)^2/12$; Exp $1/\lambda$, $1/\lambda^2$; Normal $m$, $\sigma^2$ |
| “Does every continuous RV have a mean?” | Cauchy counterexample (§8.6.2) |
| Convex comparison | Jensen (§8.6.3) |
8.8 Exercises #
Exercise 1. $X\sim\mathcal{U}([1,5])$. Compute $\mathbb{P}[2\le X\le 4]$ and $F_X(3)$.
Solution. Goal: Uniform probabilities via length ratios and the Uniform CDF. Step 1: length of $[2,4]$ over length of $[1,5]$ gives $\mathbb{P}=2/4=1/2$. Step 2: $F_X(3)=(3-1)/(5-1)=1/2$. Check: density $1/4$ on $[1,5]$, so $\int_2^4\frac14\,dx=1/2$.
Exercise 2. $X\sim\mathcal{U}([0,1])$. Find the density of $Y=-\log X$ (for $X\in(0,1]$).
Solution. Goal: $X\sim\mathcal{U}([0,1])$, $Y=-\log X$. Identify the law of $Y$. Step 1 (support). $X\in(0,1]$ a.s. $\Rightarrow Y=-\log X\in[0,\infty)$. Step 2 (CDF). For $y>0$,
because $\mathbb{P}[X\ge u]=1-u$ for $u\in[0,1]$. Step 3 (density). $F_Y$ is continuous, $C^1$ on $(0,\infty)$, and $F_Y'(y)=e^{-y}$. Hence $Y\sim\mathrm{Exp}(1)$. Check: $\mathbb{E}[Y]=\int_0^1 (-\log x)\,dx=1$, matching $\mathrm{Exp}(1)$.
Exercise 3. Let $X$ have density $f(x)=c\,x$ on $[0,2]$ (and $0$ elsewhere). Find $c$, then $\mathbb{E}[X]$ and $\mathrm{Var}(X)$.
Solution. Goal: normalize a triangular-type density and compute moments. Step 1: $\int_0^2 c x\,dx=2c=1\Rightarrow c=1/2$. Step 2: $\mathbb{E}[X]=\int_0^2 x\cdot\frac{x}{2}\,dx=\frac{4}{3}$. Step 3: $\mathbb{E}[X^2]=\int_0^2 x^2\cdot\frac{x}{2}\,dx=2$, so $\mathrm{Var}(X)=2-(4/3)^2=2/9$. Check: $f\ge 0$ and integrates to $1$; $\mathrm{Var}>0$.
Chapter 9 — Joints, marginals & asymptotics (Gemeinsame Verteilungen, GGZ, ZGWS) #
Joint densities, marginals, independence; then the LLN / GGZ (Gesetz der großen Zahlen) and the CLT / ZGWS (zentraler Grenzwertsatz).
9.1 Joint densities #
9.1.1 Overview #
Idea
A joint density is a height function on the plane: the probability that $(X,Y)$ lands in a small rectangle is approximately $f(x,y)\,dx\,dy$. Global probabilities are double integrals.
Definition. Random variables $X,Y\colon\Omega\to\mathbb{R}$ have a continuous joint distribution if there exists $f\colon\mathbb{R}^2\to\mathbb{R}_+$ such that for all $-\infty\le a\le a'\le\infty$ and $-\infty\le b\le b'\le\infty$,
Such an $f$ is a joint density of $(X,Y)$ (written $f_{X,Y}$).
Normalization. Necessarily
Conversely, any nonnegative integrable $f$ with integral $1$ is a joint density for some pair $(X,Y)$ on a suitable space.
When to use
- Two continuous measurements at once (position in the plane, two waiting times, …).
- Computing $\mathbb{P}[(X,Y)\in R]$ for a rectangle — or, by approximation / integration, for nicer regions.
Typical mistake
- Treating $f(x,y)$ as a probability.
- Integrating only once when the event constrains both coordinates.
Example: Uniform in the unit square
Goal: Interpret $f(x,y)=\mathbf{1}_{[0,1]^2}(x,y)$.
Step 1: $\iint_{[0,1]^2} 1\,dx\,dy=1$, so $f$ is a joint density.
Step 2: For a rectangle $R=(a,a')\times(b,b')\subset[0,1]^2$, $\mathbb{P}[(X,Y)\in R]=\mathrm{Area}(R)$.
Check: $(X,Y)$ is a uniform random point in the square.
Example: Uniform in the unit disk
Goal: Let $D=\{(x,y):x^2+y^2\le 1\}$ and $f(x,y)=\frac{1}{\pi}\mathbf{1}_D(x,y)$.
Step 1: Area of $D$ is $\pi$, so $\iint f=1$.
Step 2: For rectangles inside $D$, $\mathbb{P}[(X,Y)\in R]=\mathrm{Area}(R)/\pi=\mathrm{Area}(R)/\mathrm{Area}(D)$.
Check: Uniform point in the disk — coordinates will not be independent (§9.3).
9.2 Marginal densities #
9.2.1 Overview #
Idea
To forget $Y$, integrate the joint density over all $y$. The slice-integral is the marginal density of $X$.
Formulas. If $f_{X,Y}$ is a joint density, then $X$ and $Y$ are continuous with
Reason: $F_X(a)=\mathbb{P}[X\le a]=\int_{-\infty}^a\bigl(\int_{-\infty}^{\infty} f(x,y)\,dy\bigr)dx$.
When to use
- “What is the law of $X$ alone?” given a joint density.
- Checking independence via $f_{X,Y}\stackrel{?}{=}f_X f_Y$.
Typical mistake
- Using the joint formula restricted to a curve without integrating (confusing with conditional densities later).
- Forgetting the domain constraints inside the indicator (disk example).
Example: Marginals on the square
Goal: $f_{X,Y}=\mathbf{1}_{[0,1]^2}$. Find $f_X$.
Step 1: For $x\in[0,1]$, $f_X(x)=\int_0^1 1\,dy=1$; outside, $0$.
Step 2: So $X\sim\mathcal{U}([0,1])$, and similarly $Y\sim\mathcal{U}([0,1])$.
Check: Matches product structure in §9.3.
Example: Marginals on the disk
Goal: $f_{X,Y}=\frac{1}{\pi}\mathbf{1}_{x^2+y^2\le 1}$. Find $f_X$.
Step 1: For $|x|\le 1$, $y$ runs over $[-\sqrt{1-x^2},\sqrt{1-x^2}]$, so
For $|x|>1$, $f_X(x)=0$. Likewise $f_Y(y)=\frac{2}{\pi}\sqrt{1-y^2}$.
Check: Semicircle shape — not Uniform on $[-1,1]$.
9.3 Independence (continuous) #
9.3.1 Overview #
Idea
Independence means the joint height factors into a product of marginal heights: knowing $X$ does not reshape the density of $Y$.
Theorem (Independence criteria). Let $X,Y$ be continuous with densities $f_X,f_Y$. The following are equivalent:
- $X,Y$ are independent;
- $(X,Y)$ is jointly continuous with $f_{X,Y}(x,y)=f_X(x)\,f_Y(y)$;
- For all (suitable) $g,h\colon\mathbb{R}\to\mathbb{R}$,
whenever the expectations exist.
Consequence. Independent continuous RVs are automatically jointly continuous (product density).
Expectation of a function of the pair. If $f_{X,Y}$ exists and the integral is well defined,
Linearity (jointly continuous case). Applying this to $g(x,y)=ax+\mu y$ and using marginals recovers
When to use
- Prove / disprove independence by comparing $f_{X,Y}$ to $f_X f_Y$.
- Factor double integrals under independence.
- Compute $\mathbb{E}[g(X,Y)]$ when only the joint density is known.
Typical mistake
- Concluding independence from “both marginals look Uniform” (disk: marginals are not Uniform, and even if they were nice, the joint may not factor).
- Checking equality $f_{X,Y}=f_X f_Y$ only on part of the support.
Example: Square \(\Rightarrow\) independent coordinates
Goal: $f_{X,Y}=\mathbf{1}_{[0,1]^2}$. Decide independence.
Step 1: $f_X(x)=\mathbf{1}_{[0,1]}(x)$, $f_Y(y)=\mathbf{1}_{[0,1]}(y)$.
Step 2: $f_X(x)f_Y(y)=\mathbf{1}_{[0,1]^2}(x,y)=f_{X,Y}(x,y)$.
Check: Independent Uniform$[0,1]$ coordinates.
Example: Disk \(\Rightarrow\) dependent coordinates
Goal: Show that uniform-in-disk coordinates are not independent.
Step 1: $f_{X,Y}=\frac{1}{\pi}\mathbf{1}_D$, while $f_X(x)=\frac{2}{\pi}\sqrt{1-x^2}$ (and likewise $f_Y$).
Step 2: Product $f_X f_Y$ is not equal to $\frac{1}{\pi}\mathbf{1}_D$ (different functional forms / support structure).
Intuition: If $X>\sqrt{3}/2$, then $Y$ is forced into a short interval $[-\tfrac12,\tfrac12]$ — information about $X$ constrains $Y$.
Check: Dependence is geometric, not a calculation error.
Example: $\\mathbb{P}[X>2Y]$ over a triangle
Goal: $f_{X,Y}(x,y)=\frac32(x^2+y^2)$ on $[0,1]^2$ (and $0$ elsewhere). Compute $\mathbb{P}[X>2Y]$. (Normalizing $C$ so that $\iint C(x^2+y^2)=1$ is §9.1: here $C=3/2$ is already the density.)
Which tool: Double integral of the joint over the region $\{x>2y\}\cap[0,1]^2$, i.e. $0\le x\le 1$ and $0\le y\le x/2$ — not the full square.
Step 1: Sketch: below the line $y=x/2$ in the unit square.
Step 2:
Check: $13/64=0.203125$. Independence would have allowed $f_X f_Y$, but $x^2+y^2$ does not factor, so you must integrate the joint. The inner limit is $x/2$, not $1$.
9.4 Law of large numbers (GGZ) #
9.4.1 Overview #
Idea
Flip many i.i.d. copies and average: for almost every outcome $\omega$, the average settles at the true mean. Randomness washes out in the long-run average.
Setup. Fix i.i.d. $X_1,X_2,\ldots$ with common CDF $F$, and write
Theorem (Strong law of large numbers). If $\mathbb{E}[|X_1|]<\infty$ and $m=\mathbb{E}[X_1]$, then
Meaning of “a.s.”. Define
Then $E$ is an event and $\mathbb{P}[E]=1$: the exceptional outcomes where the average fails have probability zero.
Remark. Only $X_1$ appears in the hypothesis because identical distribution passes finite mean to every $X_i$.
When to use
- Justifying “sample mean $\approx$ expectation” for large $n$.
- Bernoulli frequency $\to p$; Exponential sample mean $\to 1/\lambda$.
Typical mistake
- Thinking LLN gives the rate of fluctuations (that is CLT: order $1/\sqrt{n}$).
- Applying LLN without an integrability assumption (Cauchy averages do not settle to a mean).
Example: Bernoulli frequencies
Goal: $X_i$ i.i.d. Bernoulli$(p)$. What does LLN say?
Step 1: $\mathbb{E}[X_1]=p<\infty$.
Step 2: $\bar X_n\to p$ a.s. — the empirical success frequency converges to $p$.
Check: Matches the frequentist reading of $p$.
Example: Exponential means
Goal: $T_i$ i.i.d. $\mathrm{Exp}(\lambda)$. Limit of $\bar T_n$?
Step 1: $\mathbb{E}[T_1]=1/\lambda$.
Step 2: $\bar T_n\to 1/\lambda$ a.s.
Check: Large samples recover the mean waiting time.
9.5 Central limit theorem (ZGWS) #
9.5.1 Overview #
Idea
LLN says the average goes to $m$. CLT answers “how far is it typically?” After $\sqrt{n}$-scaling, fluctuations look standard Normal — even when the $X_i$ themselves are not Normal.
Gaussian warm-up. If $X_i$ are i.i.d. $\mathcal{N}(m,\sigma^2)$, then exactly
so typical size is $\sigma/\sqrt{n}$. The standardized sum
is exactly $\mathcal{N}(0,1)$ for every $n$.
Theorem (Central limit theorem). Assume $\mathbb{E}[X_1^2]<\infty$, write $m=\mathbb{E}[X_1]$, $\sigma^2=\mathrm{Var}(X_1)>0$, and $S_n=X_1+\cdots+X_n$. Then for every $a\in\mathbb{R}$,
Equivalent average form.
When to use
- Approximate $\mathbb{P}[S_n\le t]$ or $\mathbb{P}[\bar X_n\in I]$ for large $n$ by standardizing and reading $\Phi$.
- Binomial tails at $n\approx 100$: write $X$ as a sum of i.i.d. Bernoullis, then CLT (exam pattern in §10.5.5).
- Build confidence intervals / justify Normal error models later in statistics.
Typical mistake
- Forgetting to standardize (using $S_n-nm$ without dividing by $\sigma\sqrt{n}$).
- Using CLT when $\mathrm{Var}(X_1)=\infty$.
- Treating the CLT statement as almost-sure convergence of the standardized sum (it is convergence in distribution / CDF convergence to $\Phi$).
Example: CLT for Binomial — numerical $\\Phi$
Goal: $X\sim\mathrm{Bin}(100,0.9)$. Approximate $\mathbb{P}[X\ge 97]$ with the CLT and a $\Phi$-table (exam style).
Step 1: Write $X=X_1+\cdots+X_{100}$ with $X_i$ i.i.d. Bernoulli$(0.9)$. Then $m=0.9$, $\sigma^2=0.9\cdot 0.1=0.09$, so $\sigma\sqrt{n}=3$ and $nm=90$.
Step 2: $\mathbb{P}[X\ge 97]=1-\mathbb{P}[X\le 96]$. Standardize the CDF form of the CLT:
Step 3: A standard-normal table gives $\Phi(2)\approx 0.9772$, hence
Check: Same recipe for any threshold $k$: $\mathbb{P}[X\le k]\approx\Phi\bigl((k-np)/\sqrt{np(1-p)}\bigr)$. Using $k$ vs $k-1$ (continuity) can move the answer by about one integer; if a $5\%$ decision is close, say so. This computation is the engine of the one-sided test in §10.5.5.
Example: numerical shape of \(\Phi\)
Goal: Visualize that the limiting CDF is the standard Normal CDF $\Phi$.
Step 1: The theorem says the CDF of $Z_n=(S_n-nm)/(\sigma\sqrt{n})$ approaches $\Phi$ pointwise.
Step 2: The density story (when densities exist) is that laws of $Z_n$ approach $\varphi$ — use $\Phi$ for probabilities.
9.6 Method map (quick reference) #
| Task | Tool |
|---|---|
| $\mathbb{P}$ for a rectangle in the plane | Double integral of $f_{X,Y}$ (§9.1) |
| $\mathbb{P}[X>2Y]$ (or other region) | Joint integral; inner limit from the line, not the full square |
| Law of one coordinate | Marginal $f_X=\int f_{X,Y}\,dy$ (§9.2) |
| Test independence | $f_{X,Y}\stackrel{?}{=}f_X f_Y$ (§9.3) |
| $\mathbb{E}[g(X,Y)]$ | $\iint g\,f_{X,Y}$ |
| Long-run average $\to$ mean | LLN / GGZ (§9.4) |
| Fluctuation probabilities for large $n$ | CLT / ZGWS: standardize, then a $\Phi$-table (§9.5) |
| Exact Normal fluctuations | i.i.d. Normal case (exact $\mathcal{N}(0,1)$ after standardization) |
| Uniform square vs disk | Square: independent; disk: dependent |
9.7 Exercises #
Exercise 1. $f_{X,Y}(x,y)=1$ on $[0,1]^2$. Compute $\mathbb{P}[X\le\tfrac12,\,Y\le\tfrac12]$.
Solution. Goal: rectangle probability under the uniform joint density on the unit square. Step 1: the event is $[0,1/2]\times[0,1/2]$, area $1/4$. Step 2: $\mathbb{P}=\iint_{[0,1/2]^2} 1\,dx\,dy=1/4$. Check: length $\times$ length under independence of coordinates.
Exercise 2. $f_{X,Y}(x,y)=c\,xy$ on $[0,1]^2$ (zero elsewhere). Find $c$, the marginal $f_X$, and decide independence.
Solution. Goal: normalize, marginalize, and test factorization. Step 1: $\int_0^1\int_0^1 c xy\,dx\,dy=c/4=1\Rightarrow c=4$. Step 2: $f_X(x)=\int_0^1 4xy\,dy=2x$ on $[0,1]$. Similarly $f_Y(y)=2y$. Step 3: product $f_X f_Y=4xy=f_{X,Y}$ on the square $\Rightarrow$ independent. Check: both margins integrate to $1$; factorization holds on the whole support.
Exercise 3. $X_i$ i.i.d. with $\mathbb{E}[X_1]=2$, $\mathrm{Var}(X_1)=4$. Approximate $\mathbb{P}[\bar X_{64}>2.25]$.
Solution. Goal: Approximate $\mathbb{P}[\bar X_{64}>2.25]$ when $m=2$, $\sigma^2=4$. Step 1: CLT uses $Z_n=\sqrt{n}\,(\bar X_n-m)/\sigma$. Step 2: Here $n=64$, $\sigma=2$, so
Step 3: $\bar X_{64}>2.25\Leftrightarrow Z_{64}>1$. Step 4: $\mathbb{P}[Z_{64}>1]\approx 1-\Phi(1)$. Check: Same as $\mathbb{P}[S_{64}>64\cdot 2.25]=\mathbb{P}[S_{64}>144]$, since $S_{64}-128$ standardized by $\sigma\sqrt{n}=2\cdot 8=16$ gives threshold $(144-128)/16=1$.
Chapter 10 — Statistics (Statistik) #
From a parametric probabilistic model and observed data, estimate unknown parameters, quantify uncertainty with confidence intervals, and decide between competing hypotheses.
10.1 Parameter estimation overview #
10.1.1 Overview #
Idea
A parametric model is a family of probability laws indexed by $\theta$. Data are one draw from that family. Estimation asks: which $\theta$ makes the observed sample look most plausible?
Definition (parametric model, parametric model / parametrisches Modell) We study a model given by i.i.d. random variables $X_1,\ldots,X_n$ whose common distribution depends on a real parameter $\theta$ (or several parameters $\theta_1,\theta_2,\ldots$). Typical discrete families:
- Bernoulli($p$), $p\in[0,1]$
- Geometric($p$), $p\in[0,1]$
- Poisson($\lambda$), $\lambda>0$
Typical continuous families:
- Uniform$[0,\theta]$, $\theta\ge 0$
- Exponential($\lambda$), $\lambda>0$
- Normal($m,\sigma^2$), $m\in\mathbb{R}$, $\sigma^2>0$
Definition (realization / Realisierung) A realization is a vector $x=(x_1,\ldots,x_n)\in\mathbb{R}^n$ of observed values for $(X_1,\ldots,X_n)$. The PVK phrase: “mögliche Werte, die bei einem Zufallsexperiment herauskommen.”
Main question Given $x$, can we estimate the underlying parameter(s)? Write an estimator as a function of the data, $ \widehat{\theta}=\widehat{\theta}(x_1,\ldots,x_n). $ When the same formula is applied to the random sample, one also writes $\widehat{\theta}(X_1,\ldots,X_n)$ — that random variable has a sampling distribution used later for intervals and tests.
When to use
- The exam states “i.i.d. with unknown parameter $\theta$” and asks for an estimator, CI (confidence interval), or test.
- You are told the family (Bernoulli, Normal, …) but not the numerical value of $\theta$.
Typical mistake
- Treating $\theta$ itself as random. In the classical setup of this course, $\theta$ is fixed but unknown; randomness sits in the sample (and therefore in $\widehat{\theta}$, interval endpoints, and the decision $d$).
Example: eight packet successes — three jobs, one model
Goal: Given data, set up the Bernoulli model and see that MLE, CI, and test reuse the same $L$ for three different exam questions.
Situation: A link either delivers a packet ($1$) or drops it ($0$). You observe $n=8$ independent trials
So $\|x\|=5$ successes.
Which tool: None yet — first write the family. The exam then picks one of three jobs.
Step 1: Model $X_1,\ldots,X_8$ i.i.d. Bernoulli($p$), $p\in[0,1]$. The likelihood of this tuple is
Step 2: Three questions that all start from this $L_x(p)$:
- Point estimate: which $p$ maximizes $L_x$? → MLE, §10.2.
- Uncertainty: how far might that guess be from the true $p$? → CI, §10.4 (the exact formula there is for a Normal mean; Bernoulli uses the same idea via the sampling law of $\overline{X}$).
- Decision: is $p=1/2$ compatible with these data, or not? → test, §10.5.
Check: You do not pick a new model for each question. Write $L_x$ once, then either maximize it, wrap an interval around $\widehat{p}$, or compare $L_x(p_0)$ to $L_x(p_1)$.
10.1.2 Estimator vs estimate #
Idea
Keep the random/non-random distinction sharp: the estimator is the formula (a random variable once applied to $X$); the estimate is the number you get after plugging in $x$.
Definition
- An estimator is a measurable function $T=T(X_1,\ldots,X_n)$ of the sample (e.g. $\overline{X}$, $\max_i X_i$).
- An estimate is the realized number $T(x)$ for observed data $x$.
In this course the default construction for $T$ is the MLE (maximum likelihood estimator) $\widehat{\theta}(X)$. Later, confidence intervals and tests are built from the sampling distribution of $T$ under the true $\theta$.
When to use
- Any exam wording that mixes “Schätzer” (random) and a numerical “Schätzwert”.
Typical mistake
- Writing $\mathbb{P}[\widehat{\theta}=5/8]$ after $\widehat{\theta}(x)=5/8$ has already been computed from fixed data — that probability is about the procedure before seeing $x$, not about a constant.
Example: estimator vs estimate on the same packets
Goal: On $x=(1,0,1,1,0,1,0,1)$, separate the random formula from the number $5/8$.
Which tool: Vocabulary only — you need this split before CIs (the interval endpoints are random until $x$ is plugged in).
Step 1 (estimator): The MLE formula is $\widehat{p}(X)=\overline{X}$. Before seeing data this is random: $8\overline{X}\sim\mathrm{Bin}(8,p)$, so $\widehat{p}$ still has a sampling distribution that depends on the unknown $p$.
Step 2 (estimate): Plug in the observed $x$:
That is a number, not a random variable. Writing $\mathbb{P}[\widehat{p}=5/8]$ after this plug-in is meaningless — $5/8$ is already fixed.
Check: The question “how far might $5/8$ be from the true $p$?” is not answered by computing a second point estimate. It needs the law of $\overline{X}$ (confidence interval in §10.4).
10.2 MLE discrete #
10.2.1 Likelihood and MLE (discrete) #
Idea
For discrete i.i.d. data, the likelihood is simply the probability of seeing exactly the observed tuple under parameter $\theta$. The MLE is the $\theta$ that makes that probability as large as possible — “which coin bias would have made this sequence most likely?”
Definition (likelihood / Likelihood-Funktion) Let $X_1,\ldots,X_n$ be i.i.d. discrete on a finite or countable set $E$, with $ \mathbb{P}[X_i=x]=p_\theta(x),\qquad x\in E. $ For a realization $x=(x_1,\ldots,x_n)\in E^n$, the likelihood is $ L(\theta)=L_x(\theta)=\mathbb{P}[X_1=x_1,\ldots,X_n=x_n]. $ Under i.i.d., this factors as $ L_x(\theta)=p_\theta(x_1)\cdots p_\theta(x_n). $
Definition (maximum likelihood estimator / Maximum-Likelihood-Schätzer) The MLE $\widehat{\theta}=\widehat{\theta}(x)$ is a parameter value maximizing the likelihood: $ L_x(\widehat{\theta})=\max_\theta L_x(\theta). $
Rule (log-likelihood trick) Products become sums under $\log$. Define $\ell(\theta)=\log L_x(\theta)$ (any base; natural log is fine). Critical points of $\ell$ are the same as those of $L$ where $L>0$. The PVK checklist:
- Write the joint pmf → $L_x(\theta)$.
- Pass to $\log L$.
- Set $\partial\log L/\partial\theta=0$.
- Solve for $\theta$; call the solution $\widehat{\theta}$.
- Evaluate numerically if data are given.
- (Sanity) check boundaries / second derivative if the critical point is not obviously a max.
When to use
- Discrete i.i.d. family with explicit $p_\theta(x)$ (Bernoulli, Binomial counts via sum, Geometric, Poisson).
- Exam asks for “Maximum-Likelihood-Schätzer” or “MLE”.
Typical mistake
- Maximizing $L$ with respect to the data instead of $\theta$. The sample is fixed; $\theta$ is the variable.
- Forgetting support constraints (e.g. $p\in[0,1]$, $\lambda>0$) and reporting a critical point outside the parameter space.
- Writing $L$ as a sum instead of a product for independent observations.
Example: Bernoulli MLE from the packet sample
Goal: Compute $\widehat{p}$ for the packet data $x=(1,0,1,1,0,1,0,1)$ from §10.1. This is the point-estimate job: maximize $L_x$.
Which tool: MLE — the exam says “estimate $p$” / “Maximum-Likelihood-Schätzer”, not “interval” or “test”.
Step 1: $n=8$, $\|x\|=5$. Joint pmf / likelihood
(Same product you would write for general $n$: $L_x(p)=p^{\|x\|}(1-p)^{n-\|x\|}$.)
Step 2: Log-likelihood
Step 3: Derivative and critical point
Set $\ell'(p)=0$: $5(1-p)=3p$, so $5=8p$, hence
What it means: Among all coin biases $p\in[0,1]$, $p=5/8$ makes this sequence of 5 successes and 3 failures most probable. It is not “the probability that $p$ equals $5/8$”.
Check: $\ell''(p)=-5/p^2-3/(1-p)^2<0$, so a maximum. If the sample had been all zeros, $\ell$ is decreasing on $(0,1]$ and the max is the boundary $p=0$, which still equals $\overline{x}$. Same formula if you only observe the Binomial count $S=5$ in $8$ trials: $\binom{8}{5}$ does not depend on $p$.
10.2.2 Bernoulli ↔ Binomial reduction #
Idea
For i.i.d. Bernoulli trials, the likelihood depends on the data only through the sufficient statistic $S=\sum X_i\sim\mathrm{Binomial}(n,p)$. Maximizing $L$ in the $n$-tuple model is the same as maximizing the Binomial pmf in $S$.
Formula $ \mathbb{P}[S=s]=\binom{n}{s}p^s(1-p)^{n-s}. $ The binomial coefficient does not depend on $p$, so $ \widehat{p}=\frac{s}{n} $ whether you start from $(x_1,\ldots,x_n)$ or from the single count $s$.
When to use
- Problem gives only “$s$ successes in $n$ trials”.
Typical mistake
- Treating $\binom{n}{s}$ as part of the parameter-dependent piece and trying to “maximize” it.
Example: Poisson MLE from event counts
Goal: $X_1,\ldots,X_5$ i.i.d. Poisson($\lambda$), $\lambda>0$. Observed counts of rare events in five time slots: $x=(2,0,1,3,1)$. Find $\widehat{\lambda}$.
Which tool: MLE for a Poisson mean / rate. You are asked to estimate $\lambda$, not to test a claimed value.
Step 1: $\sum x_i=7$, $n=5$. Joint pmf
The factorial denominator does not depend on $\lambda$.
Step 2: $\ell(\lambda)=-5\lambda+7\log\lambda-\text{(const)}$.
Step 3: $\ell'(\lambda)=-5+7/\lambda=0$ ⇒
What it means: $\widehat{\lambda}=1.4$ is the event rate (mean count per slot) that makes these five numbers most likely. It is not a probability, and it is not $\mathbb{P}[X=7/5]$.
Check: $\ell''(\lambda)=-7/\lambda^2<0$, so a maximum. Same recipe for general $n$: $\widehat{\lambda}=\overline{x}$.
Example: Geometric MLE from waiting times
Goal: $X_i$ i.i.d. Geometric($p$) with $\mathbb{P}[X_i=k]=(1-p)^{k-1}p$ for $k=1,2,\ldots$ (trials until first success). Observed waits $x=(4,1,2,6,2)$. Find $\widehat{p}$.
Which tool: MLE for a success probability from waiting times — not from a fixed number of Bernoulli trials (that was $\widehat{p}=\overline{x}$).
Step 1: $n=5$, $\sum x_i=15$. Likelihood
Step 2: $\ell(p)=5\log p+10\log(1-p)$.
Step 3: $\ell'(p)=5/p-10/(1-p)=0$ ⇒ $5(1-p)=10p$ ⇒ $5=15p$, so
What it means: Average wait $\overline{x}=3$ trials per success, so the fitted success probability is $1/3$. Larger waits ⇒ smaller $\widehat{p}$.
Check: Matches the mean formula $\mathbb{E}[X_i]=1/p$. Same general recipe: $\widehat{p}=n/\sum x_i=1/\overline{x}$.
10.3 MLE continuous #
10.3.1 Likelihood via densities #
Idea
Continuous outcomes have probability zero for any exact tuple, so replace the joint pmf by the joint density. Maximizing the product of densities still picks the parameter that concentrates the most probability mass near the observed points.
Definition (continuous likelihood) Let $X_1,\ldots,X_n$ be i.i.d. continuous with density $f_\theta$. For a realization $x\in\mathbb{R}^n$, $ L(\theta)=L_x(\theta)=f_\theta(x_1)\cdots f_\theta(x_n). $ Intuitively $L_x(\theta)$ scales the probability of a small box around $x$; the constant volume factor does not affect the maximizing $\theta$.
Definition (MLE, possibly multiparameter) $ L_x(\widehat{\theta})=\max_\theta L_x(\theta). $ If the model has several parameters $(\theta_1,\theta_2,\ldots)$, maximize jointly: $ L_x(\widehat{\theta}_1,\widehat{\theta}_2,\ldots)=\max_{\theta_1,\theta_2,\ldots} L_x(\theta_1,\theta_2,\ldots). $
When to use
- Continuous i.i.d. family with an explicit density (Normal, Exponential, Uniform$[0,\theta]$, …).
- Same log-trick as in the discrete case; use partial derivatives if there are several parameters.
Typical mistake
- Using the CDF instead of the density in $L$.
- For Uniform$[0,\theta]$, differentiating as if the support did not depend on $\theta$ (the max is typically on the boundary $\widehat{\theta}=\max_i x_i$, not from $\ell'=0$).
- Confusing the MLE variance $\widehat{\sigma}^2=\frac1n\sum(x_i-\widehat{m})^2$ with the unbiased sample variance that divides by $n-1$.
Example: Normal mean and variance from four measurements
Goal: $X_1,\ldots,X_4$ i.i.d. $\mathcal{N}(m,\sigma^2)$. Observed $x=(2,4,4,6)$. Find $(\widehat{m},\widehat{\sigma}^2)$.
Which tool: Joint MLE for both Normal parameters. If the exam says $\sigma^2$ is known, you only maximize in $m$ and still get $\widehat{m}=\overline{x}$.
Step 1: $n=4$. Density product
Step 2: Log-likelihood (drop additive constants independent of $(m,\sigma^2)$)
Step 3: Partial derivatives (treat $\sigma^2$ as one variable). Write $S(m)=\sum_{i=1}^4(x_i-m)^2$. Then $\ell=-2\log(\sigma^2)-\frac{1}{2\sigma^2}S(m)$, so
Set $\partial\ell/\partial m=0$: $\sum(x_i-m)=0$, hence $\widehat{m}=\overline{x}$:
Set $\partial\ell/\partial\sigma^2=0$: $2/\sigma^2=S(\widehat{m})/(2(\sigma^2)^2)$, so $\widehat{\sigma}^2=S(\widehat{m})/4$ (divide by $n=4$, not $n-1$)
What it means: The Normal that concentrates most density near these four points is $\mathcal{N}(4,2)$. The unbiased sample variance $s^2=8/3$ is a different criterion — exams in this course want $1/n$ unless they ask for unbiasedness.
Check: If $\sigma^2=1$ is known (CI setup in §10.4), the same $\partial\ell/\partial m$ still gives $\widehat{m}=\overline{x}=4$; you just do not estimate $\sigma^2$.
Remark (bias of $\widehat{\sigma}^2$) Under $\mathcal{N}(m,\sigma^2)$, $ \mathbb{E}[\widehat{\sigma}^2]=\frac{n-1}{n}\sigma^2\neq\sigma^2 $ for finite $n$. The MLE is still the maximizer of $L$; unbiasedness is a different criterion. The usual unbiased estimator divides by $n-1$. Exams in this course typically want the MLE formula with $1/n$ unless they ask for unbiasedness explicitly.
Example: Exponential rate from waiting times
Goal: $X_1,\ldots,X_5$ i.i.d. Exponential($\lambda$) with density $f_\lambda(x)=\lambda e^{-\lambda x}$ for $x>0$. Observed waits $x=(0.4,1.2,0.8,0.6,2.0)$. Find $\widehat{\lambda}$.
Which tool: MLE for an Exponential rate. Do not report $\overline{x}$ as the answer unless the exam asks for the mean $1/\lambda$.
Step 1: $n=5$, $\sum x_i=5.0$. Likelihood (all $x_i>0$)
Step 2: $\ell(\lambda)=5\log\lambda-5\lambda$.
Step 3: $\ell'(\lambda)=5/\lambda-5=0$ ⇒
What it means: Mean wait $\overline{x}=1$, so the fitted rate is $1$ event per unit time. $\widehat{\lambda}$ is a rate, not a probability and not the mean.
Check: $\ell''(\lambda)=-5/\lambda^2<0$. Same general recipe: $\widehat{\lambda}=n/\sum x_i=1/\overline{x}$.
Example: Uniform$[0,\theta]$ — MLE lives on the boundary
Goal: $X_1,\ldots,X_5$ i.i.d. Uniform$[0,\theta]$, $\theta>0$. Observed $x=(0.3,1.1,0.8,1.4,0.5)$. Find $\widehat{\theta}$. This is the example where $\ell'=0$ is the wrong move.
Which tool: MLE, but the support of the density depends on $\theta$. First write the indicator, then maximize on the feasible set — do not differentiate as if $L$ were $1/\theta^n$ for all $\theta>0$.
Step 1: Density $f_\theta(t)=1/\theta$ on $[0,\theta]$ and $0$ otherwise. Joint likelihood
Step 2: If you try $\theta=1.1$ (say, because $1.1$ appears in the sample), the point $1.4$ lies outside $[0,1.1]$, so $L_x(1.1)=0$. Any $\theta<\max x_i$ is impossible.
Step 3: On the feasible set $\theta\ge 1.4$, $L_x(\theta)=\theta^{-5}$ decreases in $\theta$. The maximum is the left endpoint
What it means: The smallest upper bound that can still generate every observed point is the largest observation. Making $\theta$ larger only flattens the density and lowers $L$.
Check: Differentiating $\log(\theta^{-5})$ and setting the derivative to zero ignores the indicator and has no critical point in $(0,\infty)$ that is feasible — classic trap.
10.4 Confidence intervals #
10.4.1 What a CI means #
Idea
A point estimate $\widehat{\theta}$ is a single guess. A confidence interval is a random interval that, under repeated sampling, covers the true fixed $\theta$ with prescribed frequency (e.g. 95%). After you plug in the observed $x$, you get one numerical interval — the randomness was in how that interval was built.
Definition ($z\%$-confidence interval / Konfidenzintervall) For a model with parameter $\theta$ and $0\le z\le 100$, a $z\%$-confidence interval associates to each realization $x$ an interval $I(x)=[a(x),b(x)]$ such that $ \forall\theta\qquad \mathbb{P}\bigl[a(X_1,\ldots,X_n)\le\theta\le b(X_1,\ldots,X_n)\bigr]\ge\frac{z}{100}. $ Equivalently one often writes level $1-\alpha$ with $\alpha=1-z/100$ (e.g. $z=95$ ↔ $\alpha=0.05$).
Remark (what is random?) The parameter $\theta$ is not random. The endpoints $a(X)$, $b(X)$ are. After observing $x$, the statement “$\theta\in I(x)$” is either true or false; the $z\%$ refers to the procedure, not to a posterior probability on $\theta$.
When to use
- You have an estimator with a known (or approximate) sampling distribution and need a quantitative uncertainty statement.
- Exam: “Konfidenzintervall zum Niveau …” / “95%-CI for $m$”.
Typical mistake
- Saying “$\theta$ lies in $I(x)$ with probability 95%” after $x$ is fixed, as if $\theta$ were random.
- Using $c=1.96$ with the wrong standardization (wrong $\sigma/\sqrt{n}$ factor).
- Mixing up one-sided and two-sided quantiles.
10.4.2 Exact CI for the normal mean (known $\sigma^2=1$) #
Idea
For i.i.d. $\mathcal{N}(m,1)$, the sample mean $\widehat{m}$ is exactly $\mathcal{N}(m,1/n)$. Standardizing gives a $N(0,1)$ pivot; reading off symmetric quantiles of $\Phi$ produces an exact CI.
Formula (Acciaio + PVK table) Let $X_1,\ldots,X_n$ be i.i.d. $\mathcal{N}(m,1)$, and $\widehat{m}=\overline{X}$. For $c>0$, $ \mathbb{P}\Bigl[\widehat{m}-\frac{c}{\sqrt{n}}\le m\le\widehat{m}+\frac{c}{\sqrt{n}}\Bigr] =\mathbb{P}[-c\le Z\le c]=2\Phi(c)-1, $ where $ Z=\sqrt{n}\,(\widehat{m}-m)\sim\mathcal{N}(0,1),\qquad \Phi(c)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{c}e^{-t^2/2}\,dt. $ Choose $c$ so that $2\Phi(c)-1\ge z/100$, i.e. $ c=\Phi^{-1}\Bigl(1-\frac{\alpha}{2}\Bigr),\qquad\alpha=1-\frac{z}{100}. $ Then $ I(x)=\Bigl[\widehat{m}(x)-\frac{c}{\sqrt{n}},\ \widehat{m}(x)+\frac{c}{\sqrt{n}}\Bigr] $ is a $z\%$-CI for $m$.
PVK / standard normal critical values (two-sided)
| $z\%$ | 50 | 75 | 90 | 95 | 97 | 99 | 99.9 |
|---|---|---|---|---|---|---|---|
| $c$ | 0.674 | 1.150 | 1.645 | 1.960 | 2.170 | 2.576 | 3.291 |
| $\alpha$ | 0.5 | 0.25 | 0.1 | 0.05 | 0.03 | 0.01 | 0.001 |
In particular, $c=1.96$ gives (at least) a 95%-CI: $ I(x)=\Bigl[\widehat{m}(x)-\frac{1.96}{\sqrt{n}},\ \widehat{m}(x)+\frac{1.96}{\sqrt{n}}\Bigr]. $
When to use
- Normal model with known variance $\sigma^2=1$ as in the lecture (or rescale: if $\sigma^2=\sigma_0^2$ known, replace $c/\sqrt{n}$ by $c\,\sigma_0/\sqrt{n}$).
- You need an exact finite-sample guarantee via $\Phi$, not a large-$n$ approximation.
Typical mistake
- Forgetting the $\sqrt{n}$ (using $c$ instead of $c/\sqrt{n}$ as half-width).
- Using $\Phi(c)$ instead of $2\Phi(c)-1$ for a two-sided interval.
The shaded central band is the probability mass $2\Phi(1.96)-1\approx 0.95$ that defines the half-width $1.96/\sqrt{n}$ of the CI for $m$.
Example: boiling-point measurements (Acciaio)
Goal: After $n=100$ i.i.d. $\mathcal{N}(m,1)$ measurements you have $\widehat{m}(x)=99.106$. Build a 95%-CI for $m$, then read what it does (and does not) say.
Which tool: Exact CI for a Normal mean with known variance — not an MLE (you already have $\widehat{m}$) and not a test (no $H_0$ yet). Same pipeline as the packet sample in §10.1: estimate first, then use the sampling law of that estimator.
Step 1 (pivot): $\widehat{m}=\overline{X}\sim\mathcal{N}(m,1/n)$, so
A two-sided 95% statement is $\mathbb{P}[|Z|\le c]=2\Phi(c)-1=0.95$. From the table above, $c=\Phi^{-1}(0.975)=1.96$.
Step 2 (half-width): $n=100$, $\sigma=1$, so
Step 3 (plug in the estimate):
What it means: The procedure that outputs $[\overline{X}\pm 1.96/\sqrt{n}]$ covers the true $m$ in $\ge 95\%$ of repeated samples of size $100$. This particular interval either contains $m$ or it does not. After seeing $x$ you must not say “$P(m\in I(x))=0.95$” — $m$ is not random.
Check: $100\notin[98.910,99.302]$. So these data are not compatible with $m=100$ at this 95% procedure. That is an informal link to testing; a formal $H_0\colon m=100$ would use §10.5.
10.4.3 Coverage intuition (same formula, many samples) #
Idea
Imagine repeating the whole experiment many times. Each repetition produces its own interval $[\overline{x}\pm c/\sqrt{n}]$. About $z\%$ of those intervals trap the true $m$; a few miss. One observed interval is just one draw from that ensemble.
Larger $n$ shrinks the interval like $1/\sqrt{n}$; the coverage probability stays $\approx 95\%$ if you keep $c=1.96$. To get a narrower interval at the same coverage you need more data (or smaller $\sigma$).
10.4.4 Known variance $\sigma_0^2\neq 1$ (same idea) #
Idea
If each $X_i\sim\mathcal{N}(m,\sigma_0^2)$ with $\sigma_0$ known, then $\sqrt{n}\,(\overline{X}-m)/\sigma_0\sim\mathcal{N}(0,1)$. The CI only rescales the half-width by $\sigma_0$.
Formula $ I(x)=\Bigl[\overline{x}-\frac{c\,\sigma_0}{\sqrt{n}},\ \overline{x}+\frac{c\,\sigma_0}{\sqrt{n}}\Bigr], \qquad c=\Phi^{-1}(1-\alpha/2). $ Acciaio’s lecture works the case $\sigma_0=1$; exams sometimes leave $\sigma_0$ symbolic.
When to use
- Normal mean, variance known from instrument precision / problem statement.
Typical mistake
- Estimating $\sigma$ from the same sample and still quoting exact $N(0,1)$ quantiles without naming that you changed the pivot (Student-$t$ is beyond this chapter’s Acciaio treatment).
Example: 90% vs 99% at fixed $n$
Goal: Same boiling-point numbers $\overline{x}=99.106$, $n=100$, $\sigma_0=1$. Write the 90% and 99% intervals and see the tradeoff.
Which tool: Still the Normal-mean CI; only the quantile $c$ changes. Higher $z\%$ is not a better estimate — it is a wider net.
Step 1 (90%): Table gives $c=1.645$. Half-width $1.645/10=0.1645$, so
Step 2 (99%): $c=2.576$. Half-width $0.2576$, so
What it means: $I_{99}$ is wider than $I_{90}$ and both still miss $100$. You cannot have “very sure” and “very narrow” at this $n$. To keep 99% and half-width $\le 0.1$ you must increase $n$ (see Exercise 2).
Check: At fixed $n$, $c$ ↑ ⇒ half-width $c\sigma_0/\sqrt{n}$ ↑. Coverage probability is about the procedure, not about these two numerical intervals being “more true”.
10.5 Hypothesis tests #
10.5.1 Setup: $H_0$, $H_1$, decision, errors #
Idea
A test is a rule that, given data, either keeps the null hypothesis $H_0$ or rejects it in favor of the alternative $H_1$. Two mistakes are possible: rejecting a true $H_0$ (Type I) or keeping $H_0$ when $H_1$ is true (Type II). Classical testing treats Type I as the primary error to control.
Framework (simple hypotheses) $X_1,\ldots,X_n$ i.i.d. with parameter $\theta$. Consider $ H_0\colon\theta=\theta_0,\qquad H_1\colon\theta=\theta_1 $ (simple = each hypothesis pins down the law completely). German: Nullhypothese $H_0$, Alternativhypothese $H_1$.
Definition (test / decision function) A test is a function $d(x)\in\{0,1\}$:
- $d(x)=0$: accept $H_0$,
- $d(x)=1$: reject $H_0$ (decide for $H_1$).
The set $\{x:d(x)=1\}$ is the critical region (Ablehnungsbereich).
Definition (Type I / Type II, level, power)
| Name | Event | Probability |
|---|---|---|
| Type I error (Fehler 1. Art) | Reject $H_0$ when $H_0$ true | $\alpha=\mathbb{P}_{H_0}[d(X)=1]$ (relevance level / Niveau) |
| Type II error (Fehler 2. Art) | Accept $H_0$ when $H_1$ true | $\beta=\mathbb{P}_{H_1}[d(X)=0]$ |
| Power (Macht) | Reject $H_0$ when $H_1$ true | $1-\beta=\mathbb{P}_{H_1}[d(X)=1]$ |
Notation $\mathbb{P}_{H_0}$ means the law under $\theta=\theta_0$ (similarly $\mathbb{P}_{H_1}$).
Principles
- Primary goal: keep Type I error $\alpha$ small (choose level first).
- Secondary goal: among level-$\alpha$ tests, maximize power (Neyman–Pearson).
When to use
- Exam states two concrete parameter values and asks to accept/reject, or to compute $\alpha$ and power for a given critical region.
- You must decide which hypothesis is $H_0$: put the “dangerous false rejection” under Type I. Equivalently: put what you want to prove in $H_1$.
- Composite one-sided Bernoulli/Binomial at large $n$ with the CLT: §10.5.5.
Typical mistake
- Swapping $H_0$ and $H_1$, which swaps which error is called Type I.
- Confusing power $1-\beta$ with level $\alpha$.
- Thinking “accept $H_0$” means $H_0$ is proved — it only means the data were not extreme enough under the chosen level.
Decision vs truth (PVK-style table):
| Decision for $H_0$ | Decision for $H_1$ | |
|---|---|---|
| $H_0$ true | no error | Type I ($\alpha$) |
| $H_1$ true | Type II ($\beta$) | no error |
Example: Eddy’s coins — choosing $H_0$
Goal: Fair coins ($p=0.5$) vs bad coins ($p=0.7$). Eddy must not bring a bad coin to the casino. Decide which hypothesis is $H_0$ before writing a test.
Which tool: Hypothesis test, not MLE. You already know the two candidate values of $p$; you need a yes/no rule. Same $L$ as in §10.2, but now you compare $L$ at two fixed $p$ instead of maximizing.
Step 1: Model $X_1,\ldots,X_{10}$ i.i.d. Bernoulli($p$). Action: reject $H_0$ means “bring the coin to the casino”.
Step 2: The error you most want to avoid is bringing a bad coin. Classical tests control that error as Type I, so it must be “reject $H_0$ when $H_0$ is true”. Therefore $H_0$ has to be the bad coin:
Step 3: Translate the errors:
- Type I ($\alpha$): $H_0$ true and you reject → bring a bad coin (the disaster).
- Type II ($\beta$): $H_1$ true and you accept $H_0$ → throw away a fair coin (annoying, secondary).
Check: If the priority were reversed (“never throw away a fair coin”), you would swap $H_0$ and $H_1$, and Type I would become that other error. The labels are not about which $p$ is “more likely” — they encode which mistake you control first.
10.5.2 Likelihood-ratio tests #
Idea
Compare how likely the data are under $H_0$ versus under $H_1$. If the null likelihood is much smaller than the alternative likelihood (ratio below a threshold $c$), reject $H_0$. Neyman–Pearson says this shape of test is most powerful at a given level among all tests of that level.
Definition (likelihood ratio) For discrete models (continuous: replace probabilities by densities), $ r(x)=\frac{\mathbb{P}_{H_0}[X=x]}{\mathbb{P}_{H_1}[X=x]}=\frac{L_x(\theta_0)}{L_x(\theta_1)}. $ Fix a threshold $c>0$ and set $ d(x)=\begin{cases} 0 & \text{if }r(x)>c\quad\text{(accept }H_0\text{)},\\ 1 & \text{if }r(x)\le c\quad\text{(reject }H_0\text{)}. \end{cases} $ Then $ \alpha=\mathbb{P}_{H_0}[r(X)\le c],\qquad 1-\beta=\mathbb{P}_{H_1}[r(X)\le c]. $ In discrete problems one often chooses the largest critical region of the form $\{r\le c\}$ (equivalently a threshold on a sufficient statistic such as $\|x\|$) so that $\alpha$ does not exceed a target.
Theorem (Neyman–Pearson lemma — statement) For two simple hypotheses, among all tests with Type I error at most $\alpha$, a likelihood-ratio test of that level maximizes the power $1-\beta$.
(Proof idea in Acciaio: compare any competitor $d^*$ to the LR test $d$ by checking the pointwise inequality involving $(c\,L_1-L_0)$ and taking expectations under $H_0$ and $H_1$.)
When to use
- Both hypotheses are simple and fully specify $L_x(\theta_0)$ and $L_x(\theta_1)$.
- Exam asks for Likelihood-Quotienten-Test / to tabulate $r$ vs a count statistic.
Typical mistake
- Writing $r=L_1/L_0$ and then using the wrong reject region (must match your definition — Acciaio rejects when $r=L_0/L_1$ is small).
- Computing $\alpha$ under $H_1$ or power under $H_0$.
Example: Eddy’s LR test (Acciaio numbers)
Goal: $n=10$, $H_0\colon p=0.7$, $H_1\colon p=0.5$. Write the likelihood-ratio test, read the cutoffs from the table in §10.5.3, compute $\alpha$ and power by summing, then decide on an observed $k=4$.
Which tool: Likelihood-ratio test for two simple hypotheses. Reject $H_0$ when $r=L(\theta_0)/L(\theta_1)$ is small.
Step 1 (write $r$): With $\|x\|=k$ (number of heads),
So $r$ is increasing in $k$: few heads ⇒ small $r$ ⇒ data look too fair for a bad coin ⇒ reject $H_0$ (bring the coin).
Step 2 (read the table): The table below lists $r$ for each $k$. It crosses $1$ between $k=6$ ($r=0.976$) and $k=7$ ($r=2.28$), and crosses $0.1$ between $k=3$ ($r=0.077$) and $k=4$ ($r=0.179$). So
- threshold $c=1$ ↔ reject when $k\le 6$,
- threshold $c=0.1$ ↔ reject when $k\le 3$.
Step 3 (sum the table for $\alpha$ and power): $\alpha=\mathbb{P}_{H_0}[\text{reject}]$ is the $L(0.7)$ row summed over the critical $k$; power is the $L(0.5)$ row on the same $k$.
- $c=1$, $k\le 6$: $\alpha\approx 0.0000+0.0001+0.0014+0.0090+0.0368+0.1029+0.2001=0.3503$, power $\approx 0.828$ (Acciaio’s $0.8228$ differs by table rounding). About 35% of coins brought are still bad; about 83% of fair coins are kept.
- $c=0.1$, $k\le 3$: $\alpha\approx 0.0000+0.0001+0.0014+0.0090=0.0105$ (Acciaio $0.0101$), power $=0.0010+0.0098+0.0439+0.1172=0.1719$. Only ~1% bad coins slip through, but only ~17% of fair coins are saved.
Step 4 (decide on data): Suppose you observe $k=4$ heads. Table: $r=0.179$.
- If the threshold is $c=1$: $0.179\le 1$ ⇒ reject $H_0$ ⇒ bring the coin.
- If the threshold is $c=0.1$: $0.179>0.1$ ⇒ accept $H_0$ ⇒ do not bring the coin.
Same data, different $c$ (different $\alpha$), different decision.
Check: Lowering $\alpha$ (stricter $c$) typically lowers power — that is the tradeoff you are buying. Do not compute $\alpha$ under $H_1$ or power under $H_0$.
10.5.3 Likelihood table (Eddy’s numerical ratios) #
This is the table used in the example above: each column is one $k$, and you sum a row over the critical $k$ to get $\alpha$ (top row) or power (middle row). Acciaio lists likelihoods as functions of $k=\|x\|$ (heads in 10 tosses). Under $H_0$ ($p=0.7$) and $H_1$ ($p=0.5$):
| $k=|x|$ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| $L(0.7)$ | .0000 | .0001 | .0014 | .0090 | .0368 | .1029 | .2001 | .2668 | .2335 | .1211 | .0282 |
| $L(0.5)$ | .0010 | .0098 | .0439 | .1172 | .2051 | .2461 | .2051 | .1172 | .0439 | .0098 | .0010 |
| $r=L_0/L_1$ | .006 | .014 | .033 | .077 | .179 | .418 | .976 | 2.28 | 5.31 | 12.4 | 28.9 |
Reading the table: $r$ crosses $1$ between $k=6$ and $k=7$, and crosses $0.1$ between $k=3$ and $k=4$. That is why the reject regions were $\{\|X\|\le 6\}$ and $\{\|X\|\le 3\}$.
PVK operational tip: build exactly this three-row table (pmf under $H_0$, under $H_1$, ratio), then pick the largest $c$ (or the corresponding $k$-cutoff) compatible with a target $\alpha$.
10.5.4 Neyman–Pearson — proof sketch (optional depth) #
Idea
Type I error is a budget $\alpha$: how often you may wrongly reject $H_0$. Power is how often that same reject-rule fires when $H_1$ is true. Spend the budget on outcomes that are cheap under $H_0$ (small $L_0$) but common under $H_1$ (large $L_1$) — i.e. where $r=L_0/L_1$ is smallest. That is the LR test. Any other level-$\alpha$ test spends some of the budget on worse outcomes, so it cannot have more power.
Score. Write $L_0(x)=\mathbb{P}_{H_0}[X=x]$ and $L_1(x)=\mathbb{P}_{H_1}[X=x]$. Reject $H_0$ on $x$ when the alternative “pays” at least $c$ times the Type I cost:
So $d(x)=1$ exactly on the nonnegative-score outcomes — the same rule as §10.5.2.
Toy picture (three outcomes). $L_0$ and $L_1$ are two pmfs. LR with threshold $c=1$ rejects only the smallest-$r$ point $C$:
| Outcome | $L_0$ (cost under $H_0$) | $L_1$ (payoff under $H_1$) | $r=L_0/L_1$ | LR ($c=1$) |
|---|---|---|---|---|
| $A$ | $0.50$ | $0.10$ | $5$ | keep $H_0$ |
| $B$ | $0.40$ | $0.30$ | $4/3$ | keep $H_0$ |
| $C$ | $0.10$ | $0.60$ | $1/6$ | reject $H_0$ |
LR spends $\alpha=L_0(C)=0.10$ and gets power $L_1(C)=0.60$. A competitor that rejects $A$ instead spends $\alpha=0.50$ for power $0.10$; one that rejects $B$ spends $0.40$ for power $0.30$. Both pay more Type I for less power — they spent the budget on worse $r$.
Why $d$ beats any competitor $d^*$ (Acciaio). Let $d$ be the LR test of threshold $c$, with level $\alpha=\mathbb{E}_{H_0}[d(X)]$ (this is $\mathbb{P}_{H_0}[\text{reject}]$). Let $d^*$ be any other $0$–$1$ test with $\mathbb{E}_{H_0}[d^*(X)]\le\alpha$. Write $s(x)=c\,L_1(x)-L_0(x)$.
- If $s(x)\ge 0$, LR already set $d(x)=1$, and $d^*(x)\le 1$, so $d^*(x)\,s(x)\le d(x)\,s(x)$.
- If $s(x)<0$, LR already set $d(x)=0$, and $d^*(x)\ge 0$, so $d^*(x)\,s(x)\le 0=d(x)\,s(x)$.
That is the pointwise inequality $ d^*(x)\bigl(c\,L_1(x)-L_0(x)\bigr) \le d(x)\bigl(c\,L_1(x)-L_0(x)\bigr). $ Sum over $x$: $c\,\mathbb{E}_{H_1}[d^*]-\mathbb{E}_{H_0}[d^*]\le c\,\mathbb{E}_{H_1}[d]-\mathbb{E}_{H_0}[d]$. Rearrange, using $\mathbb{E}_{H_0}[d]=\alpha\ge\mathbb{E}_{H_0}[d^*]$ and $\mathbb{E}_{H_1}[d]=\text{power}$: $ \underbrace{\mathbb{E}_{H_1}[d(X)]-\mathbb{E}_{H_1}[d^*(X)]}_{\text{power}(d)-\text{power}(d^*)} \ge \frac{1}{c}\bigl(\underbrace{\mathbb{E}_{H_0}[d(X)]-\mathbb{E}_{H_0}[d^*(X)]}_{\alpha-\text{level}(d^*)}\bigr)\ge 0. $ Hence the LR test has at least as much power as $d^*$.
When to use
- Exam asks to state Neyman–Pearson or to justify why an LR critical region is optimal.
- Full reproduction of the inequality chain is rare; knowing the statement + “LR tests are MP at fixed $\alpha$” is the practical takeaway.
Typical mistake
- Claiming NP applies unchanged to composite hypotheses ($H_0\colon\theta\le\theta_0$, etc.) without extra structure — this chapter’s lemma is for two simple hypotheses. For one-sided composite Bernoulli tests at large $n$, use the CLT at the boundary instead (§10.5.5).
10.5.5 Composite one-sided tests via CLT (exam pattern) #
Idea
Exam statistics is often not “two simple $p$-values and an LR table”. A claim like “the drug works at least $90\%$ of the time” is a composite $H_1$. Put what you want to prove in $H_1$. Control Type I at the worst-case point on the $H_0$ boundary (here $p=0.9$), approximate the Binomial tail by the CLT, and read a one-sided $\Phi$-quantile ($1.65$, not the two-sided CI value $1.96$).
Rule (what goes in $H_1$) The statement you are trying to establish is $H_1$. $H_0$ is the opposite (the status you will keep unless the data are extreme). Type I = wrongly celebrating $H_1$.
Rule (composite $\Rightarrow$ boundary) If $H_0\colon p<0.9$ and you reject for large success counts, the Type I probability is largest at $p=0.9$. It is enough to enforce $\mathbb{P}_{p=0.9}[\text{reject}]\le\alpha$; smaller $p$ makes large counts even less likely.
Rule (one-sided quantile) For a two-sided $95\%$ CI one uses $c=\Phi^{-1}(0.975)\approx 1.96$. For a one-sided $5\%$ test one uses $\Phi^{-1}(0.95)\approx 1.65$ (same number as the $90\%$ two-sided $c$ in §10.4).
When to use
- “Behauptung statistisch beweisen”, Signifikanzniveau $5\%$, $n$ large, Bernoulli/Binomial, “verwende den ZGWS”.
- You must choose $H_0$/$H_1$ and then give a decision rule in the count $k$.
Typical mistake
- Putting the claim you want to prove in $H_0$ (then rejecting $H_0$ “proves” the wrong thing).
- Using $c=1.96$ on a one-sided $5\%$ test.
- Computing the Binomial tail at some $p$ inside $H_1$ instead of at the $H_0$ boundary.
Example: drug claim, $n=100$, one-sided CLT test
Goal: An institute claims a drug works with probability at least $90\%$. In $n=100$ independent patients it works $97$ times. Using the CLT at level $5\%$, is the claim statistically established? Then flip the hypotheses for a sceptic who wants to show the drug is worse than $90\%$.
Which tool: Composite one-sided test + CLT, not MLE, not a two-sided CI, not Eddy’s LR table. The numerical tail is the same computation as §9.5.
Step 1 (institute — prove “good”): What they want to prove is $p\ge 0.9$, so
Reject $H_0$ for large $X\sim\mathrm{Bin}(100,p)$. Level is checked at the boundary $p=0.9$: $nm=90$, $\sigma\sqrt{n}=3$. One-sided $5\%$ means
i.e. $\Phi\bigl((k-1-90)/3\bigr)\ge 0.95$, so $(k-1-90)/3\ge 1.65$, hence $k-1\ge 94.95$ and $k\ge 96$. Decision rule: reject $H_0$ (accept the claim) if $X\ge 96$.
Step 2 (data): Observed $X=97\ge 96$, so reject $H_0$ at $5\%$. Equivalently, from §9.5, $\mathbb{P}_{p=0.9}[X\ge 97]\approx 0.0228<0.05$.
Step 3 (sceptic — prove “worse”): Now the claim to establish is $p<0.9$, so the labels swap:
Reject for small $X$. At the boundary $p=0.9$,
gives $(k-90)/3\le -1.65$, so $k\le 85.05$. Decision rule: reject $H_0$ if $X\le 85$. (Using $k$ vs $k-1$ can move this cutoff by one; the exact Binomial may pick $84$.)
Check: Same data $X=97$ would not help the sceptic — $97$ is the wrong tail. One-sided $1.65$ is not the CI $1.96$. Neyman–Pearson (§10.5.4) does not by itself give this reject region; the CLT at the boundary does.
10.6 Method map #
| If you see… | Use… | Go to |
|---|---|---|
| “estimate $\theta$”, “MLE”, “Maximum-Likelihood-Schätzer” | Write $L_x$, maximize $\log L$ | §10.2 / §10.3 |
| Bernoulli / Binomial count | $\widehat{p}=\overline{x}$ | §10.2 |
| Poisson | $\widehat{\lambda}=\overline{x}$ | §10.2 |
| Exponential rate | $\widehat{\lambda}=1/\overline{x}$ | §10.3 |
| Normal $(m,\sigma^2)$ both unknown | $\widehat{m}=\overline{x}$, $\widehat{\sigma}^2=\frac1n\sum(x_i-\overline{x})^2$ | §10.3 |
| Uniform$[0,\theta]$ | $\widehat{\theta}=\max x_i$ (boundary!) | §10.3 |
| “Konfidenzintervall”, level $1-\alpha$, normal mean $\sigma=1$ | $[\overline{x}\pm c/\sqrt{n}]$, $c=\Phi^{-1}(1-\alpha/2)$ | §10.4 |
| $H_0$ vs $H_1$, Niveau $\alpha$, Macht | Define $d$; $\alpha=\mathbb{P}_{H_0}[\text{reject}]$, power $=\mathbb{P}_{H_1}[\text{reject}]$ | §10.5 |
| Two simple hypotheses, “Likelihood-Quotient” | $r=L(\theta_0)/L(\theta_1)$; reject if $r\le c$ | §10.5 |
| Which hypothesis is null? | Put the error you most want to avoid as Type I (claim to prove $\to H_1$) | §10.5 |
| One-sided Binomial test, large $n$, ZGWS | Boundary $p$; $c=\Phi^{-1}(1-\alpha)\approx 1.65$ at $5\%$ | §10.5.5 |
10.7 Exercises #
Exercise 1. A sensor reports success/fail. You observe $x=(1,1,0,1,0,0)$ and model the trials as i.i.d. Bernoulli($p$).
(a) Write $L_x(p)$ and the MLE $\widehat{p}$.
(b) Someone suggests reporting the 95% interval $[\overline{x}\pm 1.96/\sqrt{n}]$ as an exact CI for $p$ from this chapter. Is that the right tool? What would be the right tool if the exam instead asked you to decide between $p=1/2$ and $p=3/4$?
Solution. Goal: Compute the Bernoulli MLE, then choose the matching later tool (CI vs test). Step 1: $n=6$, $\|x\|=3$, so $L_x(p)=p^3(1-p)^3$ and $\widehat{p}=\overline{x}=1/2$. Step 2 (b, CI): No. The exact CI in §10.4 is for i.i.d. $\mathcal{N}(m,\sigma_0^2)$ with $\sigma_0$ known. A Bernoulli $p$ is not a Normal mean. For large $n$ one may approximate via the CLT; $n=6$ is not that, and this chapter does not give an exact $N(0,1)$ CI for $p$. Step 3 (b, test): Deciding between two concrete values $p=1/2$ and $p=3/4$ is a hypothesis test: write $r=L_x(1/2)/L_x(3/4)$ (or the other way around, matching your $H_0$) and reject when $r$ is small — §10.5. Check: Same $L_x$ for (a) and (b); the job (maximize vs wrap an interval vs compare two points) picks the tool.
Exercise 2. Normal model with known $\sigma^2=1$. How large must $n$ be so that the half-width of the 95%-CI is at most $0.1$? (Use $c=1.96$.)
Solution. Goal: Minimal $n$ with 95%-CI half-width $\le 0.1$ when $\sigma^2=1$. Step 1: the interval is $[\overline{x}\pm 1.96/\sqrt{n}]$. Step 2: require
Step 3: since $n$ is an integer, take $n=385$. Check: $1.96/\sqrt{385}\approx 0.0999\le 0.1$, while $n=384$ is still slightly above $0.1$. This is the same tradeoff as in the 90% vs 99% example: to keep coverage and shrink the interval you buy more data, not a different $c$.
Exercise 3. Let $X_1,X_2,X_3$ be i.i.d. with density $f_\theta(x)=\theta x^{\theta-1}$ on $(0,1)$, $\theta>0$. Observed $x=(e^{-1},e^{-1},e^{-2})$. Find the MLE $\widehat{\theta}$.
Solution. Goal: MLE for $f_\theta(x)=\theta x^{\theta-1}$ on $(0,1)$, then a number from the sample. Step 1: joint density / likelihood:
Step 2: $\ell(\theta)=3\log\theta+(\theta-1)\sum_{i=1}^{3}\log x_i$. Then $\ell'(\theta)=3/\theta+\sum\log x_i=0$ gives the general formula
Step 3: $\log x=(-1,-1,-2)$, so $-\sum\log x_i=4$ and
Check: $\ell''(\theta)=-3/\theta^2<0$, so a maximum. Each $x_i\in(0,1)$ makes $-\log x_i>0$, so $\widehat{\theta}>0$ automatically.
End of Chapter 10 draft. Sources: Acciaio lecture Ch. 4 (estimation, CI, tests / Neyman–Pearson / Eddy); PVK §5 Statistik (MLE checklist, CI table, error table).