IN0018 · Discrete Probability Theory · TUM · SoSe 2026
Course map
Diskrete Wahrscheinlichkeitstheorie — Niki Kilbertus, script version of 24 June 2026
One page per subchapter of the script, in the script's own order and with the script's own numbering. Every chapter page walks the same route: the plain-language picture first, then the exact definitions and theorems, then the proofs, then easy examples before hard ones, then the exercise-sheet tasks and old-exam tasks that belong to that subchapter, and finally a summary sheet and a self-test. (The background page B1 is the one exception: it is a map into your Analysis guide, so it has no summary sheet and no self-test of its own.)
How to read a page
Every claim on every page carries a coloured label that says where it comes from. A label is never used for a source the material does not come from. Where one passage really has two sources — an exam task that I then extended, say — it carries both labels next to each other rather than one blended label:
The My addition label covers three things: background the script assumes you already have (from Discrete Structures, Analysis or Linear Algebra), proofs the script leaves as "Exercises" or omits entirely, and the interactive widgets. Where an official solution is wrong, the page says so and gives the corrected answer: either in a red box of its own, or — when only one step is affected — in a note labelled Note on the official solution beside that step.
Proofs sit inside collapsed grey strips so you can read a page for the statements first and open the arguments on a second pass. Nothing is hidden that you need.
The pages
Background pages B1–B5 come first. They teach what this course assumes but never explains. Anything your Analysis guide already covers is linked there rather than repeated — B1 is the full map. Gaps it does not cover get pages of their own: set algebra and countability (B2), counting (B3), measure theory and the Lebesgue integral (B4), and linear algebra with the change-of-variables formula (B5).
All pages are written: background pages B1–B5, chapter pages 0, 1.1–1.4, 2.1–2.4 and 3.1–3.5, and the script's appendix A.1.
What was in the old exams
Three official solution sets are available: WiSe 25/26 (the retake written on Thursday 2 October 2025 — its file is named “WiSe25”; 6 problems, 59 credits), SoSe 2025 (the endterm of Friday 1 August 2025; 5 problems, 51 credits) and SoSe 2026 (the endterm of Wednesday 5 August 2026; 5 problems, 44 credits, the most recent). Every exam lasted 120 minutes. This table maps their tasks onto the subchapters of this guide. It describes what has been asked before and is not a prediction of what will be asked next.
Two conventions in the table. A problem in brackets, like “(P3a)”, is one whose full solution lives in another row but which uses this subchapter's technique on the way. “(set-up)” means that only the opening step of that problem belongs here, and the rest is solved on the page named in the row that lists it without brackets.
| Topic (subchapter) | WiSe 25/26 | SoSe 2025 | SoSe 2026 |
|---|---|---|---|
| σ-algebras, measures (1.1) | P1a, P1c | — | P2b |
| Inclusion–exclusion (1.1) | P6c | — | — |
| Named discrete distributions (1.2) | P5a (Bin) | P5a (Lap) | P4, P5 (Ber) |
| Densities, cdfs, transformations (1.3) | P3a | P3 | — |
| Conditional probability, independence (1.4) | P3b, P6a, P6b | P1a, P1d | P5a |
| Expectation, variance, covariance (2.1) | P1b, P3c, P5a–c | P1b, P5a, P5b | P1a, P1b, P2c, P2d, P4c, P5c |
| Markov, Chebyshev, Jensen (2.2) | P4b | P5c | P3, P4d |
| Characteristic functions, transformations, Gaussians (2.3) | (P3a) | (P3) | P1c, P4a, P4b |
| Convergence, lln, clt (2.4) | P1d, P2, P4c, P4d | P2 | P1d, P2a, P4d |
| Statistical models, likelihood (3.1) | P4a (set-up) | P4a (set-up) | P5a |
| Estimators, mle, mse (3.2) | P4a–d, P5b–c | P1b, P4a–c | P1e, P5b, P5c |
| Hypothesis tests (3.3) | — | P1c, P4d | P5d |
| Confidence intervals (3.4) | P5d | P1c (reading a level) | — |
| Bayesian vs. frequentist (3.5) | (P6b, re-read as prior → posterior) | — | — |
Three structural habits of these three exams
1. Every exam opens with a True/False block (P1), worth 5–12 credits. In WiSe 25/26 and SoSe 2025 you have to justify each answer, and one counterexample is enough to earn the points. In SoSe 2026 P1 you only mark true or false, with no justification at all (5 credits), and a second, justified True/False block follows as P2 (12 credits).
2. All three exams ask you to state a named result with all its assumptions. In WiSe 25/26 and SoSe 2025 this is the whole of P2 (6 credits): the strong law of large numbers plus the definition of almost-sure convergence, and the central limit theorem plus the definition of convergence in distribution. In SoSe 2026 it is P3a, Jensen's inequality (3 of the 5 credits of P3). This is pure recall of the exact wording, assumptions included.
3. The last problem is always a long applied one built from a story (duck hunt, tennis schedule, randomized response). These are worth 10–13 credits and chain several subchapters together: two for the tennis problem (§1.4 and §1.1), three for the duck hunt (§1.2, §2.1, §2.2), five for the randomized-response problem (§1.4, §2.1, §3.1, §3.2, §3.3).
Sources used
- Script —
DPT-Script.pdf, version of 24 June 2026: Chapters 0–3 run to page 114, Appendix A (its only section is A.1, set theory) is pages 115–116. Chapter and item numbers in this guide are the script's own. - Exercise sheets 0–11 — twelve sheets, each with its official solution.
- Old exams — WiSe 25/26, SoSe 2025, SoSe 2026, each with the official Musterlösung.
- Course information sheet —
DPT-Info.pdf, dated 12 April 2026: the grade comes entirely from the 120-minute written exam of 5 August 2026; there is no midterm, and the exercise sheets are neither collected nor corrected. - Permitted aids — the information sheet does not list them; this comes from the cover page of all three exams: one single sheet of A4 paper with handwritten notes on both sides, and one analogue dictionary (English ↔ native language, without notes).
Background · B0 — read this before the chapters if Analysis is rusty
Analysis in one sitting
Analysis im Schnelldurchlauf
What this page is, and how to use it My addition
This page is the Analysis you need in order to do the DPT exam tasks, written as recipes. Not the theory — the moves. For every item you get: one or two plain sentences saying what it is, the rule in a box, a tiny example with real numbers, and one line saying which DPT task needs it, with a link.
Who it is for. You have the Analysis script (MA0902) and you have no time. You do not need to re-derive the fundamental theorem of calculus; you need to integrate \(x/c\) over \([0,2]\), set the answer equal to \(1\) and solve for \(c\), and you need to do it in four minutes without stopping to think about whether the antiderivative is right.
How to use it. Skim it once, top to bottom, in one sitting — that is what it is built for. Then come back to a single item the moment a DPT task stalls on an Analysis step. Every section is self-contained: each symbol is explained where it appears, so you can drop into the middle of the page and still follow it.
Where the full treatment is. Every item carries a link to your own Analysis guide, like this: Analysis 8.3 — Antiderivatives (opens in a new tab). Where this guide teaches the same thing more slowly, the background pages do it: B1 — What Analysis already gave you (with the full prerequisite map, one row per section of the course), B2 — Sets and logic, B3 — Counting, B4 — Measure and integration, B5 — Linear algebra. This page never replaces those; it is the short road.
The 14 Analysis moves that earn credits in DPT
This list is my own, and it is drawn from exactly three past papers — WiSe 25/26 (retake), SoSe 2025 and SoSe 2026 — together with the eleven exercise sheets. Three papers is a tiny sample. Read the list as "what has been asked", never as "what will be asked". Two of the three papers had a block titled Density computations; the third had none at all, so even move 9 is not guaranteed. The exam tasks behind each move are named precisely in the cheat card; the full evidence is on the exam page.
- Rearrange an inequality and solve a tail bound for the unknown — every Chebyshev and Markov task.
- Take the limit of a sequence — asymptotic unbiasedness, consistency, and the Poisson limit theorem.
- Sum a series: geometric, differentiated geometric, exponential, index shift, telescoping — every mean and variance of a discrete distribution.
- Split and combine exponentials, and turn a product into a sum of logarithms — memorylessness and every log-likelihood.
- Solve an equation with \(\ln\), or a quadratic one, keeping the root inside the support — medians, quantiles, inverted cdfs.
- Differentiate: chain, product and quotient rules, \(\exp\) and \(\ln\) — differentiating a cdf back to a density, and every likelihood equation.
- Transform a random variable with \(p_Y(y)=p_X(g^{-1}(y))\,|(g^{-1})'(y)|\), support included — 7 credits across two papers.
- Find the maximum and show that it is one — every maximum likelihood estimator.
- Integrate a density: normalising constant, cdf, expectation.
- Improper integrals out to \(\infty\), and the fact that \(\exp\) beats every power — every mean of a continuous distribution.
- Substitute, and integrate by parts — standardising a normal, the Gamma integrals, Sheet 7 and Sheet 8.
- Standardise, then fold with \(\Phi\): \(\P(|Z|\ge a)=2\Phi(-a)\) — the last line of every central-limit task.
- Double integrals over a non-rectangular region, including the marginal density.
- Check convexity with \(f''\ge 0\), then apply Jensen.
Before any of the fourteen comes a move zero that is not a calculation at all: being able to read the notation. The script writes \(\inf\), \(\uparrow\), \(o(\cdot)\) and \(\lceil\cdot\rceil\) without ever explaining them, so that is where this page starts.
Notation you must be able to read
These are the symbols the DPT script, the sheets and the past papers use without stopping to explain them. One line each, plus a micro-example. Nothing here is hard; it is only unfamiliar, and being unfamiliar with it costs you time you do not have in a 120-minute exam.
| Symbol | What it says | Micro-example |
|---|---|---|
| \(\sum_{k=1}^{n} a_k\) | Sum [Summe]. Add up \(a_k\) as the index \(k\) runs through \(1,2,\dots,n\). The letter \(k\) is internal to the sum: it does not exist outside it. \(\sum_{\omega\in A}\) means the index runs over the elements of the set \(A\). | \(\sum_{k=1}^{3}k^2 = 1+4+9 = 14\). |
| \(\prod_{i=1}^{n} a_i\) | Product [Produkt]. Same idea, but multiply instead of add. An empty product (no factors) is \(1\), the way an empty sum is \(0\). | \(\prod_{i=1}^{3}\tfrac{i}{i+1} = \tfrac12\cdot\tfrac23\cdot\tfrac34 = \tfrac14\). |
| index shift | Renaming the index without changing the sum. If you set \(j=k-1\), then \(k=1\) becomes \(j=0\), \(k=n\) becomes \(j=n-1\), and \(a_k\) becomes \(a_{j+1}\). Both ends move, the terms do not. | \(\sum_{k=1}^{4}\tfrac1k=\sum_{j=0}^{3}\tfrac1{j+1}\); both equal \(1+\tfrac12+\tfrac13+\tfrac14\). |
| \(\forall\), \(\exists\) | For all [für alle] and there exists [es existiert]. Their negation swaps them: "not for all \(x\)" is the same as "there is an \(x\) for which not". That is why one counterexample kills a \(\forall\)-statement. | "\(\forall n\in\N:\ n^2\ge n\)" is true; "\(\forall x\in\R:\ x^2\ge x\)" is false, because \(x=\tfrac12\) gives \(\tfrac14\). |
| \(\{x\in A \mid \dots\}\) | Set-builder [Mengenschreibweise]. "The set of those \(x\) in \(A\) that satisfy …". The bar \(\mid\) (sometimes a colon) reads "such that". | \(\{x\in\R \mid F(x)\ge 0.5\}\) — every point where the cdf has reached one half. |
| \(\sup\), \(\inf\) | Supremum and infimum: the smallest upper bound and the largest lower bound. They always exist for a bounded non-empty set of reals; they need not belong to the set. When they do belong to it, they are the \(\max\) and the \(\min\). | For \(\{1-\tfrac1n : n\ge1\}=\{0,\tfrac12,\tfrac23,\dots\}\): \(\sup=1\) (never reached, so no maximum), \(\inf=0=\min\). Details at sup and inf. |
| \(\lceil x\rceil\) | Ceiling [Aufrundung]: round up to the nearest integer. (Its mirror \(\lfloor x\rfloor\), the floor, rounds down; it never occurs in this course's material.) | \(\lceil 3.2\rceil = 4\), \(\lceil 7\rceil=7\). Used when an answer must be a whole number of ducks (SoSe25 · P5c). |
| \(a_n\to a\) | Converges to [konvergiert gegen]: the terms get and stay arbitrarily close to \(a\). Written \(\lim_{n\to\infty}a_n=a\) as well. | \(\tfrac{n}{n+1}\to 1\); at \(n=100\) it is \(0.9901\). |
| \(x_n\uparrow x\), \(x_n\downarrow x\) | Converges from below while increasing / from above while decreasing [monoton wachsend / fallend]. The arrow carries two pieces of information at once: the direction of the motion and the limit. For sets, \(A_n\uparrow A\) means \(A_1\subseteq A_2\subseteq\cdots\) with union \(A\). | \(1-\tfrac1n\uparrow 1\) and \(\tfrac1n\downarrow 0\). Used in the continuity of measures, §1.1, Lemma 1.24. |
| \(o(\cdot)\) | Little-o [Landau-Symbol]. "\(f(s)=o(s^2)\) as \(s\to0\)" means \(f(s)/s^2\to0\): \(f\) is negligible compared with \(s^2\). It is a statement about a ratio, not about size. | \(s^3=o(s^2)\), because \(s^3/s^2=s\to0\). Appears in the proof of the central limit theorem, §2.4. |
| \(|\cdot|\) | Three different things, told apart only by what is inside. \(|x|\) for a number is the absolute value (distance from \(0\)). \(|A|\) for a finite set is its number of elements. \(|\det J|\) is the absolute value of a determinant. | \(|-3|=3\); \(|\{a,b,c\}|=3\). |
| \(p\) versus \(p(x)\) | A function versus one of its values. The script writes \(p_X\), \(F_X\), \(\varphi_X\) with no argument when it means the whole function, which is why "\(F_X\) is right-continuous" makes sense but "\(F_X(3)\) is right-continuous" does not. | \(F_X\) is a function \(\R\to[0,1]\); \(F_X(2)=0.8\) is a number. |
Fuller versions of these: Analysis 1.1 — Quantifiers, Analysis 1.2 — Upper bounds, supremum and infimum, Analysis 2.1 — The definition of convergence, Analysis 6.1 — Landau symbols. Sets and set-builder notation are taught from nothing on B2.
Numbers, inequalities and sup/inf
Probability produces inequalities constantly — Markov, Chebyshev, confidence intervals, the definition of a test's size. Almost all of the algebra involved is school algebra, with exactly two places where it is easy to lose a sign or a direction. Those two places are below.
Rearranging an inequality
You are usually handed a bound and asked to solve it for something — for the deviation \(k\), for the sample size \(n\), for the parameter \(\mu\). The danger is that some operations keep the direction of \(\le\) and some reverse it.
The rules My addition
- Adding the same number to both sides: direction unchanged. \(a\le b \Rightarrow a+c\le b+c\) for every \(c\).
- Multiplying by a positive \(c>0\): direction unchanged. \(a\le b \Rightarrow ac\le bc\).
- Multiplying (or dividing) by a negative \(c<0\): direction flips. \(a\le b \Rightarrow ac\ge bc\).
- Taking reciprocals of two positives: direction flips. \(0<a\le b \Rightarrow \tfrac1a\ge\tfrac1b\).
- Squaring, when both sides are \(\ge 0\): direction unchanged, and it is an equivalence: for \(a,b\ge0\), \(a\le b \iff a^2\le b^2\). If a side can be negative this fails: \(-3\le 2\) but \(9\ge 4\).
- Applying a strictly increasing function (such as \(\ln\) on \((0,\infty)\), or \(\sqrt{\ }\) on \([0,\infty)\)): direction unchanged, and again an equivalence. A strictly decreasing function flips it.
Micro-example — solving a Chebyshev bound for \(k\) My addition
Chebyshev's inequality (§2.2, Thm 2.40) gives \(\P(|X-\E[X]|\ge k)\le \Var[X]/k^2\), where \(\Var[X]\) is the variance and \(k>0\) is a deviation you get to choose. Suppose \(\Var[X]=2.5\) and you want the probability to be at most \(0.1\). Solve
\[ \frac{2.5}{k^2}\ \le\ 0.1 . \]Multiply both sides by \(k^2>0\) (positive, so no flip): \(2.5\le 0.1\,k^2\). Divide by \(0.1>0\) (no flip): \(25\le k^2\). Both sides are \(\ge0\), so take square roots (equivalence): \(5\le k\). Check: \(2.5/5^2 = 2.5/25 = 0.1\) exactly, so \(k=5\) is the smallest \(k\) that works.
One more line of algebra that turns up in the same tasks: because both sides are \(\ge0\),
\[ |X-\E[X]|\ \ge\ k \quad\iff\quad (X-\E[X])^2\ \ge\ k^2 , \]which is exactly how the proof of Chebyshev turns a two-sided deviation into Markov's inequality applied to a square.
The double inequality — turning a \(z\)-bound into a confidence interval My addition — the algebra Script §3.4, Ex 3.56 leaves out
Every confidence interval [Konfidenzintervall] in §3.4 starts from a statement about the standardised sample mean \(Z=\dfrac{\bar X_n-\mu}{\sigma/\sqrt n}\) — here \(\bar X_n\) is the average of the \(n\) observations, \(\mu\) the unknown mean, \(\sigma\) the known standard deviation — and the task is to get \(\mu\) alone in the middle. The script writes "rearranging the inequality for \(\mu\) yields" and prints the answer; these are the four lines it skips. Start from
\[ -z\ \le\ \frac{\bar X_n-\mu}{\sigma/\sqrt n}\ \le\ z . \]- Multiply all three parts by \(\sigma/\sqrt n\), which is positive, so nothing flips: \(-z\tfrac{\sigma}{\sqrt n}\le \bar X_n-\mu\le z\tfrac{\sigma}{\sqrt n}\).
- Subtract \(\bar X_n\) from all three parts (adding never flips): \(-\bar X_n-z\tfrac{\sigma}{\sqrt n}\le -\mu\le -\bar X_n+z\tfrac{\sigma}{\sqrt n}\).
- Multiply by \(-1\). This is the one step that flips both \(\le\) signs, and because the two outer expressions swap ends, the left-hand end of the interval is built from the \(+z\) line and the right-hand end from the \(-z\) line: \(\bar X_n+z\tfrac{\sigma}{\sqrt n}\ \ge\ \mu\ \ge\ \bar X_n-z\tfrac{\sigma}{\sqrt n}\).
- Read it left to right: \(\bar X_n-z\tfrac{\sigma}{\sqrt n}\ \le\ \mu\ \le\ \bar X_n+z\tfrac{\sigma}{\sqrt n}\), i.e. \(\bar X_n\pm z\tfrac{\sigma}{\sqrt n}\).
Check with numbers (\(\bar x_n=12\), \(\sigma=3\), \(n=36\), \(z=1.96\)): \(\sigma/\sqrt n=0.5\), so the interval is \([11.02,\,12.98]\). Putting \(\mu=11.02\) back into \((\bar x_n-\mu)/(\sigma/\sqrt n)\) gives \(+1.96\) and \(\mu=12.98\) gives \(-1.96\) — the two ends really did swap. ✓
Used in DPT for: every tail-bound task — exam task type TT7, Chebyshev and Markov; solving a Chebyshev bound for the deviation \(k\) and then rounding up (SoSe25 · P5c); and rearranging \(|\bar X_n-\mu|\le z\sigma/\sqrt n\) into an interval for \(\mu\) — Ex 3.56–3.58, WiSe25 · P5d, §3.4. Fuller treatment: Analysis 1.1 — Ordering.
The triangle inequality
The single most-used inequality in the whole of Analysis. In words: a detour is never shorter than the direct route.
Triangle inequality [Dreiecksungleichung] Analysis 1.3
\[ |a+b|\ \le\ |a|+|b| \qquad\text{for all } a,b\in\R . \]Two rewritings you will actually use. Replacing \(b\) by \(b-a\) gives \(|b|\le|a|+|b-a|\), i.e. \(|b|-|a|\le|b-a|\) — "the sizes cannot differ by more than the distance". And putting \(a=x-y\), \(b=y-z\) gives \(|x-z|\le|x-y|+|y-z|\), the version about three points.
Micro-example and the splitting trick My addition
With \(a=3\) and \(b=-5\): \(|3+(-5)|=|-2|=2\), while \(|3|+|-5|=8\). Indeed \(2\le 8\). The inequality is far from tight when the signs disagree, and is an equality when they agree.
The splitting trick. Suppose \(|a+b|\ge\varepsilon\) for some \(\varepsilon>0\). Then at least one of \(|a|\ge\varepsilon/2\) and \(|b|\ge\varepsilon/2\) must hold. Why: if both failed, then \(|a|<\varepsilon/2\) and \(|b|<\varepsilon/2\), so by the triangle inequality \(|a+b|\le|a|+|b|<\varepsilon/2+\varepsilon/2=\varepsilon\), contradicting the assumption. In event language this is
\[ \{|a+b|\ge\varepsilon\}\ \subseteq\ \{|a|\ge\varepsilon/2\}\cup\{|b|\ge\varepsilon/2\} , \]and then you bound each of the two pieces separately and add the bounds.
Used in DPT for: showing that convergence in probability is preserved under sums, and that a limit in probability is unique — Sheet 9 · Ex 3(i),(iii), worked at §2.4 — and for the Jensen application \(|\mu-m|\le\sigma\) of script Ex 2.43(ii), where \(|\cdot|\) is convex precisely because of this inequality. None of the three past papers used it. Fuller treatment: Analysis 1.3 — Triangle inequality.
Supremum and infimum — "the best bound"
A set of real numbers can have no largest element and still be bounded above: \(\{0,\tfrac12,\tfrac23, \tfrac34,\dots\}\) stays below \(1\) but never reaches it. The supremum is the repair: it is the best upper bound, and it always exists.
Supremum and infimum [Supremum, Infimum] Analysis 1.2
Let \(A\subseteq\R\) be non-empty. A number \(s\) is an upper bound of \(A\) if \(a\le s\) for every \(a\in A\). The supremum \(\sup A\) is the smallest upper bound. Symmetrically, the infimum \(\inf A\) is the largest lower bound.
Two facts you use and nothing more: (1) if \(A\) is non-empty and bounded above, \(\sup A\) exists as a real number (this is the defining property of \(\R\)); (2) if \(\sup A\) happens to lie in \(A\), it is called the maximum \(\max A\). Same for \(\inf\) and \(\min\). If \(A\) is not bounded above one writes \(\sup A=+\infty\).
Micro-example — sup without max My addition
\(A=\{1-\tfrac1n : n=1,2,3,\dots\}=\{0,\ 0.5,\ 0.6\overline{6},\ 0.75,\ 0.8,\ \dots\}\). Every element is \(<1\), so \(1\) is an upper bound; and no number below \(1\) is an upper bound, because \(1-\tfrac1n\) eventually exceeds it. So \(\sup A=1\), but \(1\notin A\), so \(A\) has no maximum. On the other side \(\inf A = 0 = \min A\), attained at \(n=1\).
The one fact DPT needs: a quantile is an infimum Script §2.1, Def 2.20
For \(\alpha\in(0,1)\), the \(\alpha\)-quantile of a random variable \(X\) with cdf \(F_X\) (the function \(F_X(x)=\P(X\le x)\)) is defined as
\[ q_\alpha\ :=\ \inf\{x\in\R \mid F_X(x)\ \ge\ \alpha\} . \]The set inside is "all the places where the cdf has already reached \(\alpha\)". Because \(F_X\) is increasing, that set is a half-line, and the infimum picks its left-hand end.
In words: the \(\alpha\)-quantile is the first point at which the cdf reaches \(\alpha\). The infimum is there only so that the definition still works when the cdf jumps over \(\alpha\) instead of landing on it — which is exactly what happens for discrete random variables.
Micro-example — the median of a three-point distribution My addition
Let \(\P(X=1)=0.3\), \(\P(X=2)=0.5\), \(\P(X=3)=0.2\). Then \(F_X(x)=0\) for \(x<1\), \(=0.3\) on \([1,2)\), \(=0.8\) on \([2,3)\), \(=1\) from \(3\) on. For the median, \(\alpha=0.5\):
\[ \{x \mid F_X(x)\ge 0.5\} = [2,\infty), \qquad\text{so}\qquad q_{0.5}=\inf[2,\infty)=2 . \]Note that \(F_X\) never takes the value \(0.5\) — it jumps from \(0.3\) straight to \(0.8\). Solving "\(F_X(m)=0.5\)" would have no solution; the infimum definition still returns the sensible answer \(m=2\).
Used in DPT for: quantiles and the median (§2.1, SoSe25 · P3c); the quantile transform that simulates any distribution from a uniform one (Ex 2.25, WiSe25 · P3a); the \(z\)- and \(t\)-quantiles of a test (§3.3); and the size of a test, which is a supremum over the null hypothesis, \(\sup_{\theta\in\Theta_0}\P_\theta(\text{reject})\) (Def 3.34(v), §3.4). Fuller treatment: Analysis 1.2 — Upper bounds, supremum and infimum.
The Archimedean fact: \(1/n\) gets below any positive number
A one-line fact that quietly powers every \(\varepsilon\)-argument in the course.
Archimedean property [archimedische Eigenschaft] Analysis 1.2
\[ \text{for every } \varepsilon>0 \text{ there is an } n\in\N \text{ with } \tfrac1n<\varepsilon . \]Equivalently: no real number is larger than every natural number. Take \(n\) to be any integer greater than \(1/\varepsilon\) — with \(\varepsilon=0.003\) that is \(n=334\), and \(1/334=0.002994<0.003\). ✓
Used in DPT for: squeezing a half-open interval out of open ones, \(\bigcap_{k\ge1}\bigl(a-\tfrac1k,\,b\bigr)=[a,b)\) — Sheet 2 Ex 5, and how intervals are shown to be Borel sets (§1.1); the "distinct reals are at least \(1/k\) apart for some \(k\)" step in Sheet 9 Ex 3(iii) (§2.4); and the fact \(\tfrac1n\to0\). Fuller treatment: Analysis 1.2 — The Archimedean property.
Arithmetic in \([0,\infty]\)
Measures are allowed to take the value \(+\infty\), and a series of non-negative terms always has a value in \([0,\infty]\) — either it converges, or its partial sums run off to \(+\infty\), and the script calls that value \(+\infty\) rather than saying "divergent". So a small amount of arithmetic with the symbol \(\infty\) has to be fixed by convention.
The conventions Script §1.1; B4
Sums and products behave as you would guess (\(a+\infty=\infty\), \(c\cdot\infty=\infty\) for \(c>0\), \(a\le\infty\)). Two conventions carry real weight:
- \(0\cdot\infty=0\). This one is a choice, and it is the right one here: a set of measure zero contributes nothing to an integral even where the integrand is infinite.
- \(\infty-\infty\) is left undefined. This is why the script insists on \(\E[|X|]<\infty\) before it writes \(\E[X]\): without it you could be subtracting \(\infty\) from \(\infty\). For the Cauchy distribution the positive and the negative half of \(\E[X]\) are each \(+\infty\), so \(\E[X]\) does not exist (§2.1).
Used in DPT for: the definition of a measure (Def 1.17, values in \([0,\infty]\)); the finiteness condition \(\E[|X|]<\infty\) in Def 2.1; and absolute integrability in Lemma 2.2. Written out slowly on B4 — Arithmetic in [0,∞].
Limits and series
DPT asks you to take a limit in three situations: when an estimator is only asymptotically unbiased or consistent (\(n\to\infty\)); when a binomial turns into a Poisson (the Poisson limit theorem); and inside the proof of the central limit theorem. Series appear whenever you compute a mean or a variance of a discrete distribution. The good news is that the list of limits and series you actually need is short — it is below, in full.
The limit rules
A sequence \((a_n)_{n\ge1}\) is just an infinite list of numbers \(a_1,a_2,a_3,\dots\). Saying \(a_n\to a\) means: whatever tolerance \(\varepsilon>0\) you name, from some index \(n_0\) onwards all the terms sit within \(\varepsilon\) of \(a\).
Rules for limits [Rechenregeln für Grenzwerte] Analysis 2.1
If \(a_n\to a\) and \(b_n\to b\) (both limits real numbers), then
\[ a_n+b_n\to a+b,\qquad a_nb_n\to ab,\qquad c\,a_n\to c\,a,\qquad \frac{a_n}{b_n}\to\frac ab \ \ (\text{provided } b\neq0). \]Also: if \(f\) is continuous at \(a\), then \(f(a_n)\to f(a)\). That last line is what lets you move a limit inside \(\exp\), \(\ln\), a square root or \(x\mapsto 1/x\), and it is the whole reason those functions are allowed to appear in a consistency argument.
Micro-example — \(\dfrac{n}{n+1}\to 1\) My addition
You cannot apply the quotient rule directly: numerator and denominator both run to \(\infty\). The standard repair is to divide top and bottom by the fastest-growing term, here \(n\):
\[ \frac{n}{n+1}=\frac{n/n}{(n+1)/n}=\frac{1}{1+\tfrac1n}. \]Now \(\tfrac1n\to0\), so the denominator \(\to 1+0=1\) by the sum rule, and the quotient rule gives \(\tfrac{1}{1}=1\). Numerically at \(n=100\): \(100/101=0.990099\). The same one-line trick gives \(\tfrac{n}{n-1}\to1\) and \(\tfrac{2n-1}{n^2}\to0\).
Used in DPT for: asymptotic unbiasedness \(\E[\hat\theta_n]\to\theta\) — Ex 3.23 (\(\bar X+\tfrac1n\)), Sheet 10 Ex 1(iii) — and consistency of \(1/\bar X\), where the continuity of \(t\mapsto 1/t\) is the step that is easy to forget (Sheet 10 Ex 2, worked at §3.2). Fuller treatment: Analysis 2.1 — Rules for limits and Analysis 4.1 — Continuity.
The three limits DPT actually needs
Warm-up before the rule — just multiply it out My addition
Set \(x=1\) and compute \(\bigl(1+\tfrac1n\bigr)^{n}\) with a calculator: \(n=1\) gives \(2^{1}=2\); \(n=2\) gives \(1.5^{2}=2.25\); \(n=4\) gives \(1.25^{4}=2.44140625\); \(n=12\) gives \(2.6130353\). The numbers climb towards \(2.7182818\) and never pass it — and that number is \(e\). The rule below is that observation, with \(x\) in place of \(1\).
Three limits — learn these as facts Analysis 2.2, 6.3
\[ \Bigl(1+\frac{x}{n}\Bigr)^{\!n}\ \xrightarrow[n\to\infty]{}\ e^{x} \quad\text{for every fixed } x\in\R, \] \[ \Bigl(1-\frac{\lambda}{n}\Bigr)^{\!n}\ \xrightarrow[n\to\infty]{}\ e^{-\lambda} \quad (\text{the same fact with } x=-\lambda), \] \[ \frac{n}{n+1}\to1,\qquad \frac{n}{n-1}\to1,\qquad \frac1n\to0 . \]A fourth, needed only once: for a fixed \(k\), \(\dfrac{n(n-1)\cdots(n-k+1)}{n^{k}}\to 1\), because the numerator has \(k\) factors, each of which divided by \(n\) tends to \(1\).
Micro-example — the numbers My addition
\(\lambda=2\), \(n=1000\): \((1-0.002)^{1000}=0.135065\), against \(e^{-2}=0.135335\) — close, and the gap shrinks like \(1/n\).
The variable-exponent version, and how to get it My addition
The Poisson limit theorem (§1.2, Thm 1.42, and Sheet 3 Ex 3) does not hand you a fixed \(x\). It hands you numbers \(p_n\) with \(n\,p_n\to\lambda\), and asks for \((1-p_n)^n\to e^{-\lambda}\). The fixed-\(x\) limit above does not cover that, because the exponent's ingredient is itself moving. The repair is to take logarithms:
\[ \ln\bigl[(1-p_n)^n\bigr]\ =\ n\ln(1-p_n) . \]Now use the log series \(\ln(1-u)=-u-\tfrac{u^2}2-\tfrac{u^3}3-\cdots\) for \(|u|<1\), which can be written \(\ln(1-u)=-u\bigl(1+\varepsilon(u)\bigr)\) with \(\varepsilon(u)\to0\) as \(u\to0\). Since \(p_n\to0\) (because \(np_n\to\lambda\) and \(n\to\infty\)),
\[ n\ln(1-p_n)\ =\ -\,n\,p_n\bigl(1+\varepsilon(p_n)\bigr)\ \longrightarrow\ -\lambda\cdot(1+0)\ =\ -\lambda , \]and applying the continuous function \(\exp\) gives \((1-p_n)^n\to e^{-\lambda}\). Check with numbers: \(p_n=2/n\), \(n=1000\): \(n\ln(1-0.002)=-2.00200\), and \(e^{-2.002}=0.13506\), matching the direct computation above.
The official Sheet 3 Ex 3 solution jumps straight from the fixed-\(x\) limit to the moving one. That step needs the argument above; without it the proof has a gap.
Used in DPT for: the Poisson limit theorem (§1.2); step (vi) of the proof of the central limit theorem, where \(\bigl(1-\tfrac{t^2}{2n}+o(\tfrac1n)\bigr)^{n}\to e^{-t^2/2}\) (§2.4); and any "\(n\to\infty\)" claim about an estimator. Fuller treatment: Analysis 2.2 — Euler's number \(e\), Analysis 6.3 — Rules of differentiation (where the limit is proved).
Series: geometric, exponential, telescoping
A series [Reihe] \(\sum_{k=0}^{\infty}a_k\) is the limit of its partial sums \(s_n=\sum_{k=0}^{n}a_k\). If \(s_n\) converges, that limit is the value of the series. When every \(a_k\ge0\) the partial sums increase, so either they converge or they run to \(+\infty\) — there is no third possibility, which is why non-negative series are so much easier to handle.
The geometric series [geometrische Reihe], both forms Analysis 3.1
\[ \text{finite:}\quad \sum_{j=0}^{n-1}q^{\,j}=\frac{1-q^{\,n}}{1-q}\quad (q\neq1), \qquad\qquad \text{infinite:}\quad \sum_{j=0}^{\infty}q^{\,j}=\frac{1}{1-q}\quad (|q|<1). \]Shifted start: \(\sum_{j=1}^{\infty}q^{\,j}=\dfrac{q}{1-q}\) — pull one factor \(q\) out and reuse the formula. Getting the starting index right is where most marks are lost.
Warm-up before the DPT version — halves My addition
Add \(\tfrac12+\tfrac14+\tfrac18=\tfrac78=0.875\). Each new term covers half of what is still missing, so after three terms \(\tfrac18\) is missing, after four \(\tfrac1{16}\), and the running total creeps up to \(1\) without ever reaching it.
That is the shifted formula above with \(q=\tfrac12\): \(\sum_{j\ge1}2^{-j}=\tfrac{q}{1-q}=\tfrac{1/2}{1/2}=1\). ✓
The two differentiated geometric series — the only route to a geometric variance My addition
\[ \sum_{k=1}^{\infty}k\,q^{\,k-1}=\frac{1}{(1-q)^{2}},\qquad \sum_{k=2}^{\infty}k(k-1)\,q^{\,k-2}=\frac{2}{(1-q)^{3}}\qquad (|q|<1). \]Where they come from, in one line: differentiate \(\sum_{k\ge0}q^{k}=\tfrac1{1-q}\) term by term with respect to \(q\) — legal inside the radius of convergence \(|q|<1\) — and the right-hand side \(\tfrac{1}{1-q}=(1-q)^{-1}\) differentiates to \((1-q)^{-2}\) by the chain rule. Differentiating a second time gives the second formula.
The payoff. For \(X\sim\Geo(p)\), which lives on \(\{1,2,\dots\}\) with \(p(k)=(1-p)^{k-1}p\) and \(q:=1-p\), the first formula is the mean: \(\E[X]=\sum_{k\ge1}k\,q^{k-1}p=\tfrac{p}{(1-q)^{2}}=\tfrac{p}{p^{2}}=\tfrac1p\). The second one gives \(\E[X(X-1)]\), hence \(\Var[X]=\tfrac{1-p}{p^{2}}\) (Lemma 2.26(v)); the same two sums do \(\NegBin(r,p)\) in Lemma 2.26(vi). Checks at \(q=0.37\): \(\sum_{k\ge1}kq^{k-1}=2.5195263\) and \(1/(1-q)^{2}=2.5195263\) ✓; \(\sum_{k\ge2}k(k-1)q^{k-2}=7.9984963\) and \(2/(1-q)^{3}=7.9984963\) ✓. At \(p=0.63\) the pmf gives mean \(1.5873016=1/p\) ✓ and variance \(0.9322247=(1-p)/p^{2}\) ✓.
Micro-example My addition
\(q=\tfrac12\): \(\sum_{j\ge0}2^{-j}=1+\tfrac12+\tfrac14+\cdots=\tfrac{1}{1-1/2}=2\) (check: the partial sums \(1,1.5,1.75,1.875,\dots\) climb to \(2\)); and \(\sum_{j\ge1}2^{-j}=\tfrac{1/2}{1/2}=1\), which is the previous answer minus the \(j=0\) term. Finite case \(q=\tfrac13\), \(n=4\): \(1+\tfrac13+\tfrac19+\tfrac1{27}=\tfrac{40}{27}=1.4815\), and \(\tfrac{1-(1/3)^4}{1-1/3}=\tfrac{80/81}{2/3}=1.4815\). ✓
Warm-up before the DPT version — four terms of \(e\) My addition
Take \(x=1\) and add the first four terms by hand: \(1+1+\tfrac12+\tfrac16=2.6666667\), against \(e=2.7182818\).
The next term \(\tfrac1{24}\) lifts it to \(2.7083333\), the one after that \(\tfrac1{120}\) to \(2.7166667\). The terms shrink fast because the denominator \(k!\) grows faster than anything else in sight. The formula below is this sum carried out forever, with \(x\) in place of \(1\).
The exponential series Analysis 3.4
\[ e^{x}=\sum_{k=0}^{\infty}\frac{x^{k}}{k!}\qquad\text{for every } x\in\R, \qquad\text{where } k!=1\cdot2\cdots k \text{ and } 0!=1 . \]The same series holds for a complex \(x\) — nothing in it changes — and that is what makes the standard characteristic-function computation work. Two facts are needed together: the power rule \((e^{it})^{k}=e^{ikt}\) (it is \(\bigl(e^{a}\bigr)^{b}=e^{ab}\) with \(a=it\), \(b=k\)), and the series with \(x=\lambda e^{it}\). Then, for \(X\sim\Poi(\lambda)\),
\[ \varphi_X(t)=\sum_{k=0}^{\infty}e^{itk}\,e^{-\lambda}\frac{\lambda^{k}}{k!} =e^{-\lambda}\sum_{k=0}^{\infty}\frac{(\lambda e^{it})^{k}}{k!} =e^{-\lambda}\exp\bigl(\lambda e^{it}\bigr)=\exp\bigl(\lambda(e^{it}-1)\bigr), \]which is Sheet 8 Ex 1 in three lines (§2.3). Step 1 wrote \(e^{itk}\lambda^{k}=(\lambda e^{it})^{k}\); step 3 combined \(e^{-\lambda}e^{\lambda e^{it}}\) with \(e^{a}e^{b}=e^{a+b}\). Check at \(\lambda=2.3\), \(t=0.7\): summing \(\sum_k e^{itk}e^{-\lambda}\lambda^{k}/k!\) over \(k=0,\dots,79\) gives \(0.0518069+0.5799362\,i\), and \(\exp(\lambda(e^{it}-1))=0.0518069+0.5799362\,i\) ✓.
Micro-example — why the Poisson pmf sums to \(1\) My addition
The \(\Poi(\lambda)\) probability mass function is \(p(k)=e^{-\lambda}\lambda^{k}/k!\) for \(k=0,1,2,\dots\). Summing:
\[ \sum_{k=0}^{\infty}e^{-\lambda}\frac{\lambda^{k}}{k!} \;=\; e^{-\lambda}\sum_{k=0}^{\infty}\frac{\lambda^{k}}{k!} \;=\; e^{-\lambda}\,e^{\lambda}\;=\;e^{0}\;=\;1 . \]The constant \(e^{-\lambda}\) came out of the sum because it does not depend on \(k\); then the remaining sum is the exponential series with \(x=\lambda\). Numerical check at \(\lambda=3\), summing \(k=0\) to \(59\): the total is \(1.0000000\).
Index shift — the move that computes Poisson moments My addition
To compute \(\E[X]\) for \(X\sim\Poi(\lambda)\) you meet \(\sum_{k\ge0}k\,\lambda^k/k!\). The \(k=0\) term is \(0\), so drop it. For \(k\ge1\), cancel: \(k/k!=1/(k-1)!\). Then substitute \(m=k-1\), so that \(k=1\) becomes \(m=0\) and \(\lambda^{k}=\lambda^{m+1}=\lambda\cdot\lambda^m\):
\[ \sum_{k=1}^{\infty}\frac{k\lambda^{k}}{k!} =\sum_{k=1}^{\infty}\frac{\lambda^{k}}{(k-1)!} =\sum_{m=0}^{\infty}\frac{\lambda^{m+1}}{m!} =\lambda\sum_{m=0}^{\infty}\frac{\lambda^{m}}{m!} =\lambda e^{\lambda} . \]Multiplying by the \(e^{-\lambda}\) from the pmf gives \(\E[X]=\lambda\). Check at \(\lambda=3\): the left-hand sum is \(60.2566\), and \(\lambda e^{\lambda}=3e^{3}=60.2566\). ✓
Telescoping [Teleskopsumme] Analysis 3.1
If each term can be written as a difference \(b_m-b_{m+1}\), everything cancels except the two ends: \(\sum_{m=1}^{n}(b_m-b_{m+1}) = b_1-b_{n+1}\).
Micro-example. Partial fractions give \(\dfrac{1}{m(m+1)}=\dfrac1m-\dfrac1{m+1}\). Hence
\[ \sum_{m=1}^{n}\frac{1}{m(m+1)}=1-\frac{1}{n+1}\ \xrightarrow[n\to\infty]{}\ 1 . \]Check at \(n=4\): \(\tfrac12+\tfrac16+\tfrac1{12}+\tfrac1{20}=0.8\), and \(1-\tfrac15=0.8\). ✓ At \(n=10\) both sides give \(0.909090\ldots\) The same cancellation applied to a product gives \(\prod_{i=1}^{n-1}\tfrac{i}{i+1}=\tfrac1n\), which is Sheet 3 Ex 4.
When may a series be rearranged? Analysis 3.3
Reordering the terms of a series can change its value (Riemann's rearrangement theorem). Two safe cases, and DPT only ever uses these two:
- All terms \(\ge0\). Then the value (possibly \(+\infty\)) does not depend on the order, nor on how you group the terms, nor on how you enumerate a countable index set.
- Absolute convergence [absolute Konvergenz]: \(\sum_k|a_k|<\infty\). Same conclusion.
The DPT places where this matters. \(\sigma\)-additivity of a measure, \(\mu\bigl(\bigcup_i A_i\bigr)=\sum_i\mu(A_i)\) for pairwise disjoint \(A_i\), must not depend on how the sets \(A_i\) are numbered — safe, because measures are non-negative (Def 1.17, Lemma 1.35(ii), Remark 1.38, §1.1). And the script's definition of \(\E[X]\) demands \(\E[|X|]<\infty\) first (Def 2.1), precisely so that the sum \(\sum_\omega X(\omega)p(\omega)\) is order-independent (§2.1). Swapping the order of a double sum of non-negative terms is the same fact in two indices, and is Sheet 7 Ex 3(i).
Monotone bounded sequences converge
Monotone convergence for sequences Analysis 2.2
If \((x_n)\) is increasing (\(x_1\le x_2\le\cdots\)) and bounded above, then \(x_n\) converges to \(\sup_n x_n\); decreasing and bounded below gives convergence to \(\inf_n x_n\). You never have to find the limit to know it exists — for example \(x_n=1-\tfrac1n\) increases below \(1\), so it converges, to \(\sup_n x_n=1\).
Read it, do not compute with it. It is the engine behind the continuity of measures (\(A_n\uparrow A\Rightarrow\mu(A_n)\uparrow\mu(A)\), Prop 1.19(iv),(v), §1.1) and behind a cdf's limits \(0\) and \(1\) at \(\mp\infty\) (Lemma 1.24, §1.1). Fuller treatment: Analysis 2.2 — Monotone sequences.
Powers, exp and log
This is the single most-used block of Analysis in the whole course. The exponential function is the shape of the \(\Exp\), \(\Poi\), \(\mathrm{Gamma}\) and normal families; the logarithm is how every likelihood is turned into something differentiable; and every "solve for the median / the quantile / the parameter" step is an equation with \(\exp\) or \(\ln\) in it. Work through this section until the rules are automatic — it pays for itself several times on any past paper.
The rules for \(\exp\) and for powers
The rules Analysis 3.4, 5.2
\[ e^{a+b}=e^{a}e^{b},\qquad e^{-a}=\frac{1}{e^{a}},\qquad e^{0}=1,\qquad \bigl(e^{a}\bigr)^{b}=e^{ab},\qquad e^{a}>0 \text{ for every } a . \]Same rules for any base: \(a^{m+k}=a^{m}a^{k}\), \(a^{-k}=1/a^{k}\), \((a^{m})^{k}=a^{mk}\). And for a real exponent \(\alpha\) the definition is the exponential:
\[ x^{\alpha}\ :=\ e^{\alpha\ln x}\qquad\text{for } x>0 . \]That is not a trick; it is how \(x^{1/2}\) or \(x^{\alpha-1}\) with \(\alpha=2.7\) is defined at all. Limits: \(e^{-x}\to0\) as \(x\to+\infty\), and \(e^{x}\to+\infty\); \(\exp\) is strictly increasing, so it never returns the same value twice.
Micro-example — the three rules in one line each My addition
- \(8^{1/3}=e^{\frac13\ln 8}=e^{\frac13\cdot2.0794}=e^{0.6931}=2\). ✓
- \(\bigl((2\pi s^2)^{-1/2}\bigr)^{3}=(2\pi s^2)^{-3/2}\): with \(s^2=4\), the left side is \(0.19947^{3}=0.0079367\) and the right side is \((25.13)^{-1.5}=0.0079367\). ✓ This is exactly the step that turns \(n\) copies of a normal density into the factor \((2\pi\sigma^2)^{-n/2}\) in a likelihood.
- \(\dfrac{e^{-\lambda(t+s)}}{e^{-\lambda s}}=e^{-\lambda(t+s)+\lambda s}=e^{-\lambda t}\).
DPT micro-example 1 — memorylessness WiSe25 · P3b
\(X\sim\Exp(\lambda)\) has survival function \(\P(X\ge t)=e^{-\lambda t}\) for \(t\ge0\). Asked for \(\P(X\ge 10\mid X\ge 5)\), the conditional probability \(\P(A\mid B)=\P(A\cap B)/\P(B)\) (Def 1.69). Since \(\{X\ge10\}\subseteq\{X\ge5\}\), the intersection is \(\{X\ge10\}\), so
\[ \P(X\ge10\mid X\ge5)=\frac{e^{-10\lambda}}{e^{-5\lambda}}=e^{-10\lambda+5\lambda}=e^{-5\lambda} =\P(X\ge5)=p . \]The whole computation is the single rule \(e^{a}/e^{b}=e^{a-b}\). Check with \(\lambda=0.2\): \(e^{-2}/e^{-1}=0.13534/0.36788=0.36788=e^{-1}\). ✓ The answer is \(p\), the number you were given — which is the point of the task: the exponential forgets how long it has already waited (§1.4).
The rules for \(\ln\)
\(\ln\) (also written \(\log\) in this course — there is no base-10 logarithm anywhere in DPT) is the inverse of \(\exp\): it undoes it. It is defined only for \(x>0\).
The rules Analysis 5.2
\[ \ln(e^{a})=a,\qquad e^{\ln x}=x \ (x>0),\qquad \ln 1=0,\qquad \ln e=1, \] \[ \ln(xy)=\ln x+\ln y,\qquad \ln\frac{x}{y}=\ln x-\ln y,\qquad \ln(x^{\alpha})=\alpha\ln x . \]Signs and monotonicity: \(\ln x<0\) for \(0<x<1\), \(\ln 1=0\), \(\ln x>0\) for \(x>1\); \(\ln x\to-\infty\) as \(x\downarrow0\). \(\ln\) is strictly increasing, so for \(A,B>0\)
\[ A\le B \iff \ln A\le \ln B , \]which is the entire justification for maximising a log-likelihood instead of a likelihood: the two have their maximum at the same place.
DPT micro-example 2 — simplifying a likelihood's logarithm SoSe25 · P4a
\(X_1,\dots,X_n\) are iid \(\Poi(\lambda)\) ("iid" = independent and identically distributed). The likelihood is the joint pmf read as a function of \(\lambda\); independence turns it into a product:
\[ L(\lambda)=\prod_{i=1}^{n}e^{-\lambda}\frac{\lambda^{x_i}}{x_i!} \;\overset{(1)}{=}\; e^{-n\lambda}\,\frac{\lambda^{\sum_i x_i}}{\prod_i x_i!} . \]Step (1) is three exponent rules at once: \(n\) copies of \(e^{-\lambda}\) multiply to \(e^{-\lambda}\cdots e^{-\lambda}=e^{-n\lambda}\) by \(e^{a}e^{b}=e^{a+b}\); the powers of \(\lambda\) add their exponents; the factorials just collect. Now take \(\ln\), using \(\ln(xy)=\ln x+\ln y\), \(\ln(x/y)=\ln x-\ln y\) and \(\ln(x^{\alpha})=\alpha\ln x\):
\[ \ell(\lambda)\;=\;\ln L(\lambda)\;=\;-n\lambda+\Bigl(\sum_{i=1}^{n}x_i\Bigr)\ln\lambda -\sum_{i=1}^{n}\ln(x_i!) . \]The product has become a sum, and the last term does not contain \(\lambda\) at all, so it will vanish when you differentiate. That is the whole reason for taking the logarithm. Check: maximising \(\ell\) numerically over \(\lambda\) for the data \(2,3,5,4,1\) gives \(\hat\lambda=3.0000\), which is \(\bar x=15/5=3\). ✓ Continue at finding the maximum and §3.2.
DPT micro-example 3 — a log-likelihood with a parameter in the denominator WiSe25 · P4a
Rainfall model: \(p_\theta(x)=\theta^{-2}\,x\,e^{-x/\theta}\) for \(x>0\), \(\theta>0\). For iid data \(x_1,\dots,x_n\),
\[ \ell(\theta)=\sum_{i=1}^{n}\ln\bigl(\theta^{-2}x_i e^{-x_i/\theta}\bigr) =\sum_{i=1}^{n}\Bigl(-2\ln\theta+\ln x_i-\frac{x_i}{\theta}\Bigr) =-2n\ln\theta+\sum_{i=1}^{n}\ln x_i-\frac1\theta\sum_{i=1}^{n}x_i . \]Three rules were used inside the logarithm: \(\ln(abc)=\ln a+\ln b+\ln c\), \(\ln(\theta^{-2})=-2\ln\theta\), and \(\ln(e^{-x/\theta})=-x/\theta\). Differentiating (next section) and setting the result to zero gives \(-\tfrac{2n}{\theta}+\tfrac{1}{\theta^{2}}\sum_i x_i=0\), hence \(\hat\theta=\tfrac{1}{2n}\sum_i x_i\). Check with data \(1.2,\,3.4,\,2.0,\,5.1\): a numerical search over \(\theta\) maximises \(\ell\) at \(1.46249\), and the formula gives \(11.7/8=1.4625\). ✓
Solving an equation with \(\ln\)
The recipe never changes: isolate the exponential on one side, take \(\ln\) of both sides, then use \(\ln(e^{a})=a\). The only thing to watch is that if you then divide by a negative number, the inequality signs flip.
DPT micro-example 4 — the median of \(\Exp(\lambda)\) Script §2.1, Ex 2.21
\(X\sim\Exp(\lambda)\) has cdf \(F(x)=1-e^{-\lambda x}\) for \(x\ge0\). The median \(m\) solves \(F(m)=\tfrac12\):
\[ 1-e^{-\lambda m}=\tfrac12 \ \Longrightarrow\ e^{-\lambda m}=\tfrac12 \ \Longrightarrow\ -\lambda m=\ln\tfrac12=-\ln 2 \ \Longrightarrow\ m=\frac{\ln 2}{\lambda} . \]Line 2 → line 3 took \(\ln\) of both sides and used \(\ln(e^{a})=a\) on the left; line 3 → line 4 divided by \(-\lambda\), which is a negative number, but this is an equation, not an inequality, so nothing flips. Check at \(\lambda=2\): \(m=0.693/2=0.34657\), and \(F(0.34657)=1-e^{-0.69315}=0.5\) exactly. ✓ At \(\lambda=\tfrac12\): \(m=1.38629\), and \(F(m)=0.5\). ✓
Worth memorising as a fact: the median of \(\Exp(\lambda)\) is \(\ln 2/\lambda\), which is smaller than the mean \(1/\lambda\) because \(\ln 2=0.693<1\). The distribution is right-skewed, so its mean sits to the right of its median.
DPT micro-example 5 — inverting a cdf (the quantile transform) WiSe25 · P3a
\(U\sim\Unif(0,1)\), and \(X:=-\tfrac1\lambda\ln U\). Find the distribution of \(X\). Compute the cdf directly, for \(x\ge0\):
\[ F_X(x)=\P(X\le x) =\P\Bigl(-\tfrac1\lambda\ln U\le x\Bigr) \overset{(1)}{=}\P\bigl(\ln U\ge-\lambda x\bigr) \overset{(2)}{=}\P\bigl(U\ge e^{-\lambda x}\bigr) \overset{(3)}{=}1-e^{-\lambda x} . \]Step (1): multiply both sides of the inequality inside by \(-\lambda<0\), so the inequality flips — this is the one place marks are lost. Step (2): apply \(\exp\), which is strictly increasing, so the direction is preserved, and \(e^{\ln U}=U\). Step (3): for \(U\sim\Unif(0,1)\), \(\P(U\ge u)=1-u\) whenever \(u\in[0,1]\), and \(e^{-\lambda x}\in(0,1]\) for \(x\ge0\). The answer \(1-e^{-\lambda x}\) is the cdf of \(\Exp(\lambda)\), so \(X\sim\Exp(\lambda)\). Differentiating gives the density \(p_X(x)=\lambda e^{-\lambda x}\) on \((0,\infty)\) and \(0\) elsewhere — and stating the support is part of the answer on that exam task.
Check with numbers (\(\lambda=1.5\), \(u=0.3\)): \(x=-\ln(0.3)/1.5=0.80265\), and \(F_X(0.80265)=1-e^{-1.5\cdot0.80265}=1-0.3=0.7\). That is exactly \(\P(U\ge0.3)\). ✓
DPT micro-example 6 — an integral you get for free WiSe25 · P3c
With \(X=-\tfrac1\lambda\ln U\) as above and \(\E[X]=1/\lambda\) known for \(\Exp(\lambda)\), the change-of-variables formula for expectations (LOTUS, Lemma 2.2) says \(\E[g(U)]=\int_0^1 g(u)\,\mathrm du\) for \(U\sim\Unif(0,1)\). With \(g(u)=-\tfrac1\lambda\ln u\):
\[ \frac1\lambda=\E[X]=\int_0^1\Bigl(-\tfrac1\lambda\ln u\Bigr)\mathrm du =-\frac1\lambda\int_0^1\ln u\,\mathrm du \quad\Longrightarrow\quad \int_0^1\ln u\,\mathrm du=-1 . \]Check: the antiderivative of \(\ln u\) is \(u\ln u-u\), so \([u\ln u-u]_0^1=(0-1)-(0-0)=-1\); numerical integration gives \(-1.0000000\). ✓ The task is a probability fact used backwards to evaluate an integral (§2.1).
Solving a quadratic cdf equation, and picking the right root
Not every cdf is an exponential. When the density is a polynomial, the cdf is one too, and inverting it means solving a quadratic. Two lines of school algebra, plus one line that is worth credit: a quadratic has two roots and only one of them is inside the support.
The two moves My addition
1. Complete the square [quadratische Ergänzung] to make \(x\) appear once instead of twice:
\[ x^{2}+bx \;=\; \Bigl(x+\tfrac b2\Bigr)^{2}-\tfrac{b^{2}}{4}\qquad \text{(add and subtract the same } b^{2}/4\text{).} \]2. Take the root, then throw one away. \((x+a)^{2}=c\) gives \(x=-a\pm\sqrt c\) — two numbers. Keep the one inside the support and say in one sentence why the other is discarded. (The formula \(x=\tfrac{-b\pm\sqrt{b^{2}-4ac}}{2a}\) does the same job.) Check of the identity at \(b=-3\), \(x=1.7\): \(x^{2}+bx=-2.2100000\) and \((x-1.5)^{2}-2.25=-2.2100000\) ✓.
The same identity inside an \(\exp\) is the whole trick behind adding two Gaussians and behind the characteristic function of the normal (Sheet 7 Ex 2(iii), Sheet 8 Ex 5(v), Lemma 2.53) — both sheets mark that computation as too long for an exam.
Two worked instances Sheet 5 · Ex 1(iv),(v); Sheet 7 · Ex 4(i)
(a) The 5 % value at risk. A return \(R\) has \(F_R(r)=(r+3)^{2}/15\) on \([-3,0)\). Solve \((r+3)^{2}/15=0.05\), so \((r+3)^{2}=0.75\) and \(r=-3\pm\sqrt{0.75}\): the roots are \(-2.1339746\) and \(-3.8660254\), and the second is outside \([-3,0)\). So \(r_{0.05}=-2.1339746\) and the loss is \(2.134\). Check: \((-2.1339746+3)^{2}/15=0.0500000\) ✓. The median is the same with \(0.5\): \(r_{0.5}=-3+\sqrt{7.5}=-0.2613872\), \(F_R=0.5000000\) ✓.
(b) Inverting \(F(x)=2x-x^{2}\) on \([0,1]\). Setting \(F(x)=u\) gives \(x^{2}-2x+u=0\). Complete the square (\(b=-2\), so \(b/2=-1\)): \((x-1)^{2}-1+u=0\), i.e. \((x-1)^{2}=1-u\), so \(x=1\pm\sqrt{1-u}\). The \(+\) root lies in \((1,2)\), outside \([0,1]\), so \(x=1-\sqrt{1-u}\). Check at \(u=0.36\): \(x=0.2000000\) and \(F(0.2)=0.3600000\) ✓.
Two habits these drill. Decide which branch you are in before solving: in (a), \(F_R(0)=9/15=0.6>0.05\), so the quantile is in the first branch. And when a cdf has several branches, each starts from the value already accumulated: on \([0,2)\) it is \(F_R(0)+\int_0^{r}\tfrac15(2-t)\mathrm dt=\tfrac{6+4r-r^{2}}{10}\), not just the integral. Check the joins — at \(r=0\) both branches give \(0.6000000\) ✓ and at \(r=2\) the last gives \(1.0000000\) ✓ (Sheet 5 Ex 1(ii)). Inverse transform sampling: Sheet 7 Ex 4, §1.3; quantiles: §2.1.
Derivative and antiderivative of each
Everything in this table is used somewhere on a past paper. \(C\) denotes an arbitrary constant, which the antiderivative is only determined up to.
| Function \(f(x)\) | Derivative \(f'(x)\) | Antiderivative \(\int f\,\mathrm dx\) | Where DPT uses it |
|---|---|---|---|
| \(e^{x}\) | \(e^{x}\) | \(e^{x}+C\) | every exponential-family density |
| \(e^{-\lambda x}\) | \(-\lambda e^{-\lambda x}\) | \(-\tfrac1\lambda e^{-\lambda x}+C\) | \(\Exp(\lambda)\): normalisation, cdf, mean |
| \(\ln x\) \((x>0)\) | \(\tfrac1x\) | \(x\ln x-x+C\) | log-likelihoods; WiSe25 · P3c |
| \(\ln f(x)\) | \(\dfrac{f'(x)}{f(x)}\) (chain rule) | read backwards: \(\displaystyle\int\frac{f'(x)}{f(x)}\mathrm dx=\ln|f(x)|+C\) | differentiating any log-likelihood; the \(f'/f\) box below |
| \(x^{a}\), \(a\neq-1\) | \(a\,x^{a-1}\) | \(\dfrac{x^{a+1}}{a+1}+C\) | polynomial densities, \(\mathrm{Gamma}\), Beta |
| \(\tfrac1x\) | \(-\tfrac1{x^{2}}\) | \(\ln|x|+C\) | the \(a=-1\) exception; divergent integrals |
| \(\sqrt{x}=x^{1/2}\) | \(\dfrac{1}{2\sqrt x}\) | \(\tfrac23 x^{3/2}+C\) | density of \(U^{2}\), Sheet 4 Ex 4 |
\(\displaystyle\int\frac{f'}{f}=\ln|f|\) — and the one exercise that needs it backwards Sheet 5 · Ex 2
The row above says \((\ln f)'=f'/f\). Read from right to left it says: whenever an integrand is a function's derivative divided by the function itself, the antiderivative is \(\ln\) of that function. Micro-check: \(\int_0^1\frac{2x}{1+x^{2}}\,\mathrm dx =\bigl[\ln(1+x^{2})\bigr]_0^1=\ln 2=0.6931472\), and numerical integration gives \(0.6931472\) ✓ — the numerator \(2x\) is exactly the derivative of the denominator \(1+x^{2}\).
Where DPT needs it. The "\(\Leftarrow\)" half of Sheet 5 Ex 2 — the half that shows the exponential is the only memoryless distribution — arrives at \(f'(x)/f(x)=c\) for a constant \(c\), where \(f(x)=\P(X>x)\). Integrate both sides from \(0\) to \(t\):
\[ \int_0^{t}\frac{f'(x)}{f(x)}\,\mathrm dx=\bigl[\ln f(x)\bigr]_0^{t}=\ln f(t)-\ln f(0), \qquad \int_0^{t}c\,\mathrm dx=ct . \]Now \(f(0)=\P(X>0)=1\) and \(\ln 1=0\), so \(\ln f(t)=ct\), that is \(f(t)=e^{ct}\). Since \(f(t)=\P(X>t)\to0\) as \(t\to\infty\), the constant must satisfy \(c<0\); writing \(c=-\lambda\) with \(\lambda>0\) gives \(\P(X>t)=e^{-\lambda t}\), which is \(\Exp(\lambda)\). Check with \(\lambda=0.7\), \(t=2\): \(\int_0^{2}(-0.7)\,\mathrm dx=-1.4000000\) and \(\ln f(2)-\ln f(0)=\ln e^{-1.4}-0=-1.4000000\) ✓.
Two traps My addition
The missing \(-1/\lambda\). \(\int_0^{\infty}\lambda e^{-\lambda x}\mathrm dx =\bigl[-e^{-\lambda x}\bigr]_0^{\infty}=0-(-1)=1\). If you forget that differentiating \(e^{-\lambda x}\) produces the extra factor \(-\lambda\), the density will not integrate to \(1\) and every later answer inherits the error.
\(\ln\) needs a positive argument. Writing \(\ln p_\theta(x)\) is only legitimate where \(p_\theta(x)>0\), that is on the support. On a likelihood this is normally automatic, because the observed data have positive density; but for a distribution whose support depends on the parameter — the \(\Unif(0,\theta)\) model of Sheet 10 Ex 1 — the likelihood is \(0\) for some \(\theta\), the logarithm is undefined there, and the maximum sits at the boundary, not at a point where a derivative vanishes. See finding the maximum.
Fuller treatment: Analysis 3.4 — The exponential function, Analysis 5.2 — The logarithm, Analysis 5.2 — General powers and logarithms to base \(b\), Analysis 5.2 — Growth rates, Analysis 8.3 — Antiderivatives. Where this appears on past papers: TT4 — transform a random variable and TT5 — compute a maximum likelihood estimator.
Differentiation — the rules you use
The derivative [Ableitung] of a function \(f\) at a point \(x\) is the slope of its graph there: how fast \(f\) changes when \(x\) changes a little. It is written \(f'(x)\), or \(\frac{\mathrm df}{\mathrm dx}(x)\), or \(\frac{\mathrm d}{\mathrm dx}f(x)\) — three names for one thing. The formal version is \(f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}\): take two points a distance \(h\) apart, form \(\frac{\text{rise}}{\text{run}}\), and let the two points slide together.
In DPT you almost never use that limit. You use four rules plus a table of seven derivatives, and you use them for exactly three jobs: turning a cdf back into a density, differentiating a log-likelihood to find a maximum, and differentiating a characteristic function to read off a moment.
The four rules My addition
Throughout, \(f\) and \(g\) are functions of \(x\), and \(a,b\) are constants (numbers that do not depend on \(x\)).
- Linearity [Linearität]: \((a f + b g)' = a f' + b g'\). Constants slide out, sums split. A constant on its own has derivative \(0\): \((7)'=0\).
- Product rule [Produktregel]: \((f\cdot g)' = f'g + f g'\). "First differentiated times second, plus first times second differentiated."
- Quotient rule [Quotientenregel]: \(\left(\dfrac{f}{g}\right)' = \dfrac{f'g - f g'}{g^{2}}\), valid where \(g(x)\neq0\). The minus sign and the order of the two terms in the numerator are what people get wrong; the denominator is always the square of the bottom function.
- Chain rule [Kettenregel]: \(\bigl(f(g(x))\bigr)' = f'\bigl(g(x)\bigr)\cdot g'(x)\). "Outer derivative, evaluated at the inner function, times the inner derivative." The factor \(g'(x)\) is the one that gets forgotten, and forgetting it is the single most expensive error in this whole page.
| \(f(x)\) | \(f'(x)\) | Where DPT needs it |
|---|---|---|
| \(x^{a}\) (any real \(a\)) | \(a\,x^{a-1}\) | polynomial densities; \(\sqrt{x}=x^{1/2}\) has \(f'=\tfrac{1}{2\sqrt x}\) (Sheet 4 Ex 4) |
| \(\tfrac1x = x^{-1}\) | \(-\tfrac1{x^{2}}\) | log-likelihoods with \(\theta\) in a denominator (WiSe25 · P4a) |
| \(e^{x}\) | \(e^{x}\) | the function that is its own derivative |
| \(e^{a x}\) | \(a\,e^{a x}\) | chain rule with inner \(g(x)=ax\); every exponential density |
| \(e^{g(x)}\) | \(g'(x)\,e^{g(x)}\) | the normal density, where \(g(x)=-\tfrac{(x-\mu)^2}{2\sigma^2}\) |
| \(\ln x\) \((x>0)\) | \(\tfrac1x\) | every log-likelihood |
| \(\ln g(x)\) | \(\dfrac{g'(x)}{g(x)}\) | chain rule again; this is how \(\ln L(\theta)\) gets differentiated in one line |
| \(\sin x\) | \(\cos x\) | characteristic functions, where \(e^{itx}=\cos(tx)+i\sin(tx)\); reading a moment off \(\varphi^{(n)}(0)\) (SoSe26 · P4c, box below); the substitution \(x=\sin u\) (trig substitution) |
| \(\cos x\) | \(-\sin x\) |
Micro-example 1 — differentiate the exponential cdf Script §1.3, Ex 1.61(iv)
\(F(x)=1-e^{-\lambda x}\) for \(x\ge0\), with \(\lambda>0\) a fixed parameter. Differentiate term by term (linearity): the \(1\) gives \(0\), and \(-e^{-\lambda x}\) is \(-1\) times \(e^{g(x)}\) with \(g(x)=-\lambda x\), \(g'(x)=-\lambda\). So
\[ F'(x) \;=\; 0 - \bigl(-\lambda\bigr)e^{-\lambda x} \;=\; \lambda e^{-\lambda x}. \]That is exactly the \(\Exp(\lambda)\) density. The two minus signs cancelling is the whole content of the calculation, and dropping one of them gives a "density" that is negative everywhere. Check (\(\lambda=1.4\), \(x=0.7\)): the numerical slope of \(F\) there is \(0.5254355\), and \(1.4\,e^{-0.98}=0.5254355\). ✓
Micro-example 2 — the product rule on \(x\mapsto x e^{-x}\) My addition
This is the \(\mathrm{Gamma}(2,1)\) density shape, and it is also the function whose maximum you find when you locate the mode of that distribution. Set \(f(x)=x\) and \(g(x)=e^{-x}\), so \(f'=1\) and \(g'=-e^{-x}\):
\[ \bigl(x e^{-x}\bigr)' \;=\; \underbrace{1\cdot e^{-x}}_{f'g} \;+\; \underbrace{x\cdot(-e^{-x})}_{fg'} \;=\; (1-x)\,e^{-x}. \]Factoring out \(e^{-x}\) in the last step is legitimate because \(e^{-x}\) is never \(0\). Since \(e^{-x}>0\) always, the sign of the derivative is the sign of \(1-x\): positive for \(x<1\), negative for \(x>1\). So the function rises, then falls, and its highest point is at \(x=1\). Check: the numerical slope at \(x=0.4\) is \(0.4021920\), and \((1-0.4)e^{-0.4}=0.4021920\); a numerical maximiser puts the peak at \(x=1.000001\). ✓ That sign argument is the same one you will use for maximum likelihood, at finding a maximum.
Micro-example 3 — the quotient rule My addition
\(h(x)=\dfrac{x}{1+x^{2}}\) — up to a constant this is the Cauchy density's cousin, and the same shape turns up whenever a density has a polynomial on top and a polynomial underneath. With \(f(x)=x\) (\(f'=1\)) and \(g(x)=1+x^{2}\) (\(g'=2x\)):
\[ h'(x)=\frac{f'g-fg'}{g^{2}}=\frac{1\cdot(1+x^{2}) - x\cdot 2x}{(1+x^{2})^{2}} =\frac{1+x^{2}-2x^{2}}{(1+x^{2})^{2}}=\frac{1-x^{2}}{(1+x^{2})^{2}} . \]Check at \(x=2\): the formula gives \((1-4)/25=-0.12\), and the numerical slope is \(-0.1200000\). ✓
Micro-example 4 — the normal density Script §1.3, Ex 1.61(ii)
Write \(\varphi(z)=\tfrac{1}{\sqrt{2\pi}}e^{-z^{2}/2}\) for the standard normal density (the \(\mathcal N(0,1)\) bell curve). The factor \(\tfrac1{\sqrt{2\pi}}\) is a constant, so it just rides along. Chain rule with \(g(z)=-z^{2}/2\) and \(g'(z)=-z\):
\[ \varphi'(z)=\frac{1}{\sqrt{2\pi}}\cdot(-z)\,e^{-z^{2}/2} \;=\; -z\,\varphi(z). \]Two facts you get for free. \(\varphi'(z)=0\) exactly at \(z=0\), which is the peak; and \(\varphi'\) changes sign from \(+\) to \(-\) there, so the peak is a maximum. Differentiating once more (product rule on \(-z\cdot\varphi(z)\)) gives \(\varphi''(z)=(z^{2}-1)\varphi(z)\), which is \(0\) at \(z=\pm1\): the two inflection points of the bell curve sit one standard deviation from the centre. For \(\mathcal N(\mu,\sigma^{2})\) they sit at \(\mu\pm\sigma\) (§1.3, the zoo).
Micro-example 5 — differentiating a log-likelihood in \(\theta\) WiSe25 · P4a
Here the variable you differentiate with respect to is the parameter \(\theta\), not the data. The data \(x_1,\dots,x_n\) are fixed numbers while you differentiate. From the logarithm rules, the log-likelihood of the rainfall model was
\[ \ell(\theta) \;=\; -2n\ln\theta \;+\; \sum_{i=1}^{n}\ln x_i \;-\; \frac{1}{\theta}\sum_{i=1}^{n}x_i , \qquad \theta>0 . \]Differentiate term by term. The first term: \(\tfrac{\mathrm d}{\mathrm d\theta}\ln\theta=\tfrac1\theta\), so it contributes \(-\tfrac{2n}{\theta}\). The middle term contains no \(\theta\), so it contributes \(0\) — this is why dropping it early is safe and why you say so in the exam. The last term is \(-s\cdot\theta^{-1}\) with \(s:=\sum_i x_i\) a constant, and \((\theta^{-1})'=-\theta^{-2}\), so it contributes \(+s\theta^{-2}\). Together:
\[ \ell'(\theta) \;=\; -\frac{2n}{\theta} + \frac{s}{\theta^{2}} \;=\; \frac{s-2n\theta}{\theta^{2}} . \]The last step put both terms over the common denominator \(\theta^{2}\), which is the form you want: the denominator is positive for every \(\theta>0\), so the sign of \(\ell'\) is the sign of \(s-2n\theta\). That single observation is what turns a local maximum into a global one at the next section. Check with data \(1.2,\,3.4,\,2.0,\,5.1\) (\(n=4\), \(s=11.7\)): a numerical maximiser of \(\ell\) returns \(\theta=1.4625003\), and \(s/(2n)=11.7/8=1.4625\). ✓
Micro-example 6 — reading a moment off a characteristic function SoSe26 · P4c
A characteristic function is \(\varphi_X(t)=\E[e^{itX}]\); the fact you need here is \(\E[X^{n}]=i^{-n}\varphi_X^{(n)}(0)\), where \(\varphi^{(n)}\) is the \(n\)-th derivative and \(i^{2}=-1\) (Rem 2.47(iii), §2.3). On that exam \(\varphi_{Z_n}(t)=\cos^{n}(t/\sqrt n)\); take \(n=1\), so \(\varphi(t)=\cos t\). Using the two new table rows,
\[ \varphi'(t)=-\sin t\ \Rightarrow\ \varphi'(0)=-\sin 0=0,\qquad \varphi''(t)=-\cos t\ \Rightarrow\ \varphi''(0)=-1 . \]Hence \(\E[X]=\varphi'(0)/i=0/i=0\) and \(\E[X^{2}]=\varphi''(0)/i^{2}=(-1)/(-1)=1\), so \(\Var[X]=1-0^{2}=1\). That is the alternative route the official solution accepted for full marks. Check: the numerical second difference of \(\cos\) at \(0\) gives \(-1.0000001\) ✓; the numerical slope of \(\cos\) at \(0.9\) is \(-0.7833269=-\sin(0.9)\) ✓.
"Differentiate the cdf to get the density" — what that means in practice Script §1.3, Lemma 1.49
The cdf [Verteilungsfunktion] of a random variable \(X\) is \(F_X(x)=\P(X\le x)\), the probability of landing at or below \(x\). If \(X\) has a density [Dichte] \(p_X\), then \(F_X(x)=\int_{-\infty}^{x}p_X(t)\,\mathrm dt\), and the fundamental theorem of calculus (next section) runs that backwards: \(F_X'(x)=p_X(x)\).
The practical recipe, which is what an exam wants:
- Write the cdf in its branches. A typical answer has three: \(0\) below the support, a formula on the support, \(1\) above it.
- Differentiate each branch separately. The constant branches \(0\) and \(1\) differentiate to \(0\), so the density is \(0\) off the support — and saying that explicitly is worth credit (WiSe25 · P3a: "Be sure to correctly specify the support").
- At the two corner points where the branches meet, \(F_X\) usually has a kink and no derivative. That does not matter: a density may be changed on finitely many points without changing any probability, so give those points whatever value you like (\(0\) is tidy). Write the density with the same branch structure.
- Sanity check: the result must be \(\ge0\) everywhere and must integrate to \(1\).
This is TT4 on the exam page in one of its two routes — see TT4 — transform a random variable, and the worked pdf↔cdf widget at §1.3. The other route, which two past papers asked for by name, is the transformation formula below.
Fuller treatment: Analysis 6.2 — Differentiability, Analysis 6.3 — Rules of differentiation (product, quotient, chain, and the inverse-function rule), Analysis 7.5 — Higher derivatives. More slowly, from nothing: B1 — the five Analysis facts DPT leans on. Where DPT uses it: §1.3 densities, §3.2 the estimation primer, §2.3 characteristic functions.
The transformation formula \(p_Y(y)=p_X(g^{-1}(y))\,|(g^{-1})'(y)|\)
You know the density of \(X\) and you are asked for the density of \(Y=g(X)\). There are two routes. The cdf route is the one above: compute \(\P(g(X)\le y)\) and differentiate. The transformation formula [Transformationssatz] does it in one line instead, and both WiSe25 · P3a (4 credits) and SoSe25 · P3d (3 credits, printed as the hint) want exactly this. It needs \(g\) to be strictly monotone — strictly increasing or strictly decreasing — on the support of \(X\), so that \(g\) can be undone.
The recipe, four steps Script §2.3, Prop 2.51
\[ p_Y(y)\;=\;p_X\bigl(g^{-1}(y)\bigr)\cdot\Bigl|\tfrac{\mathrm d}{\mathrm dy}g^{-1}(y)\Bigr| . \]Here \(g^{-1}\) is the inverse function [Umkehrfunktion] of \(g\): the function that undoes it, \(g^{-1}(g(x))=x\). The four steps, in the order you write them:
- Invert. Write \(y=g(x)\) and solve algebraically for \(x\). What you get is \(x=g^{-1}(y)\). (Example: \(y=\ln x\) gives \(x=e^{y}\).)
- Differentiate the inverse, in \(y\). If solving for \(x\) was messy, the inverse-function rule \(\bigl(g^{-1}\bigr)'(y)=\dfrac{1}{g'\bigl(g^{-1}(y)\bigr)}\) gives the same number without a second inversion.
- Take the absolute value. A density cannot be negative. If \(g\) decreases, the derivative of \(g^{-1}\) is negative and the bars are doing real work; if \(g\) increases they change nothing, and you write them anyway.
- Map the support. Push the old support through \(g\): the new support is \(\{g(x) : x\in\text{support of }X\}\). This step is separately worth credit — the WiSe paper prints "Be sure to correctly specify the support of \(X\)" — and it is the step students skip.
Warm-up before the exam versions — a straight line on a uniform My addition
\(X\sim\Unif(0,1)\): density \(p_X(x)=1\) for \(x\) between \(0\) and \(1\), and \(0\) outside. Let \(Y=g(X)=3X+2\). Run the four steps on numbers small enough to check by eye.
- Invert: \(y=3x+2\). Subtract \(2\): \(y-2=3x\). Divide by \(3\): \(x=\tfrac{y-2}{3}\). So \(g^{-1}(y)=\tfrac{y-2}{3}\).
- Differentiate in \(y\): \(\tfrac{\mathrm d}{\mathrm dy}\tfrac{y-2}{3}=\tfrac13\) — the slope of a straight line is the same everywhere.
- Absolute value: \(\bigl|\tfrac13\bigr|=\tfrac13\).
- Support: \(x=0\) gives \(y=2\), \(x=1\) gives \(y=5\), and \(3x+2\) increases, so the whole of \([0,1]\) lands on \([2,5]\).
Put the pieces together: \(p_Y(y)=p_X\bigl(\tfrac{y-2}{3}\bigr)\cdot\tfrac13=1\cdot\tfrac13=\tfrac13\) for \(y\) in \([2,5]\), and \(0\) outside. Check without any formula: stretching an interval of length \(1\) into one of length \(3\) must divide the height by \(3\) to keep the area at \(1\), and \(3\cdot\tfrac13=1\) ✓. That division by the stretch factor is the \(|(g^{-1})'|\) in the formula — the two exam versions below only replace the straight line by a curve, so that the stretch factor changes from place to place.
Worked, \(g\) increasing — \(Y=\ln X\) SoSe25 · P3d
\(X\) has the density \(p_X(x)=x/2\) on \([0,2]\) and \(0\) elsewhere (that is part (a) of the same problem, worked in the integration section). Let \(Y=g(X)=\ln X\).
- Invert: \(y=\ln x \iff x=e^{y}\), so \(g^{-1}(y)=e^{y}\).
- Differentiate: \(\tfrac{\mathrm d}{\mathrm dy}e^{y}=e^{y}\).
- Absolute value: \(|e^{y}|=e^{y}\), since \(\exp\) is positive everywhere.
- Support: \(\ln\) is strictly increasing, so it maps \(x\in(0,2]\) to \(y\in(-\infty,\ln 2]\); the left end goes to \(-\infty\) because \(\ln x\to-\infty\) as \(x\downarrow0\).
Substituting \(x=e^{y}\) into \(p_X(x)=x/2\) gives \(p_X(e^{y})=e^{y}/2\), and the formula is
\[ p_Y(y)\;=\;\frac{e^{y}}{2}\cdot e^{y}\;=\;\frac{e^{2y}}{2}\qquad\text{for } y\le\ln 2, \qquad p_Y(y)=0 \text{ otherwise.} \]Checks: \(\int_{-\infty}^{\ln 2}\tfrac12 e^{2y}\,\mathrm dy=1.0000000\) ✓ (a density must integrate to \(1\), and this is the fastest way to catch a lost factor). Simulating \(400\,000\) draws of \(X\) and taking logarithms gives \(\P(Y\le-0.5)=0.0916\) against the formula's \(\int_{-\infty}^{-0.5}\tfrac12e^{2y}\mathrm dy=0.0919699\) ✓, and a sample mean \(0.1936\) against \(\int y\,p_Y(y)\,\mathrm dy=0.1931472=\ln2-\tfrac12\) ✓.
Worked, \(g\) decreasing — \(X=-\tfrac1\lambda\ln U\) WiSe25 · P3a
\(U\sim\Unif(0,1)\), so \(p_U(u)=1\) on \((0,1)\) and \(0\) elsewhere. The transformation is \(x=g(u)=-\tfrac1\lambda\ln u\), which is strictly decreasing in \(u\).
- Invert: \(x=-\tfrac1\lambda\ln u \iff -\lambda x=\ln u \iff u=e^{-\lambda x}\). So \(g^{-1}(x)=e^{-\lambda x}\).
- Differentiate: \(\tfrac{\mathrm d}{\mathrm dx}e^{-\lambda x}=-\lambda e^{-\lambda x}\) (chain rule, inner derivative \(-\lambda\)) — negative, exactly because \(g\) decreases.
- Absolute value: \(\bigl|-\lambda e^{-\lambda x}\bigr|=\lambda e^{-\lambda x}\). Without the bars you would report a negative density.
- Support: \(u\in(0,1)\) gives \(\ln u\in(-\infty,0)\), and multiplying by \(-\tfrac1\lambda<0\) flips that to \(x\in(0,\infty)\). So the new support is \(x\ge0\).
And \(p_U(g^{-1}(x))=p_U(e^{-\lambda x})=1\), because \(e^{-\lambda x}\in(0,1)\) for \(x>0\). So
\[ p_X(x)=1\cdot\lambda e^{-\lambda x}=\lambda e^{-\lambda x}\ \ (x\ge0),\qquad p_X(x)=0 \text{ otherwise} \]— the \(\Exp(\lambda)\) density, which matches the cdf route done at micro-example 5. Check (\(\lambda=1.5\), \(x=0.8\)): \(\lambda e^{-\lambda x}=0.4517913\), and scipy's \(\Exp(1.5)\) density at \(0.8\) is \(0.4517913\) ✓.
When to use the cdf route instead My addition
The formula assumes \(g\) is strictly monotone, so that every \(y\) comes from exactly one \(x\). Ask before you start: is \(g\) increasing throughout the support, or decreasing throughout it? If neither, use the cdf route, which never fails. The standard case is \(Y=X^{2}\) with \(X\) taking both signs: two different \(x\) give the same \(y\), and \(\P(X^{2}\le y)=\P(-\sqrt y\le X\le\sqrt y)=F_X(\sqrt y)-F_X(-\sqrt y)\) collects both before you differentiate.
Fuller treatment: Analysis 5.1 — Inverse functions (how \(g^{-1}\) is found and when it exists), Analysis 6.3 — Rules of differentiation (the inverse-function rule). In DPT: §2.3, Proposition 2.51 and the transformation widget at §1.3; TT4 on the exam page. The two-variable version replaces \(|(g^{-1})'|\) with \(|\det J|\) — the Jacobian box.
Finding a maximum (the mle move)
A maximum likelihood estimator [Maximum-Likelihood-Schätzer], written \(\hat\theta\), is the parameter value that makes the observed data most likely. Concretely: you build a function \(L(\theta)\) of the parameter, and you have to find where it is largest. That is a pure Analysis question, and it appears on all three past papers (WiSe25 · P4a, SoSe25 · P4a, SoSe26 · P5b, 11 credits in total).
There are exactly two kinds of maximum, and telling them apart before you start is the whole trick. Kind A: the function goes up, turns over, and comes down — the top is a point where the slope is \(0\), and calculus finds it. Kind B: the function only ever increases (or only ever decreases) on the set of allowed \(\theta\) — the slope is never \(0\), and the maximum sits at the edge of the allowed set. Trying the derivative recipe on a kind-B problem produces the equation \(-n/\theta=0\), which has no solution, and students then write "no maximum exists", which is false and costs the whole part.
The recipe (kind A: an interior maximum) My addition
- Write the likelihood. For independent identically distributed observations, \(L(\theta\mid x)=\prod_{i=1}^{n}p_\theta(x_i)\) — the product of the density (or probability mass) evaluated at each data point. The symbol \(\prod\) means "multiply these together".
- Take the logarithm: \(\ell(\theta):=\ln L(\theta)\). This turns the product into a sum (\(\ln(ab)=\ln a+\ln b\)), which is what makes step 3 possible. Why it is allowed is in the box below.
- Drop every additive term with no \(\theta\) in it — say out loud that you are dropping them and that they differentiate to \(0\). They cannot move the maximum.
- Differentiate and set to zero: solve \(\ell'(\theta)=0\). The solution is called a critical point [kritischer Punkt] or a stationary point; the equation itself is the likelihood equation.
- Prove it is a maximum, by one of two tests:
- Second-derivative test: if \(\ell''(\hat\theta)<0\) then \(\hat\theta\) is a local maximum (the curve bends downwards there). This is what both official solutions do, and on its own it proves only local.
- Sign-change test: if \(\ell'(\theta)>0\) for every \(\theta<\hat\theta\) and \(\ell'(\theta)<0\) for every \(\theta>\hat\theta\), then \(\ell\) rises all the way up to \(\hat\theta\) and falls all the way after it, so \(\hat\theta\) is the global maximum. This is strictly stronger and usually no harder.
- Check that \(\hat\theta\) actually lies in the parameter set \(\Theta\). On SoSe26 · P5b this is the point of the printed assumption \(\bar y_n\in\bigl[\tfrac{1-r}{2},\tfrac{1+r}{2}\bigr]\).
The mirror case, a minimum. Same recipe with the signs reversed: solve \(f'=0\), then check \(f''>0\) (the curve bends upwards), or that \(f'<0\) to the left and \(f'>0\) to the right. DPT asks for it when something has to be made as small as possible: \(\tfrac{\mathrm d}{\mathrm dc}\E[(X-c)^{2}]=-2\bigl(\E[X]-c\bigr)\) vanishes at \(c=\E[X]\), and the second derivative is \(+2>0\), so the mean is the minimiser of the mean squared error (Rem 2.22(v), where the script runs exactly this argument). The same two lines minimise the classification error rate \(f(x_t)=\tfrac12-x_t+x_t^{2}\) over the threshold \(x_t\in[0,1]\) in Sheet 7 · Ex 4(iii): \(f'(x_t)=-1+2x_t=0\) gives \(x_t=\tfrac12\), \(f''=2>0\) confirms a minimum, and the value there is \(f(\tfrac12)=\tfrac14\) ✓.
Why taking the logarithm first is legal My addition — proof supplied
Claim. For a function \(L\) with \(L(\theta)>0\) for all \(\theta\in\Theta\), the point \(\hat\theta\) maximises \(L\) over \(\Theta\) if and only if it maximises \(\ell=\ln L\) over \(\Theta\). In symbols, \(\arg\max_\theta L(\theta)=\arg\max_\theta \ln L(\theta)\) — the argument that maximises does not move, even though the value at the top certainly does.
Proof. The natural logarithm is strictly increasing on \((0,\infty)\): if \(0<a<b\) then \(\ln a<\ln b\). ("Strictly increasing" means it preserves the order of every pair of inputs.) So \(L(\hat\theta)\ge L(\theta)\) for all \(\theta\) gives \(\ln L(\hat\theta)\ge \ln L(\theta)\) for all \(\theta\). For the converse, apply the same argument to \(\exp\), which is strictly increasing too and undoes \(\ln\): from \(\ln L(\hat\theta)\ge\ln L(\theta)\) we get \(L(\hat\theta)=e^{\ln L(\hat\theta)}\ge e^{\ln L(\theta)}=L(\theta)\). Both directions hold, so the two sets of maximisers are the same. ∎
Warm-up before the likelihoods — a parabola, and where its slope is \(0\) My addition
Forget probability for a moment and maximise \(f(x)=-x^{2}+6x-4\), a downward parabola. The derivative \(f'(x)\) is the slope of the graph at \(x\); differentiating term by term with the power rule \((x^{n})'=nx^{n-1}\) gives \(f'(x)=-2x+6\).
Set it to zero: \(-2x+6=0\), add \(2x\) to both sides to get \(6=2x\), divide by \(2\) to get \(x=3\). Is it a maximum? Differentiate once more: \(f''(x)=-2\), which is negative for every \(x\), so the graph bends downwards everywhere and \(x=3\) is the top. The value there is \(f(3)=-9+18-4=5\).
Check by hand at neighbouring points: \(f(2)=-4+12-4=4\) and \(f(4)=-16+24-4=4\) — both below \(5\), with the slope \(f'(2)=+2\) (still climbing) on the left and \(f'(4)=-2\) (already falling) on the right. That sign change from \(+\) to \(-\) is the sign-change test of step 5, run on a function small enough to see. Everything below is this same calculation with \(\ell\) in place of \(f\) and \(\theta\) in place of \(x\).
Worked example 1 (kind A) — the rainfall mle, with a global argument WiSe25 · P4a
Model: \(p_\theta(x)=\theta^{-2}x e^{-x/\theta}\) for \(x>0\), parameter \(\theta>0\). From micro-example 5, with \(s:=\sum_{i=1}^{n}x_i\),
\[ \ell(\theta)=-2n\ln\theta+\sum_{i=1}^{n}\ln x_i-\frac{s}{\theta}, \qquad \ell'(\theta)=\frac{s-2n\theta}{\theta^{2}} . \]Set to zero. A fraction is \(0\) exactly when its numerator is \(0\) and its denominator is not. Here \(\theta^{2}>0\) for every \(\theta>0\), so \(\ell'(\theta)=0 \iff s-2n\theta=0 \iff \hat\theta=\dfrac{s}{2n}=\dfrac{\bar x_n}{2}\), where \(\bar x_n=\tfrac1n\sum_i x_i\) is the sample mean.
Maximum, locally. Differentiate \(\ell'(\theta)=-2n\theta^{-1}+s\theta^{-2}\) once more, using \((\theta^{-1})'=-\theta^{-2}\) and \((\theta^{-2})'=-2\theta^{-3}\): \(\ell''(\theta)=2n\theta^{-2}-2s\theta^{-3}=\dfrac{2n\theta-2s}{\theta^{3}}\). At \(\theta=\hat\theta=s/(2n)\) the numerator is \(2n\cdot\tfrac{s}{2n}-2s=s-2s=-s<0\) and the denominator is positive, so \(\ell''(\hat\theta)<0\). That is a local maximum.
Maximum, globally — the extra line the official solution omits. \(\ell'(\theta)\) has the positive denominator \(\theta^{2}\), so its sign is the sign of \(s-2n\theta\), which is \(>0\) for \(\theta<\hat\theta\) and \(<0\) for \(\theta>\hat\theta\). So \(\ell\) increases on \((0,\hat\theta)\) and decreases on \((\hat\theta,\infty)\): the maximum is global.
Write that sentence. It is one line, it costs nothing, and the exam's own solution has the gap — see TT5, step 4. Check (data \(1.2,3.4,2.0,5.1\)): numerical maximisation gives \(1.4625003\); the formula gives \(11.7/8=1.4625\). ✓
Worked example 2 (kind B) — a maximum at the boundary Sheet 10 · Ex 1 and Ex 3
The uniform model. \(X_1,\dots,X_n\) independent and \(\Unif(0,\theta)\)-distributed: the density is \(p_\theta(x)=\tfrac1\theta\) for \(x\in[0,\theta]\) and \(0\) outside. The likelihood is
\[ L(\theta)=\prod_{i=1}^{n}p_\theta(x_i) =\begin{cases}\dfrac{1}{\theta^{n}}, & \theta\ge \max_i x_i,\\[4pt] 0, & \theta<\max_i x_i.\end{cases} \]Where the case split comes from. If \(\theta<\max_i x_i\), then at least one observation lies outside \([0,\theta]\), its density is \(0\), and one zero factor kills the whole product.
Why the derivative recipe fails here. On the region where \(L\) is not \(0\), \(L(\theta)=\theta^{-n}\) and \(L'(\theta)=-n\theta^{-n-1}\), which is strictly negative for every \(\theta>0\) — it is never \(0\), so there is no critical point at all. Taking logarithms does not help either, because \(\ln L=-n\ln\theta\) is undefined on the branch where \(L=0\).
The argument that works. \(L\) is \(0\) to the left of \(\max_i x_i\) and strictly decreasing to the right of it. A function that is strictly decreasing on \([\,m,\infty)\) takes its largest value at the left endpoint \(m\). Hence
\[ \hat\theta \;=\; \max\{x_1,\dots,x_n\} . \]Check (data \(0.3,\,1.7,\,0.9,\,1.55\)): scanning \(L\) on a fine grid over \([0.5,5]\) peaks at \(\theta=1.70002\), and \(\max_i x_i=1.7\). ✓
The mirror image, Sheet 10 Ex 3. \(p_X(x)=2c^{2}/x^{3}\) for \(x\ge c\), \(c>0\). Now \(L(c)=\bigl(\prod_i 2/x_i^{3}\bigr)\,c^{2n}\) whenever \(c\le\min_i x_i\), and \(0\) otherwise. The factor \(c^{2n}\) is strictly increasing in \(c\), so \(L\) rises until it hits the wall at \(\min_i x_i\) and drops to \(0\) after it: \(\hat c=\min\{x_1,\dots,x_n\}\). The exercise's own hint — "consider the case where a sample value is less than \(c\)" — is pointing at exactly this wall. Check (data \(3.1,\,2.6,\,4.8,\,2.9\)): the grid maximum is at \(c=2.59999\), and \(\min_i x_i=2.6\). ✓
Three ways this loses marks My addition
1. Stopping at \(\ell'(\hat\theta)=0\). A vanishing derivative is equally consistent with a minimum or with a flat point. Both official solutions that derive an mle by differentiating (SoSe25 · P4a, WiSe25 · P4a) write the second-derivative line out, so it is plainly part of the expected answer.
2. Reporting \(\ell''(\hat\theta)<0\) as if it proved "global". It does not. If the task says "the maximum", add the sign-change line.
3. Reaching for the derivative when the support depends on the parameter. The tell is an indicator \(\chi_{[c,\infty)}(x_i)\) or a condition like \(\theta\ge\max_i x_i\) inside the likelihood. The moment you see one, switch to the monotonicity argument of worked example 2.
Two parameters at once: partial derivatives, and what \(\nabla_\theta\ell=0\) means Script §3.2, Def 3.27 and Ex 3.28
When \(\theta\) has two components — \(\theta=(\mu,\sigma^{2})\) for a Gaussian — the script writes the likelihood equation as \(\nabla_\theta\ell(\theta\mid x)=0\). Decoded, that symbol means nothing more than: differentiate once with respect to each parameter, treating the other as a fixed number, and set both results to \(0\). A partial derivative [partielle Ableitung], written \(\partial\ell/\partial\mu\), is an ordinary derivative in \(\mu\) with every other letter frozen; the curly \(\partial\) is there only to remind you that other variables exist. The gradient \(\nabla_\theta\ell\) is the list of those partial derivatives, and setting a list to \(0\) means setting every entry to \(0\).
The recipe: (1) differentiate in the first parameter, set to \(0\), solve — usually one parameter drops out on its own; (2) differentiate in the second, set to \(0\); (3) substitute the answer from step 1 into step 2 and solve; (4) verify as before.
The Gaussian skeleton (Ex 3.28). With \(\ell(\mu,\sigma^{2})=-\tfrac n2\ln(2\pi)-\tfrac n2\ln(\sigma^{2}) -\tfrac{1}{2\sigma^{2}}\sum_i(x_i-\mu)^{2}\):
\[ \frac{\partial\ell}{\partial\mu}=\frac{1}{\sigma^{2}}\Bigl(\sum_i x_i-n\mu\Bigr)\ \overset{!}{=}\ 0 \;\Longrightarrow\;\hat\mu=\bar x_n, \qquad \frac{\partial\ell}{\partial\sigma^{2}}=-\frac{n}{2\sigma^{2}}+\frac{1}{2(\sigma^{2})^{2}}\sum_i(x_i-\mu)^{2} \ \overset{!}{=}\ 0 . \]The first equation is free of \(\sigma^{2}\) because the factor \(1/\sigma^{2}\) is positive and can be divided away; that is why you always do \(\mu\) first. Putting \(\hat\mu=\bar x_n\) into the second and multiplying by \(2(\sigma^{2})^{2}/n\) gives \(\hat\sigma^{2}=\tfrac1n\sum_i(x_i-\bar x_n)^{2}\). Check with data \(2.1,\,3.4,\,1.8,\,4.0,\,2.7\): maximising \(\ell\) numerically over both parameters returns \(\hat\mu=2.8000000\), \(\hat\sigma^{2}=0.6600000\); the formulas give \(\bar x=2.8000000\) and \(\tfrac1n\sum(x_i-\bar x)^{2}=0.6600000\) ✓.
One thing worth noticing for the exam: the \(\tfrac1n\) in \(\hat\sigma^{2}\), not \(\tfrac1{n-1}\). The maximum likelihood estimator of a variance is the biased one (§3.2). Fuller treatment: Analysis 11.2 — Partial derivatives and Analysis 11.3 — Higher derivatives and extrema.
Fuller treatment: Analysis 7.1 — Extrema (the first-order condition and why it needs an interior point), Analysis 7.3 — Monotonicity (the sign-of-\(f'\) test), Analysis 7.5 — Higher derivatives (the second-derivative test), Analysis 4.4 — Existence of maxima and minima (and the \(\arg\max\) notation). In DPT: §3.2 maximum likelihood, the uniform-model widget, Sheet 10 Ex 3 worked, and TT5 on the exam page.
Integration — what an integral is here, and the table
An integral [Integral] \(\int_a^b f(x)\,\mathrm dx\) is the area between the graph of \(f\) and the horizontal axis, between \(x=a\) and \(x=b\), counting area below the axis as negative. The symbol \(\mathrm dx\) says which letter is the integration variable; \(a\) and \(b\) are the limits [Integrationsgrenzen].
In DPT that area is the probability. A density \(p\) is a non-negative function whose total area is \(1\), and \(\P(a\le X\le b)=\int_a^b p(x)\,\mathrm dx\) is the area over the interval. That single picture explains every integral on this page: normalising a density means "make the total area \(1\)"; the cdf is "the area collected so far"; and \(\E[X]=\int x\,p(x)\,\mathrm dx\) is the balance point of that area.
The fundamental theorem of calculus, in the form DPT uses it Analysis 8.2, 8.3
An antiderivative [Stammfunktion] of \(f\) is any function \(F\) with \(F'=f\).
Direction 1 (compute an integral). If \(F'=f\) on \([a,b]\), then
\[ \int_a^b f(x)\,\mathrm dx \;=\; \bigl[F(x)\bigr]_a^b \;:=\; F(b)-F(a). \]The bracket notation \([\,\cdot\,]_a^b\) is just shorthand for "plug in the top limit, subtract the value at the bottom limit".
Direction 2 (undo an integral). If \(F(x)=\int_{a}^{x}f(t)\,\mathrm dt\), then \(F'(x)=f(x)\). This is the sentence "differentiate the cdf to get the density", which the DPT script states as Lemma 1.49 (previous section). If instead the variable sits at the lower limit, the sign flips: \(\tfrac{\mathrm d}{\mathrm dx}\int_x^{\infty}f(t)\,\mathrm dt=-f(x)\), because \(\int_x^{\infty}f=\int_{-\infty}^{\infty}f-\int_{-\infty}^{x}f\) and the constant differentiates away. That is the derivative of a tail \(\P(X>x)\), which is how Sheet 5 Ex 2 gets started.
Two properties you use constantly.
- Linearity: \(\int_a^b\bigl(\alpha f+\beta g\bigr)=\alpha\int_a^b f+\beta\int_a^b g\) for constants \(\alpha,\beta\). Constants come out; sums split; you may integrate a sum term by term.
- Additivity in the limits: \(\int_a^b f=\int_a^c f+\int_c^b f\) for any \(c\) between \(a\) and \(b\). This is the rule that lets you split a piecewise density at its breakpoints and handle each piece with its own formula.
Also worth writing on the cheat sheet: \(\int_a^a f=0\) (an interval of zero width has zero area), and \(\int_b^a f=-\int_a^b f\) (swapping the limits flips the sign).
Integrate only over the support My addition
The support [Träger] of a density is the set where it is not \(0\). Since a \(0\) integrand contributes \(0\) area, an integral written over all of \(\R\) collapses to an integral over the support:
\[ \int_{-\infty}^{\infty}p(x)\,\mathrm dx \;=\; \int_{\text{support}}p(x)\,\mathrm dx . \]So for \(p(x)=\lambda e^{-\lambda x}\) on \([0,\infty)\) you write \(\int_0^\infty\), not \(\int_{-\infty}^{\infty}\), and the lower limit \(0\) is part of the answer. Getting a limit wrong here is the most common way a correct antiderivative still produces a wrong number.
A product of indicators, turned into limits. The script writes supports with the indicator [Indikatorfunktion] \(\chi_A\), which is \(1\) on the set \(A\) and \(0\) off it. A product of indicators is \(1\) exactly where all the conditions hold at once, so the move is always the same: collect the conditions, intersect them, and read the limits off the intersection. Three instances, all from the sheets:
- \(\chi_{[0,\infty)}(y)\cdot\chi_{(-\infty,z]}(y)\) is \(1\) for \(0\le y\le z\), so \(\int_{\R}\cdots\mathrm dy\) becomes \(\int_0^{z}\cdots\mathrm dy\). That single line is the whole of Sheet 7 Ex 2(ii) (§2.3): the convolution \(\int_{\R}\lambda e^{-\lambda(z-y)}\chi_{\{z-y\ge0\}}\,\lambda e^{-\lambda y}\chi_{\{y\ge0\}}\mathrm dy =\lambda^{2}e^{-\lambda z}\int_0^{z}\mathrm dy=\lambda^{2}z\,e^{-\lambda z}\). Check (\(\lambda=1.4\), \(z=1.1\)): numerical integration gives \(0.4622057\) and \(\lambda^{2}ze^{-\lambda z}=0.4622057\) ✓.
- \(\chi_A(x,y)\) with \(A=\{0\le x\le y\}\), as a function of \(y\) with \(x\) frozen, is \(1\) for \(y\ge x\): the inner integral runs \(\int_x^{\infty}\) (Sheet 7 Ex 1, §2.1). Frozen the other way round, with \(y\) fixed, it is \(1\) for \(0\le x\le y\), giving \(\int_0^{y}\) — the two orders of the same region.
- \(\prod_{i=1}^{n}\chi_{[0,\theta]}(x_i)\) is \(1\) only if every \(x_i\) is at most \(\theta\), that is if \(\theta\ge\max_i x_i\). A product of indicators over data collapses to a single condition on the parameter — and that condition is what makes the maximum in worked example 2 sit at the boundary (Sheet 10 Ex 1(i)).
| Integrand | Antiderivative / value | Where DPT uses it |
|---|---|---|
| \(x^{a}\), \(a\neq-1\) | \(\dfrac{x^{a+1}}{a+1}+C\) | normalising \(p(x)=x/c\) on \([0,2]\) (SoSe25 · P3a); Sheet 5; every polynomial density |
| \(\dfrac1x\) | \(\ln|x|+C\) | the \(a=-1\) exception; the source of the divergences in the next section |
| \(e^{ax}\), \(a\neq0\) | \(\dfrac{e^{ax}}{a}+C\) | with \(a=-\lambda\): the \(\Exp(\lambda)\) normalisation and cdf |
| \(\lambda e^{-\lambda x}\) on \([0,\infty)\) | \(\bigl[-e^{-\lambda x}\bigr]_0^{\infty}=1\) | the exponential density integrates to \(1\) |
| \(x e^{-ax}\) on \([0,\infty)\), \(a>0\) | \(\dfrac{1}{a^{2}}\) | \(\E[X]=1/\lambda\) for \(\Exp(\lambda)\) (take \(a=\lambda\) and multiply by \(\lambda\)) |
| \(x^{2}e^{-ax}\) on \([0,\infty)\) | \(\dfrac{2}{a^{3}}\) | \(\E[X^{2}]\), hence \(\Var[X]=\tfrac{2}{\lambda^{2}}-\tfrac1{\lambda^{2}}=\tfrac1{\lambda^{2}}\) |
| \(x^{n}e^{-ax}\) on \([0,\infty)\), \(n\in\N_0\), \(a>0\) | \(\dfrac{n!}{a^{\,n+1}}\) | the pattern to memorise. Gamma moments, \(\Gamma(n+1)=n!\), Sheet 7, Sheet 8 (§1.3) |
| \(x^{\alpha-1}e^{-x}\) on \([0,\infty)\), real \(\alpha>0\) | \(\Gamma(\alpha)\), and \(\Gamma(\tfrac12)=\sqrt\pi\) | the Gamma function itself; \(\Gamma(\tfrac12)\) is where the normal's \(\sqrt{2\pi}\) comes from |
| \(x^{\alpha-1}e^{-\beta x}\) on \([0,\infty)\), \(\alpha,\beta>0\) | \(\dfrac{\Gamma(\alpha)}{\beta^{\alpha}}\) (substitute \(u=\beta x\) in the row above) | the same row with a rate: it is what makes the \(\Gamma(\alpha,\beta)\) density \(\tfrac{\beta^{\alpha}}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}\) integrate to \(1\), and it turns every Gamma moment into a ratio of \(\Gamma\)'s |
| the recursion \(\Gamma(\alpha+1)=\alpha\,\Gamma(\alpha)\) | one integration by parts; it gives \(\Gamma(n+1)=n!\) | every Gamma-family moment. \(\E[X]=\alpha/\beta\) and \(\E[1/Y]=\beta/(\alpha-1)\) for \(Y\sim\Gamma(\alpha,\beta)\), \(\alpha>1\) — Sheet 10 Ex 2(iii); Lemma 2.27(iii),(v) for Gamma and \(\chi^{2}\) |
| \(e^{-z^{2}/2}\) over all of \(\R\) | \(\sqrt{2\pi}\;(=2.5066283)\) | why the normal density carries the factor \(1/\sqrt{2\pi}\) |
| \(z^{2}e^{-z^{2}/2}\) over all of \(\R\) | \(\sqrt{2\pi}\) as well | \(\Var[\mathcal N(0,1)]=1\); Sheet 8 Ex 5 proves it by parts |
| \(\sin x\) / \(\cos x\) | \(-\cos x+C\) / \(\sin x+C\) | only via \(e^{itx}=\cos(tx)+i\sin(tx)\) in characteristic functions (§2.3) |
| any odd \(f\) over \([-a,a]\) (odd means \(f(-x)=-f(x)\)) | \(0\) | \(\E[X^{3}]=0\) for \(\Unif(-1,1)\) (Sheet 6 Ex 3(ii)); \(\int_\R z\,e^{-z^{2}/2}\mathrm dz=0\), which is why \(\E[\mathcal N(0,1)]=0\) |
Every row of that table was verified numerically before it was written: for example \(\int_0^\infty x^{3}e^{-2x}\mathrm dx\) evaluates to \(0.375\) and \(3!/2^{4}=6/16=0.375\); \(\int_\R e^{-z^{2}/2}\mathrm dz = 2.5066283 = \sqrt{2\pi}\); \(\Gamma(3.5)=3.3233510\) and \(2.5\,\Gamma(2.5)=3.3233510\); and for \(Y\sim\Gamma(4,2)\), \(\int_0^\infty y^{-1}p_Y(y)\mathrm dy =0.6666667=\beta/(\alpha-1)=2/3\). The odd-function row is the one that saves the most time in an exam: spotting it turns a three-line calculation into the word "odd".
Warm-up before the DPT example — a rectangle My addition
Take the flat function \(p(x)=c\) on \([0,2]\). Its graph encloses a rectangle of width \(2\) and height \(c\), so the area is \(\int_0^2 c\,\mathrm dx=2c\) — no calculus needed, it is width times height.
"Choose \(c\) so that the density integrates to \(1\)" then reads \(2c=1\), so \(c=\tfrac12\), which is the \(\Unif(0,2)\) density. The example below is the same question with a sloping roof instead of a flat one, so the area needs the power rule instead of multiplication.
Worked example — a whole density problem, start to finish SoSe25 · P3a–c
\(p_X(x)=\dfrac{x}{c}\) for \(x\in[0,2]\) and \(0\) otherwise, for some constant \(c\in\R\).
(a) Find \(c\). Impose "total area \(=1\)", integrating over the support \([0,2]\) only, and pull the constant \(1/c\) out by linearity:
\[ 1=\int_0^2\frac{x}{c}\,\mathrm dx=\frac1c\int_0^2 x\,\mathrm dx =\frac1c\left[\frac{x^{2}}{2}\right]_0^{2}=\frac1c\left(\frac{4}{2}-0\right)=\frac{2}{c} \quad\Longrightarrow\quad c=2 . \]Then add the non-negativity line, which the official solution writes out as well: with \(c=2>0\) and \(x\ge0\) on \([0,2]\), \(p_X(x)=x/2\ge0\), so it is a valid density. Check: \(\int_0^2 x/2\,\mathrm dx=1.0000000\). ✓
(b) The cdf, all three branches. \(F_X(x)=\int_{-\infty}^{x}p_X(t)\,\mathrm dt\). Below the support there is nothing to collect; above it everything has been collected; in between, integrate from the left end of the support:
\[ \int_0^{x}\frac t2\,\mathrm dt=\left[\frac{t^{2}}{4}\right]_0^{x}=\frac{x^{2}}{4}, \qquad\text{so}\qquad F_X(x)=\begin{cases}0,&x<0,\\[2pt] \dfrac{x^{2}}{4},&0\le x\le 2,\\[4pt] 1,&x>2.\end{cases} \]All three branches are required for full credit. Two checks that cost five seconds each: \(F_X(2)=4/4=1\) ✓, and differentiating the middle branch gives \(2x/4=x/2=p_X(x)\) ✓.
(c) Mean and median. The mean weights each \(x\) by its density:
\[ \E[X]=\int_0^2 x\cdot\frac{x}{2}\,\mathrm dx=\int_0^2\frac{x^{2}}{2}\,\mathrm dx =\left[\frac{x^{3}}{6}\right]_0^{2}=\frac{8}{6}=\frac43\approx1.3333 . \]The median \(m\) solves \(F_X(m)=\tfrac12\), so \(m^{2}/4=\tfrac12\), \(m^{2}=2\), \(m=\sqrt2\approx1.4142\) — and the root \(-\sqrt2\) is discarded because it is outside the support \([0,2]\). Checks: numerical integration gives \(\E[X]=1.3333333\) ✓, and \(F_X(\sqrt2)=2/4=0.5\) ✓. Note \(\E[X]=1.333<1.414=m\): this density leans to the right, so its balance point sits to the left of its middle.
Fuller treatment: Analysis 8.1 — Definition of the integral, Analysis 8.2 — Important properties (linearity, additivity, symmetry), Analysis 8.3 — Antiderivatives (the fundamental theorem, both directions). The measure-theoretic version of "integral", which is the one the DPT script actually defines, is on B4 — Measure and integration, and B4 also explains why for every density in this course the two notions give the same number. In DPT: §1.3 primer, §2.1 expectation, TT3 on the exam page.
Improper integrals (to \(\infty\)) and when they diverge
Most DPT integrals run out to \(\infty\), or start at a point where the integrand blows up. Such an integral is called improper [uneigentliches Integral], and it is defined as a limit of ordinary integrals with finite limits. Sometimes that limit is a finite number ("the integral converges"), and sometimes it is \(+\infty\) ("it diverges"). Divergence is not an error — twice in this course it is the answer.
How to compute one My addition
Infinite upper limit. \(\displaystyle\int_a^{\infty}f(x)\,\mathrm dx:=\lim_{b\to\infty}\int_a^{b}f(x)\,\mathrm dx\). In practice: find an antiderivative \(F\), write \([F(x)]_a^{b}=F(b)-F(a)\), and then let \(b\to\infty\). If \(F(b)\) has a finite limit, that limit goes in; otherwise the integral is \(+\infty\).
Blow-up at the lower limit. If \(f\) is unbounded near \(a\), \(\displaystyle\int_a^{b}f:=\lim_{\varepsilon\downarrow0}\int_{a+\varepsilon}^{b}f\), where \(\varepsilon\downarrow0\) means \(\varepsilon\) shrinks to \(0\) from above.
Both ends infinite: split at any convenient point, for instance \(\int_{-\infty}^{\infty}=\int_{-\infty}^{0}+\int_0^{\infty}\), and both halves must converge separately.
Notation in an exam. Writing \(\bigl[-e^{-\lambda x}\bigr]_0^{\infty}\) directly is accepted everywhere in this course, with the understanding that the symbol \(\infty\) at the top means "take the limit". Doing it in one line costs nothing and is what every official solution does.
The two convergence rules that decide every case here My addition
Rule 1 — powers, the \(1/x^{p}\) test. For \(p>0\):
\[ \int_1^{\infty}\frac{\mathrm dx}{x^{p}} =\begin{cases}\dfrac{1}{p-1}&\text{if }p>1\quad\text{(converges)},\\[6pt] +\infty&\text{if }p\le1\quad\text{(diverges)};\end{cases} \qquad \int_0^{1}\frac{\mathrm dx}{x^{p}} =\begin{cases}\dfrac{1}{1-p}&\text{if }p<1,\\[6pt] +\infty&\text{if }p\ge1.\end{cases} \]Rule 2 — the exponential beats every power. For every \(a>0\) and every \(n\ge0\), \(x^{n}e^{-ax}\to0\) as \(x\to\infty\), and \(\int_0^{\infty}x^{n}e^{-ax}\,\mathrm dx=\dfrac{n!}{a^{n+1}}\) is always finite. So any integral whose integrand carries a genuine factor \(e^{-ax}\) with \(a>0\) converges at the \(+\infty\) end, no matter what polynomial sits in front of it. This is why boundary terms like \(\bigl[-x e^{-\lambda x}\bigr]_0^{\infty}\) evaluate to \(0\) at the top.
Checks. \(\int_1^{\infty}x^{-1.5}=2.000000=1/(1.5-1)\) ✓; \(\int_1^{\infty}x^{-3}=0.500000=1/(3-1)\) ✓; and for \(p=1\) the truncated integrals \(\int_1^{B}\mathrm dx/x\) equal \(4.605\), \(9.210\), \(13.816\) at \(B=10^{2},10^{4},10^{6}\) — exactly \(\ln B\), growing without bound. ✓
Convergent case — a heavy-ish tail that still normalises Sheet 10 · Ex 3(i)
\(p_X(x)=\dfrac{2c^{2}}{x^{3}}\) for \(x\ge c\), with \(c>0\). The tail is a power, so use Rule 1 with \(p=3>1\):
\[ \int_c^{\infty}\frac{2c^{2}}{x^{3}}\,\mathrm dx =2c^{2}\lim_{b\to\infty}\int_c^{b}x^{-3}\,\mathrm dx =2c^{2}\lim_{b\to\infty}\left[-\frac{1}{2}x^{-2}\right]_c^{b} =2c^{2}\left(0-\left(-\frac{1}{2c^{2}}\right)\right)=1 . \]The step \(\int x^{-3}=\tfrac{x^{-2}}{-2}\) is the power rule with \(a=-3\), and \(b^{-2}\to0\) is Rule 1 doing its work. Check at \(c=2.5\): the numerical value is \(1.0000000\) ✓, and the mean \(\int_c^{\infty}x\,p_X(x)\,\mathrm dx=5.0000000=2c\) ✓ (here the integrand behaves like \(1/x^{2}\), still \(p>1\), so the mean exists).
Divergent case 1 — a mean that does not exist My addition
Change the exponent in the example above from \(3\) to \(2\): \(q(x)=\dfrac{c}{x^{2}}\) for \(x\ge c\) is still a perfectly valid density (\(\int_c^\infty c\,x^{-2}\mathrm dx=1\)), but its mean is
\[ \int_c^{\infty}x\cdot\frac{c}{x^{2}}\,\mathrm dx=c\int_c^{\infty}\frac{\mathrm dx}{x} =c\bigl[\ln x\bigr]_c^{\infty}=+\infty . \]Rule 1 with \(p=1\): divergent. Check at \(c=2.5\): cutting the integral at \(10^{3},10^{5},10^{7}\) gives \(14.98\), \(26.49\), \(38.00\) — it keeps climbing, by the same \(c\ln 100=11.51\) for every factor of \(100\), which is what \(\ln\) does. ✓
This is what "a heavy tail" means: the tail is not thin enough for the balance point to exist. The famous example in this course is the Cauchy distribution, whose density \(\tfrac{1}{\pi(1+x^{2})}\) also decays like \(1/x^{2}\) and therefore has no mean — which is why it is the standard counterexample to the law of large numbers (§2.1, §2.4). When a task says "does \(\E[X]\) exist?", it is asking you to run Rule 1 on the tail.
Divergent case 2 — the \(n=1\) case on Sheet 10 Sheet 10 · Ex 2, note
The maximum likelihood estimator of \(\lambda\) for exponential data is \(\hat\lambda_{\mathrm{mle}}=n/\sum_i X_i\). To check whether it is unbiased you need \(\E[\hat\lambda]\), and for \(n=1\) that is \(\E[1/X_1]\) with \(X_1\sim\Exp(\lambda)\):
\[ \E\!\left[\frac1{X_1}\right]=\int_0^{\infty}\frac1x\,\lambda e^{-\lambda x}\,\mathrm dx . \]The trouble is at the lower end, not at infinity. Near \(x=0\) the factor \(e^{-\lambda x}\) is close to \(e^{0}=1\), so the integrand behaves like \(\lambda/x\), and \(\int_0\frac{\mathrm dx}{x}\) diverges by Rule 1 with \(p=1\). So \(\E[\hat\lambda_{\mathrm{mle}}]\) is undefined for \(n=1\). Check (\(\lambda=2\)): cutting the integral at \(\varepsilon=10^{-2},10^{-4},10^{-6}\) gives \(6.71\), \(15.88\), \(25.09\) — again climbing like \(\ln(1/\varepsilon)\), without limit. ✓
How to write it in an exam. Three sentences are enough, and all three earn their keep: "Near \(0\), \(\tfrac1x\lambda e^{-\lambda x}\ge \tfrac{\lambda}{e}\cdot\tfrac1x\) for \(x\in(0,1/\lambda]\). Since \(\int_0^{1/\lambda}\tfrac{\mathrm dx}{x}=+\infty\), the integral diverges by comparison. Hence \(\E[1/X_1]\) does not exist and the estimator is not unbiased for \(n=1\)." Name the comparison, name the divergent benchmark, state the conclusion.
Fuller treatment: Analysis 9.1 — Improper integrals (the definition as a limit, and the comparison test), Analysis 5.2 — Growth rates (why the exponential beats every power), Analysis 9.4 — Estimating sums and series. In DPT: §2.1, the existence of \(\E[X]\), §3.2, Sheet 10 Ex 3. The measure-theoretic statement of the same thing — \(\E[X]\) exists precisely when \(\E|X|<\infty\) — is on B4.
Substitution and integration by parts
Two rules cover every integral this course sets that is not already in the table. Substitution [Substitutionsregel] is the chain rule read backwards; integration by parts [partielle Integration] is the product rule read backwards. Learning which to reach for is most of the battle, so each rule below comes with a one-line "what to pick".
Substitution My addition
\[ \int_a^b f\bigl(g(x)\bigr)\,g'(x)\,\mathrm dx \;=\; \int_{g(a)}^{g(b)} f(u)\,\mathrm du . \]How you actually use it. Set \(u=g(x)\). Differentiate to get \(\dfrac{\mathrm du}{\mathrm dx}=g'(x)\), and treat that as \(\mathrm du=g'(x)\,\mathrm dx\) — a formal bookkeeping move, and the rule above is what makes it legitimate. Then replace three things at once: the inner expression by \(u\), the piece \(g'(x)\,\mathrm dx\) by \(\mathrm du\), and — this is the step that gets forgotten — both limits, \(a\mapsto g(a)\) and \(b\mapsto g(b)\).
What to pick. \(u\) is the inside of the composition: the exponent of an \(e\), the thing under a square root, the bracket raised to a power. Then look for its derivative sitting as a factor elsewhere in the integrand — if it is there (up to a constant), the substitution will work.
The one that is always safe: a linear substitution \(u=\alpha x+\beta\) with \(\alpha\neq0\), where \(\mathrm du=\alpha\,\mathrm dx\), so \(\mathrm dx=\mathrm du/\alpha\). Nothing can go wrong except forgetting the \(1/\alpha\).
Warm-up before the DPT substitutions — small numbers My addition
Compute \(\int_0^1(2x+1)^{2}\,\mathrm dx\) with \(u=2x+1\). Then \(\mathrm du=2\,\mathrm dx\), so \(\mathrm dx=\tfrac12\,\mathrm du\), and both limits move: \(x=0\mapsto u=1\) and \(x=1\mapsto u=3\).
\(\displaystyle\int_0^1(2x+1)^{2}\mathrm dx=\frac12\int_1^{3}u^{2}\,\mathrm du =\frac12\Bigl[\frac{u^{3}}{3}\Bigr]_1^{3}=\frac12\cdot\frac{27-1}{3}=\frac{13}{3}\). Check by multiplying out instead: \(\int_0^1(4x^{2}+4x+1)\mathrm dx=\tfrac43+2+1=\tfrac{13}3 =4.3333333\) ✓ — same answer, more work.
Substitution examples My addition
S1 — the exponential normalisation, \(u=\lambda x\). With \(\mathrm du=\lambda\,\mathrm dx\), the limits \(0\mapsto0\) and \(\infty\mapsto\infty\):
\[ \int_0^{\infty}\lambda e^{-\lambda x}\,\mathrm dx=\int_0^{\infty}e^{-u}\,\mathrm du =\bigl[-e^{-u}\bigr]_0^{\infty}=0-(-1)=1 . \]The factor \(\lambda\) in front of the density is precisely the \(\mathrm du/\mathrm dx\) the substitution needs — which is a good way to remember why \(\Exp(\lambda)\) has that constant. Check (\(\lambda=1.7\)): \(1.0000000\). ✓
S2 — standardising a normal, \(z=\dfrac{x-\mu}{\sigma}\). This is the substitution of the second half of the course: it turns any \(\mathcal N(\mu,\sigma^{2})\) into \(\mathcal N(0,1)\), so that a single table of \(\Phi\)-values serves every normal distribution. Here \(\mathrm dz=\tfrac{1}{\sigma}\mathrm dx\), so \(\mathrm dx=\sigma\,\mathrm dz\), and the limits \(-\infty,\infty\) are unchanged:
\[ \int_{-\infty}^{\infty}\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(x-\mu)^{2}}{2\sigma^{2}}}\,\mathrm dx =\int_{-\infty}^{\infty}\frac{1}{\sigma\sqrt{2\pi}}e^{-z^{2}/2}\,\sigma\,\mathrm dz =\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}e^{-z^{2}/2}\,\mathrm dz =\frac{\sqrt{2\pi}}{\sqrt{2\pi}}=1 . \]The \(\sigma\) from \(\mathrm dx\) cancels the \(\sigma\) in the constant — that cancellation is the whole reason the density is written with \(1/\sigma\) in front. Check (\(\mu=3.2\), \(\sigma=1.8\)): the integral is \(1.0000000\) ✓ and \(\int x\,p(x)\,\mathrm dx=3.2000000=\mu\) ✓. The probability version of the same move is \(\P(X\le x)=\Phi\!\bigl(\tfrac{x-\mu}{\sigma}\bigr)\), used in every clt task (TT8).
S3 — \(\displaystyle\int x e^{-x^{2}/2}\,\mathrm dx\), \(u=x^{2}/2\). The inside of the exponential is \(x^{2}/2\); its derivative is \(x\); and an \(x\) is sitting right there as a factor. So \(\mathrm du=x\,\mathrm dx\) and
\[ \int x e^{-x^{2}/2}\,\mathrm dx=\int e^{-u}\,\mathrm du=-e^{-u}+C=-e^{-x^{2}/2}+C . \]Over a symmetric interval this integral is \(0\), because \(x e^{-x^{2}/2}\) is an odd function: \(\int_{-\infty}^{\infty}z e^{-z^{2}/2}\mathrm dz=0.0000000\) ✓, which says \(\E[\mathcal N(0,1)]=0\). Keep the antiderivative anyway — example P2 below needs it.
S4 — turning an exponential into a uniform. Let \(X\sim\Exp(\lambda)\) and set \(U:=e^{-\lambda X}\). For \(u\in(0,1)\), using that \(t\mapsto e^{-\lambda t}\) is decreasing so the inequality flips,
\[ \P(U\le u)=\P\bigl(e^{-\lambda X}\le u\bigr)=\P\Bigl(X\ge-\tfrac1\lambda\ln u\Bigr) =e^{-\lambda\cdot(-\frac1\lambda\ln u)}=e^{\ln u}=u , \]which is the cdf of \(\Unif(0,1)\). So \(U\sim\Unif(0,1)\). This is the inverse of the transformation in micro-example 5 of part 1, and the same substitution written at the level of integrals reads \(\int_0^{\infty}h(e^{-\lambda x})\,\lambda e^{-\lambda x}\,\mathrm dx =\int_0^{1}h(u)\,\mathrm du\), with \(u=e^{-\lambda x}\) and \(\mathrm du=-\lambda e^{-\lambda x}\mathrm dx\) absorbing the sign into the swapped limits. Check: simulating \(400\,000\) draws with \(\lambda=1.3\) gives \(U\) a sample mean \(0.5005\) and sample variance \(0.0833\), against \(\tfrac12=0.5\) and \(\tfrac1{12}=0.0833\) for \(\Unif(0,1)\). ✓
The one trigonometric substitution DPT needs: \(x=\sin u\) Sheet 8 · Ex 3(ii)
A \(\sqrt{1-x^{2}}\) in the integrand is the signal. Substituting \(x=\sin u\) makes it disappear, because \(\sin^{2}u+\cos^{2}u=1\) gives \(\sqrt{1-\sin^{2}u}=\cos u\) (and \(\cos u\ge0\) on \([-\tfrac\pi2,\tfrac\pi2]\), so no absolute value is needed there). With \(x=\sin u\) you also get \(\mathrm dx=\cos u\,\mathrm du\), and the limits move as \(x=0\mapsto u=0\), \(x=1\mapsto u=\tfrac\pi2\).
Two identities do the rest. Learn them as facts — both come straight out of the addition formulas in Analysis 5.3: putting \(y=x\) in \(\sin(x+y)=\sin x\cos y+\cos x\sin y\) gives the first, and putting \(y=x\) in \(\cos(x+y)=\cos x\cos y-\sin x\sin y\) gives \(\cos 2v=\cos^{2}v-\sin^{2}v=1-2\sin^{2}v\) (using \(\cos^{2}+\sin^{2}=1\)), which rearranges to the second.
| Identity | What it is for |
|---|---|
| \(2\sin u\cos u=\sin(2u)\) | turns a product \(\sin u\cos u\) into a single sine, so it can be squared cleanly |
| \(\sin^{2}v=\tfrac12-\tfrac12\cos(2v)\) | turns a square of a sine into something with an obvious antiderivative (\(\int\cos(av)\,\mathrm dv=\tfrac1a\sin(av)\)) |
Worked — \(\E[X^{2}]\) for the uniform disc. Its marginal density is \(p_X(x)=\tfrac2\pi\sqrt{1-x^{2}}\) on \([-1,1]\) (worked below). The integrand is even, so double the half from \(0\) to \(1\), then substitute — one \(\cos u\) comes from \(\sqrt{1-x^{2}}\), the other from \(\mathrm dx\):
\[ \E[X^{2}]=\frac2\pi\int_{-1}^{1}x^{2}\sqrt{1-x^{2}}\,\mathrm dx =\frac4\pi\int_0^{\pi/2}\sin^{2}u\,\cos^{2}u\,\mathrm du =\frac1\pi\int_0^{\pi/2}\sin^{2}(2u)\,\mathrm du , \]the last step being \(\sin^{2}u\cos^{2}u=\tfrac14(2\sin u\cos u)^{2}=\tfrac14\sin^{2}(2u)\), identity one. Identity two with \(v=2u\) finishes it:
\[ \frac1\pi\int_0^{\pi/2}\Bigl(\frac12-\frac{\cos(4u)}{2}\Bigr)\mathrm du =\frac1\pi\Bigl[\frac u2-\frac{\sin(4u)}{8}\Bigr]_0^{\pi/2}=\frac1\pi\cdot\frac\pi4=\frac14 , \]the \(\sin(4u)\) term vanishing because \(\sin(2\pi)=\sin0=0\). With \(\E[X]=0\) by the odd-function rule, \(\Var[X]=\tfrac14\). Checks: \(\int_0^1x^{2}\sqrt{1-x^{2}}\mathrm dx=0.1963495=\pi/16\) ✓; \(\int_0^{\pi/2}\sin^{2}(2u)\mathrm du=0.7853982=\pi/4\) ✓; \(\int_{-1}^{1}x^{2}p_X(x)\mathrm dx =0.2500000\) ✓; and at \(u=0.734\), \(2\sin u\cos u=0.9947211=\sin(2u)\) ✓, \(\sin^{2}u=0.4486923=\tfrac12-\tfrac12\cos(2u)\) ✓.
Note on the official solution. Sheet 8 Ex 3(ii) prints this chain as \(\tfrac2\pi\int_{-1}^{1}x^{2}\sqrt{1-x^{2}}\,\mathrm dx=\tfrac4\pi\int_{-1}^{1}x^{2}\sqrt{1-x^{2}} \,\mathrm dx=\tfrac1\pi\int_0^{\pi/2}(2\sin u\cos u)^{2}\mathrm du\). The middle expression is wrong: doubling is only allowed together with halving the range, so it must read \(\tfrac4\pi\int_{0}^{1}\). As printed the middle term equals \(\tfrac12\), twice the correct \(\tfrac14\); the first and last terms are both right, so the final answer is unaffected.
One free fact on top, used in Sheet 8 Ex 3(iii): a whole number of periods of a sine integrates to \(0\), so \(\int_0^{2\pi}\sin(k\theta)\mathrm d\theta=0\) for every integer \(k\neq0\) (check at \(k=2\): \(-0.0000000\) ✓) — which is why the covariance of the uniform disc vanishes with no work. Fuller treatment: Analysis 5.3 — Trigonometric functions, Analysis 8.4 — The substitution rule.
Integration by parts My addition
\[ \int_a^b u(x)\,v'(x)\,\mathrm dx \;=\; \bigl[u(x)\,v(x)\bigr]_a^b \;-\; \int_a^b u'(x)\,v(x)\,\mathrm dx . \]What the rule does. It trades the integral you have for a different one, plus a boundary term. It is worth doing only if the new integral is easier than the old one.
What to pick. Choose \(u\) to be the factor that gets simpler when differentiated, and \(v'\) to be the factor you can integrate. In this course that decision is almost automatic:
- integrand \(=\) polynomial \(\times\) exponential \(\Rightarrow\) \(u=\) the polynomial (each round of by-parts lowers its degree by one), \(v'=\) the exponential;
- integrand contains \(\ln x\) with nothing else convenient \(\Rightarrow\) \(u=\ln x\) (it turns into \(1/x\)), \(v'=\) the rest.
Boundary terms at \(\infty\). Evaluate \([uv]_a^{\infty}\) as a limit. When \(v\) carries a factor \(e^{-ax}\) with \(a>0\), Rule 2 of the previous section makes the term \(0\) at the top, and saying "\(x^{n}e^{-ax}\to0\) as \(x\to\infty\)" is the line that justifies it.
Integration-by-parts examples My addition
P1 — the mean of \(\Exp(\lambda)\). Take \(u=x\) (so \(u'=1\)) and \(v'=\lambda e^{-\lambda x}\) (so \(v=-e^{-\lambda x}\)):
\[ \E[X]=\int_0^{\infty}x\,\lambda e^{-\lambda x}\,\mathrm dx =\underbrace{\bigl[-x e^{-\lambda x}\bigr]_0^{\infty}}_{=\,0-0\,=\,0} +\int_0^{\infty}e^{-\lambda x}\,\mathrm dx =\left[-\frac{1}{\lambda}e^{-\lambda x}\right]_0^{\infty}=\frac1\lambda . \]The boundary term vanishes at the top because the exponential beats the factor \(x\), and at the bottom because of the factor \(x=0\). The sign of the second term became \(+\) because the rule's minus met the minus inside \(v\). Check (\(\lambda=2.2\)): \(0.4545455=1/2.2\). ✓
P2 — the variance of \(\mathcal N(0,1)\) Sheet 8 · Ex 5. The task is \(\int_{-\infty}^{\infty}x^{2}e^{-x^{2}/2}\,\mathrm dx\). Split the \(x^{2}\): take \(u=x\) and \(v'=x e^{-x^{2}/2}\), whose antiderivative is \(v=-e^{-x^{2}/2}\) by example S3 above. Then
\[ \int_{-\infty}^{\infty}x^{2}e^{-x^{2}/2}\,\mathrm dx =\underbrace{\bigl[-x e^{-x^{2}/2}\bigr]_{-\infty}^{\infty}}_{=\,0} +\int_{-\infty}^{\infty}e^{-x^{2}/2}\,\mathrm dx =\sqrt{2\pi} . \]Dividing by \(\sqrt{2\pi}\) gives \(\E[Z^{2}]=1\), and since \(\E[Z]=0\) that is \(\Var[Z]=1\). Check: \(\int_\R x^{2}e^{-x^{2}/2}\mathrm dx=2.5066283=\sqrt{2\pi}\) ✓ and \(\int_\R z^{2}\varphi(z)\,\mathrm dz=1.0000000\) ✓. Choosing \(u=x^{2}\), \(v'=e^{-x^{2}/2}\) instead leads nowhere, because \(e^{-x^{2}/2}\) has no antiderivative in elementary functions — that choice is the trap.
P3 — a conditional expectation Sheet 7 · Ex 1. With \(u=y\), \(v'=e^{-y}\), \(v=-e^{-y}\):
\[ \int_x^{\infty}y e^{-y}\,\mathrm dy =\bigl[-y e^{-y}\bigr]_x^{\infty}+\int_x^{\infty}e^{-y}\,\mathrm dy =\bigl(0+x e^{-x}\bigr)+e^{-x}=(x+1)e^{-x} . \]The boundary term at the lower limit contributes \(+x e^{-x}\) because \(-(-x e^{-x})=x e^{-x}\). Checks: at \(x=0\) the value is \(1.0000000\) versus \((0+1)e^{0}=1\) ✓; at \(x=1\), \(0.7357589\) versus \(2e^{-1}=0.7357589\) ✓; at \(x=2.5\), \(0.2872975\) versus \(3.5\,e^{-2.5}\) ✓.
P4 — the tail formula \(\E[X]=\int_0^{\infty}\P(X>x)\,\mathrm dx\), for \(X\ge0\) with density \(p\) and cdf \(F\). Take \(u=x\) and \(v'=p(x)\). The clever choice is \(v(x)=-\bigl(1-F(x)\bigr)=-\P(X>x)\): this is a legitimate antiderivative of \(p\), because \(\tfrac{\mathrm d}{\mathrm dx}\bigl[-(1-F(x))\bigr]=F'(x)=p(x)\), and any antiderivative may be used. Then
\[ \E[X]=\int_0^{\infty}x\,p(x)\,\mathrm dx =\underbrace{\bigl[-x\,\P(X>x)\bigr]_0^{\infty}}_{=\,0\ \text{when }\E[X]<\infty} +\int_0^{\infty}\P(X>x)\,\mathrm dx . \]The discrete twin, \(\E[X]=\sum_{k\ge1}\P(X\ge k)\) for \(X\) with values in \(\N_0\), is the same identity with a sum in place of the integral, and it is the fast route to \(\E[X]\) for the geometric distribution (§2.1).
P5 — \(\int\ln x\,\mathrm dx\), the "multiply by 1" trick. There is only one factor, so invent a second: \(u=\ln x\) (\(u'=1/x\)) and \(v'=1\) (\(v=x\)). Then
\[ \int_1^{e}\ln x\,\mathrm dx=\bigl[x\ln x\bigr]_1^{e}-\int_1^{e}x\cdot\frac1x\,\mathrm dx =(e\cdot1-1\cdot0)-\bigl[x\bigr]_1^{e}=e-(e-1)=1 , \]so the antiderivative of \(\ln x\) is \(x\ln x-x+C\). Checks: \(\int_1^{e}\ln x\,\mathrm dx =1.0000000\) ✓, and \(\int_0^{1}\ln u\,\mathrm du=-1.0000000\) ✓ — the second of these is the integral that WiSe25 · P3c obtains by a probabilistic argument instead (§2.1).
Which rule, in five seconds My addition
- Do you see a function and its derivative multiplied together? → substitution (\(x e^{-x^{2}/2}\): the \(x\) is the derivative of \(x^{2}/2\)).
- Do you see polynomial \(\times\) exponential with no matching derivative? → by parts, \(u=\) the polynomial (\(x e^{-\lambda x}\), \(x^{2}e^{-ax}\)).
- Is the integrand already a table row, possibly after pulling out a constant? → look it up, do not integrate (the table).
- Is the integrand odd and the interval symmetric? → the answer is \(0\), with no work.
- Do you see a function's derivative over the function itself? → \(\ln\) of the bottom, \(\int f'/f=\ln|f|\).
- Do you see \(\sqrt{1-x^{2}}\)? → the substitution \(x=\sin u\).
- Is the integrand a density in disguise? → its integral over the support is \(1\), so \(\int_0^{\infty}x^{n}e^{-ax}\mathrm dx\) can be read off from the Gamma density instead of computed.
Fuller treatment: Analysis 8.4 — Integration rules, and inside it integration by parts and the substitution rule; Analysis 8 — mixed exercises for drill. In DPT: §1.3, the Gamma integrals, §2.3, the Gaussian, §2.1, Sheet 7 Ex 1, TT3 and TT4 on the exam page. The multivariate version — substitution with a Jacobian determinant — is on B4 and in §2.3, transformations.
Standardise, then fold with \(\Phi\)
Every central-limit task ends the same way: you are asked for a probability about a normal variable, and the answer is not a number but an expression in \(\Phi\), the cdf of the standard normal (\(\Phi(z)=\P(Z\le z)\) for \(Z\sim\mathcal N(0,1)\)). Two moves, in this order. Both were worth credit on two of the three past papers.
Move 1 — standardise; move 2 — fold My addition
1. Standardise. Subtract the mean, divide by the standard deviation. For any \(X\sim\mathcal N(\mu,\sigma^{2})\),
\[ \P(X\le x)=\P\Bigl(\frac{X-\mu}{\sigma}\le\frac{x-\mu}{\sigma}\Bigr) =\Phi\Bigl(\frac{x-\mu}{\sigma}\Bigr) , \]which is substitution S2 above done at the level of probabilities. Dividing by \(\sigma>0\) does not flip the inequality.
2. Fold. The bell curve \(\varphi(z)=\tfrac1{\sqrt{2\pi}}e^{-z^{2}/2}\) is even: \(\varphi(-z)=\varphi(z)\), since only \(z^{2}\) appears. So the area left of \(-z\) equals the area right of \(+z\), which is
\[ \Phi(-z)=1-\Phi(z),\qquad\text{and therefore}\qquad \P\bigl(|Z|\ge a\bigr)=2\bigl(1-\Phi(a)\bigr)=2\,\Phi(-a)\quad (a\ge0). \]Checks: \(\Phi(1.5)+\Phi(-1.5)=0.9331928+0.0668072=1.0000000\) ✓. At \(a=2\): \(2(1-\Phi(2))=0.0455003\), \(2\Phi(-2)=0.0455003\), and integrating the bell curve directly, \(2\int_2^{\infty}\varphi(z)\,\mathrm dz=0.0455003\) ✓. At \(a=1.96\) all three give \(0.0499958\) — the familiar \(5\%\).
Warm-up before the exam line — what \(2\Phi(-1)\) is, and why the halves are equal My addition
Take \(Z\sim\mathcal N(0,1)\) and \(a=1\). The number \(\Phi(-1)\) is, by the definition of a cdf, the probability \(\P(Z\le-1)\): the area under the bell curve to the left of \(-1\). A table (or scipy) gives \(\Phi(-1)=0.1586553\).
Why the right tail has the same area. The bell curve \(\varphi(z)=\tfrac1{\sqrt{2\pi}}e^{-z^{2}/2}\) contains \(z\) only through \(z^{2}\), and \((-z)^{2}=z^{2}\), so \(\varphi(-z)=\varphi(z)\): the picture is the mirror image of itself in the vertical axis. Mirroring turns "everything left of \(-1\)" into "everything right of \(+1\)" and does not change areas. So \(\P(Z\ge1)=\P(Z\le-1)=0.1586553\) too.
The event \(\{|Z|\ge1\}\) means "\(Z\le-1\) or \(Z\ge1\)". Those two pieces do not overlap, so their probabilities add:
\[ \P(|Z|\ge1)=0.1586553+0.1586553=2\,\Phi(-1)=0.3173105 . \]Check the other way round: \(1-\Phi(1)=1-0.8413447=0.1586553\), so \(2\bigl(1-\Phi(1)\bigr)=0.3173105\) — the same number, which is the identity \(\Phi(-a)=1-\Phi(a)\) at \(a=1\). And the middle piece is the leftover: \(\P(|Z|\le1)=1-0.3173105=0.6826895\), the "about 68% within one standard deviation" fact.
Worked — the exam's own line WiSe25 · P4c
There \(\hat\theta_{\mathrm{mle}}\) has \(\E[\hat\theta]=\theta\) and \(\Var[\hat\theta]=\theta^{2}/(2n)\), so its standard deviation is \(\theta/\sqrt{2n}\). The central limit theorem says the standardised estimator is approximately \(\mathcal N(0,1)\). Asked for \(\P(|\hat\theta-\theta|\ge\varepsilon)\), standardise inside the absolute value — dividing both \(|\hat\theta-\theta|\) and \(\varepsilon\) by the same positive number \(\theta/\sqrt{2n}\) — and then fold:
\[ \P\bigl(|\hat\theta-\theta|\ge\varepsilon\bigr) =\P\Bigl(\Bigl|\tfrac{\hat\theta-\theta}{\theta/\sqrt{2n}}\Bigr|\ge\tfrac{\varepsilon\sqrt{2n}}{\theta}\Bigr) \;\approx\; 2\,\Phi\!\Bigl(-\frac{\sqrt{2n}\,\varepsilon}{\theta}\Bigr) . \]Check (\(n=200\), \(\varepsilon=0.2\), \(\theta=1\)): the argument is \(-4\), so the approximation is \(2\Phi(-4)=6.334\cdot10^{-5}\), against the Chebyshev bound \(\theta^{2}/(2n\varepsilon^{2})=0.0625000\) from part (b) — the same quantity, three orders of magnitude apart, which is exactly what part (d) asks you to comment on. The identical move with \(\hat\theta-\theta\) replaced by \(Z_n\) is SoSe26 · P4d: \(\P(|Z_n|\ge a)\approx2(1-\Phi(a))=2\Phi(-a)\).
Used in DPT for: every confidence interval and every two-sided test, where the quantile \(z_{1-\alpha/2}\) is defined by exactly this folding (§3.3, and the \(\Phi\)-table at §3.3); Sheet 9, Sheet 11; and TT8 on the exam page. There is nothing to integrate — \(e^{-z^{2}/2}\) has no elementary antiderivative, which is why the answer is left in terms of \(\Phi\).
Two variables: double integrals, regions, polar coordinates
Up to here every integral had one variable. From §2.3 onwards DPT hands you two random variables at once — a pair \((X,Y)\) with a joint density \(p(x,y)\), a function of two inputs whose total volume is \(1\). Every question about the pair ("what is \(\P(X\le Y)\)?", "what is the density of \(X+Y\)?", "what is the density of \(X\) alone?") turns into an integral over a region of the plane. That is all a double integral is used for in this course. This section gives you the four shapes of region that actually occur and nothing else.
A double integral is two ordinary integrals, done one after the other My addition
The symbol \(\iint_B f(x,y)\,\mathrm dx\,\mathrm dy\) — "integrate \(f\) over the region \(B\) in the plane" — is computed by iterated integration [iterierte Integration]: freeze one variable, integrate over the other, then integrate the result. Written out:
\[ \iint_B f(x,y)\,\mathrm d(x,y)\;=\;\int_{\;x\text{ ranges over its whole span}} \Biggl(\underbrace{\int_{\;y\text{ ranges over the slice of }B\text{ at that }x} f(x,y)\,\mathrm dy}_{\text{inner: }x\text{ is a frozen constant here}}\Biggr)\mathrm dx . \]The only thing that can go wrong is the inner limits. The outer limits are always plain numbers. The inner limits are allowed to contain the outer variable, and that is exactly how a non-rectangular region gets described.
Rule 1 — when the region is a rectangle, the two integrals separate My addition
If \(B=[a,b]\times[c,d]\) (a rectangle: \(x\) between \(a\) and \(b\), \(y\) between \(c\) and \(d\), with no interaction) and the integrand splits as \(f(x,y)=g(x)h(y)\), then
\[ \iint_B g(x)h(y)\,\mathrm d(x,y)=\Bigl(\int_a^b g(x)\,\mathrm dx\Bigr)\cdot\Bigl(\int_c^d h(y)\,\mathrm dy\Bigr). \]Why this is worth knowing: for independent \(X\) and \(Y\) the joint density is a product, \(p(x,y)=p_X(x)\,p_Y(y)\). So every probability over a rectangle collapses into two one-variable integrals you already know how to do, and you never write a double integral at all.
D1 — a rectangle, done both ways My addition
Compute \(\displaystyle\int_0^1\!\!\int_0^2 xy\,\mathrm dy\,\mathrm dx\). Inner first, with \(x\) frozen so that it comes out of the \(y\)-integral as a constant:
\[ \int_0^2 xy\,\mathrm dy = x\int_0^2 y\,\mathrm dy = x\left[\frac{y^{2}}{2}\right]_0^{2}=x\cdot 2=2x, \qquad\text{then}\qquad \int_0^1 2x\,\mathrm dx=\bigl[x^{2}\bigr]_0^{1}=1 . \]By Rule 1 the same thing in one line: \(\bigl(\int_0^1x\,\mathrm dx\bigr)\bigl(\int_0^2y\,\mathrm dy\bigr) =\tfrac12\cdot2=1\). Check: numerical double integration gives \(1.0000000\). ✓
Rule 2 — swapping the order is free when the integrand is \(\ge0\) My addition
If \(f(x,y)\ge0\) everywhere on \(B\), then
\[ \int\!\!\Bigl(\int f\,\mathrm dy\Bigr)\mathrm dx\;=\;\int\!\!\Bigl(\int f\,\mathrm dx\Bigr)\mathrm dy \]— both orders give the same answer, including the answer \(+\infty\). This is Tonelli's theorem [Satz von Tonelli], the non-negative half of the Fubini–Tonelli pair. Densities and probabilities are never negative, so in DPT you may always swap, and you should swap the moment one order looks harder than the other. (For an integrand that changes sign the theorem needs \(\iint|f|<\infty\) first; that case does not occur in this course's exercises.) The slow version, with the counterexample that shows why the condition is not decoration, is on B4 — Fubini and Tonelli.
Reading the inner limits off a region — the four shapes DPT uses My addition
Draw the region. Then, for the order "\(\mathrm dy\) inside, \(\mathrm dx\) outside", ask: for this fixed \(x\), where does \(y\) start and where does it stop?
| Region | Picture in one line | Written as an iterated integral | Where it comes from |
|---|---|---|---|
| rectangle \(a\le x\le b\), \(c\le y\le d\) | a box | \(\int_a^b\int_c^d\cdots\mathrm dy\,\mathrm dx\) | independent pair on bounded supports |
| triangle \(\{x\le y\}\) inside \([0,\infty)^2\) | everything above the diagonal | \(\int_0^{\infty}\!\int_{x}^{\infty}\cdots\mathrm dy\,\mathrm dx\) or \(\int_0^{\infty}\!\int_{0}^{y}\cdots\mathrm dx\,\mathrm dy\) |
\(\P(X\le Y)\); "who arrives first"; Sheet 7 Ex 1 |
| half-plane \(\{x+y\le z\}\), \(z\) fixed | below the line \(y=z-x\) | \(\int_{-\infty}^{\infty}\!\int_{-\infty}^{\,z-x}\cdots\mathrm dy\,\mathrm dx\) | the cdf of a sum \(X+Y\); convolution |
| wedge \(\{x\le t\,y\}\), \(t>0\), \(y>0\) | below a ray through the origin | \(\int_0^{\infty}\!\int_0^{\,t y}\cdots\mathrm dx\,\mathrm dy\) | the cdf of a ratio \(X/Y\) (SoSe25 · P1d) |
| disc \(\{x^{2}+y^{2}\le R^{2}\}\) | a filled circle | \(\int_{-R}^{R}\!\int_{-\sqrt{R^{2}-x^{2}}}^{\,+\sqrt{R^{2}-x^{2}}}\cdots\mathrm dy\,\mathrm dx\), or polar coordinates below | Both are needed. Polar for areas and for integrands that depend only on \(x^{2}+y^{2}\) or are symmetric in the angle (the Gaussian integral; Sheet 8 Ex 3(iii)). The \(x,y\) slice \(\pm\sqrt{R^{2}-x^{2}}\) for a marginal density (D5, Sheet 8 Ex 3(i)) — polar coordinates cannot express "integrate out \(y\)", because \(y\) is not one of their coordinates. |
The one habit that prevents the standard mistake: after you write the limits, check that the outer ones are numbers and that the inner ones mention only the outer variable. If the outer limits still contain a variable, you have swapped the two lines by accident.
Warm-up before D2 — one slice of the triangle, by hand My addition
Take the triangle \(B=\{(x,y) : 0\le x\le y\le 1\}\) — the half of the unit square above the diagonal \(y=x\) — and integrate the constant \(1\) over it, which just measures its area. Choose \(x\) as the outer variable, so the inner integral runs over \(y\).
One slice. Fix \(x=0.3\) and ask the only question there is: for this \(x\), which \(y\) are in \(B\)? The conditions are \(y\ge x=0.3\) and \(y\le1\), so \(y\) runs from \(0.3\) to \(1\) and the slice has length \(1-0.3=0.7\). Written as an integral, \(\int_{0.3}^{1}1\,\mathrm dy=1-0.3=0.7\).
Every slice. The same two conditions at a general \(x\) give \(y\) from \(x\) to \(1\), of length \(1-x\). Now integrate those lengths over all \(x\) between \(0\) and \(1\):
\[ \int_0^1\!\!\int_x^1 1\,\mathrm dy\,\mathrm dx=\int_0^1(1-x)\,\mathrm dx =\Bigl[x-\frac{x^{2}}2\Bigr]_0^1=1-\tfrac12=\tfrac12 . \]Check two ways. The triangle is half of a unit square, so its area is \(\tfrac12\) ✓. And in the other order, with \(y\) outside: for a fixed \(y\), \(x\) runs from \(0\) to \(y\), length \(y\), and \(\int_0^1 y\,\mathrm dy=\tfrac12\) ✓ — the same answer, which is Rule 2. Notice the one thing that changed between the two orders: the inner limits, \(x\) to \(1\) in one, \(0\) to \(y\) in the other. Everything in D2 to D5 below is this slice question asked about a different region.
D2 — the triangle \(\{x\le y\}\): "which of the two happens first?" My addition
\(X\sim\Exp(\lambda)\) and \(Y\sim\Exp(\mu)\) independent, with \(\lambda=2\), \(\mu=3\). Independence makes the joint density the product \(p(x,y)=\lambda e^{-\lambda x}\cdot\mu e^{-\mu y}\) on \(x,y\ge0\). Then
\[ \P(X\le Y)=\iint_{\{x\le y\}}p(x,y)\,\mathrm d(x,y) =\int_0^{\infty}\lambda e^{-\lambda x}\underbrace{\Bigl(\int_x^{\infty}\mu e^{-\mu y}\,\mathrm dy\Bigr)}_{=\,e^{-\mu x}}\mathrm dx =\int_0^{\infty}\lambda e^{-(\lambda+\mu)x}\,\mathrm dx=\frac{\lambda}{\lambda+\mu} . \]Each step: the inner integral is the exponential table row \(\int_x^{\infty}\mu e^{-\mu y}\mathrm dy =\bigl[-e^{-\mu y}\bigr]_x^{\infty}=0-(-e^{-\mu x})=e^{-\mu x}\); then \(e^{-\lambda x}e^{-\mu x}=e^{-(\lambda+\mu)x}\) by the exponential rule \(e^{a}e^{b}=e^{a+b}\); then the same table row again with rate \(\lambda+\mu\), which gives \(\lambda\cdot\frac1{\lambda+\mu}\). Checks: \(\lambda=2,\mu=3\) gives \(0.4000000=2/5\) ✓, and doing the integral in the other order (\(\int_0^{\infty}\!\int_0^{y}\)) gives \(0.4000000\) as well ✓ — that is Rule 2 in action.
D3 — the half-plane \(\{x+y\le z\}\): the density of a sum My addition
\(U,V\) independent and \(\Unif(0,1)\) — that is, each has density \(1\) on \([0,1]\) and \(0\) elsewhere. What is \(\P(U+V\le z)\) for \(z=0.6\)? The region is the part of the unit square below the line \(u+v=0.6\), a right triangle with legs \(0.6\):
\[ \P(U+V\le 0.6)=\int_0^{0.6}\!\!\int_0^{\,0.6-u}1\,\mathrm dv\,\mathrm du =\int_0^{0.6}(0.6-u)\,\mathrm du=\left[0.6u-\frac{u^{2}}{2}\right]_0^{0.6}=0.36-0.18=0.18 . \]In general \(\P(U+V\le z)=z^{2}/2\) for \(0\le z\le1\); differentiating in \(z\) gives the density \(p_{U+V}(z)=z\) there. Checks: \(z=0.6\) gives \(0.1800000=0.6^{2}/2\) ✓; \(z=1.4\) gives \(0.8200000=1-(2-1.4)^{2}/2\) ✓ (above \(z=1\) the triangle is cut off by the square, so the formula changes — a reminder to draw the picture rather than trust one formula everywhere).
The general statement this produces is the convolution formula [Faltung]: differentiating \(\P(X+Y\le z)=\int_{-\infty}^{\infty}\int_{-\infty}^{z-x}p_X(x)p_Y(y)\,\mathrm dy\,\mathrm dx\) under the integral sign gives
\[ p_{X+Y}(z)=\int_{-\infty}^{\infty}p_X(x)\,p_Y(z-x)\,\mathrm dx . \]Check on \(X,Y\) independent \(\Exp(1)\): the formula gives \(\int_0^{z}e^{-x}e^{-(z-x)}\mathrm dx=z e^{-z}\), and at \(z=2\) numerical integration returns \(0.2706706=2e^{-2}\) ✓ — the \(\Gamma(2,1)\) density, which is where the Gamma family comes from (§1.3).
D4 — the wedge \(\{x\le t\,y\}\): the density of a ratio SoSe25 · P1d
\(X,Y\) independent \(\Exp(1)\). For \(t>0\), the event \(\{X/Y\le t\}\) is \(\{X\le tY\}\) (multiplying by \(Y>0\) does not flip the inequality). So
\[ \P\bigl(X/Y\le t\bigr)=\int_0^{\infty}e^{-y}\Bigl(\int_0^{\,t y}e^{-x}\,\mathrm dx\Bigr)\mathrm dy =\int_0^{\infty}e^{-y}\bigl(1-e^{-ty}\bigr)\mathrm dy=1-\frac{1}{1+t}=\frac{t}{1+t} . \]The last step used the table row twice: \(\int_0^{\infty}e^{-y}\mathrm dy=1\) and \(\int_0^{\infty}e^{-(1+t)y}\mathrm dy=\frac1{1+t}\). Check at \(t=2\): numerical double integration gives \(0.6666667=2/3\) ✓. Differentiating in \(t\) gives the density of the ratio, \(p(t)=1/(1+t)^{2}\) on \(t>0\).
The whole recipe for a ratio, a sum or a maximum is the same three lines: (i) write the event as a region of the plane; (ii) integrate the joint density over it, inner limits first; (iii) differentiate the resulting cdf in the parameter to get a density. Nothing about it is specific to which function of \((X,Y)\) you took.
D5 — marginal densities: integrating the other variable out
Given the joint density \(p_{X,Y}\) of a pair, the marginal density [Randdichte] of \(X\) alone is what you get by forgetting \(Y\). "Forgetting" means adding up all the ways \(Y\) could have come out, and adding up over a continuous variable is integrating.
The rule, and the only hard part Script §1.4, Thm 1.68
\[ p_X(x)=\int_{-\infty}^{\infty}p_{X,Y}(x,y)\,\mathrm dy ,\qquad p_Y(y)=\int_{-\infty}^{\infty}p_{X,Y}(x,y)\,\mathrm dx . \]The only hard part is the limits. They are not \(-\infty\) to \(\infty\) in practice: the joint density is \(0\) outside its region, so the integral runs over the slice of the region at that \(x\) — the same vertical strip as in the iterated-integration box above, and the same indicator-to-limits move as in "integrate only over the support". The answer is a function of \(x\), and you must also say for which \(x\) it is non-zero.
Worked — the uniform disc Sheet 8 · Ex 3(i)
\((X,Y)\) is uniform on the unit disc \(D=\{(x,y) : x^{2}+y^{2}\le1\}\). "Uniform" means constant density on \(D\); since the disc has area \(\pi\) and the total must be \(1\), that constant is \(1/\pi\): \(p_{X,Y}(x,y)=\tfrac1\pi\chi_D(x,y)\).
The slice. Fix an \(x\). The condition \(x^{2}+y^{2}\le1\) is \(y^{2}\le1-x^{2}\), i.e. \(|y|\le\sqrt{1-x^{2}}\). So \(y\) runs from \(-\sqrt{1-x^{2}}\) to \(+\sqrt{1-x^{2}}\) — and that requires \(1-x^{2}\ge0\), so there is a slice only for \(x\in[-1,1]\); outside that, \(p_X(x)=0\). Then
\[ p_X(x)=\int_{-\sqrt{1-x^{2}}}^{\,+\sqrt{1-x^{2}}}\frac1\pi\,\mathrm dy =\frac1\pi\cdot\Bigl(\sqrt{1-x^{2}}-\bigl(-\sqrt{1-x^{2}}\bigr)\Bigr) =\frac{2}{\pi}\sqrt{1-x^{2}}\qquad\text{for }|x|\le1 . \]The integrand did not depend on \(y\), so the integral is just "constant × length of the interval", and the length is twice the half-width. By the symmetry between the two coordinates, \(p_Y(y)=\tfrac2\pi\sqrt{1-y^{2}}\) on \([-1,1]\). Checks: \(\int_{-1}^{1}p_X=1.0000000\) ✓ (a marginal is a density, so this is the free error-check); at \(x=0.6\) the slice integral gives \(0.5092958\) and the formula \(\tfrac2\pi\sqrt{1-0.36}=0.5092958\) ✓. The mean is \(0\) by the odd-function rule, and \(\E[X^{2}]=0.2500000=\tfrac14\), which is the trig-substitution box.
Why polar coordinates are the wrong tool here, even though the region is a disc: "integrate out \(y\)" is a statement about the coordinate \(y\), and after the change to \((r,\theta)\) there is no \(y\) left to integrate out. Polar coordinates are for Sheet 8 Ex 3(iii) — the covariance, where the integrand \(xy=r^{2}\cos\theta\sin\theta\) becomes \(\tfrac12 r^{2}\sin(2\theta)\) and the \(\theta\)-integral over a full turn is \(0\) (§2.1). Check: integrating \(xy/\pi\) over the disc numerically gives \(0.0000000\) ✓.
A second instance, with an unbounded slice Sheet 7 · Ex 1
\(p_{X,Y}(x,y)=e^{-y}\chi_A(x,y)\) with \(A=\{0\le x\le y\}\). For \(x\ge0\) the slice at that \(x\) is \(y\in[x,\infty)\), so \(p_X(x)=\int_x^{\infty}e^{-y}\mathrm dy=e^{-x}\). Slicing the other way, at a fixed \(y\ge0\) the variable \(x\) runs over \([0,y]\) and the integrand does not depend on \(x\), so \(p_Y(y)=\int_0^{y}e^{-y}\mathrm dx=y\,e^{-y}\). Checks: \(p_X(0.8)=0.4493290=e^{-0.8}\) ✓; \(p_Y(1.3)=0.3542913=1.3\,e^{-1.3}\) ✓. Both marginals are needed for what that exercise actually asks: the conditional densities \(p_{X\mid Y=y}=p_{X,Y}/p_Y\) and \(p_{Y\mid X=x}=p_{X,Y}/p_X\), from which it computes \(\E[X\mid Y=y]=y/2\) and \(\E[Y\mid X=x]=x+1\) (§2.1). A marginal is also the standard way to disprove independence, since \(p_{X,Y}=p_Xp_Y\) fails here — \(e^{-x}\cdot y e^{-y}\ne e^{-y}\chi_A(x,y)\) — and that is the move Sheet 8 · Ex 3(iii) makes for the disc.
Polar coordinates, and the Gaussian integral
For an integrand that depends on the distance from the origin, the \(x,y\) slice \(\pm\sqrt{R^{2}-x^{2}}\) leads to an integral nothing simplifies. Polar coordinates [Polarkoordinaten] describe the same point by a distance and an angle instead:
\[ x=r\cos\theta,\qquad y=r\sin\theta,\qquad r\ge0,\ \ \theta\in[0,2\pi) , \]where \(r=\sqrt{x^{2}+y^{2}}\) is the distance from the origin and \(\theta\) is the angle measured anticlockwise from the positive \(x\)-axis. In these coordinates a disc of radius \(R\) is simply \(0\le r\le R\), \(0\le\theta<2\pi\) — a rectangle again.
The factor \(r\) is not optional My addition
\[ \iint f(x,y)\,\mathrm dx\,\mathrm dy=\iint f(r\cos\theta,\,r\sin\theta)\;\boxed{r}\;\mathrm dr\,\mathrm d\theta . \]Sanity check: the area of a disc of radius \(2\) is \(\int_0^{2\pi}\!\int_0^{2}r\,\mathrm dr\,\mathrm d\theta=2\pi\cdot\bigl[\tfrac{r^{2}}2\bigr]_0^{2}=2\pi\cdot2=4\pi\). Numerically \(12.5663706=4\pi\) ✓. Leaving out the \(r\) would have produced \(2\pi\cdot2=4\pi\) as well only by accident of this example — for radius \(3\) the correct \(9\pi=28.27\) versus the wrong \(6\pi=18.85\) shows the difference.
Why \(\int_{\R}e^{-z^{2}/2}\,\mathrm dz=\sqrt{2\pi}\) — the one place polar coordinates earn their keep My addition
\(e^{-z^{2}/2}\) has no antiderivative built from powers, exponentials, logarithms and trigonometric functions, so one-variable methods cannot touch it. Call the unknown number \(I\), square it (Rule 1 read backwards turns the product of two one-variable integrals into a double one), and switch to polar, where \(x^{2}+y^{2}=r^{2}\) and the plane is \(r\in[0,\infty)\), \(\theta\in[0,2\pi)\):
\[ I^{2}=\iint_{\R^{2}}e^{-(x^{2}+y^{2})/2}\,\mathrm dx\,\mathrm dy =\int_0^{2\pi}\Bigl(\underbrace{\int_0^{\infty}r e^{-r^{2}/2}\mathrm dr}_{=\,1}\Bigr)\mathrm d\theta =2\pi\quad\Longrightarrow\quad I=\sqrt{2\pi}. \]The inner integral is the substitution \(u=r^{2}/2\), \(\mathrm du=r\,\mathrm dr\), giving \(\int_0^{\infty}e^{-u}\mathrm du=1\) — the factor \(r\) that polar coordinates supplied is exactly the factor that substitution needed, which is the whole reason the trick works. Checks: \(\int_0^{\infty}re^{-r^{2}/2}\mathrm dr=1.0000000\) ✓ and \(\int_{\R}e^{-z^{2}/2}\mathrm dz=2.5066283=\sqrt{2\pi}\) ✓.
The Jacobian, in one line, for the two cases that occur My addition
Substitution in two variables is the same idea as in one: change coordinates, and multiply by "how much the change stretches area". That stretch factor is the absolute value of the Jacobian determinant [Jacobi-Determinante] \(|\det J|\), where \(J\) is the matrix of all partial derivatives of the new coordinates' map. Two cases are enough here.
- Linear map. \(x=au+bv\), \(y=cu+dv\). Then \(J=\begin{pmatrix}a&b\\c&d\end{pmatrix}\), \(\det J=ad-bc\), and \(\mathrm dx\,\mathrm dy=|ad-bc|\,\mathrm du\,\mathrm dv\). The one-dimensional special case \(x=\sigma u+\mu\) has stretch factor \(|\sigma|\) — that is the \(1/\sigma\) in the \(\mathcal N(\mu,\sigma^{2})\) density.
- Polar map. \(x=r\cos\theta\), \(y=r\sin\theta\). Then \(J=\begin{pmatrix}\cos\theta&-r\sin\theta\\ \sin\theta&r\cos\theta\end{pmatrix}\) and \(\det J=r\cos^{2}\theta+r\sin^{2}\theta=r(\cos^{2}\theta+\sin^{2}\theta)=r\), using \(\cos^{2}+\sin^{2}=1\). That is the factor \(r\) from the box above.
The general statement — \(\int_{T(B)}f=\int_B (f\circ T)\,|\det J_T|\) in \(\R^{n}\), with determinants, matrix inverses and worked examples — is on B5 — change of variables, and the regions-and-slices side of it is on B4 — integrating over regions. In DPT it appears as Proposition 2.51 (§2.3, transformations); the one-dimensional version \(p_Y(y)=p_X(g^{-1}(y))\,\bigl|\tfrac{\mathrm d}{\mathrm dy}g^{-1}(y)\bigr|\) is the case \(n=1\), where "\(|\det J|\)" is just the absolute value of a derivative — worked in full at the transformation formula.
Fuller treatment: your Analysis guide builds differential calculus in several variables (Analysis 11.2 — partial derivatives, the Jacobian matrix) but it never integrates in two variables, so the double integral itself is a genuine gap — it is written up on B4. In DPT: §2.3 transformations, §2.3 the Gaussian, Sheet 7 Ex 1, exam task type TT4.
Convex functions and Jensen
A function is convex [konvex] when its graph curves upward like a bowl: every straight line segment joining two points of the graph lies above the graph. Concave [konkav] is the mirror image — an upside-down bowl, chords below the graph. DPT needs this for exactly one reason: Jensen's inequality, which says that averaging and applying a convex function do not commute, and which direction the error goes.
The test you can actually run in an exam My addition
Let \(g\) be twice differentiable on an interval \(I\). Then
\[ g''(x)\ge0\ \text{ for all }x\in I\ \Longleftrightarrow\ g\text{ is convex on }I,\qquad g''(x)\le0\ \text{ for all }x\in I\ \Longleftrightarrow\ g\text{ is concave on }I . \]The three-second procedure: differentiate twice, look at the sign, write one sentence naming the interval. That is it. \(g''\) is the derivative of \(g'\); \(g'\ge0\) rising means the slope keeps increasing, which is exactly "curving upward".
The exam sentence, in the form that scores: "\(g(x)=x^{2}\) satisfies \(g''(x)=2>0\) for all \(x\in\R\), hence \(g\) is convex on \(\R\)." Name the function, give \(g''\), give the sign, give the interval, say the word.
When \(g\) is not differentiable — the only such case here is \(g(x)=|x|\), which has a corner at \(0\) — use the definition directly: \(g\) is convex if \(g(\alpha x+(1-\alpha)y)\le\alpha g(x)+(1-\alpha)g(y)\) for all \(x,y\) and all \(\alpha\in[0,1]\). For \(|\cdot|\) this is the triangle inequality (above), so \(|x|\) is convex without any second derivative.
Warm-up before Jensen — \(x^{2}\) at two points My addition
Take \(g(x)=x^{2}\) and the two points \(x_1=1\) and \(x_2=3\) on its graph, at heights \(g(1)=1\) and \(g(3)=9\). The chord is the straight segment joining \((1,1)\) to \((3,9)\).
Compare the two at the midpoint. The midpoint of \(1\) and \(3\) is \(\tfrac{1+3}{2}=2\). On the curve the height there is \(g(2)=4\). On the chord the height there is the midpoint of the two end heights, \(\tfrac{1+9}{2}=5\) — a straight line's value halfway along is the average of its two end values. And \(4\le5\): the chord is above the curve. That one inequality, for every pair of points and every point in between, is the definition of convex.
Now read it as probability. Let \(X\) be the random variable that takes the value \(1\) with probability \(\tfrac12\) and \(3\) with probability \(\tfrac12\). Then \(\E[X]=\tfrac12\cdot1+\tfrac12\cdot3=2\) and \(\E[g(X)]=\tfrac12\cdot1+\tfrac12\cdot9=5\), so
\[ g\bigl(\E[X]\bigr)=4\;\le\;5=\E\bigl[g(X)\bigr] , \]which is Jensen's inequality for this \(X\). The gap \(5-4=1\) is exactly \(\Var[X]\), because \(\E[X^{2}]-\E[X]^{2}\) is the variance, and \(\Var[X]=1\) for a variable sitting at \(1\) and \(3\) with equal weight ✓. Second-derivative check: \(g'(x)=2x\), \(g''(x)=2\), positive everywhere, so \(x^{2}\) is convex on all of \(\R\) — matching what the picture showed.
The list to memorise — six functions, with their second derivatives My addition
| \(g(x)\) | \(g'(x)\) | \(g''(x)\) | Verdict | What Jensen then says |
|---|---|---|---|---|
| \(x^{2}\) on \(\R\) | \(2x\) | \(2>0\) | convex | \(\E[X]^{2}\le\E[X^{2}]\) — i.e. \(\Var[X]\ge0\) |
| \(e^{x}\) on \(\R\) | \(e^{x}\) | \(e^{x}>0\) | convex | \(e^{\E[X]}\le\E[e^{X}]\) — the moment-generating direction |
| \(-\ln x\) on \((0,\infty)\) | \(-1/x\) | \(1/x^{2}>0\) | convex | \(-\ln\E[X]\le\E[-\ln X]\), i.e. \(\E[\ln X]\le\ln\E[X]\) |
| \(1/x\) on \((0,\infty)\) | \(-1/x^{2}\) | \(2/x^{3}>0\) | convex | \(1/\E[X]\le\E[1/X]\) |
| \(|x|\) on \(\R\) | undefined at \(0\) | — | convex (by definition) | \(|\E[X]|\le\E[|X|]\) |
| \(\sqrt x\) on \((0,\infty)\) | \(\tfrac12x^{-1/2}\) | \(-\tfrac14x^{-3/2}<0\) | concave | \(\E[\sqrt X]\le\sqrt{\E[X]}\) — inequality the other way |
| \(\ln x\) on \((0,\infty)\) | \(1/x\) | \(-1/x^{2}<0\) | concave | \(\E[\ln X]\le\ln\E[X]\) |
| \(x^{3}\) on \(\R\) | \(3x^{2}\) | \(6x\), sign changes at \(0\) | neither on \(\R\) | Jensen does not apply — convex only on \([0,\infty)\) |
Numerical spot-checks of the second derivatives (difference quotient \(\frac{g(x+h)-2g(x)+g(x-h)}{h^{2}}\) with \(h=10^{-4}\)): \(x^{2}\) at \(x=1\): \(+2.000000\) versus \(2\) ✓; \(e^{x}\) at \(x=0.7\): \(+2.013753\) versus \(e^{0.7}=2.013753\) ✓; \(-\ln x\) at \(x=2\): \(+0.250000\) versus \(1/4\) ✓; \(\sqrt x\) at \(x=4\): \(-0.031250\) versus \(-\tfrac14\cdot4^{-3/2}=-1/32\) ✓; \(\ln x\) at \(x=3\): \(-0.111111\) versus \(-1/9\) ✓; \(1/x\) at \(x=2\): \(+0.250000\) versus \(2/8\) ✓.
The last row is the trap the exams like: a function can be convex on part of its domain and concave on another part. Jensen needs convexity on an interval that contains all the values \(X\) can take. Saying "on \(\R\)" when the function is only convex on \([0,\infty)\) loses the credit.
Jensen's inequality, as the exam wants it written Script 2.42 SoSe26 · P3a
Assumptions: \(X\) a real random variable with \(\E[|X|]<\infty\) (its expectation exists and is finite), and \(g:\R\to\R\) convex. Conclusion:
\[ g\bigl(\E[X]\bigr)\;\le\;\E\bigl[g(X)\bigr] . \]SoSe26 · P3a gave 3 credits for this statement alone, one credit each for: "\(\E[X]\) is finite", "\(g:\R\to\R\) is convex", and the inequality with the correct direction. Part (b) then asked you to check convexity of a concrete \(g\) and apply it — which is the \(g''\ge0\) line from the box above, and nothing more. So the whole Analysis content of that 5-credit problem is: differentiate twice, read the sign, name the interval.
Numeric check with \(X\) uniform on \(\{1,2,6\}\), so \(\E[X]=3\): with \(g(x)=x^{2}\), \(g(\E[X])=9.000000\) and \(\E[g(X)]=\tfrac{1+4+36}{3}=13.666667\), and \(9\le13.67\) ✓ — the gap \(13.666667-9=4.666667\) is precisely \(\Var[X]\). With the concave \(g=\ln\): \(\E[\ln X]=0.828302\le\ln\E[X]=1.098612\) ✓.
Fuller treatment: Analysis 7.6 — Convexity [Krümmungsverhalten] for the equivalence between \(g''\ge0\), the chord condition and the tangent-below condition. In DPT the probability side lives on §2.2 — Jensen's inequality (with a widget that moves the two points of the chord), and the exam-statement drill is on the exam page.
Complex numbers, only as much as §2.3 needs
Characteristic functions [charakteristische Funktionen] are defined as \(\varphi_X(t)=\E[e^{itX}]\), and the letter \(i\) in that formula is the only reason complex numbers appear in this course. You do not need complex analysis. You need five facts.
The five facts My addition
- What \(i\) is. \(i\) is a symbol with \(i^{2}=-1\). A complex number [komplexe Zahl] is \(z=a+bi\) with \(a,b\in\R\); \(a\) is the real part, \(b\) the imaginary part. You add and multiply exactly as with real numbers, replacing \(i^{2}\) by \(-1\) whenever it appears: \((2+3i)(1-i)=2-2i+3i-3i^{2}=2+i+3=5+i\).
- Modulus. \(|z|=\sqrt{a^{2}+b^{2}}\) — the distance of \(z\) from \(0\) in the plane whose axes are the real and imaginary parts. It behaves like the absolute value: \(|zw|=|z|\,|w|\) and \(|z+w|\le|z|+|w|\). This is the \(|\cdot|\) that lets you write \(|\varphi_X(t)|\le1\).
- Euler's formula [Eulersche Formel]. For real \(t\), \[ e^{it}=\cos t+i\sin t . \] This is a definition-level fact you use as a rewriting rule: whenever a sum of \(e^{itx}\)-terms needs simplifying, expand it into cosine and sine.
- \(|e^{it}|=1\) for every real \(t\). Because \(|e^{it}|=\sqrt{\cos^{2}t+\sin^{2}t}=\sqrt{1}=1\), using the Pythagorean identity \(\cos^{2}+\sin^{2}=1\). Check at \(t=1.3\): \(|\cos 1.3+i\sin1.3|=1.0000000\) ✓. Consequence used constantly: \(|\varphi_X(t)|=|\E[e^{itX}]|\le\E[|e^{itX}|]=\E[1]=1\), so a characteristic function always exists and never exceeds \(1\) in modulus — no integrability condition is ever needed, unlike for moment-generating functions.
- Differentiating \(e^{ict}\) in \(t\). The real chain rule carries over unchanged, with the constant \(ic\) treated like any other constant: \[ \frac{\mathrm d}{\mathrm dt}e^{ict}=ic\,e^{ict}. \] Check with \(c=2\) at \(t=0.4\): the numerical derivative is \(-1.434712+1.393413\,i\) and \(2i\,e^{0.8i}=-1.434712+1.393413\,i\) ✓. Repeating it gives \(\tfrac{\mathrm d^{n}}{\mathrm dt^{n}}e^{itx}=(ix)^{n}e^{itx}\), which at \(t=0\) is \((ix)^{n}\) — that is the whole content of "\(\E[X^{n}]=i^{-n}\varphi_X^{(n)}(0)\)" (Remark 2.47(iii)), the alternative route to means and variances that SoSe26 · P4 accepted for full marks.
The one limit the central limit theorem's proof uses Script 2.64, proof
\[ \text{if }z_n\to z\text{ in }\mathbb{C},\qquad\text{then}\qquad\Bigl(1+\frac{z_n}{n}\Bigr)^{n}\longrightarrow e^{z} \quad(n\to\infty). \]Here \(\mathbb{C}\) is the set of complex numbers. This is the complex version of the real limit \((1+x/n)^{n}\to e^{x}\) from the three limits; the statement is the same and only the number system changed. Checks with \(z=i\): \((1+i/n)^{n}\) equals \(0.570790+0.882508\,i\) at \(n=10\), \(0.540573+0.841892\,i\) at \(n=1000\), \(0.540305+0.841475\,i\) at \(n=10^{5}\), converging to \(e^{i}=\cos1+i\sin1=0.540302+0.841471\,i\) ✓.
Where it is used. In the CLT proof the characteristic function of the standardised sum is \(\varphi_{Z_n}(t)=\bigl(\varphi_{X}(t/\sqrt n)\bigr)^{n}\), and a Taylor expansion (next section) turns the bracket into \(1-\frac{t^{2}}{2n}+o(1/n)\). Then the limit above with \(z_n=-\tfrac{t^{2}}2+n\cdot o(1/n)\to-\tfrac{t^{2}}{2}\) gives \(\varphi_{Z_n}(t)\to e^{-t^{2}/2}\), the characteristic function of \(\mathcal N(0,1)\).
A concrete instance you can check by hand — the one SoSe26 · P4b builds: if \(X_i=\pm1\) with probability \(\tfrac12\) each, then \(\varphi_{X}(t)=\tfrac12 e^{it}+\tfrac12e^{-it}=\cos t\) (Euler's formula, since the sine terms cancel), so \(\varphi_{Z_n}(t)=\cos^{n}(t/\sqrt n)\). At \(t=1\): \(0.601359\) for \(n=10\), \(0.606024\) for \(n=100\), \(0.606526\) for \(n=10^{4}\), \(0.606531\) for \(n=10^{6}\) — converging to \(e^{-1/2}=0.606531\) ✓.
Fuller treatment: Analysis 1.1 — Complex numbers [komplexe Zahlen] for the arithmetic, and B1 — calculus with complex-valued functions for the derivative rules and this limit written out with its proof, which your Analysis script states for real arguments only. In DPT: §2.3 — characteristic functions and §2.4 — the central limit theorem.
Taylor to second order and little-o
Near a point, a smooth function looks like a parabola. Taylor's formula to second order [Taylorformel] writes down that parabola and names the leftover. DPT uses exactly one instance of it, in the proof of the central limit theorem, so this section covers that one instance and stops.
The expansion, and what \(o(s^{2})\) means My addition
If \(f\) is twice differentiable at \(0\), then for \(s\) near \(0\)
\[ f(s)=f(0)+f'(0)\,s+\tfrac12 f''(0)\,s^{2}+o(s^{2}) . \]Each piece: \(f(0)\) is the height at \(0\); \(f'(0)s\) tilts the line to the right slope; \(\tfrac12f''(0)s^{2}\) bends it to the right curvature; and \(o(s^{2})\) — read "little-o of \(s^{2}\)" [Landau-Symbol] — is a placeholder for whatever is left over.
The three expansions that occur:
\[ e^{s}=1+s+\tfrac{s^{2}}2+o(s^{2}),\qquad \cos s=1-\tfrac{s^{2}}2+o(s^{2}),\qquad e^{is}=1+is-\tfrac{s^{2}}2+o(s^{2}) . \]The third is the first with \(s\) replaced by \(is\), using \(i^{2}=-1\) in the square term: \(\tfrac{(is)^{2}}{2}=\tfrac{i^{2}s^{2}}{2}=-\tfrac{s^{2}}{2}\).
Watching the leftover shrink — a numeric example My addition
Take \(f(s)=\cos s\), whose expansion is \(1-s^{2}/2+o(s^{2})\). The table shows the true value, the parabola, the error, and — the column that matters — the error divided by \(s^{2}\).
| \(s\) | \(\cos s\) | \(1-s^{2}/2\) | error | error\(/s^{2}\) |
|---|---|---|---|---|
| \(0.5\) | \(0.8775826\) | \(0.8750000\) | \(2.58\cdot10^{-3}\) | \(1.03\cdot10^{-2}\) |
| \(0.1\) | \(0.9950042\) | \(0.9950000\) | \(4.17\cdot10^{-6}\) | \(4.17\cdot10^{-4}\) |
| \(0.01\) | \(0.9999500\) | \(0.9999500\) | \(4.17\cdot10^{-10}\) | \(4.17\cdot10^{-6}\) |
The last column is the point. It is not enough that the error shrinks — the error divided by \(s^{2}\) shrinks too, by a factor of about \(100\) each time \(s\) shrinks by \(10\). That is what "\(o(s^{2})\)" asserts.
Where DPT uses it: the one step of the CLT proof Script 2.64
Let \(X_1,X_2,\dots\) be independent and identically distributed with \(\E[X_1]=0\) and \(\Var[X_1]=1\), and let \(Z_n=\frac1{\sqrt n}\sum_{i=1}^{n}X_i\). Apply the expansion to \(f(t)=\varphi_{X_1}(t)\), whose first two derivatives at \(0\) are \(\varphi'(0)=i\,\E[X_1]=0\) and \(\varphi''(0)=i^{2}\E[X_1^{2}]=-1\):
\[ \varphi_{X_1}(s)=\underbrace{\varphi(0)}_{=\,1}+\underbrace{\varphi'(0)}_{=\,0}s +\tfrac12\underbrace{\varphi''(0)}_{=\,-1}s^{2}+o(s^{2}) =1-\frac{s^{2}}{2}+o(s^{2}) . \]Put \(s=t/\sqrt n\), so \(s^{2}=t^{2}/n\), and raise to the \(n\)-th power (independence turns the sum into a product of characteristic functions):
\[ \varphi_{Z_n}(t)=\Bigl(\varphi_{X_1}\bigl(t/\sqrt n\bigr)\Bigr)^{n} =\Bigl(1-\frac{t^{2}}{2n}+o\bigl(\tfrac1n\bigr)\Bigr)^{n}\;\longrightarrow\;e^{-t^{2}/2} \]by the limit \((1+z_n/n)^{n}\to e^{z}\) from the previous section. And \(e^{-t^{2}/2}\) is the characteristic function of \(\mathcal N(0,1)\), which by the continuity theorem gives \(Z_n\to\mathcal N(0,1)\) in distribution.
Fuller treatment: Analysis 6.1 — Landau symbols [Landau-Symbole] for \(o\) and \(O\), and Analysis 10.1 — Taylor's formula for the general expansion with its remainder term. In DPT: §2.3 and §2.4 — the central limit theorem; \(o(\cdot)\) as a symbol to read is in the notation table at the top of this page.
The cheat card
This is the part to reread the evening before the exam. Left column: the words that appear on the paper. Middle: the Analysis move those words demand. Then: where on this page it is written out, and where in DPT it is used. Every row is drawn from a task that actually appeared on one of the three past papers or on the eleven exercise sheets — the task-type codes TT1–TT15 are the ones used on the exam page.
Honesty note. Three past papers is a small sample, and the rows are weighted by what those three happened to ask. Read the table as "what has been asked", never as "what will be asked". The rows are ordered roughly by how often the move was needed, not by difficulty.
| If the DPT task says … | … the Analysis move is … | … on this page … | … and DPT uses it in |
|---|---|---|---|
| "Determine the constant \(c\) such that \(p\) is a density" | Set \(\int p=1\) over the stated support only, pull \(c\) out by linearity, solve. Then add the line \(p\ge0\). | Integration | TT3; SoSe25 · P3a |
| "Compute the cdf \(F_X\)" | Integrate the density from the left end of the support up to \(x\); write all three branches (\(0\) below, formula on, \(1\) above). | Integration | TT3; SoSe25 · P3b |
| "Compute \(\E[X]\)" for a density | \(\int x\,p(x)\,\mathrm dx\) over the support; for \(x^{n}e^{-ax}\) read off \(n!/a^{n+1}\) instead of integrating. | The integral table | §2.1; SoSe25 · P3 |
| "Compute \(\E[X]\)" for a pmf | Sum a series: geometric \(\sum q^{k}=\frac1{1-q}\), exponential \(\sum\frac{\lambda^{k}}{k!}=e^{\lambda}\), index shift, telescoping. | Series | §1.2; every discrete mean |
| "Compute \(\E[X]\) or \(\Var[X]\) for \(\Geo(p)\) / \(\NegBin(r,p)\)" | The differentiated geometric series \(\sum_{k\ge1}kq^{k-1}=\frac1{(1-q)^{2}}\) and \(\sum_{k\ge2}k(k-1)q^{k-2}=\frac2{(1-q)^{3}}\), with \(q=1-p\). | Series | §1.2; Lemma 2.26(v),(vi) |
| "Compute the characteristic function of \(\Poi(\lambda)\)" | \((e^{it})^{k}=e^{ikt}\), then the exponential series with the complex argument \(\lambda e^{it}\): \(\varphi(t)=\exp(\lambda(e^{it}-1))\). | Series | §2.3; Sheet 8 Ex 1 |
| "Compute \(\Var[X]\)" | \(\E[X^{2}]-\E[X]^{2}\); the \(\E[X^{2}]\) integral is one row further down the same table (\(2/a^{3}\) for \(\Exp\)). | The integral table | TT6; §2.1 |
| "Determine the median / the \(\alpha\)-quantile" | Solve \(F(m)=\tfrac12\) — usually \(1-e^{-\lambda m}=\tfrac12\), so apply \(\ln\) and divide. Discard roots outside the support. | Solving with \(\ln\) | TT3; SoSe25 · P3c |
| … and the cdf is a quadratic, e.g. \((r+3)^{2}/15=0.05\) | Complete the square with \(x^{2}+bx=(x+\tfrac b2)^{2}-\tfrac{b^{2}}4\), take \(x=-a\pm\sqrt c\), then keep the root inside the support and say why. | Quadratic equations | Sheet 5 Ex 1(iv),(v); Sheet 7 Ex 4(i) |
| "Compute the cdf" and the density has several pieces | Each branch starts from the value already accumulated: \(F(r)=F(0)+\int_0^{r}p\). Check the branches agree where they meet, and that the last one ends at \(1\). | Quadratic equations | Sheet 5 Ex 1(ii) |
| "Derive the density of \(Y=g(X)\)" | cdf route: \(\P(g(X)\le y)\), invert the inequality (flip if \(g\) decreases), then differentiate with the chain rule. The safe route when \(g\) is not monotone. | Differentiation | TT4; WiSe25 · P3a |
| "… with the hint \(p_Y(y)=p_X(g^{-1}(y))\bigl|\tfrac{\mathrm d}{\mathrm dy}g^{-1}(y)\bigr|\)" | Invert \(g\) algebraically, differentiate the inverse, take the absolute value, and map the old support through \(g\) — that last step is separately marked. | Transformation formula | TT4; SoSe25 · P3d, WiSe25 · P3a |
| "Determine the maximum likelihood estimator" | \(\ln\) turns the product \(\prod p_\theta(x_i)\) into a sum; differentiate in \(\theta\); set \(=0\); solve. | \(\ln\) rules, Differentiation | TT5; §3.2 |
| "Determine the mle" and the model has two parameters (\(\nabla_\theta\ell=0\)) | Differentiate in each parameter with the other frozen (that is all \(\partial\) means), solve the first, substitute it into the second. | Partial derivatives | §3.2; script Ex 3.28 (Gaussian) |
| "Show that \(\hat\theta\) is indeed a maximum" | \(\ell''(\hat\theta)<0\) for a local maximum; for a global one, show \(\ell'>0\) left of \(\hat\theta\) and \(\ell'<0\) right of it. | Finding a maximum | TT5; WiSe25 · P4a |
| "Bound \(\P(|Y-\E[Y]|\ge\varepsilon)\)" | Chebyshev: compute \(\E[Y]\) and \(\Var[Y]\) as a labelled step, then divide by \(\varepsilon^{2}\) and simplify the algebra. | Rearranging inequalities | TT7; SoSe25 · P5c |
| "Bound \(\P(|Z|\ge a)\)" with Markov | Square both sides first: \(|Z|\ge a\iff Z^{2}\ge a^{2}\) (both sides non-negative, so squaring preserves the inequality), then Markov on \(Z^{2}\). | Rearranging inequalities | TT7; SoSe26 · P4d |
| "How large must \(n\) be so that … \(\le0.05\)?" | Set the bound equal to the budget, solve for \(n\), then round in the safe direction and say which direction that is and why. | Rearranging inequalities | TT7; §2.2 |
| "Is the estimator asymptotically unbiased / consistent?" | Take \(n\to\infty\) of the bias or the variance, using the limit rules and \(\tfrac1n\to0\). | Limit rules | TT6; §3.2 |
| "Show \(\lim_{n\to\infty}\binom nk p^{k}(1-p)^{n-k}=\dots\)" (Poisson limit) | The \(e\)-limit \(\bigl(1-\tfrac\lambda n\bigr)^{n}\to e^{-\lambda}\), plus \(\tfrac{n!}{(n-k)!\,n^{k}}\to1\) for fixed \(k\). | The three limits | §1.2, Thm 1.42; Sheet 3 Ex 3 |
| "Show that \(\sum_k p(k)=1\)" | Recognise the geometric or exponential series; shift the index so it starts where the standard formula starts. | Series | §1.2; Sheets 2–4 |
| "Show the memorylessness \(\P(X>s+t\mid X>s)=\P(X>t)\)" | Split the exponential: \(e^{-\lambda(s+t)}=e^{-\lambda s}e^{-\lambda t}\), then cancel. | \(\exp\) rules | §1.4; Sheet 5 |
| "Compute \(\int x\,e^{-\lambda x}\,\mathrm dx\)" (or any polynomial \(\times\) exponential) | Integration by parts with \(u=\) the polynomial; the boundary term at \(\infty\) vanishes because \(\exp\) beats every power. | By parts | §2.1; TT3 |
| "Compute \(\int x\,e^{-x^{2}/2}\,\mathrm dx\)" (function times its own derivative) | Substitution \(u=x^{2}/2\), \(\mathrm du=x\,\mathrm dx\). | Substitution | §2.3; Sheet 8 |
| Any integral of an odd function over a symmetric interval | Write \(0\) and the word "odd". No computation. | The integral table | Sheet 6 Ex 3(ii); \(\E[\mathcal N(0,1)]=0\) |
| "Show \(\E[X]=\infty\)" / "does the integral converge?" | The \(1/x^{p}\) test at \(\infty\): converges for \(p>1\), diverges for \(p\le1\). | Improper integrals | §2.1; the Cauchy distribution |
| "Compute \(\P(X\le Y)\)" for an independent pair | Double integral over the triangle \(\{x\le y\}\): inner limits \(\int_x^{\infty}\), outer \(\int_0^{\infty}\). | Double integrals | Sheet 7 Ex 1; §2.3 |
| "Determine the density of \(X+Y\)" / "of \(X/Y\)" | Write the event as a region (half-plane \(\{x+y\le z\}\), wedge \(\{x\le ty\}\)), integrate the joint density over it, differentiate the result. | Double integrals | TT4; SoSe25 · P1d |
| "Determine the marginal density \(p_X\)" | \(p_X(x)=\int p_{X,Y}(x,y)\,\mathrm dy\) over the slice of the region at that \(x\) — for a disc that is \(y\in[-\sqrt{R^{2}-x^{2}},+\sqrt{R^{2}-x^{2}}]\), not polar coordinates. State for which \(x\) the answer is non-zero. | Marginal densities | Sheet 5 Ex 3, Sheet 7 Ex 1, Sheet 8 Ex 3(i); Thm 1.68 |
| A joint density written with a product of indicators \(\chi_A(x,y)\chi_{\R_{\ge0}}(y)\) | All conditions must hold at once: intersect them and read the limits off. A product \(\prod_i\chi_{[0,\theta]}(x_i)\) collapses to \(\theta\ge\max_i x_i\). | Integrate over the support | Sheet 7 Ex 1 & 2(ii), Sheet 10 Ex 1(i) |
| "Compute \(\int x^{2}\sqrt{1-x^{2}}\,\mathrm dx\)" (a \(\sqrt{1-x^{2}}\) anywhere) | Substitute \(x=\sin u\), \(\mathrm dx=\cos u\,\mathrm du\), \(\sqrt{1-\sin^{2}u}=\cos u\); then \(2\sin u\cos u=\sin 2u\) and \(\sin^{2}v=\tfrac12-\tfrac12\cos 2v\). | Trig substitution | Sheet 8 Ex 3(ii); §2.1 |
| An integrand that is a function's derivative over the function | \(\int\frac{f'}{f}\mathrm dx=\ln|f|+C\); fix the constant with a known value such as \(f(0)=1\). | \(\int f'/f\) | Sheet 5 Ex 2, the "\(\Leftarrow\)" half; §1.4 |
| A \(\Gamma(\alpha,\beta)\) or \(\chi^{2}\) mean, or \(\E[1/Y]\) | The recursion \(\Gamma(\alpha+1)=\alpha\Gamma(\alpha)\) reduces every such integral to \(\Gamma(\alpha)\): \(\E[Y]=\alpha/\beta\), \(\E[1/Y]=\beta/(\alpha-1)\). | The integral table | Sheet 10 Ex 2(iii); Lemma 2.27(iii),(v) |
| "State Jensen's inequality" / "show \(g\) is convex" | \(g''\ge0\) on the interval, then one sentence naming function, sign and interval. | Convexity | TT2 (model answer); SoSe26 · P3a,b |
| "Show \(\E[X]^{2}\le\E[X^{2}]\)" | Jensen with \(g(x)=x^{2}\), convex because \(g''=2>0\) on all of \(\R\). | Convexity | §2.2; Sheet 10 Ex 4(ii) |
| "Compute the characteristic function \(\varphi_X(t)\)" | Sum \(\sum e^{itx}p(x)\), then Euler: \(e^{iu}=\cos u+i\sin u\); use \(|e^{it}|=1\) for bounds. | Complex numbers | TT12; SoSe26 · P4a |
| "Show \(\varphi_{Z_n}(t)\to e^{-t^{2}/2}\)" | Taylor to second order, then the limit \(\bigl(1+\tfrac{z_n}{n}\bigr)^{n}\to e^{z}\). | Taylor | §2.4; SoSe26 · P4b |
| "Read off a moment from \(\varphi_X\)" | \(\E[X^{n}]=i^{-n}\varphi^{(n)}(0)\); differentiate with \((\sin)'=\cos\), \((\cos)'=-\sin\), \((e^{ict})'=ic\,e^{ict}\). | Differentiation | SoSe26 · P4c; §2.3, Rem 2.47(iii) |
| "Give the answer in terms of \(\Phi\)", "\(\P(|Z|\ge a)\approx\dots\)" | Stop integrating. Standardise inside the bars, then fold with \(\Phi(-z)=1-\Phi(z)\): \(\P(|Z|\ge a)=2(1-\Phi(a))=2\Phi(-a)\). | Standardise and fold | TT8; WiSe25 · P4c, SoSe26 · P4d |
| "\(\sup\)", "\(\inf\)", "\(A_n\uparrow A\)", "\(\lceil x\rceil\)" | Read the symbol, do not compute anything: least upper bound, greatest lower bound, an increasing set sequence, rounding up. | Notation, sup and inf | §1.1; §3.3, the size of a test |
What Analysis gives you and what it does not
Almost everything on this page is in your Analysis script somewhere, and the "fuller treatment" line at the end of each section points at it. Five things are not, and no amount of rereading Analysis will produce them. Page B1 works through the evidence item by item (B1 — what Analysis does not give you); this is the short list.
| Topic | In your Analysis guide? | Where to read it instead |
|---|---|---|
| Limits, series, \(\exp\), \(\ln\), derivatives, one-variable integrals, improper integrals, substitution, by parts, convexity, Taylor, Landau \(o\), complex arithmetic and Euler | Yes, all of it | Chapters 1–3, 5–10 — every section above links the exact anchor |
| Measure theory: \(\sigma\)-algebras, measures, the Lebesgue integral, null sets, monotone and dominated convergence, Fubini | No — it builds the Riemann integral only | B4, the largest background page; needed from Definition 1.17 onwards |
| Counting: permutations, \(\binom nk\) as a count, urn models, inclusion–exclusion | No — \(\binom nk\) appears once, inside the binomial theorem, and nothing is ever counted | B3; this is Discrete Structures material |
| Set algebra for arbitrary index families: \(\bigcup_{\alpha\in I}\), de Morgan, power sets, pre-images | No | B2 |
| Double integrals and the multi-dimensional change of variables with \(|\det J|\); determinants and matrix inverses | Partly — the Jacobian matrix is defined (Ch. 11.3), the integral formula is not | B4 for regions and slices, B5 for \(|\det J|\); the fast version is above on this page |
| Calculus with complex-valued functions; \((1+z_n/n)^{n}\to e^{z}\) for complex \(z_n\); differentiating under an improper integral | Partly — complex numbers and Euler are there, the calculus is stated for real functions | B1 — complex-valued calculus and B1 — the Leibniz rule |
Practical consequence for a week of revision: the Analysis on this page is recall work — you have seen it and need it back. B2–B5 are new work. If time is short, the ordering that pays is this page first (it unlocks the credits in Problems 3–5), then B3 counting (it unlocks Problem 1 and the discrete distributions), then the vocabulary half of B4 — enough to read \(\sigma\)-algebra, measurable and density without stopping.
Self-test
Fifteen questions, all of the form the exam asks: which move, what value, what limit. None of them tests a definition for its own sake. Click an answer to see why it is right or wrong; nothing is recorded.
Background · B1 · bridge to MA0902
What Analysis already gave you
Analysis für Informatik (MA0902), Silke Rolles — your own study guide
How this guide uses your Analysis guide Analysis guide
Discrete Probability Theory leans on Analysis constantly and almost never says so. Rather than re-teaching things you have already written up, this guide links straight to your Analysis guide wherever a result from there is used. Those links look like this: Analysis 2.1 — the ε–n₀ definition, and they open in a new tab at the exact section.
Anything Analysis does not cover gets written out in full here instead — from scratch, with examples. Pages B2, B3 and B4 exist for exactly that reason.
How to read this page
You do not need to read this page top to bottom. It is a lookup page. Start with the prerequisite map just below: for every section of the course it lists what you must already know and where to learn it. When a probability page says "by monotone convergence" or "because the series converges absolutely" and you want the underlying statement, come here, find the row, and follow the link.
The last column says why this course needs it — which definition, theorem or exercise would stop working without it. That is the part worth skimming once, because it tells you which bits of Analysis are load-bearing for this course and which are not needed at all.
Three topics that the course uses but your Analysis guide does not treat fully are written out at the end of this page: interior and open sets, differentiating an integral and complex numbers for characteristic functions.
The prerequisite map — what each section needs My addition
One row per piece of earlier knowledge, grouped by the section of this course that needs it. "Analysis X.Y" links open your Analysis guide at that section (new tab); "B1"–"B5" are the background pages of this guide; "§" links point to earlier sections of this course that a later one builds on. Only the non-trivial prerequisites are listed — school arithmetic (fractions, expanding brackets, solving a quadratic) is assumed everywhere and is explained on the spot where it matters.
How to use it: before starting a section, read its rows. If an item is unfamiliar, follow the link first — it saves time compared with getting stuck in the middle of a proof.
Part 0 and Part 1 — basic objects
Part 2 — working with distributions
Part 3 and Appendix — statistics and set theory
| Section | What you need to know beforehand | Where to learn it |
|---|---|---|
| 3.1 Statistical models | Power sets, Cartesian products \(\R^k\), indexed families \((P_\theta)_{\theta\in\Theta}\) | B2: Power set and indicators · B2: Products and tuples · B2: Indexed families |
| Injective maps (identifiability); contrapositive | B2: Maps, images and pre-images · Analysis 1.1: Quantifiers | |
| \(\sum\), \(\prod\), power laws; \(\ln\) turns \(\prod\) into \(\sum\) | B3: Product notation ∏ and index shifts · Analysis 5.2: General powers and logarithms to base b · Analysis 5.2: The logarithm | |
| Dimension, 'infinite-dimensional' | B5: Linear independence, rank, dimension | |
| Named distributions; independence (product of densities) | §1.2 · §1.3 · §1.4 | |
| 3.2 Point estimation | Derivative rules (power, \(\ln\), chain) | Analysis 6.2: Differentiability · Analysis 6.3: Rules of differentiation |
| Interior maximum \(\Rightarrow f'=0\); interior vs boundary of \(\Theta\) | Analysis 7.1: Extrema · B1: Interior, open, closed | |
| Monotonicity / second-derivative tests; maxima at the boundary | Analysis 7.3: Monotonicity · Analysis 7.5: Higher derivatives · Analysis 4.4: Existence of maxima and minima | |
| Partial derivatives, gradient, Hessian | Analysis 11.2: Partial derivatives · Analysis 11.3: Higher derivatives and extrema | |
| Limits (\(1/n\to0\)), continuity of \(t\mapsto1/t\) | Analysis 2.1: Rules for limits · Analysis 4.1: Definition and simple properties | |
| Antiderivatives, \(p=F'\), improper integrals | Analysis 8.3: Antiderivatives · Analysis 9.1: Improper integrals | |
| Euclidean norm (multivariate mse) | Analysis 1.3: Norms: different ways to measure length | |
| Expectation and variance rules, Jensen, LLN, CLT | §2.1 · §2.2 · §2.4 | |
| 3.3 Hypothesis testing | Sup over \(\Theta_0\) | Analysis 1.2: Upper bounds, supremum and infimum |
| Inequalities: multiplying by a negative number flips them | Analysis 1.1: Ordering | |
| Partitions \(\Theta=\Theta_0\,\dot\cup\,\Theta_1\); pre-image \(\varphi^{-1}(\{1\})\) | B2: Set operations · B2: Maps, images and pre-images | |
| \(\Phi\), quantiles, sums of normals, CLT | §2.1 · §2.3 · §2.4 | |
| 3.4 Interval estimation | Rearranging double inequalities | Analysis 1.1: Ordering |
| Quantiles; CLT approximation | §2.1 · §2.4 | |
| Tests (duality) | §3.3 | |
| 3.5 Bayesian vs. frequentist | Bayes' rule, conditional and marginal densities | §1.4 |
| Integrating over \(\Theta\) | Analysis 8.1: Definition of the integral · B4: Building the integral | |
| Gamma and Beta functions | §1.3 | |
| Completing the square; 'proportional to' | §2.3 | |
| Mean / median minimise squared / absolute error | §2.1 · B1: Differentiating an integral | |
| A.1 Set theory refresher | Quantifiers and connectives | Analysis 1.1: Quantifiers |
| Set-builder notation, subsets, power sets, indicators | B2: Sets and subsets · B2: Power set and indicators | |
| Maps, bijection between subsets and maps \(\Omega\to\{0,1\}\) | B2: Maps, images and pre-images · B2: Power set and indicators | |
| Families of sets | B2: Indexed families |
Needed for Chapter 1 — basic objects
| What | In your Analysis guide | Used here for |
|---|---|---|
| Quantifiers \(\forall,\exists\) and how to negate them | Ch. 1.1 — Quantifiers | Every σ-algebra proof. "\(\Aa\) is not a σ-algebra" is the negation of a \(\forall\)-statement, so one witness suffices — the whole technique of WiSe25 P1a. |
| Countable and uncountable; Cantor's diagonal argument | Ch. 1.1 — Countability | The single most important dividing line in this course. Definition 1.34 needs "at most countable"; σ-additivity is countable only (Remark 1.18); the whole Vitali argument turns on \(\Q\) being countable while \([0,1)\) is not. |
| \(\sqrt2\notin\Q\); why \(\R\) exists | Ch. 1.1 — √2 is irrational | Background for the Vitali set, which is built from the equivalence relation \(x\sim y:\iff x-y\in\Q\). |
| Supremum, infimum, maximum, minimum | Ch. 1.2 — Bounds, sup, inf | Sheet 2 Exercise 1(iii), which asks whether \(\P(\bigcup_i A_i)=\sup_i\P(A_i)\). The sheet even restates the definition of \(\sup\), which tells you the course does not assume it. |
| \(\Q\) is dense in \(\R\); the Archimedean property | Ch. 1.2 — Archimedes & density | Sheet 2 Exercise 5: every open set is a countable union of intervals with rational endpoints — that is exactly density plus countability of \(\Q\). |
| Open and closed intervals; open sets; norms and balls in \(\R^n\) | Ch. 1.3 — Norms | Example 1.13, the Borel σ-algebra, generated by open boxes; and Remark 1.14's topological reformulation. Interior points, open and closed sets: below. |
| Monotone sequences; \(x_n\uparrow x\) and \(x_n\downarrow x\); limits | Ch. 2.1 — the ε–n₀ definition | Proposition 1.19(iv),(v) — continuity of a measure from below and above — and every part of Lemma 1.24, where right-continuity is a statement about sequences. |
| Monotone bounded sequences converge; the limit is the sup | Ch. 2.2 — Monotone sequences | Why \(\mu(A_k)\uparrow\mu(\bigcup A_i)\) is a legitimate statement: the sequence \(\mu(A_k)\) is increasing and bounded by the total measure, so it has a limit. |
| Geometric series \(\sum_{j\ge0}q^j=\tfrac1{1-q}\) | Ch. 3.1 — Geometric series | Proving the geometric pmf sums to 1, and the script's own derivation of \(\Geo(p)\) in the Chapter 1 motivation. |
| Absolute convergence and the rearrangement theorem | Ch. 3.3 — Rearranging | The one delicate step in Lemma 1.35: regrouping \(\sum_{\omega}p(\omega)\) over a partition is only legal because all terms are non-negative. Riemann's rearrangement theorem is what goes wrong otherwise. |
| The exponential series \(e^x=\sum_k x^k/k!\) | Ch. 3.4 — Exponential function | Proving the Poisson pmf sums to 1, and the limit \(e^{-1}\) in the derangement problem, Sheet 2 Exercise 4. |
| Euler's number: \(\bigl(1+\tfrac xn\bigr)^n\to e^x\) | Ch. 6.3 — Lemma 6.24 (general \(x\)) · Ch. 2.2 (only \(x=1\), the definition of \(e\)) | The core of the Poisson limit theorem (Theorem 1.42) and of Sheet 3 Exercise 3. |
| Taylor expansion of \(\ln(1+x)\) | Ch. 9.3 — the log series · Ch. 10.1 — Taylor | Making Step 4 of the Poisson limit proof airtight. The official solution of Sheet 3 Exercise 3 cites \(e^{-x}=\lim_n(1-\tfrac xn)^n\), which holds for a fixed \(x\), for the quantity \(x_n=np_n\), which changes with \(n\); the log series repairs the step. |
| Continuous functions; the ε–δ and sequence definitions | Ch. 4.1 — Definition | Example 1.52: continuous functions are measurable. Also the quantile transformation in §2.1. |
| The integral as a limit of sums; the fundamental theorem | Ch. 8.1 — Definition · 8.3 — FTC | Everything about densities: \(\P([a,b])=\int_a^b p(x)\,\mathrm dx\), and the relation between pdf and cdf (Lemma 1.49). |
| Improper integrals \(\int_{-\infty}^{\infty}\) | Ch. 9.1 — Improper integrals | The normalisation \(\int_{-\infty}^{\infty}p(x)\,\mathrm dx=1\) for every continuous distribution, and the Gamma function of Definition 1.60. |
| Substitution and integration by parts | Ch. 8.4 — Substitution · by parts | Computing with densities throughout §1.3, and every expectation integral in §2.1. |
| Complex numbers; Euler's formula \(e^{iu}=\cos u+i\sin u\) | Ch. 1.1 — Complex numbers · 5.3 — Trigonometric | Characteristic functions (Definition 2.46) are complex-valued. SoSe26 P4a hands you Euler's formula in the hint and expects you to use it. Derivatives of complex-valued functions and the complex limit \((1+z_n/n)^n\to e^z\) are not in your Analysis guide: below. |
Needed for Chapters 2 and 3
| What | In your Analysis guide | Used here for |
|---|---|---|
| Convex functions and the second-derivative test | Ch. 7.6 — Convexity | Jensen's inequality, Theorem 2.42 — the assumption "\(g\) convex" is precisely the Analysis notion. Examined in SoSe26 P3, worth 5 credits. |
| Cauchy–Schwarz inequality | Ch. 1.3 — Cauchy–Schwarz | Proposition 2.14: \(|\rho_{X,Y}|\le1\) for the correlation coefficient. It is Cauchy–Schwarz applied to centred random variables. |
| Extrema: first- and second-order conditions | Ch. 7.1 — Extrema | Maximum likelihood estimation (§3.2): set the derivative of the log-likelihood to zero and check the second derivative is negative. |
| \(\ln\) turns products into sums; \(\ln\) is strictly increasing | Ch. 5.2 — Logarithm | Why maximising the log-likelihood is the same as maximising the likelihood — the move every mle problem opens with. Also SoSe26 P3b, which turns \(e^{\E[X]}\le\E[e^X]\) into \(\E[X]\le\log\E[e^X]\). |
| Growth rates: \(\exp \gg\) power \(\gg \log\) | Ch. 5.2 — Growth | Deciding whether \(\E[X]\) exists: tail integrals \(\int^\infty x\,p(x)\,\mathrm dx\) converge or not by comparing growth rates. |
| Landau symbol \(o\) | Ch. 6.1 — Landau symbols · 10.1 — Taylor | Step (iii) of the proof sketch of the central limit theorem (Theorem 2.64): the characteristic function is expanded as \(\varphi_{Y_1}(s)=1-\tfrac{s^2}{2}+o(s^2)\), and steps (iv)–(vi) carry that \(o\)-term through. \(o(s^2)\) means "a quantity which, divided by \(s^2\), tends to 0 as \(s\to0\)". The script uses no other Landau symbol. |
| The convergent-majorant criterion for swapping \(\sum\) and \(\int\) | Ch. 9.3 — Swapping ∑ and ∫ | Two things. (a) That section is where the power series \(\ln(1+x)=x-\tfrac{x^2}2+\tfrac{x^3}3-\dots\) is derived, which the Poisson limit proof uses. (b) Its majorant condition is the model for the dominating function of the dominated convergence theorem (B4), which is what licenses differentiating \(\varphi_X(t)=\E[e^{itX}]\) under the expectation in Remark 2.47(iii) — see below. |
| Differentiating an integral with respect to a parameter or a limit | Ch. 8.3 — FTC · 9.2 — Parameter integrals | Remark 2.22(v): the median minimises \(\E|X-c|\) ("Leibniz integral rule"), and moments from derivatives of the characteristic function (Remark 2.47(iii)). Analysis 9.2 covers fixed limits only; the combined rule is below. |
| Partial derivatives, gradient, Hessian, definiteness | Ch. 11.2 — Partial derivatives · 11.3 — Hessian | Maximum likelihood with more than one parameter (Gaussian \(\mu\) and \(\sigma^2\) at once, Example 3.28), and the covariance matrix of a multivariate Gaussian. |
| Vectors, matrices, transpose, quadratic forms, eigenvalues | Ch. 11 — Linear algebra you need | Lemma 2.53, the multivariate Gaussian density \(\propto\exp(-\tfrac12(x-\mu)^t\Sigma^{-1}(x-\mu))\). Your Analysis guide already builds quadratic forms and definiteness from scratch — this course adds only determinants and inverses, which page B5 covers. |
| The Jacobian matrix | Ch. 11.3 — Jacobian matrix | Proposition 2.51, transformation of densities. Careful: that proposition needs the change-of-variables formula for integrals, with \(|\det J|\), which your Analysis guide does not cover — see the gap list below. |
| Bolzano–Weierstrass; accumulation points | Ch. 4.3 — Bolzano–Weierstrass | Background for the modes of convergence in §2.4, where "almost surely" and "in probability" are compared through subsequences. |
What from Analysis this course does not use
Worth knowing, so you do not revise the wrong things:
- Differential equations (Analysis Ch. 12) — the largest chapter of your Analysis guide, and not used anywhere in Discrete Probability Theory.
- Curve sketching (Ch. 7.7) and the mean value theorem as such.
- Radius of convergence (Ch. 10.2) — power series appear here only as the two named series \(e^x\) and \(\ln(1+x)\), never as objects to analyse.
- n-th roots via the intermediate value theorem (Ch. 4.2).
- l'Hospital's rule (Ch. 7.4) — I searched the script, all twelve exercise sheets and the three old exams: it is never used, and no limit in this course needs it.
Two things that look skippable but are not. Each is used exactly once, so do not revise them in depth — but do know they exist: the Cauchy product (Ch. 3.3) justifies multiplying \(r\) geometric series when checking that the negative binomial pmf sums to 1 (Example 1.39(v)), and differentiating an integral with respect to a parameter (Ch. 9.2, extended below) is the "Leibniz integral rule" of Remark 2.22(v).
What Analysis does not give you
I searched your Analysis guide for each of the following. These are genuine gaps — this course uses them and you have not seen them written up anywhere. Each is either a page of its own here or a section on the page that first needs it.
| Gap | Evidence | Where it is written up here |
|---|---|---|
| Measure theory and the Lebesgue integral | The words "measure", "Lebesgue" and "σ-algebra" appear in your Analysis guide zero times in this sense. It builds the Riemann integral only. | Page B4 — the largest background page, because Definition 1.17, Definition 1.44 and every expectation in §2.1 are measure-theoretic. |
| Combinatorics | \(\binom nk=\frac{n!}{k!(n-k)!}\) is written down once, inside the binomial theorem (Ch. 2.2); factorials appear only there, in the exponential series, in the ratio test and in Taylor's formula. The words "permutation" and "combination" never appear, and nothing is ever counted. | Page B3. This is Discrete Structures material, not Analysis. |
| Set algebra and indexed families | Analysis Ch. 1 has quantifiers and countability, but not \(\bigcup_{\alpha\in I}\), de Morgan for arbitrary index sets, power sets, or pre-images. | Page B2. |
| Change of variables for multivariate integrals (with \(|\det J|\)) | The Jacobian matrix is defined (Ch. 11.3), but the substitution formula for integrals in \(\R^n\) does not appear. | Page B5, used in §2.3 for Proposition 2.51. |
| Determinants and matrix inverses | Mentioned in passing for the Hessian test; not developed. | Page B5. |
| Interior of a set, boundary points | Closed and compact sets are defined (Ch. 4.4), open intervals too, and the phrase "interior point" is used (Ch. 7.1, for a point of an open interval \((a,b)\)) — but it is never defined, and there is no definition of an open set in \(\R^k\), of the interior \(A^\circ\), or of the boundary \(\partial A\). | This page, below — needed for Definition 3.27. |
| Differentiating an integral whose limit and integrand depend on the parameter; differentiating under an improper integral | Ch. 8.3 has the FTC, Ch. 9.2 has fixed limits on a bounded rectangle only. | This page, below — needed for Remark 2.22(v) and Remark 2.47(iii). |
| Calculus with complex-valued functions; \((1+z_n/n)^n\to e^z\) for complex \(z_n\) | Complex numbers and Euler's formula are there; derivatives and Lemma 6.24 are for real functions only. | This page, below — needed in §2.3 and the CLT proof in §2.4. |
| Gamma and Beta functions | The Gamma function appears once, as an exercise on improper integrals (Ch. 9.1): \(\Gamma(x)=\int_0^\infty t^{x-1}e^{-t}\,\mathrm dt\) is shown to converge and \(\Gamma(\tfrac12)\) is computed. The Beta function does not appear at all, and neither is connected to probability there. | Written into §1.3, where the script introduces them as Definition 1.60. |
Five facts from Analysis you will use every week
These come up so often that it is worth having them stated here, so you do not have to leave the page. Each links back to the full treatment.
1. Monotone bounded sequences converge Analysis 2.2
If \(x_1\le x_2\le\cdots\) and there is a \(C\) with \(x_n\le C\) for all \(n\), then \(\lim_n x_n\) exists and equals \(\sup_n x_n\) (the supremum, fact 5 below). Same downwards, with the infimum.
Example: \(x_n=1-\tfrac1n\) gives \(0,\tfrac12,\tfrac23,\tfrac34,\dots\). It increases and stays below \(C=1\), so it converges; its limit is \(1=\sup_nx_n\). Notation: \(x_n\uparrow x\) means "\(x_n\) increases and converges to \(x\)"; \(x_n\downarrow x\) means "decreases and converges to \(x\)".
Here: this is what makes \(\mu(A_k)\uparrow\mu(\bigcup_i A_i)\) in Proposition 1.19(iv) a statement about a real limit rather than a formal symbol. Full treatment →
2. Geometric series Analysis 3.1
For \(|q|<1\): \(\displaystyle\sum_{j=0}^{\infty}q^{j}=\frac{1}{1-q}\), and the partial sums are \(\sum_{j=0}^{n-1}q^j=\frac{1-q^n}{1-q}\). For \(|q|\ge1\) the series diverges. Example: \(1+\tfrac12+\tfrac14+\tfrac18+\dots=\frac1{1-1/2}=2\).
Here: \(\sum_{\omega\ge1}(1-p)^{\omega-1}p=1\), which is why the geometric pmf is a pmf. Full treatment →
3. The exponential series and \(e\) as a limit Analysis 2.2, 3.4
\(\displaystyle e^{x}=\sum_{k=0}^{\infty}\frac{x^{k}}{k!}\) for every real \(x\), and \(\displaystyle\lim_{n\to\infty}\Bigl(1+\frac{x}{n}\Bigr)^{n}=e^{x}\). Here \(k!=1\cdot2\cdots k\) (with \(0!=1\)). Example with \(x=1\): \(1+1+\tfrac12+\tfrac16+\tfrac1{24}\approx2.708\), already close to \(e\approx2.718\); and \((1+\tfrac1{10})^{10}\approx2.594\), approaching \(e\) more slowly.
Here: the first gives \(\sum_\omega e^{-\lambda}\lambda^\omega/\omega!=1\) for the Poisson pmf and \(e^{-1}\) for derangements; the second is the engine of the Poisson limit theorem. the limit for general \(x\) (Lemma 6.24) → · \(x=1\), the definition of \(e\) → · the series →. For a varying \(x_n\to x\), also complex, see below.
4. Absolute convergence licenses rearrangement Analysis 3.3
If \(\sum_k|a_k|<\infty\), then every reordering of \(\sum_k a_k\) converges to the same value — and you may also group the terms into blocks freely. If the series converges but not absolutely, Riemann showed you can rearrange it to converge to any number you like. Example: \(1-\tfrac12+\tfrac13-\tfrac14+\dots\) converges (to \(\ln2\)) but not absolutely, because \(1+\tfrac12+\tfrac13+\dots=\infty\); so its value depends on the order of the terms.
Here: a pmf has non-negative terms summing to 1, so it converges absolutely, and that is the licence for splitting \(\sum_{\omega\in\bigcup_i A_i}p(\omega)=\sum_i\sum_{\omega\in A_i}p(\omega)\) in Lemma 1.35. Without non-negativity the proof collapses. Full treatment →
5. Supremum: the recipe Analysis 1.2
The supremum [Supremum] \(\sup M\) of a set \(M\) of real numbers is its least upper bound: the smallest number that is \(\ge\) every element of \(M\). The infimum [Infimum] \(\inf M\) is the greatest lower bound. Unlike a maximum or minimum, they need not belong to \(M\).
To show \(s=\sup M\): (1) \(a\le s\) for all \(a\in M\) (\(s\) is an upper bound); (2) for every \(\varepsilon>0\) there is an \(a\in M\) with \(a>s-\varepsilon\) (nothing smaller is an upper bound). Then check whether \(s\in M\) to decide if it is also the maximum.
Example: \(M=\{1-\tfrac1n\mid n\ge1\}=\{0,\tfrac12,\tfrac23,\dots\}\). (1) Every element is \(\le1\). (2) Given \(\varepsilon>0\), pick \(n>\tfrac1\varepsilon\); then \(1-\tfrac1n>1-\varepsilon\). So \(\sup M=1\). But \(1\notin M\), so \(M\) has no maximum. On the other side, \(\inf M=\min M=0\).
Here: Sheet 2 Exercise 1(iii). And the fact that \(\sup\) of an increasing sequence is its limit is what makes the counterexample there work. Full treatment →
One notation clash to keep straight My addition
Your Analysis script says \(0\notin\N\): it writes \(\N=\{1,2,3,\dots\}\) and \(\N_0=\N\cup\{0\}\). The Discrete Probability script says the opposite in Convention 1.1: \(\N=\{0,1,2,\dots\}\), and writes \(\N_{>0}\) when it wants to exclude zero.
So the same symbol means different sets in your two courses. When a probability statement says "for a sequence \((A_i)_{i\in\N}\)", the sequence starts at \(A_0\). When Analysis says "\(\forall n\in\N\)", it starts at 1. This bites most often in index shifts inside sums — renaming the summation index, e.g. \(\sum_{n=1}^{\infty}a_{n-1}=\sum_{m=0}^{\infty}a_m\) with \(m=n-1\); a worked explanation is on B3.
Interior points, open and closed sets My addition
What it is for. Many statements in this course only work "away from the edge" of a set. The clearest case is maximum likelihood: Definition 3.27 says the likelihood equation \(\nabla_\theta\ell=0\) finds the maximiser if the maximum is in the interior of \(\Theta\). The words interior, boundary, open and closed make "away from the edge" precise. Your Analysis guide defines closed and compact sets (Analysis 4.4) and the norms that measure distance in \(\R^k\) (Analysis 1.3), and it uses the phrase "interior point" for a point of an open interval (Analysis 7.1) — but it never defines the interior, nor an open subset of \(\R^k\). Here it is.
A picture first. Take the interval \([0,1]\) on the number line. The point \(0.5\) is surrounded by points of \([0,1]\) on both sides: you can wiggle it a little (say by \(0.1\)) in either direction and stay inside. The point \(0\) is different: every step to the left, however small, leaves the interval. \(0.5\) is an interior point; \(0\) is a boundary point.
Definitions
Let \(A\subseteq\R^k\) (for \(k=1\), a subset of the number line). Write \(B_r(x):=\{y\in\R^k\mid\|y-x\|<r\}\) for the open ball of radius \(r>0\) around \(x\): all points at (Euclidean) distance less than \(r\) from \(x\). For \(k=1\) this is just the interval \((x-r,x+r)\).
- \(x\) is an interior point [innerer Punkt] of \(A\) if some ball around \(x\) lies completely inside \(A\): there is an \(r>0\) with \(B_r(x)\subseteq A\). The set of all interior points is the interior [Inneres] of \(A\), written \(A^\circ\) or \(\operatorname{int}A\).
- \(x\) is a boundary point [Randpunkt] of \(A\) if every ball around \(x\) contains points of \(A\) and points outside \(A\). The set of boundary points is the boundary \(\partial A\).
- \(A\) is open [offen] if every point of \(A\) is an interior point, i.e. \(A=A^\circ\).
- \(A\) is closed [abgeschlossen] if its complement \(\R^k\setminus A\) is open. Equivalently (this is the definition in Analysis 4.4): limits of convergent sequences in \(A\) stay in \(A\). A closed set contains its whole boundary.
Examples with numbers
- \(A=[0,1]\). For \(x=0.3\) take \(r=0.3\): then \(B_{0.3}(0.3)=(0,0.6)\subseteq[0,1]\), so \(0.3\) is interior. In general for \(0<x<1\) take \(r=\min(x,1-x)\), the distance to the nearer end. For \(x=0\), every ball \((-r,r)\) contains \(-r/2\notin A\) and \(0\in A\), so \(0\) is a boundary point; the same for \(1\). Hence \([0,1]^\circ=(0,1)\) and \(\partial[0,1]=\{0,1\}\). \([0,1]\) is closed, not open.
- \(A=(0,1)\) is open: its interior is itself. It is not closed: \(\tfrac1n\in(0,1)\) but \(\tfrac1n\to0\notin(0,1)\).
- \(A=(0,\infty)\) (e.g. the possible values of a variance \(\sigma^2\)): open, since for \(x>0\) the ball \((x/2,\,3x/2)\) stays positive.
- In \(\R^2\): the parameter set \(\Theta=\R\times(0,\infty)\) of the Gaussian \((\mu,\sigma^2)\) is open — around any \((\mu,\sigma^2)\) with \(\sigma^2>0\), the disc of radius \(\sigma^2/2\) keeps the second coordinate positive. So every point is interior.
- A set can be neither open nor closed: \([0,1)\).
Why "interior" matters for maximum likelihood
At an interior maximum \(x_0\) of a differentiable \(f\) you can move a little both left and right. Moving right cannot increase \(f\), so \(f'(x_0)\le0\); moving left cannot either, so \(f'(x_0)\ge0\); together \(f'(x_0)=0\) (Analysis 7.1). At a boundary point you can only move one way, and the argument breaks. Example: three coin tosses, all heads, Bernoulli model with \(\Theta=[0,1]\). The likelihood is \(L(p)=p^3\), largest at \(p=1\) — a boundary point — where \(L'(1)=3\neq0\). Solving \(L'(p)=0\) would give \(p=0\), the minimum. So: always check whether the maximiser can sit on the boundary of \(\Theta\) before solving the likelihood equation. Used in §3.2, Definition 3.27.
The same words appear in Remark 1.14 (the Borel \(\sigma\)-algebra is generated by the open sets) and in Sheet 2 Exercise 5.
In words: an interior point has some room around it inside the set; a boundary point touches the outside no matter how closely you look. Open sets consist only of interior points; closed sets contain their whole boundary.
Differentiating an integral with respect to a parameter My addition
What it is for. Sometimes the thing you want to differentiate is itself an integral that depends on a number \(c\) — through its limits, through the integrand, or both. This happens in Remark 2.22(v) (the median minimises \(\E|X-c|\); the script says "using Leibniz integral rule"), in Lemma 1.49 (a pdf is the derivative of the cdf), and in Remark 2.47(iii) (moments from derivatives of the characteristic function). Your Analysis guide covers the two basic cases separately (Analysis 8.3 — FTC and Analysis 9.2 — parameter integrals); this section puts them together.
Case 1 — the parameter is the upper limit: the fundamental theorem
If \(f\) is continuous and \(F(c):=\int_a^c f(x)\,\mathrm dx\), then \(F'(c)=f(c)\). Picture: moving the right edge from \(c\) to \(c+h\) adds a thin strip of width \(h\) and height about \(f(c)\), so the area grows at rate \(f(c)\). Numbers: \(F(c)=\int_0^cx^2\,\mathrm dx=\tfrac{c^3}{3}\), and indeed \(F'(c)=c^2=f(c)\).
Lower limit: \(\frac{\mathrm d}{\mathrm dc}\int_c^bf(x)\,\mathrm dx=-f(c)\), because \(\int_c^b=\int_a^b-\int_a^c\) and the first part does not depend on \(c\). A function as the limit: by the chain rule, \(\frac{\mathrm d}{\mathrm dc}\int_a^{h(c)}f(x)\,\mathrm dx=f(h(c))\,h'(c)\). The same holds with \(a=-\infty\) when the improper integral converges: \(\int_{-\infty}^c=\int_{-\infty}^{a}+\int_a^c\), and the first part is a constant.
In probability: the cdf \(F(c)=\int_{-\infty}^cp(x)\,\mathrm dx\) has \(F'(c)=p(c)\) wherever \(p\) is continuous at \(c\).
Case 2 — the parameter sits inside the integrand, limits fixed
If \(f(x,c)\) and its partial derivative \(\partial_cf(x,c)\) (differentiate in \(c\), treating \(x\) as a constant) are continuous on \([a,b]\times[c_1,c_2]\), then
\[ \frac{\mathrm d}{\mathrm dc}\int_a^bf(x,c)\,\mathrm dx=\int_a^b\partial_cf(x,c)\,\mathrm dx \](Analysis 9.2, Satz 9.8). Numbers: \(\int_0^1 e^{cx}\,\mathrm dx=\frac{e^c-1}{c}\) for \(c\neq0\); differentiating under the integral gives \(\int_0^1xe^{cx}\,\mathrm dx\), which at \(c=1\) is \(\bigl[(x-1)e^x\bigr]_0^1=1\); differentiating the formula gives \(\frac{ce^c-(e^c-1)}{c^2}\), which at \(c=1\) is \(e-e+1=1\) ✓.
Case 3 — both at once: the Leibniz rule
\[ \frac{\mathrm d}{\mathrm dc}\int_a^{c}f(x,c)\,\mathrm dx=f(c,c)+\int_a^{c}\partial_cf(x,c)\,\mathrm dx . \]The first term is Case 1 (the edge moves), the second is Case 2 (the height changes). Check: \(G(c)=\int_0^c(c-x)\,\mathrm dx=\tfrac{c^2}{2}\), so \(G'(c)=c\). The rule gives \(f(c,c)=c-c=0\) plus \(\int_0^c1\,\mathrm dx=c\) ✓.
The median minimises \(\E|X-c|\) (Remark 2.22(v)), without the Leibniz rule
Let \(X\) have a continuous pdf \(p\), cdf \(F\), and \(\E|X|<\infty\). Split at \(c\) and pull \(c\) out of each integral (it is a constant for the integration variable \(x\)):
\[ g(c):=\E|X-c|=\int_{-\infty}^{c}(c-x)p(x)\,\mathrm dx+\int_{c}^{\infty}(x-c)p(x)\,\mathrm dx =cF(c)-\int_{-\infty}^{c}xp(x)\,\mathrm dx+\int_{c}^{\infty}xp(x)\,\mathrm dx-c\bigl(1-F(c)\bigr), \]using \(\int_{-\infty}^cp=F(c)\) and \(\int_c^\infty p=1-F(c)\). Now only Case 1 and the product rule are needed: \(\bigl(cF(c)\bigr)'=F(c)+cp(c)\); \(\bigl(\int_{-\infty}^cxp\bigr)'=cp(c)\); \(\bigl(\int_c^\infty xp\bigr)'=-cp(c)\); \(\bigl(c(1-F(c))\bigr)'=(1-F(c))-cp(c)\). Adding with the signs above, the four \(cp(c)\) terms cancel:
\[ g'(c)=F(c)-\bigl(1-F(c)\bigr)=2F(c)-1 . \]So \(g'(c)=0\iff F(c)=\tfrac12\): \(c\) is a median. And \(g'<0\) to the left, \(g'>0\) to the right, so it is a minimum. Numbers: for \(X\sim\Unif(0,1)\) and \(0\le c\le1\), \(g(c)=\tfrac{c^2}2+\tfrac{(1-c)^2}{2}\), \(g'(c)=2c-1=2F(c)-1\) ✓, minimum at \(c=\tfrac12\).
When may you differentiate under an improper integral or an expectation?
Analysis 9.2 needs a bounded rectangle. For \(\int_{-\infty}^{\infty}\) or \(\E[\cdot]\) the standard sufficient condition is a dominating function: if \(|\partial_tf(x,t)|\le g(x)\) for all \(t\) near the point of interest, with \(\int g<\infty\), then you may swap \(\frac{\mathrm d}{\mathrm dt}\) and \(\int\). This comes from the dominated convergence theorem (B4). Example: \(\varphi_X(t)=\E[e^{itX}]\). Here \(\partial_te^{itx}=ixe^{itx}\) and \(|ixe^{itx}|=|x|\), so if \(\E|X|<\infty\) then \(\varphi_X'(t)=\E[iXe^{itX}]\) and \(\varphi_X'(0)=i\,\E[X]\) — Remark 2.47(iii) with \(n=1\). (Complex derivatives: next section.) The script itself, in Remark 2.22(v), writes "assuming we can interchange differentiation and expectation" and does not ask you to check it; Remark 2.47(iii) adds no condition either.
In words: moving the edge of an integral changes it by the height at the edge; changing the integrand changes it by the integral of the change; if both happen, add the two effects.
Complex numbers: what this course needs My addition
What it is for. Characteristic functions (§2.3) are \(\varphi_X(t)=\E[e^{itX}]\): complex-valued functions of a real \(t\). The central limit theorem (§2.4) is proved with them. You need five facts; the first three are in your Analysis guide (Analysis 1.1 — complex numbers, 3.4 — exp on \(\mathbb C\), 5.3 — Euler's formula), the last two are not.
1. Complex numbers, modulus, conjugate
A complex number is \(z=a+ib\) with real \(a\) (real part, \(\operatorname{Re}z\)) and real \(b\) (imaginary part, \(\operatorname{Im}z\)), where \(i^2=-1\). Picture it as the point \((a,b)\) in the plane. Its modulus [Betrag] \(|z|=\sqrt{a^2+b^2}\) is the distance from \(0\); its conjugate \(\bar z=a-ib\) is the mirror image in the horizontal axis, and \(z\bar z=a^2+b^2=|z|^2\). Numbers: \(z=3+4i\) has \(|z|=\sqrt{9+16}=5\), \(\bar z=3-4i\), \(z\bar z=9+16=25\). Rules: \(|zw|=|z||w|\) and the triangle inequality \(|z+w|\le|z|+|w|\).
2. Euler's formula and the unit circle
For real \(t\): \(e^{it}=\cos t+i\sin t\). So \(e^{it}\) is the point \((\cos t,\sin t)\), reached by walking an arc of length \(t\) counter-clockwise around the circle of radius 1. Hence \(|e^{it}|=\sqrt{\cos^2t+\sin^2t}=1\). Numbers: \(e^{i\pi/2}=0+i\cdot1=i\), \(e^{i\pi}=-1\), \(e^{2\pi i}=1\).
3. The exponential function on \(\mathbb C\)
\(e^z=\sum_{k\ge0}\frac{z^k}{k!}\) converges for every complex \(z\), and \(e^{w+z}=e^we^z\) still holds. So \(e^{it}e^{is}=e^{i(t+s)}\), and a series like \(\sum_k\frac{(\lambda e^{it})^k}{k!}\) equals \(\exp(\lambda e^{it})\) — the key step in computing the characteristic function of \(\Poi(\lambda)\), which comes out as \(e^{-\lambda}\exp(\lambda e^{it})=\exp\bigl(\lambda(e^{it}-1)\bigr)\). Also \(|e^{a+ib}|=e^{a}\,|e^{ib}|=e^a\), and \(\exp\) is continuous on \(\mathbb C\).
4. Differentiating a complex-valued function of a real variable
Write \(f(t)=u(t)+iv(t)\) with real \(u=\operatorname{Re}f\), \(v=\operatorname{Im}f\). Then \(f'(t):=u'(t)+iv'(t)\): differentiate the real and imaginary parts separately. The usual rules (sum, product, chain rule with a real inner function) remain true — multiply out into real and imaginary parts and apply the real rules to each. Key example: for real \(c\),
\[ \frac{\mathrm d}{\mathrm dt}e^{ict}=\frac{\mathrm d}{\mathrm dt}\bigl(\cos(ct)+i\sin(ct)\bigr) =-c\sin(ct)+ic\cos(ct)=ic\bigl(\cos(ct)+i\sin(ct)\bigr)=ic\,e^{ict}, \]using \(i\cdot i=-1\) in the third step. So the familiar rule \((e^{ct})'=ce^{ct}\) survives with \(ic\) in place of \(c\). Repeating: \(\frac{\mathrm d^n}{\mathrm dt^n}e^{itx}=(ix)^ne^{itx}\), which at \(t=0\) is \(i^nx^n\) — the source of \(\E[X^n]=i^{-n}\varphi^{(n)}_X(0)\) in Remark 2.47(iii). Taylor works the same way (apply it to \(u\) and \(v\)): \(e^{it}=1+it-\tfrac{t^2}{2}+o(t^2)\) as \(t\to0\), where \(o(t^2)\) means "divided by \(t^2\), it tends to 0" (Analysis 6.1, 10.1). Numbers: \(t=0.1\): \(e^{0.1i}=\cos0.1+i\sin0.1\approx 0.99500+0.09983i\), and \(1+0.1i-0.005=0.995+0.1i\) — already very close.
5. \((1+z_n/n)^n\to e^z\) for complex \(z_n\to z\)
The CLT proof (step (vi), §2.4) ends with \(\bigl(1-\tfrac{t^2}{2n}+o(\tfrac1n)\bigr)^n\to e^{-t^2/2}\), and the \(o\)-term may be complex. The real version \((1+\tfrac xn)^n\to e^x\) for fixed real \(x\) is Analysis 6.3, Lemma 6.24, proved with logarithms — which does not carry over to complex numbers. Here is a proof that does. Claim: if \(z_n\in\mathbb C\) and \(z_n\to z\), then \((1+\tfrac{z_n}{n})^n\to e^z\).
Proof supplied by me — the script only cites the real limit
Tool (telescoping). For complex \(a,b\): \(a^n-b^n=(a-b)(a^{n-1}+a^{n-2}b+\dots+b^{n-1})\) (multiply out: everything cancels except \(a^n\) and \(-b^n\)). The bracket has \(n\) terms, each of modulus at most \(m^{n-1}\) with \(m:=\max(|a|,|b|)\), so \(|a^n-b^n|\le n\,|a-b|\,m^{n-1}\).
Choose \(w:=\tfrac{z_n}{n}\), \(a:=1+w\), \(b:=e^{w}\). Then \(b^n=e^{nw}=e^{z_n}\) by the functional equation. A convergent sequence is bounded, so there is \(M\) with \(|z_n|\le M\) for all \(n\), hence \(|w|\le M/n\).
Bound \(m\). \(|a|\le1+|w|\le e^{|w|}\) (since \(e^s=1+s+\tfrac{s^2}2+\dots\ge1+s\) for \(s\ge0\)), and \(|b|=e^{\operatorname{Re}w}\le e^{|w|}\). So \(m^{n-1}\le e^{(n-1)|w|}\le e^{M}\).
Bound \(|a-b|\). \(b-a=e^w-1-w=\sum_{k\ge2}\frac{w^k}{k!}\), so \(|a-b|\le\sum_{k\ge2}\frac{|w|^k}{k!}=|w|^2\sum_{j\ge0}\frac{|w|^j}{(j+2)!}\le|w|^2e^{|w|}\le\frac{M^2}{n^2}e^{M}\).
Combine. \(\bigl|(1+\tfrac{z_n}n)^n-e^{z_n}\bigr|\le n\cdot\frac{M^2e^M}{n^2}\cdot e^M =\frac{M^2e^{2M}}{n}\to0\). And \(e^{z_n}\to e^z\) because \(\exp\) is continuous. By the triangle inequality, \(\bigl|(1+\tfrac{z_n}n)^n-e^z\bigr|\le\bigl|(1+\tfrac{z_n}n)^n-e^{z_n}\bigr|+|e^{z_n}-e^z|\to0\). ∎
Applied to the CLT: \(1-\tfrac{t^2}{2n}+o(\tfrac1n)=1+\tfrac{z_n}{n}\) with \(z_n=-\tfrac{t^2}{2}+n\cdot o(\tfrac1n)\to-\tfrac{t^2}{2}\), so the limit is \(e^{-t^2/2}\). Numbers (real case): \((1-\tfrac{1}{2\cdot100})^{100}\approx0.6058\), and \(e^{-1/2}\approx0.6065\).
In words: complex numbers are points in the plane; \(e^{it}\) walks around the unit circle; you differentiate a complex function by differentiating its two real coordinates; and "\((1+\text{something}/n)^n\to e^{\text{limit of something}}\)" stays true for complex somethings.
Background · B2 · assumed by §1.1
Sets, families and countability
Mengen, Familien, Abzählbarkeit
Why this page exists My addition
Definition 1.2 of the script says: "we generally assume familiarity with common concepts and notation from set theory — this is a short reminder". It then points to its Appendix A.1. That appendix is a list of bare definitions with no examples. You can read it on its own page: the script's own appendix A.1. This page explains every concept of that appendix again, slowly and with numbers, and adds what the appendix leaves out.
Your Analysis guide Chapter 1 covers quantifiers, countability and the number systems. It does not cover set algebra: unions over an arbitrary index set, de Morgan's laws, power sets and pre-images. This page fills that gap. It also covers the distributive laws for families of sets, the pre-image of a composition \(g\circ X\), and why \(\pow(\N)\) is uncountable (countability).
Everything here is used on the §1.1 page. If you can answer the self-test at the bottom, you have what §1.1 assumes.
The big picture
A probability space has three parts. There is a set \(\Omega\) (Greek capital omega) of all possible outcomes. There is a collection \(\Aa\) (a curly A) of subsets of \(\Omega\), the events. And there is a function \(\P\) that gives each event in \(\Aa\) a probability.
So the objects of this course live on three different levels. Take one roll of a die:
- Elements: an outcome, such as \(3\). It lies in \(\Omega=\{1,2,3,4,5,6\}\).
- Sets of elements: an event, such as "even" \(=\{2,4,6\}\). It is a subset of \(\Omega\).
- Sets of sets: a collection of events, such as \(\Aa=\bigl\{\emptyset,\{2,4,6\},\{1,3,5\},\Omega\bigr\}\). Its members are themselves sets.
Nearly every confusion in Chapter 1 is a mix-up between these levels. This page makes the levels automatic.
In words: Chapter 1 is not hard because the ideas are deep. It is hard because the objects are stacked three deep and the notation does not warn you when you slip a level.
Sets, elements, subsets
The vocabulary Script A.1
A set [Menge] is a collection of distinct objects. The objects are its elements [Elemente]. We write \(x\in A\) for "\(x\) is an element of \(A\)" and \(x\notin A\) for "\(x\) is not an element of \(A\)".
There are two ways to write a set down.
- By listing: \(\{1,2,3\}\), or \(\{a,b,\dots,*,\odot\}\) — the elements between curly brackets. The order and repetitions do not matter: \(\{1,2\}=\{2,1\}=\{1,1,2\}\). A set with exactly one element, \(\{x\}\), is a singleton.
- By a property: \(\{x\in\R \mid x^2<2\}\), read "the set of all \(x\) in \(\R\) such that \(x^2<2\)". Here \(\R\) is the set of real numbers and the bar \(\mid\) means "such that".
Subset [Teilmenge]. \(A\subseteq B\) means: every element of \(A\) is also in \(B\). In symbols, \(\forall x\in A: x\in B\), where \(\forall\) means "for all". We then also call \(B\) a superset of \(A\) and write \(B\supseteq A\). Example: \(\{1,2\}\subseteq\{1,2,3\}\). Also \(\{1,2\}\subseteq\{1,2\}\): a set is allowed to equal the other one.
Proper subset [echte Teilmenge]. \(A\subsetneq B\) means \(A\subseteq B\) and \(A\ne B\): \(B\) has at least one extra element. Example: \(\{1,2\}\subsetneq\{1,2,3\}\), but \(\{1,2\}\) is not a proper subset of \(\{1,2\}\).
A warning about \(\subset\). Definition 1.2 says the script uses \(\subseteq\) for "subset, equality allowed" and \(\subsetneq\) for "proper subset", tries to avoid the bare symbol \(\subset\) altogether, and adds that where \(\subset\) does slip in it "probably" means \(\subseteq\) — and asks you to point it out. The exercise sheets do slip: Sheet 0 Exercise 5 writes \(K\subset\{1,\dots,52\}\) and Sheet 3 Exercise 3 writes \((p_n)_{n\in\N}\subset[0,1]\), both meaning \(\subseteq\). Read \(\subset\) as \(\subseteq\) unless the text insists on \(A\ne B\).
Equality. \(A=B\) means \(A\subseteq B\) and \(B\subseteq A\): the two sets have exactly the same elements.
Two rules for \(\subseteq\). It is reflexive: \(A\subseteq A\) for every set \(A\). It is transitive: if \(A\subseteq B\) and \(B\subseteq C\), then \(A\subseteq C\). Example: \(\{1\}\subseteq\{1,2\}\) and \(\{1,2\}\subseteq\{1,2,3\}\) give \(\{1\}\subseteq\{1,2,3\}\).
Empty set. \(\emptyset\) is the set with no elements. It is a subset of every set \(B\). The reason: the statement "\(\forall x\in\emptyset: x\in B\)" has nothing to check, so it is true.
The single most important technique: proving \(A = B\) My addition
Two sets are equal exactly when each contains the other (\(\Longleftrightarrow\) means "exactly when", or "if and only if"):
\[ A = B \quad\Longleftrightarrow\quad A\subseteq B \ \text{ and } \ B\subseteq A. \]So every proof that two sets are equal has two halves. Both halves have the same shape: take an arbitrary element of the left side and show that it lies in the right side. "Arbitrary" means you assume nothing about the element except that it lies in the left side. That is why the argument covers every element at once.
This is the shape of Sheet 1 Exercises 1, 2, 3 and 6, Sheet 3 Exercises 1 and 2, and every proof in §1.1. Sometimes each step works in both directions (written \(\iff\)). Then you can write both halves as one chain of \(\iff\)-steps. The de Morgan and pre-image proofs below do this.
Set operations
The five operations Script A.6, Definition 1.2; \(\Delta\) from Corollary 1.10
Let \(A,B\subseteq \Omega\). Here \(\Omega\) is the surrounding set, sometimes called the "universe". The symbol \(:=\) means "is defined as".
- Union [Vereinigung]: \(A\cup B := \{x \mid x\in A \ \text{or}\ x\in B\}\). "Or" in mathematics is always inclusive: \(x\) may be in both.
- Intersection [Schnitt]: \(A\cap B := \{x \mid x\in A \ \text{and}\ x\in B\}\).
- Difference [Differenz], which the script calls the relative complement of \(B\) in \(A\): \(A\setminus B := \{x \mid x\in A \ \text{and}\ x\notin B\}\). Read "\(A\) without \(B\)".
- Complement [Komplement]: \(A^c := \Omega\setminus A\), everything in the universe that is not in \(A\). This one depends on \(\Omega\). The complement of \(\{1\}\) inside \(\{1,2\}\) is \(\{2\}\); inside \(\{1,2,3\}\) it is \(\{2,3\}\). Always know what the universe is.
- Symmetric difference [symmetrische Differenz]: \(A\,\Delta\,B := (A\setminus B)\cup(B\setminus A)\), the elements that lie in exactly one of the two sets. (\(\Delta\) is the Greek capital delta.) This is the one operation the appendix does not list: the script introduces it later, in the middle of Corollary 1.10, with exactly this formula.
\(A\) and \(B\) are disjoint [disjunkt] if \(A\cap B=\emptyset\): they have no element in common. Example: \(\{1,2\}\) and \(\{3\}\) are disjoint; \(\{1,2\}\) and \(\{2,3\}\) are not.
The script writes \(A\mathbin{\dot\cup}B\) (a union sign with a dot) for a union of sets that happen to be disjoint. The dot adds no new meaning. It only tells the reader "these sets are disjoint", so that additivity of probabilities may be used.
Venn diagrams [Venn-Diagramme] draw each set as a circle inside a rectangle (the universe \(\Omega\)); overlaps show intersections. The script's appendix remarks that they help your intuition but are not proofs: a picture with two circles shows one situation, while a proof must cover every possible pair of sets. The widget below is a Venn diagram you can click.
Worked example with real sets My addition
Take \(\Omega=\{1,2,3,4,5,6\}\) (a die), \(A=\{2,4,6\}\) ("even"), \(B=\{4,5,6\}\) ("at least 4").
| Expression | Value | In words |
|---|---|---|
| \(A\cup B\) | \(\{2,4,5,6\}\) | even or at least 4 |
| \(A\cap B\) | \(\{4,6\}\) | even and at least 4 |
| \(A\setminus B\) | \(\{2\}\) | even but below 4 |
| \(A^c\) | \(\{1,3,5\}\) | odd |
| \(A\,\Delta\,B\) | \(\{2,5\}\) | exactly one of the two holds |
| \((A\cup B)^c\) | \(\{1,3\}\) | neither |
| \(A^c\cap B^c\) | \(\{1,3\}\) | not even and not ≥ 4 — same set ✓ |
The last two rows give the same set. That is one instance of de Morgan's law (below). The general law says this is no coincidence of this die: it happens for all sets.
Indexed families and big unions
Start with an example. Take the labels \(I=\{1,2,3\}\) and the three sets \(A_1=\{a\}\), \(A_2=\{a,b\}\), \(A_3=\{b,c\}\). Each label \(i\in I\) carries one set \(A_i\). This labelled collection is a family. The formal version:
Definition — family, index set Script A.7
Let \(I\) be a non-empty set (\(I\ne\emptyset\)). For each \(\alpha\in I\) (\(\alpha\) is the Greek letter alpha, used as a label) let \(A_\alpha\) be a set. Then \(\{A_\alpha \mid \alpha\in I\}\), also written \((A_\alpha)_{\alpha\in I}\), is a family of sets [Familie von Mengen] (or collection of sets). \(I\) is its index set [Indexmenge].
The definition allows two things that often surprise people:
- Repetition: \(A_\alpha = A_\beta\) is allowed for \(\alpha\ne\beta\). Example: \(A_1=A_2=\{0\}\). Think of a family as a labelling: two labels may carry the same set.
- Empty members: \(A_\alpha=\emptyset\) is allowed. This makes the padding trick below legal.
The index set may be finite (\(I=[n]=\{1,\dots,n\}\)), countably infinite (\(I=\N\)) or uncountable (\(I=\R\)); these words are explained in the countability section. Which case you are in decides whether the axioms of a σ-algebra (the event collections of §1.1) can be applied.
Union and intersection over a family Script 1.2
\[ \bigcup_{\alpha\in I}A_\alpha := \{x \mid \exists \alpha\in I: x\in A_\alpha\}, \qquad \bigcap_{\alpha\in I}A_\alpha := \{x \mid \forall \alpha\in I: x\in A_\alpha\}. \]Here \(\exists\) means "there exists" and \(\forall\) means "for all". So:
- \(x\) is in the union if at least one of the sets contains \(x\);
- \(x\) is in the intersection if every one of the sets contains \(x\).
In the example above, \(\bigcup_{i\in I}A_i=\{a,b,c\}\) and \(\bigcap_{i\in I}A_i=\emptyset\), since no letter lies in all three sets.
De Morgan's laws (below) are what you get when you negate these two statements. Negating quantifiers is Analysis 1.1.
Infinite families My addition
Interval notation: \([a,b]\) contains both endpoints, \((a,b)\) neither, and \([a,b)\) only \(a\). \(\N_{>0}=\{1,2,3,\dots\}\).
- \(A_n=\bigl[0,1-\tfrac1n\bigr]\) for \(n\in\N_{>0}\). These grow: \(A_1=\{0\}\), \(A_2=[0,\tfrac12]\), \(A_3=[0,\tfrac23]\), … and \(\bigcup_n A_n=[0,1)\). Note the union is not \([0,1]\): no single \(A_n\) contains 1, and the union only collects what is in some member.
- \(B_n=\bigl(-\tfrac1n,\tfrac1n\bigr)\). These shrink, and \(\bigcap_n B_n=\{0\}\): a number \(x\ne0\) fails to be in \(B_n\) as soon as \(\tfrac1n<|x|\), which happens for some \(n\) by the Archimedean property.
- \(C_q=\{q\}\) for \(q\in\Q\). Here \(I=\Q\) is countably infinite and \(\bigcup_{q\in\Q}C_q=\Q\), where \(\Q\) is the set of fractions (rational numbers). This family is why \(\Q\) is a Borel set (§1.1): a countable union of single points.
The first two are exactly the shapes that appear in Proposition 1.19(iv) and (v) — increasing and decreasing families — and in Lemma 1.24, where \((-\infty,x_n]\) grows or shrinks.
The padding trick My addition — used all over §1.1
The union axiom of a σ-algebra talks about a sequence \((A_i)_{i\in\N}\), that is, countably many sets \(A_0,A_1,A_2,\dots\) (in this course \(\N=\{0,1,2,\dots\}\)). Suppose you only have finitely many, \(A_0,\dots,A_m\). Then extend the family with empty sets:
\[ B_i:=\begin{cases}A_i,& i\le m,\\ \emptyset,& i>m,\end{cases} \qquad\text{then}\qquad \bigcup_{i\in\N}B_i=\bigcup_{i=0}^{m}A_i, \]This works because adding \(\emptyset\) to a union changes nothing: no \(x\) lies in \(\emptyset\), so a padded member never supplies the "at least one". Example: \(\{1\}\cup\{2\}\cup\emptyset\cup\emptyset \cup\dots=\{1,2\}\).
For intersections, pad with \(\Omega\) instead. Every \(x\) lies in \(\Omega\), so a padded member never blocks the "every one": \(\bigcap_{i\in\N}B_i=\bigcap_{i=0}^{m}A_i\) when \(B_i=\Omega\) for \(i>m\).
Used in: Sheet 1 Ex 3 and Corollary 1.10 (finite unions and intersections stay in \(\Aa\), even though axiom (iii) of Definition 1.6 only speaks about infinite sequences); Definition 1.17, where finite additivity is squeezed out of σ-additivity by padding with \(\emptyset\); and, through that, the proofs of Proposition 1.19.
de Morgan's laws
Lemma 1.3 de Morgan Script 1.3
Small case first. For two sets: \((A\cup B)^c=A^c\cap B^c\) ("not in either" is the same as "not in \(A\) and not in \(B\)") and \((A\cap B)^c=A^c\cup B^c\) ("not in both" is the same as "missing from at least one"). The die table above checked the first one. The general version:
For a family \(\{A_i\}_{i\in I}\) of subsets of \(\Omega\), with any index set \(I\):
\[ \Bigl(\bigcup_{i\in I}A_i\Bigr)^{c}=\bigcap_{i\in I}A_i^{c}, \qquad \Bigl(\bigcap_{i\in I}A_i\Bigr)^{c}=\bigcup_{i\in I}A_i^{c}. \]Proof of the first law, in full Sheet 1 · Ex 1
The whole proof is the negation rule for quantifiers, written with sets. The rule: "it is not true that some \(i\) works" is the same as "every \(i\) fails". Below, \(\neg\) means "not". The chain of \(\iff\)-steps proves both inclusions at once:
\[ \begin{aligned} x\in\Bigl(\bigcup_{i\in I}A_i\Bigr)^{c} &\iff x\notin\bigcup_{i\in I}A_i && \text{definition of complement}\\ &\iff \neg\bigl(\exists i\in I: x\in A_i\bigr) && \text{definition of union}\\ &\iff \forall i\in I:\ x\notin A_i && \text{negating }\exists\text{ gives }\forall\\ &\iff \forall i\in I:\ x\in A_i^{c} && \text{definition of complement}\\ &\iff x\in\bigcap_{i\in I}A_i^{c} && \text{definition of intersection} \end{aligned} \]Since every step is an "if and only if", the two sets have exactly the same elements, so they are equal. The second law is the same chain with \(\exists\) and \(\forall\) swapped — or, more cheaply, apply the first law to the family \((A_i^c)_{i\in I}\) and take complements of both sides, using \((A^c)^c=A\). ∎
Why this matters so much here: the definition of a σ-algebra (Definition 1.6) has an axiom for unions and an axiom for complements, and no axiom for intersections. So every time you need an intersection to stay inside \(\Aa\), you go through de Morgan:
\[ \bigcap_{i}A_i=\Bigl(\bigcup_{i}A_i^{c}\Bigr)^{c}. \]Distributive laws, also for families
The picture. For numbers you know \(a\cdot(b+c)=a\cdot b+a\cdot c\): multiplying "distributes" over adding. Sets have the same rule with \(\cap\) in the role of \(\cdot\) and \(\cup\) in the role of \(+\). Unlike for numbers, it also works the other way round (\(\cup\) distributes over \(\cap\)). Intersecting a union with \(B\) is the same as intersecting each piece with \(B\) and then uniting the results.
The distributive laws [Distributivgesetze] My addition — the script uses them without stating them
Two sets first. For sets \(A,B,C\):
\[ A\cap(B\cup C)=(A\cap B)\cup(A\cap C),\qquad A\cup(B\cap C)=(A\cup B)\cap(A\cup C). \]Check with a die. \(\Omega=\{1,\dots,6\}\), \(A=\{2,4,6\}\), \(B=\{4,5,6\}\), \(C=\{1,2\}\).
- First law. Left: \(B\cup C=\{1,2,4,5,6\}\), so \(A\cap(B\cup C)=\{2,4,6\}\). Right: \(A\cap B=\{4,6\}\), \(A\cap C=\{2\}\), union \(\{2,4,6\}\) ✓.
- Second law. Left: \(B\cap C=\emptyset\), so \(A\cup\emptyset=\{2,4,6\}\). Right: \(A\cup B=\{2,4,5,6\}\), \(A\cup C=\{1,2,4,6\}\), intersection \(\{2,4,6\}\) ✓.
The family version — this is the one the course needs. For any set \(B\) and any family \((A_i)_{i\in I}\) (finite, countable or larger index set \(I\)):
\[ B\cap\Bigl(\bigcup_{i\in I}A_i\Bigr)=\bigcup_{i\in I}\bigl(B\cap A_i\bigr),\qquad B\cup\Bigl(\bigcap_{i\in I}A_i\Bigr)=\bigcap_{i\in I}\bigl(B\cup A_i\bigr). \]Proof — one chain of equivalences
The second step: the statement "\(x\in B\)" does not mention \(i\) at all, so it makes no difference whether we say it before "there is an \(i\)" or inside it. Since every step is an "if and only if", both sets have the same elements (double inclusion, above). The second law is the same chain with "or" instead of "and" and \(\forall\) instead of \(\exists\). ∎
An infinite example. \(B=[0,\tfrac12]\) and \(A_n=[0,1-\tfrac1n]\) for \(n\ge1\) (from the families section). Left: \(\bigcup_nA_n=[0,1)\), so \(B\cap[0,1)=[0,\tfrac12]\). Right: \(B\cap A_1=\{0\}\) and \(B\cap A_n=[0,\tfrac12]\) for every \(n\ge2\) (because then \(1-\tfrac1n\ge\tfrac12\)); their union is \([0,\tfrac12]\) ✓.
Disjointness survives. If the \(A_i\) are pairwise disjoint, so are the \(B\cap A_i\): they are smaller (\(B\cap A_i\subseteq A_i\)), and smaller sets cannot start to overlap.
In words: "in \(B\) and in at least one \(A_i\)" means the same as "in at least one of the pieces \(B\cap A_i\)". Cutting a union with \(B\) cuts each piece with \(B\), and disjoint pieces stay disjoint.
Where the course uses it My addition
σ-additivity proofs. To show that \(A\mapsto\P(A\cap B)\) (and hence the conditional probability \(\P(A\mid B)=\P(A\cap B)/\P(B)\)) is σ-additive, take pairwise disjoint \(A_1,A_2,\dots\). Then \((\bigcup_nA_n)\cap B=\bigcup_n(A_n\cap B)\) with disjoint pieces, so \(\P\bigl((\bigcup_nA_n)\cap B\bigr)=\sum_n\P(A_n\cap B)\). That is Theorem 1.70(i) = Sheet 4 Ex 2, worked on the §1.4 page.
Splitting an event by cases. If \(B_1,B_2,\dots\) cut \(\Omega\) into disjoint pieces, then \(A=A\cap\Omega=A\cap\bigcup_iB_i=\bigcup_i(A\cap B_i)\), a disjoint union. This is the first line of the law of total probability (Theorem 1.70(ii)) and of splitting the win event in exam task WiSe25 P6a (§1.4 exams).
The power set, and \(2^\Omega\)
Definition — power set Script A.3, 1.2
The power set [Potenzmenge] of \(\Omega\) is \(\pow(\Omega) := \{A \mid A\subseteq\Omega\}\): the set whose elements are all the subsets of \(\Omega\).
Example. For \(\Omega=\{1,2,3\}\): \(\pow(\Omega)=\bigl\{\emptyset,\{1\},\{2\},\{3\},\{1,2\},\{1,3\},\{2,3\},\{1,2,3\}\bigr\}\), eight elements.
The level jump is the point. \(\Omega\) holds outcomes; \(\pow(\Omega)\) holds sets of outcomes. So \(A\in\pow(\Omega)\) and \(A\subseteq\Omega\) say exactly the same thing. You will see both.
Examples, including the ones that look strange Script A.4
- \(\pow(\{*,\odot\})=\bigl\{\emptyset,\{*\},\{\odot\},\{*,\odot\}\bigr\}\) — four elements.
- \(\pow(\emptyset)=\{\emptyset\}\). Read that carefully: the empty set has exactly one subset, namely itself, so its power set has one element and is not empty.
- \(\pow(\{\emptyset\})=\bigl\{\emptyset,\{\emptyset\}\bigr\}\) — two elements.
- \(|\pow(\Omega)|=2^{|\Omega|}\) for finite \(\Omega\), where \(|\Omega|\) is the number of elements of \(\Omega\). Reason: building a subset means one yes/no decision per element, so there are \(2\cdot2\cdots2\) possibilities by the product rule (page B3). For \(\Omega=\{1,2,3\}\) that is \(2^3=8\), matching the list above.
Indicator functions, and why \(\pow(\Omega)\) is written \(2^\Omega\) Script 1.2, A.5
For \(A\subseteq\Omega\), the indicator function [Indikatorfunktion] \(\one_A:\Omega\to\{0,1\}\) is
\[ \one_A(\omega)=\begin{cases}1,&\omega\in A,\\ 0,&\omega\notin A.\end{cases} \]Read the symbol. The letter in \(\one_A\) is the Greek lower-case chi, \(\chi\). That is the script's own notation (Definition 1.2 writes \(\chi_A\) with \(\chi_A(a)=1\) if \(a\in A\) and \(\chi_A(a)=0\) otherwise), and this guide keeps it on every page. Other books write \(\mathbf 1_A\) or \(\mathbb 1_A\) for the same function, which is why it is called an indicator and not a "chi-function".
The notation \(2^\Omega\) usually means "the set of all maps \(\Omega\to\{0,1\}\)". Such a map says, for each element, 1 ("in") or 0 ("out"). Example with \(\Omega=\{1,2,3\}\): the subset \(\{1,3\}\) belongs to the map \(1\mapsto1,\ 2\mapsto0,\ 3\mapsto1\), which is its indicator \(\one_{\{1,3\}}\). The rule
\[ \pow(\Omega)\to 2^{\Omega},\qquad A\mapsto \one_A \]is a one-to-one correspondence (a bijection, see below): each subset gives one in/out pattern, and each in/out pattern describes exactly one subset. That is why the script (Remark A.5) also writes \(2^\Omega\) for the power set.
Worth knowing for later: indicators turn set operations into arithmetic — \(\one_{A\cap B}=\one_A\one_B\) and \(\one_{A^c}=1-\one_A\). In §2.1 this becomes \(\P(A)=\E[\one_A]\) ("probability equals the expected value of the indicator"), which is how counting problems turn into expectation problems. SoSe25 P5a (duck hunt) is built entirely on that move.
Cartesian products and tuples
Definition Script 1.2, Convention 1.64
The Cartesian product [kartesisches Produkt] is \(X\times Y := \{(x,y) \mid x\in X,\ y\in Y\}\), the set of ordered pairs. "Ordered" means \((x,y)=(x',y')\) exactly when \(x=x'\) and \(y=y'\), so \((1,2)\ne(2,1)\) — unlike the set \(\{1,2\}=\{2,1\}\).
Example: \(\{1,2\}\times\{a,b,c\}=\{(1,a),(1,b),(1,c),(2,a),(2,b),(2,c)\}\), with \(2\cdot3=6\) elements.
\(X^n := X\times\cdots\times X\) (\(n\) factors) is the set of \(n\)-tuples \((x_1,\dots,x_n)\). For finite \(X\), \(|X^n|=|X|^n\).
Notation the script uses constantly: \([n]:=\{1,\dots,n\}\) for \(n\in\N_{>0}\). So \([6]^2\) is the sample space of two dice, with \(|[6]^2|=36\).
Maps, images and pre-images
Definition My addition — the script uses these without defining them
A map [Abbildung] (or function) \(f:X\to Y\) assigns to each \(x\in X\) exactly one \(f(x)\in Y\). \(X\) is the domain [Definitionsbereich], \(Y\) the codomain [Zielmenge].
Running example. \(X=\{-2,-1,0,1,2\}\), \(Y=\{0,1,2,3,4\}\), \(f(x)=x^2\). So \(f(-2)=f(2)=4\), \(f(-1)=f(1)=1\), \(f(0)=0\).
For subsets \(A\subseteq X\) and \(B\subseteq Y\):
\[ f(A) := \{f(x) \mid x\in A\}\subseteq Y \quad\text{(\textbf{image} [Bild] of } A\text{)}, \] \[ f^{-1}(B) := \{x\in X \mid f(x)\in B\}\subseteq X \quad\text{(\textbf{pre-image} [Urbild] of } B\text{)}. \]In words: the image collects the outputs of the points in \(A\). The pre-image collects all inputs whose output lands in \(B\). In the example: \(f(\{1,2\})=\{1,4\}\); \(f^{-1}(\{4\})=\{-2,2\}\); \(f^{-1}(\{0,1\})=\{-1,0,1\}\); \(f^{-1}(\{3\})=\emptyset\), since no square equals 3.
Three standard words:
- \(f\) is injective [injektiv] if different inputs always give different outputs. The example is not: \(f(-1)=f(1)\).
- \(f\) is surjective [surjektiv] if every \(y\in Y\) is the output of some input. The example is not: nothing maps to 2 or 3.
- \(f\) is bijective [bijektiv] (a bijection, a one-to-one correspondence) if it is both. Then every \(y\in Y\) comes from exactly one \(x\), and \(f\) has an inverse function. Example: \(g:\{1,2,3\}\to\{a,b,c\}\) with \(g(1)=a\), \(g(2)=b\), \(g(3)=c\).
The mistake to avoid: \(f^{-1}\) is not an inverse function
\(f^{-1}(B)\) is defined for every map \(f\), invertible or not. It is not a function \(Y\to X\); it is a map \(\pow(Y)\to\pow(X)\), taking sets to sets. When \(f\) is not injective, \(f^{-1}(\{y\})\) may contain several elements (above, \(f^{-1}(\{4\})=\{-2,2\}\)). When \(f\) is not surjective, it may be empty (above, \(f^{-1}(\{3\})=\emptyset\)). Neither is a problem.
This matters because the whole theory of random variables is built on pre-images: a map \(X\) is measurable when \(X^{-1}(B)\) is an event for every \(B\), and nobody ever requires \(X\) to be invertible.
The pre-image toolbox Sheet 1 · Ex 2 (i)–(iii)
For \(f:X\to Y\), subsets \(A,B\subseteq Y\) and a collection \(\mathcal C\subseteq\pow(Y)\) (a set whose members are subsets of \(Y\)). Items 1–3 are exactly parts (i), (ii), (iii) of the sheet; item 4 is mine, and nothing extra has to be proved for it:
- \(A\subseteq B \implies f^{-1}(A)\subseteq f^{-1}(B)\);
- \(f^{-1}\bigl(\bigcup_{A\in\mathcal C}A\bigr)=\bigcup_{A\in\mathcal C}f^{-1}(A)\);
- \(f^{-1}(A^c)=\bigl(f^{-1}(A)\bigr)^c\);
- My addition and, as a consequence of (2) and (3), \(f^{-1}\bigl(\bigcap_{A\in\mathcal C}A\bigr)=\bigcap_{A\in\mathcal C}f^{-1}(A)\).
Proofs — each is a one-line chain of equivalences
(1) Let \(x\in f^{-1}(A)\). By definition \(f(x)\in A\). Since \(A\subseteq B\), also \(f(x)\in B\), i.e. \(x\in f^{-1}(B)\). ✓
(2)
\[ x\in f^{-1}\Bigl(\bigcup_{A\in\mathcal C}A\Bigr) \iff f(x)\in\bigcup_{A}A \iff \exists A\in\mathcal C:\ f(x)\in A \iff \exists A:\ x\in f^{-1}(A) \iff x\in\bigcup_{A}f^{-1}(A). \;✓ \](3)
\[ x\in f^{-1}(A^{c}) \iff f(x)\in A^{c} \iff f(x)\notin A \iff x\notin f^{-1}(A) \iff x\in\bigl(f^{-1}(A)\bigr)^{c}. \;✓ \](4) By de Morgan twice and (2),(3): \(f^{-1}(\bigcap_A A)=f^{-1}\bigl((\bigcup_A A^c)^c\bigr) =\bigl(f^{-1}(\bigcup_A A^c)\bigr)^c=\bigl(\bigcup_A f^{-1}(A^c)\bigr)^c =\bigl(\bigcup_A f^{-1}(A)^c\bigr)^c=\bigcap_A f^{-1}(A)\). ✓ ∎
In words: pre-images commute with everything — unions, intersections, complements. That is the entire reason \(f^{-1}(\mathcal B)\) is a σ-algebra whenever \(\mathcal B\) is (Sheet 1 Ex 6).
Forward images do not commute with complements SoSe26 · P2b
Images satisfy \(f(A\cup B)=f(A)\cup f(B)\), but in general
\[ f(A\cap B)\subseteq f(A)\cap f(B) \quad\text{(can be strict)}, \qquad f(A^{c})\ne f(A)^{c}. \]Why: if \(f\) glues two points together, a value can be reached both from inside \(A\) and from outside it, so it lands in \(f(A)\) and in \(f(A^c)\).
Concretely, with \(X=\{1,2,3\}\), \(Y=\{a,b\}\), \(f(1)=f(2)=a\), \(f(3)=b\) and \(A=\{2\}\): \(f(A)=\{a\}\) and \(f(A^c)=f(\{1,3\})=\{a,b\}\), which is not \(\{a\}^c=\{b\}\).
This asymmetry is the entire content of exam task SoSe26 P2b, worked on the §1.1 page.
Composition of maps, and the pre-image of a composition
The picture. Often you first compute one quantity and then feed it into a formula: roll a die, subtract 3, then square the result. Doing one map after another is called composition. The question this section answers: which outcomes lead to a final result in a set \(B\)? Answer: go backwards through the maps one at a time.
Definition and the key identity My addition — the identity the script needs for Lemma 2.2
For maps \(X:\Omega\to Y\) and \(g:Y\to Z\), the composition [Verkettung, Komposition] \(g\circ X:\Omega\to Z\) (read "\(g\) after \(X\)") is \((g\circ X)(\omega):=g\bigl(X(\omega)\bigr)\): first apply \(X\), then \(g\). In probability one simply writes \(g(X)\). (Analysis 4.1 uses composition for continuity.)
For every \(B\subseteq Z\):
\[ (g\circ X)^{-1}(B)=X^{-1}\bigl(g^{-1}(B)\bigr). \]Note the order: the map applied last (\(g\)) is undone first.
Proof
Step 1 is the definition of pre-image for \(g\circ X\); step 2 is the definition of pre-image for \(g\), applied to the point \(X(\omega)\); step 3 is the definition of pre-image for \(X\). ∎
Worked example with numbers My addition
\(\Omega=\{1,\dots,6\}\) (a die), \(X(\omega)=\omega-3\), \(g(x)=x^2\). Then \(g\circ X\) sends \(1\mapsto4,\ 2\mapsto1,\ 3\mapsto0,\ 4\mapsto1,\ 5\mapsto4,\ 6\mapsto9\). Take \(B=\{1,4\}\).
- Backwards in two steps. \(g^{-1}(\{1,4\})=\{-2,-1,1,2\}\) (the numbers whose square is 1 or 4). Then \(X^{-1}(\{-2,-1,1,2\})=\{1,2,4,5\}\) (the \(\omega\) with \(\omega-3\) in that set).
- Directly. From the list, \(g(X(\omega))\in\{1,4\}\) exactly for \(\omega=1,2,4,5\) ✓.
A cdf-style example. With \(g(x)=x^2\) and \(B=(-\infty,y]\) for some \(y\ge0\): \(g^{-1}\bigl((-\infty,y]\bigr)=[-\sqrt y,\sqrt y]\), so \(\{X^2\le y\}=\{-\sqrt y\le X\le\sqrt y\}\). This is exactly the first step of the cdf method for the distribution of \(g(X)\).
Why it matters: \(g(X)\) is again a random variable My addition
A random variable \(X\) is a map whose pre-images \(X^{-1}(B)\) of Borel sets \(B\) are events (Definition 1.50). If \(g:\R\to\R\) is measurable (pre-images of Borel sets are Borel sets — true for every continuous or monotone \(g\), see B4), then \(g^{-1}(B)\) is a Borel set, so \((g\circ X)^{-1}(B)=X^{-1}(g^{-1}(B))\) is an event. That is the whole proof that \(X^2\), \(e^X\), \(-\ln U\), … are random variables (§1.3), used in Sheet 4 Ex 4 and in the exam tasks SoSe25 P3d and WiSe25 P3a (\(X=g(U)\), §1.3 exams).
Where the script relies on it. Lemma 2.2 opens with "let \(g:\R\to\R\) be a measurable function. Then \(Y=g(X)\) is also an RVRV" and gives no proof; the missing line is exactly the identity above. Example 1.52 supplies the other half — "continuous functions are measurable with respect to their Borel-σ-algebras" — which is what makes \(g^{-1}(B)\) a Borel set for the \(g\) this course uses.
In words: to find the outcomes that end up in \(B\) after two maps, first find the middle values that \(g\) sends into \(B\), then find the outcomes that \(X\) sends to those middle values.
Countability, and the arithmetic of it
The definition and Cantor's argument are in your Analysis guide Analysis 1.1
A set \(A\) is countable [abzählbar] if it is empty or there is a surjective map \(f:\N\to A\). Think of \(f\) as a numbered list \(f(0),f(1),f(2),\dots\) that eventually reaches every element of \(A\); repetitions are allowed. A set that is not countable is uncountable [überabzählbar].
Examples. \(\{a,b\}\) is countable: the list \(a,b,b,b,\dots\) works. The even numbers \(\{0,2,4,\dots\}\) are countable: \(f(n)=2n\). Here \(f\) is even a bijection with \(\N\); such a set is called countably infinite [abzählbar unendlich]. \(\Z=\{\dots,-1,0,1,\dots\}\) is countable via the list \(0,1,-1,2,-2,\dots\). \(\Q\) is countable; \(\R\) is not, by Cantor's diagonal argument. Your guide has both, with the diagonal widget: Analysis 1.1 — Countability →
Careful with the words — but not in the way you might expect. In this course "countable" already includes the finite case. Definition 1.2 spells it out: "a countable (i.e., finite or countably infinite) collection of sets". Definition 1.34 writes "at most countable" [höchstens abzählbar] for the very same thing, only more explicitly, so that nobody reads "countable \(\Omega\)" as "infinite \(\Omega\)" and excludes a six-sided die. Your Analysis guide uses "countable" in exactly this wide sense too. The one phrase that really does exclude finite sets is "countably infinite". So: whenever you meet "countable" or "at most countable" in this course, finite sets are allowed; only "countably infinite" rules them out.
The four facts this course actually uses My addition
Sheet 1 lets you use the first two without proof. Learn all four by heart.
- A subset of a countable set is countable.
- A countable union of countable sets is countable. If \(A_0,A_1,\dots\) are each countable, so is \(\bigcup_i A_i\).
- A finite product of countable sets is countable — in particular \(\Q\times\Q\) is countable.
- The set of finite subsets of \(\N\) is countable, and so is the set of finite sequences over a finite alphabet.
Why (2) is true, and where it is used My sketch
Empty sets add nothing to a union, so leave them out. (If nothing is left, the union is empty and therefore countable, and there is nothing to prove. If only finitely many are left, repeat the last one over and over — repeating a set changes no union, and now there are infinitely many rows to work with.) List each remaining \(A_i\) as \(a_{i,0},a_{i,1},a_{i,2},\dots\) (possible since \(A_i\) is countable: that is what a surjection \(\N\to A_i\) gives you). Arrange these lists as the rows of an infinite grid, and walk the grid along anti-diagonals: first \(a_{0,0}\); then \(a_{1,0},a_{0,1}\); then \(a_{2,0},a_{1,1},a_{0,2}\); and so on. Each anti-diagonal is finite, so every entry is reached after finitely many steps. That walk is a surjection \(\N\to\bigcup_i A_i\). ∎
This is the same anti-diagonal walk your Analysis guide uses to list \(\Q\).
Used here in three places:
- Sheet 1 Exercise 4(iii): the co-countable sets form a σ-algebra — the union case needs exactly (2).
- Sheet 2 Exercise 5: there are only countably many intervals \([a,b)\) with \(a,b\in\Q\), because \(\Q\times\Q\) is countable — that is (3). Without it, "every open set is a countable union of rational intervals" would fail and the Borel σ-algebra argument would collapse.
- Theorem 1.27: the group of finite coin-flip changes is countable, by (4).
Two more facts, with their reasons My addition
(5) Every infinite set contains a countably infinite subset. Let \(\Omega\) be infinite. Pick any element \(\omega_0\in\Omega\). The rest, \(\Omega\setminus\{\omega_0\}\), is not empty (otherwise \(\Omega\) would have only one element), so pick \(\omega_1\) in it. After \(n\) picks, the rest \(\Omega\setminus\{\omega_0,\dots,\omega_{n-1}\}\) is still not empty, because a set with only \(n\) elements is finite and \(\Omega\) is not. So the picking never gets stuck, and it produces distinct elements \(\omega_0,\omega_1,\omega_2,\dots\); the set \(\{\omega_0,\omega_1,\dots\}\) is countably infinite. (Making infinitely many picks one after the other, with no rule saying which element to take, is a mild use of the axiom of choice, the "countable choice" version; the course uses it silently.) Used in the guide's proof of Sheet 1 Ex 4(iv), where distinct \(\omega_0,\omega_1,\dots\) are picked.
(6) The power set of \(\N\) is uncountable — it has the same size as \(\R\). The script states this in its motivation (p. 8) without an argument; the Motivation page gives the diagonal step in short form. Here is the whole thing, in three steps:
- Subsets are 0/1-sequences. A subset \(S\subseteq\N\) is described by its indicator (above): the sequence \(\one_S(0),\one_S(1),\one_S(2),\dots\) of 0s and 1s. Example: the even numbers give \(1,0,1,0,\dots\).
- No list contains every subset (a diagonal argument, as in Cantor's proof for \(\R\), Analysis 1.1). Suppose \(S_0,S_1,S_2,\dots\) were a list of all subsets of \(\N\). Build \(D:=\{n\in\N\mid n\notin S_n\}\). For every \(n\), the sets \(D\) and \(S_n\) disagree about the number \(n\): if \(n\in S_n\) then \(n\notin D\), and if \(n\notin S_n\) then \(n\in D\). So \(D\) is none of the \(S_n\) — but it is a subset of \(\N\), and the list was supposed to contain all of them. That is impossible, so no such list exists. Example: if the list begins \(S_0=\{0,1\}\), \(S_1=\emptyset\), \(S_2=\{0,2,4,\dots\}\), \(S_3=\N\), then \(0\in S_0\Rightarrow0\notin D\); \(1\notin S_1\Rightarrow1\in D\); \(2\in S_2\Rightarrow2\notin D\); \(3\in S_3\Rightarrow3\notin D\). \(D\) already differs from each of the first four sets.
- Same size as \(\R\) (sketch). A 0/1-sequence \(d_0,d_1,d_2,\dots\) is the binary expansion \(0.d_0d_1d_2\ldots\) of a number in \([0,1]\). Only countably many numbers have two expansions (such as \(0.1000\ldots=0.0111\ldots\) in binary), which does not change the size, and \([0,1]\) has the same size as \(\R\).
The proof pattern. Step 2 is a proof by contradiction [Widerspruchsbeweis]: assume the opposite of what you want (here: "a complete list exists"), deduce something impossible, and conclude that the assumption was false. The model example is Analysis 1.1 — \(\sqrt2\) is not rational. The script's proofs of Theorems 1.27 and 1.28 (the Vitali section) and Sheet 2 Ex 5 have the same shape.
In words: an infinite set always has room for an endless list of different elements; but the collection of all subsets of \(\N\) is too big for any list, because from any list you can build a subset it misses.
Equivalence relations, partitions, and the axiom of choice
These three ideas appear in exactly one place in this course — the Vitali construction, Theorem 1.28 — but that proof is unreadable without them.
Definition — equivalence relation My addition
A relation \(\sim\) on a set \(X\) (a rule that, for each pair, either holds or does not) is an equivalence relation [Äquivalenzrelation] if it is
- reflexive: \(x\sim x\) for all \(x\);
- symmetric: \(x\sim y \implies y\sim x\);
- transitive: \(x\sim y\) and \(y\sim z\) \(\implies\) \(x\sim z\).
The equivalence class [Äquivalenzklasse] of \(x\) is \([x]:=\{y\in X \mid y\sim x\}\), the set of everything equivalent to \(x\). (These square brackets have nothing to do with \([n]=\{1,\dots,n\}\) or with intervals.)
Small example. On \(X=\{1,2,3,4,5,6\}\) let \(x\sim y\) mean "\(x\) and \(y\) have the same parity" (both even or both odd). All three rules hold. There are two classes: \([1]=[3]=[5]=\{1,3,5\}\) and \([2]=[4]=[6]=\{2,4,6\}\).
Classes partition the set My addition
The equivalence classes of \(\sim\) are non-empty, pairwise disjoint (any two different classes are disjoint), and their union is \(X\). In other words, they cut \(X\) into blocks with no overlaps and no leftovers. Such a cutting is called a partition [Partition, Zerlegung]. In the parity example the blocks are \(\{1,3,5\}\) and \(\{2,4,6\}\).
Proof
Non-empty: \(x\in[x]\) by reflexivity.
Cover: every \(x\) lies in its own class, so the union of all classes is \(X\).
Disjoint: suppose \([x]\cap[y]\ne\emptyset\), say \(z\sim x\) and \(z\sim y\). By symmetry \(x\sim z\), and with transitivity \(x\sim y\). Then for any \(w\in[x]\) we get \(w\sim x\sim y\), so \(w\in[y]\), giving \([x]\subseteq[y]\); by the same argument with the roles swapped, \([y]\subseteq[x]\). Hence \([x]=[y]\). So two classes are either identical or disjoint — never partially overlapping. ∎
The example you need: the Vitali relation
On \(X=[0,1)\) define \(x\sim y :\iff x-y\in\Q\).
- Reflexive: \(x-x=0\in\Q\) ✓
- Symmetric: if \(x-y\in\Q\) then \(y-x=-(x-y)\in\Q\) ✓
- Transitive: if \(x-y\in\Q\) and \(y-z\in\Q\) then \(x-z=(x-y)+(y-z)\in\Q\), since a sum of rationals is rational ✓
Each class is a set like \(\{\,x+q \bmod 1 \mid q\in\Q\,\}\). Here "\(\bmod 1\)" means: keep only the part after the decimal point, so the result stays in \([0,1)\). Example: the class of \(0\) is \(\Q\cap[0,1)\), and the class of \(\sqrt2-1\approx0.414\) contains \(0.414\ldots+\tfrac12=0.914\ldots\). Each class is countably infinite — it holds exactly one point for each rational \(q\in\Q\cap[0,1)\), because if \((x+q)\bmod 1=(x+q')\bmod 1\) with \(q,q'\in[0,1)\) then \(q-q'\) is a whole number smaller than 1 in size, hence \(0\), so \(q=q'\) — and dense in \([0,1)\): every interval, however short, contains a point of it. There are uncountably many classes. If there were only countably many, \([0,1)\) would be a countable union of countable sets, hence countable (fact 2 above) — but it is not.
The axiom of choice My addition
The axiom of choice [Auswahlaxiom] says: given any family of non-empty sets, there is a function picking one element out of each. For finitely many sets this is unremarkable — you just pick. For an uncountable family with no rule saying which element to take, it is a genuine extra assumption about what mathematics permits.
Why it appears here: the Vitali set \(V\) is built by choosing one representative from each of uncountably many equivalence classes, with no rule for choosing. That non-constructive step is exactly why \(V\) can be so badly behaved that no translation-invariant probability can measure it. You cannot write down a non-measurable set; you can only prove one exists.
Summary sheet
The three levels
| Level | Typical letter | Lives in | Example statement |
|---|---|---|---|
| outcome | \(\omega\) | \(\Omega\) | \(\omega\in A\) |
| event | \(A, B\) | \(\pow(\Omega)\) | \(A\in\Aa\), \(A\subseteq\Omega\) |
| event system | \(\Aa,\mathcal E\) | \(\pow(\pow(\Omega))\) | \(\Aa\subseteq\pow(\Omega)\) |
\(\omega\in\Aa\) and \(A\in\Omega\) are always level errors.
Identities to know cold
- equality
- \(A=B \iff A\subseteq B\) and \(B\subseteq A\)
- de Morgan
- \((\bigcup_i A_i)^c=\bigcap_i A_i^c\) and \((\bigcap_i A_i)^c=\bigcup_i A_i^c\)
- difference
- \(A\setminus B=A\cap B^c\)
- double complement
- \((A^c)^c=A\)
- distributive
- \(A\cap(B\cup C)=(A\cap B)\cup(A\cap C)\), and with \(\cup,\cap\) swapped; for families \(B\cap\bigcup_iA_i=\bigcup_i(B\cap A_i)\), disjoint pieces stay disjoint
- pre-image
- commutes with \(\cup\), \(\cap\) and \(^c\) — always
- composition
- \((g\circ X)^{-1}(B)=X^{-1}(g^{-1}(B))\): undo the last map first
- countability
- every infinite set has a countably infinite subset; \(\pow(\N)\) is uncountable (diagonal argument)
- image
- commutes with \(\cup\) only
- power set
- \(|\pow(\Omega)|=2^{|\Omega|}\); \(\pow(\emptyset)=\{\emptyset\}\)
- padding
- \(\emptyset\) for unions, \(\Omega\) for intersections
Where each is used
- Double inclusion → every proof on the §1.1 page.
- de Morgan → turning intersections into unions inside a σ-algebra (Corollary 1.10).
- Pre-image toolbox → Sheet 1 Ex 6, Sheet 3 Ex 1 and 2, measurability of random variables.
- Distributive law for families → σ-additivity of \(\P(\cdot\mid B)\) (Theorem 1.70, Sheet 4 Ex 2), law of total probability, WiSe25 P6a.
- Pre-image of a composition → \(g(X)\) is a random variable (§1.3), the cdf method, SoSe25 P3d, WiSe25 P3a.
- Images misbehaving → SoSe26 P2b.
- Countable-union-of-countable → Sheet 1 Ex 4(iii), Sheet 2 Ex 5, Theorem 1.27.
- Equivalence classes + axiom of choice → Theorem 1.28, the Vitali set.
Self-test
Background · B3 · assumed by §1.2
Counting
Kombinatorik
Why this page exists My addition
Lemma 1.36 (urn models) and Example 1.40 state counts built from factorials, binomial coefficients and "stars and bars" without a word of explanation: the script simply assumes combinatorics. It nowhere lists prerequisites. Remark 0.2 does mention Discrete Structures [Diskrete Strukturen] — the module that was historically the other half of the same pair at TUM — and that is where this material is normally taught, though the script never says so in so many words.
Your Analysis guide does state the binomial theorem, with the formula \(\binom nk=\frac{n!}{k!\,(n-k)!}\) (Analysis 2.2) — but only as a tool for estimating sequences, and it never says what \(\binom nk\) counts. Permutations, falling factorials, stars and bars, multinomial coefficients and inclusion–exclusion do not appear in it at all. So this page builds the whole toolkit from the product rule up, with a reason for every formula.
Everything here is used on the §1.2 page, and the binomial coefficient reappears in the binomial, hypergeometric and negative binomial distributions, which run through the whole course.
The page also explains the product sign \(\prod\) and index shifts in sums, which the script uses from §1.2 onwards without defining them.
The big picture: why probability needs counting
Example first. Roll one fair die. The chance of an even number is \(\tfrac36\): three favourable outcomes \(\{2,4,6\}\) out of six possible ones.
In general: let \(\Omega\) be a finite set of outcomes, all equally likely, and \(A\subseteq\Omega\) an event. Write \(|A|\) for the number of elements of \(A\). Then
\[ \P(A)=\frac{|A|}{|\Omega|}=\frac{\text{number of favourable outcomes}}{\text{number of possible outcomes}}. \]So a probability question becomes two counting questions. This rule is the uniform (Laplace) distribution \(\Lap_\Omega\) of Example 1.39(i).
The condition in that sentence is the hard part
"All outcomes equally likely" is a claim about the physical mechanism, not about the formula. It depends on how you chose \(\Omega\). Choose \(\Omega\) badly and the formula still produces a number — a wrong one. Example 1.41 is an entire worked case of this: the same mug story gives \(\tfrac{10}{21}\) or \(\tfrac{135}{256}\) depending on which \(\Omega\) you count in.
So the counting on this page is the easy half. The modelling is the half that loses marks.
The product rule
The product rule My addition
If an object is built by making \(k\) choices in sequence, where the first has \(n_1\) options, the second has \(n_2\) options whatever was chosen first, and so on, then the number of objects is
\[ n_1\cdot n_2\cdots n_k. \]Why, and the condition people forget
Two stages first. Picture a tree. The root branches into \(n_1\) options; from each of those, \(n_2\) further branches leave. The number of leaves is \(n_1\) copies of \(n_2\), that is \(n_1n_2\). Now repeat: attaching \(n_3\) branches to each of those \(n_1n_2\) leaves gives \(n_1n_2n_3\), and induction finishes it. (Induction [vollständige Induktion] proves a statement for every \(k\) by proving it for the smallest \(k\) and then proving "if it holds for \(k\), it holds for \(k+1\)" — a row of dominoes. It is taught from scratch in Analysis 2.2.)
The condition that matters: \(n_2\) must be the same number whatever the first choice was. The options themselves may differ — that is fine — but how many there are may not.
Good: drawing without replacement. After any first card, exactly 51 remain. The set of remaining cards depends on the first draw; its size does not.
Bad: "choose a number from \(\{1,\dots,5\}\), then choose a larger one." If you chose 1 there are 4 options, if you chose 4 there is 1. The product rule does not apply and you must count differently.
Three quick applications My addition
- PINs. Four digits, each from \(\{0,\dots,9\}\), repeats allowed: \(10\cdot10\cdot10\cdot10=10^4=10\,000\). This is Sheet 0 Exercise 3.
- Two dice. \(6\cdot6=36\) ordered pairs — Sheet 0 Exercise 1. Note it is \(36\) and not \(21\): the 21 unordered pairs are not equally likely.
- Subsets. Building a subset of an \(n\)-element set means answering "in or out?" once per element: \(2^n\). That is why \(|\pow(\Omega)|=2^{|\Omega|}\).
Product notation \(\prod\) and index shifts
The picture. You know the summation sign \(\sum\) (capital Greek sigma): \(\sum_{i=1}^{4}i\) is a short way of writing \(1+2+3+4\). The product sign \(\prod\) (capital Greek pi, "P" for "product") is exactly the same shorthand, but for multiplying a list of numbers instead of adding them. The product rule above, \(n_1\cdot n_2\cdots n_k\), is the first place where you would like to have it, and from §1.2 onwards the script uses it constantly.
Definition — the product sign My addition — the script uses \(\prod\) without defining it
For numbers \(a_1,a_2,\dots,a_n\),
\[ \prod_{i=1}^{n}a_i := a_1\cdot a_2\cdots a_n . \]The letter \(i\) is the index [Index, Laufvariable]: it runs through the whole numbers from the lower bound \(1\) (written under \(\prod\)) to the upper bound \(n\) (written above), and for each value one factor \(a_i\) is written down. The name of the index does not matter: \(\prod_{i=1}^na_i=\prod_{k=1}^na_k\).
Examples with numbers.
- \(\prod_{i=1}^{4}i=1\cdot2\cdot3\cdot4=24=4!\). In general \(n!=\prod_{i=1}^{n}i\) (factorials are defined in the next section).
- \(\prod_{i=1}^{3}\tfrac12=\tfrac12\cdot\tfrac12\cdot\tfrac12=\tfrac18\): the factor does not have to depend on \(i\). In general \(\prod_{i=1}^{n}c=c^n\).
- \(\prod_{i=2}^{4}(i-1)=1\cdot2\cdot3=6\): the index may start anywhere.
Other index ranges. Instead of "from 1 to \(n\)" the index can run through any finite set written under the sign: \(\prod_{i\in[n]}a_i\) (with \([n]=\{1,\dots,n\}\)) is the same as \(\prod_{i=1}^na_i\), and \(\prod_{j\ne i}a_j\) means "multiply all \(a_j\) except the one with \(j=i\)".
The empty product is 1. If the range contains no index at all — for instance \(\prod_{i=1}^{0}a_i\), where the upper bound is below the lower one — there are no factors, and the value is defined to be \(1\). The reason is the same as for the empty sum being \(0\): we want "add one more factor" to mean "multiply by it", i.e. \(\prod_{i=1}^{n}a_i=\bigl(\prod_{i=1}^{n-1}a_i\bigr)\cdot a_n\). At \(n=1\) this reads \(a_1=(\text{empty product})\cdot a_1\), which forces the empty product to be \(1\). (This is also why \(0!=1\), below.)
Rules for \(\prod\) My addition
- Products split factor by factor: \(\prod_{i=1}^n(a_ib_i)=\prod_{i=1}^na_i\cdot\prod_{i=1}^nb_i\). Reason: both sides contain the same \(2n\) numbers multiplied together, only in a different order, and the order of multiplication does not matter. Example \(n=2\): \((2\cdot5)(3\cdot7)=210=(2\cdot3)(5\cdot7)\).
- A constant factor comes out as a power: \(\prod_{i=1}^n(c\,a_i)=c^n\prod_{i=1}^na_i\) — not \(c\prod a_i\) (that is the rule for sums). Example: \((2\cdot1)(2\cdot3)=12=2^2\cdot(1\cdot3)\).
- No rule for sums inside: \(\prod(a_i+b_i)\ne\prod a_i+\prod b_i\) in general. Example: \((1+1)(1+1)=4\), but \(1\cdot1+1\cdot1=2\).
- Telescoping: when each factor's denominator is the next factor's numerator, almost everything cancels: \(\prod_{i=1}^{n}\frac{i}{i+1}=\frac12\cdot\frac23\cdots\frac{n}{n+1}=\frac1{n+1}\). With \(n=3\): \(\tfrac12\cdot\tfrac23\cdot\tfrac34=\tfrac{6}{24}=\tfrac14\) ✓. This is the product version of the telescoping sum in Analysis 3.1, and it is exactly Sheet 3 Ex 4.
- The logarithm turns \(\prod\) into \(\sum\): for positive \(a_i\), \(\ln\prod_{i=1}^na_i=\sum_{i=1}^n\ln a_i\), because \(\ln(ab)=\ln a+\ln b\) (Analysis 5.2) applied \(n-1\) times. Here \(\ln\) is the natural logarithm. Numbers: \(\ln(2\cdot3\cdot4)=\ln24\approx3.178\), and \(\ln2+\ln3+\ln4\approx0.693+1.099+1.386=3.178\) ✓. In the other direction, \(\prod_ie^{x_i}=e^{\sum_ix_i}\).
In words: \(\prod\) is "multiply them all". It behaves like ordinary multiplication — you may regroup and reorder — and the logarithm converts a long product into a long sum, which is much easier to differentiate.
Index shifts in sums (and products) My addition
What it is. Sometimes a sum is easier to recognise if the index is renamed so that it starts at a different place. You introduce a new index, say \(m:=n-1\), and rewrite everything in terms of \(m\).
Small example first. \(\sum_{n=1}^{3}2^{\,n-1}=2^0+2^1+2^2=1+2+4=7\). Put \(m=n-1\). When \(n\) runs through \(1,2,3\), \(m\) runs through \(0,1,2\), and \(2^{n-1}=2^m\). So the same sum is \(\sum_{m=0}^{2}2^{m}=1+2+4=7\) ✓. Nothing was computed; only the labels changed.
The recipe. (1) Choose the new index, e.g. \(m=n-1\), so \(n=m+1\). (2) Translate the bounds: the lowest \(n\) gives the lowest \(m\), and likewise for the highest (for an infinite sum, \(\infty\) stays \(\infty\)). (3) Replace every \(n\) in the terms by \(m+1\).
The typical use in this course (the mean of a Poisson distribution, see Sheet 6 Ex 2): with \(n!=n\cdot(n-1)!\),
\[ \sum_{n=1}^{\infty}n\,\frac{\lambda^n}{n!}=\sum_{n=1}^{\infty}\frac{\lambda^n}{(n-1)!} \;\overset{m=n-1}{=}\;\sum_{m=0}^{\infty}\frac{\lambda^{m+1}}{m!}=\lambda\sum_{m=0}^{\infty}\frac{\lambda^m}{m!}=\lambda e^{\lambda}. \]The last step is the exponential series \(\sum_{m\ge0}\lambda^m/m!=e^\lambda\) (Analysis 3.4). The shift was needed to make the sum start at \(0\) with \(m!\) underneath, which is the form of that series.
Finish the calculation, so the display above is not left dangling. The Poisson pmf is \(p(n)=e^{-\lambda}\lambda^n/n!\) for \(n\in\N=\{0,1,2,\dots\}\), so the mean is
\[ \E[X]=\sum_{n=0}^{\infty}n\,p(n)=e^{-\lambda}\sum_{n=1}^{\infty}n\,\frac{\lambda^n}{n!} =e^{-\lambda}\cdot\lambda e^{\lambda}=\lambda . \]The sum may start at \(n=1\) instead of \(n=0\) because the \(n=0\) term is \(0\cdot p(0)=0\), and that is also what lets you cancel one \(n\) against \(n!=n\cdot(n-1)!\): the cancellation would be division by zero at \(n=0\). Products are shifted the same way as sums: \(\prod_{i=2}^{4}(i-1)=\prod_{k=1}^{3}k\) with \(k=i-1\).
Careful: in this course \(\N=\{0,1,2,\dots\}\) starts at \(0\), so always check which value the index starts from.
Where the course uses this: products of pmf values and of factors \(p+(1-p)\) in the parameters of the distribution zoo, the telescoping product in Sheet 3 Ex 4, the half-open boxes \(\prod_{i=1}^{n}[a_i,b_i)\) in Sheet 2 Ex 5 (there the same symbol means a Cartesian product of sets, not a product of numbers — see B2), the product formula for independent events and the joint pmf of an iid sample on §1.4, and the likelihood \(L=\prod_ip(x_i\mid\theta)\) and its logarithm in §3.2.
Factorials and permutations
Definition — factorial My addition
\[ n! := n\cdot(n-1)\cdots 2\cdot 1 \quad (n\in\N_{>0}), \qquad 0!:=1. \]\(n!\) is the number of ways to arrange \(n\) distinct objects in a row (a permutation [Permutation]): \(n\) choices for the first position, \(n-1\) for the second — one is used up — down to 1 for the last. Product rule.
Why \(0!=1\) and not 0. Two reasons, and it is worth having both. Combinatorially: there is exactly one way to arrange nothing — the empty arrangement. Structurally: the identity \(n!=n\cdot(n-1)!\) should hold at \(n=1\), giving \(1=1\cdot 0!\). Every formula below would need an exception without it.
Values \(0!,1!,2!,\dots\): \(1,1,2,6,24,120,720,5040,\dots\). \(10!\approx3.6\) million and \(20!\approx2.4\times10^{18}\). Factorials grow faster than any exponential \(c^n\). So listing all arrangements by hand stops being an option very quickly.
Definition — falling factorial (ordered selection without replacement) My addition — the count the script states in Lemma 1.36(ii)
The number of ways to pick \(k\) of \(n\) distinct objects in order, no repeats is
\[ n\,(n-1)\cdots(n-k+1)=\frac{n!}{(n-k)!}. \]Count the factors: from \(n\) down to \(n-k+1\) is exactly \(k\) of them — a frequent off-by-one. Check at \(k=1\): the product is just \(n\) ✓. At \(k=n\): it is \(n!/0!=n!\) ✓.
Why the fraction equals the product: write \(n!=n(n-1)\cdots(n-k+1)\cdot\underbrace{(n-k)\cdots 1}_{=(n-k)!}\) and cancel.
Example. Gold, silver and bronze among 8 runners: \(8\cdot7\cdot6=336\).
Binomial coefficients
Definition My addition
For integers \(0\le k\le n\),
\[ \binom{n}{k} := \frac{n!}{k!\,(n-k)!}, \]read "\(n\) choose \(k\)" [\(n\) über \(k\)]. We set \(\binom{n}{k}:=0\) when \(k<0\) or \(k>n\), since there are then no such selections.
What it counts: the number of \(k\)-element subsets of an \(n\)-element set — a selection where order does not matter.
Example. \(\binom42=\frac{4!}{2!\,2!}=\frac{24}{4}=6\). The 2-element subsets of \(\{1,2,3,4\}\) are \(\{1,2\},\{1,3\},\{1,4\},\{2,3\},\{2,4\},\{3,4\}\): six ✓.
Why that formula counts subsets
Count the ordered selections of \(k\) distinct objects in two ways.
Way 1. Directly: \(\dfrac{n!}{(n-k)!}\), from the falling factorial above.
Way 2. In two stages: first choose which \(k\) objects (call the number of ways \(N\)), then arrange those \(k\) in order (\(k!\) ways). By the product rule that is \(N\cdot k!\).
Both count the same thing, so \(N\cdot k! = \dfrac{n!}{(n-k)!}\), hence
\[ N=\frac{n!}{k!\,(n-k)!}=\binom{n}{k}. \;\;∎ \]Double counting — counting one set two ways and equating — is the standard technique of this whole page. Every identity below is proved that way.
The four identities worth knowing My addition
- Symmetry: \(\displaystyle\binom{n}{k}=\binom{n}{n-k}\).
- Edges: \(\displaystyle\binom{n}{0}=\binom{n}{n}=1\), \(\displaystyle\binom{n}{1}=n\).
- Pascal's rule: \(\displaystyle\binom{n}{k}=\binom{n-1}{k-1}+\binom{n-1}{k}\).
- Binomial theorem: \(\displaystyle(x+y)^n=\sum_{k=0}^{n}\binom{n}{k}x^{k}y^{\,n-k}\).
Reasons, all by double counting
(1) Symmetry. Choosing the \(k\) elements to take is the same act as choosing the \(n-k\) to leave behind. Every selection corresponds to exactly one rejection, so the two counts agree. (Algebraically: the formula is symmetric under \(k\leftrightarrow n-k\), since \(k!\,(n-k)!\) is.)
(2) Edges. There is one empty subset and one full subset; and \(n\) subsets of size 1.
(3) Pascal's rule. Fix one element, say \(x_1\), of the \(n\)-element set. Every \(k\)-subset either contains \(x_1\) or does not, and never both:
- contains \(x_1\): the other \(k-1\) members come from the remaining \(n-1\) elements — \(\binom{n-1}{k-1}\) ways;
- does not: all \(k\) members come from the remaining \(n-1\) — \(\binom{n-1}{k}\) ways.
The two cases are disjoint and exhaust everything, so the counts add. This is the rule that builds Pascal's triangle, where each entry is the sum of the two above it.
(4) Binomial theorem. Expand \((x+y)^n=(x+y)(x+y)\cdots(x+y)\) with \(n\) factors. Multiplying out means choosing \(x\) or \(y\) from each factor and multiplying the choices; every such choice gives a term \(x^ky^{n-k}\) where \(k\) is the number of factors that contributed \(x\). Terms with the same \(k\) are identical, and the number of them is the number of ways to pick which \(k\) factors gave \(x\), namely \(\binom{n}{k}\). ∎
Two consequences used later: putting \(x=y=1\) gives \(\sum_k\binom nk=2^n\) (all subsets, sorted by size); putting \(x=p\), \(y=1-p\) gives \(\sum_k\binom nk p^k(1-p)^{n-k}=1\), which is exactly the statement that the binomial pmf sums to 1.
Stars and bars
The count My addition — this is Lemma 1.36(iv)
Example first. Put \(k=2\) identical balls into \(n=3\) numbered bins. Record how many balls each bin gets. The possibilities are \((2,0,0),(0,2,0),(0,0,2),(1,1,0),(1,0,1),(0,1,1)\): six of them.
In general: the number of ways to write \(k\) as an ordered sum of \(n\) non-negative integers (whole numbers \(0,1,2,\dots\)),
\[ a_1+a_2+\cdots+a_n=k,\qquad a_i\in\{0,1,2,\dots\}, \]equivalently the number of ways to put \(k\) identical items into \(n\) distinguishable bins, is
\[ \binom{n+k-1}{k}. \]Check with the example: \(\binom{3+2-1}{2}=\binom42=6\) ✓.
The encoding, with a picture
Represent an assignment as a row of symbols: write \(a_1\) stars, a bar, \(a_2\) stars, a bar, …, a bar, \(a_n\) stars. With \(n=4\) bins and \(k=6\) items, the assignment \((3,0,2,1)\) becomes
\[ \star\star\star \mid \; \mid \star\star \mid \star \]Every such row has exactly \(k\) stars and \(n-1\) bars — one bar between each pair of adjacent bins — so \(n+k-1\) symbols in total.
The encoding is reversible. From any arrangement of \(k\) stars and \(n-1\) bars you read off the assignment by counting stars between consecutive bars; empty stretches mean empty bins. So assignments and arrangements are in one-to-one correspondence, and it is enough to count arrangements.
An arrangement is fixed by saying which \(k\) of the \(n+k-1\) positions hold stars — the rest are bars. That is \(\binom{n+k-1}{k}\) ways. ∎
Check the edges. \(k=0\): \(\binom{n-1}{0}=1\) — one way to distribute nothing ✓. \(n=1\): \(\binom{k}{k}=1\) — everything goes in the only bin ✓. \(n=2\): \(\binom{k+1}{k}=k+1\) — the splits \((0,k),(1,k-1),\dots,(k,0)\) ✓.
In words: lay the \(k\) items in a row and drop \(n-1\) dividers among them. The picture and the assignment are two ways of writing the same thing, so counting one counts the other — and counting pictures is easy, because a picture is fixed as soon as you say which \(k\) of the \(n+k-1\) places carry an item. Watch the two numbers: \(k\) items, \(n-1\) dividers, never \(n\) dividers.
The "at least one in each bin" substitution My addition
To count solutions of \(b_1+\cdots+b_n=k\) with every \(b_i\ge1\), give each bin one item up front and distribute the rest freely. Formally, set \(c_i:=b_i-1\ge0\); then
\[ c_1+\cdots+c_n=k-n, \]which is the unrestricted problem with \(k-n\) in place of \(k\). So the count is \(\binom{(k-n)+n-1}{k-n}=\binom{k-1}{k-n}=\binom{k-1}{n-1}\).
Used in Example 1.40(iii) (6 identical mugs, 4 rooms, exactly one room empty). After choosing the empty room (4 ways), the 6 mugs go into the other 3 rooms with none empty. Place one in each, then distribute the remaining \(6-3=3\) freely among the 3 rooms: \(\binom{3+3-1}{3}=\binom53=10\). So \(|A|=4\cdot10=40\) out of \(\binom{4+6-1}{6}=\binom96=84\) occupancy vectors, and \(\P(A)=\tfrac{40}{84}=\tfrac{10}{21}\).
Multinomial coefficients
Definition and what it counts My addition
Example first. How many different words can you make from the letters A, A, B? List them: AAB, ABA, BAA — three. If the two A's were different (A₁, A₂), there would be \(3!=6\) words. Each word with plain A's appears \(2!=2\) times among those six (A₁A₂B and A₂A₁B both become AAB). So the count is \(\tfrac{3!}{2!\,1!}=3\).
In general, for whole numbers \(k_1,\dots,k_m\ge0\) with \(k_1+\cdots+k_m=n\),
\[ \binom{n}{k_1,k_2,\dots,k_m} := \frac{n!}{k_1!\,k_2!\cdots k_m!} \]counts the number of ways to arrange \(n\) objects in a row when \(k_1\) of them are identical of type 1, \(k_2\) identical of type 2, and so on. Equivalently, it counts the ways to split \(n\) distinguishable objects into labelled groups of sizes \(k_1,\dots,k_m\).
Why the division by \(k_i!\)
If all \(n\) objects were distinguishable there would be \(n!\) arrangements. Making the \(k_1\) objects of type 1 identical merges every group of \(k_1!\) arrangements that differ only by permuting them into a single arrangement. Doing this for each type divides by \(k_1!\,k_2!\cdots k_m!\). ∎
For \(m=2\) this is the ordinary binomial coefficient: \(\binom{n}{k,\,n-k}=\binom{n}{k}\) — arranging \(k\) "chosen" and \(n-k\) "not chosen" markers.
In words: pretend all \(n\) objects are different, count the \(n!\) arrangements, and then pay back the over-count: each group of identical objects was shuffled among itself in \(k_i!\) ways that you cannot actually tell apart, so divide by \(k_i!\) once for each group.
Where this course needs it: in Example 1.41, to see how many ordered outcomes produce one occupancy vector. The occupancy \((3,1,1,1)\) of 6 students over 4 rooms comes from \(\tfrac{6!}{3!\,1!\,1!\,1!}=120\) ordered outcomes, while \((6,0,0,0)\) comes from \(\tfrac{6!}{6!\,0!\,0!\,0!}=1\). That factor of 120 is exactly why the two models of the mug story disagree.
Inclusion–exclusion: counting a union
Inclusion–exclusion [Inklusion–Exklusion, Siebformel] My addition
Two sets, with numbers. Roll two dice (36 ordered outcomes). Let \(A\) = "first die shows 6" and \(B\) = "second die shows 6". Then \(|A|=6\) and \(|B|=6\). But \(|A\cup B|\) is not 12: the outcome \((6,6)\) lies in both and was counted twice. Subtract it once:
\[ |A\cup B|=|A|+|B|-|A\cap B|=6+6-1=11,\qquad \P(\text{at least one }6)=\tfrac{11}{36}. \]Check by the complement: "no six" has \(5\cdot5=25\) outcomes, and \(36-25=11\) ✓.
Three sets. Add the single sets, subtract the pairwise overlaps, add back the triple overlap:
\[ |A\cup B\cup C|=|A|+|B|+|C|-|A\cap B|-|A\cap C|-|B\cap C|+|A\cap B\cap C|. \]Example: how many of \(1,\dots,30\) are divisible by 2, 3 or 5? Singles: \(15+10+6=31\). Pairs (divisible by 6, 10, 15): \(5+3+2=10\). Triple (divisible by 30): \(1\). Total \(31-10+1=22\). Check: the numbers divisible by none of them are \(1,7,11,13,17,19,23,29\) — eight, and \(30-8=22\) ✓.
General form. For sets \(A_1,\dots,A_n\):
\[ \Bigl|\bigcup_{i=1}^nA_i\Bigr|=\sum_{k=1}^{n}(-1)^{k+1}\sum_{i_1<\dots<i_k}\bigl|A_{i_1}\cap\dots\cap A_{i_k}\bigr|. \]The inner sum runs over all choices of \(k\) different indices; the sign \((-1)^{k+1}\) is \(+\) for odd \(k\) and \(-\) for even \(k\). The same formula holds with \(\P\) in place of \(|\cdot|\).
Why every element is counted exactly once
Take an element that lies in exactly \(m\ge1\) of the sets. In the \(k\)-th inner sum it is counted once for each choice of \(k\) sets among its \(m\) sets, that is \(\binom mk\) times. So in total it is counted
\[ \sum_{k=1}^{m}(-1)^{k+1}\binom mk \;=\; -\sum_{k=1}^{m}(-1)^{k}\binom mk \;=\; 1-\sum_{k=0}^{m}(-1)^{k}\binom mk \;=\; 1-(1-1)^m \;=\; 1-0 \;=\; 1 \]times. Each step, spelled out. First: \((-1)^{k+1}=(-1)\cdot(-1)^{k}\), and the factor \(-1\) may be pulled out in front of the sum. Second: the missing \(k=0\) term is \((-1)^{0}\binom m0=1\cdot1=1\); adding it inside the sum and compensating outside turns \(-\sum_{k=1}^{m}\) into \(-\bigl(\sum_{k=0}^{m}-1\bigr)=1-\sum_{k=0}^{m}\). Third: the binomial theorem \((x+y)^m=\sum_{k=0}^{m}\binom mk x^{k}y^{\,m-k}\) with \(x=-1\) and \(y=1\) reads \(\sum_{k=0}^{m}\binom mk(-1)^{k}=(-1+1)^m=0^m\). Fourth: \(0^m=0\) because \(m\ge1\) — this is exactly where the assumption "the element lies in at least one set" is used. Elements in none of the sets are counted 0 times, as they should be. ∎
In words: add up the sets, and you have counted the overlaps too often. Take the pairwise overlaps away, and now you have taken the triple overlaps away too often. Put them back, and the quadruple ones are wrong again — so the signs keep alternating. The proof shows the see-saw always settles at exactly 1 for every element that is in at least one set.
Used in: derangements (Sheet 2 Ex 4, below), Example 1.41 (the ordered mug model: \(3^6-\binom31 2^6+\binom32 1^6=540\)), and WiSe25 P6c.
Three tricks that solve most problems
1. Count the complement My addition
When an event says "at least one", count the opposite and subtract: \(|A|=|\Omega|-|A^c|\), so \(\P(A)=1-\P(A^c)\).
Why it helps: "at least one six in six dice" is a union of six overlapping events, which needs inclusion–exclusion with \(2^6-1=63\) terms. "No six anywhere" is one clean product, \(5^6\). Used in Sheet 0 Ex 1(iii), Sheet 0 Ex 3(ii), Sheet 2 Ex 2 and Sheet 3 Ex 4(ii).
2. Fix what is forced, then count what is free My addition
In Example 1.40(ii) the first student must get exercise 1 and the last exercise 5. Those two are forced; the remaining three exercises can go to the remaining three students in any order, \(3!=6\) ways. So \(|A|=6\) out of \(|\Omega|=5!=120\).
The general shape: decompose the construction into independent stages, count each, multiply. Check the stages really are independent — that the count at stage 2 does not depend on what happened at stage 1. That is the product rule's condition again.
3. Count one set two ways My addition
Every identity on this page was proved this way, and it also solves problems. Sheet 0 Exercise 5 is worked twice — once in the ordered model with \(|\Omega|=52\cdot51\), once in the unordered model with \(|\Omega|=\binom{52}{2}\) — and both give \(\tfrac1{33}\). Agreement is a strong signal that the modelling was consistent.
The two mistakes that cost the most marks
Double counting. "At least one 6 on two dice" is not \(\tfrac16+\tfrac16\): the outcome \((6,6)\) is counted twice. Either subtract the overlap (inclusion–exclusion) or count the complement.
Uniformity on the wrong space. Using \(\P(A)=|A|/|\Omega|\) on an unordered \(\Omega\) when the mechanism acts position by position. The unordered outcomes are then not equally likely and the formula silently produces the wrong number. When in doubt, count in the ordered model — it is always defensible, and order-blind events can still be counted inside it.
The four urn models, assembled
Everything above combines into the table the script states as Lemma 1.36: an urn with \(n\in\N_{>0}\) distinct objects from which \(k\in\N_{>0}\) draws are made (for the two "without replacement" cells this needs \(k\le n\), otherwise the count is \(0\)). Full statement, proofs and applications are on the §1.2 page; here is the count with the reason attached. The roman numerals are the script's own, so that "urn model 1.36(ii)" on the other pages points at a definite cell.
| ordered | unordered | |
|---|---|---|
| with replacement | (i) \(n^k\) product rule, \(n\) options each time; \(\Omega=[n]^k\) |
(iv) \(\binom{n+k-1}{k}\) stars and bars; \(\Omega=\{(a_1,\dots,a_n)\in\N^n\mid\sum_{i=1}^{n}a_i=k\}\), \(a_i\) = how often object \(i\) is drawn. The script writes \(\N_0^n\) here and \(\N^n\) in Example 1.40(iii) — the same set, since \(0\in\N\) by Convention 1.1 |
| without replacement | (ii) \(\frac{n!}{(n-k)!}\) falling factorial; \(\Omega=\{\omega\in[n]^k\mid\omega_i\ne\omega_j\text{ for }i\ne j\}\) |
(iii) \(\binom{n}{k}\) divide the ordered count by \(k!\); \(\Omega=\{S\subseteq[n]\mid |S|=k\}\) |
Note the order in which the script lists them — (i), (ii), (iii), (iv) run down the first column and then back up the second, so Lemma 1.36(iii) is the unordered draw without replacement and 1.36(iv) the unordered draw with replacement. Mixing up (iii) and (iv) is the easiest way to quote the wrong count.
Worked problems from the sheets
Exactly one repeated digit in a 4-digit PIN Sheet 0 · Ex 3(iii)
Count PINs in which one digit appears exactly twice and the other two digits are distinct from each other and from the repeated one. Build such a PIN in four independent stages:
- the repeated digit \(d\): 10 ways;
- which two of the four positions carry \(d\): \(\binom42=\) 6 ways;
- the digit in the first remaining position, from \(\{0,\dots,9\}\setminus\{d\}\): 9 ways;
- the digit in the last remaining position, from the 8 still unused: 8 ways.
The subtlety: stages 3 and 4 fill two specific positions (the leftover ones, in left-to-right order), so each PIN is produced exactly once. Had you instead chosen an unordered pair of digits for those slots, you would have to divide by 2. Using \(9\cdot8\) already accounts for the order of the slots — so no correction is needed, and adding one is the classic error.
Derangements: nobody gets their own sheet back Sheet 2 · Ex 4
\(n\) students hand in sheets, and the sheets are handed back in random order. An outcome \(\omega\) is an arrangement \((\omega_1,\dots,\omega_n)\) of \(1,\dots,n\), where \(\omega_i\) is the sheet student \(i\) receives; so \(|\Omega|=n!\). Let \(A_i=\{\omega\mid\omega_i=i\}\) ("student \(i\) gets their own sheet"). The count uses inclusion–exclusion (above) plus one cancellation. Fixing \(k\) specified positions leaves \((n-k)!\) arrangements, so each \(k\)-fold intersection has probability \((n-k)!/n!\). There are \(\binom nk\) such intersections, and
\[ \binom nk\cdot\frac{(n-k)!}{n!}=\frac{n!}{k!\,(n-k)!}\cdot\frac{(n-k)!}{n!}=\frac1{k!}. \]So the whole inner sum of inclusion–exclusion collapses to the single number \(\tfrac1{k!}\). Hence \(\P(\text{someone gets their own sheet})=\sum_{k=1}^{n}\frac{(-1)^{k+1}}{k!}\), and \(\P(\text{nobody does})=1-\text{that}=\sum_{k=0}^{n}\frac{(-1)^k}{k!}\to e^{-1}\approx0.368\). Example \(n=3\): \(1-1+\tfrac12-\tfrac16=\tfrac13\); indeed, of the \(3!=6\) arrangements exactly two, \((2,3,1)\) and \((3,1,2)\), leave nobody with their own sheet. Full working on the §1.2 page.
Summary sheet
Formulas
- product rule
- \(n_1n_2\cdots n_k\), valid when each stage's number of options is fixed
- product sign
- \(\prod_{i=1}^na_i=a_1\cdots a_n\); empty product \(=1\); \(\prod(ca_i)=c^n\prod a_i\); \(\ln\prod a_i=\sum\ln a_i\)
- index shift
- \(m=n-1\): shift the bounds, replace \(n\) by \(m+1\); e.g. \(\sum_{n\ge1}\frac{\lambda^n}{(n-1)!}=\lambda\sum_{m\ge0}\frac{\lambda^m}{m!}\)
- permutations
- \(n!\) arrangements of \(n\) distinct objects; \(0!=1\)
- ordered, no repeats
- \(\dfrac{n!}{(n-k)!}=n(n-1)\cdots(n-k+1)\), exactly \(k\) factors
- subsets
- \(\dbinom nk=\dfrac{n!}{k!(n-k)!}\)
- symmetry
- \(\dbinom nk=\dbinom n{n-k}\)
- Pascal
- \(\dbinom nk=\dbinom{n-1}{k-1}+\dbinom{n-1}{k}\)
- binomial thm
- \((x+y)^n=\sum_k\dbinom nk x^ky^{n-k}\); at \(x=y=1\): \(\sum_k\dbinom nk=2^n\)
- stars and bars
- \(a_1+\cdots+a_n=k\), \(a_i\ge0\): \(\dbinom{n+k-1}{k}\)
- each bin ≥ 1
- substitute \(c_i=b_i-1\): \(\dbinom{k-1}{n-1}\)
- multinomial
- \(\dfrac{n!}{k_1!\cdots k_m!}\) arrangements with repeated types
- incl.–excl.
- \(|A\cup B|=|A|+|B|-|A\cap B|\); in general alternate signs over all overlaps
- complement
- \(\P(\text{at least one})=1-\P(\text{none})\)
How to choose the model
- Can the same object appear twice? Yes → with replacement. No → without.
- Does swapping two draws change the outcome as far as the question cares? Yes → ordered. No → unordered.
- Are the outcomes of that \(\Omega\) equally likely? If unsure, use the ordered model.
Exam focus
No exam task is purely combinatorial — see the note on the §1.2 page. What the exams do use is the binomial coefficient inside distributions (WiSe25 P5 with \(\Bin(n,p)\)) and inclusion–exclusion bookkeeping (WiSe25 P6c). Learn this page as vocabulary for those, not as a topic in its own right.
Self-test
Background · B4 · assumed by §1.3, §1.4 and §2.1
Measure and the Lebesgue integral
Maß und Lebesgue-Integral
Why this page exists My addition
The script says it twice, in so many words, that it will not do this:
- Remark 1.46: "Unfortunately, we do not have time to go into the measure theoretic details of integration (with respect to a measure)."
- Definition 2.1: the expectation [Erwartungswert] \(\E[X]\) of a random variable \(X\) — its long-run average value, §2.1 — "can be defined in a unified way … via \(\E[X]=\int_\R x\,\mathrm d\P_X(x)\) … where \(\mathrm d\P_X\) denotes integration with respect to the measure \(\P_X\) (which we have not seen rigorously here)."
Yet Definition 1.44 (pdf), Proposition 1.47, Theorem 1.48 (Radon–Nikodym) and Definition 2.1 are all written in that language. Your Analysis guide builds the Riemann integral; it never mentions measures. So this page gives you the missing layer — enough to read those definitions with understanding, not a full measure-theory course.
It also collects three working tools the later chapters use silently: arithmetic with \(+\infty\), the product σ-algebra, and double integrals over triangles, half-planes and discs.
How much of this is examinable?
Honestly: very little directly. The script replaces Definition 1.44 by the "simplified" Definition 1.45 — "we leave out the technicalities around (Lebesgue-)integrability" — and none of the three old exams asks you to construct an integral. What the exams do contain is a consequence of this page: SoSe26 P2a asks whether \(X_n\xrightarrow{d}X\) — convergence in distribution, §2.4 — together with the existence of all the expectations forces \(\E[X_n]\to\E[X]\), and the answer ("no") is exactly the failure of the dominated convergence theorem shown below.
Read this page to understand §1.3 and §2.1. In the exam you will compute with ordinary sums and \(\int\dots\mathrm dx\).
Four words from §1.1 that this page uses My addition
- A σ-algebra [σ-Algebra] \(\Aa\) on a set \(\Omega\) is a collection of subsets of \(\Omega\) (the "measurable sets") that contains \(\Omega\) and is closed under complements and countable unions (Definition 1.6). Example on \(\Omega=\{1,2,3,4\}\): \(\Aa=\bigl\{\emptyset,\{1,2\},\{3,4\},\Omega\bigr\}\).
- A measure [Maß] \(\mu\) on \((\Omega,\Aa)\) gives each \(A\in\Aa\) a size \(\mu(A)\in[0,\infty]\), with \(\mu(\emptyset)=0\) and \(\mu\bigl(\dot\bigcup_iA_i\bigr)=\sum_i\mu(A_i)\) for countably many disjoint sets (the dot on \(\dot\bigcup\) is a reminder that the \(A_i\) are pairwise disjoint, so nothing is counted twice) (Definition 1.17). \((\Omega,\Aa,\mu)\) is a measure space; if \(\mu(\Omega)=1\), \(\mu\) is a probability measure. Example: \(\mu(A)=\) number of elements of \(A\).
- The Borel σ-algebra \(\mathcal B\) on \(\R\) is the smallest σ-algebra containing all intervals (Example 1.13). Every set you will meet in practice is in it.
- Pointwise convergence: \(f_n\to f\) pointwise means \(f_n(x)\to f(x)\) for every single \(x\), as a sequence of numbers.
The big picture
In probability you need to "add up" a quantity over the outcomes, weighted by how likely they are. For a die that is a finite sum. For a waiting time it is an integral. For a mixture — "with probability \(\tfrac12\) the bus is exactly on time, otherwise it arrives uniformly in the next hour" — it is neither. Measure theory gives one notion of integral,
\[ \int_\Omega f\,\mathrm d\mu, \]that is a sum when \(\mu\) counts points, an ordinary integral when \(\mu\) measures length, and handles mixtures without special cases. That is why the script can write one formula \(\E[X]=\int x\,\mathrm d\P_X(x)\) and let the two cases of Definition 2.1 fall out of it.
In words: a measure tells you how much each region weighs; the integral \(\int f\,\mathrm d\mu\) is "the value of \(f\), averaged by that weight". Sums and ordinary integrals are the two special cases you already know.
Arithmetic with \(+\infty\): the half-line \([0,\infty]\)
The picture. A measure must be allowed to say "infinitely big": the length of the whole real line is not any real number. So measures take values in \([0,\infty]:=[0,\infty)\cup\{+\infty\}\), the non-negative numbers together with one extra symbol \(+\infty\) that is larger than every number. But \(+\infty\) is not a real number, so the rules for adding and multiplying it have to be agreed. The agreements below are the ones that make lengths, areas and sums behave sensibly.
The conventions My addition — the script uses them in Definition 1.17 and Proposition 1.19 without listing them
- Order: \(a\le\infty\) for every \(a\in[0,\infty]\).
- Adding: \(a+\infty=\infty+a=\infty\) for every \(a\in[0,\infty]\). Example: the real line is \((-\infty,0]\cup(0,\infty)\), and its length is \(\infty+\infty=\infty\).
- Multiplying by a positive number: \(c\cdot\infty=\infty\) for \(c>0\).
- \(0\cdot\infty:=0\) (measure-theory convention). Reason: a rectangle of height \(0\) and infinite width, e.g. \(\{0\}\times\R\) in the plane, should have area \(0\); and the integral of the zero function over \(\R\), which by Step 1 below is \(0\cdot\lambda(\R)=0\cdot\infty\), should be \(0\).
- \(\infty-\infty\) is undefined (and so is \(\infty/\infty\)). Reason: \((n+1)-n=1\) and \(n-n=0\), and in both cases the two numbers grow to \(\infty\). So "\(\infty-\infty\)" could be \(1\), \(0\), or anything else — no single value is consistent.
A sum of non-negative terms always has a value in \([0,\infty]\) My addition
Let \(a_0,a_1,a_2,\dots\ge0\). The partial sums \(s_N=a_0+\dots+a_N\) only grow (each step adds something \(\ge0\)). An increasing sequence either stays below some bound — then it converges to a real number (Analysis 2.2, monotone sequences) — or it exceeds every bound, and then it tends to \(+\infty\) (improper convergence). Either way \(\sum_na_n\) has a value in \([0,\infty]\), and reordering the terms does not change it (Analysis 3.3).
Examples. \(\sum_{n\ge1}2^{-n}=\tfrac12+\tfrac14+\dots=1\). \(\sum_{n\ge1}\tfrac1n=\infty\) (the harmonic series). \(\sum_{n\ge0}0=0\), even with infinitely many terms — this is how \(\lambda(\Q)=\sum_q0=0\) below works. Sheet 2 · Ex 1(v) uses the same fact the other way round: the set function defined on all subsets of \(\N\) by \(\mu(A)=0\) for finite \(A\) and \(\mu(A)=\infty\) for infinite \(A\) is not a measure, because \(\mu(\N)=\infty\) while \(\sum_{n\in\N}\mu(\{n\})=\sum_{n\in\N}0=0\) (worked on the §1.1 page).
Infinitely many copies of one number \(c\ge0\): the partial sums are \(Nc\). If \(c=0\) the sum is \(0\); if \(c>0\) (say \(c=0.001\)) the partial sums \(0.001N\) exceed every bound, so the sum is \(\infty\). So such a sum is \(0\) or \(+\infty\), never \(1\) — the key step of the Vitali argument (Theorem 1.28).
With signs it can fail: \(1-1+1-1+\dots\) has partial sums \(1,0,1,0,\dots\) and no value. That is why integrals of functions with both signs need the condition \(\int|f|<\infty\) (Step 3 below).
In words: with only non-negative numbers, adding can never go wrong — the result is a number or \(+\infty\). Subtracting infinities is forbidden, and \(0\cdot\infty\) counts as \(0\).
Where the course uses this: the codomain \([0,\infty]\) of a measure and the rule \(\mu(B\setminus A)=\mu(B)-\mu(A)\) for \(A\subseteq B\) with \(\mu(A)<\infty\) — the second condition is there to avoid \(\infty-\infty\), the first because otherwise the statement is simply false (take \(A\) and \(B\) disjoint: then \(B\setminus A=B\)) (Definition 1.17, Proposition 1.19(ii)); the "0 or \(+\infty\)" step in Theorem 1.28; and integrals with value \(+\infty\) in Step 2 below.
Why the Riemann integral is not enough
What you already have Analysis 8.1
The Riemann integral chops the horizontal axis into small intervals, approximates the area above each by a rectangle, and takes the limit as the intervals shrink. Analysis 8.1 — Definition →
It works beautifully for continuous functions. It fails for two reasons that matter in probability.
Failure 1: functions that jump everywhere My addition
Take the Dirichlet function on \([0,1]\): \(\one_\Q(x)=1\) if \(x\) is rational, 0 otherwise. Every interval, however small, contains both rationals and irrationals (\(\Q\) is dense — Analysis 1.2). So every Riemann upper sum is 1 and every lower sum is 0, forever. The Riemann integral does not exist.
Probability suggests an answer anyway. Pick \(x\) uniformly from \([0,1]\). The chance of hitting a rational is 0: there are only countably many rationals, and each single point has probability 0. So the "right" value of \(\int_0^1\one_\Q\) is \(0\). The Lebesgue integral gives exactly that.
Failure 2: limits leave the class My addition
List the rationals of \([0,1]\) as \(q_1,q_2,\dots\) (possible, they are countable) and let \(f_n=\one_{\{q_1,\dots,q_n\}}\). Each \(f_n\) is zero except at \(n\) points, so it is Riemann integrable with \(\int f_n=0\). The sequence increases pointwise to \(\one_\Q\) — which is not Riemann integrable at all.
So "the integral of the limit is the limit of the integrals" cannot even be stated in the Riemann world. Probability needs it constantly: the laws of large numbers, the central limit theorem and the consistency arguments of Chapter 3 all describe what happens to a random quantity as \(n\to\infty\), and their proofs keep moving a limit past an expectation — that is, past an integral.
Lebesgue's idea: slice the other way
Instead of chopping the horizontal axis, chop the vertical one. Ask: for each height \(t\), how much of the domain has \(f\ge t\)? Then add up those amounts over the heights. You no longer need \(f\) to be well-behaved from left to right — you only need to be able to measure the sets \(\{f\ge t\}\). That is what a measure is for, and it is why the sets you can measure (the σ-algebra) come first in §1.1.
Lebesgue's own analogy: to count a pile of coins, Riemann takes them in the order they lie; Lebesgue first sorts them by value, counts how many of each, and multiplies.
Lebesgue measure
Definition My addition — the script uses \(\lambda^n\) from Definition 1.44 on without defining it
The Lebesgue measure \(\lambda\) on \((\R,\mathcal B)\) is the unique measure (Definition 1.17) with
\[ \lambda\bigl((a,b]\bigr)=b-a\qquad\text{for all } a<b. \]In words: \(\lambda\) measures length. Example: \(\lambda\bigl((2,5]\bigr)=3\).
On \(\R^n\), \(\lambda^n\) is the unique measure giving every box its volume: \(\lambda^n\bigl(\prod_i(a_i,b_i]\bigr)=\prod_i(b_i-a_i)\). Here \(\prod_i(a_i,b_i]\) is the box \((a_1,b_1]\times\dots\times(a_n,b_n]\), and \(\prod_i(b_i-a_i)\) is the product of its side lengths. Example: \(\lambda^2\bigl((0,2]\times(0,3]\bigr)=2\cdot3=6\), the area of a \(2\times3\) rectangle.
Why it exists and is unique: the same machinery as Theorem 1.25, applied to the function \(F(x)=x\). That \(F\) is increasing and right-continuous but does not have limits 0 and 1, so the result is a measure of infinite total mass, \(\lambda(\R)=\infty\), rather than a probability measure. Restricted to \([0,1]\) it is a probability measure: the uniform distribution.
Three consequences worth doing by hand My addition
- Points have length 0. \(\{x\}=\bigcap_{k\ge1}(x-\tfrac1k,x]\), a decreasing family of finite measure, so by continuity from above \(\lambda(\{x\})=\lim_k\tfrac1k=0\).
- Countable sets have length 0. \(\Q=\dot\bigcup_{q\in\Q}\{q\}\) is a countable disjoint union, so σ-additivity gives \(\lambda(\Q)=\sum_q 0=0\). The same for any countable set.
- Open and closed intervals have the same length. \(\lambda([a,b])=\lambda((a,b])+\lambda(\{a\})=b-a\). This is why, for continuous distributions, \(\P(X\le x)=\P(X<x)\) and it never matters whether you write \(<\) or \(\le\).
Item 2 is the precise version of "the uniform point hits a rational with probability 0" from Failure 1 above.
Countable, not just "many". Remark 1.18 makes the point that σ-additivity is granted only for countably many disjoint sets, and that item 2 breaks down without that word: \([0,1]=\dot\bigcup_{x\in[0,1]}\{x\}\) is a disjoint union of singletons of length \(0\), yet \(\lambda([0,1])=1\). The union is uncountable (Theorem 1.28 lives in the same corner of the subject), so the rule simply does not apply to it. Whenever you argue "each piece has measure 0, so the whole has measure 0", check first that there are only countably many pieces.
The product σ-algebra
The picture. With two random quantities — a die and a coin, or two waiting times — the outcomes are pairs, and you want to talk about events like "the die shows 6 and the coin shows heads" or "\(X\le1\) and \(Y\le2\)". Such events are rectangles: a set of allowed first coordinates times a set of allowed second coordinates. But you also need events that are not rectangles, like "\(X=Y\)" or "\(X+Y\le z\)". The product σ-algebra takes the rectangles and adds everything that can be built from them with countably many unions and complements.
Definition My addition — Remark 1.65 names it without describing it
Reminder: for a collection \(\mathcal E\) of subsets of \(\Omega\), \(\sigma(\mathcal E)\) is the σ-algebra generated by \(\mathcal E\), the smallest σ-algebra containing every set of \(\mathcal E\) (Lemma 1.8).
For measurable spaces \((\Omega_1,\Aa_1)\) and \((\Omega_2,\Aa_2)\), a measurable rectangle (or box) is a set \(A_1\times A_2\) with \(A_1\in\Aa_1\), \(A_2\in\Aa_2\) (\(\times\) is the Cartesian product, B2). The product σ-algebra [Produkt-σ-Algebra] is
\[ \Aa_1\otimes\Aa_2:=\sigma\bigl(\{A_1\times A_2\mid A_1\in\Aa_1,\ A_2\in\Aa_2\}\bigr), \]the smallest σ-algebra on \(\Omega_1\times\Omega_2\) containing all measurable rectangles. For \(n\) factors, \(\bigotimes_{i=1}^n\Aa_i\) is generated by the boxes \(A_1\times\dots\times A_n\). (For infinitely many factors one uses boxes that restrict only finitely many coordinates, the "cylinder sets"; the course only needs finitely many.)
Two small examples My addition
1. All subsets. \(\Omega_1=\Omega_2=\{1,2\}\), both with the power set. Every single point is a rectangle, e.g. \(\{(1,2)\}=\{1\}\times\{2\}\). Every subset of \(\{1,2\}^2\) is a finite union of single points, so \(\Aa_1\otimes\Aa_2\) is the power set of \(\{1,2\}^2\): all \(2^4=16\) subsets.
But not every one of them is a rectangle. The diagonal \(\{(1,1),(2,2)\}\) ("both coordinates equal") is not of the form \(A\times B\): it would need \(1\in A\) (from \((1,1)\)) and \(2\in B\) (from \((2,2)\)), and then \((1,2)\in A\times B\) too, which is not in the diagonal. It is still in the product σ-algebra, as the union of the two rectangles \(\{1\}\times\{1\}\) and \(\{2\}\times\{2\}\). That is why the definition says "generated by" rectangles, not "consisting of" rectangles.
2. A coarse first factor. \(\Aa_1=\{\emptyset,\{1,2\}\}\) (you learn nothing about the first coordinate), \(\Aa_2=\pow(\{1,2\})\), where \(\pow(S)\) is the power set of \(S\), the collection of all its subsets — here \(\emptyset,\{1\},\{2\},\{1,2\}\). The rectangles are \(\emptyset\) and \(\{1,2\}\times B\), so \(\Aa_1\otimes\Aa_2=\bigl\{\emptyset,\ \{1,2\}\times\{1\},\ \{1,2\}\times\{2\},\ \{1,2\}^2\bigr\}\): only the 4 events that talk about the second coordinate alone.
For real coordinates: \(\mathcal B\otimes\mathcal B=\mathcal B^2\) Remark 1.65
\(\mathcal B^2\), the Borel σ-algebra of the plane, is generated by the open boxes \((a_1,b_1)\times(a_2,b_2)\) (Example 1.13). The script states that this equals \(\mathcal B\otimes\mathcal B\), and likewise \(\bigotimes_{i=1}^n\mathcal B=\mathcal B^n\).
Half of the reason (mine): every open box \((a_1,b_1)\times(a_2,b_2)\) is a rectangle of two Borel sets, so it lies in \(\mathcal B\otimes\mathcal B\). Since \(\mathcal B^2\) is the smallest σ-algebra containing those boxes, and \(\mathcal B\otimes\mathcal B\) is one σ-algebra containing them, \(\mathcal B^2\subseteq\mathcal B\otimes\mathcal B\). The other inclusion is where the work is: one has to see that \(A_1\times A_2\in\mathcal B^2\) for all Borel \(A_1,A_2\), not just intervals. The idea is to write \(A_1\times A_2=(A_1\times\R)\cap(\R\times A_2)\) and then check that \(\{A\subseteq\R\mid A\times\R\in\mathcal B^2\}\) is itself a σ-algebra which contains every open interval — so it contains all of \(\mathcal B\). Neither direction is used in this course; the script simply records the result.
The measure on top. The product measure \(\P_1\otimes\P_2\) is the unique measure on \(\Aa_1\otimes\Aa_2\) with \((\P_1\otimes\P_2)(A_1\times A_2)=\P_1(A_1)\,\P_2(A_2)\) on rectangles. The area \(\lambda^2\) of the previous section is \(\lambda\otimes\lambda\): area of a rectangle = width times height.
In words: the product σ-algebra is "everything you can build from rectangles". For real coordinates that is the same as "every Borel set of the plane", so every event about a random vector \((X,Y)\) you will meet can be measured.
Where the course uses this: Remark 1.65 (product spaces, joint distributions, the product measure behind independence) and every joint density \(p_{X,Y}\) on \(\R^2\).
Measurable functions
To integrate \(f\) we need to measure the sets \(\{f\ge t\}\), so they must lie in the σ-algebra.
Definition Script 1.50, specialised
\(f:(\Omega,\Aa)\to(\R,\mathcal B)\) is measurable if \(f^{-1}(B)\in\Aa\) for every \(B\in\mathcal B\). Here \(f^{-1}(B):=\{\omega\in\Omega\mid f(\omega)\in B\}\) is the pre-image [Urbild] of \(B\): the set of inputs that land in \(B\). In the abbreviation of Definition 1.50, \(\{f\le c\}:=f^{-1}\bigl((-\infty,c]\bigr)\).
By Sheet 3 Exercise 1 — "it is enough to check measurability on a generator of the target σ-algebra" — one only has to test the sets of some collection \(\mathcal E\) with \(\sigma(\mathcal E)=\mathcal B\). The half-lines \((-\infty,c]\) form such a collection, so
\[ f \text{ measurable}\iff \{f\le c\}\in\Aa\ \text{ for every } c\in\R . \]Why the half-lines generate \(\mathcal B\) (mine — the script defines \(\mathcal B\) by open intervals in Example 1.13): write \(\mathcal H\) for the collection of all \((-\infty,c]\). Each open interval is built from half-lines by countably many σ-algebra operations, \((a,b)=\bigcup_{k\ge1}\bigl((-\infty,b-\tfrac1k]\setminus(-\infty,a]\bigr)\), so every open interval lies in \(\sigma(\mathcal H)\) and therefore \(\mathcal B\subseteq\sigma(\mathcal H)\). Conversely each half-line is built from open intervals, \((-\infty,c]=\bigcap_{k\ge1}\bigcup_{n\ge1}(c-n,\,c+\tfrac1k)\), so \(\sigma(\mathcal H)\subseteq\mathcal B\). The two collections generate the same σ-algebra.
A random variable is exactly a measurable function on a probability space. Continuous functions, monotone functions, indicators of measurable sets, and sums, products and limits of measurable functions are all measurable — in practice, every function you will ever write down.
Building \(\int f\,\mathrm d\mu\) in three steps
The construction climbs from the simplest functions to general ones. Each step is forced by the one before.
Step 1 — simple functions My addition
A simple function takes finitely many values, each on a measurable set: \(s=\sum_{i=1}^{m}c_i\,\one_{A_i}\) with \(c_i\ge0\) and disjoint \(A_i\in\Aa\). There is only one sensible definition:
\[ \int s\,\mathrm d\mu := \sum_{i=1}^{m}c_i\,\mu(A_i). \]Example. On \(\R\) with \(\mu=\lambda\), let \(s=2\cdot\one_{[0,1]}+5\cdot\one_{(1,3]}\): height 2 over an interval of length 1, then height 5 over an interval of length 2. So \(\int s\,\mathrm d\lambda=2\cdot1+5\cdot2=12\), the total area of the two rectangles.
"Height times width, summed" — with width measured by \(\mu\). In particular \(\int\one_A\,\mathrm d\mu=\mu(A)\): the integral of an indicator is the measure of the set. In probability language, \(\E[\one_A]=\P(A)\).
Step 2 — non-negative functions My addition
For measurable \(f\ge0\), approximate from below by simple functions and take the best:
\[ \int f\,\mathrm d\mu := \sup\Bigl\{\int s\,\mathrm d\mu \;\Bigm|\; s \text{ simple},\ 0\le s\le f\Bigr\}\in[0,\infty]. \](\(\sup\) is the least upper bound — Analysis 1.2.) The value \(+\infty\) is allowed. A concrete approximating sequence is the staircase \(s_n=\min\bigl(n,\;2^{-n}\lfloor 2^n f\rfloor\bigr)\). Here \(\lfloor t\rfloor\) means "round \(t\) down to a whole number", so \(2^{-n}\lfloor 2^n f\rfloor\) rounds \(f\) down to the grid of step \(2^{-n}\). Example: at a point where \(f=0.7\), \(s_1=\tfrac12\lfloor1.4\rfloor=0.5\) and \(s_2=\tfrac14\lfloor2.8\rfloor=0.5\) and \(s_3=\tfrac18\lfloor5.6\rfloor=0.625\) — creeping up to 0.7. The staircase increases to \(f\), and it is exactly the Lebesgue slicing in the widget above.
Step 3 — general functions My addition
Split \(f\) into positive and negative parts, \(f^+=\max(f,0)\) and \(f^-=\max(-f,0)\), so that \(f=f^+-f^-\) and \(|f|=f^++f^-\). If \(\int|f|\,\mathrm d\mu<\infty\), call \(f\) \(\mu\)-integrable and define
\[ \int f\,\mathrm d\mu := \int f^+\,\mathrm d\mu-\int f^-\,\mathrm d\mu. \]Example. \(f(x)=x\) on \([-1,2]\) with \(\mu=\lambda\). Then \(f^+\) is \(x\) on \([0,2]\) (a triangle of area \(\tfrac12\cdot2\cdot2=2\)) and \(f^-\) is \(-x\) on \([-1,0]\) (area \(\tfrac12\)). So \(\int f\,\mathrm d\lambda=2-\tfrac12=\tfrac32\), the same as \(\bigl[\tfrac{x^2}2\bigr]_{-1}^{2}=2-\tfrac12\).
Why the condition \(\int|f|<\infty\): otherwise you might face \(\infty-\infty\). This is precisely the "provided \(\sum|x|p_X(x)<\infty\)" and "provided \(\int|x|p_X(x)\,\mathrm dx<\infty\)" in Definition 2.1, and the word "\(\mu\)-integrable" in Definition 1.44. It is the measure-theoretic twin of absolute convergence, and for the same reason: without it, the answer could depend on the order of summation.
A distribution with no mean My addition
The Cauchy distribution has density \(p(x)=\frac{1}{\pi(1+x^2)}\). Then \(\int_0^\infty x\,p(x)\,\mathrm dx=\frac1{2\pi}\bigl[\ln(1+x^2)\bigr]_0^\infty=\infty\), and the same on the negative side. So \(\int|x|p(x)\,\mathrm dx=\infty\): \(\E[X]\) does not exist, even though the density is symmetric about 0 and "the mean ought to be 0". Symmetry is not enough; integrability is the requirement. The script makes the same point in Remark 2.22(iii): "The mean \(\E[X]\) exists only if \(\E[|X|]<\infty\). For some distributions (e.g., Cauchy distribution), the mean is undefined." That is also why the Cauchy distribution is the standard counterexample to the law of large numbers on the §2.4 page: the law assumes a finite mean, and here there is none.
One integral, two familiar faces
The two special cases My addition
Counting measure. On a countable \(\Omega\) let \(\#(A):=|A|\), the number of elements. Then for \(f\ge0\)
\[ \int f\,\mathrm d\# = \sum_{\omega\in\Omega} f(\omega). \]Example: on \(\Omega=\{1,2,3\}\) with \(f(\omega)=\omega^2\), \(\int f\,\mathrm d\#=1+4+9=14\). Every point has weight 1, so the integral just adds the values.
Lebesgue measure. For a Riemann-integrable \(f\) on \([a,b]\), \(\int_{[a,b]}f\,\mathrm d\lambda=\int_a^bf(x)\,\mathrm dx\), the value you know from Analysis. The Lebesgue integral is a strict extension: everything Riemann-integrable is Lebesgue-integrable with the same value (Remark 1.46 says exactly this), and some more functions, like \(\one_\Q\), become integrable too.
Why the counting-measure integral is a sum
A simple function on a finite \(\Omega\) is \(s=\sum_\omega s(\omega)\one_{\{\omega\}}\), and Step 1 gives \(\int s\,\mathrm d\#=\sum_\omega s(\omega)\cdot\#(\{\omega\})=\sum_\omega s(\omega)\). For countable \(\Omega\), apply this to the truncations \(f\one_{\{\omega_1,\dots,\omega_n\}}\), which increase to \(f\), and use the monotone convergence theorem below: the integrals are the partial sums, and they increase to the series. ∎
The payoff: let \(\P_X\) be the distribution of \(X\) (the measure \(B\mapsto\P(X\in B)\)). The next-but-one section writes "\(\mathrm d\P_X=p_X\,\mathrm d\mu\)" for "\(p_X\) is a density of \(\P_X\) with respect to \(\mu\)", and shows that such a symbol may be substituted into any integral: \(\int f\,\mathrm d\P_X=\int f\,p_X\,\mathrm d\mu\). Put \(f(x)=x\):
\[ \E[X]=\int_\R x\,\mathrm d\P_X(x)= \begin{cases}\displaystyle\sum_{x\in\Omega} x\,p_X(x) & \text{if }\mathrm d\P_X=p_X\,\mathrm d\# \text{ on a countable }\Omega\subseteq\R\ \text{(}p_X\text{ a pmf)},\\[1.2em] \displaystyle\int_{-\infty}^{\infty}x\,p_X(x)\,\mathrm dx & \text{if }\mathrm d\P_X=p_X\,\mathrm d\lambda \ \text{(}p_X\text{ a pdf)}.\end{cases} \]The first line is the counting-measure case just proved, the second the Lebesgue case. So both lines of Definition 2.1 are one formula: a pmf is a density with respect to counting measure, a pdf is a density with respect to Lebesgue measure — which is what Remark 1.59 means by calling a pmf "the Radon–Nikodym derivative of \(\P_X\) with respect to the counting measure".
Null sets and "almost everywhere"
Definition My addition
A set \(N\in\Aa\) with \(\mu(N)=0\) is a null set [Nullmenge]. A property holds \(\mu\)-almost everywhere [fast überall] (a.e.) if the set of points where it fails is contained in a null set. For a probability measure one says almost surely [fast sicher] (a.s.) — the phrase behind "almost sure convergence" in §2.4 and the strong law of large numbers.
Example. "\(x\) is irrational" holds \(\lambda\)-almost everywhere on \(\R\): it fails exactly on \(\Q\), and \(\lambda(\Q)=0\) (above). "\(x^n\to0\)" holds \(\lambda\)-almost everywhere on \([0,1]\): it fails only at \(x=1\), one point, of length \(0\).
Integrals cannot see null sets My addition
If \(f=g\) \(\mu\)-a.e., then \(\int f\,\mathrm d\mu=\int g\,\mathrm d\mu\). In particular \(\int\one_\Q\,\mathrm d\lambda=\lambda(\Q)=0\).
Consequence for densities: a pdf is only determined up to null sets. Changing \(p\) at finitely many points — or on all of \(\Q\) — gives another valid density of the same distribution. So "the" density means "a" density, and questions like "is the pdf of \(\Unif(0,1)\) — the uniform distribution on \((0,1)\), the one with constant density there — equal to 1 at \(x=0\) or at \(x=1\)?" have no content. Exam solutions write \(p(x)=1\) for \(x\in[0,1]\) and do not worry about the endpoints; now you know why that is legitimate.
Densities and Radon–Nikodym
Densities, in measure language Script 1.44, 1.47
Given a measure \(\mu\) on \((\Omega,\Aa)\) and a measurable \(p:\Omega\to[0,\infty)\) with \(\int p\,\mathrm d\mu=1\), the formula
\[ \P(A):=\int_A p\,\mathrm d\mu=\int p\cdot\one_A\,\mathrm d\mu \]defines a probability measure. (\(\P(\emptyset)=0\) and \(\P(\Omega)=1\) are immediate; σ-additivity comes from applying the monotone convergence theorem below to the partial sums \(p\cdot\one_{A_1\cup\dots\cup A_n}\), which increase to \(p\cdot\one_{\dot\bigcup_iA_i}\).) We write \(\mathrm d\P=p\,\mathrm d\mu\) and call \(p\) a density of \(\P\) with respect to \(\mu\). Proposition 1.47 is exactly this with \(\mu=\lambda^n\); Lemma 1.35 is exactly this with \(\mu=\#\). (Those two are the script's statements; allowing an arbitrary measure \(\mu\) in place of \(\lambda^n\) and \(\#\) is my own extension of them, and it is the form Remark 1.59 refers to.)
The rule that makes the notation work My addition. The symbol \(\mathrm d\P=p\,\mathrm d\mu\) is meant to be substituted into any integral:
\[ \int f\,\mathrm d\P=\int f\cdot p\,\mathrm d\mu\qquad\text{for measurable } f\ge0 . \]Why: for \(f=\one_A\) both sides are \(\P(A)\), by the displayed definition of \(\P\). Both sides are additive in \(f\), so they agree for simple functions \(\sum_ic_i\one_{A_i}\) (Step 1 above). A general \(f\ge0\) is the increasing limit of simple functions, and the monotone convergence theorem below carries the equality across the limit on both sides. For signed \(f\), apply this to \(f^+\) and \(f^-\) and subtract, which is allowed once \(\int|f|\,\mathrm d\P<\infty\).
When does a density exist? Script 1.48
If \(\P\) has a density \(p\) with respect to \(\lambda^n\) and \(\lambda^n(A)=0\), then \(\P(A)=\int_A p\,\mathrm d\lambda^n=0\) — you cannot collect probability from a set of volume zero. So "\(\P\ll\lambda^n\)" (read: absolutely continuous, every \(\lambda^n\)-null set is a \(\P\)-null set) is necessary. The Radon–Nikodym theorem says it is also sufficient.
The general version and its one hypothesis. Remark 1.59 records that Theorem 1.48 is the special case \(\mu=\lambda^n\) of a statement about any measure space \((\Omega,\mathcal S,\mu)\) that is σ-finite [σ-endlich] — meaning \(\Omega\) can be written as a countable union of sets of finite \(\mu\)-measure. Then \(\P\) has a density with respect to \(\mu\) if and only if \(\P\ll\mu\). The two measures this page cares about pass the test: \(\R^n=\bigcup_{k\ge1}[-k,k]^n\) with \(\lambda^n([-k,k]^n)=(2k)^n<\infty\), and a countable \(\Omega=\bigcup_n\{\omega_n\}\) with \(\#(\{\omega_n\})=1<\infty\). Without σ-finiteness the theorem genuinely fails: take counting measure \(\#\) on the uncountable set \(\R\) — the only \(\#\)-null set is \(\emptyset\), so every \(\P\) satisfies \(\P\ll\#\), yet \(\Unif(0,1)\) has no density with respect to \(\#\), because a function \(p\ge0\) with \(\sum_{x\in A}p(x)=\P(A)\) would have to be \(0\) at every point and then give every set probability \(0\). (The counterexample is mine; the script states only that the general version assumes σ-finiteness.)
Remark 1.59 also gives the density a name: \(p\) is the Radon–Nikodym derivative [Radon–Nikodym-Ableitung] of \(\P\) with respect to \(\mu\), written \(p=\frac{\mathrm d\P}{\mathrm d\mu}\) — the same "\(\mathrm d\P=p\,\mathrm d\mu\)" as above, divided through. Worked on the §1.3 page.
Examples without a density:
- Any discrete distribution on \(\R\). \(\Ber(\tfrac12)\) — the Bernoulli distribution of a fair coin, coded as the two numbers \(0\) and \(1\) — has \(\P(\{0,1\})=1\) while \(\lambda(\{0,1\})=0\). It is not \(\ll\lambda\), so no pdf exists. (Its pmf is a density with respect to counting measure instead.) This is why "\(p_X\)" means a pmf in some sections and a pdf in others.
- Mixtures. "With probability \(\tfrac12\) on time, else uniform over the next hour", with the delay \(X\) measured in hours, has a jump of \(\tfrac12\) in its cdf at \(0\) and a continuous part on \((0,1)\). It is not \(\ll\lambda\) (the single point \(\{0\}\) carries probability \(\tfrac12\) but has length \(0\)), and it is not discrete either, so it has neither a pmf nor a pdf — but \(\E[X]=\tfrac12\cdot0+\tfrac12\cdot\tfrac12=\tfrac14\) of an hour is still perfectly defined by \(\int x\,\mathrm d\P_X\). (\(\tfrac12\) is the mean of \(\Unif(0,1)\), the second half of the mixture.) That is what the unified definition buys.
The three convergence theorems
These are the reason the Lebesgue integral was invented. Proofs are beyond this course; the statements, and knowing when each fails, are not.
Monotone convergence My addition
If \(f_1,f_2,\dots\) are measurable with \(0\le f_1\le f_2\le\cdots\) and \(f_n\to f\) pointwise, then \(\int f_n\,\mathrm d\mu\uparrow\int f\,\mathrm d\mu\). (The arrow \(\uparrow\) says the numbers \(\int f_n\,\mathrm d\mu\) increase and converge to \(\int f\,\mathrm d\mu\); both sides may be \(+\infty\).)
Example. \(f_n=\one_{[0,n]}\,e^{-x}\) on \([0,\infty)\) increases to \(f(x)=e^{-x}\). Indeed \(\int f_n\,\mathrm d\lambda=\int_0^ne^{-x}\,\mathrm dx=1-e^{-n}\), which increases to \(1=\int_0^\infty e^{-x}\,\mathrm dx\).
No integrability needed — only non-negativity and monotonicity. It is the integral version of continuity from below (put \(f_n=\one_{A_n}\)), and of monotone sequences converging.
Dominated convergence My addition
If \(f_1,f_2,\dots\) are measurable, \(f_n\to f\) pointwise, and there is one integrable \(g\) (that is, \(\int g\,\mathrm d\mu<\infty\) with \(g\ge0\)) such that \(|f_n|\le g\) for all \(n\), then \(f\) is integrable too and \(\int f_n\,\mathrm d\mu\to\int f\,\mathrm d\mu\).
Three things about the hypotheses. The bound \(g\) must be the same for every \(n\) — a separate finite bound for each \(f_n\) is worth nothing, as the widget below shows. It must be integrable, not merely finite-valued. And "pointwise" may be weakened to "at \(\mu\)-almost every point" on both the convergence and the bound, because null sets are invisible to the integral; the example just below uses exactly that.
Example. \(f_n(x)=x^n\) on \([0,1]\). For \(x<1\), \(x^n\to0\); only at the single point \(x=1\) the limit is 1. So \(f_n\to0\) almost everywhere (see null sets above). All \(f_n\) lie below \(g=\one_{[0,1]}\), whose integral is 1. The theorem gives \(\int f_n\to0\), and directly \(\int_0^1x^n\,\mathrm dx=\tfrac1{n+1}\to0\) ✓.
The dominating \(g\) is the analogue of the convergent majorant in Analysis 9.3, which lets you swap \(\sum\) and \(\int\). Same idea, same role.
This is exam task SoSe26 P2a SoSe26 · P2a
"If \(X_n\xrightarrow{d}X\) and all expectations exist, then \(\E[X_n]\to\E[X]\)." The official counterexample: \(U\sim\Unif(0,1)\), \(X_n:=n\,\one_{\{U\le1/n\}}\), \(X=0\). Then \(\E[X_n]=1\) for every \(n\) but \(\E[X]=0\).
That is exactly the rectangle above, seen as a random variable: \(\E[X_n]=\int f_n\,\mathrm d\lambda\). Why does dominated convergence not rescue it? Any \(g\) with \(g\ge f_n\) for all \(n\) must satisfy \(g(x)\ge\sup_n f_n(x)\). For \(0<x\le1\), \(f_n(x)=n\) exactly when \(n\le\tfrac1x\), so \(\sup_nf_n(x)=\lfloor\tfrac1x\rfloor\ge\tfrac1x-1\) (rounding down loses less than 1). Now \(\int_0^1\bigl(\tfrac1x-1\bigr)\mathrm dx=\bigl(\int_0^1\tfrac1x\,\mathrm dx\bigr)-1=\infty\), because \(\int_\varepsilon^1\tfrac1x\,\mathrm dx=-\ln\varepsilon\to\infty\) as \(\varepsilon\downarrow0\). Since \(g\) lies above that function, \(\int g\,\mathrm d\lambda=\infty\) as well. No integrable dominating function exists, and that is precisely the hypothesis that fails. The full solution is on the §2.4 page.
Fatou's lemma My addition
For \(f_n\ge0\): \(\int\liminf_n f_n\,\mathrm d\mu\le\liminf_n\int f_n\,\mathrm d\mu\). Here \(\liminf_n a_n\) of a sequence of numbers is the smallest value the sequence keeps coming back close to; for a convergent sequence it is just the limit. In the widget both sequences converge: the left side is \(\int0=0\), the right side is \(1\), and \(0\le1\). In words: mass can escape in the limit, but it can never appear from nowhere.
Iterated integrals: Fubini–Tonelli
Statement My addition
For \(f:\R^2\to\R\) measurable:
- Tonelli: if \(f\ge0\), then \(\displaystyle\int_{\R^2}f\,\mathrm d\lambda^2=\int\Bigl(\int f(x,y)\,\mathrm dy\Bigr)\mathrm dx =\int\Bigl(\int f(x,y)\,\mathrm dx\Bigr)\mathrm dy\) — all three may be \(+\infty\), but they agree.
- Fubini: the same holds for \(f\) of both signs, provided \(\int_{\R^2}|f|\,\mathrm d\lambda^2<\infty\).
How the two are used together. Fubini's hypothesis is itself a double integral, so you check it with Tonelli: \(|f|\ge0\), so \(\int|f|\,\mathrm d\lambda^2\) may be computed in whichever order is easier, with no hypothesis at all. If that number is finite, Fubini lets you swap the orders for \(f\) itself. This two-step habit — "Tonelli on \(|f|\) first, then Fubini on \(f\)" — is the whole practical content of the pair. For a density \(p_{X,Y}\ge0\) the first step is free: non-negative integrands go straight through Tonelli, which is why the sheets never mention the condition.
The fine print. Both statements need the two measures to be σ-finite [σ-endlich]: each factor space must be a countable union of sets of finite measure. That holds for everything in this course — \(\R=\bigcup_{n\ge1}[-n,n]\) with \(\lambda\), and a countable \(\Omega=\bigcup_n\{\omega_n\}\) with counting measure — so the condition never has to be checked here. It is the same finiteness proviso that the general Radon–Nikodym theorem needs (above).
Example. \(f(x,y)=xy\) on the rectangle \([0,1]\times[0,2]\). Inner integral over \(y\) first: \(\int_0^2xy\,\mathrm dy=x\bigl[\tfrac{y^2}2\bigr]_0^2=2x\), then \(\int_0^12x\,\mathrm dx=1\). Other order: \(\int_0^1xy\,\mathrm dx=\tfrac y2\), then \(\int_0^2\tfrac y2\,\mathrm dy=1\). Same answer, as Tonelli promises. (Your Analysis guide states the swap for continuous functions on a rectangle, as Satz 9.8: Analysis 9.2. Tonelli–Fubini is the version that also covers unbounded regions and integrands with jumps, which is what densities need.)
Where you meet it: Definition 1.44 writes \(\int_{\R^n}p(x)\,\mathrm dx\) as an iterated integral \(\int\cdots\int p\,\mathrm dx_1\cdots\mathrm dx_n\) — that equality is Fubini–Tonelli. Computing a marginal density \(p_X(x)=\int p_{X,Y}(x,y)\,\mathrm dy\) (Theorem 1.68), showing \(\E[XY]=\E[X]\E[Y]\) for independent variables, and exam task SoSe25 P1d (\(\P(X<tY)\) as a double integral) all rely on it.
The warning: without non-negativity or absolute integrability the two orders can give different answers. Same moral as Riemann's rearrangement theorem. The standard example (mine) is \(f(x,y)=\dfrac{x^2-y^2}{(x^2+y^2)^2}\) on \((0,1)^2\). Doing \(y\) first, one checks by differentiating that \(\dfrac{y}{x^2+y^2}\) is an antiderivative in \(y\), so \(\int_0^1f(x,y)\,\mathrm dy=\Bigl[\dfrac{y}{x^2+y^2}\Bigr]_0^1=\dfrac1{1+x^2}\) and then \(\int_0^1\dfrac{\mathrm dx}{1+x^2}=\bigl[\arctan x\bigr]_0^1=\dfrac\pi4\). Doing \(x\) first, \(f(y,x)=-f(x,y)\) turns the same computation into \(-\dfrac\pi4\). Both orders are perfectly finite, and they disagree — because \(\int_{(0,1)^2}|f|\,\mathrm d\lambda^2=\infty\), so neither theorem applies.
For regions that are not rectangles (triangles, discs, half-planes), see the next section.
Double integrals over non-rectangular regions
The picture. On a rectangle, the inner integral always runs between the same two numbers. On a triangle or a disc it does not: the slice at \(x=0.2\) is shorter or longer than the slice at \(x=0.8\). So the inner limits depend on the outer variable. The whole skill is to read those limits off a sketch of the region. Fubini–Tonelli (above) still says the two orders give the same answer, as long as \(f\ge0\) or \(\int|f|<\infty\).
The recipe My addition
- Sketch the region \(D\), including its boundary lines. (Formally, \(\iint_Df=\iint_{\R^2}f\cdot\one_D\): the indicator \(\one_D\) switches \(f\) off outside \(D\), and the limits just record where it is switched on.)
- Choose the outer variable, say \(x\). Find the smallest and largest \(x\) that occur in \(D\): these are the outer limits. They must be numbers (or \(\pm\infty\)).
- Fix one such \(x\) and look at the vertical line through it. Its piece inside \(D\) runs from a lower curve \(l(x)\) to an upper curve \(u(x)\): these are the inner limits, and they may contain \(x\).
- Write \(\displaystyle\int_{a}^{b}\Bigl(\int_{l(x)}^{u(x)}f(x,y)\,\mathrm dy\Bigr)\mathrm dx\). To swap the order, repeat steps 2–3 with \(y\) outside.
- Check with \(f=1\): the result must be the area of \(D\).
Example 1 — the triangle \(0\le x\le y\le1\), both orders My addition
\(D=\{(x,y)\mid 0\le x\le y\le1\}\) is the triangle above the diagonal \(y=x\) inside the unit square, with corners \((0,0)\), \((0,1)\), \((1,1)\). Integrate \(f(x,y)=x\).
\(x\) outside. \(x\) ranges over \([0,1]\). For fixed \(x\), the vertical line meets \(D\) where \(x\le y\le1\). So
\[ \int_0^1\Bigl(\int_x^1x\,\mathrm dy\Bigr)\mathrm dx=\int_0^1x(1-x)\,\mathrm dx=\Bigl[\tfrac{x^2}2-\tfrac{x^3}3\Bigr]_0^1=\tfrac12-\tfrac13=\tfrac16 . \](The inner integral: \(x\) does not depend on \(y\), so it is a constant, and a constant integrated over an interval of length \(1-x\) gives \(x(1-x)\).)
\(y\) outside. \(y\) ranges over \([0,1]\). For fixed \(y\), the horizontal line meets \(D\) where \(0\le x\le y\). So
\[ \int_0^1\Bigl(\int_0^yx\,\mathrm dx\Bigr)\mathrm dy=\int_0^1\tfrac{y^2}2\,\mathrm dy=\Bigl[\tfrac{y^3}6\Bigr]_0^1=\tfrac16\ ✓ \]Area check (\(f=1\)): \(\int_0^1\int_0^y1\,\mathrm dx\,\mathrm dy=\int_0^1y\,\mathrm dy=\tfrac12\), half of the unit square ✓.
The unbounded version \(0\le x\le y<\infty\) is Sheet 7 Ex 1 with \(f(x,y)=e^{-y}\). \(x\) outside: \(\int_0^\infty\int_x^\infty e^{-y}\,\mathrm dy\,\mathrm dx=\int_0^\infty e^{-x}\,\mathrm dx=1\). \(y\) outside: \(\int_0^\infty\int_0^ye^{-y}\,\mathrm dx\,\mathrm dy=\int_0^\infty ye^{-y}\,\mathrm dy=1\) (integration by parts). Same answer, and the second order directly gives the marginal density \(p_Y(y)=ye^{-y}\).
Example 2 — the half-plane \(x+y\le z\) (convolutions) My addition
For the distribution of a sum \(X+Y\) you need \(\P(X+Y\le z)=\iint_{A_z}p_{X,Y}\), where \(A_z=\{(x,y)\mid x+y\le z\}\) for a fixed number \(z\). The boundary is the line \(y=z-x\), and \(A_z\) is everything below it. With \(y\) outside: \(y\) ranges over all of \(\R\), and for fixed \(y\) the condition \(x+y\le z\) means \(x\le z-y\). So
\[ \P(X+Y\le z)=\int_{-\infty}^{\infty}\Bigl(\int_{-\infty}^{z-y}p_{X,Y}(x,y)\,\mathrm dx\Bigr)\mathrm dy , \]which is the first step of the convolution formula in Sheet 7 Ex 2.
With non-negative variables the region becomes a triangle. If \(X,Y\ge0\), the density is zero unless \(x\ge0\) and \(y\ge0\), so only the triangle \(x\ge0,\ y\ge0,\ x+y\le z\) counts (for \(z\ge0\)): \(y\) from \(0\) to \(z\), and for fixed \(y\), \(x\) from \(0\) to \(z-y\).
- Numbers: \(X,Y\) independent and uniform on \((0,1)\) (joint density \(1\) on the unit square), \(z=\tfrac12\): \(\P(X+Y\le\tfrac12)=\int_0^{1/2}\int_0^{1/2-y}1\,\mathrm dx\,\mathrm dy=\int_0^{1/2}\bigl(\tfrac12-y\bigr)\mathrm dy=\tfrac14-\tfrac18=\tfrac18\). Check: a right triangle with both legs \(\tfrac12\) has area \(\tfrac12\cdot\tfrac12\cdot\tfrac12=\tfrac18\) ✓.
- Exponentials: \(X,Y\) independent \(\Exp(1)\), joint density \(e^{-x}e^{-y}\): \(\P(X+Y\le z)=\int_0^z\bigl(\int_0^{z-y}e^{-x}\,\mathrm dx\bigr)e^{-y}\,\mathrm dy=\int_0^z\bigl(1-e^{-(z-y)}\bigr)e^{-y}\,\mathrm dy =\int_0^z\bigl(e^{-y}-e^{-z}\bigr)\mathrm dy=1-e^{-z}-ze^{-z}\). Differentiating in \(z\) gives the density \(ze^{-z}\), the \(\Gamma(2,1)\) density found on the §2.3 page.
Example 3 — the unit disc, and why polar coordinates help My addition
\(D=\{(x,y)\mid x^2+y^2\le1\}\). In \(x\) and \(y\): \(x\) ranges over \([-1,1]\); for fixed \(x\), \(y^2\le1-x^2\) means \(-\sqrt{1-x^2}\le y\le\sqrt{1-x^2}\). The area is \(\int_{-1}^1 2\sqrt{1-x^2}\,\mathrm dx\) — correct, but awkward to integrate.
In polar coordinates \(x=r\cos\theta\), \(y=r\sin\theta\) (\(r\) = distance from the origin, \(\theta\) = angle), the disc is simply the rectangle \(0\le r\le1\), \(0\le\theta<2\pi\), and \(\mathrm dx\,\mathrm dy\) becomes \(r\,\mathrm dr\,\mathrm d\theta\) (the Jacobian factor \(r\), explained on B5). So
\[ \text{area}=\int_0^{2\pi}\!\!\int_0^1r\,\mathrm dr\,\mathrm d\theta=2\pi\cdot\tfrac12=\pi,\qquad \iint_D(x^2+y^2)\,\mathrm dx\,\mathrm dy=\int_0^{2\pi}\!\!\int_0^1r^2\cdot r\,\mathrm dr\,\mathrm d\theta=2\pi\cdot\tfrac14=\tfrac\pi2 . \]A probability. \((X,Y)\) uniform on the disc has density \(\tfrac1\pi\) on \(D\). Then \(\P(X^2+Y^2\le\tfrac14)=\int_0^{2\pi}\int_0^{1/2}\tfrac1\pi\,r\,\mathrm dr\,\mathrm d\theta=\tfrac1\pi\cdot2\pi\cdot\tfrac18=\tfrac14\): the inner disc of radius \(\tfrac12\) has a quarter of the area ✓. That uniform distribution on the disc is the setting of Sheet 8 Ex 3, which asks for the marginal densities, the means and variances, and \(\Cov[X,Y]\) — the covariance integral there is set up in exactly these polar coordinates.
The two classic mistakes
A variable in the outer limits. \(\int_0^y\int_0^1\dots\mathrm dy\,\mathrm dx\) makes no sense: after the inner integral over \(y\) is done, no \(y\) is left for the outer limit. Only inner limits may depend on the outer variable.
Swapping the limits along with the order. \(\int_0^1\int_0^y f\,\mathrm dx\,\mathrm dy\) is not \(\int_0^1\int_0^x f\,\mathrm dy\,\mathrm dx\). Redraw the region and read the limits again: it is \(\int_0^1\int_x^1 f\,\mathrm dy\,\mathrm dx\) (Example 1).
In words: outer limits are numbers describing how far the region reaches; inner limits are the ends of one slice and may move with the outer variable. Swapping the order means re-slicing the same picture the other way.
Where the course uses this: Sheet 7 Ex 1 (wedge), Sheet 7 Ex 2 (\(x+y\le z\)), Sheet 8 Ex 3 (disc), and exam task SoSe25 P1d (\(\P(X<tY)\): with \(y\) outside, the slice at height \(y\) is \(0\le x<ty\), i.e. the part of the first quadrant to the left of the line \(x=ty\); worked on the §1.4 page).
Dictionary: probability ↔ measure
| Probability says | Measure theory says |
|---|---|
| probability space \((\Omega,\Aa,\P)\) | measure space with total mass 1 |
| event | measurable set |
| random variable | measurable function |
| distribution \(\P_X\) | push-forward measure \(\P\circ X^{-1}\), i.e. \(B\mapsto\P\bigl(X^{-1}(B)\bigr)\) |
| \(\E[X]\) | \(\int X\,\mathrm d\P=\int x\,\mathrm d\P_X(x)\) |
| \(\P(A)=\E[\one_A]\) | \(\mu(A)=\int\one_A\,\mathrm d\mu\) |
| pmf | density w.r.t. counting measure |
| density w.r.t. Lebesgue measure | |
| "has a pdf" | \(\P_X\ll\lambda\) (Radon–Nikodym) |
| almost surely | almost everywhere |
| \(\E[X]\) exists | \(X\in L^1\), i.e. \(\int|X|\,\mathrm d\P<\infty\) |
Summary sheet
The five things to remember
- One integral for everything: \(\int f\,\mathrm d\mu\) is a sum for counting measure and an ordinary integral for Lebesgue measure. \(\E[X]=\int x\,\mathrm d\P_X\) covers both.
- Built from indicators: \(\int\one_A\,\mathrm d\mu=\mu(A)\), extended by linearity, then by approximation from below.
- Integrable means \(\int|f|<\infty\) — the "provided" clauses of Definition 2.1.
- Null sets are invisible: countable sets have Lebesgue measure 0; densities are unique only a.e.
- Limits and integrals commute only with a reason: monotonicity (MCT) or an integrable dominating function (DCT). Otherwise mass can escape — SoSe26 P2a.
Tools added for §1.4, §2.1 and §2.3
- \([0,\infty]\)
- \(a+\infty=\infty\); \(c\cdot\infty=\infty\) for \(c>0\); \(0\cdot\infty=0\); \(\infty-\infty\) undefined; sums of non-negative terms always have a value
- product σ-algebra
- \(\Aa_1\otimes\Aa_2=\sigma(\text{rectangles }A_1\times A_2)\); \(\mathcal B\otimes\mathcal B=\mathcal B^2\)
- regions
- outer limits are numbers, inner limits may depend on the outer variable; triangle \(0\le x\le y\le1\): \(\int_0^1\int_x^1\dots\mathrm dy\,\mathrm dx=\int_0^1\int_0^y\dots\mathrm dx\,\mathrm dy\); disc: polar, \(r\,\mathrm dr\,\mathrm d\theta\)
Exam focus
You will never be asked to construct an integral. You may be asked — and have been — to see that \(\E[X_n]\) need not converge to \(\E[\lim X_n]\). Keep the example \(n\one_{[0,1/n]}\) ready.
Self-test
Background · B5 · assumed by §2.1, §2.3 and (for "dimension") §3.1
Linear algebra and the change of variables in \(\R^n\)
Lineare Algebra und Transformationssatz
Why this page exists My addition
The script uses matrices from Definition 2.9 (covariance matrix) onwards and relies on them heavily in §2.3: Proposition 2.51 needs the determinant of a Jacobian matrix, Lemma 2.53 needs \(\Sigma^{-1}\), \(|\Sigma|\), positive definiteness, block matrices and a matrix identity for the conditional distribution, and Sheet 7 Ex 5 needs the Cholesky decomposition. None of this is taught in the script. Your Analysis guide already covers vectors, the transpose, quadratic forms, eigenvalues and definiteness — this page links to it for those and builds the rest: products, inverses, determinants, rank, linear independence and dimension, matrix square roots, block matrices, and the change-of-variables formula for integrals in several variables (which the Analysis course does not contain), including why the Jacobian of the inverse map is the inverse of the Jacobian.
Matrices and their product
A matrix [Matrix] \(A\in\R^{m\times n}\) is a table of real numbers with \(m\) rows and \(n\) columns. \(A_{ij}\) is the entry in row \(i\), column \(j\). Example: for \(A=\begin{pmatrix}1&2&3\\4&5&6\end{pmatrix}\in\R^{2\times3}\), \(A_{12}=2\) and \(A_{21}=4\). A column vector \(x\in\R^n\) is an \(n\times1\) matrix: \(n\) numbers stacked in a column.
The matrix product
For \(A\in\R^{m\times k}\) and \(B\in\R^{k\times n}\) (the inner sizes must agree), \(AB\in\R^{m\times n}\) has entries
\[ (AB)_{ij}=\sum_{l=1}^kA_{il}B_{lj}\qquad\text{("row }i\text{ of }A\text{ times column }j\text{ of }B\text{")}. \]Example. \(\begin{pmatrix}1&2\\0&1\end{pmatrix}\begin{pmatrix}3&0\\1&2\end{pmatrix} =\begin{pmatrix}1\cdot3+2\cdot1&1\cdot0+2\cdot2\\0\cdot3+1\cdot1&0\cdot0+1\cdot2\end{pmatrix}=\begin{pmatrix}5&4\\1&2\end{pmatrix}\). In the other order: \(\begin{pmatrix}3&0\\1&2\end{pmatrix}\begin{pmatrix}1&2\\0&1\end{pmatrix}=\begin{pmatrix}3&6\\1&4\end{pmatrix}\). So \(AB\ne BA\) in general — the order of factors matters. The product is associative (\((AB)C=A(BC)\)) and distributive, like numbers.
Matrix times vector is the special case \(n=1\): \((Ax)_i=\sum_jA_{ij}x_j\). Equivalently \(Ax\) is the combination \(x_1\cdot(\text{column }1)+\dots+x_k\cdot(\text{column }k)\). The map \(x\mapsto Ax\) is linear: \(A(ax+by)=aAx+bAy\). In probability, \(AX+b\) for a random vector \(X\) is the general "linear transformation plus shift" (Example 2.52, Lemma 2.53).
Transpose, inner and outer products
Rules for the transpose
\(A^\top\) mirrors \(A\) along its diagonal: \((A^\top)_{ij}=A_{ji}\); an \(m\times n\) matrix becomes \(n\times m\) (Analysis: transpose).
- \((A^\top)^\top=A\), \((A+B)^\top=A^\top+B^\top\).
- \((AB)^\top=B^\top A^\top\) — the order reverses. Proof: \(((AB)^\top)_{ij}=(AB)_{ji}=\sum_lA_{jl}B_{li}=\sum_l(B^\top)_{il}(A^\top)_{lj}=(B^\top A^\top)_{ij}\).
- Inner product \(x^\top y=\sum_ix_iy_i\) (a \(1\times1\) matrix, i.e. a number). Example: \(x=(1,2)^\top\), \(y=(3,4)^\top\) give \(x^\top y=1\cdot3+2\cdot4=11\). Also \(x^\top x=\|x\|^2\), where \(\|x\|=\sqrt{x_1^2+\dots+x_n^2}\) is the length of \(x\).
- Outer product \(xy^\top\) is the matrix with entries \(x_iy_j\) (used in the covariance matrix \(\E[(X-\mu)(X-\mu)^\top]\), Definition 2.9).
- Quadratic form \(x^\top Ax=\sum_{i,j}x_iA_{ij}x_j\), a number. For \(A=\begin{pmatrix}a&b\\b&c\end{pmatrix}\) and \(x=(x_1,x_2)^\top\) this multiplies out to \(ax_1^2+2bx_1x_2+cx_2^2\) — the two off-diagonal terms \(bx_1x_2\) and \(bx_2x_1\) are equal, which is where the \(2\) comes from (Analysis). Example: \(a=2\), \(b=1\), \(c=2\), \(x=(1,-1)^\top\) give \(2-2+2=2\).
A square matrix is symmetric if \(A^\top=A\), e.g. \(\begin{pmatrix}2&1\\1&2\end{pmatrix}\). The covariance matrix of a random vector \(X=(X_1,\dots,X_d)\) has entry \(\Cov[X_i,X_j]\) (the covariance of \(X_i\) and \(X_j\), §2.1, Definition 2.9) in row \(i\), column \(j\). It is symmetric because \(\Cov[X_i,X_j]=\Cov[X_j,X_i]\).
Identity and inverse
Inverse matrix
The diagonal of a square matrix is the entries \(A_{11},A_{22},\dots\) from top left to bottom right. The identity \(I=I_n\) has 1 on the diagonal, 0 elsewhere, e.g. \(I_2=\begin{pmatrix}1&0\\0&1\end{pmatrix}\); \(AI=IA=A\). A square \(A\) is invertible [invertierbar] if some \(A^{-1}\) satisfies \(AA^{-1}=A^{-1}A=I\). Then \(Ax=b\) has the unique solution \(x=A^{-1}b\), and the map \(x\mapsto Ax\) is a bijection of \(\R^n\).
\(2\times2\): \(\begin{pmatrix}a&b\\c&d\end{pmatrix}^{-1}=\frac{1}{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}\) when \(ad-bc\ne0\) — swap the diagonal, negate the off-diagonal, divide by the determinant. Check by multiplying: \(\begin{pmatrix}a&b\\c&d\end{pmatrix}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}=\begin{pmatrix}ad-bc&0\\0&ad-bc\end{pmatrix}\). Example: \(\begin{pmatrix}2&1\\1&2\end{pmatrix}^{-1}=\frac13\begin{pmatrix}2&-1\\-1&2\end{pmatrix}\), since \(ad-bc=4-1=3\). Check the top-left entry of the product: \(\tfrac13(2\cdot2+1\cdot(-1))=1\) ✓.
Rules: \((AB)^{-1}=B^{-1}A^{-1}\) (order reverses again: \(AB\,B^{-1}A^{-1}=AIA^{-1}=I\)); \((A^\top)^{-1}=(A^{-1})^\top\); the inverse of a symmetric matrix is symmetric; a diagonal matrix (all entries off the diagonal are 0) is inverted entry by entry, e.g. \(\begin{pmatrix}2&0\\0&5\end{pmatrix}^{-1}=\begin{pmatrix}1/2&0\\0&1/5\end{pmatrix}\).
Determinants
The idea. The linear map \(x\mapsto Ax\) turns the unit square (or cube) into a parallelogram (or parallelepiped). The determinant [Determinante] \(\det A\) is its area (volume), with a sign that records whether orientation was flipped. So \(|\det A|\) is the factor by which \(A\) scales areas and volumes — which is exactly why it appears in the change-of-variables formula for densities.
Determinant: formulas and rules
- \(2\times2\): \(\det\begin{pmatrix}a&b\\c&d\end{pmatrix}=ad-bc\).
- \(3\times3\) (Sarrus): \(\det A=a_{11}a_{22}a_{33}+a_{12}a_{23}a_{31}+a_{13}a_{21}a_{32}-a_{13}a_{22}a_{31}-a_{11}a_{23}a_{32}-a_{12}a_{21}a_{33}\).
- Triangular or diagonal matrices: the product of the diagonal entries. (A matrix is lower triangular if all entries above the diagonal are 0, upper triangular if all entries below it are 0.)
- \(\det(AB)=\det A\cdot\det B\); \(\det A^\top=\det A\); \(\det(A^{-1})=1/\det A\); \(\det(cA)=c^n\det A\) for \(A\in\R^{n\times n}\).
- \(A\) is invertible \(\iff\det A\ne0\) (a map that squashes area to 0 cannot be undone).
- Block-diagonal: \(\det\begin{pmatrix}A&0\\0&D\end{pmatrix}=\det A\cdot\det D\) (more generally the same for block-triangular matrices).
Examples. \(\det\begin{pmatrix}2&1\\1&2\end{pmatrix}=2\cdot2-1\cdot1=3\): the map triples areas. \(\det\begin{pmatrix}2&0\\0&3\end{pmatrix}=6\): stretch by 2 in one direction and by 3 in the other, so areas grow by 6. \(\det\begin{pmatrix}1&2\\2&4\end{pmatrix}=4-4=0\): the second column is twice the first, the square is squashed onto a line, and the matrix is not invertible. \(3\times3\) triangular: \(\det\begin{pmatrix}1&0&0\\5&2&0\\7&8&3\end{pmatrix}=1\cdot2\cdot3=6\).
The script writes \(|\Sigma|\) for \(\det\Sigma\) in Lemma 2.53. For a covariance matrix this is \(\ge0\) (see the next section), so no absolute value is lost.
Linear independence, rank and dimension
The picture. Think of vectors as directions you can walk in. A list of vectors is linearly independent if none of them is redundant: none can be reached by walking along the others. The rank of a matrix counts how many genuinely different directions its rows contain, and the dimension of a space counts how many numbers you need to describe a point in it.
Definitions My addition — the script uses these words without defining them, and the §2.3 page defers their definitions to here
A linear combination [Linearkombination] of vectors \(v_1,\dots,v_k\in\R^d\) is \(a_1v_1+\dots+a_kv_k\) with numbers \(a_1,\dots,a_k\). Example: \((1,1)=1\cdot(1,0)+1\cdot(0,1)\).
\(v_1,\dots,v_k\) are linearly independent [linear unabhängig] if \(a_1v_1+\dots+a_kv_k=0\) is only possible with \(a_1=\dots=a_k=0\). Equivalently: none of them is a linear combination of the others. Otherwise they are linearly dependent.
- \((1,2)\) and \((3,4)\): from \(a(1,2)+b(3,4)=(0,0)\) we get \(a+3b=0\) and \(2a+4b=0\). The first gives \(a=-3b\); putting that into the second gives \(-6b+4b=-2b=0\), so \(b=0\) and then \(a=0\). Independent.
- \((1,2)\) and \((2,4)\): \(2\cdot(1,2)-1\cdot(2,4)=(0,0)\) with coefficients not both zero. Dependent — the second is twice the first.
The rank [Rang] of a matrix \(C\) is the largest number of linearly independent rows. (It is a theorem of linear algebra, stated here without proof, that the same number is obtained with columns.) A \(k\times d\) matrix has full row rank if its rank is \(k\), i.e. all its rows are independent. Examples: \(\begin{pmatrix}1&0&1\\0&1&1\end{pmatrix}\) has rank 2 (full row rank); \(\begin{pmatrix}1&2\\2&4\end{pmatrix}\) has rank 1.
Square matrices: for \(A\in\R^{n\times n}\), "rank \(n\)" \(\iff\) "\(\det A\ne0\)" \(\iff\) "\(A\) invertible" (determinants, inverse). The example \(\begin{pmatrix}1&2\\2&4\end{pmatrix}\) had determinant \(0\) above, matching rank \(1<2\).
Basis, dimension, "infinite-dimensional" My addition
A basis [Basis] of \(\R^d\) is an independent list from which every vector can be built as a linear combination. The standard basis of \(\R^2\) is \((1,0),(0,1)\): \((x,y)=x(1,0)+y(0,1)\). Every basis of \(\R^d\) has exactly \(d\) vectors; this number is the dimension [Dimension]. So a point of a \(k\)-dimensional parameter set \(\Theta\subseteq\R^k\) is described by \(k\) numbers, e.g. \(\theta=(\mu,\sigma^2)\) for the normal family (\(k=2\)).
Infinite-dimensional means: no finite list of numbers suffices. Example: the space of all continuous functions on \([0,1]\). Linear combinations make sense there too, so the words above apply unchanged, and for every \(n\) the functions \(1,x,x^2,\dots,x^n\) are linearly independent — a polynomial that is zero at every \(x\in[0,1]\) must have all coefficients zero (compare Analysis 12, linear independence of functions). So there are independent lists of every length \(n+1\), and no basis of finite size can exist.
The same is true of the family of all continuous probability densities on \([0,1]\): from the independent polynomials above one gets, for small \(\varepsilon>0\), the genuinely different densities \(p(x)=1+\varepsilon\bigl(x^k-\tfrac1{k+1}\bigr)\), \(k=1,2,3,\dots\) — each is \(\ge0\) and integrates to \(1\), and no finite list of parameters covers them all. (That family is not a vector space, since densities must stay non-negative and integrate to 1, so "dimension" is used here in the informal sense "how many numbers do I need"; that is exactly the sense in which Definition 3.4 calls a model with infinite-dimensional \(\Theta\) non-parametric.)
Extending rows to an invertible matrix My addition — used in the proof of Lemma 2.53(vi)
Fact (basis extension [Basisergänzung], stated): any linearly independent list in \(\R^d\) can be extended to a basis of \(\R^d\). For matrices: if \(C\in\R^{k\times d}\) has full row rank, you can add \(d-k\) further rows \(D\) so that the square matrix \(M=\begin{pmatrix}C\\D\end{pmatrix}\) has independent rows, i.e. is invertible.
Example. \(C=(1\ \ 1)\), one row in \(\R^2\). Add the row \((0\ \ 1)\): \(M=\begin{pmatrix}1&1\\0&1\end{pmatrix}\), \(\det M=1\cdot1-1\cdot0=1\ne0\), so \(M\) is invertible. (Adding \((2\ \ 2)\) instead would fail: \(\det=0\).)
Why §2.3 wants this. To show that \(CZ\) is Gaussian for a Gaussian vector \(Z\), the guide's proof on the §2.3 page transforms the whole vector by the invertible \(M\) (where the density formula for bijections applies) and then keeps only the first \(k\) coordinates, which are \(CZ\). If \(C\) does not have full row rank, \(CZ\) lies on a lower-dimensional flat piece of \(\R^k\) and has no density. The official solution of Sheet 8 · Ex 5(ii) handles that case in one aside — "in case \(A\) is not injective, we use the pseudo-inverse \(A^\dagger\), the inverse of \(A|_{\ker^\perp}\)". Unpacked: the kernel [Kern] of \(A\) is the set of \(x\) with \(Ax=0\), the directions \(A\) destroys; \(\ker^\perp\) is the set of directions perpendicular to all of those; and the pseudo-inverse [Pseudoinverse] is the substitute for \(A^{-1}\) obtained by inverting \(A\) on that smaller set only. This guide avoids both by extending rows instead, and neither is needed for the exam.
In words: rows are independent when none is a combination of the others; a full set of independent rows makes a square matrix invertible, and a few independent rows can always be topped up to such a full set.
Symmetric, positive (semi-)definite
Definiteness — and why every covariance matrix qualifies
A symmetric \(\Sigma\in\R^{d\times d}\) is positive semi-definite [positiv semidefinit] (\(\Sigma\succeq0\)) if \(u^\top\Sigma u\ge0\) for all \(u\in\R^d\), and positive definite [positiv definit] (\(\Sigma\succ0\)) if \(u^\top\Sigma u>0\) for all \(u\ne0\).
An eigenvalue [Eigenwert] of a square matrix \(A\) is a number \(\lambda\) with \(Au=\lambda u\) for some vector \(u\ne0\), its eigenvector: \(A\) only stretches \(u\) by the factor \(\lambda\). Example: \(\begin{pmatrix}2&1\\1&2\end{pmatrix}\begin{pmatrix}1\\1\end{pmatrix} =\begin{pmatrix}3\\3\end{pmatrix}=3\begin{pmatrix}1\\1\end{pmatrix}\), so 3 is an eigenvalue. A symmetric matrix is positive (semi-)definite exactly when all its eigenvalues are \(>0\) (resp. \(\ge0\)) (Analysis: definiteness). For \(2\times2\): \(\begin{pmatrix}a&b\\b&c\end{pmatrix}\succ0\iff a>0\text{ and }ac-b^2>0\).
Example and non-example. \(\Sigma=\begin{pmatrix}2&1\\1&2\end{pmatrix}\): \(a=2>0\) and \(ac-b^2=3>0\), so \(\Sigma\succ0\). With \(u=(1,-1)^\top\): \(u^\top\Sigma u=2-1-1+2=2>0\) ✓. But \(M=\begin{pmatrix}1&2\\2&1\end{pmatrix}\) has \(ac-b^2=1-4<0\); indeed \(u=(1,-1)^\top\) gives \(u^\top Mu=1-2-2+1=-2<0\). So \(M\) cannot be a covariance matrix.
Every covariance matrix is positive semi-definite (my proof — the script states it in Lemma 2.53). Write \(\Cov[X]\) for the matrix with entry \(\Cov[X_i,X_j]\) in row \(i\), column \(j\). For a fixed \(u\in\R^d\), \(u^\top X=\sum_iu_iX_i\) is an ordinary real random variable, and
\[ u^\top\Cov[X]\,u=\sum_{i,j}u_iu_j\Cov[X_i,X_j]=\Var\Bigl[\sum_iu_iX_i\Bigr]\ge0 . \]The middle step is the definition of a quadratic form (above). The second equality is Proposition 2.12(vi), \(\Var[\sum_ia_iX_i]=\sum_ia_i^2\Var[X_i]+2\sum_{i<j}a_ia_j\Cov[X_i,X_j]\): the sum \(\sum_{i,j}\) splits into the \(d\) diagonal terms \(u_i^2\Cov[X_i,X_i]=u_i^2\Var[X_i]\) (Proposition 2.12(ii)) and the off-diagonal ones, which pair up as \(u_iu_j\Cov[X_i,X_j]+u_ju_i\Cov[X_j,X_i] =2u_iu_j\Cov[X_i,X_j]\) by the symmetry \(\Cov[X_i,X_j]=\Cov[X_j,X_i]\) (Proposition 2.12(i)). The final "\(\ge0\)" is Proposition 2.8(i): a variance [Varianz] is never negative. (\(\Var\) is the variance, §2.1.)
And \(u^\top\Cov[X]u=0\) for some \(u\ne0\) means \(\sum u_iX_i\) is almost surely constant (Proposition 2.8(i)): one component is an exact linear function of the others. That is the "degenerate" case the script excludes by assuming \(\Sigma\succ0\).
Eigen-decomposition and matrix square roots
Spectral theorem (stated, not proved here)
A symmetric \(\Sigma\) can be written \(\Sigma=U\Lambda U^\top\). Here \(\Lambda=\operatorname{diag}(\lambda_1,\dots,\lambda_d)\) is the diagonal matrix with the eigenvalues on its diagonal, and \(U\) is an orthogonal matrix (\(U^\top U=I\), i.e. \(U^{-1}=U^\top\)) whose columns are unit eigenvectors that are perpendicular to each other. Consequences, if \(\Sigma\succ0\):
- \(\Sigma^{-1}=U\Lambda^{-1}U^\top\) (invert each \(\lambda_i\));
- \(\det\Sigma=\lambda_1\cdots\lambda_d\) (by the product rule and \(\det U\det U^\top=\det I=1\));
- a square root \(\Sigma^{1/2}:=U\Lambda^{1/2}U^\top\) with \(\Sigma^{1/2}\Sigma^{1/2}=\Sigma\).
Example. \(\Sigma=\begin{pmatrix}2&1\\1&2\end{pmatrix}\): eigenvalues 3 and 1 with unit eigenvectors \(\frac1{\sqrt2}(1,1)\) and \(\frac1{\sqrt2}(1,-1)\); \(\det\Sigma=3\cdot1=3=2\cdot2-1\cdot1\) ✓. The square root works out to \(\Sigma^{1/2}=\tfrac12\begin{pmatrix}\sqrt3+1&\sqrt3-1\\\sqrt3-1&\sqrt3+1\end{pmatrix}\); squaring it, the top-left entry is \(\tfrac14\bigl((\sqrt3+1)^2+(\sqrt3-1)^2\bigr)=\tfrac14\cdot8=2\) ✓. Geometrically: the level sets \(\{x:x^\top\Sigma^{-1}x=1\}\) are ellipses with axes along the eigenvectors and half-lengths \(\sqrt{\lambda_i}\) — these are the contour lines of a Gaussian density (§2.3). Check on the example: \(x=\sqrt3\cdot\tfrac1{\sqrt2}(1,1)^\top\) is an eigenvector direction with \(\Sigma^{-1}x=\tfrac13x\), so \(x^\top\Sigma^{-1}x=\tfrac13\|x\|^2=\tfrac13\cdot3=1\) ✓.
In words: a symmetric matrix does nothing more complicated than stretching space along \(d\) perpendicular directions. \(U\) names those directions, \(\Lambda\) lists the stretch factors. Once you see it that way, inverting, taking determinants and taking square roots all reduce to doing the same thing to the \(d\) numbers \(\lambda_1,\dots,\lambda_d\).
Cholesky decomposition
Every \(\Sigma\succ0\) is \(\Sigma=LL^\top\) for a unique lower triangular \(L\) with positive diagonal. For \(2\times2\), solve entry by entry:
\[ \begin{pmatrix}a&b\\b&c\end{pmatrix}=\begin{pmatrix}l_{11}&0\\l_{21}&l_{22}\end{pmatrix}\begin{pmatrix}l_{11}&l_{21}\\0&l_{22}\end{pmatrix} =\begin{pmatrix}l_{11}^2&l_{11}l_{21}\\l_{11}l_{21}&l_{21}^2+l_{22}^2\end{pmatrix} \ \Rightarrow\ l_{11}=\sqrt a,\ l_{21}=\frac b{\sqrt a},\ l_{22}=\sqrt{c-\frac{b^2}a}. \]Example Sheet 7 · Ex 5 — its \(\Sigma\) is exactly this one: \(\Sigma=\begin{pmatrix}2&1\\1&2\end{pmatrix}\) gives \(L=\begin{pmatrix}\sqrt2&0\\1/\sqrt2&\sqrt{3/2}\end{pmatrix}\): \(l_{11}=\sqrt2\), \(l_{21}=1/\sqrt2\), \(l_{22}=\sqrt{2-\tfrac12}=\sqrt{3/2}\). Check the bottom-right entry of \(LL^\top\): \(\tfrac12+\tfrac32=2\) ✓.
Why it matters: let \(W=(W_1,W_2)\) have iid entries (independent, identically distributed), each standard normal \(\mathcal N(0,1)\). Then \(\Cov[W]=I\): the diagonal entries are \(\Var[W_i]=1\) and the off-diagonal ones are \(\Cov[W_1,W_2]=0\), because independent variables have zero covariance (Proposition 2.12(v)). Shifting and multiplying by a matrix transforms the covariance by \(\Cov[AW+\mu]=A\,\Cov[W]\,A^\top\) (the matrix form of Proposition 2.12, and the covariance appearing in Lemma 2.53(ii)), so \(\mu+LW\) has covariance \(L\,I\,L^\top=LL^\top=\Sigma\). This is how computers sample correlated Gaussians, and it is the point of the hint in Sheet 7 · Ex 5(ii).
Block matrices and the Schur complement
Computing with blocks
Cut a matrix into rectangular blocks, e.g. \(\Sigma=\begin{pmatrix}\Sigma_{XX}&\Sigma_{XY}\\\Sigma_{YX}&\Sigma_{YY}\end{pmatrix}\) for a vector \(Z=(X,Y)\). Blocks multiply like numbers, as long as you keep the order: \(\begin{pmatrix}A&B\\C&D\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}Ax+By\\Cx+Dy\end{pmatrix}\). For a covariance matrix, \(\Sigma_{YX}=\Sigma_{XY}^\top\).
Block-diagonal matrices are inverted block by block: \(\begin{pmatrix}A&0\\0&D\end{pmatrix}^{-1}=\begin{pmatrix}A^{-1}&0\\0&D^{-1}\end{pmatrix}\). Hence for \(\Sigma_{XY}=0\) the quadratic form splits: \(z^\top\Sigma^{-1}z=x^\top\Sigma_{XX}^{-1}x+y^\top\Sigma_{YY}^{-1}y\), and together with the block determinant rule a Gaussian density factorises — Lemma 2.53(i).
Schur complement. For \(M=\begin{pmatrix}A&B\\C&D\end{pmatrix}\) with \(D\) invertible, \(S:=A-BD^{-1}C\) is the Schur complement of \(D\). Then \(\det M=\det D\cdot\det S\), and \(M\) is invertible iff \(S\) is. The scalar case is a sanity check: \(a-\frac{bc}d\) times \(d\) is \(ad-bc\). In Lemma 2.53(iv) the conditional covariance \(\Sigma_{X|y}=\Sigma_{XX}-\Sigma_{XY}\Sigma_{YY}^{-1}\Sigma_{XY}^\top\) is exactly the Schur complement of \(\Sigma_{YY}\) in \(\Sigma\) (here \(C=\Sigma_{XY}^\top\), so \(BD^{-1}C=\Sigma_{XY}\Sigma_{YY}^{-1}\Sigma_{XY}^\top\)).
In words: cutting a matrix into blocks lets you treat whole groups of coordinates as single objects, and the usual rules survive as long as you never swap two factors. The Schur complement is what is left of the \(X\)-block after the part of \(X\) that \(Y\) already explains has been removed — which is why it turns up as the covariance of \(X\) once \(Y\) is known.
Change of variables for integrals in \(\R^n\)
One dimension first (Analysis: substitution). For a continuously differentiable \(g\) and a continuous \(f\): \(\int_{g(a)}^{g(b)}f(y)\,\mathrm dy=\int_a^bf(g(x))\,g'(x)\,\mathrm dx\). If \(g\) is in addition a bijection of an open set \(U\) onto \(g(U)\) — so that no point of \(g(U)\) is hit twice and the limits cannot run backwards — the same statement can be written over sets, with no orientation to keep track of: \(\int_{g(U)}f(y)\,\mathrm dy=\int_Uf(g(x))\,|g'(x)|\,\mathrm dx\). The factor \(|g'(x)|\) is how much \(g\) stretches a tiny interval near \(x\).
Example: \(g(x)=2x+1\) maps \(U=(0,1)\) onto \((1,3)\) and doubles every length, \(g'(x)=2\). With \(f(y)=y\): left side \(\int_1^3y\,\mathrm dy=\tfrac{9-1}2=4\); right side \(\int_0^1(2x+1)\cdot2\,\mathrm dx=2\cdot(1+1)=4\) ✓.
Transformation theorem [Transformationssatz] (stated; the proof is Analysis 2 material)
Let \(U\subseteq\R^n\) be open and \(g:U\to g(U)\) a bijection, continuously differentiable with continuously differentiable inverse. Let \(J_g(x)\) be its Jacobian matrix, \((J_g)_{ij}=\frac{\partial g_i}{\partial x_j}\) (Analysis: Jacobian). Then for every measurable \(f\ge0\) (both sides may be \(+\infty\)) and for every integrable \(f\) of either sign,
\[ \int_{g(U)}f(y)\,\mathrm dy=\int_Uf\bigl(g(x)\bigr)\,\bigl|\det J_g(x)\bigr|\,\mathrm dx . \]Why \(|\det J|\): near \(x\), \(g\) acts like the linear map \(J_g(x)\) (that is what the derivative means), and a linear map scales volumes by \(|\det|\) (the widget above). A tiny box of volume \(\mathrm dx\) around \(x\) is sent to a tiny parallelepiped of volume \(|\det J_g(x)|\,\mathrm dx\).
Polar coordinates and the Gaussian integral
\(g(r,\theta)=(r\cos\theta,r\sin\theta)\) on \(U=(0,\infty)\times(0,2\pi)\). Jacobian \(\begin{pmatrix}\cos\theta&-r\sin\theta\\\sin\theta&r\cos\theta\end{pmatrix}\), determinant \(r\cos^2\theta+r\sin^2\theta=r\). So \(\mathrm dx\,\mathrm dy=r\,\mathrm dr\,\mathrm d\theta\) — the factor used in Sheet 8 Ex 3 and 4. (Worked integrals over a disc, and how to read off limits for other regions, are on B4.)
Application. With \(I=\int_\R e^{-x^2/2}\,\mathrm dx\), Tonelli — the integrand is non-negative, so no integrability has to be checked first (B4) — gives \(I^2=\iint e^{-(x^2+y^2)/2}\,\mathrm dx\,\mathrm dy=\int_0^{2\pi}\!\!\int_0^\infty e^{-r^2/2}\,r\,\mathrm dr\,\mathrm d\theta =2\pi\bigl[-e^{-r^2/2}\bigr]_0^\infty=2\pi\), so \(I=\sqrt{2\pi}\): the normalising constant of the normal density (also on §1.3). (Taking \(\theta\) in the open interval \((0,2\pi)\) and \(r>0\) is what makes \(g\) a bijection. The price is that the image \(g(U)\) is the plane with the non-negative \(x\)-axis \(\{(x,0)\mid x\ge0\}\) removed — a line, of area \(0\) — and leaving out a set of measure \(0\) does not change an integral (B4, null sets).)
Linear maps. For \(g(x)=Ax+b\) with invertible \(A\), every partial derivative \(\partial g_i/\partial x_j\) is just \(A_{ij}\), so \(J_g=A\) at every point — the constant \(b\) differentiates away. With \(U=\R^n\), so that \(g(U)=\R^n\) as well, the formula reads \(\int_{\R^n} f(y)\,\mathrm dy=|\det A|\int_{\R^n} f(Ax+b)\,\mathrm dx\). This is behind Example 2.52(ii). With numbers: \(A=\begin{pmatrix}2&0\\0&3\end{pmatrix}\), \(b=0\) maps the unit square \((0,1)^2\) onto the rectangle \((0,2)\times(0,3)\). Taking \(f=1\): area \(6\) on the left, \(|\det A|\cdot1=6\) on the right ✓.
From integrals to densities My addition — the bridge to Proposition 2.51
Why the formula matters for probability: if \(X\) has density \(p_X\) and \(Y=g(X)\) for a bijection \(g\) as above, then \(Y\) has density
\[ p_Y(y)=p_X\bigl(g^{-1}(y)\bigr)\,\bigl|\det J_{g^{-1}}(y)\bigr| . \]Here \(g^{-1}\) is the inverse function (it undoes \(g\)). The factor corrects for stretching: where \(g\) spreads probability over a larger region, the density must get lower.
Example. \(X\sim\Unif(0,1)\) (uniform on \((0,1)\)), so \(p_X=1\) on \((0,1)\). Let \(Y=2X+1\). Then \(g^{-1}(y)=\tfrac{y-1}2\), whose derivative is \(\tfrac12\). So \(p_Y(y)=1\cdot\tfrac12=\tfrac12\) on \((1,3)\): the uniform distribution on \((1,3)\). Check: total area \(\tfrac12\cdot2=1\) ✓. The full statement and exam uses are on the §2.3 page.
The Jacobian of the inverse is the inverse of the Jacobian My addition — Proposition 2.51 uses it without proof
The picture. If \(g\) stretches a tiny neighbourhood of \(x\) by a factor 3, then \(g^{-1}\), which undoes \(g\), must shrink the neighbourhood of \(y=g(x)\) by the factor \(\tfrac13\). So you never need to differentiate \(g^{-1}\) directly: invert the derivative of \(g\) instead.
One dimension. \(g(g^{-1}(y))=y\) for all \(y\). Differentiate both sides with respect to \(y\); the chain rule (Analysis 6.3) on the left gives \(g'\bigl(g^{-1}(y)\bigr)\cdot(g^{-1})'(y)=1\), hence
\[ (g^{-1})'(y)=\frac{1}{g'\bigl(g^{-1}(y)\bigr)} . \]Example: \(g(x)=x^3\) on \((0,\infty)\), so \(g^{-1}(y)=y^{1/3}\). At \(y=8\): directly, \((g^{-1})'(8)=\tfrac13\cdot8^{-2/3}=\tfrac13\cdot\tfrac14=\tfrac1{12}\). Via the formula: \(g^{-1}(8)=2\) and \(g'(2)=3\cdot2^2=12\), so \(\tfrac1{12}\) ✓.
Several dimensions. The multivariate chain rule (stated) says that the Jacobian of a composition is the product of the Jacobians: \(J_{f\circ h}(y)=J_f\bigl(h(y)\bigr)\,J_h(y)\). Apply it to \(g\circ g^{-1}=\text{id}\), whose Jacobian is the identity matrix \(I\):
\[ J_g\bigl(g^{-1}(y)\bigr)\,J_{g^{-1}}(y)=I\quad\Longrightarrow\quad J_{g^{-1}}(y)=\bigl[J_g\bigl(g^{-1}(y)\bigr)\bigr]^{-1}, \]using the definition of the inverse matrix (above). Taking determinants with \(\det(A^{-1})=1/\det A\): \(\;|\det J_{g^{-1}}(y)|=1/|\det J_g(x)|\) at \(x=g^{-1}(y)\).
Examples. Linear: \(g(x)=Ax+b\) has \(g^{-1}(y)=A^{-1}(y-b)\), so \(J_{g^{-1}}=A^{-1}=(J_g)^{-1}\) ✓. Polar: \(g(r,\theta)=(r\cos\theta,r\sin\theta)\) has \(\det J_g=r\), so the inverse map \((x,y)\mapsto(r,\theta)\) has \(|\det J_{g^{-1}}(x,y)|=\tfrac1r=\tfrac1{\sqrt{x^2+y^2}}\); at the point \((0,2)\) that is \(\tfrac12\).
In words: the local stretch factor of the inverse map is one over the stretch factor of the map. That is why Proposition 2.51 can be written either with \(|\det J_{g^{-1}}(y)|\) or with \(1/|\det J_g(x)|\) (§2.3); the second is usually easier to compute. (Analysis: the Jacobian matrix.)
Summary sheet
- product
- \((AB)_{ij}=\sum_lA_{il}B_{lj}\); \(AB\ne BA\) in general
- transpose
- \((AB)^\top=B^\top A^\top\)
- inverse
- \((AB)^{-1}=B^{-1}A^{-1}\); \(2\times2\): swap, negate, divide by \(ad-bc\)
- determinant
- area/volume factor; \(\det(AB)=\det A\det B\); blocks multiply
- rank
- number of independent rows; square \(A\): rank \(n\iff\det A\ne0\iff\) invertible; full-row-rank rows extend to an invertible matrix
- dimension
- size of a basis; "infinite-dimensional" = no finite list of numbers describes the set
- definite
- \(u^\top\Sigma u>0\) for \(u\ne0\); covariance matrices are \(\succeq0\)
- Cholesky
- \(\Sigma=LL^\top\); \(\mu+LW\) has covariance \(\Sigma\)
- Schur
- \(A-BD^{-1}C\); \(\det M=\det D\det S\)
- change of var.
- \(\int_{g(U)}f=\int_Uf\circ g\,|\det J_g|\); polar: \(r\,\mathrm dr\,\mathrm d\theta\)
- inverse map
- \(J_{g^{-1}}(y)=[J_g(g^{-1}(y))]^{-1}\), so \(|\det J_{g^{-1}}(y)|=1/|\det J_g(x)|\) at \(x=g^{-1}(y)\)
Self-test
Chapter 0 · plus the Chapter 1 motivation
What is probability?
Was ist Wahrscheinlichkeit?
What this page covers Script pp. 1–10
This page has two parts. The first is Chapter 0 of the script (Remark 0.1 to Viewpoint 0.10, pages 1–4). The second is the unnumbered motivation section at the start of Chapter 1 (pages 5–10, from "The finite world" to "Not all subsets are created equal").
The motivation section has no number and contains no definitions or theorems. It explains why the machinery of §1.1 has to exist. Putting it next to Chapter 0 is the only rearrangement on this page. Everything else follows the script's order.
Also here: Exercise sheet 0, tasks 1 and 6. The other tasks of Sheet 0 (2, 3, 4, 5) are urn and counting problems. They are worked on the §1.2 page, where the counting tools are.
The big picture: what this chapter is for
The script opens with the question "What is probability?" and admits that people have argued about it for centuries. The course's answer is practical: it builds the mathematical machinery to talk about probability precisely and to compute with it. Script p. 1
Now and then the script steps outside the mathematics. These passages are marked "philosophical interludes" or "(practical) excursions". Most of Chapter 0 is one such interlude. At its core, though, the script says this is a theoretical course that teaches concepts.
This page proves no theorems. That sounds like a reason to skip it. It is not, and here is why.
You already have intuitions about probability. You know a fair coin gives heads "half the time." You know a lottery ticket is a bad bet. Chapter 0 uses six small puzzles to show that these intuitions disagree with each other as soon as a situation is slightly unusual. The motivation section then shows that intuition gives no answer at all once there are infinitely many possible outcomes.
So the course needs a small set of rules. The rules must be so precise that, once a problem is written in them, the answer is forced and two careful people cannot disagree. These rules are Kolmogorov's axioms. They arrive in §1.1. Every distribution, inequality and statistical test in this course is built on them.
In words: Chapter 0 is the sales pitch for the definitions in Chapter 1. Its message is "your intuition is not a reliable instrument, so we are going to build one."
Primer: the notation used on this page My addition
Cross-references Analysis guide
Countability, Cantor's diagonal argument and the number systems are in your Analysis guide, Ch. 1.1; the integral as area is Analysis 8.1. Set algebra beyond this primer is on background page B2.
The script assumes you are comfortable with the language of sets from Discrete Structures [Diskrete Strukturen]. Here is every symbol this page uses, with a one-line meaning. The script's own, longer refresher is Appendix A.1.
Sets and the symbols for them
- A set is a collection of distinct things, written inside curly braces: \(\{1,2,3\}\) is the set containing the three numbers 1, 2 and 3. The things inside are its elements.
- \(x \in A\) reads "\(x\) is an element of \(A\)"; \(x \notin A\) reads "\(x\) is not an element of \(A\)".
- \(A \subseteq B\) reads "\(A\) is a subset of \(B\)": every element of \(A\) is also an element of \(B\). Equality is allowed, so \(A \subseteq A\) is true.
- \(\emptyset\) is the empty set, the set with no elements at all.
- \(|A|\) is the number of elements of \(A\), also called its cardinality [Kardinalität]. For example \(|\{1,2,3\}| = 3\).
- \(\pow(A)\) is the power set [Potenzmenge] of \(A\): the set whose elements are all
the subsets of \(A\). For \(A = \{1,2\}\) we get \(\pow(A) = \{\emptyset, \{1\}, \{2\}, \{1,2\}\}\) —
four elements. In general a set with \(n\) elements has \(2^n\) subsets, which is why the power set is
also written \(2^A\).
My addition — a reading trap. The script writes the power set with a curly capital P, \(\pow(\Omega)\), and the probability measure with a hollow capital P, \(\P\). In print these are two different shapes of the same letter P, and it is easy to read one as the other. Tell them apart by what comes out: \(\pow(\;)\) takes a set and gives back a collection of sets, \(\P(\;)\) takes a set and gives back a number in \([0,1]\). This guide uses the same two shapes as the script. - \(A \cup B\) is the union (everything in \(A\) or in \(B\) or both); \(A \cap B\) is the intersection (everything in both); \(A^c\) is the complement of \(A\) inside whatever big set is under discussion (everything not in \(A\)).
- \(A \setminus B\) ("\(A\) minus \(B\)") is the set difference: the elements of \(A\) that are not in \(B\). Example: \(\{0,1,2,3\} \setminus \{0\} = \{1,2,3\}\).
- Two sets are disjoint if they have no element in common, that is \(A \cap B = \emptyset\).
- \(\{x \in A \mid \text{condition}\}\) is set-builder notation: "all \(x\) in \(A\) for which the condition holds". Example: \(\{k \in \{1,\dots,6\} \mid k \text{ is even}\} = \{2,4,6\}\).
Numbers and functions
- \(\N = \{0,1,2,\dots\}\), the natural numbers. The script counts 0 as a natural number (this is fixed in Convention 1.1) — not every textbook does, so watch for it. \(\Z\) are the integers \(\{\dots,-1,0,1,\dots\}\), \(\Q\) the fractions, \(\R\) all real numbers (the full number line, including \(\sqrt2\) and \(\pi\)).
- \(f : A \to B\) means "\(f\) is a rule that takes each element of \(A\) and returns one element of \(B\)". \(A\) is the domain, \(B\) the codomain. Writing \(x \mapsto x^2\) after it says what the rule does to a typical input.
- \([0,1]\) is the set of all real numbers from 0 to 1 including both ends; \((0,1)\) excludes both ends; \([0,1)\) includes 0 but not 1.
- \(\sum_{i \in A} f(i)\) means "add up \(f(i)\) for every \(i\) in the set \(A\)". If \(A=\{1,2,3\}\) and \(f(i)=i^2\), this is \(1+4+9=14\).
- \(\sum_{k=1}^{\infty} a_k\) is an infinite sum (a series [Reihe]). It means: add the first \(n\) terms, then let \(n\) grow without end. If these partial sums settle down to a fixed number, the series converges [konvergiert] to that number. If they grow without bound, it diverges [divergiert]. Example: \(\tfrac12+\tfrac14+\tfrac18+\dots\) converges to \(1\), while \(1+1+1+\dots\) diverges.
- \(\int_a^b f(x)\,\mathrm{d}x\) is the integral of \(f\) from \(a\) to \(b\): the signed area between the curve \(y=f(x)\) and the horizontal axis, between \(x=a\) and \(x=b\). You need no more than the "area under the curve" picture on this page (Analysis 8.1).
Countable and uncountable
A set is countably infinite [abzählbar unendlich] if you can list its elements in an infinite sequence \(a_1, a_2, a_3, \dots\) so that every element appears exactly once — that is, if you can pair its elements up one-for-one with \(\N\). The natural numbers, the integers and even the fractions \(\Q\) are countably infinite. "At most countable" [höchstens abzählbar] means finite or countably infinite.
A set is uncountable [überabzählbar] if no such list exists. The real interval \([0,1]\) is uncountable — Cantor proved in 1891 that any proposed list of its numbers must miss one (the diagonal argument, with a widget, is in Analysis 1.1). This distinction is not decoration: it is exactly the line at which the naive definition of probability breaks, as the motivation section below shows.
Where the subject came from
Remark 0.1 — historical developments Script 0.1
Gambling is thousands of years old, but modern probability is usually dated to a 1654 letter from the French aristocrat and gambler Chevalier de Méré to Blaise Pascal. The question was the problem of points: if a repeated game of chance has to be abandoned before it ends, how should the pot be divided fairly, given the current score? Pascal discussed it with Pierre de Fermat, and the correspondence produced several of the ideas the subject still uses. In that same year Pascal reportedly had a religious vision and largely gave up scientific work.
Two later milestones: Pierre-Simon Laplace's Théorie Analytique des Probabilités (1812), which unified the field and introduced Bayes' theorem independently of Bayes; and the axiomatisation by Andrey Kolmogorov in 1933, which is the one this course builds on. The script adds the anecdote that Napoleon asked Laplace why God did not appear in his book, and Laplace answered: "I had no need of that hypothesis."
Remark 0.2 — why this course is called "discrete" Script 0.2
Friedrich L. Bauer started TUM's first degree programme in Informationsverarbeitung in 1967. For decades computer science was treated as inherently discrete, which produced core modules such as "Discrete Structures" and "Discrete Probability Theory". Randomised algorithms, machine learning and AI have since made continuous probability just as important for computer scientists. The content of this course has been adapted; the name has not.
Why this matters for you: despite the title, roughly half of this course is continuous (densities, Gaussians, the central limit theorem, t-tests). Do not expect the exam to stay discrete.
Six puzzles that break intuition
The script poses these puzzles as Examples 0.3 to 0.8. For 0.3 to 0.7 it deliberately prints no resolution — they are discussion material for the lecture. (Example 0.8 is the exception: there the script does say where each of the five sequences came from, and those origins are reproduced below.) Below, each puzzle is first retold from the script. Then I give a resolution, marked "my addition", because a puzzle you never see resolved teaches nothing.
Example 0.3 — Will they wake up? Script 0.3
A patient is in a coma after surgery. A relative asks the doctor for "the probability that they will wake up." The doctor refuses: every case is different, we must wait. The relative presses: out of a hundred similar patients, how many would you expect to wake? Still no number. Finally: "If you had to bet, would you bet they'll wake up?" — "Yes." — "Would you lose two dollars if wrong and gain one if right?" — "What a sick thought, this is not a game."
What the example is doing My reading
The relative tries three different meanings of probability in a row. The doctor accepts none of them:
- Probability as a property of this single case. The doctor rejects it: this case happens once and will not be repeated.
- Probability as a long-run frequency: "out of a hundred similar patients, how many wake up?" The doctor rejects it: no two patients are similar enough to be counted together.
- Probability as a betting rate: "would you risk 2 dollars to win 1?" The doctor is willing to bet but refuses to name odds.
The third attempt is the sharp one. Accepting "lose 2 if wrong, win 1 if right" is only a good deal if you believe waking up is at least twice as likely as not. Here is the arithmetic. Call \(q\) the doctor's degree of belief that the patient wakes, so \(1-q\) is the belief that they do not. Taking the bet gains 1 dollar with belief \(q\) and loses 2 dollars with belief \(1-q\), so on average it is worth \(q\cdot 1 + (1-q)\cdot(-2) = 3q - 2\). ("On average" is made precise later, as the expectation [Erwartungswert] of §2.1.) The bet is not a losing proposition exactly when \(3q - 2 \ge 0\), that is \(3q \ge 2\), that is \(q \ge 2/3\). So the bet would force the doctor's vague belief ("I'd bet they will") into a number.
The script comes back to this idea twice. Remark 1.30 names three interpretations of probability: naive, frequentist and subjective. Viewpoint 1.31 (the "Dutch book" argument) shows that a person whose betting numbers break the probability rules can be offered a set of bets that loses money for certain.
Example 0.4 — The card game Script 0.4
There are two cards in a closed opaque box. One is red on both sides; the other is red on one side and blue on the other. One card is pulled out and placed on the table, and a red side faces up. What is the probability that the other side is also red?
The tempting wrong answer
"The card is either the red-red card or the red-blue card, and both were equally likely to be drawn, so the answer is \(1/2\)." This is wrong, and the widget below will show you it is wrong before the argument does.
Why the answer is \(2/3\) My addition — the script poses the puzzle without solving it
The mistake is to count cards. The information you received is about a face. So label the faces: three red ones and one blue one.
- card RR has faces \(r_1\) and \(r_2\),
- card RB has faces \(r_3\) and \(b_1\).
"Pull a card out and put it down" has four possible results, one for each face that can end up on top: \(r_1\) up, \(r_2\) up, \(r_3\) up, \(b_1\) up. The card is chosen without looking and laid down without looking. So no face is favoured, and the four results are equally likely, each with probability \(1/4\).
You see a red face. That rules out "\(b_1\) up". Three results are left, still equally likely: \(r_1\), \(r_2\), \(r_3\). In the first two the card is RR, so the hidden side is red. In the third the card is RB, so the hidden side is blue. That is two out of three:
\[ \P(\text{hidden side red} \mid \text{visible side red}) = \frac{2}{3}. \]The symbol \(\P(A \mid B)\) is read "the probability of \(A\) given \(B\)". It is defined precisely in Definition 1.69. Here it just means "count only the equally likely situations in which \(B\) happened".
In words: a red-red card has twice as many ways of showing you a red face as a red-blue card does, so seeing red is evidence for the red-red card, not neutral information.
The reusable lesson. The list of possible outcomes (the "sample space", defined properly below) must be made of the things the experiment actually selects. Here the experiment selects a face, not a card. The script studies the same kind of error in Example 1.41 ("gotcha! model misspecification"): two reasonable-looking models of the same mug story give \(10/21\) and \(135/256\).
Example 0.5 — Russian roulette Script 0.5
A six-shooter revolver holds exactly two bullets, in neighbouring chambers. Your opponent goes first: spins the cylinder, pulls the trigger, and the gun does not fire. Now it is your turn. Should you spin the cylinder again, or pull the trigger right away?
The answer: pull right away My addition — the script poses the puzzle without solving it
Number the chambers 1 to 6 around the cylinder, and put the bullets in chambers 1 and 2, which are neighbours as the puzzle requires. Chambers 3, 4, 5, 6 are empty. Each trigger pull advances the cylinder by exactly one position, so after firing from chamber \(k\) the next chamber to come up is \(k+1\) (and after 6 comes 1 again).
Strategy A — spin again. A spin makes all six chambers equally likely, and two of them are loaded:
\[ \P(\text{fires} \mid \text{spin}) = \frac{2}{6} = \frac{1}{3} \approx 0.333. \]Strategy B — pull without spinning. Here you must use the information the opponent gave you. Their spin made all six chambers equally likely, and the gun did not fire, so the chamber that came up was one of the four empty ones — 3, 4, 5 or 6 — and those four remain equally likely. Your pull advances to the next chamber:
| Opponent's chamber | Your chamber | Loaded? |
|---|---|---|
| 3 | 4 | no |
| 4 | 5 | no |
| 5 | 6 | no |
| 6 | 1 | yes |
Exactly one of four equally likely cases is fatal:
\[ \P(\text{fires} \mid \text{pull}) = \frac{1}{4} = 0.25. \]Since \(\tfrac14 < \tfrac13\), pull the trigger without spinning.
In words: the fact that the gun just failed to fire is real evidence about where the cylinder is. Only one empty chamber sits immediately in front of a bullet, so most of the time you are somewhere in the safe run of four. Spinning throws that evidence away.
Why "neighbouring" is the whole point. If the two bullets were opposite each other (chambers 1 and 4), the empty chambers would be 2, 3, 5, 6, and pulling would advance to 3, 4, 6, 1 — of which two are loaded, giving \(2/4 = 1/2 > 1/3\), so then you should spin. One word in the problem statement flips the answer. That is the chapter's message in miniature.
Example 0.6 — Sleeping beauty Script 0.6
On Sunday evening you are put to sleep with a pill that also wipes your memory. After you fall asleep a fair coin is tossed. On heads you are woken on Monday and life continues normally. On tails you are woken on Monday, put back to sleep with your memory wiped, and woken again on Tuesday. Each time you are woken you are asked what you believe the coin showed. You wake up. What probability do you give to heads?
There are two defensible answers, and that is the point My addition — the script leaves this open
The "halfer" answer, \(1/2\). The coin is fair and you have learned nothing new: you always wake up at least once, whatever the coin did. An event you were certain to observe cannot be evidence for anything. So your belief stays at the prior, \(\P(\text{heads}) = 1/2\).
The "thirder" answer, \(1/3\). Take the sample space to be awakenings, not coin tosses. Run the experiment many times: half the runs are heads and produce one awakening (Monday); half are tails and produce two (Monday and Tuesday). Over 100 runs you get about 50 heads-Monday awakenings, 50 tails-Monday and 50 tails-Tuesday — 150 awakenings, of which 50 are heads-awakenings. From inside an awakening, \(\P(\text{heads}) = 50/150 = 1/3\).
Neither side has made an arithmetic error. They have chosen different sample spaces: the halfer takes \(\Omega = \{\text{heads}, \text{tails}\}\), the thirder takes \(\Omega = \{(\mathrm H,\mathrm{Mon}), (\mathrm T,\mathrm{Mon}), (\mathrm T,\mathrm{Tue})\}\). Philosophers have argued about which is right since 2000, and the script does not take a side.
In words: "the probability of heads" is not a well-formed question until you say what the experiment selects. Once the sample space is fixed, both camps compute the same way and agree.
Exam relevance: none. No old exam contains a puzzle of this kind. It is here because the script is here.
Example 0.7 — Prediction markets Script 0.7
The script's entry is one line: "Let's see what's trending on polymarket today…" — an invitation to look at a live prediction market in the lecture.
What it is meant to show My addition
On a prediction market people buy and sell contracts that pay 1 currency unit if some event happens and nothing if it does not. The trading price of such a contract sits between 0 and 1 and is read as a probability: a contract trading at 0.62 is the market saying "62 %".
These events — an election result, whether a named company ships a product this year — happen exactly once. There is no long run to take frequencies over, so the frequentist reading of Remark 1.30(ii) does not apply. What the number measures is the price at which traders with money at stake stop wanting either side of the bet: the subjective reading, Remark 1.30(iii), made operational. The script calls it "a crowd-sourced (heavily biased), subjective, collective opinion/belief/hope" in Remark 0.9.
Example 0.8 — Which of these is random? Script 0.8
The script lists five digit sequences and asks which of them are random:
(i) 433444666644444111111 (ii) 69468398352 (iii) 100011111101111111100101000001 (iv) 2849607135 (v) 0868308472
Decide for each one first. Then use the widget to reveal where it came from. In short, the script's
answers are: (i) a fair die thrown 6 times, with the \(i\)-th result written \(i\) times; (ii) the 2016th
to 2026th decimals of \(\pi\); (iii) digits from George Marsaglia's CD-ROM of physically generated random
numbers (quoted from Hennig et al., 2022); (iv) ChatGPT asked for "a sequence of 10 random digits";
(v) Python's random.randint(0, 9), a Mersenne-twister generator, seeded with 2849607135.
What the five origins are meant to show Script 0.8 + Remark 0.9
Each sequence seems to change character the moment you learn where it came from. Yet not one digit changed.
- (i) was unpredictable, but it would fail any standard statistical test of randomness (look at the long runs of equal digits).
- (ii) has no structure and is fine for randomised algorithms. But it is a fixed, published constant,
so it is far from "random".
Checked with a 2100-digit computation of \(\pi\) — my addition. The eleven digits 69468398352 are digits 2015 to 2025 after the decimal point. They are digits 2016 to 2026 only if you count the leading "3" of \(3.14159\ldots\) as the first digit. So the script's word "decimals" is off by one under the usual reading; the digits themselves are right. - (iii) came from physical noise, then was printed on a CD, so now it is fixed. The CD is no longer available and most copies are lost. The script asks, half seriously: does that make the digits random again?
- (iv) is random to the author, who does not know the seed or "temperature" setting used. With the exact model weights and seed it would be fully deterministic. Then again, hardware non-determinism may have made it random again.
- (v) came from a good pseudo-random generator. But the author seeded it on purpose with the digits of
(iv), "so this sequence has turned deterministic a half-sentence ago."
Checked — my addition. Runningrandom.seed(2849607135)followed by[random.randint(0,9) for _ in range(10)]in Python 3.11 returns 0868308472, exactly the printed sequence. You can reproduce it on any machine: that is what "deterministic" means here.
In words: randomness is not a property a sequence of digits carries around with it. It is a statement about what the person looking at it knows.
Where randomness comes from
Remark 0.9 Script 0.9
The script goes through its own examples and asks, in each, where the randomness is supposed to live:
- In Example 0.4 it is "choosing blindly between the two cards", in 0.6 a coin toss, in 0.5 spinning the chamber. We assume each mechanism makes the different outcomes equally likely. But once the exact position and motion of the hand are fixed, the result could be predicted: these are deterministic, not random.
- Example 0.8 is about random number generators, and shows that a small change in ignorance — learning a seed — turns an unpredictable sequence completely deterministic. The script explicitly does not go into pseudo-random number generation.
- In Example 0.3 no randomising mechanism is invoked at all. The uncertainty comes from our imperfect understanding of a human being. If we knew everything about how a human works, we should be able to predict the outcome.
- In Example 0.7 it is a crowd-sourced, heavily biased, subjective collective belief.
- Quantum mechanics is often invoked as a source of "true" randomness. Measurement outcomes on well-prepared quantum states really cannot be predicted — yet the probabilities of the different outcomes can be predicted perfectly.
- In the models of this course (for example, of a coin toss), probabilities represent uncertainty or ignorance about a system. The aim is to express, consistently and with numbers, what we believe about uncertain things before we observe them. The script points ahead to Viewpoints 0.10, 1.31 and 1.32 for more on this.
The script's own summary sentence, which is worth memorising:
"There is no probability of something happening, but only a probability of something happening given what I currently know."
The script also recommends a podcast with the physicist Andrew Jaffe on how models, and the probabilities we give them, help us understand the world.
Viewpoint 0.10 — determinism, free will, compatibilism Script 0.10
Remark 0.9 tempts you to conclude: if only we knew enough (apart from quantum effects), nothing would be truly random, and uncertainty would disappear. In practice we cannot know enough, so we describe our ignorance with probabilities.
Determinism is the view that the universe really works like that at its core. Including quantum mechanics, it says: if you knew the wave function of the universe (its complete physical state) and the laws of physics perfectly, you could predict its evolution perfectly, and so also the probability of any future event.
Determinism leaves little room for real randomness, serendipity or luck. Many people also feel it clashes with their experience of free will. The script's point is that the two are not logically incompatible. A family of philosophical positions called compatibilism explains how a deterministic universe and free will can coexist. Randomness, determinism and free will are still debated in philosophy and physics.
Not examinable. The script marks this whole stretch "— Start / End Philosophical Interlude —".
Why we need machinery: three worlds
Now the unnumbered motivation section that opens Chapter 1. Script p. 5 The script starts it like this: for simple situations our intuition about probability is quite good. But in more complex situations, especially ones involving infinity and continuous quantities, we need a solid mathematical framework to stay consistent. In simple finite settings this machinery looks like overkill. The section gives intuitive examples of why it is needed anyway.
It walks through three kinds of "world", each harder than the last: finitely many outcomes, countably infinitely many, and uncountably many. Along the way it builds the four parts of the final picture — the sample space \(\Omega\), the pmf \(p\), the probability measure [Wahrscheinlichkeitsmaß] \(\P\) and the collection \(\Aa\) of events [Ereignisse], an event being a set of outcomes — and, in the third world, replaces the pmf by the pdf. Each object is explained when it first appears below. Every later definition in the course answers something that goes wrong here.
The finite world: a deck of cards Script pp. 5–7
Card games such as poker involve chance, so probability theory should help us talk about them. Take a standard, well-shuffled deck of 52 playing cards and draw one card. There are 52 possible outcomes. The set of all outcomes is called the sample space [Ergebnisraum] and written \(\Omega\) (capital Greek omega). So \(|\Omega| = 52\). A single outcome is written \(\omega\) (small omega), so \(\omega \in \Omega\) means "\(\omega\) is one of the 52 cards".
Card names: \(\mathrm A\spadesuit\) is the ace of spades, \(\mathrm K\heartsuit\) the king of hearts, and so on. The four suits are spades \(\spadesuit\), clubs \(\clubsuit\) (both black), hearts \(\heartsuit\) and diamonds \(\diamondsuit\) (both red).
The script makes a point here that is easy to read past: we deliberately choose \(\Omega\) to be "the types of outcomes we care about." We do not record where on the table the card landed, who picked it, or which corner it was picked up by. Those are properties of the physical draw that we choose to ignore. In a game where only the card's value matters and the suit does not, we could take \(\Omega = \{2,3,\dots,10,\mathrm J,\mathrm Q,\mathrm K,\mathrm A\}\) with \(|\Omega| = 13\) instead (footnote 1). Nothing about the physical deck has changed. \(\Omega\) is a modelling choice, not a fact about the world.
The deck is well shuffled, so each card is equally likely. There are 52 cards, so the ace of spades has probability \(\tfrac{1}{52}\). The script writes this as \(\P(\{\mathrm A\spadesuit\}) = \tfrac{1}{52}\), where \(\P(\dots)\) just means "probability of …" for now. (The curly braces are deliberate; see the box on \(p\) versus \(\P\) below.)
Giving a number to each single outcome like this is the idea of a probability mass function (pmf) [Wahrscheinlichkeitsfunktion, also Zähldichte]. It is a function \(p : \Omega \to [0,1]\): it takes one outcome and returns its probability. For the fair deck, \(p(\omega) = \tfrac{1}{52}\) for every card \(\omega\). Footnote 3 of the script asks: why the complicated name "pmf" and not just "probability function"? The answer comes in the uncountable world below, where a different kind of \(p\) (a density) is needed and the word "mass" separates the two.
The deck need not be fair. Suppose a magician has shuffled so that the aces tend to be on top. Then \(p(\mathrm A\spadesuit)\) may be larger than \(1/52\). But then some other cards must be less likely, because the probabilities must add up to 1: with 52 cards, they cannot all be above \(1/52\). So besides choosing \(\Omega\), we also have to choose the probability of each outcome. Two properties are forced on any such choice:
What a pmf must satisfy Script p. 6
(i) \(p(\omega) \ge 0\) for all \(\omega \in \Omega\) — probabilities cannot be negative.
(ii) \(\displaystyle\sum_{\omega \in \Omega} p(\omega) = 1\) — the probabilities of all individual outcomes must add to one. For the fair deck, \(52 \times \tfrac{1}{52} = 1\).
Any function with these two properties is the pmf of some distribution [Verteilung] — the word is used informally here for "the complete rule that says how the total probability 1 is spread over \(\Omega\)"; it is given a precise meaning in §1.2. For a finite sample space, "the pmf is the distribution and all you need to know."
From outcomes to events [Ereignisse]. So far we only have probabilities of single cards, so-called singleton events (a singleton is a set with one element). What is the probability of drawing a king, any king? You would say at once: "4 kings, each with probability \(1/52\), so \(4/52\)." You got there by adding the probabilities of single outcomes.
To write this down, give the event "a king is drawn" a name, \(E_K\). As a set of outcomes it is \(E_K = \{\mathrm K\spadesuit, \mathrm K\clubsuit, \mathrm K\heartsuit, \mathrm K\diamondsuit\}\). In general: outcomes are the single things that can happen (here the 52 cards); events are sets of outcomes we are interested in (here all kings). The four kings are mutually exclusive (only one card is drawn), so we add:
\[ \P(E_K) = p(\mathrm K\spadesuit)+p(\mathrm K\clubsuit)+p(\mathrm K\heartsuit)+p(\mathrm K\diamondsuit) = \tfrac{4}{52} = \tfrac{1}{13}. \]Likewise the event \(E_R\) "a red card is drawn" contains 26 outcomes and \(\P(E_R) = \tfrac{26}{52} = \tfrac12\).
The distinction the script insists on: \(p\) versus \(\P\)
\(p\) eats an outcome, \(\P\) eats a set of outcomes. Everything you put into \(\P\) should be a subset of \(\Omega\); everything you put into \(p\) should be an element of \(\Omega\). For singletons the two agree: \(\P(\{7\clubsuit\}) = p(7\clubsuit)\). The script's footnote "You wonder why I put curly braces around \(\mathrm A\spadesuit\)? You should!" is about exactly this.
Right now the distinction looks like pedantry. It stops looking like pedantry in the uncountable case below, where \(p\) and \(\P\) stop being two views of the same thing.
Adding outcome probabilities works for any subset of \(\Omega\). Example: "a red card, or the \(7\spadesuit\), or any 8". Add the probabilities of the distinct outcomes in that set. Do not count \(8\heartsuit\) twice, once as a red card and once as an 8. My addition For the fair deck: 26 red cards, plus \(7\spadesuit\), plus the two black 8s (the red 8s are already counted) gives 29 distinct cards, so the probability is \(29/52\).
The same works for the magician's stacked deck, where the distribution is not uniform (not all cards have probability \(1/52\)):
\[ \P(\text{an ace is drawn}) = \P(\{\mathrm A\spadesuit,\mathrm A\clubsuit,\mathrm A\heartsuit,\mathrm A\diamondsuit\}) = p(\mathrm A\spadesuit)+p(\mathrm A\clubsuit)+p(\mathrm A\heartsuit)+p(\mathrm A\diamondsuit) > \tfrac{4}{52}. \]The only difference: the shortcut "count the outcomes and divide by 52" works only for the uniform distribution. Here you really have to add up the values.
So for every subset \(A \subseteq \Omega\) we can define
\[ \P : \pow(\Omega) \to [0,1], \qquad A \mapsto \P(A) := \sum_{\omega \in A} p(\omega). \]Here \(\pow(\Omega)\) is the power set, the collection of all subsets of \(\Omega\), and \(:=\) means "is defined as". The small \(p\) on the right does the work; the big \(\P\) on the left collects the result for a whole event. This \(\P\) is called a probability measure [Wahrscheinlichkeitsmaß], because it "measures" probabilities of events. In the finite case we can always define it on all subsets, so we do. The triple \(\bigl(\Omega, \pow(\Omega), \P\bigr)\) is called a probability space [Wahrscheinlichkeitsraum].
In words: in the finite case, \(\P\) looks more complicated than \(p\), and writing \(\pow(\Omega)\) looks like a waste of ink. \(\P\) is in a sense the more complete description, but every actual computation uses the pmf. So a finite probability space could just be the pair \((\Omega, p)\): "give me a pmf and everything is said; every question is a sum of pmf values over the event". That is correct, but it does not carry over to uncountable \(\Omega\).
The nice infinities: countably many outcomes Script pp. 7–8
The same idea extends to countably infinite sample spaces: sets whose elements can be listed as a first, second, third, … element, such as \(\N\), \(\Z\) or \(\Q\) (see the primer above).
Change the game: I shuffle, you draw a card, I reshuffle the whole deck, you draw again, and so on. How many draws until you get the \(\mathrm A\heartsuit\) (ace of hearts)? The outcome we care about is that number of draws. So \(\Omega = \N \setminus \{0\} = \{1,2,3,\dots\}\): you could be lucky on the first draw, or need 923 578 723 draws, or any other positive whole number. Again \(\Omega\) holds only what we care about. It does not record the whole sequence of cards seen along the way (footnote 4).
There are now infinitely many outcomes. Needing 100, 1 000 or 10 000 draws gets less and less likely, but it is possible. The outcomes are still separate ("discrete") numbers, though, so we can try to give each number \(k\) a probability \(p(k)\). (The script writes \(p\), not \(\P\), because this will be a pmf; \(p(1)\) is the same as \(\P(\{1\})\).) Build the pmf step by step:
- \(p(1) = \tfrac{1}{52}\): right on the first draw.
- \(p(2) = \tfrac{51}{52}\cdot\tfrac{1}{52}\): wrong first (probability \(\tfrac{51}{52}\), any of the other 51 cards), then right (probability \(\tfrac{1}{52}\)). Intuition, for example a tree of the possible sequences, tells us to multiply. My addition The reason: the deck is reshuffled, so the second draw does not depend on the first. The rule behind this ("independence", Definition 1.74) comes in §1.4.
- \(p(3) = \bigl(\tfrac{51}{52}\bigr)^{2}\tfrac{1}{52}\): wrong twice, then right. In general, \(k-1\) misses followed by one hit gives
This is the pmf of the geometric distribution \(\Geo(p)\) with success probability \(p = \tfrac{1}{52}\): the distribution of the number of trials until the first success. It is defined formally in Example 1.39(vi). (Careful: here the letter \(p\) inside \(\Geo(p)\) is a number, the success probability, not the pmf. The script uses the same letter for both.)
Notice that the outcomes are now more involved objects (numbers of draws). They are not directly where the randomness came in, which was the shuffling of the deck.
The script's footnote about names — worth taking seriously
"The order is important here: we have derived the pmf of a scenario we care about modelling and then decided to give it a name." Named distributions did not drop from the heavens for us to discover applications for. They have names because the same derivation keeps reappearing.
Is this a valid pmf? Every value is a product of positive numbers, so it is non-negative. The values also sum to 1. The script only says "one can also check"; here is the check My addition. Write \(q = \tfrac{51}{52}\), so \(1-q = \tfrac{1}{52}\) and \(p(k) = q^{k-1}(1-q)\). The sum is a geometric series: a sum of the form \(a + aq + aq^2 + \cdots\). When \(|q| < 1\) it converges to \(a/(1-q)\) (Analysis 3.1):
\[ \sum_{k=1}^{\infty} q^{k-1}\,(1-q) \;=\; (1-q)\sum_{j=0}^{\infty} q^{j} \;=\; (1-q)\cdot\frac{1}{1-q} \;=\; 1 . \]Step by step: the first equality pulls the constant factor \(1-q\) out of the sum. The substitution \(j = k-1\) only relabels the terms so the sum starts at 0. The second equality is the geometric-series formula with \(a = 1\). The last step cancels \(1-q\).
Everything else works as before. Take the event "it takes more than 3 but fewer than 10 draws, or more than 20". As a set it is \(\{k \in \Omega \mid 3 < k < 10 \text{ or } k > 20\}\), and its probability is the sum of \(p(k)\) over those \(k\). So again we get a probability measure on the whole power set:
\[ \P : \pow(\{1,2,\dots\}) \to [0,1], \qquad A \mapsto \P(A) = \sum_{k \in A} p(k). \]Why does this work for every \(A \in \pow(\Omega)\), even infinite ones? The values \(p(k)\) are non-negative and their infinite sum converges to a finite number (namely 1). Analysis then guarantees that the sum over any subset of these values also converges. My addition The reason in one line: the partial sums over a subset only grow and never exceed 1, and a growing sequence with an upper bound converges (Analysis 2.2 — monotone sequences).
The script adds a remark that is easy to miss: \(\pow(\Omega)\) here is very large. The set of all subsets of a countably infinite set is not countable. It has the same cardinality (the same "size" of infinity) as \(\R\).
Why it is uncountable — my addition. Take \(\Omega=\N=\{0,1,2,\dots\}\). A subset \(A\subseteq\N\) is the same thing as an infinite 0/1-sequence: write 1 in position \(k\) if \(k\in A\) and 0 otherwise (the indicator of \(A\), see B2). For example the even numbers \(\{0,2,4,\dots\}\) become \(1,0,1,0,1,\dots\). Now suppose someone claims a complete list \(A_0,A_1,A_2,\dots\) of all subsets. Build a new set \(D\) by the rule "\(k\in D\) exactly when \(k\notin A_k\)". Then \(D\) differs from \(A_0\) at position 0, from \(A_1\) at position 1, and in general from every \(A_k\) at position \(k\) — so \(D\) is missing from the list. No list is complete: the power set is uncountable. This is Cantor's diagonal argument [Diagonalargument], the same one that shows \(\R\) is uncountable (Analysis 1.1 — countability). Reading a 0/1-sequence as the binary digits \(0.a_0a_1a_2\ldots\) of a number in \([0,1]\) is what connects it to the size of \(\R\).
Main takeaway (the script's own, p. 8) Script p. 8
We have the sample space \(\Omega\) of outcomes we care about; certain subsets of it are called events; the main player is a probability measure \(\P\) assigning \(\P(A) \in [0,1]\) to an event \(A\). When \(\Omega\) is discrete we can do this for every \(A \in \pow(\Omega)\), and we can make life simpler by specifying only the pmf \(p\) with \(p(\omega)\in[0,1]\) and \(\sum_{\omega\in\Omega}p(\omega)=1\), then computing \(\P(A) = \sum_{\omega \in A} p(\omega)\).
The uncountable world: it gets nasty Script pp. 9–10
Now let \(\Omega\) be uncountably infinite: so large that its elements cannot be listed one by one (see the primer). Example: the bus arrives at some time within the next hour, and every time is equally likely. Measure time in hours, so the arrival time is a real number in \(\Omega = [0,1]\). We want a "uniform distribution" on \(\Omega\).
Try what worked before: give each arrival time \(x\) a probability \(p(x) \in [0,1]\). "Every time equally likely" means \(p(x) = p(x')\) for all \(x, x' \in [0,1]\). So \(p\) is some constant \(c\). Intuitively \(c > 0\). But then adding up \(c\) over the infinitely many points of \([0,1]\) gives infinity, not 1. (The script notes that a "sum" over an uncountable set is not even properly defined, but the intuition holds.) The only way out: every single arrival time has probability zero.
The script heads off an objection here. Would a uniform distribution not also fail on the countable set \(\N\)? Yes: if every natural number had the same non-zero probability, the sum would diverge (grow without bound) too. But on \(\N\) there at least exist pmfs with every \(p(k) > 0\) that sum to 1, such as the geometric pmf above. In the continuous case not even that is possible.
Small slip in the script: it names the binomial pmf as a second example. The binomial distribution \(\Bin(n,p)\) (Example 1.39(iv)) counts how many of \(n\) repeated trials succeed when each succeeds with probability \(p\), so its sample space is the finite set \(\{0,1,\dots,n\}\) and every \(k > n\) gets probability \(0\). It therefore does not give every natural number a positive probability. A correct second example is the Poisson pmf \(p(k) = e^{-\lambda}\lambda^{k}/k!\) for \(k \in \N\), with a fixed number \(\lambda > 0\) (Example 1.39(vii)). Here \(e = 2.718\ldots\) is Euler's number and \(k! = 1\cdot 2\cdots k\) is the factorial [Fakultät], with \(0! = 1\). Every factor in \(e^{-\lambda}\lambda^{k}/k!\) is a positive number, so \(p(k) > 0\) for every single \(k \in \N\), which is what this example needs.
So we must get used to \(\P(\{x\}) = 0\) for every \(x \in [0,1]\): the bus arriving at exactly time \(x\) has probability zero. Yet we still want "the bus arrives at some time in the hour" to have probability 1, and intervals to get their length as probability:
\[ \P([0,1]) = 1, \qquad \P\bigl([0,\tfrac12]\bigr) = \tfrac12, \qquad \P([0.15,\,0.46]) = 0.46-0.15 = 0.31 . \]Non-zero probabilities for sets of times, zero probability for every single time.
This is what the probability density function (pdf) [Dichtefunktion] \(p(x)\) is for. On continuous spaces \(p(x)\) is not \(\P(\{x\})\): it does not give probabilities directly. Instead you get the probability of an event such as an interval by integrating (taking the area under the curve of \(p\)):
\[ \P([a,b]) = \int_a^b p(x)\,\mathrm{d}x \quad \text{for } [a,b] \subseteq \Omega . \]The value \(p(x)\) says how densely probability is packed around \(x\): a higher \(p(x)\) means the outcome is more likely to fall in a small interval around \(x\). For the uniform distribution on \([0,1]\), \(p(x) = 1\) for \(x \in [0,1]\) and \(0\) otherwise. Check: \(\int_{0.15}^{0.46} 1\,\mathrm dx\) is the area of a rectangle of width \(0.31\) and height 1, so \(0.31\), as wanted. The two pmf conditions become \(p(x) \ge 0\) for all \(x\), and \(\int_{-\infty}^{\infty} p(x)\,\mathrm dx = 1\) (total area 1). An integral with an infinite bound is an improper integral [uneigentliches Integral]: it means the limit of ordinary integrals \(\int_{a}^{b}p(x)\,\mathrm dx\) as \(a\to-\infty\) and \(b\to\infty\) (Analysis 9.1). It becomes essential from §1.3 on.
The script's physical analogy — use it, it is the fastest way in Script p. 9
Think of an ordinary mass density (mass per volume). A density function assigns to each point in 3D space a number saying how dense the object is there. The value at a single point does not tell you the "weight of that point" — the mass of a single point is zero. Integrate the density over a region and you get the mass sitting in that region. That is exactly \(\P(A) = \int_A p(x)\,\mathrm dx\) for an event \(A \subseteq \Omega\) (\(\int_A\) means: integrate over the region \(A\)).
Main takeaway (the script's own, p. 10) Script p. 10
For continuous (uncountably infinite) sample spaces we keep the sample space \(\Omega\) and the probability measure \(\P\), which gives probabilities to events \(A \subseteq \Omega\). The pmf has to be replaced by the pdf. Every single outcome now has probability zero. Instead, the pdf describes the "density of probability" around each point, and we get the probability of an event by integrating the density over it.
One question is still open: which subsets of \(\Omega\) can we give a probability to? That is the next section.
Not all subsets are created equal Script p. 10
In the finite case (the deck of cards) and the countable case (the geometric distribution) we used the whole power set \(\pow(\Omega)\) as our event space: the collection of all events that get a probability. We could give a probability \(\P(A)\) to every subset \(A \subseteq \Omega\) without any problem. We would like to do the same in the continuous case.
Question: on \(\Omega = [0,1]\), can we give a probability to every subset, in a way that matches our intuition? Say we want the "uniform choice" \(\P\) on \([0,1]\) to give each interval its length: \(\P([a,b]) = b-a\). We also want three basic axioms (rules):
- \(\P(A) \ge 0\) for all \(A \in \pow([0,1])\).
- \(\P([0,1]) = 1\).
- \(\sigma\)-additivity: if \(A_1, A_2, \dots\) are disjoint sets (no two share an element), then \(\P\bigl(\bigcup_{i=1}^{\infty} A_i\bigr) = \sum_{i=1}^{\infty} \P(A_i)\). The symbol \(\bigcup\) means "union of all of them"; \(\sigma\) is the Greek letter sigma and here signals "countably many".
Add one more very natural wish, translation invariance: shifting a set does not change its probability. Write \(A + c = \{a + c \mid a \in A\}\) for the set \(A\) shifted by the number \(c\). The wish is \(\P(A) = \P(A+c)\) whenever \(A\) and \(A+c\) both lie in \([0,1]\). Example: \(\P([0.1,0.3]) = \P([0.5,0.7]) = 0.2\).
The answer to the question is no. This is a deep result, connected to the work of Vitali, Banach and Tarski: no \(\P\) on all of \(\pow([0,1])\) satisfies all these conditions at once. There are "exotic" or "pathological" subsets of \([0,1]\), called non-measurable sets [nicht messbare Mengen]. No consistent "length" or probability can be given to them without a contradiction. You will meet a concrete one, the Vitali set, in Theorem 1.28 on the next page, with the full proof. (There it is stated on \(\Omega = [0,1)\), the interval that includes 0 but not 1; nothing about the argument changes.)
A piece of small print, because the statement is easy to over-read. It is not true that no probability measure at all exists on \(\pow([0,1])\). Here is one that does: fix the point \(0.5\) and set \(\P(A) = 1\) if \(0.5 \in A\) and \(\P(A) = 0\) otherwise ("all the probability sits on 0.5"). This is defined on every subset and satisfies the three axioms above. What it does not satisfy is \(\P([a,b]) = b-a\): it gives the interval \([0,0.1]\) probability 0 although its length is 0.1. So the impossibility is about the uniform measure — the one that gives intervals their length and is unchanged by shifting — not about measures in general. That is exactly the measure we wanted for the bus.
So \(\pow(\Omega)\) cannot be the event space for the measures we actually want when \(\Omega\) is continuous. At first this looks like a small, annoying bug. But it forces us to build the abstract machinery of \(\sigma\)-algebras: a probability measure on a continuous \(\Omega\) must be restricted to a certain collection of events, because not every subset works. The script promises to be pragmatic here and just "demand what we need" for things to work.
Instead of all subsets, we keep a smaller but still very rich collection of "well-behaved" or measurable subsets. A \(\sigma\)-algebra \(\Aa\) (read "sigma-algebra") is a collection of subsets of \(\Omega\) that is nice enough for probability theory:
- it contains \(\Omega\) itself (and \(\emptyset\));
- it is closed under complements: if \(A \in \Aa\) then \(A^c \in \Aa\);
- it is closed under countable unions: if \(A_1, A_2, \ldots \in \Aa\) then \(\bigcup_i A_i \in \Aa\) (and also countable intersections).
My addition "Closed under" means: doing the operation never takes you outside the collection. The two brackets follow from the rules. \(\emptyset\) is in \(\Aa\) because \(\emptyset = \Omega^c\) (rules 1 and 2). Intersections are in \(\Aa\) because of De Morgan's law \(\bigcap_i A_i = \bigl(\bigcup_i A_i^c\bigr)^c\): take complements (rule 2), then the union (rule 3), then a complement again (rule 2). Tiny example on \(\Omega = \{1,2,3\}\): the collection \(\{\emptyset, \{1\}, \{2,3\}, \Omega\}\) is a \(\sigma\)-algebra. The collection \(\{\emptyset, \{1\}, \Omega\}\) is not, because the complement \(\{1\}^c = \{2,3\}\) is missing.
Main takeaway — the object the whole course is built on Script p. 10
The fundamental object is a probability space, a triple
\[ (\Omega, \Aa, \P) \]made of three parts:
- the sample space \(\Omega\) of outcomes;
- a \(\sigma\)-algebra \(\Aa \subseteq \pow(\Omega)\) containing all events we want to give probabilities to;
- the probability measure \(\P\), which gives a probability to every event in \(\Aa\).
This triple lets us build one theory without constantly separating discrete from continuous: the three parts are handled the same way in both settings. The pmf and pdf are often far more intuitive, but they are "non-fundamental": each only works in certain settings.
The script's own warning, verbatim in substance Script p. 10
"Since we do not want to have to develop concepts multiple times, we will often aim for the most general representation that works for all cases, i.e., finite, countably infinite, uncountably infinite, all at the same time. When things feel too complex, try to understand what the statements would mean in the finite setting."
That last sentence is the most useful piece of study advice in the script. When \(\sigma\)-algebras stop making sense, set \(\Omega = \{1,2,3\}\), take \(\Aa = \pow(\Omega)\), and reread the statement.
Exercise-sheet tasks
Sheet 0 is the warm-up sheet, released before the theory starts. Its preamble tells you the whole method: construct a probability space \((\Omega, \Aa, \P)\), equip \(\Omega\) with the discrete uniform (Laplace) distribution \(U_\Omega\), and probabilities become counting:
\[ U_\Omega(A) \;=\; \frac{|A|}{|\Omega|} \;=\; \frac{\text{number of favourable outcomes}}{\text{number of possible outcomes}}, \qquad A \subseteq \Omega . \]The script writes this distribution \(\Lap_\Omega\) (Example 1.39(i)); the sheet writes \(U_\Omega\). They are the same object — an inconsistency between the two documents worth knowing about before the exam.
Sheet 0, Exercise 1 — two dice Sheet 0 · Ex 1
You roll two fair six-sided dice. Find the probability that (i) the sum is 7, (ii) the sum is at least 10, (iii) at least one die shows a 6.
Setting up the space. Record both results in order:
\[ \Omega = \{1,\dots,6\}^2, \qquad \Aa = \pow(\Omega), \qquad \P = U_\Omega . \]The notation \(\{1,\dots,6\}^2\) means all ordered pairs \((\omega_1,\omega_2)\) with each entry from \(\{1,\dots,6\}\), so \(|\Omega| = 6 \cdot 6 = 36\) and \(\P(A) = |A|/36\). Write \(S(\omega) := \omega_1 + \omega_2\) for the sum.
Why ordered? Because the 36 ordered pairs are equally likely, while the 21 unordered ones are not — \(\{1,2\}\) can happen two ways and \(\{3,3\}\) only one. The uniform distribution is only legitimate on the ordered space. This choice is the whole exercise.
(i) \(A_1 = \{\omega \mid S(\omega) = 7\} = \{(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)\}\), so \(|A_1| = 6\) and \(\P(A_1) = \tfrac{6}{36} = \tfrac16\).
(ii) \(A_2 = \{\omega \mid S(\omega) \ge 10\}\). Split by the sum: sum 10 gives \((4,6),(5,5),(6,4)\) — three; sum 11 gives \((5,6),(6,5)\) — two; sum 12 gives \((6,6)\) — one. Total \(3+2+1 = 6\), so \(\P(A_2) = \tfrac{6}{36} = \tfrac16\).
(iii) \(A_3 = \{\omega \mid \omega_1 = 6 \text{ or } \omega_2 = 6\}\). Counting this directly invites double-counting \((6,6)\), so count the complement instead: no die shows a 6 means both entries come from \(\{1,\dots,5\}\), giving \(|\Omega \setminus A_3| = 5^2 = 25\). Hence
\[ \P(A_3) = 1 - \P(\Omega\setminus A_3) = 1 - \tfrac{25}{36} = \tfrac{11}{36}. \]The step \(\P(A^c) = 1 - \P(A)\) is justified in §1.1 from \(\sigma\)-additivity; it is Sheet 2, Exercise 1(i).
Method to reuse
When an event says "at least one", count the complement ("none") and subtract from 1. The complement of "at least one 6" is "no 6 anywhere", which is a plain product count with no overlaps to worry about. This trick appears again in Sheet 2 Exercise 2 and in the derangement problem, Sheet 2 Exercise 4.
Sheet 0, Exercise 6 — the self-referential question Sheet 0 · Ex 6
"If you choose an answer to this question at random, what is the probability that you will be correct?" A 25 % B 50 % C 0 % D 25 %
Model. Reading "at random" as a uniform choice of label: \(\Omega = \{A,B,C,D\}\), \(\Aa = \pow(\Omega)\), \(\P = U_\Omega\), so \(\P(\{x\}) = 1/4\) for each label. Let \(T \subseteq \Omega\) be the set of labels that carry the correct value.
Test each printed value (25 %, 50 %, 0 %) as a candidate for "the correct answer". A candidate works only if choosing a label at random hits a label with that value with exactly that probability:
- If the correct value is 25 %, then \(T = \{A, D\}\), so \(\P(T) = 2/4 = 50\% \ne 25\%\). Contradiction.
- If the correct value is 50 %, then \(T = \{B\}\), so \(\P(T) = 1/4 = 25\% \ne 50\%\). Contradiction.
- If the correct value is 0 %, then \(T = \{C\}\), so \(\P(T) = 1/4 = 25\% \ne 0\%\). Contradiction.
- If the correct value is none of the printed values, then no label is correct: \(T = \emptyset\), so \(\P(T) = 0\%\). But 0 % is printed (label C), so the correct value would be printed after all. Contradiction.
Every candidate contradicts itself, so the question has no consistent answer. It is a liar paradox wearing a multiple-choice costume, not a probability problem.
In words: the model \((\Omega,\Aa,\P)\) is perfectly fine. What fails is the question, which asks about a quantity that is defined in terms of its own answer. Probability theory does not repair badly posed questions — it only makes the breakage visible.
Gap in the official solution: it checks the three printed values but never says why no other value can be correct. The missing case: suppose the true probability were some value not printed at all (say 75 %). Then no label is correct, so \(T = \emptyset\) and \(\P(T) = 0\). But then the true probability is 0 %, which is printed (as C), so this case contradicts itself too. Only with this fourth case is "no consistent answer" fully proved. (Two smaller things: the official solution uses the symbol \(T\) without ever saying what it stands for — it is the set of labels carrying the correct value — and it announces "this gives a contradiction" before the three cases instead of drawing the conclusion after them.)
Old-exam tasks
What the old exams take from this page
I checked all three available exams (WiSe25, SoSe25, SoSe26) task by task. No task asks about the puzzles, the history or the philosophy of Chapter 0. The script brackets that material as "— Philosophical Interlude —".
What does get examined is the vocabulary the motivation section introduces informally: \(\Omega\), events, \(\P\), pmf, probability space, \(\sigma\)-algebra. These are defined properly on the next page, where SoSe26 P2b, WiSe25 P1a and WiSe25 P1c are worked. The simplest of them can already be solved with the three \(\sigma\)-algebra rules above:
True or false: a \(\sigma\)-algebra on three points WiSe25 · P1a
"On \(\Omega = \{\circ, \triangle, \star\}\), the set \(\{\emptyset, \{\circ\}, \{\star\}, \{\circ,\star\}, \Omega\}\) is a \(\sigma\)-algebra."
False. Rule 2 (closed under complements) fails: \(\{\circ\}\) is in the collection, but its complement \(\Omega \setminus \{\circ\} = \{\triangle, \star\}\) is not. One missing set is enough for a counterexample. This matches the official solution.
Summary sheet
The four objects, and which world each survives in
| Object | Finite \(\Omega\) | Countable \(\Omega\) | Uncountable \(\Omega\) |
|---|---|---|---|
| \(\Omega\) — sample space | works | works | works |
| \(\Aa\) — event space | can be all of \(\pow(\Omega)\) | can be all of \(\pow(\Omega)\) | must be smaller than \(\pow(\Omega)\) for the uniform law |
| \(\P\) — probability measure | works | works | works, on \(\Aa\) only |
| \(p\) — pmf, \(p(\omega)=\P(\{\omega\})\) | works, and is enough | works, and is enough | collapses: \(p(x) = 0\) for every \(x\) (continuous case) |
| \(p\) — pdf, \(\P(A)=\int_A p\) | not used | not used | the replacement for the pmf |
Formulas from this page
- pmf conditions
- \(p(\omega) \ge 0\) and \(\sum_{\omega\in\Omega} p(\omega) = 1\)
- events from pmf
- \(\P(A) = \sum_{\omega \in A} p(\omega)\)
- pdf conditions
- \(p(x) \ge 0\) and \(\int_{-\infty}^{\infty} p(x)\,\mathrm dx = 1\)
- events from pdf
- \(\P([a,b]) = \int_a^b p(x)\,\mathrm dx\)
- Laplace counting
- \(\P(A) = |A|/|\Omega|\), valid only when \(\Omega\) is finite and all its outcomes are equally likely
- geometric series
- \(\sum_{j\ge0} q^{j} = \tfrac{1}{1-q}\) for \(|q|<1\)
Things to be able to say out loud
- \(\Omega\) is chosen, not discovered — it holds the outcomes we care about.
- \(p\) takes outcomes, \(\P\) takes sets of outcomes.
- On an uncountable \(\Omega\), every single outcome has probability zero, and yet whole sets of outcomes — an interval such as \([0.15,0.46]\) — still have positive probability.
- \(\pow(\Omega)\) is too big to be the event space for the uniform law on \([0,1]\), which is why \(\sigma\)-algebras exist.
- Randomness in this course models our ignorance, not a mechanism in nature.
Exam focus
The puzzles and the philosophy have never been examined. The \(\sigma\)-algebra rules have (WiSe25 P1a, SoSe26 P2b). The habit worth carrying into the exam is the one Sheet 0 drills: before computing anything, write down \(\Omega\), \(\Aa\) and \(\P\) explicitly, and say whether the outcomes in \(\Omega\) are equally likely. The official old-exam solutions that use the Laplace distribution (for example SoSe25 P1a) state the model first in exactly this way.
Self-test
Section 1.1 · Lectures 1–2 (15 & 22 April 2026)
Probability spaces
Wahrscheinlichkeitsräume
What this page covers Script §1.1, pp. 11–19
Everything from Convention 1.1 to Remark 1.33. The script's own section goal: "Introduce a concise mathematical framework to talk about probability and distributions."
Worked in place: Sheet 1 (all six tasks), Sheet 2 (Ex. 1, 3, 5), Sheet 3 (Ex. 1, 2), and the old-exam tasks WiSe25 P1a, WiSe25 P1c, WiSe25 P6c, SoSe26 P2b.
This is the most abstract page of the course and the one that pays back most. Four separate exam tasks come from it, spread over two of the three past exams we have (WiSe 25/26 and SoSe 2026; SoSe 2025 happens to contain none).
The big picture
The previous page ended with a problem. On a continuous sample space (for example all numbers in \([0,1]\)) we cannot give every subset a probability. This page repairs that. It builds three objects, in this order:
- a \(\sigma\)-algebra \(\Aa\) — the list of subsets that will get a probability. It is small enough to leave out a few badly behaved sets. It is large enough to contain every set we will ever ask about.
- a measure \(\mu\) — a rule that gives each set on that list a "size". The size behaves like length, area and volume behave.
- a probability measure \(\P\) — a measure whose total size is exactly 1.
That is the whole plan. Everything else on this page is one of three things: a consequence of these three definitions, a worked example, or a proof that the caution was necessary.
In words: in this course, "probability" means "a way of measuring the size of sets, scaled so that the whole space has size 1". Your intuitions about lengths and areas carry over. Bigger sets are not smaller. Pieces that do not overlap add up. The whole is the sum of its parts.
Primer: the notation this section uses My addition
Cross-references Analysis guide
Quantifier negation: Analysis 1.1. Supremum: Analysis 1.2. Sequences, \(\uparrow\), \(\downarrow\): Analysis 2.1 and 2.2. Full set algebra (families, de Morgan, pre-images): B2. What a measure-theoretic integral is: B4.
Page 0 covered sets, subsets, power sets, unions, intersections, complements, \(\N\), \(\Q\), \(\R\), and countability. This section adds five more things, all of which the script uses without introduction.
1. Indexed families and unions over an index set
An index set \(I\) is a set whose elements are used as labels. Writing \((A_\alpha)_{\alpha\in I}\) or \(\{A_\alpha \mid \alpha \in I\}\) means: for each label \(\alpha\) we have a set \(A_\alpha\). The index set may be finite (\(I = \{1,2,3\}\)), countably infinite (\(I = \N\)), or uncountable (\(I = \R\)). Sets may repeat: \(A_\alpha = A_\beta\) for \(\alpha \ne \beta\) is allowed. Some sets may be empty. This is the script's Definition A.7. Example: with \(I=\{1,2,3\}\) and \(A_1=\{a\}\), \(A_2=\{a,b\}\), \(A_3=\{b,c\}\) we get \(\bigcup_i A_i=\{a,b,c\}\) and \(\bigcap_i A_i=\emptyset\) (no letter is in all three).
The union and intersection over such a family are defined by what it means to belong to them:
\[ \bigcup_{\alpha\in I} A_\alpha = \{\omega \mid \exists \alpha \in I : \omega \in A_\alpha\}, \qquad \bigcap_{\alpha\in I} A_\alpha = \{\omega \mid \forall \alpha \in I : \omega \in A_\alpha\}. \]Here \(\exists\) reads "there exists" and \(\forall\) reads "for all". So \(\omega\) is in the union if it is in at least one of the sets, and in the intersection if it is in every one of them.
The script asks, in the middle of Definition 1.2: "How do the above two points include the finite collection case?" The answer mine: take \(I = \N\) and set \(A_i = \emptyset\) for all \(i\) beyond the ones you care about. Since adding \(\emptyset\) to a union changes nothing, \(\bigcup_{i\in\N}A_i = A_0 \cup \dots \cup A_m\). For intersections you pad with \(\Omega\) instead, because intersecting with \(\Omega\) changes nothing. Learn this padding trick now: it is what turns finite statements into the countable ones the axioms actually speak about, and it reappears in Sheet 1 Exercise 3 and in the derivation of finite additivity from \(\sigma\)-additivity (Definition 1.17).
2. Disjoint unions and the symbol \(\mathbin{\dot\cup}\)
Two sets are disjoint if \(A \cap B = \emptyset\) — they share no element. A family is pairwise disjoint if no two of its members share an element. The script writes \(A \mathbin{\dot\cup} B\) to signal "this is a union of sets that happen to be disjoint". The symbol is an ordinary union; the dot is a reminder to the reader that additivity may be applied.
3. \([n]\), and \(\subseteq\) versus \(\subsetneq\)
\([n] := \{1,\dots,n\}\) for \(n \in \N_{>0}\). The script uses \(\subseteq\) for "subset, equality allowed" and \(\subsetneq\) for "proper subset, equality not allowed". It tries to avoid \(\subset\) entirely, and says that where \(\subset\) does appear it "probably" means \(\subseteq\) — and invites you to point it out.
4. The indicator function \(\one_A\)
For \(A \subseteq \Omega\), the indicator function [Indikatorfunktion] \(\one_A : \Omega \to \{0,1\}\) is defined by \(\one_A(\omega) = 1\) if \(\omega \in A\) and \(\one_A(\omega) = 0\) otherwise — "is \(\omega\) in \(A\)? yes = 1, no = 0". The script uses the Greek letter \(\chi\) (chi) for it; other books write \(\mathbf 1_A\).
This is what makes the notation \(2^\Omega\) for the power set sensible: a subset \(A \subseteq \Omega\) is the same information as a map \(\Omega \to \{0,1\}\), namely \(\one_A\), which decides for each element whether it is in (1) or out (0). The correspondence \(\pow(\Omega) \to 2^\Omega\), \(A \mapsto \one_A\), is one-to-one.
5. Monotone limits: \(\uparrow\), \(\downarrow\), and \(\sup\)
For real numbers, \(x_n \uparrow x\) means the sequence \(x_1 \le x_2 \le \dots\) increases and converges to \(x\); \(x_n \downarrow x\) means it decreases to \(x\). For sets, the same arrows mean the sets grow or shrink: \(A_0 \subseteq A_1 \subseteq \cdots\) growing, or \(A_0 \supseteq A_1 \supseteq \cdots\) shrinking.
(Full treatment with an explorer widget: Analysis 1.2 — sup, inf.) The supremum \(\sup S\) of a set \(S \subseteq \R\) is its least upper bound: a number \(u\) is an upper bound if \(x \le u\) for every \(x \in S\), and \(\sup S\) is the smallest upper bound. Example: \(\sup\{\tfrac12,\tfrac23,\tfrac34,\dots\} = 1\), although 1 is not in the set. Sheet 2 Exercise 1(iii) states this definition explicitly, so the course does not assume you know it. For an increasing sequence, \(\sup_n x_n = \lim_n x_n\); for a general sequence the two can differ. The infimum \(\inf S\) is the mirror image: the largest lower bound. For a decreasing sequence, \(\inf_n x_n = \lim_n x_n\).
A function \(F\) is right-continuous at \(x\) if \(F(x_n) \to F(x)\) for every sequence \(x_n \downarrow x\) — approaching \(x\) from above reproduces the value at \(x\). It may still jump when approached from below. Picture a staircase whose steps include their left endpoint.
Conventions and set operations
Convention 1.1 — 0 is a natural number Script 1.1
Throughout the course, \(\N = \{0,1,2,\dots\}\).
Why it matters: many German textbooks start \(\N\) at 1. When the script writes "for a sequence \((A_i)_{i\in\N}\)" the sequence starts at \(A_0\), and when Proposition 1.19 writes \(A_0 \subseteq A_1 \subseteq \cdots\) the index really does begin at zero. Where a statement needs the positive integers, the script writes \(\N_{>0}\).
Definition 1.2 — set operations Script 1.2
For any set \(\Omega\): the power set \(\pow(\Omega) := \{A \mid A \subseteq \Omega\}\); for \(A \subseteq \Omega\), the complement \(A^c := \Omega \setminus A \subseteq \Omega\). For a countable collection \((\Omega_i)_{i\in\N}\),
\[ \bigcup_{i\in\N}\Omega_i = \{\omega \mid \exists i \in \N: \omega \in \Omega_i\}, \qquad \bigcap_{i\in\N}\Omega_i = \{\omega \mid \forall i \in \N: \omega \in \Omega_i\}, \]and the same for an arbitrary (possibly uncountable) index set \(I\). Disjoint unions are written \(\mathbin{\dot\cup}\); \([n] := \{1,\dots,n\}\).
The script notes it "generally assumes familiarity" with this and points to Appendix A.1 for a longer refresher.
Lemma 1.3 de Morgan's laws Script 1.3
Let \(\{A_i\}_{i\in I}\) be a family of sets indexed by a set \(I\). Then
\[ \Bigl(\bigcup_{i\in I}A_i\Bigr)^{c} = \bigcap_{i\in I}A_i^{c}, \qquad \Bigl(\bigcap_{i\in I}A_i\Bigr)^{c} = \bigcup_{i\in I}A_i^{c}. \]The script's proof line reads, in full: "Proof. Exercises." — it is Sheet 1, Exercise 1, worked below.
In words: "not (in at least one of them)" is the same as "in none of them"; "not (in all of them)" is the same as "missing from at least one". These two identities are the engine of nearly every \(\sigma\)-algebra proof in the course, because a \(\sigma\)-algebra is closed under unions and complements but says nothing directly about intersections.
Convention 1.4 — non-empty \(\Omega\) Script 1.4
Throughout the lecture, unless stated otherwise, \(\Omega\) is a non-empty set.
Why: if \(\Omega = \emptyset\) then \(\pow(\Omega) = \{\emptyset\}\) and the only candidate measure would need \(\P(\emptyset) = 1\) and \(\P(\emptyset) = 0\) at once. The convention removes a degenerate case rather than a real one.
Remark 1.5 — samples, events, event systems Script 1.5
The script includes an illustration (adapted from Georgii, 2015) showing three levels stacked on top of each other. Redrawn here:
Reading it from the bottom: a single outcome \(\omega\) is a point of \(\Omega\). An event \(A\) is a set of outcomes, so it is a point one level up, inside \(\pow(\Omega)\). An event system such as a \(\sigma\)-algebra \(\Aa\) is a set of events, so it is a point one level higher still, inside \(\pow(\pow(\Omega))\).
In words: keeping these three levels straight is most of the difficulty of this section. When a statement confuses you, ask which level each symbol lives on. Writing \(\omega \in \Aa\) or \(A \in \Omega\) is a level error and is always wrong.
\(\sigma\)-algebras
Definition 1.6 \(\sigma\)-algebra Script 1.6
We call \(\Aa \subseteq \pow(\Omega)\) a \(\sigma\)-algebra on \(\Omega\) if
- \(\Omega \in \Aa\),
- for each \(A \in \Aa\) we have \(A^c \in \Aa\), and
- for each sequence \((A_i)_{i\in\N}\) in \(\Aa\) we have \(\bigcup_{i\in\N}A_i \in \Aa\).
Reading each part. \(\Aa\) is a set whose elements are subsets of \(\Omega\) — that is what \(\Aa \subseteq \pow(\Omega)\) says. (i) The certain event is on the list. (ii) If you can measure "\(A\) happens", you can measure "\(A\) does not happen". (iii) If you can measure each of countably many events, you can measure "at least one of them happens".
Where the \(\sigma\) comes from: it marks the word countably in (iii). Without it — only finite unions — the structure is called an algebra, and it is too weak: limits of events would fall outside it.
Note of mine: \(\emptyset \in \Aa\) is not listed as an axiom because it follows: \(\Omega \in \Aa\) by (i), so \(\Omega^c = \emptyset \in \Aa\) by (ii). Several official solutions verify "\(\emptyset \in \Aa\)" where the definition asks for "\(\Omega \in \Aa\)". Both are fine, but in an exam quote the axiom as stated.
Proposition 1.7 intersection of \(\sigma\)-algebras Script 1.7
Let \(I\) be a non-empty index set (finite, countable or even uncountable) and let \(\Aa_\alpha\) be a \(\sigma\)-algebra over \(\Omega\) for every \(\alpha \in I\). Then \(\Aa := \bigcap_{\alpha\in I}\Aa_\alpha\) is also a \(\sigma\)-algebra over \(\Omega\).
Script proof: "Exercises." — it is Sheet 1, Exercise 5, worked below.
Why \(I \ne \emptyset\) is assumed My addition: with no \(\alpha\) at all, the condition "\(X\in\Aa_\alpha\) for every \(\alpha\in I\)" holds for every \(X\) (there is nothing to check). So the "intersection" would have to be read as "all subsets of \(\Omega\)", that is \(\pow(\Omega)\). That happens to be a \(\sigma\)-algebra too, but it needs a separate convention. Assuming \(I\ne\emptyset\) avoids the special case.
The union is a different story. The union of two \(\sigma\)-algebras is usually not one; that is Sheet 1 Exercise 4(ii). Intersecting keeps only sets that everybody agrees about, and the axioms survive; uniting throws together sets from two different systems whose combinations belong to neither.
Lemma 1.8 generator of a \(\sigma\)-algebra Script 1.8
For a system of subsets \(\mathcal E \subseteq \pow(\Omega)\),
\[ \sigma(\mathcal E) := \bigcap\{\Aa \mid \Aa \text{ is a } \sigma\text{-algebra on } \Omega \text{ and } \mathcal E \subseteq \Aa\} \]is the smallest \(\sigma\)-algebra on \(\Omega\) containing \(\mathcal E\). We call \(\mathcal E\) the generator and \(\sigma(\mathcal E)\) the \(\sigma\)-algebra generated by \(\mathcal E\).
Proof supplied by me — the script states this without proof
Step 1: the family being intersected is non-empty. We need at least one \(\sigma\)-algebra on \(\Omega\) that contains \(\mathcal E\). The power set \(\pow(\Omega)\) is one: it satisfies the three axioms of Definition 1.6 (this is Example 1.9(ii) below), and it contains every subset of \(\Omega\), in particular every member of \(\mathcal E\). So the intersection is over a non-empty family and Proposition 1.7 applies.
Step 2: \(\sigma(\mathcal E)\) is a \(\sigma\)-algebra. Immediately from Proposition 1.7, since it is an intersection of a non-empty family of \(\sigma\)-algebras on \(\Omega\).
Step 3: it contains \(\mathcal E\). Let \(E \in \mathcal E\). Every \(\Aa\) appearing in the intersection satisfies \(\mathcal E \subseteq \Aa\), so \(E \in \Aa\) for every such \(\Aa\). Being in all of them is precisely being in their intersection, so \(E \in \sigma(\mathcal E)\).
Step 4: it is the smallest such. Let \(\mathcal B\) be any \(\sigma\)-algebra on \(\Omega\) with \(\mathcal E \subseteq \mathcal B\). Then \(\mathcal B\) is one of the sets being intersected, and an intersection is contained in each of its members, so \(\sigma(\mathcal E) \subseteq \mathcal B\). ∎
Why "smallest" is worth having. It converts an existence question into a containment check. To prove \(\sigma(\mathcal E) \subseteq \mathcal B\) you never have to describe \(\sigma(\mathcal E)\) — you only have to show \(\mathcal E \subseteq \mathcal B\) and that \(\mathcal B\) is a \(\sigma\)-algebra. Sheet 2 Exercise 5, Sheet 3 Exercise 1 and Sheet 3 Exercise 2 are all won by exactly this move.
Example 1.9 \(\sigma\)-algebras Script 1.9
- \(\{\emptyset,\Omega\}\) is a \(\sigma\)-algebra on \(\Omega\), called the trivial \(\sigma\)-algebra. Check: \(\Omega\) is in it; the complements are \(\emptyset^c = \Omega\) and \(\Omega^c = \emptyset\), both in it; any union of copies of \(\emptyset\) and \(\Omega\) is again \(\emptyset\) or \(\Omega\).
- The power set \(\pow(\Omega)\) is a \(\sigma\)-algebra on \(\Omega\). Check: every subset of \(\Omega\) is in it, so any requirement of the form "this subset must be in it" holds automatically.
- For every \(A \subseteq \Omega\), \(\sigma(\{A\}) = \{\emptyset, \Omega, A, A^c\}\). Check: this collection is closed under complements (the four complements are \(\Omega, \emptyset, A^c, A\)) and under unions (any union of these four is one of the four again — e.g. \(A \cup A^c = \Omega\)), and it contains \(A\). By Lemma 1.8 the generated \(\sigma\)-algebra is the smallest one containing \(A\); no member can be dropped, since each is forced by the axioms. Note the degenerate cases: if \(A = \emptyset\) or \(A = \Omega\) the list collapses to the trivial \(\sigma\)-algebra.
Corollary 1.10 \(\sigma\)-algebras are closed under set operations Script 1.10
Let \(\Aa\) be a \(\sigma\)-algebra over \(\Omega\) and \(A, B \in \Aa\). Then
\[ \Omega,\quad A\cup B,\quad A\cap B,\quad A\setminus B,\quad A\,\Delta\,B := (A\setminus B)\cup(B\setminus A) \]are all in \(\Aa\), and for a countable index set \(I\) with \(\{A_i \mid i \in I\}\subseteq\Aa\) we have \(\bigcap_{i\in I}A_i \in \Aa\). (\(A\,\Delta\,B\) is the symmetric difference: the elements in exactly one of the two sets.)
The script gives no proof; it is Sheet 1, Exercise 3, worked below.
In words: the three axioms look stingy — only complements and countable unions — but they buy you every finite and countable set operation. In practice you may treat a \(\sigma\)-algebra as closed under anything you can build from countably many unions, intersections and complements.
Measurable spaces and Borel sets
Definition 1.11 measurable space, measurable sets Script 1.11
A measurable space [Messraum] is a tuple (an ordered pair) \((\Omega,\Aa)\) where \(\Omega\) is a set and \(\Aa\) is a \(\sigma\)-algebra on \(\Omega\). The elements of \(\Aa\) are called measurable sets.
Note what is absent: no measure yet. A measurable space only says which sets we are allowed to measure, not how big they are. Adding the "how big" gives a measure space (Definition 1.17); requiring total size 1 gives a probability space (Definition 1.20).
Overview 1.12 why the word "measure" Script 1.12
The idea behind measurability is literally to measure the size of mathematical objects. We have good intuition for the size of
- subsets of \(\R\): the length of intervals,
- subsets of \(\R^2\): the area of surfaces,
- subsets of \(\R^3\): the volume of solids.
A rigorous formalism is needed for the corner cases: what volume should a line in 3D space have? What about the volume of an uncountable collection of points?
The script then makes the point that pays off later: we can also measure mass. To get the total mass of the earth's outer crust, take the density of the material and integrate it over the volume of the crust. "Integrate the density over a measure of volume to get a measure of mass" is the key idea behind densities. Another instance: integrate population density over an area to get a number of people.
Example 1.13 the Borel \(\sigma\)-algebra on \(\R^n\) Script 1.13
Let \(\Omega = \R^n\) for \(n \in \N_{>0}\). The \(\sigma\)-algebra generated by the open boxes
\[ \bigl\{(a_1,b_1)\times(a_2,b_2)\times\cdots\times(a_n,b_n) \;\bigm|\; a_i < b_i \text{ for all } i\in[n]\bigr\} \;\subseteq\; \pow(\R^n) \]is called the Borel \(\sigma\)-algebra on \(\R^n\), written \(\mathcal B^n\). For \(n=1\) we simply write \(\mathcal B\).
Unpacking the notation. \((a,b)\) is the open interval \(\{x \in \R \mid a < x < b\}\); \(X \times Y := \{(x,y) \mid x \in X, y \in Y\}\) is the Cartesian product, so an open box in \(\R^2\) is an open rectangle and in \(\R^3\) an open brick. The generator is the set of all such boxes, for all choices of endpoints.
What \(\mathcal B\) contains. Far more than intervals. Since \(\sigma\)-algebras are closed under countable operations (Corollary 1.10): \([a,b] = \bigcap_{k\ge1}\bigl(a-\tfrac1k,\,b+\tfrac1k\bigr)\) is Borel; \(\{x\} = [x,x]\) is Borel; \(\Q = \bigcup_{q\in\Q}\{q\}\) is Borel, being a countable union of singletons. Every set you will ever write down explicitly is Borel. The sets that are not have to be conjured with the axiom of choice — see Theorem 1.28.
Remark 1.14 topological view on \(\mathcal B\) Script 1.14
If you know what a topology \(\mathcal O\) on a set \(\Omega\) is, you can try to prove that the Borel \(\sigma\)-algebra \(\mathcal B^n\) on \(\R^n\) is \(\sigma(\mathcal O^n)\), where \(\mathcal O^n\) is the standard topology on \(\R^n\).
Translation, for those who do not: a topology is a chosen collection of subsets declared "open"; the standard one on \(\R^n\) declares \(A\) open when every point of \(A\) has a small ball around it still inside \(A\). The remark says: generating from all open sets gives the same \(\sigma\)-algebra as generating from open boxes alone. The reason is that every open set is a countable union of boxes with rational corners. Sheet 2, Exercise 5 proves exactly this (with half-open rational intervals), and it is worked below, so you do not need any topology.
Lemma 1.15 induced \(\sigma\)-algebra Script 1.15
Let \((\Omega,\Aa)\) be a measurable space and \(B \subseteq \Omega\) a non-empty subset. Then
\[ \Aa|_B := \Aa \cap B := \{A \cap B \mid A \in \Aa\} \]is a \(\sigma\)-algebra on \(B\), called the induced \(\sigma\)-algebra or the restriction of \(\Aa\) to \(B\). For \(\mathcal E \subseteq \pow(\Omega)\) we have \(\sigma(\mathcal E)|_B = \sigma(\mathcal E|_B)\).
Proof of the first claim supplied by me; the second claim is Sheet 3 Exercise 2
Note first that the ambient set is now \(B\), so "complement" inside \(\Aa|_B\) means \(B \setminus \cdot\), not \(\Omega\setminus\cdot\). Check the three axioms of Definition 1.6.
(i) \(B \in \Aa|_B\). Take \(A = \Omega\), which lies in \(\Aa\) by axiom (i). Then \(\Omega \cap B = B\). ✓
(ii) closed under complements in \(B\). Let \(C \in \Aa|_B\), so \(C = A \cap B\) for some \(A \in \Aa\). Then
\[ B \setminus C = B \setminus (A\cap B) = B \cap (A \cap B)^c = B \cap (A^c \cup B^c) = (B\cap A^c)\cup(B\cap B^c) = A^c \cap B, \]where the second step is "\(X\setminus Y = X\cap Y^c\)", the third is de Morgan (Lemma 1.3), the fourth is distributivity of \(\cap\) over \(\cup\), i.e. \(X\cap(Y\cup Z)=(X\cap Y)\cup(X\cap Z)\) (B2 — distributive laws), and the last uses \(B \cap B^c = \emptyset\) together with \(S\cup\emptyset=S\). Since \(A^c \in \Aa\) by axiom (ii), the set \(A^c \cap B\) is of the required form. ✓
(iii) closed under countable unions. Let \(C_i = A_i \cap B\) with \(A_i \in \Aa\) for \(i \in \N\). Intersection distributes over union, so
\[ \bigcup_{i\in\N} C_i = \bigcup_{i\in\N}(A_i \cap B) = \Bigl(\bigcup_{i\in\N}A_i\Bigr)\cap B, \]and \(\bigcup_i A_i \in \Aa\) by axiom (iii). ✓ ∎
Convention 1.16 — which \(\sigma\)-algebra is meant Script 1.16
In this course we always assume non-empty "continuous spaces" \(A \subseteq \R^n\) to be equipped with the Borel \(\sigma\)-algebra restricted to \(A\), that is \(\mathcal B^n|_A\), and countable spaces to be equipped with their power set.
In words: from here on, whenever the script writes \([0,1]\) or \(\R\) or \(\{1,\dots,6\}\) without naming a \(\sigma\)-algebra, this convention has silently supplied one. In an exam, if you are asked to "set up the probability space", writing \(\Aa = \pow(\Omega)\) for a discrete \(\Omega\) and \(\Aa = \mathcal B|_\Omega\) for a continuous one is exactly what is expected.
Measures
Definition 1.17 measure, measure space Script 1.17
Let \((\Omega,\Aa)\) be a measurable space. We call \(\mu : \Aa \to [0,\infty]\) a measure [Maß] if
- \(\mu(\emptyset) = 0\),
- it is non-negative: \(\mu(A) \ge 0\) for all \(A \in \Aa\), and
- it is \(\sigma\)-additive: for all countable collections \((A_i)_{i\in\N}\) of pairwise disjoint sets in \(\Aa\),
The triple \((\Omega,\Aa,\mu)\) is then called a measure space.
Reading the pieces. The domain is \(\Aa\), not \(\pow(\Omega)\) — that restriction is the whole point of the previous subsection. The codomain \([0,\infty]\) includes \(+\infty\), so a measure may give a set infinite size (the length of \(\R\) is \(\infty\)). Condition (ii) is in fact implied by the codomain being \([0,\infty]\); the script lists it for emphasis. Condition (iii) is the only real condition: the size of a pile of non-overlapping pieces is the sum of their sizes.
Worth knowing: \(\sigma\)-additivity implies finite additivity. Given disjoint \(A, B\), set \(A_0 = A\), \(A_1 = B\) and \(A_i = \emptyset\) for \(i \ge 2\). These are still pairwise disjoint, their union is \(A \cup B\), and the infinite sum is \(\mu(A)+\mu(B)+0+0+\cdots\) using \(\mu(\emptyset) = 0\). So \(\mu(A\mathbin{\dot\cup}B) = \mu(A)+\mu(B)\). The same padding works for any finite number of pairwise disjoint sets \(A_0,\dots,A_m\) — set \(A_i=\emptyset\) for \(i>m\) — so \(\mu(A_0\mathbin{\dot\cup}\cdots\mathbin{\dot\cup}A_m)=\mu(A_0)+\cdots+\mu(A_m)\). This padding step is used in almost every proof below (the proof of Proposition 1.19(i) uses it with three pieces).
Calculating with \(\infty\) in \([0,\infty]\) My addition
Because a measure may take the value \(+\infty\), the course calculates in the extended half-line \([0,\infty]=[0,\infty)\cup\{+\infty\}\). Here \(\infty\) is not a real number but a symbol for "bigger than every real number", and only these rules are allowed:
- \(a+\infty=\infty+a=\infty\) for every \(a\in[0,\infty]\). Example: the length of \([0,1]\cup[2,\infty)\) is \(1+\infty=\infty\).
- \(c\cdot\infty=\infty\) for \(c>0\), and by convention \(0\cdot\infty=0\) (a set of length 0 repeated "infinitely thick" still has no size — this convention is standard in measure theory).
- \(\infty-\infty\) is not defined. That is why the subtraction rule in Proposition 1.19(ii) below needs \(\mu(A)<\infty\).
- A series \(\sum_i a_i\) of terms \(a_i\ge0\) always has a value in \([0,\infty]\): its partial sums only grow, so they either converge to a real number or grow beyond every bound (value \(\infty\)). No convergence check is needed, which is why the right-hand side of \(\sigma\)-additivity always makes sense. Example: \(\sum_{i}c\) for a constant \(c\ge0\) is \(0\) if \(c=0\) and \(\infty\) if \(c>0\) — the fact the Vitali proofs turn on.
More detail: B4 — arithmetic in \([0,\infty]\); series with value \(+\infty\): Analysis 3.1.
Remark 1.18 \(\sigma\)-additivity is only countable Script 1.18
\(\sigma\)-additivity is defined only for countable collections. For uncountable collections the sum becomes problematic. The script's example: every single point \(\{x\}\) in \([0,1]\) has length 0, yet their uncountable union is \([0,1]\), which has length 1. If additivity were allowed over uncountable families we would conclude \(1 = 0\).
This is the same wall you hit on page 0 when trying to build a uniform distribution on \([0,1]\) from single-point probabilities. The axiom is written "countable" on purpose.
Proposition 1.19 basic properties of measures Script 1.19
Let \((\Omega,\Aa,\mu)\) be a measure space, \(A, B \in \Aa\), and \((A_i)_{i\in\N}\subseteq\Aa\). Then
- \(\mu(A\cup B) + \mu(A\cap B) = \mu(A) + \mu(B)\),
- \(\mu(B\setminus A) = \mu(B) - \mu(A)\), if \(A \subseteq B\) and \(\mu(A) < \infty\),
- \(\mu\) is monotone: \(A \subseteq B \implies \mu(A) \le \mu(B)\),
- \(\mu\) is continuous from below: \(\mu(A_k) \uparrow \mu\bigl(\bigcup_{i\in\N}A_i\bigr)\) for \(A_0 \subseteq A_1 \subseteq A_2 \subseteq \cdots\),
- \(\mu\) is continuous from above: \(\mu(A_k) \downarrow \mu\bigl(\bigcap_{i\in\N}A_i\bigr)\) for \(A_0 \supseteq A_1 \supseteq \cdots\) with \(\mu(A_0) < \infty\),
- \(\mu\) is \(\sigma\)-subadditive: \(\mu\bigl(\bigcup_{i\in\N}A_i\bigr) \le \sum_{i\in\N}\mu(A_i)\).
The script states all six without proof. All six are used constantly, so here they are.
Proofs of (i)–(vi) supplied by me — the script gives none
Throughout, "additivity" means the finite additivity derived in Definition 1.17 by padding with \(\emptyset\).
(i) \(\mu(A\cup B)+\mu(A\cap B)=\mu(A)+\mu(B)\). Split \(A\cup B\) into three pairwise disjoint pieces:
\[ A\cup B = (A\setminus B)\;\dot\cup\;(A\cap B)\;\dot\cup\;(B\setminus A). \]All three are in \(\Aa\) by Corollary 1.10, and they are disjoint because each element of \(A \cup B\) is in exactly one of "only \(A\)", "both", "only \(B\)". Additivity gives
\[ \mu(A\cup B)=\mu(A\setminus B)+\mu(A\cap B)+\mu(B\setminus A). \]Splitting \(A\) and \(B\) the same way, \(A = (A\setminus B)\,\dot\cup\,(A\cap B)\) and \(B = (B\setminus A)\,\dot\cup\,(A\cap B)\), so
\[ \mu(A)+\mu(B)=\mu(A\setminus B)+\mu(A\cap B)+\mu(B\setminus A)+\mu(A\cap B). \]The first three terms on the right are exactly \(\mu(A\cup B)\), so the right-hand side equals \(\mu(A\cup B)+\mu(A\cap B)\). ✓
(ii) \(\mu(B\setminus A)=\mu(B)-\mu(A)\) when \(A\subseteq B\), \(\mu(A)<\infty\). Because \(A\subseteq B\), we may split \(B = A \,\dot\cup\, (B\setminus A)\) — every element of \(B\) is either in \(A\) or not, and the two pieces do not overlap. Additivity:
\[ \mu(B)=\mu(A)+\mu(B\setminus A). \]Now subtract \(\mu(A)\) from both sides. This last step is where \(\mu(A) < \infty\) is needed: if \(\mu(A)=\infty\) then \(\mu(B)=\infty\) too and "\(\infty-\infty\)" is not a number. ✓
(iii) monotonicity. From the same split, \(\mu(B)=\mu(A)+\mu(B\setminus A)\ge\mu(A)\), since \(\mu(B\setminus A)\ge 0\) by non-negativity. No finiteness is needed here, because nothing is subtracted. ✓
(iv) continuity from below. Turn the growing sequence into disjoint rings:
\[ B_0 := A_0, \qquad B_k := A_k\setminus A_{k-1}\ (k\ge1). \]Each \(B_k \in \Aa\) by Corollary 1.10. They are pairwise disjoint: for \(j < k\) we have \(B_j \subseteq A_j \subseteq A_{k-1}\) while \(B_k\) avoids \(A_{k-1}\) by construction. And they rebuild the sets:
\[ \bigcup_{i=0}^{k}B_i = A_k, \qquad \bigcup_{i\in\N}B_i=\bigcup_{i\in\N}A_i, \]the first by induction (adding the ring \(B_k\) to \(A_{k-1}\) gives \(A_k\)), the second because every \(\omega\) in some \(A_i\) lies in \(B_k\) for the smallest such index \(k\). Now apply \(\sigma\)-additivity and then the definition of an infinite sum as the limit of partial sums:
\[ \mu\Bigl(\bigcup_{i\in\N}A_i\Bigr)=\sum_{i\in\N}\mu(B_i) =\lim_{k\to\infty}\sum_{i=0}^{k}\mu(B_i) =\lim_{k\to\infty}\mu(A_k). \]The last equality is finite additivity applied to the \(k+1\) disjoint pieces \(B_0,\dots,B_k\): \(\sum_{i=0}^{k}\mu(B_i)=\mu\bigl(\bigcup_{i=0}^{k}B_i\bigr)=\mu(A_k)\).
The sequence \(\mu(A_k)\) increases by (iii), so the limit is an increasing limit: the arrow \(\uparrow\) is justified. ✓
(v) continuity from above. Flip the shrinking sequence into a growing one inside \(A_0\). Put \(C_k := A_0\setminus A_k\). Since \(A_k \supseteq A_{k+1}\), removing a smaller set leaves more: \(C_0 \subseteq C_1 \subseteq \cdots\). Their union is
\[ \bigcup_{k\in\N}C_k=\bigcup_{k\in\N}(A_0\setminus A_k)=A_0\setminus\bigcap_{k\in\N}A_k, \]by de Morgan (Lemma 1.3) inside \(A_0\): being outside some \(A_k\) is being outside the intersection. Apply (iv) to \((C_k)\):
\[ \mu(C_k)\uparrow\mu\Bigl(A_0\setminus\bigcap_i A_i\Bigr). \]Because \(A_k \subseteq A_0\) and \(\mu(A_0)<\infty\), monotonicity gives \(\mu(A_k)\le\mu(A_0)<\infty\), so (ii) applies to both sides:
\[ \mu(A_0)-\mu(A_k)\;\uparrow\;\mu(A_0)-\mu\Bigl(\bigcap_i A_i\Bigr). \]Subtracting the whole line from the finite number \(\mu(A_0)\) reverses the arrow and gives \(\mu(A_k)\downarrow\mu(\bigcap_i A_i)\). ✓
Why \(\mu(A_0)<\infty\) cannot be dropped my addition: take \(\Omega=\R\) with the length measure (called Lebesgue measure; it gives \([a,b]\) the size \(b-a\)) and \(A_k=[k,\infty)\). Then \(\mu(A_k)=\infty\) for every \(k\), so the sequence \(\mu(A_k)\) stays at \(\infty\). But \(\bigcap_k A_k=\emptyset\) (no real number is \(\ge k\) for every \(k\)), and \(\mu(\emptyset)=0\). So \(\mu(A_k)\) does not converge to \(\mu(\bigcap_k A_k)\). This is the standard counterexample, and it is the reason (iv) carries no finiteness assumption while (v) does.
(vi) \(\sigma\)-subadditivity. Disjointify again, this time by removing everything seen before:
\[ B_0:=A_0,\qquad B_k:=A_k\setminus(A_0\cup\cdots\cup A_{k-1})\ (k\ge1). \]These are in \(\Aa\), pairwise disjoint (an element enters at the first index where it appears and is excluded ever after), and \(\bigcup_i B_i=\bigcup_i A_i\). Crucially \(B_k\subseteq A_k\), so \(\mu(B_k)\le\mu(A_k)\) by monotonicity (iii). Hence
\[ \mu\Bigl(\bigcup_i A_i\Bigr)=\mu\Bigl(\bigcup_i B_i\Bigr)=\sum_i\mu(B_i)\le\sum_i\mu(A_i). \]Equality holds, for example, when the \(A_i\) are pairwise disjoint (then \(B_k=A_k\)). ∎
In words: (i) inclusion–exclusion for two sets; (ii) subtracting a piece subtracts its size; (iii) bigger sets are not smaller; (iv) and (v) a measure respects limits of growing and shrinking sequences; (vi) overlapping pieces can only over-count.
Probability measures
Definition 1.20 probability measure, probability space Script 1.20
Let \((\Omega,\Aa)\) be a measurable space. A measure \(\P:\Aa\to[0,\infty]\) is called a probability measure [Wahrscheinlichkeitsmaß] if \(\P(\Omega)=1\). The triple \((\Omega,\Aa,\P)\) is then called a probability space [Wahrscheinlichkeitsraum]. In this case \(\Aa\) is called the event space or the set of events of interest.
That single extra line is Kolmogorov's axiomatisation. Unpacked, a probability measure satisfies: \(\P(A)\ge0\); \(\P(\Omega)=1\); and \(\P\) is \(\sigma\)-additive. Everything in this course follows from those three.
Immediate consequences worth memorising:
- \(\P(A) \le 1\) for every \(A\), by monotonicity (Prop. 1.19(iii)) with \(A\subseteq\Omega\).
- \(\P(A^c) = 1-\P(A)\), by Prop. 1.19(ii) with \(A \subseteq \Omega\) and \(\P(A)\le1<\infty\). This is Sheet 2 Exercise 1(i).
- \(\P(\emptyset)=0\), from the measure axiom (i) — or from \(\P(\Omega^c)=1-1\).
Overview 1.21 probability as measure Script 1.21
Intuitively, the fact that probability is essentially a measure is the idea that we "measure the likelihood" of something happening. The machinery developed for measuring subsets of arbitrary spaces is exactly what we need to assign probabilities consistently — to measure the "size of subsets" according to their probability.
The script's diagram (which is also on the title page of the script), redrawn:
Left: the experiment produces an outcome somewhere in \(\Omega\); three events \(A, B, C\) are marked. Middle: those events, and everything you can build from them with complements and countable unions, make up the \(\sigma\)-algebra \(\Aa\). Right: \(\P\) sends each event to a number in \([0,1]\).
Theorem 1.22 inclusion–exclusion principle Script 1.22
Let \((\Omega,\Aa,\P)\) be a probability space and \(A_1,\dots,A_n \in \Aa\) any finite collection of events (\(n\in\N_{>0}\)). Then
\[ \P\Bigl(\bigcup_{i=1}^{n}A_i\Bigr) =\sum_{k=1}^{n}(-1)^{k-1}\!\!\sum_{1\le i_1<\cdots<i_k\le n}\!\!\P\bigl(A_{i_1}\cap\cdots\cap A_{i_k}\bigr). \]Script proof: "Exercises." — it is Sheet 2, Exercise 3.
Reading the double sum. The outer sum runs over the number \(k\) of sets being intersected. The inner sum runs over every way of choosing \(k\) indices out of \(n\) in increasing order — there are \(\binom{n}{k}\) such choices, where \(\binom{n}{k}=\frac{n!}{k!\,(n-k)!}\) is the binomial coefficient [Binomialkoeffizient], the number of \(k\)-element subsets of an \(n\)-element set (B3 — binomial coefficients). The sign \((-1)^{k-1}\) is \(+\) for odd \(k\) and \(-\) for even \(k\). For \(n=3\) it reads
\[ \P(A\cup B\cup C)=\P(A)+\P(B)+\P(C)-\P(A\cap B)-\P(A\cap C)-\P(B\cap C)+\P(A\cap B\cap C), \]which is exactly Sheet 2 Exercise 1(iv).
In words: add the pieces; you have double-counted every pairwise overlap, so subtract them; you have now removed the triple overlaps once too often, so add them back; and so on, alternating.
The counting version of this principle, with a proof by counting and the derangement example, is on B3 — inclusion–exclusion.
Proof by induction on \(n\) Sheet 2 · Ex 3 — restructured by me for readability
The method my addition: a proof by induction [vollständige Induktion] shows a statement for every \(n=1,2,3,\dots\) in two steps. Base case: prove it for \(n=1\). Induction step: assume it for some \(n\) (the induction hypothesis, IH) and deduce it for \(n+1\). Then it holds for 1, hence for 2, hence for 3, and so on — like dominoes. Taught from scratch in Analysis 2.2 — three tools.
Write \([n]=\{1,\dots,n\}\) and, for a non-empty \(S\subseteq[n]\), write \(A_S:=\bigcap_{i\in S}A_i\). Write \(|S|\) for the number of elements of \(S\) (its cardinality). Choosing an increasing tuple \(i_1<\cdots<i_k\) is the same as choosing a subset \(S\) of size \(k\), so the claim can be restated more compactly as
\[ \P\Bigl(\bigcup_{i=1}^{n}A_i\Bigr)=\sum_{\emptyset\ne S\subseteq[n]}(-1)^{|S|-1}\P(A_S). \tag{$\star$}\]Base case \(n=1\). Only \(S=\{1\}\) occurs, with \((-1)^{0}=1\), so both sides are \(\P(A_1)\). ✓
The two-set case, which we will reuse. \(A\cup B=(A\setminus B)\,\dot\cup\,B\) — every element of the union is either in \(B\), or in \(A\) but not \(B\). Additivity gives \(\P(A\cup B)=\P(A\setminus B)+\P(B)\). Also \(A=(A\setminus B)\,\dot\cup\,(A\cap B)\), so \(\P(A\setminus B)=\P(A)-\P(A\cap B)\) by Prop. 1.19(ii) (all quantities are \(\le1\), hence finite). Substituting,
\[ \P(A\cup B)=\P(A)+\P(B)-\P(A\cap B). \tag{$\dagger$}\]Induction step \(n\to n+1\). Assume \((\star)\) holds for \(n\). Put \(U:=\bigcup_{i=1}^{n}A_i\). By \((\dagger)\) applied to \(U\) and \(A_{n+1}\),
\[ \P\Bigl(\bigcup_{i=1}^{n+1}A_i\Bigr)=\P(U)+\P(A_{n+1})-\P(U\cap A_{n+1}). \]Now handle the last term. Intersection distributes over union:
\[ U\cap A_{n+1}=\bigcup_{i=1}^{n}\bigl(A_i\cap A_{n+1}\bigr)=\bigcup_{i=1}^{n}B_i, \qquad B_i:=A_i\cap A_{n+1}. \]That is a union of \(n\) events, so the induction hypothesis applies to it. For \(\emptyset \ne S\subseteq[n]\) we have \(\bigcap_{i\in S}B_i=\bigl(\bigcap_{i\in S}A_i\bigr)\cap A_{n+1}=A_{S\cup\{n+1\}}\), hence
\[ \P(U\cap A_{n+1})=\sum_{\emptyset\ne S\subseteq[n]}(-1)^{|S|-1}\P\bigl(A_{S\cup\{n+1\}}\bigr). \]Putting the three pieces together and flipping the sign of the last sum:
\[ \P\Bigl(\bigcup_{i=1}^{n+1}A_i\Bigr) =\underbrace{\sum_{\emptyset\ne S\subseteq[n]}(-1)^{|S|-1}\P(A_S)}_{\text{(1)}} +\underbrace{\P(A_{\{n+1\}})}_{\text{(2)}} +\underbrace{\sum_{\emptyset\ne S\subseteq[n]}(-1)^{|S|}\P\bigl(A_{S\cup\{n+1\}}\bigr)}_{\text{(3)}}. \]Every non-empty \(T\subseteq[n+1]\) appears exactly once, with the right sign. There are three mutually exclusive cases for such a \(T\):
- \(n+1\notin T\). Then \(T\subseteq[n]\) and \(T\) contributes once, in (1), with sign \((-1)^{|T|-1}\). ✓
- \(T=\{n+1\}\). It contributes once, in (2), with sign \(+1=(-1)^{1-1}\). ✓
- \(n+1\in T\) and \(T\ne\{n+1\}\). Then \(T=S\cup\{n+1\}\) for the unique non-empty \(S=T\setminus\{n+1\}\subseteq[n]\), and it contributes once, in (3), with sign \((-1)^{|S|}=(-1)^{|T|-1}\). ✓
So the right-hand side equals \(\sum_{\emptyset\ne T\subseteq[n+1]}(-1)^{|T|-1}\P(A_T)\), which is \((\star)\) for \(n+1\). ∎
A remark of mine. The official solution proves the same thing but keeps the "\(i_1<\cdots<i_k\)" tuple notation, which forces an index shift \(k \to k-1\) near the end and is hard to follow. Switching to subsets \(S\) removes the shift entirely. There is also a slicker proof using indicator functions and the identity \(\one_{(\bigcup A_i)^c}=\prod_i(1-\one_{A_i})\) (\(\prod_i\) = the product over all \(i\); see B3 — product notation), but it needs expectations, which arrive only in §2.1.
The bonus part of Sheet 2 Exercise 3 asks you to show the dual formula \(\P(A_1\cap\cdots\cap A_n)=\sum_{k=1}^{n}(-1)^{k-1}\sum_{\{i_1,\dots,i_k\}\subseteq[n]} \P(A_{i_1}\cup\cdots\cup A_{i_k})\). In subset notation, with \(U_S:=\bigcup_{i\in S}A_i\): \(\P(A_{[n]})=\sum_{\emptyset\ne S\subseteq[n]}(-1)^{|S|-1}\P(U_S)\). The official solution does not work the bonus; here is a full solution mine.
Step 1 (complement). By de Morgan (Lemma 1.3), \(\bigcap_{i=1}^n A_i=\bigl(\bigcup_{i=1}^n A_i^c\bigr)^c\), so \(\P(A_{[n]})=1-\P\bigl(\bigcup_i A_i^c\bigr)\).
Step 2 (apply \((\star)\) to the events \(A_i^c\)).
\[ \P\Bigl(\bigcup_{i=1}^n A_i^c\Bigr)=\sum_{\emptyset\ne S\subseteq[n]}(-1)^{|S|-1} \P\Bigl(\bigcap_{i\in S}A_i^c\Bigr). \]Step 3 (complement again). By de Morgan, \(\bigcap_{i\in S}A_i^c=(U_S)^c\), so \(\P\bigl(\bigcap_{i\in S}A_i^c\bigr)=1-\P(U_S)\). Substituting and splitting the sum:
\[ \P(A_{[n]})=1-\sum_{\emptyset\ne S\subseteq[n]}(-1)^{|S|-1} +\sum_{\emptyset\ne S\subseteq[n]}(-1)^{|S|-1}\P(U_S). \]Step 4 (the constant sum equals 1). There are \(\binom nk\) subsets of size \(k\), so \(\sum_{S\ne\emptyset}(-1)^{|S|-1}=\sum_{k=1}^n\binom nk(-1)^{k-1}=1-\sum_{k=0}^n\binom nk(-1)^k =1-(1-1)^n=1\), by the binomial theorem \((a+b)^n=\sum_k\binom nk a^kb^{n-k}\) with \(a=-1,b=1\). So the first two terms give \(1-1=0\), and what remains is exactly the claimed formula. ∎
Check with \(n=2\): \(\P(A_1\cap A_2)=\P(A_1)+\P(A_2)-\P(A_1\cup A_2)\), which is \((\dagger)\) rearranged. ✓
Small slips in the official induction: the base case is labelled "(IH)" instead of "base case" and starts at \(n=2\) (the case \(n=1\) is trivially true, so no harm).
Cumulative distribution functions
Definition 1.23 cumulative distribution function (cdf) Script 1.23
Let \(\P\) be a probability measure on \((\R,\mathcal B)\). The cumulative distribution function [Verteilungsfunktion] of \(\P\) is
\[ F_\P:\R\to[0,1],\qquad x\mapsto\P\bigl((-\infty,x]\bigr), \]often written just \(F\) when \(\P\) is clear.
Reading it. \((-\infty,x]\) is everything up to and including \(x\). So \(F(x)\) answers "what is the probability of landing at or below \(x\)?" Note the definition applies only to measures on the real line — it uses the order structure of \(\R\), which an abstract \(\Omega\) does not have.
Why bother, when we already have \(\P\)? Because \(F\) is a single function \(\R\to[0,1]\), while \(\P\) is a function on the enormous collection \(\mathcal B\). Theorem 1.25 below says no information is lost: the small object determines the big one.
Lemma 1.24 properties of cdfs Script 1.24
Let \((\R,\mathcal B,\P)\) be a probability space and \(F\) the cdf of \(\P\). Then
- \(F\) is monotonically increasing: \(x \le y \implies F(x)\le F(y)\).
- \(F\) is right-continuous: for all \(x_n\downarrow x\) in \(\R\), \(F(x_n)\downarrow F(x)\).
- \(F\) has a left-hand limit: for all \(x_n\uparrow x\), \(F(x_n)\uparrow F(x^-):=\P\bigl((-\infty,x)\bigr)\).
- the discontinuities correspond to singleton probabilities: \(F(x)-F(x^-)=\P(\{x\})\) for all \(x\in\R\).
- \(\lim_{x\to-\infty}F(x)=0\) and \(\lim_{x\to\infty}F(x)=1\).
(Background: \(x_n\downarrow x\) means the sequence decreases and converges to \(x\), i.e. approaches \(x\) from the right; \(x_n\uparrow x\) approaches from the left. One-sided limits of a function, defined through exactly such sequences, are stated in Analysis 9.1; continuity via sequences in Analysis 4.1.)
Proof of (i)–(v) supplied by me — the script gives none
Everything is an application of Proposition 1.19 to cleverly chosen sequences of sets.
(i) monotone. If \(x\le y\) then \((-\infty,x]\subseteq(-\infty,y]\), because any \(t\le x\) also satisfies \(t\le y\). Monotonicity of measures, Prop. 1.19(iii), gives \(\P((-\infty,x])\le\P((-\infty,y])\), i.e. \(F(x)\le F(y)\). ✓
(ii) right-continuity. Let \(x_n\downarrow x\), so \(x_1\ge x_2\ge\cdots\) and \(x_n\to x\). The sets \(A_n:=(-\infty,x_n]\) then shrink: \(A_1\supseteq A_2\supseteq\cdots\). Their intersection is
\[ \bigcap_{n}(-\infty,x_n]=(-\infty,x], \]because \(t\le x_n\) for every \(n\) holds exactly when \(t\le\inf_n x_n=x\). Since \(\P(A_1)\le1<\infty\), continuity from above (Prop. 1.19(v)) applies and gives \(\P(A_n)\downarrow\P((-\infty,x])\), i.e. \(F(x_n)\downarrow F(x)\). ✓
(iii) left-hand limit. Let \(x_n\uparrow x\) with \(x_n < x\). The sets \(A_n:=(-\infty,x_n]\) now grow. Their union is
\[ \bigcup_n(-\infty,x_n]=(-\infty,x), \]the open half-line: if \(t<x\) then, since \(x_n\to x\), some \(x_n\) exceeds \(t\), so \(t\in A_n\); conversely every \(t\in A_n\) satisfies \(t\le x_n<x\). Continuity from below (Prop. 1.19(iv)) gives \(F(x_n)\uparrow\P((-\infty,x))=F(x^-)\). ✓
(iv) jumps are point masses. \((-\infty,x)\subseteq(-\infty,x]\) and the difference of the two sets is exactly \(\{x\}\). Both have finite measure, so Prop. 1.19(ii) gives
\[ \P(\{x\})=\P\bigl((-\infty,x]\bigr)-\P\bigl((-\infty,x)\bigr)=F(x)-F(x^-). \;✓ \]In particular \(F\) is continuous at \(x\) exactly when \(\P(\{x\})=0\).
(v) the two limits. \(F\) is monotone by (i). For a monotone function it is enough to check one sequence in each direction: if \(x\le -n\) then \(0\le F(x)\le F(-n)\), and if \(x\ge n\) then \(F(n)\le F(x)\le 1\), so \(F(x)\) is squeezed as soon as \(F(-n)\to0\) and \(F(n)\to1\). Take \(A_n:=(-\infty,-n]\); these shrink with \(\bigcap_n A_n=\emptyset\) (no real number is below every \(-n\)) and \(\P(A_0)\le1<\infty\), so Prop. 1.19(v) gives \(F(-n)\downarrow\P(\emptyset)=0\). Take \(B_n:=(-\infty,n]\); these grow with \(\bigcup_n B_n=\R\), so Prop. 1.19(iv) gives \(F(n)\uparrow\P(\R)=1\). ∎
A note on (iii). The statement is only interesting for sequences with \(x_n<x\); if some \(x_n\) equalled \(x\) the union would be \((-\infty,x]\) and the limit would be \(F(x)\), not \(F(x^-)\). So the arrow \(\uparrow\) in the script has to be read here as "increasing to \(x\) from strictly below", i.e. \(x_0\le x_1\le\cdots\), \(x_n\to x\) and \(x_n<x\) for every \(n\).
In words: a cdf is a staircase that never goes down, starts at height 0 on the far left, ends at height 1 on the far right, and includes the right-hand endpoint of every step. The height of a step at \(x\) is the probability of the single point \(x\).
Theorem 1.25 correspondence of cdfs Script 1.25
For any \(F:\R\to[0,1]\) that satisfies (i), (ii) and (v) of Lemma 1.24, there exists a unique probability measure \(\lambda_F\) on \((\R,\mathcal B)\) such that \(F_{\lambda_F}=F\). For any probability measure \(\P\) on \((\R,\mathcal B)\) we have \(\P=\lambda_{F_\P}\).
In words: cdfs and probability measures on the real line are the same information in two formats. Monotone + right-continuous + limits 0 and 1 is not just necessary for being a cdf — it is sufficient. Give me such an \(F\) and I can hand you back the measure, and there is only one.
Why this is the most useful theorem on the page. It means you may always specify a distribution by writing down a single function of one real variable. Every named continuous distribution in §1.3 is introduced this way, and the "determine the cdf" exam task SoSe25 P3b is implicitly invoking it. (WiSe25 P3b and WiSe25 P5 also work with a cdf, but they are given one rather than asked to construct it.)
The script gives no proof, and none is expected of you. For orientation: existence comes from Carathéodory's extension theorem — one defines the measure on intervals by \(\lambda_F((a,b]):=F(b)-F(a)\) and extends it to all of \(\mathcal B\); uniqueness comes from the fact that the intervals \((a,b]\) are closed under intersection and generate \(\mathcal B\). Note the contrast with WiSe25 P1c below, where the generator is not closed under intersection and uniqueness fails.
Caveat 1.26 the measure problem Script 1.26
Generally, we cannot construct useful (probability) measures on the power set of infinite spaces. Therefore we need \(\sigma\)-algebras to talk meaningfully about probability theory.
Why \(\sigma\)-algebras are unavoidable: the Vitali theorems
Both proofs below are proofs by contradiction [Widerspruchsbeweis]: to show that something does not exist, assume it does, compute, and arrive at an impossible statement (here: \(1=0\) or \(1=\infty\)). Since correct steps cannot lead from a true assumption to a false conclusion, the assumption must be false. The model example is the proof that \(\sqrt2\) is irrational: Analysis 1.1 — √2 is not rational. The step "a countable sum of one constant is \(0\) or \(\infty\)" uses the rules for \([0,\infty]\) from the box after Definition 1.17.
Theorem 1.27 Vitali, 1905 Script 1.27
Let \(\Omega=\{0,1\}^{\N}\) be the sample space of infinitely many repeated coin tosses. For \(n\in\N\) define \(T_n:\Omega\to\Omega\) by
\[ \omega=(\omega_n)_{n\in\N}\;\mapsto\;T_n(\omega):=(\omega_1,\dots,\omega_{n-1},\,1-\omega_n,\,\omega_{n+1},\dots), \]the map that flips the result of the \(n\)-th coin toss. For \(A\in\pow(\Omega)\) let \(T_n(A):=\{T_n(\omega)\mid\omega\in A\}\). Then there does not exist a probability measure \(\P\) on the power set \(\pow(\Omega)\) satisfying the invariance property \(\P(T_n(A))=\P(A)\) for all \(A\in\pow(\Omega)\) and \(n\in\N\).
Unpacking \(\{0,1\}^{\N}\): an element is an infinite sequence of 0s and 1s, one per toss — \(\omega = (0,1,1,0,1,\dots)\). This set is uncountable, with the same size as \([0,1]\) (read the sequence as binary digits). The map \(T_n\) leaves every toss alone except the \(n\)-th, which it flips (\(1-0=1\), \(1-1=0\)). Example: \(T_2(0,1,1,0,\dots)=(0,0,1,0,\dots)\) if we count the tosses as first, second, third, …
A small indexing slip in the script: since \(0\in\N\) (Convention 1.1), the sequence \((\omega_n)_{n\in\N}\) starts with \(\omega_0\), but the formula for \(T_n\) lists it from \(\omega_1\). Nothing depends on this; read the formula as "change entry \(n\), keep all others".
Proof sketch supplied by me — the script states this without proof
The argument has the same shape as Theorem 1.28 below, which the script does prove in full.
1. A countable collection of moves. Let \(G\) be the set of all maps obtained by composing finitely many of the \(T_n\) — that is, all "flip the tosses in a finite set \(S\subseteq\N\)" operations. Each such map is determined by the finite set \(S\), and the collection of finite subsets of \(\N\) is countable (there are countably many of size 1, of size 2, and so on, and a countable union of countable sets is countable). So \(G\) is countable.
2. An equivalence relation. Declare \(\omega\sim\omega'\) when they differ in only finitely many positions — equivalently, when \(\omega'=g(\omega)\) for some \(g\in G\). This is an equivalence relation: every \(\omega\) differs from itself in zero places; the relation is symmetric because flipping back undoes a flip; and it is transitive because a finite set union a finite set is finite.
3. Choose representatives. Using the axiom of choice, pick exactly one element from each equivalence class and collect them into \(V\subseteq\Omega\).
4. The translates tile \(\Omega\). The sets \(g(V)\) for \(g\in G\) are pairwise disjoint (two representatives in the same class would have to be equal) and their union is all of \(\Omega\) (every \(\omega\) is \(g\)-related to its own representative). So \(\Omega=\dot\bigcup_{g\in G}g(V)\), a countable disjoint union.
5. The contradiction. Each \(g\) is a composition of finitely many \(T_n\), so repeated use of the invariance property gives \(\P(g(V))=\P(V)\) for every \(g\in G\). By \(\sigma\)-additivity,
\[ 1=\P(\Omega)=\sum_{g\in G}\P\bigl(g(V)\bigr)=\sum_{g\in G}\P(V). \]The right-hand side is a countably infinite sum of one and the same number. If \(\P(V)=0\) it is 0; if \(\P(V)>0\) it is \(+\infty\). It can never be 1. Contradiction. ∎
Theorem 1.28 Vitali set on \([0,1)\) Script 1.28
Let \(\Omega=[0,1)\) and for \(A\subseteq[0,1)\) and \(q\in\Q\) define the rational translate modulo 1 by
\[ A\oplus q:=\{(x+q)\bmod 1 \mid x\in A\}. \]Then there does not exist a probability measure \(\P\) on \(\pow([0,1))\) such that
- \(\P([a,b))=b-a\) for all \(0\le a\le b\le1\),
- \(\P(A\oplus q)=\P(A)\) for all \(A\in\pow([0,1))\) and \(q\in\Q\).
In particular, there exists a subset \(V\subseteq[0,1)\) that is not in \(\mathcal B\), i.e. not Borel measurable.
Notation help: \(x \bmod 1\) is the fractional part of \(x\) — what is left after discarding the whole-number part, so \(1.7 \bmod 1 = 0.7\). Adding \(q\) modulo 1 is "slide everything to the right by \(q\), and whatever falls off the right end reappears at the left": bend \([0,1)\) into a circle and rotate it.
Proof the script's own proof, with my annotations in italics
Define an equivalence relation on \([0,1)\) by
\[ x\sim y \;:\Longleftrightarrow\; x-y\in\Q. \]An equivalence relation is a way of declaring elements "the same for present purposes"; it must be reflexive (\(x\sim x\), true since \(x-x=0\in\Q\)), symmetric (true since \(-(x-y)\) is rational whenever \(x-y\) is) and transitive (true since a sum of rationals is rational). It carves \([0,1)\) into disjoint equivalence classes, each consisting of numbers differing from one another by a rational.
Using the axiom of choice, pick one representative from each equivalence class and collect them in a set \(V\subseteq[0,1)\). This is the classical Vitali set.
(Equivalence relations and the axiom of choice are set up from scratch on B2.)
The axiom of choice says that from any family of non-empty sets one can simultaneously pick an element of each. Here the family is uncountable and there is no rule that names the picks — this non-constructive step is exactly why \(V\) can be so badly behaved.
For each \(q\in\Q\cap[0,1)\) define \(V_q:=V\oplus q\).
These sets are pairwise disjoint. Suppose \(x\in V_q\cap V_r\). Then
\[ x=(v+q)\bmod1=(w+r)\bmod1 \]for some \(v,w\in V\). Thus \((v+q)-(w+r)\) is an integer, so \(v-w\) differs from \(r-q\) by an integer and is therefore rational. Hence \(v\) and \(w\) lie in the same equivalence class. Since \(V\) contains exactly one representative from each class, \(v=w\), and then \(q=r\).
They cover all of \([0,1)\). For any \(x\in[0,1)\), let \(v\in V\) be the chosen representative of the class of \(x\). Then \(x-v\in\Q\), so after reducing modulo 1 we obtain some \(q\in\Q\cap[0,1)\) with \(x=(v+q)\bmod1\in V_q\). Therefore
\[ [0,1)=\bigcup_{q\in\Q\cap[0,1)}V_q. \]And \(\Q\cap[0,1)\) is countable, so this is a countable disjoint union — exactly the situation \(\sigma\)-additivity speaks about.
The contradiction. By \(\sigma\)-additivity and translation invariance,
\[ 1=\P([0,1))=\sum_{q\in\Q\cap[0,1)}\P(V_q)=\sum_{q\in\Q\cap[0,1)}\P(V). \]The first equality uses assumption (i) with \(a=0,b=1\); the third uses assumption (ii), which forces every translate to have the same measure as \(V\) itself.
But \(\Q\cap[0,1)\) is countably infinite. Hence the right-hand side is either 0 if \(\P(V)=0\), or \(+\infty\) if \(\P(V)>0\). It can never equal 1 — a contradiction.
So no such probability measure on \(\pow([0,1))\) exists. Moreover, \(V\) cannot be Borel measurable: otherwise all \(V_q\) would also be Borel measurable. We will see that we can define a cdf for the uniform distribution on \([0,1)\), and Theorem 1.25 then guarantees a uniform measure on \(\mathcal B|_{[0,1)}\), under which all \(V_q\) have the same probability. Again \(\sigma\)-additivity on the partition of \([0,1)\) into the \(V_q\) leads to the same contradiction. ∎
That last paragraph is the sharpest part. The first half of the proof says "no measure on the whole power set". The second half says something stronger and more concrete: the measure we do have, the uniform one on the Borel sets, cannot possibly have \(V\) in its domain. So \(\mathcal B|_{[0,1)} \subsetneq \pow([0,1))\) — the Borel \(\sigma\)-algebra on \([0,1)\) (that is, \(\mathcal B\) restricted to \([0,1)\) in the sense of Lemma 1.15) really is strictly smaller than the power set, and we have a named example of what is missing.
Remark 1.29 how to interpret the two Vitali theorems Script 1.29
The invariance property in Theorem 1.27 states that every sequence of coin tosses should be exactly as probable as the one where the \(n\)-th flip came out differently. The invariance in Theorem 1.28 states that the probability of a set of locations in \([0,1)\) should not change if the set is shifted by a rational amount around the circle. Both are very natural symmetry principles.
The point of the theorems is not that these symmetries are unreasonable. The point is that demanding them on the full power set is too much. If we insist on using \(\pow(\Omega)\) for infinite spaces, then even very natural symmetry requirements become inconsistent with countable additivity. So while \(\pow(\Omega)\) is a \(\sigma\)-algebra, it is generally too large for a useful probability theory on infinite spaces, and we must work with a smaller \(\sigma\)-algebra of measurable sets.
The second construction makes this concrete: \(V\subseteq[0,1)\) cannot be assigned a translation-invariant probability compatible with interval length, and is a concrete example of a non-Borel subset of \([0,1)\). "This is one of the central reasons \(\sigma\)-algebras are not just technical decoration but genuinely necessary."
Interpretations of probability
The script marks this stretch "— Start Philosophical Interlude —". No exam task has ever come from it. Read it once; it is what gives the axioms their meaning.
Remark 1.30 interpretations of probability Script 1.30
Connecting back to Remark 0.9: the probability space \((\Omega,\Aa,\P)\) does not necessarily represent a physically real source of randomness, but rather our ignorance or the limits of our knowledge. \(\P\) is our best description, and \(\Omega\) a convenient representation of the outcomes. Randomness is thus typically not "in nature" but "in our model". Probability theory is a quantitative framework for reasoning consistently about uncertainty, not an explanation of some intrinsic source of randomness. The script's working premise from here on: probability is useful.
In practice we call \(A\in\Aa\) an event and \(\P(A)\) the probability that \(A\) happens. An event may consist of several outcomes: "rolling a 1 or a 3" is a valid event, with probability \(\tfrac13\) for a fair die, even though only one of the two can occur in any given roll. The three common interpretations:
- naive: "nature is not sure" what it does, and \(\P(A)\) is the degree of uncertainty with which it decides for \(A\);
- frequentist: \(\P(A)\) is the relative frequency with which \(A\) tends to occur under the same external conditions;
- subjective: \(\P(A)\) is the degree of certainty with which, based on my personal assessment of the situation, I am willing to bet on \(A\).
Viewpoint 1.31 probability from gambling: the Dutch book argument Script 1.31
We started directly with Kolmogorov's axioms. Besides "falling from the heavens", they can also be derived from other principles. The Dutch book arguments show that if a person's subjective probabilities violate the axioms of probability, a bettor can construct a list of bets that guarantees that person loses money. Consequently, rational belief assignments must obey the axioms of probability to avoid inconsistency.
A concrete instance, mine: suppose you claim \(\P(A)=0.6\) and \(\P(A^c)=0.6\), violating \(\P(A)+\P(A^c)=1\). I sell you a ticket paying 1 € if \(A\) happens, for 0.60 €, and another paying 1 € if \(A^c\) happens, for 0.60 €. You have paid 1.20 € and exactly one of the two tickets pays out 1 €. You lose 0.20 € no matter what happens. This is what "guaranteed to lose" means, and it is the reason the relative in Example 0.3 finally asks the doctor for betting odds: a bet is a way of forcing a vague degree of belief to become a number that obeys the axioms.
Viewpoint 1.32 probability from logic and partial beliefs Script 1.32
Jaynes (2003) builds the axioms of probability by extending classical logic to settings with uncertainty due to incomplete information. Leaning on basic principles of rational reasoning — consistency, and the ability to rank plausibility — he shows that any system for manipulating degrees of belief must obey the rules of probability. This motivates the axioms as the unique rational calculus for reasoning under uncertainty.
The script adds, disarmingly: "I would have loved to take this approach in the lecture as well, but due to a lack of time we just dumped the final framework onto you."
The script also recommends a podcast on the "Logic and Use of Probability" with the philosopher Branden Fitelson. It explains how probabilities can (and cannot) be used to judge how strongly evidence supports or undermines a scientific claim.
Remark 1.33 Bayes vs. frequentist Script 1.33
It is often said there are two approaches to probability.
- The frequentist approach interprets probabilities as long-run relative frequencies of events in repeated trials. The parameters of the underlying experiment are considered fixed but unknown.
- The Bayesian approach interprets probability as a degree of belief, or credence, allowing uncertainty about the parameters to be modelled directly with probability distributions. Bayesians have less trouble talking about events that by their nature can only happen once.
Bayesians rely on prior beliefs — one must start with some credences. Frequentists rely on repeatedly sampling from identical distributions, at least conceptually, and avoid prior beliefs. The script promises more detail later; it arrives in §3.5.
Here the script marks "— End Philosophical Interlude —". The mathematics resumes in §1.2.
Exercise-sheet tasks
Sheet 1, Exercise 1 — de Morgan's laws Sheet 1 · Ex 1
Prove, for \(\Omega\ne\emptyset\) and an arbitrary family \(\{A_\alpha\in\pow(\Omega)\mid\alpha\in I\}\):
\[ \Bigl(\bigcap_\alpha A_\alpha\Bigr)^c=\bigcup_\alpha A_\alpha^c,\qquad \Bigl(\bigcup_\alpha A_\alpha\Bigr)^c=\bigcap_\alpha A_\alpha^c. \]The method: prove set equality by proving two inclusions
\(X=Y\) means \(X\subseteq Y\) and \(Y\subseteq X\) (the script's Definition A.1 in Appendix A.1). To show \(X\subseteq Y\), take an arbitrary \(x\in X\) and derive \(x\in Y\). "Arbitrary" is what makes the conclusion hold for all elements. This is the standard shape of every set-identity proof in this course; it is set up with worked examples on B2 — subsets and set equality.
Proof of the second identity in full the sheet's argument, written out step by step
"\(\subseteq\)": Let \(x\in\bigl(\bigcup_\alpha A_\alpha\bigr)^c\). By definition of complement, \(x\notin\bigcup_\alpha A_\alpha\). By definition of union, "\(x\) is in the union" means "there exists \(\alpha\) with \(x\in A_\alpha\)"; so its negation means for every \(\alpha\), \(x\notin A_\alpha\), that is \(x\in A_\alpha^c\) for every \(\alpha\). By definition of intersection, \(x\in\bigcap_\alpha A_\alpha^c\). Since \(x\) was arbitrary, \(\bigl(\bigcup_\alpha A_\alpha\bigr)^c\subseteq\bigcap_\alpha A_\alpha^c\).
"\(\supseteq\)": Let \(x\in\bigcap_\alpha A_\alpha^c\). Then \(x\in A_\alpha^c\) for every \(\alpha\), i.e. \(x\notin A_\alpha\) for every \(\alpha\). So there is no \(\alpha\) with \(x\in A_\alpha\), which means \(x\notin\bigcup_\alpha A_\alpha\), i.e. \(x\in\bigl(\bigcup_\alpha A_\alpha\bigr)^c\).
Both inclusions hold, so the two sets are equal. The first identity follows by the same argument with the roles of \(\exists\) and \(\forall\) swapped — or by applying the proved identity to the family \((A_\alpha^c)\) and taking complements. ∎
On the official solution. It works the first identity \(\bigl(\bigcap_\alpha A_\alpha\bigr)^c=\bigcup_\alpha A_\alpha^c\) and says the second one "follows analogously"; what is written out above is that second one. The official argument is correct, but it compresses its very first step: from \(x\in\bigl(\bigcap_\alpha A_\alpha\bigr)^c\) it concludes at once "there exists an \(\alpha\in I\) such that \(x\notin A_\alpha\)". That step is the negation of a "for all" statement — \(x\) lies in the intersection exactly when \(x\in A_\alpha\) for every \(\alpha\), so \(x\) lies outside it exactly when that fails for at least one \(\alpha\) (Analysis 1.1 — quantifiers and their negation). Everything after that is the same element chase as above.
Sheet 1, Exercise 2 — inverse images Sheet 1 · Ex 2
Let \(\Omega_1,\Omega_2\) be non-empty, \(f:\Omega_1\to\Omega_2\) an arbitrary map and \(\mathcal C\subseteq\pow(\Omega_2)\) a collection of subsets. Show: (i) \(A\subseteq B \implies f^{-1}(A)\subseteq f^{-1}(B)\); (ii) \(f^{-1}\bigl(\bigcup_{A\in\mathcal C}A\bigr)=\bigcup_{A\in\mathcal C}f^{-1}(A)\); (iii) \(f^{-1}(A^c)=\bigl(f^{-1}(A)\bigr)^c\).
First, what \(f^{-1}\) means here My addition — the sheet does not define it
For \(A\subseteq\Omega_2\), the inverse image [Urbild] is
\[ f^{-1}(A):=\{\omega\in\Omega_1 \mid f(\omega)\in A\}. \]This does not require \(f\) to be invertible. \(f^{-1}\) is not a function \(\Omega_2\to \Omega_1\); it is a map \(\pow(\Omega_2)\to\pow(\Omega_1)\) taking sets to sets. It always exists, for every \(f\). Confusing it with an inverse function is the single most common mistake in this exercise.
Proofs Sheet 1 · Ex 2, rewritten by me for precision
(i) Let \(\omega\in f^{-1}(A)\). By definition \(f(\omega)\in A\). Since \(A\subseteq B\), also \(f(\omega)\in B\), so \(\omega\in f^{-1}(B)\). ✓
(ii) Chain of equivalences, each step just unfolding a definition:
\[ \omega\in f^{-1}\Bigl(\bigcup_{A\in\mathcal C}A\Bigr) \iff f(\omega)\in\bigcup_{A\in\mathcal C}A \iff \exists A\in\mathcal C: f(\omega)\in A \iff \exists A\in\mathcal C: \omega\in f^{-1}(A) \iff \omega\in\bigcup_{A\in\mathcal C}f^{-1}(A). \;✓ \](iii) Same style:
\[ \omega\in f^{-1}(A^c)\iff f(\omega)\in A^c\iff f(\omega)\notin A \iff \omega\notin f^{-1}(A)\iff\omega\in\bigl(f^{-1}(A)\bigr)^c. \;✓ \;\;∎ \]On the official solution. Its proofs say things like "there exists \(a\in A\) such that \(f(\omega)=a\)", which is a roundabout way of writing \(f(\omega)\in A\); and in (iii) the "\(\Longleftarrow\)" direction asserts "there exists \(a\in A^c\) such that \(f(\omega)=a\)" as though it were given, when it is the thing being derived. The conclusions are all correct — the write-ups are just loose. The equivalence-chain form above is shorter and cannot go wrong.
Why this exercise matters: these three properties are exactly the three \(\sigma\)-algebra axioms in disguise. They are what makes Exercise 6 and Sheet 3 Exercise 1 work, and they are why inverse images behave and forward images do not — the content of SoSe26 P2b.
Sheet 1, Exercise 3 — closure properties (= Corollary 1.10) Sheet 1 · Ex 3
\(\Aa\) is a \(\sigma\)-algebra over \(\Omega\ne\emptyset\), \(A_0,A_1,A_2,\dots\in\Aa\), \(m\in\N\). Show that \(\Omega\), \(A_0\setminus A_1\), \(\bigcup_{i=0}^{m}A_i\), \(\bigcap_{i=0}^{m}A_i\) and \(\bigcap_{i\in\N}A_i\) are in \(\Aa\).
Proof Sheet 1 · Ex 3
\(\Omega\in\Aa\). This is axiom (i) of Definition 1.6 directly. (The official solution derives it as \(\Omega=\emptyset^c\), which presupposes \(\emptyset\in\Aa\) — also fine, but it is one step longer than necessary given how the script states the axioms.)
Finite unions. Axiom (iii) speaks about infinite sequences, so pad. Define
\[ B_i:=\begin{cases}A_i & i\le m,\\ \emptyset & i>m.\end{cases} \]Each \(B_i\in\Aa\) (the \(A_i\) by assumption, \(\emptyset=\Omega^c\) by axioms (i) and (ii)). By axiom (iii), \(\bigcup_{i\in\N}B_i\in\Aa\). Since adding \(\emptyset\) changes no union, \(\bigcup_{i\in\N}B_i=\bigcup_{i=0}^{m}A_i\). ✓
Finite intersections. By axiom (ii), \(A_0^c,\dots,A_m^c\in\Aa\). By the finite-union result just proved, \(\bigcup_{i=0}^{m}A_i^c\in\Aa\). By axiom (ii) again its complement is in \(\Aa\), and by de Morgan (Lemma 1.3)
\[ \bigcap_{i=0}^{m}A_i=\Bigl(\bigcup_{i=0}^{m}A_i^c\Bigr)^{c}\in\Aa. \;✓ \]Countable intersections. Identical, using axiom (iii) instead of the finite-union result: \(\bigcap_{i\in\N}A_i=\bigl(\bigcup_{i\in\N}A_i^c\bigr)^c\in\Aa\). ✓
\(A_0\setminus A_1\in\Aa\). An element is in \(A_0\setminus A_1\) when it is in \(A_0\) and not in \(A_1\), so \(A_0\setminus A_1=A_0\cap A_1^c\). Here \(A_1^c\in\Aa\) by axiom (ii), and the intersection of the two sets \(A_0, A_1^c\) is in \(\Aa\) by the finite-intersection result (with \(m=1\)). ✓ (We prove this after intersections on purpose. The official solution states it first and calls it "immediate", although it uses the intersection result proved later.)
Symmetric difference (in Corollary 1.10 but not on the sheet): \(A\,\Delta\,B=(A\setminus B)\cup(B\setminus A)\) is a union of two sets already shown to be in \(\Aa\). ∎
Two further slips in the official solution: in the finite-intersection step it says the complements are in \(\Aa\) "by (i)" — it is axiom (ii); and the finite-union step switches from \(m\) to \(n\) and from \(A_0\) to \(A_1\) mid-formula. The ideas are right.
Method to reuse — the two moves that solve almost every \(\sigma\)-algebra exercise
1. Pad with \(\emptyset\) to turn a finite union into a countable one (and with \(\Omega\) for intersections). 2. Go through complements to turn an intersection into a union, via de Morgan. Between them they cover Sheet 1 Ex 3, Ex 4(iii), Ex 6, and most of Sheet 3.
Sheet 1, Exercise 4 — true or false? Sheet 1 · Ex 4
This is the exercise most directly rehearsing the exam's opening problem. Use the widget above to experiment with (i) and (ii).
(i) Is \(\Aa=\{\emptyset,\{1,2\},\{1,4\},\{2,3\},\{3,4\},\{1,2,3,4\}\}\) a \(\sigma\)-algebra over \(\Omega=\{1,2,3,4\}\)?
False. The union property fails: \(\{1,2\}\in\Aa\) and \(\{2,3\}\in\Aa\), but \(\{1,2\}\cup\{2,3\}=\{1,2,3\}\notin\Aa\).
My addition. Complements do not give a witness here. Every listed set has its complement in the list: \(\emptyset\leftrightarrow\Omega\), \(\{1,2\}\leftrightarrow\{3,4\}\), \(\{1,4\}\leftrightarrow\{2,3\}\). So the union is the axiom that breaks, and one union is enough to show it.
A quick sanity check, mine: a \(\sigma\)-algebra on a finite \(\Omega\) always has \(2^k\) members for some \(k\). (Its smallest non-empty members split \(\Omega\) into \(k\) blocks, and every member is a union of some of the blocks: \(2^k\) choices.) This collection has 6 members, and 6 is not a power of 2. So it cannot be a \(\sigma\)-algebra. Use this to know the answer fast, then write the union witness.
(ii) If \(\Aa_1,\Aa_2\) are \(\sigma\)-algebras over \(\Omega\), is \(\Aa_1\cup\Aa_2\)?
False. Take \(\Omega=\{1,2,3,4\}\) and
\[ \Aa_1=\{\emptyset,\{1,2\},\{3,4\},\Omega\},\qquad \Aa_2=\{\emptyset,\{1,4\},\{2,3\},\Omega\}. \]Each is a \(\sigma\)-algebra (each is \(\sigma(\{A\})=\{\emptyset,\Omega,A,A^c\}\) from Example 1.9(iii), with \(A=\{1,2\}\) and \(A=\{1,4\}\) respectively). But \(\{1,2\},\{2,3\}\in\Aa_1\cup\Aa_2\) while \(\{1,2\}\cup\{2,3\}=\{1,2,3\}\) lies in neither, so it is not in the union.
Contrast with Proposition 1.7: intersections of \(\sigma\)-algebras are \(\sigma\)-algebras. Intersecting keeps only sets both systems already contain, and any union of such sets is in both systems by their own axioms. Uniting creates pairs that no single system was ever asked about.
(iii) Is \(\Aa:=\{A\subseteq\Omega \mid A \text{ or } A^c \text{ is countable}\}\) a \(\sigma\)-algebra?
True. Call a set co-countable if its complement is countable. (Why these facts hold: B2 — countability arithmetic.) Permitted facts, given on the sheet: a countable union of countable sets is countable; a subset of a countable set is countable.
(a) \(\Omega\in\Aa\). \(\Omega^c=\emptyset\) is finite, hence countable. ✓ (The official solution checks \(\emptyset\in\Aa\) instead; the script's axiom (i) asks for \(\Omega\). Both hold, and each implies the other by axiom (ii), but quote the axiom as written.)
(b) complements. Let \(A\in\Aa\). If \(A\) is countable then \(A^c\) is co-countable, so \(A^c\in\Aa\). If \(A\) is co-countable then \(A^c\) is countable, so \(A^c\in\Aa\). ✓
(c) countable unions. Let \(A_0,A_1,\ldots\in\Aa\). Two cases:
- All \(A_i\) countable. Then \(\bigcup_i A_i\) is a countable union of countable sets, hence countable, hence in \(\Aa\). ✓
- Some \(A_j\) is uncountable. Since \(A_j\in\Aa\), its complement \(A_j^c\) must be countable. By de Morgan, \(\bigl(\bigcup_i A_i\bigr)^c=\bigcap_i A_i^c\subseteq A_j^c\), a subset of a countable set, hence countable. So the union is co-countable, hence in \(\Aa\). ✓ ∎
(iv) Is \(\Aa:=\{A\subseteq\Omega\mid A \text{ or } A^c \text{ is finite}\}\) a \(\sigma\)-algebra if and only if \(\Omega\) is finite?
True. An "if and only if" needs both directions.
"\(\Leftarrow\)" (\(\Omega\) finite \(\Rightarrow\) \(\Aa\) is a \(\sigma\)-algebra). If \(\Omega\) is finite then every subset of \(\Omega\) is finite, so the condition "\(A\) or \(A^c\) finite" holds for every \(A\), giving \(\Aa=\pow(\Omega)\), which is always a \(\sigma\)-algebra by Example 1.9(ii). ✓
"\(\Rightarrow\)" by contraposition (\(\Omega\) infinite \(\Rightarrow\) \(\Aa\) not a \(\sigma\)-algebra). Rewritten by me — see the note below. Contraposition means: instead of "\(P\Rightarrow Q\)" we prove the equivalent "not \(Q\) \(\Rightarrow\) not \(P\)". Since \(\Omega\) is infinite it contains a countably infinite subset; list it as \(\omega_0,\omega_1,\omega_2,\dots\) with all \(\omega_i\) distinct. (Why such a list exists: pick any \(\omega_0\in\Omega\); then pick \(\omega_1\in\Omega\setminus\{\omega_0\}\), then \(\omega_2\in\Omega\setminus\{\omega_0,\omega_1\}\), and so on. After finitely many picks only finitely many points are used up, and \(\Omega\) is infinite, so there is always something left to pick. Making infinitely many such choices is formally an appeal to the (countable) axiom of choice, see B2; the course uses it without comment.) Put
\[ A:=\{\omega_0,\omega_2,\omega_4,\dots\}=\bigcup_{i\in\N}\{\omega_{2i}\}. \]Each singleton \(\{\omega_{2i}\}\) is finite, hence lies in \(\Aa\), and the union is countable — so axiom (iii) would force \(A\in\Aa\). But \(A\) is infinite, and \(A^c\) is infinite too, because it contains all of \(\omega_1,\omega_3,\omega_5,\dots\). So \(A\notin\Aa\), and axiom (iii) fails. Therefore \(\Aa\) is not a \(\sigma\)-algebra. ∎
A slip in the official solution
The printed solution opens the "\(\Rightarrow\)" direction with "Assume that \(\Omega\) is not countable", then immediately says "We can further assume that \(\Omega\) is countable infinity and not uncountable". The first sentence should read "Assume that \(\Omega\) is not finite" — the contraposition of "\(\Aa\) is a \(\sigma\)-algebra \(\Rightarrow\) \(\Omega\) finite" negates finite, not countable. The argument that follows is the right one; only the word is wrong. The version above avoids the detour ("restrict to a countable subset") by exhibiting \(A\) directly.
Sheet 1, Exercise 5 — intersections of \(\sigma\)-algebras (= Proposition 1.7) Sheet 1 · Ex 5
Proof Sheet 1 · Ex 5
Let \(\Aa:=\bigcap_{\alpha\in I}\Aa_\alpha\) with each \(\Aa_\alpha\) a \(\sigma\)-algebra over \(\Omega\) and \(I\ne\emptyset\). By the definition of an intersection (\(\forall\) in Definition 1.2), \(X\in\Aa\) means: \(X\in\Aa_\alpha\) for every \(\alpha\in I\). We check the three axioms of Definition 1.6 one by one.
(i) \(\Omega\in\Aa_\alpha\) for each \(\alpha\), since each is a \(\sigma\)-algebra. Being in all of them, \(\Omega\in\Aa\). ✓
(ii) Let \(A\in\Aa\). Then \(A\in\Aa_\alpha\) for every \(\alpha\). Each \(\Aa_\alpha\) is closed under complements, so \(A^c\in\Aa_\alpha\) for every \(\alpha\), hence \(A^c\in\Aa\). ✓
(iii) Let \(A_0,A_1,\ldots\in\Aa\). Then all \(A_i\in\Aa_\alpha\) for every \(\alpha\). Each \(\Aa_\alpha\) is closed under countable unions, so \(\bigcup_{i\in\N}A_i\in\Aa_\alpha\) for every \(\alpha\), hence \(\bigcup_{i\in\N}A_i\in\Aa\). ✓ ∎
The shape of this proof is worth noticing: each axiom is verified "pointwise in \(\alpha\)". Nothing about \(I\) is used except that it is a set — which is why the statement holds for uncountable \(I\) as well, and why Lemma 1.8 may intersect over the (usually enormous) family of all \(\sigma\)-algebras containing \(\mathcal E\).
The sheet then states, as Remark 1, that this makes \(\sigma(S)\) well-defined for any non-empty \(S\subseteq\pow(\Omega)\) — which is Lemma 1.8 of the script. Note the notational mismatch: the sheet writes \(\Aa_\sigma(S)\) and, in its displayed formula, "\(\Aa\subseteq S\)" where it means \(S\subseteq\Aa\). The script's Lemma 1.8 has it right.
Sheet 1, Exercise 6 — pre-image and push-forward \(\sigma\)-algebras Sheet 1 · Ex 6
With \(f:\Omega_1\to\Omega_2\) and \(\Aa,\mathcal B\) \(\sigma\)-algebras over \(\Omega_1,\Omega_2\), show that
\[ f^{-1}(\mathcal B):=\{f^{-1}(B)\mid B\in\mathcal B\} \quad\text{and}\quad f_*(\Aa):=\{B\subseteq\Omega_2 \mid f^{-1}(B)\in\Aa\} \]are \(\sigma\)-algebras over \(\Omega_1\) and \(\Omega_2\) respectively.
Proof Sheet 1 · Ex 6, with the axiom (i) check corrected
The push-forward \(f_*(\Aa)\), over \(\Omega_2\).
(i) \(\Omega_2\in f_*(\Aa)\): we need \(f^{-1}(\Omega_2)\in\Aa\). Every \(\omega\in\Omega_1\) satisfies \(f(\omega)\in\Omega_2\), so \(f^{-1}(\Omega_2)=\Omega_1\in\Aa\) by axiom (i). ✓ (The official solution checks \(\emptyset\in f_*(\Aa)\) via \(f^{-1}(\emptyset)=\emptyset\). True, but it is the wrong axiom: Definition 1.6(i) asks for the whole space.)
(ii) Let \(B\in f_*(\Aa)\), so \(f^{-1}(B)\in\Aa\). By Exercise 2(iii), \(f^{-1}(B^c)=\bigl(f^{-1}(B)\bigr)^c\), which is in \(\Aa\) by axiom (ii). Hence \(B^c\in f_*(\Aa)\). ✓
(iii) Let \(B_0,B_1,\ldots\in f_*(\Aa)\), so each \(f^{-1}(B_j)\in\Aa\). By Exercise 2(ii),
\[ f^{-1}\Bigl(\bigcup_{j\in\N}B_j\Bigr)=\bigcup_{j\in\N}f^{-1}(B_j)\in\Aa \]by axiom (iii). Hence \(\bigcup_j B_j\in f_*(\Aa)\). ✓
The pre-image \(f^{-1}(\mathcal B)\), over \(\Omega_1\). Same three steps, run the other way.
(i) \(\Omega_1=f^{-1}(\Omega_2)\) and \(\Omega_2\in\mathcal B\), so \(\Omega_1\in f^{-1}(\mathcal B)\). ✓
(ii) An element of \(f^{-1}(\mathcal B)\) has the form \(f^{-1}(B)\) with \(B\in\mathcal B\). Then \(\bigl(f^{-1}(B)\bigr)^c=f^{-1}(B^c)\) by Exercise 2(iii), and \(B^c\in\mathcal B\), so the complement is again of the required form. ✓
(iii) For \(f^{-1}(B_j)\), \(j\in\N\), Exercise 2(ii) gives \(\bigcup_j f^{-1}(B_j)=f^{-1}\bigl(\bigcup_j B_j\bigr)\), and \(\bigcup_j B_j\in\mathcal B\), so the union is again of the required form. ✓ ∎
In words: \(f^{-1}\) commutes with all three set operations, so it carries \(\sigma\)-algebras to \(\sigma\)-algebras in both directions. The forward image \(f(\cdot)\) does not commute with complements, and that is precisely what SoSe26 P2b exploits.
Sheet 2, Exercise 1 — six true/false statements Sheet 2 · Ex 1
(i) For a probability space, \(\P(\Omega\setminus A)=1-\P(A)\) for all \(A\in\Aa\).
True. \(\P\) is \(\sigma\)-additive, hence finitely additive. \(A\) and \(\Omega\setminus A\) are disjoint and their union is \(\Omega\), so
\[ 1=\P(\Omega)=\P\bigl(A\,\dot\cup\,(\Omega\setminus A)\bigr)=\P(A)+\P(\Omega\setminus A), \]and rearranging gives the claim. The rearrangement is legitimate because \(\P(A)\le1\) is finite.
(ii) For a measure space and \(A,B\in\Aa\) with \(\mu(A\cap B)<\infty\): \(\mu(B\setminus A)=\mu(B)-\mu(A\cap B)\).
True. Split \(B\) into the part inside \(A\) and the part outside: \(B=(B\setminus A)\,\dot\cup\,(A\cap B)\). These are disjoint and both in \(\Aa\) by Corollary 1.10, so additivity gives \(\mu(B)=\mu(B\setminus A)+\mu(A\cap B)\). Subtract \(\mu(A\cap B)\), which is permitted because it is finite.
Note the improvement over Prop. 1.19(ii): the statement does not assume \(A\subseteq B\), and it subtracts \(\mu(A\cap B)\) rather than \(\mu(A)\). When \(A\subseteq B\) we have \(A\cap B=A\) and the two coincide.
(iii) \(\P\bigl(\bigcup_{i\in\N}A_i\bigr)=\sup_{i\in\N}\P(A_i)\) for any sequence \((A_i)\).
False. Take \(\Omega=\{0,1\}\), \(\Aa=\pow(\Omega)\), \(\P(\{0\})=\P(\{1\})=\tfrac12\), and
\[ A_0=\{0\},\qquad A_i=\{1\}\ \text{ for all } i\ge1. \]Then \(\bigcup_i A_i=\{0,1\}=\Omega\), so the left-hand side is 1, while every \(\P(A_i)=\tfrac12\) and so the supremum is \(\tfrac12\). Since \(1\ne\tfrac12\), the statement fails.
Two notes of mine. First, the official solution writes "\(A_n=\{1\}\) for each \(n>1\)", which leaves \(A_1\) undefined; taking \(i\ge1\) as above closes the gap. Second, and more useful for the exam: the statement becomes true if the sequence is increasing, \(A_0\subseteq A_1\subseteq\cdots\), because then \(\P(A_i)\) is an increasing sequence, its supremum is its limit, and continuity from below (Prop. 1.19(iv)) gives exactly this equality. The counterexample works only because the sequence jumps around. Examiners like this distinction.
(iv) \(\P(A\cup B\cup C)=\P(A)+\P(B)+\P(C)-\P(A\cap B)-\P(A\cap C)-\P(B\cap C)+\P(A\cap B\cap C)\).
True. It is Theorem 1.22 with \(n=3\): the \(k=1\) terms are the three singles with sign \(+\), the \(k=2\) terms the three pairs with sign \(-\), and the \(k=3\) term the triple with sign \(+\).
(v) Is \(\bigl(\N,\pow(\N),\mu\bigr)\) with \(\mu(A)=0\) for finite \(A\) and \(\mu(A)=\infty\) for infinite \(A\) a measure space?
False. \(\sigma\)-additivity fails. Take \(A_n=\{n\}\) for \(n\in\N\) — pairwise disjoint, each finite, so \(\mu(A_n)=0\). Their union is \(\N\), which is infinite, so \(\mu(\N)=\infty\). Then
\[ \infty=\mu(\N)=\mu\Bigl(\bigcup_{n\in\N}A_n\Bigr)\;\ne\;\sum_{n\in\N}\mu(A_n)=\sum_{n\in\N}0=0. \]Worth noticing: the other two axioms do hold — \(\mu(\emptyset)=0\) since \(\emptyset\) is finite, and \(\mu\ge0\) always. So this is a clean example that \(\sigma\)-additivity is the axiom with teeth. It is also finitely additive on disjoint sets in every case: if \(A,B\) are both finite, \(A\cup B\) is finite and \(0=0+0\); if at least one is infinite, \(A\cup B\) is infinite and \(\infty=\mu(A)+\mu(B)\). So \(\mu\) is finitely additive but not \(\sigma\)-additive — finite additivity is strictly weaker than \(\sigma\)-additivity.
(vi) For the sum of two fair coin flips (sides counting as 0 or 1), is the cdf \(F(x)=0,\ \tfrac14,\ \tfrac34,\ 1\) on \(x<0\), \([0,1)\), \([1,2)\), \(x\ge2\)?
True. Model: \(\Omega=\{0,1,2\}\) for the possible sums, with
\[ \P(\{0\})=\tfrac14,\qquad \P(\{1\})=\tfrac12,\qquad \P(\{2\})=\tfrac14, \]because of the four equally likely flip pairs \((0,0),(0,1),(1,0),(1,1)\), one gives sum 0, two give sum 1, one gives sum 2. Then by Definition 1.23,
\[ F(x)=\P\bigl((-\infty,x]\bigr)=\sum_{n\in\{0,1,2\},\,n\le x}\P(\{n\}), \]so \(F(x)=0\) for \(x<0\); \(F(x)=\tfrac14\) on \([0,1)\); \(F(x)=\tfrac14+\tfrac12=\tfrac34\) on \([1,2)\); and \(F(x)=1\) for \(x\ge2\). ✓
Set the cdf widget above to weights \(1,2,1\) and you get exactly this staircase. Check the three jump heights against Lemma 1.24(iv): \(\tfrac14, \tfrac12, \tfrac14\) — the point masses.
Sheet 2, Exercise 5 (bonus) — other generators of \(\mathcal B^n\) Sheet 2 · Ex 5
Show \(\sigma(\mathcal E_1)=\sigma(\mathcal E_2)\) where \(\mathcal E_1\) is the set of open subsets of \(\R^n\) and \(\mathcal E_2=\{[a,b)\mid a,b\in\Q^n,\ a<b\}\).
Reading the vector notation my addition. Here \(a=(a_1,\dots,a_n)\) and \(b=(b_1,\dots,b_n)\) are vectors with rational entries (\(\Q^n\) = all \(n\)-tuples of rationals). For vectors, \(a<b\) is meant componentwise [komponentenweise]: \(a_i<b_i\) for every \(i=1,\dots,n\). And \([a,b)\) is the half-open box \([a,b):=[a_1,b_1)\times\cdots\times[a_n,b_n)=\prod_{i=1}^n[a_i,b_i)\), where \(\times\) is the Cartesian product and \(\prod\) here means "Cartesian product of the \(n\) intervals" (product notation: B3). Example with \(n=2\): \(a=(0,1)\), \(b=(2,3)\) satisfy \(a<b\) because \(0<2\) and \(1<3\), and \([a,b)=[0,2)\times[1,3)\) is a rectangle containing its bottom and left edges but not its top and right edges. By contrast \(a=(0,5)\), \(b=(2,3)\) are not comparable: neither \(a<b\) nor \(b<a\). Vectors in \(\R^n\): Analysis 11 — linear algebra you need.
The universal method for "same generated \(\sigma\)-algebra"
Show \(\mathcal E_1\subseteq\sigma(\mathcal E_2)\) and \(\mathcal E_2\subseteq\sigma(\mathcal E_1)\). Then Lemma 1.8's minimality does the rest: \(\sigma(\mathcal E_2)\) is a \(\sigma\)-algebra containing \(\mathcal E_1\), so it contains the smallest such, namely \(\sigma(\mathcal E_1)\); and symmetrically. You never have to describe either \(\sigma\)-algebra.
Proof for \(n=1\), written out my version; the official one does general \(n\) and is hard to read in the PDF
Part 1: \(\mathcal E_1\subseteq\sigma(\mathcal E_2)\). Let \(A\subseteq\R\) be open. By definition of "open", for every \(x\in A\) there is \(\varepsilon_x>0\) with \((x-\varepsilon_x,\,x+\varepsilon_x)\subseteq A\). Because the rationals are dense in \(\R\) (Analysis 1.2, Satz 1.10) — every non-empty open interval contains a rational — we can choose rationals \(a_x,b_x\) with
\[ x-\varepsilon_x < a_x \le x < b_x < x+\varepsilon_x, \]so that \(x\in[a_x,b_x)\subseteq A\) and \([a_x,b_x)\in\mathcal E_2\). Hence
\[ A=\bigcup_{x\in A}[a_x,b_x). \]The union is over possibly uncountably many \(x\) — but the distinct sets appearing are all of the form \([a,b)\) with \(a,b\in\Q\), and there are only countably many of those, because \(\Q\times\Q\) is countable. So \(A\) is a countable union of members of \(\mathcal E_2\), hence \(A\in\sigma(\mathcal E_2)\) by axiom (iii). ✓
Part 2: \(\mathcal E_2\subseteq\sigma(\mathcal E_1)\). Let \(a<b\) be rationals. Then
\[ [a,b)=\bigcap_{k\ge1}\Bigl(a-\tfrac1k,\;b\Bigr). \]Check both inclusions. If \(a\le x<b\) then \(x>a-\tfrac1k\) for every \(k\), so \(x\) is in every set on the right. Conversely if \(x\) is in every \((a-\tfrac1k,b)\) then \(x<b\), and \(x>a-\tfrac1k\) for all \(k\) forces \(x\ge a\) (if \(x<a\) we could pick \(k\) with \(\tfrac1k<a-x\) and get a contradiction). ✓
Each \((a-\tfrac1k,b)\) is an open interval, hence in \(\mathcal E_1\), and a countable intersection of members of \(\sigma(\mathcal E_1)\) stays in \(\sigma(\mathcal E_1)\) by Corollary 1.10. So \([a,b)\in\sigma(\mathcal E_1)\). ✓
By the method above, \(\sigma(\mathcal E_1)=\sigma(\mathcal E_2)\). ∎
For general \(n\), replace intervals by boxes: \(\prod_i(x_i-\varepsilon,x_i+\varepsilon)\) in Part 1 with rational corners, and \([a,b)=\bigcap_{k\ge1}\bigl(a-\tfrac1k\vec1,\,b\bigr)\) in Part 2, where \(\vec1=(1,\dots,1)\), so \(a-\tfrac1k\vec1=(a_1-\tfrac1k,\dots,a_n-\tfrac1k)\) moves every lower corner coordinate down by \(\tfrac1k\). Nothing else changes. (The official proof uses open balls \(B_r(x)\) instead of boxes — all points whose Euclidean distance from \(x\) is less than \(r\); distance and balls: Analysis 1.3 — norms.)
Connection to Example 1.13. The script defines \(\mathcal B^n\) from open boxes, while this exercise starts from all open sets. Part 1 above shows every open set is a countable union of rational boxes, so the two generators give the same \(\sigma\)-algebra — which is also the content of Remark 1.14, without needing the word "topology".
Two typos in the sheet's Remark 1 Spotted by me
The sheet lists ten further generators \(\mathcal E_3,\dots,\mathcal E_{12}\) of \(\mathcal B^n\). Two are almost certainly misprinted: \(\mathcal E_4:=\{B_r(x)\mid x\in\Q^n,\ r\in\Q_{>9}\}\) was meant to read \(r\in\Q_{>0}\) (open balls \(B_r(x)\) = all points at distance less than \(r\) from \(x\), with positive rational radius). Note: even as printed the claim is not false, at least for \(n=1\). Differences of big intervals give small ones, e.g. \((-10,10)\setminus(-9.5,10.5)=(-10,-9.5]\), so the small intervals are still generated. And \(\mathcal E_5:=\{A\subseteq\R^{N}\mid A\text{ closed}\}\) should read \(\R^{n}\). The remaining eight are correct as printed. Useful ones to remember: (Vocabulary used in that list: a set \(A\subseteq\R^n\) is closed [abgeschlossen] if limits of convergent sequences in \(A\) stay in \(A\) — e.g. \([0,1]\) is closed, \((0,1]\) is not, since \(\tfrac1k\to0\notin(0,1]\); equivalently, its complement is open. A set is compact [kompakt] if it is closed and bounded, like \([0,1]\). Both: Analysis 4.4; see also B1 — interior, open and closed.) \(\mathcal B\) is generated by the half-lines \(\{(-\infty,b]\mid b\in\Q\}\) alone — which is why Definition 1.23 can get away with defining a cdf from those sets only.
Sheet 3, Exercise 1 — generators and measurability Sheet 3 · Ex 1
Let \((X,\Aa_X)\) and \((Y,\Aa_Y)\) be measurable spaces, \(f:X\to Y\), and \(\mathcal E_Y\subseteq\Aa_Y\). Show \(\sigma\bigl(f^{-1}(\mathcal E_Y)\bigr)=f^{-1}\bigl(\sigma(\mathcal E_Y)\bigr)\), and then that \(f\) is \(\Aa_X\)–\(\sigma(\mathcal E_Y)\)-measurable if and only if \(f^{-1}(E)\in\Aa_X\) for all \(E\in\mathcal E_Y\).
The word "measurable" is used here before the script defines it My addition
The script's Definition 1.50 (on the §1.3 page) says: \(f\) is \(\Aa_X\)–\(\Aa_Y\)-measurable if \(f^{-1}(B)\in\Aa_X\) for every \(B\in\Aa_Y\). In words: the pre-image of every measurable set is measurable. That one line is all you need here. A random variable is exactly such a map, so this exercise is the tool that makes random variables usable in practice.
Proof my version; the official solution is correct but very compressed
Part 1: the identity \(\sigma(f^{-1}(\mathcal E_Y))=f^{-1}(\sigma(\mathcal E_Y))\).
"\(\subseteq\)". By Sheet 1 Exercise 6 (applied with \(\mathcal B=\sigma(\mathcal E_Y)\)), the collection \(f^{-1}(\sigma(\mathcal E_Y))\) is a \(\sigma\)-algebra on \(X\). It contains \(f^{-1}(\mathcal E_Y)\), because \(\mathcal E_Y\subseteq\sigma(\mathcal E_Y)\) and pre-images preserve inclusions (Sheet 1 Ex 2(i)). By Lemma 1.8, \(\sigma(f^{-1}(\mathcal E_Y))\) is the smallest \(\sigma\)-algebra containing \(f^{-1}(\mathcal E_Y)\), so it is contained in this one. ✓
"\(\supseteq\)". This direction needs a trick: build a \(\sigma\)-algebra on the \(Y\) side out of the thing we want to prove something about. Put
\[ \tilde{\Aa}:=\bigl\{B\subseteq Y \;\bigm|\; f^{-1}(B)\in\sigma\bigl(f^{-1}(\mathcal E_Y)\bigr)\bigr\}. \]This is exactly the push-forward \(f_*\bigl(\sigma(f^{-1}(\mathcal E_Y))\bigr)\), which is a \(\sigma\)-algebra on \(Y\) by Sheet 1 Exercise 6. It contains \(\mathcal E_Y\): for \(E\in\mathcal E_Y\) we have \(f^{-1}(E)\in f^{-1}(\mathcal E_Y)\subseteq\sigma(f^{-1}(\mathcal E_Y))\), so \(E\in\tilde{\Aa}\). By minimality (Lemma 1.8), \(\sigma(\mathcal E_Y)\subseteq\tilde{\Aa}\).
Now unwind what that says: for every \(B\in\sigma(\mathcal E_Y)\) we have \(f^{-1}(B)\in\sigma(f^{-1}(\mathcal E_Y))\) — which is precisely \(f^{-1}(\sigma(\mathcal E_Y))\subseteq\sigma(f^{-1}(\mathcal E_Y))\). ✓
Part 2: measurability need only be checked on a generator.
"\(\Rightarrow\)": if \(f^{-1}(B)\in\Aa_X\) for all \(B\in\sigma(\mathcal E_Y)\), then in particular for all \(B\in\mathcal E_Y\), since \(\mathcal E_Y\subseteq\sigma(\mathcal E_Y)\). ✓
"\(\Leftarrow\)": suppose \(f^{-1}(E)\in\Aa_X\) for all \(E\in\mathcal E_Y\), i.e. \(f^{-1}(\mathcal E_Y)\subseteq\Aa_X\). Since \(\Aa_X\) is a \(\sigma\)-algebra containing \(f^{-1}(\mathcal E_Y)\), minimality gives \(\sigma(f^{-1}(\mathcal E_Y))\subseteq\Aa_X\). By Part 1 the left side equals \(f^{-1}(\sigma(\mathcal E_Y))\), so \(f^{-1}(B)\in\Aa_X\) for every \(B\in\sigma(\mathcal E_Y)\) — which is the definition of \(\Aa_X\)–\(\sigma(\mathcal E_Y)\)-measurability. ✓
Part 3: the case \(\sigma(\mathcal E_Y)=\Aa_Y\) (the sheet's last claim). Then "\(\Aa_X\)–\(\sigma(\mathcal E_Y)\)-measurable" is the same as "\(\Aa_X\)–\(\Aa_Y\)-measurable", and "\(f^{-1}(E)\in\Aa_X\) for all \(E\in\mathcal E_Y\)" is the same as \(f^{-1}(\mathcal E_Y)\subseteq\Aa_X\) (the set of all these pre-images lies in \(\Aa_X\)). So Part 2 reads: \(f\) is \(\Aa_X\)–\(\Aa_Y\)-measurable \(\iff f^{-1}(\mathcal E_Y)\subseteq\Aa_X\). ✓ ∎
In words — and this is the payoff: to prove a function into \(\R\) is measurable you do not have to check all Borel sets. It is enough to check the half-lines \((-\infty,b]\), because they generate \(\mathcal B\). That is why "\(\{X\le b\}\) is an event for every \(b\)" is the usual working definition of a real random variable.
A wrong cross-reference in the official solution
Sheet 3's solution cites "Ex.Sh. 0, Ex. 2-(i)" for the preservation of subsets under inverse images, and "Ex.Sh. 0, Ex. 6" for pre-image and push-forward \(\sigma\)-algebras. Sheet 0 contains neither: its six tasks are dice, urns, PINs, a bug detector, aces and the self-referential question. The intended references are Sheet 1, Exercise 2(i) and Sheet 1, Exercise 6.
Sheet 3, Exercise 2 — restriction commutes with generation Sheet 3 · Ex 2
For \(\Omega\ne\emptyset\), \(\emptyset\ne A\subseteq\Omega\) and \(\mathcal E\subseteq\pow(\Omega)\): \(\sigma\bigl(\mathcal E|_A\bigr)=\sigma(\mathcal E)\big|_A\). This is the second half of Lemma 1.15.
Proof Sheet 3 · Ex 2
The whole exercise is one observation: restricting to \(A\) is taking a pre-image. Let \(\iota_A:A\hookrightarrow\Omega\) be the inclusion map, \(\iota_A(a)=a\) for \(a\in A\) — it does nothing except regard an element of \(A\) as an element of \(\Omega\). For any \(B\subseteq\Omega\),
\[ \iota_A^{-1}(B)=\{a\in A\mid\iota_A(a)\in B\}=\{a\in A\mid a\in B\}=A\cap B. \]So "intersect with \(A\)" and "take \(\iota_A^{-1}\)" are the same operation, and therefore \(\mathcal E|_A=\iota_A^{-1}(\mathcal E)\) and \(\sigma(\mathcal E)|_A=\iota_A^{-1}(\sigma(\mathcal E))\). Now apply Exercise 1 with \(f=\iota_A\):
\[ \sigma\bigl(\mathcal E|_A\bigr)=\sigma\bigl(\iota_A^{-1}(\mathcal E)\bigr) \overset{\text{Ex. 1}}{=}\iota_A^{-1}\bigl(\sigma(\mathcal E)\bigr)=\sigma(\mathcal E)\big|_A. \;\;∎ \]Why this is useful. Convention 1.16 equips a subset \(A\subseteq\R^n\) with \(\mathcal B^n|_A\). This exercise says you may compute that either by generating on \(\R^n\) and then restricting, or by restricting the generators first and generating inside \(A\) — the answer is the same. Without it, "the Borel sets of \([0,1]\)" would be ambiguous.
Typo in the official solution: it writes \(\iota_A:A\hookrightarrow X\) and "for all \(B\subseteq X\)"; the set is called \(\Omega\) in this exercise.
Old-exam tasks
WiSe 25/26, Problem 1a — is this a \(\sigma\)-algebra? WiSe25 · P1a · 3 credits
Statement. On \(\Omega=\{\circ,\triangle,\star\}\), the set \(\{\emptyset,\{\circ\},\{\star\},\{\circ,\star\},\Omega\}\) is a \(\sigma\)-algebra. True or false? Justify by a proof or a concrete counterexample.
Official answer: False. The complement \(\Omega\setminus\{\circ\}=\{\triangle,\star\}\) is not in the set.
My verification: correct. Definition 1.6(ii) demands \(A^c\in\Aa\) for every \(A\in\Aa\). Taking \(A=\{\circ\}\) gives \(A^c=\{\triangle,\star\}\), which does not appear in the listed collection — the listed sets containing \(\triangle\) are only \(\Omega\) itself. One witness is enough to refute a "for all" statement.
Exam technique for this recurring question type
Check in this order, it is the fastest:
- Count. A \(\sigma\)-algebra on a finite \(\Omega\) has \(2^k\) members. Here there are 5 members — not a power of 2 — so it is already dead. (This shortcut is mine; it will not earn the credits on its own, because the marking scheme asks for a witness. Use it to know the answer instantly, then write the witness.)
- Complements. Pair every listed set with its complement and look for an unpaired one. Here \(\emptyset\leftrightarrow\Omega\) is the only pair that closes. The other three listed sets are all unpaired: \(\{\circ\}^c=\{\triangle,\star\}\) ✗ (the official witness), \(\{\star\}^c=\{\circ,\triangle\}\) ✗ and \(\{\circ,\star\}^c=\{\triangle\}\) ✗. Any one of the three is a complete answer — you need exactly one.
- Unions. Only if complements pass.
Then write one line: name the set, name its complement, say it is absent. The marking scheme for this problem gives 3 credits and the solution is two lines long.
WiSe 25/26, Problem 1c — does agreeing on a generator force two measures to agree? WiSe25 · P1c · 3 credits
Statement. Let \(\Omega\) be a set, \(\mathcal L\subseteq\pow(\Omega)\), and let \(\mathcal S\) be the \(\sigma\)-algebra \(\mathcal S=\bigcap\{\Aa\mid\Aa\text{ is a }\sigma\text{-algebra on }\Omega \text{ and }\mathcal L\subseteq\Aa\}\) — that is, \(\mathcal S=\sigma(\mathcal L)\) in the notation of Lemma 1.8. Then for any two probability measures \(\P_1,\P_2\) on \((\Omega,\mathcal S)\) with \(\P_1(L)=\P_2(L)\) for all \(L\in\mathcal L\), it already holds that \(\P_1=\P_2\). True or false?
Official answer: False, with \(\Omega=\{1,2,3,4\}\), \(\mathcal L=\bigl\{\{1,2\},\{2,3\}\bigr\}\), hence \(\mathcal S=\pow(\Omega)\), and
\[ \P_1=\tfrac13\delta_1+\tfrac13\delta_2+\tfrac13\delta_3,\qquad \P_2=\tfrac16\delta_1+\tfrac12\delta_2+\tfrac16\delta_3+\tfrac16\delta_4, \]that is, the pmfs (probability mass functions: the list of probabilities of the single points) \(p_1=(\tfrac13,\tfrac13,\tfrac13,0)\) and \(p_2=(\tfrac16,\tfrac12,\tfrac16,\tfrac16)\) on \(\{1,2,3,4\}\). (\(\delta_k\) is the Dirac measure at \(k\): \(\delta_k(A)=1\) if \(k\in A\) and 0 otherwise. A weighted sum of Diracs is just a pmf written compactly.)
My verification: correct, and here is every step.
Step 1 — is \(\mathcal S\) really \(\pow(\Omega)\)? Start from \(\{1,2\}\) and \(\{2,3\}\) and close under the axioms. Complements give \(\{3,4\}\) and \(\{1,4\}\). Intersections (legitimate by Corollary 1.10) give
\[ \{1,2\}\cap\{2,3\}=\{2\},\quad \{1,2\}\cap\{1,4\}=\{1\},\quad \{2,3\}\cap\{3,4\}=\{3\},\quad \{3,4\}\cap\{1,4\}=\{4\}. \]All four singletons are in \(\mathcal S\); every subset of \(\Omega\) is a union of singletons, so \(\mathcal S=\pow(\Omega)\). ✓
Step 2 — do the two measures agree on \(\mathcal L\)?
\[ \P_1(\{1,2\})=\tfrac13+\tfrac13=\tfrac23,\qquad \P_2(\{1,2\})=\tfrac16+\tfrac12=\tfrac23 \;✓ \] \[ \P_1(\{2,3\})=\tfrac13+\tfrac13=\tfrac23,\qquad \P_2(\{2,3\})=\tfrac12+\tfrac16=\tfrac23 \;✓ \]Step 3 — are they different? \(\P_1(\{4\})=0\) while \(\P_2(\{4\})=\tfrac16\). ✓ Also both are genuine probability measures: the weights are non-negative and sum to 1 in each case (\(3\times\tfrac13=1\); \(\tfrac16+\tfrac12+\tfrac16+\tfrac16=1\)). The statement is refuted.
(The printed solution renders the shared value as "32", an artefact of the PDF; it is \(\tfrac23\).)
The deeper point, which the exam does not state My addition
Agreeing on a generator does force equality — provided the generator is closed under intersection (such a collection is called a \(\pi\)-system). That is the uniqueness theorem behind Theorem 1.25, and it is why a cdf determines a measure: the half-lines \((-\infty,x]\) are closed under intersection, since \((-\infty,x]\cap(-\infty,y]=(-\infty,\min(x,y)]\).
The counterexample works precisely because \(\mathcal L\) here is not closed under intersection: \(\{1,2\}\cap\{2,3\}=\{2\}\notin\mathcal L\). The two measures were built to agree on the two listed sets while disagreeing on \(\{2\}\) — and nothing in the hypothesis pins \(\{2\}\) down. If you are asked this in an exam, the one-sentence reason is: the generator is not \(\cap\)-stable, so the uniqueness argument does not apply, and here is a counterexample.
SoSe 2026, Problem 2b — is the forward image of a \(\sigma\)-algebra a \(\sigma\)-algebra? SoSe26 · P2b · 3 credits
Statement. Let \(\Omega,\Omega'\) be sets, \(\Aa\) a \(\sigma\)-algebra on \(\Omega\), and \(f:\Omega\to\Omega'\) an arbitrary function. Then \(f(\Aa):=\{f(A)\mid A\in\Aa\}\) is a \(\sigma\)-algebra on \(\Omega'\). True or false, with justification.
Official answer: False. Take \(\Omega=\{1,2,3\}\), \(\Omega'=\{a,b\}\), \(f(1)=f(2)=a\), \(f(3)=b\), and \(\Aa=\{\emptyset,\{1,3\},\{2\},\Omega\}\). Although \(f\) is surjective (every element of \(\Omega'\) is hit by \(f\)), the forward images are \(f(\Aa)=\{\emptyset,\{a\},\{a,b\}\}\), which is not a \(\sigma\)-algebra on \(\Omega'\) because it contains \(\{a\}\) but not its complement \(\{b\}\).
My verification: correct. Two things need checking.
Is \(\Aa\) a \(\sigma\)-algebra on \(\{1,2,3\}\)? \(\Omega\in\Aa\) ✓. Complements: \(\emptyset^c=\Omega\) ✓, \(\{1,3\}^c=\{2\}\) ✓, \(\{2\}^c=\{1,3\}\) ✓, \(\Omega^c=\emptyset\) ✓. Unions: the only non-trivial one is \(\{1,3\}\cup\{2\}=\Omega\) ✓. So yes — it is \(\sigma(\{\{2\}\})\) in the form of Example 1.9(iii).
Are the images right? \(f(\emptyset)=\emptyset\); \(f(\{1,3\})=\{f(1),f(3)\}=\{a,b\}\); \(f(\{2\})=\{a\}\); \(f(\Omega)=\{a,b\}\). Removing the duplicate, \(f(\Aa)=\{\emptyset,\{a\},\{a,b\}\}\), and \(\{a\}^c=\{b\}\) is absent. ✓
In words — why forward images misbehave: \(f^{-1}\) commutes with complements (Sheet 1 Ex 2(iii)), but \(f\) does not. When \(f\) glues 1 and 2 together, the set \(\{2\}\) and its complement \(\{1,3\}\) both send an element to \(a\), so their images overlap instead of partitioning \(\Omega'\). In general \(f(A^c)\) and \(f(A)^c\) can differ when \(f\) is not injective (when two different points have the same image), as here.
Marking scheme: 1 point for "false", 2 points for a valid counterexample together with naming which \(\sigma\)-algebra property fails. Name the failing axiom explicitly — a counterexample without that sentence loses points.
The pairing to remember: pre-images always work (Sheet 1 Ex 6), forward images generally do not (this task). If you are asked about \(f\) and \(\sigma\)-algebras, the first question is which direction the map goes.
WiSe 25/26, Problem 6c — inclusion–exclusion in a tournament WiSe25 · P6c · 4 credits
Statement. You play a four-match tournament with the schedule SWWS — strong opponent, weak, weak, strong. Your win probability is \(p\) against the strong player and \(q\) against the weak player, with \(0<p<q<1\), and matches are independent. You win the tournament if you win at least two non-consecutive matches. Compute your probability of winning.
Note: the full problem also uses independence, which is §1.4 material. It is placed on this page because part (c) is the only exam appearance of Theorem 1.22, and because the inclusion–exclusion bookkeeping is the whole difficulty. "Independent" here means only that probabilities of match results multiply.
Solution. Let \(A_i\) be the event of winning match \(i\). With schedule SWWS,
\[ \P(A_1)=p,\quad \P(A_2)=q,\quad \P(A_3)=q,\quad \P(A_4)=p. \]The pairs of non-consecutive indices in \(\{1,2,3,4\}\) are \((1,3)\), \((1,4)\) and \((2,4)\) — the pairs \((1,2),(2,3),(3,4)\) are consecutive and do not count. So the winning event is \(E_{13}\cup E_{14}\cup E_{24}\) with \(E_{ij}:=A_i\cap A_j\). By independence,
\[ \P(E_{13})=pq,\qquad \P(E_{14})=p^2,\qquad \P(E_{24})=qp. \]For the pairwise intersections, note that \(E_{ij}\cap E_{kl}\) is the event of winning all the matches in \(\{i,j\}\cup\{k,l\}\):
\[ \P(E_{13}\cap E_{14})=\P(A_1\cap A_3\cap A_4)=p\,q\,p=p^2q, \] \[ \P(E_{13}\cap E_{24})=\P(A_1\cap A_2\cap A_3\cap A_4)=p\,q\,q\,p=p^2q^2, \] \[ \P(E_{14}\cap E_{24})=\P(A_1\cap A_2\cap A_4)=p\,q\,p=p^2q, \]and the triple intersection is again all four matches: \(\P(E_{13}\cap E_{14}\cap E_{24})=p^2q^2\). Theorem 1.22 with \(n=3\):
\[ \begin{aligned} \P(\text{win}) &= \bigl(pq+p^2+pq\bigr)-\bigl(p^2q+p^2q^2+p^2q\bigr)+p^2q^2\\ &= 2pq+p^2-2p^2q-p^2q^2+p^2q^2\\ &= 2pq+p^2-2p^2q \;=\; p\bigl(2q+p-2pq\bigr). \end{aligned} \]My verification: the official answer is correct. I also checked it by listing all \(2^4=16\) win/loss patterns by computer (e.g. \(p=0.3,q=0.7\) gives \(0.384\) both ways). The printed solution has two typos. First, it writes \(\P(E_{13}\cup E_{14}\cup E_{14})\), where the last term should be \(E_{24}\). Second, the bracket opened after the minus sign is closed only after the triple-intersection term, so as printed the line reads \(\ldots-\bigl(\P(E_{13}\cap E_{14})+\P(E_{13}\cap E_{24})+\P(E_{14}\cap E_{24})+\P(E_{13}\cap E_{14}\cap E_{24})\bigr)\) — which would subtract the triple term instead of adding it. The very next line of the official solution has the signs right, so it is a typesetting slip only. Two sanity checks of my own:
- \(q=1\) (you always beat the weak player): the formula gives \(p(2+p-2p)=p(2-p)=2p-p^2\). Check directly: with \(A_2,A_3\) certain, the non-consecutive pairs \((1,3)\) and \((2,4)\) reduce to "win match 1" and "win match 4", so the winning event is \(A_1\cup A_4\), with probability \(p+p-p^2=2p-p^2\) by \((\dagger)\). ✓
- \(p=0\) (you never beat the strong player): the formula gives 0. Correct, since every non-consecutive pair contains match 1 or match 4. ✓
The trap in this task is thinking the \(E_{ij}\) are independent because the \(A_i\) are. They are not — \(E_{13}\) and \(E_{14}\) both contain \(A_1\). Inclusion–exclusion is needed exactly because they overlap.
Summary sheet
The three definitions, in one place
- σ-algebra
- \(\Aa\subseteq\pow(\Omega)\) with (i) \(\Omega\in\Aa\), (ii) \(A\in\Aa\Rightarrow A^c\in\Aa\), (iii) \(A_i\in\Aa\Rightarrow\bigcup_{i\in\N}A_i\in\Aa\). Def. 1.6
- measure
- \(\mu:\Aa\to[0,\infty]\) with (i) \(\mu(\emptyset)=0\), (ii) \(\mu\ge0\), (iii) \(\sigma\)-additive on pairwise disjoint sequences. Def. 1.17
- prob. measure
- a measure with \(\P(\Omega)=1\). Def. 1.20
- generated
- \(\sigma(\mathcal E)\) = the smallest \(\sigma\)-algebra containing \(\mathcal E\). Lem. 1.8
- Borel
- \(\mathcal B^n=\sigma(\text{open boxes in }\R^n)\). Ex. 1.13
- cdf
- \(F(x)=\P((-\infty,x])\). Def. 1.23
Everything that follows
| Fact | Where | Needs |
|---|---|---|
| \(\emptyset\in\Aa\); \(\Aa\) closed under \(\cup,\cap,\setminus,\Delta\), countable \(\cap\) | Cor. 1.10 | padding + de Morgan |
| \(\bigcap_\alpha\Aa_\alpha\) is a \(\sigma\)-algebra; \(\Aa_1\cup\Aa_2\) usually is not | Prop. 1.7 / Sheet 1 Ex 4(ii) | — |
| \(\mu(A\cup B)+\mu(A\cap B)=\mu(A)+\mu(B)\) | Prop. 1.19(i) | additivity |
| \(\mu(B\setminus A)=\mu(B)-\mu(A)\) for \(A\subseteq B\) | Prop. 1.19(ii) | \(\mu(A)<\infty\) |
| monotone, \(\sigma\)-subadditive | Prop. 1.19(iii),(vi) | — |
| continuity from below | Prop. 1.19(iv) | increasing sets |
| continuity from above | Prop. 1.19(v) | decreasing and \(\mu(A_0)<\infty\) |
| \(\P(A^c)=1-\P(A)\), \(\P(A)\le1\) | Sheet 2 Ex 1(i) | \(\P(\Omega)=1\) |
| inclusion–exclusion | Thm. 1.22 | finitely many events |
| cdf: increasing, right-continuous, limits 0 and 1, jumps = \(\P(\{x\})\) | Lem. 1.24 | Prop. 1.19(iv),(v) |
| cdf ↔ measure is one-to-one (each determines the other) | Thm. 1.25 | no proof required |
| \(\pow([0,1))\) admits no translation-invariant \(\P\) | Thm. 1.28 | axiom of choice |
The two proof moves that solve most exercises
- Pad with \(\emptyset\) (for unions) or with \(\Omega\) (for intersections) to turn finite statements into the countable ones the axioms speak about.
- Route through complements: \(\bigcap_i A_i=\bigl(\bigcup_i A_i^c\bigr)^c\). A \(\sigma\)-algebra has no intersection axiom, so every intersection argument goes this way.
- For "smallest \(\sigma\)-algebra" claims, never describe \(\sigma(\mathcal E)\). Show \(\mathcal E\subseteq\mathcal B\) for a \(\sigma\)-algebra \(\mathcal B\) and invoke minimality (Lemma 1.8).
Exam focus
This page has produced four exam tasks in the three past exams we have — more than any other subchapter of Chapter 1. Three of them (WiSe25 P1a, WiSe25 P1c, SoSe26 P2b) sat in an opening True/False problem, where a single clean witness is worth full credit; the fourth (WiSe25 P6c) was one part buried inside a long applied problem.
- "Is this a \(\sigma\)-algebra?" (WiSe25 P1a). Check complements first; count members and compare with \(2^k\) as a private shortcut. Write one witness.
- "Do these constructions preserve \(\sigma\)-algebras?" (SoSe26 P2b). Pre-images: yes. Forward images: no. Intersections: yes. Unions: no. Memorise those four.
- "Does agreeing on a generator determine the measure?" (WiSe25 P1c). Only if the generator is closed under intersection. Otherwise build a four-point counterexample.
- Inclusion–exclusion (WiSe25 P6c). Appears inside long applied problems, not on its own. Watch for events that overlap because they share an underlying match, draw or trial.
- Marking schemes reward naming the failed axiom. "False, because \(\{a\}\in f(\Aa)\) but \(\{b\}=\{a\}^c\notin f(\Aa)\), so Definition 1.6(ii) fails" is a full-credit answer; "False, see counterexample" is not.
Not examined so far: the Vitali theorems, the philosophical interlude (Remarks 1.30, 1.33 and Viewpoints 1.31, 1.32), and Theorem 1.25's proof.
Self-test
Section 1.2 · Lectures 2–3 (22 April & 6 May 2026)
Discrete probability spaces and distributions
Diskrete Wahrscheinlichkeitsräume und Verteilungen
What this page covers Script §1.2, pp. 20–29
Everything from Definition 1.34 to Example 1.43. The script's section goal: "Introduce common discrete probability distributions and learn how to perform computations in discrete probability spaces." (The script's lecture marker "— Lecture 3" sits just before Example 1.39, so Definition 1.34 to Remark 1.38 were still part of Lecture 2.)
Worked in place: Sheet 0 (Ex. 2, 3, 4, 5 — Ex. 1 and 6 are on the Chapter 0 page), Sheet 2 (Ex. 2, 4), Sheet 3 (Ex. 3, 4), Sheet 4 (Ex. 1).
After the abstract §1.1 (previous page), this page is concrete: almost everything is counting. It also introduces the seven named discrete distributions. You will use them for the rest of the course.
The big picture
A reminder of the setting. In §1.1 a probability space is a triple \((\Omega,\Aa,\P)\):
- \(\Omega\) is the sample space [Ergebnisraum] — the set of all possible outcomes;
- \(\Aa\) is the \(\sigma\)-algebra [\(\sigma\)-Algebra] — the collection of subsets of \(\Omega\) ("events") that we are allowed to give a probability;
- \(\P\) is the probability measure — it assigns a number in \([0,1]\) to each event.
§1.1 had to be careful because of uncountable sets like \([0,1]\). This page deals with the easy case: \(\Omega\) is at most countable. That means \(\Omega\) is finite, or its elements can be listed as \(\omega_1,\omega_2,\omega_3,\dots\) (like \(\N\)). Then there is no difficulty at all. We can let every subset be an event, i.e. \(\Aa=\pow(\Omega)\), the power set [Potenzmenge] (the set of all subsets of \(\Omega\); see B2).
And the whole measure \(\P\) shrinks to a list of numbers: one probability per outcome. That list is called the pmf. Example: a fair die has the list \(\tfrac16,\tfrac16,\tfrac16,\tfrac16,\tfrac16,\tfrac16\).
The page has three parts:
- The pmf (Def. 1.34, Lem. 1.35): on a countable \(\Omega\), giving \(\P\) is the same as giving a pmf. Every probability is then a sum.
- Counting (Lem. 1.36, Rem. 1.37, Ex. 1.40, Ex. 1.41): if all outcomes are equally likely, then \(\P(A)=|A|/|\Omega|\), where \(|A|\) is the number of elements of \(A\). Probability becomes counting. The hard part is not the arithmetic. It is choosing \(\Omega\) so that "equally likely" is really true.
- The catalogue (Ex. 1.39, Thm. 1.42): seven named distributions that appear again and again, and one theorem linking two of them.
The section ends with Bertrand's paradox (Ex. 1.43). It is the continuous version of the warning in Example 1.41: "choose at random" means nothing until you say how you choose.
Primer: everything you need to count My addition
Cross-references
The full counting toolkit with proofs and widgets is background page B3; this primer is the short version. The series come from your Analysis guide: geometric series, exponential series, \((1+x/n)^n\to e^x\) (Lemma 6.24), absolute convergence and rearrangement.
The script assumes counting methods from Discrete Structures [Diskrete Strukturen]. Here they are from scratch. Every fact below is used on this page.
1. The product rule
If a choice is made in \(k\) stages, with \(n_1\) options at the first stage, \(n_2\) at the second (whatever happened first), and so on, the total number of results is \(n_1 \cdot n_2 \cdots n_k\).
Why: for each of the \(n_1\) first choices there are \(n_2\) continuations, giving \(n_1 n_2\) results after two stages; repeat. Example: a 3-letter code from \(\{a,b\}\) has \(2\cdot2\cdot2=8\) possibilities.
2. Factorials
\(n! := n\cdot(n-1)\cdots2\cdot1\) for \(n\in\N_{>0}\), and \(0! := 1\) by convention. So \(4! = 24\), \(1! = 1\).
\(n!\) is the number of ways to arrange \(n\) distinct objects in a row: \(n\) choices for the first position, \(n-1\) for the second, and so on, by the product rule. The convention \(0!=1\) is not arbitrary — there is exactly one way to arrange nothing (the empty arrangement), and it is what makes the formulas below work at the edges.
3. Binomial coefficients
For \(0\le k\le n\),
\[ \binom{n}{k} := \frac{n!}{k!\,(n-k)!} \]read "\(n\) choose \(k\)". It counts the \(k\)-element subsets of an \(n\)-element set (this is proved below, in the proof of Lemma 1.36(iii)). Example: \(\binom42=\frac{24}{2\cdot2}=6\), and indeed \(\{1,2,3,4\}\) has the six 2-element subsets \(\{1,2\},\{1,3\},\{1,4\},\{2,3\},\{2,4\},\{3,4\}\). We set \(\binom{n}{k}=0\) when \(k<0\) or \(k>n\), since there are no such subsets.
Facts used below, with reasons:
- \(\binom{n}{k}=\binom{n}{n-k}\): choosing which \(k\) to take is the same as choosing which \(n-k\) to leave.
- \(\binom{n}{0}=\binom{n}{n}=1\): one empty subset, one full subset.
- Binomial theorem: \((x+y)^n=\sum_{k=0}^{n}\binom{n}{k}x^k y^{n-k}\). Why: expanding the product \((x+y)(x+y)\cdots(x+y)\) means choosing \(x\) or \(y\) from each of the \(n\) factors; a term \(x^ky^{n-k}\) arises once for each way of picking the \(k\) factors that contribute \(x\), and there are \(\binom{n}{k}\) such ways.
4. Two series you will need
- Geometric series: \(\sum_{j=0}^{\infty}q^{j}=\dfrac{1}{1-q}\) for \(|q|<1\). (The symbol \(\sum_{j=0}^{\infty}\) means "add up the terms for \(j=0,1,2,\dots\) forever", i.e. the limit of the partial sums. Example: \(1+\tfrac12+\tfrac14+\dots=\frac{1}{1-1/2}=2\).)
- Exponential series: \(e^{x}=\sum_{k=0}^{\infty}\dfrac{x^{k}}{k!}\) for every real \(x\). This is the definition of \(e^x\) used in Sheet 2 Exercise 4 and in checking that the Poisson pmf sums to 1.
5. Product notation and the power laws
The capital Greek letter \(\prod\) (pi, for "product") is the multiplication version of \(\sum\): \(\prod_{i=1}^{n}a_i:=a_1\cdot a_2\cdots a_n\), "multiply the numbers \(a_i\) for \(i=1,2,\dots,n\)". Example: \(\prod_{i=1}^{3}\frac{i}{i+1}=\frac12\cdot\frac23\cdot\frac34=\frac14\) (each numerator cancels the previous denominator). If there are no factors at all (e.g. \(\prod_{i=1}^{0}\)), the product is \(1\), for the same reason that an empty sum is \(0\): multiplying by nothing changes nothing. Rules and more examples: B3 — product notation.
The pmfs below are full of powers such as \((1-p)^{k-1}\) or \(p^r\). Three power laws [Potenzgesetze] do all the work, for any number \(a\neq0\) and whole numbers \(m,k\):
- \(a^{m+k}=a^m\cdot a^k\) — e.g. \(2^{3+2}=32=8\cdot4\). Read backwards it splits a power: \((1-p)^{n-k}=(1-p)^n\cdot(1-p)^{-k}\), used in the Poisson limit proof below.
- \(a^{-k}=\dfrac1{a^k}\) and \(a^0=1\) — e.g. \(2^{-3}=\tfrac18\). This is forced by the first law: \(a^{k}\cdot a^{-k}=a^{0}=1\).
- \((a^m)^k=a^{mk}\) and \((ab)^k=a^kb^k\) — e.g. \((2^2)^3=64=2^6\), \((2\cdot3)^2=36=4\cdot9\).
Your Analysis guide proves the same laws for real exponents: Analysis 5.2 — general powers.
6. Complement counting
When an event says "at least one", count the opposite. Write \(A^c\) for the complement [Komplement] of \(A\) inside \(\Omega\), i.e. \(A^c:=\Omega\setminus A\), the set of all outcomes that are not in \(A\). (Three notations for the same thing appear in this course and on this page: \(A^c\), \(\Omega\setminus A\) and \(\bar A\). They mean the same set; the script mostly writes \(\Omega\setminus A\).) Every outcome is in exactly one of \(A\) and \(A^c\), so \(|A| = |\Omega| - |A^c|\), and dividing by \(|\Omega|\) gives \(\P(A)=1-\P(A^c)\). "At least one six in six dice" has a messy direct count (overlaps everywhere); "no six at all" is a clean product. This trick solves Sheet 0 Ex 1(iii), Sheet 0 Ex 3(ii), Sheet 0 Ex 5(ii), Sheet 2 Ex 2, Sheet 3 Ex 4(ii) and Sheet 4 Ex 1(ii).
7. What "uniformly at random" is allowed to mean
The formula \(\P(A)=|A|/|\Omega|\) only holds when every element of \(\Omega\) has the same probability. It is not the definition of probability. It is what the Laplace distribution \(\Lap_\Omega\) (Example 1.39(i)) gives. Half the work in every counting exercise is choosing \(\Omega\) so that this assumption is true. Example 1.41 shows in detail what goes wrong otherwise.
Discrete probability spaces and the pmf
Definition 1.34 discrete probability space, pmf Script 1.34
Let \(\Omega\) be an at most countable set. A probability measure \(\P\) on \((\Omega,\Aa:=\pow(\Omega))\) is called a discrete probability measure, and \((\Omega,\Aa,\P)\) a discrete probability space. The map
\[ p:\Omega\to[0,1],\qquad \omega\mapsto p(\omega):=\P(\{\omega\}) \]is called the probability mass function (pmf) [Zähldichte] for \(\P\).
Reading the notation. \(p:\Omega\to[0,1]\) says: \(p\) is a function that takes an outcome and returns a number between 0 and 1. \(\omega\mapsto\P(\{\omega\})\) says what that number is: the probability of the event "the outcome is exactly \(\omega\)".
"At most countable" means finite or countably infinite. The \(\sigma\)-algebra is fixed to be the full power set. This is allowed because the Vitali problem of Theorem 1.28 (a set that cannot be given a probability) only happens on uncountable spaces. It matches Convention 1.16, which says countable spaces always carry their power set.
The curly braces matter. \(p(\omega)\) is a number attached to an element. \(\P(\{\omega\})\) is the probability of the one-element set \(\{\omega\}\). The definition says the two numbers are equal, but the inputs are different kinds of objects.
Example of mine: a die loaded towards six, \(\Omega=[6]=\{1,\dots,6\}\), with \(p(1)=\dots=p(5)=0.1\) and \(p(6)=0.5\). Then \(\P(\text{even})=p(2)+p(4)+p(6)=0.1+0.1+0.5=0.7\). Lemma 1.35 says this "add up the pmf" rule always works.
Lemma 1.35 correspondence between pmf and \(\P\) Script 1.35
- Let \((\Omega,\Aa,\P)\) be a discrete probability space. Then \(\P\) is uniquely determined by its pmf \(p\).
- Let \(\Omega\) be countable and \(p:\Omega\to[0,1]\) with \(\sum_{\omega\in\Omega}p(\omega)=1\). Then
is a discrete probability measure on \((\Omega,\pow(\Omega))\) with pmf \(p\).
(\(\sum_{\omega\in A}p(\omega)\) means: add \(p(\omega)\) over all outcomes \(\omega\) in \(A\). If \(A\) is infinite this is a series; since all terms are \(\ge0\), the order of adding does not matter.)
In words: on a countable space, "probability measure" and "list of non-negative numbers that add up to 1" are the same thing. This saves a lot of work: you never have to check \(\sigma\)-additivity by hand (\(\sigma\)-additivity is condition (iii) of Definition 1.17: the probability of a union of countably many pairwise disjoint events equals the sum of their probabilities). You only check two things about a list of numbers: each is \(\ge0\), and they add up to 1.
Proof supplied by me — the script states this without proof
(i) \(p\) determines \(\P\). Let \(A\subseteq\Omega\) be any event. Since \(\Omega\) is at most countable, so is \(A\), and we may write it as a disjoint union of its own singletons:
\[ A=\dot\bigcup_{\omega\in A}\{\omega\}. \]These singletons are pairwise disjoint (different elements) and all lie in \(\Aa=\pow(\Omega)\). Definition 1.17 states \(\sigma\)-additivity for a family \((A_i)_{i\in\N}\) indexed by all of \(\N\); if \(A\) is finite we therefore list its singletons first and then set all remaining \(A_i:=\emptyset\). This changes nothing, because \(\P(\emptyset)=0\) adds zeros to the sum, and it puts the family into the shape Definition 1.17 asks for. \(\sigma\)-additivity then gives
\[ \P(A)=\sum_{\omega\in A}\P(\{\omega\})=\sum_{\omega\in A}p(\omega). \]So the value of \(\P\) at every event is computed from \(p\) alone: two probability measures with the same pmf agree everywhere, which is what "uniquely determined" means. ✓
(ii) every summable list gives a measure. Define \(\P(A):=\sum_{\omega\in A}p(\omega)\) and check the axioms of Definition 1.17 plus \(\P(\Omega)=1\).
- \(\P(\emptyset)=0\): the empty sum is 0 by convention.
- non-negativity: a sum of numbers in \([0,1]\) is \(\ge0\).
- \(\sigma\)-additivity: let \(A_0,A_1,\dots\) be pairwise disjoint. Every \(\omega\in\bigcup_i A_i\) lies in exactly one \(A_i\), so each term \(p(\omega)\) appears exactly once on each side of
The step that needs care is regrouping an infinite sum. It is legitimate here because all terms are non-negative and the total is finite (it is at most 1), so the series converges absolutely (i.e. the sum of the absolute values \(|p(\omega)|\) is finite — here the absolute values are the terms themselves, since every \(p(\omega)\ge0\)); and an absolutely convergent series may be rearranged and grouped arbitrarily without changing its value (Analysis 3.3, rearrangement theorem). This is the same fact the script appeals to on page 8 when it says "analysis then tells us that any subseries also converges". If the \(p(\omega)\) could be negative, the rearrangement would not be allowed.
- \(\P(\Omega)=1\): this is the assumption \(\sum_{\omega\in\Omega}p(\omega)=1\).
- its pmf is \(p\): \(\P(\{\omega\})\) is a sum over a one-element set, namely \(p(\omega)\). ✓ ∎
Urn models: the four ways to draw Script 1.36
An urn [Urne] is a box holding \(n\) objects that we can tell apart (numbered \(1,\dots,n\)). We draw \(k\) times. Two yes/no questions fix the model:
- With or without replacement [mit/ohne Zurücklegen] — is a drawn object put back before the next draw?
- Ordered or unordered [mit/ohne Reihenfolge] — does the order in which the objects came out belong to the outcome?
Two yes/no choices give four models. Each has its own \(\Omega\) and its own size \(|\Omega|\).
Notation. \([n]:=\{1,\dots,n\}\). \([n]^k\) is the set of all lists (tuples) \((\omega_1,\dots,\omega_k)\) of length \(k\) with entries in \([n]\). In this course \(0\) is a natural number: Convention 1.1 of the script fixes \(\N=\{0,1,2,\dots\}\), so \(\N_0\) and \(\N\) mean the same set, and \(\N_{>0}=\{1,2,3,\dots\}\), \(\N_{\ge r}=\{r,r+1,r+2,\dots\}\). (Many school books use \(\N\) for \(\{1,2,3,\dots\}\); here it contains \(0\). This matters below: the Poisson distribution lives on \(\N\) and its outcome \(0\) is allowed.) The script writes \(\N_0^{\,n}\) in Lemma 1.36(iv) and \(\N^4\) in Example 1.40(iii) for the same kind of set. Script 1.1
A tiny example first: \(n=3\) objects, \(k=2\) draws My addition
- (i) with replacement, ordered: \((1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)\) — \(9=3^2\) outcomes.
- (ii) without replacement, ordered: \((1,2),(1,3),(2,1),(2,3),(3,1),(3,2)\) — \(6=\frac{3!}{1!}\) outcomes (no repeats allowed).
- (iii) without replacement, unordered: \(\{1,2\},\{1,3\},\{2,3\}\) — \(3=\binom32\) outcomes (\((1,2)\) and \((2,1)\) become the same set).
- (iv) with replacement, unordered: record how often each object was drawn, \((a_1,a_2,a_3)\): \((2,0,0),(0,2,0),(0,0,2),(1,1,0),(1,0,1),(0,1,1)\) — \(6=\binom{3+2-1}{2}\) outcomes.
Lemma 1.36 classical urn models Script 1.36
An urn with \(n\in\N_{>0}\) distinct objects and \(k\in\N_{>0}\) draws.
- With replacement, ordered. \(\Omega=[n]^k\), \(\;|\Omega|=n^k\).
- Without replacement, ordered. \(\Omega=\bigl\{(\omega_1,\dots,\omega_k)\in[n]^k \bigm| \omega_i\ne\omega_j \text{ for } i\ne j\bigr\}\), \(\;|\Omega|=\dfrac{n!}{(n-k)!}\).
- Without replacement, unordered. \(\Omega=\{S\subseteq[n] \mid |S|=k\}\), \(\;|\Omega|=\dbinom{n}{k}\).
- With replacement, unordered. \(\Omega=\Bigl\{(a_1,\dots,a_n)\in\N_0^{\,n} \Bigm| \sum_{i=1}^{n}a_i=k\Bigr\}\), \(\;|\Omega|=\dbinom{n+k-1}{k}\), where \(a_i\) counts how often object \(i\) is drawn.
Note on (iv): the outcome is not a tuple of draws but an occupancy vector — how many times each object came out. That is what "unordered with replacement" has to mean: once you forget the order, all that is left of the \(k\) draws is a multiset [Multimenge] — a collection in which an object may appear several times but the order is not recorded — and a multiset is the same information as the list of counts. Cases (ii) and (iii) require \(k\le n\): you cannot draw more distinct objects than the urn holds, so for \(k>n\) both sample spaces are empty. Case (iii) reports this correctly, because \(\binom{n}{k}=0\) for \(k>n\) by the convention in the primer. Case (ii) needs a word of care: the quotient \(\frac{n!}{(n-k)!}\) is not defined for \(k>n\), since \((n-k)!\) would be the factorial of a negative number. The form the proof actually produces, \(n(n-1)\cdots(n-k+1)\), is defined for every \(k\), and for \(k>n\) one of its factors is \(n-n=0\), so it gives \(0\) — which is the right answer. Read \(\frac{n!}{(n-k)!}\) as a shorthand that is valid only while \(k\le n\). (clarification mine)
Proofs of the four counts supplied by me — the script states them without proof
(i) \(|[n]^k| = n^k\). An outcome is a tuple \((\omega_1,\dots,\omega_k)\). Each of the \(k\) positions is filled independently with any of the \(n\) objects, because the object is replaced after every draw. By the product rule, \(\underbrace{n\cdot n\cdots n}_{k}=n^k\). ✓
(ii) \(n!/(n-k)!\). Now the objects already drawn are gone. The first draw has \(n\) options, the second \(n-1\), …, the \(k\)-th has \(n-k+1\). By the product rule the count is
\[ n(n-1)\cdots(n-k+1)=\frac{n(n-1)\cdots(n-k+1)\cdot(n-k)\cdots1}{(n-k)\cdots1}=\frac{n!}{(n-k)!}. \;✓ \](iii) \(\binom{n}{k}\). Count the ordered outcomes of (ii) in a second way. Every \(k\)-element subset \(S\) can be written out in \(k!\) different orders (arrange \(k\) distinct objects — see the factorial fact in the primer), and every ordered outcome of (ii) arises from exactly one subset in exactly one of its orders. So
\[ \bigl(\text{number of }k\text{-subsets}\bigr)\cdot k! \;=\; \frac{n!}{(n-k)!} \quad\Longrightarrow\quad \text{number of }k\text{-subsets}=\frac{n!}{k!\,(n-k)!}=\binom{n}{k}. \;✓ \](This "count the same set in two ways" argument is called double counting. It is also the proof that \(\binom nk\), defined in the primer by a formula, really counts \(k\)-subsets.)
(iv) \(\binom{n+k-1}{k}\) — "stars and bars". An outcome is a list of counts \((a_1,\dots,a_n)\) of non-negative integers adding to \(k\). Encode such a list as a row of symbols: write \(a_1\) stars, then a bar, then \(a_2\) stars, then a bar, …, then a bar, then \(a_n\) stars. For example with \(n=4\), \(k=6\) the occupancy \((3,0,2,1)\) becomes
\[ \star\star\star \mid \;\mid \star\star \mid \star . \]Every such row has exactly \(k\) stars and \(n-1\) bars, so \(n+k-1\) symbols in total. And the encoding is reversible: from any arrangement of \(k\) stars and \(n-1\) bars you read off the counts by looking at the gaps between bars. So occupancy vectors correspond one-to-one with arrangements, and an arrangement is determined by choosing which \(k\) of the \(n+k-1\) positions hold stars:
\[ |\Omega|=\binom{n+k-1}{k}. \;✓ \;\;∎ \]Sanity check against case (i) with \(n=4\), \(k=6\): ordered gives \(4^6=4096\) outcomes, unordered gives \(\binom{9}{6}=84\). Far fewer — and, crucially, the 84 are not equally likely if the underlying mechanism is 6 independent choices. That is precisely the content of Example 1.41.
Remark 1.37 where each urn model applies Script 1.37
| Model | The script's examples |
|---|---|
| with replacement, ordered | repeated independent trials — wheels of fortune, generating random passwords |
| without replacement, ordered | sequentially picking distinct items — assigning prizes to distinct winners |
| without replacement, unordered | simple random sampling without replacement — drawing lottery numbers |
| with replacement, unordered | distributing indistinguishable balls into distinguishable bins — identical resources among agents |
How to choose, in practice My addition
Ask two questions about the story, not about the answer you want.
- Can the same object appear twice? Yes → with replacement. No → without.
- Would swapping two of the draws give a different outcome as far as the question is concerned? Yes → ordered. No → unordered.
And then a third, which is the one people forget: are the outcomes of the \(\Omega\) I just chose equally likely? Ordered models are safe here, because the underlying mechanism usually acts on positions. Unordered models are safe when the mechanism itself is unordered (drawing a handful of lottery balls at once). If in doubt, use the ordered model — it is always defensible, and order-blind events can still be counted inside it. Sheet 0 Exercise 5 solves the same question both ways and gets the same answer, precisely because of this.
Remark 1.38 discrete probability measures on \(\R\) Script 1.38
Let \(\Omega\subseteq\R\) be countable and \(p\) a pmf on \(\Omega\). The probability measure \(\P\) on \((\R,\mathcal B)\) given by
\[ \P:\mathcal B\to[0,1],\qquad A\mapsto\sum_{\omega\in\Omega\cap A}p(\omega) \]and the corresponding cdf
\[ F:\R\to[0,1],\qquad x\mapsto\sum_{\omega\in\Omega\cap(-\infty,x]}p(\omega) \]are called discrete.
Symbols. \(\mathcal B\) is the Borel \(\sigma\)-algebra on \(\R\) (the events built from intervals; see B4). The cdf [Verteilungsfunktion] of Definition 1.23 is \(F(x)=\P((-\infty,x])\), the probability of landing at or below \(x\). \(\Omega\cap A\) keeps only the mass points that lie in \(A\).
What this achieves. It moves a discrete distribution onto the real line, so the cdf tools of §1.1 apply. All the mass sits on a countable set, and there is none anywhere else. So the cdf is a staircase: flat between the mass points, and jumping up by \(p(\omega)\) at each one — exactly Lemma 1.24(iv) (jump height \(=\P(\{x\})\)). The cdf widget on the §1.1 page draws this for \(\Omega=\{0,1,2\}\).
Example of mine: a fair coin coded as \(\Omega=\{0,1\}\), \(p(0)=p(1)=\tfrac12\). Then \(F(x)=0\) for \(x<0\), \(F(x)=\tfrac12\) for \(0\le x<1\), and \(F(x)=1\) for \(x\ge1\). Also \(\P([0.2,0.9])=0\), because no mass point lies in that interval.
The seven named discrete distributions Script 1.39
This is the catalogue you must know by heart. Every later chapter uses it. Exam problems open with a line like "let \(X_1,\dots,X_n\) be iid \(\Ber(p)\)" and never define it — see the old-exam section below for which of the seven actually turn up.
Each distribution below is a pmf in the sense of Definition 1.34: a sample space \(\Omega\) plus a number \(p(\omega)\) for each outcome. The letters in brackets, like \(n\) and \(p\) in \(\Bin(n,p)\), are parameters: fixed numbers you choose to fit the situation (number of trials, success probability, …). For each one I also check that the masses add up to 1, so that Lemma 1.35(ii) makes it a genuine probability measure.
Two pieces of vocabulary used from here on My addition
The symbol \(\sim\). "\(X\sim\Bin(n,p)\)" is read "\(X\) is distributed as [ist verteilt wie] \(\Bin(n,p)\)", and it means: the quantity \(X\) takes the value \(\omega\) with probability \(p_{\Bin(n,p)}(\omega)\). A superscript, as in \(X_1,\dots,X_m\overset{\text{iid}}{\sim}\Bin(n,p)\) (\(m\) quantities, each binomial with the same \(n\) and \(p\)), adds that the \(X_i\) are independent and identically distributed — the same distribution each, and none of them influencing the others (Definition 1.79, §1.4). Here \(X\) is a random variable [Zufallsvariable]: informally, a number read off the outcome, such as "how many of the six dice showed a six". The precise definition only comes in §1.3 (next page); on this page \(\sim\) appears only in pointers to later chapters and in Example 1.41, and nothing on this page depends on it.
The word "support". The support [Träger] of a distribution is the set of outcomes it can actually produce — for us simply the sample space \(\Omega\) listed with each pmf below. Saying "\(\Geo(p)\) has support \(\N_{>0}\)" is saying "a \(\Geo(p)\) outcome is one of \(1,2,3,\dots\), never \(0\)". Getting a support wrong (starting \(\Geo\) at \(0\), or confusing \(\{0,1\}^n\) with \(\{0,\dots,n\}\)) is the classic way to lose marks here.
The script's figures Script 1.39, figures. Next to each distribution the script plots its pmf (bars) and its cdf (staircase) for one parameter choice: Uniform with \(N=10\) (\(\Omega=[10]\)), \(\Hyp(50,20,15)\), \(\Ber(0.7)\), \(\Bin(20,0.4)\), \(\NegBin(5,0.5)\), \(\Geo(0.3)\), \(\Poi(5.5)\). The explorer above opens on the script's values for Hyp, Bin, NegBin, Geo and Poi; for the uniform figure move the Lap slider to \(N=10\), and for \(\Ber(0.7)\) choose Bin with \(n=1\), \(p=0.70\) (the pmf of \(\Bin(1,p)\) is the pmf of \(\Ber(p)\)). What to see in them: the uniform pmf is flat at \(0.1\) and its cdf climbs in equal steps of \(0.1\); \(\Hyp(50,20,15)\) and \(\Bin(20,0.4)\) peak near 6 and 8 (at "sample size × fraction of successes"); \(\NegBin(5,0.5)\) starts at 5; \(\Geo(0.3)\) is largest at 1 and then falls; \(\Poi(5.5)\) peaks at 5. Every cdf rises from 0 to 1.
(i) Laplace / uniform distribution \(\Lap_\Omega\) Script 1.39(i)
For a finite sample space \(\Omega\), the pmf is
\[ p_{\Lap_\Omega}:\Omega\to[0,1],\qquad \omega\mapsto\frac{1}{|\Omega|}. \]When it applies: every outcome in a finite set is equally likely — drawing a card from a well-shuffled deck.
Sums to 1: \(|\Omega|\) outcomes each of mass \(1/|\Omega|\).
Consequence: for any \(A\subseteq\Omega\), \(\P(A)=\sum_{\omega\in A}1/|\Omega|=|A|/|\Omega|\). This is the counting formula, and it is only available for this distribution. Exercise sheet 0 writes it \(U_\Omega\), the script writes it \(\Lap_\Omega\) — the same object under two names, an inconsistency between the two documents.
(ii) Hypergeometric distribution \(\Hyp(N,K,n)\) Script 1.39(ii)
Parameters \(N\in\N\), \(K\in\{0,\dots,N\}\), \(n\in\{0,\dots,N\}\). Sample space \(\Omega=\{\max(0,n+K-N),\dots,\min(n,K)\}\) and pmf
\[ p_{\Hyp(N,K,n)}(\omega)=\frac{\dbinom{K}{\omega}\dbinom{N-K}{n-\omega}}{\dbinom{N}{n}}. \]When it applies: sampling without replacement. Counting defectives in a quality-control sample of size \(n\) from a batch of \(N\) items containing \(K\) defectives.
Reading the formula: the denominator counts all ways to choose the sample of size \(n\) from \(N\) items (urn model (iii)). The numerator counts the favourable ones: choose \(\omega\) of the \(K\) defectives and the remaining \(n-\omega\) from the \(N-K\) good items. So this is just \(|A|/|\Omega|\) with a cleverly split count.
Why the strange sample space: you cannot draw more defectives than exist (\(\omega\le K\)) or more than you drew (\(\omega\le n\)) — hence \(\min(n,K)\). And if the batch has only \(N-K\) good items and you draw \(n\) of them, you are forced to take at least \(n-(N-K)=n+K-N\) defectives — hence the \(\max(0,\cdot)\).
Sums to 1: by Vandermonde's identity \(\sum_{\omega}\binom{K}{\omega}\binom{N-K}{n-\omega}=\binom{N}{n}\), which itself is a counting argument: split the choice of \(n\) items from \(N\) according to how many came from the \(K\) marked ones.
(iii) Bernoulli process \(\Ber(n,p)\) and Bernoulli distribution \(\Ber(p)\) Script 1.39(iii)
For \(p\in[0,1]\) and \(n\in\N_{>0}\), on \(\Omega=\{0,1\}^n\):
\[ p_{\Ber(n,p)}\bigl(\omega=(\omega_i)_{i\in[n]}\bigr)=p^{\sum_{i\in[n]}\omega_i}\, (1-p)^{\,n-\sum_{i\in[n]}\omega_i}. \]For \(n=1\) we write \(\Ber(p):=\Ber(1,p)\), the Bernoulli distribution, with pmf
\[ p_{\Ber(p)}(\omega)=\begin{cases}p & \omega=1,\\ 1-p & \omega=0.\end{cases} \]When it applies: \(\Ber(p)\) is a single binary trial — a biased coin flip, or whether a manufactured part passes inspection. \(\Ber(n,p)\) captures repeated coin tosses. The script notes the extension to trials with more than two outcomes (repeatedly rolling a die) is called a Bernoulli scheme.
The distinction students lose marks on: \(\Ber(n,p)\) is not \(\Bin(n,p)\)
\(\Ber(n,p)\) lives on \(\{0,1\}^n\) — its outcomes are the whole sequences of results, so \(|\Omega|=2^n\). \(\Bin(n,p)\) lives on \(\{0,\dots,n\}\) — its outcomes are the number of successes, so \(|\Omega|=n+1\). The binomial is obtained from the Bernoulli process by counting successes, which is why the binomial coefficient \(\binom{n}{\omega}\) appears in the binomial pmf and not in the Bernoulli one: it counts how many sequences give the same total.
The script itself flags a second trap here: "we overload the symbol \(p\)" to mean both the pmf and the probability parameter, and it will keep doing so. In \(p_{\Ber(n,p)}\) the subscript \(p\) is a number and the function \(p\) is a pmf. The meaning is clear from context — but write them apart in your own solutions.
Sums to 1: expand the product \(\prod_{i=1}^{n}\bigl(p+(1-p)\bigr)=1\) (the symbol \(\prod\) means "multiply the \(n\) factors"; see primer item 5). Choosing \(p\) from factor \(i\) corresponds to \(\omega_i=1\), choosing \((1-p)\) to \(\omega_i=0\), so the \(2^n\) terms of the expansion are exactly the \(2^n\) values of the pmf.
(iv) Binomial distribution \(\Bin(n,p)\) Script 1.39(iv)
For \(p\in[0,1]\), \(n\in\N_{>0}\), on \(\Omega=\{0,\dots,n\}\):
\[ p_{\Bin(n,p)}(\omega)=\binom{n}{\omega}p^{\omega}(1-p)^{\,n-\omega}. \]When it applies: the number of successes in \(n\) independent trials — the number of heads in ten flips of a coin with success probability \(p\).
Sums to 1: the binomial theorem, \(\sum_{\omega=0}^{n}\binom{n}{\omega}p^\omega(1-p)^{n-\omega}=\bigl(p+(1-p)\bigr)^n=1^n=1\).
Exam sighting: WiSe25 P5a asks you to show that \(n\widehat F_n(t)\sim\Bin\bigl(n,F_{X_1}(t)\bigr)\) for the empirical cdf [empirische Verteilungsfunktion] \(\widehat F_n(t):=\frac1n\sum_{i=1}^{n}\one_{(-\infty,t]}(X_i)\), i.e. the fraction of the \(n\) observed values that are \(\le t\) (here \(\one_{(-\infty,t]}(X_i)\) is \(1\) if \(X_i\le t\) and \(0\) otherwise) — the argument is "each indicator is a \(\Ber(F(t))\) trial, they are independent, so the count is binomial".
(v) Negative binomial distribution \(\NegBin(r,p)\) Script 1.39(v)
For \(p\in[0,1]\), \(r\in\N_{>0}\), on \(\Omega=\N_{\ge r}\):
\[ p_{\NegBin(r,p)}(\omega)=\binom{\omega-1}{r-1}p^{r}(1-p)^{\,\omega-r}. \]When it applies: \(\omega\) is the total number of trials needed to observe \(r\) successes — the number of free-throw attempts until a basketball player makes \(r\) baskets.
A convention difference worth knowing My addition
Many textbooks and software libraries define the negative binomial on the number of failures before the \(r\)-th success, so their support starts at 0 and their pmf is \(\binom{\omega+r-1}{r-1}p^r(1-p)^{\omega}\). This script counts total trials, so the support starts at \(r\). If you look up a formula elsewhere, check which convention it uses before plugging into an exam.
Reading the formula: for the \(r\)-th success to land exactly on trial \(\omega\), that last trial must be a success (factor \(p\)), and among the first \(\omega-1\) trials exactly \(r-1\) must have been successes — there are \(\binom{\omega-1}{r-1}\) ways, each of probability \(p^{r-1}(1-p)^{\omega-r}\).
Sums to 1: substitute \(m=\omega-r\ge0\) and use the negative binomial series \(\sum_{m\ge0}\binom{m+r-1}{r-1}q^m=(1-q)^{-r}\) (valid for \(0\le q<1\)) with \(q=1-p\), giving \(p^r\cdot p^{-r}=1\). Why the series holds: \((1-q)^{-r}\) is the product of \(r\) geometric series \(\sum_{j\ge0}q^j\). Multiplying them out, the coefficient of \(q^m\) is the number of ways to write \(m=j_1+\dots+j_r\) with \(j_i\ge0\) — by stars and bars (Lemma 1.36(iv) with \(n=r\), \(k=m\)) this is \(\binom{m+r-1}{m}=\binom{m+r-1}{r-1}\).
Why "multiplying them out" is allowed: these are infinite sums, so expanding the product term by term needs a theorem, not just algebra. The theorem is the Cauchy product [Cauchy-Produkt]: if \(\sum_j a_j\) and \(\sum_k b_k\) converge absolutely (the sums of the absolute values \(|a_j|\), \(|b_k|\) are finite), then \(\bigl(\sum_j a_j\bigr)\bigl(\sum_k b_k\bigr)=\sum_{m\ge0}\sum_{j+k=m}a_jb_k\): multiply every term by every term and collect the products by total index \(m\). A geometric series with \(0\le q<1\) has non-negative terms and a finite sum, so it converges absolutely, and the theorem applies \(r-1\) times in a row. Check with \(r=2\), \(q=\tfrac12\): \((1-\tfrac12)^{-2}=4\), and \(\sum_{m\ge0}(m+1)(\tfrac12)^m=1+1+\tfrac34+\tfrac12+\tfrac5{16}+\dots\) indeed approaches 4. Full statement and proof: Analysis 3.3 — the Cauchy product.
A small gap in the script: it allows \(p\in[0,1]\), but for \(p=0\) every mass is 0, so the total is 0, not 1. \(\NegBin(r,0)\) is not a distribution (you never reach a success). Read the parameter range as \(p\in(0,1]\). The same applies to \(\Geo(p)\) below.
Note \(\NegBin(1,p)=\Geo(p)\): put \(r=1\) and \(\binom{\omega-1}{0}=1\), leaving \(p(1-p)^{\omega-1}\).
(vi) Geometric distribution \(\Geo(p)\) Script 1.39(vi)
For \(p\in[0,1]\), on \(\Omega=\N_{>0}\):
\[ p_{\Geo(p)}(\omega)=(1-p)^{\,\omega-1}p. \]When it applies: the number of trials until the first success — the number of customers arriving until the first sale.
Convention warning again: some books count the failures before the first success and so start at 0. This script starts at 1.
Sums to 1: geometric series, as derived on page 0: \(\sum_{\omega\ge1}(1-p)^{\omega-1}p = p\cdot\frac{1}{1-(1-p)}=1\). This needs \(p>0\) (so that \(q=1-p<1\)); for \(p=0\) all masses are 0 — see the note under \(\NegBin\).
Reading the formula: the first success at trial \(\omega\) means \(\omega-1\) failures (each with probability \(1-p\)) and then one success (probability \(p\)). Example with \(p=0.3\): \(p(1)=0.3\), \(p(2)=0.7\cdot0.3=0.21\), \(p(3)=0.7^2\cdot0.3=0.147\).
This is exactly the distribution derived from scratch in the script's motivation section, with \(p=\tfrac1{52}\) for the "how many reshuffles until the ace of hearts" game.
(vii) Poisson distribution \(\Poi(\lambda)\) Script 1.39(vii)
For \(\lambda\in\R_{>0}\), on \(\Omega=\N\):
\[ p_{\Poi(\lambda)}(\omega)=\frac{e^{-\lambda}\lambda^{\omega}}{\omega!}. \]When it applies: it approximates the count of rare events at a fixed rate in a fixed interval — the number of phone calls an operator receives in an hour when calls arrive at rate \(\lambda\).
Sums to 1: by the exponential series, \(\sum_{\omega\ge0}\frac{\lambda^\omega}{\omega!}=e^{\lambda}\), so the total is \(e^{-\lambda}e^{\lambda}=1\). Note this also explains where the factor \(e^{-\lambda}\) comes from: it is exactly the normalising constant.
The parameter \(\lambda\) is the expected count — the script records this in Lemma 2.26(vii) but deliberately skips the computation; the derivation is on the §2.1 page of this guide. Theorem 1.42 below says where \(\Poi(\lambda)\) comes from.
Urn models in action Script 1.40
Example 1.40 urn model applications Script 1.40
Urn models are typically paired with the uniform distribution — we assume \(\Lap_\Omega\) on \((\Omega,\pow(\Omega))\) for the sample spaces of Lemma 1.36. Then any event \(A\subseteq\Omega\) has \(\P(A)=|A|/|\Omega|\), since all urn sample spaces are finite. "In short, computing probabilities reduces to counting sizes of sets, which in turn often comes down to combinatorics."
(i) Password collision. You and a friend each generate an 8-character alphanumeric password (62 symbols). What is the probability they are identical?
Sampling with replacement, ordered: \(\Omega=[62]^8\), so \(|\Omega|=62^8\). Fix your friend's password; yours matches it in exactly one of the \(|\Omega|\) equally likely ways. Hence
\[ \P(\text{collision})=\frac{1}{62^{8}}\approx4.58\cdot10^{-15}. \](ii) Handing out exercises. Five probability exercises are distributed among five students. What is the probability that the student first in the alphabet gets exercise 1 and the student last in the alphabet gets exercise 5?
Sampling without replacement, ordered: \(\Omega=\{(\omega_1,\dots,\omega_5)\in[5]^5\mid\omega_i\text{ pairwise different}\}\), with \(|\Omega|=5!=120\). The event \(A\) consists of all tuples with \(\omega_1=1\) and \(\omega_5=5\); once those two are fixed, the remaining three exercises can be given out in any order, so \(|A|=3!=6\). Hence
\[ \P(A)=\frac{|A|}{|\Omega|}=\frac{6}{120}=\frac{1}{20}. \]The script notes this can also be obtained by conditioning, which arrives in §1.4: \(\P(A)=\tfrac15\cdot\tfrac14\).
(iii) Coffee mugs in meeting rooms. PhD students randomly leave their 6 identical coffee mugs in any of 4 meeting rooms. What is the probability that exactly one room ends up with no mug?
Modelled as with replacement, unordered (balls into bins):
\[ \Omega=\Bigl\{(a_1,a_2,a_3,a_4)\in\N^4 \Bigm| \sum_{i=1}^{4}a_i=6\Bigr\}, \qquad |\Omega|=\binom{4+6-1}{6}=\binom{9}{6}=84. \]Count the event \(A\) = "exactly one room empty" in two steps:
- Choose which room is empty: \(\binom41=4\) ways.
- Distribute all 6 mugs among the other 3 rooms with each of those rooms non-empty. Writing \(b_1+b_2+b_3=6\) with \(b_i\ge1\): first place one mug in each of the three rooms, then distribute the remaining \(6-3=3\) mugs freely among the three. That is the same urn model again with \(n=3\), \(k=3\): \(\binom{3+3-1}{3}=\binom53=10\) ways.
So \(|A|=4\cdot10=40\) and
\[ \P(A)=\frac{40}{84}=\frac{10}{21}\approx0.476. \]The substitution in step 2 is worth naming: to count solutions of \(b_1+\dots+b_m=k\) with every \(b_i\ge1\), set \(c_i:=b_i-1\ge0\); then \(c_1+\dots+c_m=k-m\), which is the unrestricted problem with \(k-m\) in place of \(k\). It converts "at least one each" into "any number each", and it reappears in many exercises.
Example 1.41 gotcha! model misspecification Script 1.41
The script now takes the mug example apart, and this is the most important paragraph on the page.
Reading A. If the outcome we record is the occupancy tuple \((a_1,\dots,a_4)\) itself, we are in "with replacement, unordered" and the computation above gives \(\tfrac{10}{21}\) — under the additional assumption, usually left implicit, that all occupancy vectors are equally likely.
Reading B. If instead we read the story literally as "each of the 6 students independently chooses one of the 4 rooms", the proper model is "with replacement, ordered": \(\Omega=[4]^6\) with the uniform distribution, so \(|\Omega|=4^6=4096\). Writing \(X_i(\omega):=\omega_i\) for the room chosen by student \(i\), the students are \(X_1,\dots,X_6\overset{\text{iid}}{\sim}\Lap_{[4]}\), and the occupancy numbers become derived quantities \(N_j:=\sum_{i=1}^{6}\one_{\{j\}}(X_i)\), \(j\in[4]\). (\(\one_{\{j\}}(X_i)\) is 1 when student \(i\) chose room \(j\) and 0 otherwise, so \(N_j\) counts the students in room \(j\); "iid" means independent and identically distributed and is defined in Definition 1.79.)
Now count \(A\) = "exactly one room empty" in this space. Choose the empty room: \(\binom41=4\) ways. Fix it, say room 4. Then all 6 students choose among rooms 1, 2, 3, giving \(3^6\) ordered outcomes — but we must exclude those in which one of rooms 1, 2, 3 is also empty. Apply inclusion–exclusion (Theorem 1.22) to the three events \(L_i\) = "room \(i\) is empty", \(i=1,2,3\), inside this set of \(3^6\) outcomes. Because all \(3^6\) outcomes are equally likely, every probability in Theorem 1.22 is a count divided by \(3^6\), so we may cancel that denominator and work with counts throughout. The counts are: \(|L_i|=2^6\) (all six students pick one of the two remaining rooms), and there are \(\binom31=3\) choices of \(i\); \(|L_i\cap L_j|=1^6=1\) (all six pick the single remaining room) for each of the \(\binom32=3\) pairs; and \(|L_1\cap L_2\cap L_3|=0^6=0\), since the six students cannot all avoid all three rooms. Therefore the number of outcomes lying in none of the \(L_i\) is
\[ 3^6-\binom31 2^6+\binom32 1^6-\binom33 0^6 = 729-192+3-0 = 540 . \]These 540 ordered outcomes are exactly the ones that use all three of the rooms 1, 2, 3 at least once. (The script writes the same line without the last term, which is \(0\) anyway.) Hence
\[ |A|=\binom41\Bigl(3^6-\binom31 2^6+\binom32 1^6\Bigr)=4\cdot540=2160, \qquad \P(A)=\frac{2160}{4^6}=\frac{2160}{4096}=\frac{135}{256}\approx0.527. \]Both answers are "correct". \(\tfrac{10}{21}\approx0.476<\tfrac12\) and \(\tfrac{135}{256}\approx0.527>\tfrac12\) simply belong to different modelling choices, which have to be made very explicit. Under the "students place mugs iid" model the occupancy tuples are not equally likely: \((3,1,1,1)\) can arise in many more ordered ways than \((6,0,0,0)\).
In words: the formula \(\P(A)=|A|/|\Omega|\) is not wrong in either case. What differs is the claim "all elements of \(\Omega\) are equally likely", and that claim is a statement about the physical mechanism, not about mathematics. Choosing an unordered \(\Omega\) and then assuming uniformity is the single most common modelling error in this subject.
A check of mine, to make the asymmetry concrete: the tuple \((6,0,0,0)\) arises from exactly \(1\) ordered outcome (all six students pick room 1), while \((3,1,1,1)\) arises from \(\frac{6!}{3!\,1!\,1!\,1!}=120\) ordered outcomes. Under Reading A both get probability \(1/84\); under Reading B they get \(1/4096\) and \(120/4096\). A factor of 120 between two models of the same story.
The Poisson limit theorem
Theorem 1.42 Poisson limit theorem Script 1.42
Let \((p_n)_{n\in\N}\subseteq[0,1]\) with a fixed \(\lambda:=\lim_{n\to\infty}n\,p_n\in\R_{>0}\). Then for all \(\omega\in\N\),
\[ \lim_{n\to\infty}p_{\Bin(n,p_n)}(\omega)=p_{\Poi(\lambda)}(\omega). \]Symbols. \((p_n)_{n\in\N}\) is a sequence of success probabilities, one for each number of trials \(n\). The assumption \(np_n\to\lambda\) says the expected number of successes, \(n\cdot p_n\), settles down at \(\lambda\). The standard choice is \(p_n=\lambda/n\).
A number example of mine: \(n=100\), \(p=0.03\), so \(\lambda=3\). Probability of no success: binomial \(0.97^{100}\approx0.0476\); Poisson \(e^{-3}\approx0.0498\). Already close.
The script's own gloss: "the pmf of the binomial distributions converges to the Poisson distribution for large \(n\) while \(np\) remains finite, i.e. \(p\) simultaneously has to become small as \(n\) grows in a controlled way. This controlled dependence of \(p\) on \(n\) (not an actual dependence) is such that, in the limit, on average we should expect \(\lambda\) successes among the \(n\) trials."
In words: many trials, each very unlikely, with the average number of successes held fixed — that is a Poisson. This is why Poisson is the distribution for rare events: radioactive decays, typos per page, server requests per second.
Proof Sheet 3 · Ex 3, with one step made rigorous by me
Fix \(\omega=k\in\N\). Start from the binomial pmf:
\[ p_{\Bin(n,p_n)}(k)=\binom{n}{k}p_n^{k}(1-p_n)^{n-k}. \]Step 0: \(p_n\to0\). Since \(np_n\to\lambda\) with \(\lambda\) finite and \(n\to\infty\), write \(p_n\) as a product of two sequences whose limits we know:
\[ p_n=(np_n)\cdot\frac1n\xrightarrow[n\to\infty]{}\lambda\cdot0=0. \]This uses the product rule for limits (if \(a_n\to a\) and \(b_n\to b\), both finite, then \(a_nb_n\to ab\); Analysis 2.1 — rules for limits) with \(a_n=np_n\to\lambda\) and \(b_n=\tfrac1n\to0\). (Do not write "\(\lambda/\infty\)": \(\infty\) is not a number, and the limit rules only apply to finite limits.) This is needed three times below.
Step 1: the binomial coefficient. Writing out the factorials,
\[ \binom{n}{k}=\frac{n!}{(n-k)!\,k!}=\frac{n(n-1)\cdots(n-k+1)}{k!}, \]a product of exactly \(k\) factors over \(k!\). Therefore
\[ \frac{\binom{n}{k}}{n^k/k!}=\frac{n(n-1)\cdots(n-k+1)}{n^{k}} =\underbrace{\frac{n}{n}\cdot\frac{n-1}{n}\cdots\frac{n-k+1}{n}}_{k\text{ factors}}\xrightarrow[n\to\infty]{}1, \tag{1}\]because \(k\) is fixed while \(n\to\infty\), so each of the \(k\) factors \(\frac{n-j}{n}=1-\frac jn\) tends to 1, and a product of finitely many convergent factors converges to the product of the limits (the product rule for limits, used \(k-1\) times; Analysis 2.1).
Step 2: the power of \(p_n\). By the power law \((ab)^k=a^kb^k\) from primer item 5, read from right to left with \(a=n\), \(b=p_n\),
\[ n^{k}p_n^{k}=(np_n)^{k}\xrightarrow[n\to\infty]{}\lambda^{k}, \tag{2}\]since \(np_n\to\lambda\) and raising to a fixed power \(k\) is continuous (sequence criterion for continuity: if \(f\) is continuous and \(x_n\to x\), then \(f(x_n)\to f(x)\); Analysis 4.1). Equivalently: \((np_n)^k\) is a product of \(k\) copies of \(np_n\), and the product rule for limits applies.
Step 3: the leftover factor. Split \((1-p_n)^{n-k}=(1-p_n)^{n}\,(1-p_n)^{-k}\), using the power law \(a^{m+k}=a^ma^k\) with \(m=n-k\) (primer item 5). By Step 0, \(p_n\to0\), so \(1-p_n\to1\); in particular \(1-p_n>\tfrac12\) for all large \(n\), so we never divide by \(0\). The function \(x\mapsto x^{-k}\) is continuous at \(x=1\), so the sequence criterion for continuity gives
\[ (1-p_n)^{-k}\xrightarrow[n\to\infty]{}1^{-k}=1. \tag{3}\]Step 4: the exponential factor. This is the only delicate step. (Background: Analysis 6.3, Lemma 6.24 proves \((1+\tfrac xn)^n\to e^x\) for a fixed real \(x\), also by taking logarithms, though it finishes with the derivative of \(\ln\) at \(1\) rather than with the series bound used here; the log series is in Analysis 9.3; \(\ln\) as the inverse of \(\exp\), with \(\ln(a^n)=n\ln a\) and \(e^{\ln a}=a\), is Analysis 5.2.) Take logarithms, using \(\ln(a^n)=n\ln a\):
\[ \ln\bigl((1-p_n)^{n}\bigr)=n\ln(1-p_n). \]For small \(x\) the Taylor expansion is \(\ln(1-x)=-x-\tfrac{x^2}{2}-\tfrac{x^3}{3}-\cdots =-x\bigl(1+\tfrac x2+\tfrac{x^2}{3}+\cdots\bigr)\), so \(\ln(1-x)=-x\,(1+\varepsilon(x))\) with \(\varepsilon(x)=\tfrac x2+\tfrac{x^2}{3}+\tfrac{x^3}4+\cdots\) (the series is valid for \(0\le x<1\)).
Why \(\varepsilon(x)\to0\) as \(x\to0\) my addition: take \(0\le x\le\tfrac12\). Every term of \(\varepsilon(x)\) is \(\ge0\), and each denominator \(2,3,4,\dots\) is at least 2, so
\[ 0\le\varepsilon(x)\le\frac x2+\frac{x^2}2+\frac{x^3}2+\cdots=\frac x2\,(1+x+x^2+\cdots) =\frac x2\cdot\frac1{1-x}\le\frac x2\cdot2=x, \]using the geometric series \(1+x+x^2+\dots=\frac1{1-x}\) and \(1-x\ge\tfrac12\). So \(0\le\varepsilon(x)\le x\), and squeezing gives \(\varepsilon(x)\to0\). Numbers: \(x=0.1\) gives \(\ln(0.9)\approx-0.10536=-0.1\,(1+0.0536)\), so \(\varepsilon(0.1)\approx0.054\le0.1\) ✓. Since \(p_n\to0\) (Step 0), \(p_n\le\tfrac12\) for all large \(n\), so the bound applies. Substituting \(x=p_n\):
\[ n\ln(1-p_n)=-\,n\,p_n\,\bigl(1+\varepsilon(p_n)\bigr)\xrightarrow[n\to\infty]{}-\lambda\cdot1=-\lambda, \]using \(np_n\to\lambda\), \(1+\varepsilon(p_n)\to1\) and the product rule for limits. Since \((1-p_n)^n=e^{n\ln(1-p_n)}\) (this is \(e^{\ln a}=a\) applied to \(a=(1-p_n)^n\)) and \(\exp\) — which is just another way of writing \(x\mapsto e^{x}\) — is continuous (Analysis 4.1),
\[ (1-p_n)^{n}\xrightarrow[n\to\infty]{}e^{-\lambda}. \tag{4}\]Putting it together. Write the pmf so that each converging piece is visible:
\[ \binom{n}{k}p_n^{k}(1-p_n)^{n-k} =\underbrace{\frac{\binom{n}{k}}{n^{k}/k!}}_{\to1\ (1)}\cdot \underbrace{\frac{(np_n)^{k}}{k!}}_{\to\lambda^{k}/k!\ (2)}\cdot \underbrace{(1-p_n)^{n}}_{\to e^{-\lambda}\ (4)}\cdot \underbrace{(1-p_n)^{-k}}_{\to1\ (3)} . \]A product of finitely many convergent sequences converges to the product of the limits, so
\[ \lim_{n\to\infty}p_{\Bin(n,p_n)}(k)=1\cdot\frac{\lambda^{k}}{k!}\cdot e^{-\lambda}\cdot1 =\frac{e^{-\lambda}\lambda^{k}}{k!}=p_{\Poi(\lambda)}(k). \;\;∎ \]A gap in the official solution Noted by me
The printed solution justifies Step 4 by writing \(\lim_n(1-p_n)^n=\lim_n\bigl(1-\tfrac{np_n}{n}\bigr)^n\) and then citing the standard limit \(e^{-x}=\lim_n\bigl(1-\tfrac xn\bigr)^n\). That standard limit is stated for a fixed \(x\), whereas here the quantity \(x_n=np_n\) changes with \(n\) — it only tends to \(\lambda\). The conclusion is right, but it needs the extra argument that \(\bigl(1-\tfrac{x_n}{n}\bigr)^n\to e^{-\lambda}\) whenever \(x_n\to\lambda\), which is exactly what the logarithm computation in Step 4 supplies. If you reproduce the official version in an exam you will most likely still get the credits; the version above is the one that is airtight.
Rule of thumb for using it my addition: the Poisson approximation to \(\Bin(n,p)\) is good when \(n\) is large and \(p\) small; a common rule is \(n\ge50\) and \(p\le0.1\) (textbooks differ). Set \(\lambda=np\) and compare in the widget above.
Bertrand's paradox Script 1.43
The script brackets this as a Philosophical Interlude. It is the continuous echo of Example 1.41: the same question, three defensible models, three different answers.
Example 1.43 the ambiguity of "random" Script 1.43
Consider a circle of radius \(R\). What is the probability that a randomly chosen chord is longer than the side of an inscribed equilateral triangle? Posed by Joseph Bertrand in 1889.
Vocabulary, since the script assumes it: a chord is a straight segment joining two points on the circle. An inscribed equilateral triangle has all three vertices on the circle and all three sides equal; its side length is \(s=R\sqrt3\), and the perpendicular distance from the centre to any of its sides (the apothem) is \(R/2\). We want \(\P(\text{chord length}>R\sqrt3)\).
Where \(R\sqrt3\), \(R/2\) and \(2\pi/3\) come from (school geometry):
- Radians [Bogenmaß]: an angle is measured by the length of the arc it cuts out of a circle of radius 1. The full turn \(360^\circ\) is the whole circumference \(2\pi\), so \(120^\circ=\tfrac13\cdot2\pi =\tfrac{2\pi}3\). On a circle of radius \(R\) every length scales by \(R\): arc length \(=\) angle \(\cdot R\), circumference \(2\pi R\), disc area \(\pi R^2\).
- The three vertices of the equilateral triangle split the circle into three equal arcs, so each side is seen from the centre \(O\) under the angle \(\tfrac{2\pi}3=120^\circ\).
- Drop the perpendicular from \(O\) to one side. It cuts the \(120^\circ\) angle in half, giving a right triangle with hypotenuse \(R\) (centre to vertex) and angle \(60^\circ\) at \(O\). Its side next to that angle is the apothem \(R\cos60^\circ=R\cdot\tfrac12=\tfrac R2\); its opposite side is half the triangle side, \(R\sin60^\circ=\tfrac{\sqrt3}2R\). So the side is \(s=2\cdot\tfrac{\sqrt3}2R=R\sqrt3\). (Check by Pythagoras: \((\tfrac R2)^2+(\tfrac{\sqrt3}2R)^2=\tfrac14R^2+\tfrac34R^2=R^2\) ✓.) Sine and cosine: Analysis 5.3.
Method 1 — random endpoints: \(\P_1=\tfrac13\) Script 1.43
Choose two points uniformly and independently on the circumference and join them. Fix one endpoint \(A\). For the chord to be longer than \(s\), the second endpoint \(B\) must lie on the arc between the vertices \(V_1,V_2\) of an equilateral triangle \(AV_1V_2\) — the arc not containing \(A\). That favourable arc subtends an angle of \(2\pi/3\) at the centre \(O\), so it has length \((2\pi/3)R\), out of a total circumference of \(2\pi R\):
\[ \P_1=\frac{(2\pi/3)R}{2\pi R}=\frac13. \]Method 2 — random radial point: \(\P_2=\tfrac12\) Script 1.43
Choose one radius uniformly at random (uniform angle), then a point \(P\) uniformly along that radius. Each chord is determined by its midpoint, obtained by drawing the chord perpendicular to the radius through \(P\). The chord is longer than \(s\) exactly when its midpoint lies within distance \(R/2\) of the centre, since \(R/2\) is the apothem of the inscribed equilateral triangle. \(P\) is uniform along a segment of length \(R\), and the favourable part has length \(R/2\):
\[ \P_2=\frac{R/2}{R}=\frac12. \]Method 3 — random midpoint: \(\P_3=\tfrac14\) Script 1.43
Choose a point \(M\) uniformly at random from the area of the circle and use it as the chord's midpoint. The chord is longer than \(s\) exactly when \(M\) lies inside the concentric circle of radius \(R/2\). Comparing areas, not lengths:
\[ \P_3=\frac{\pi(R/2)^2}{\pi R^2}=\frac{(R/2)^2}{R^2}=\frac14. \]What the paradox shows Script 1.43
We obtained three different probabilities — \(1/3\), \(1/2\), \(1/4\) — for the same event, and all seem justified, in that violating their respective assumptions would appear to violate the problem description. Bertrand's paradox highlights that when talking about infinite spaces, the phrase "randomly choose one of \(X\)" is ambiguous until the precise mechanism of randomness is specified. Each method implicitly defines a different probability measure over the set of chords.
The reason they differ, in one sentence: the three methods put uniform measure on three different parameterisations of the set of chords — arc length, radial distance, and area — and a map that is uniform in one coordinate is not uniform in another. Method 2 and Method 3 both describe a chord by its midpoint, but Method 2 spreads midpoints uniformly along a radius while Method 3 spreads them uniformly over the disc, which concentrates them near the rim (an annulus at radius \(r\) has area proportional to \(r\), not constant).
The script links two videos for animations. Both are external; the mathematics above is complete without them.
Exercise-sheet tasks
Sheet 0, Exercises 2–5 Sheet 0
Sheet 0's preamble prescribes the recipe: build \((\Omega,\Aa,\P)\), put the discrete uniform distribution on \(\Omega\), and count. Exercises 1 and 6 are on the Chapter 0 page; the four here are all urn models in disguise.
Sheet 0, Exercise 2 — an urn with 3 red and 2 blue balls Sheet 0 · Ex 2
Two balls are drawn uniformly at random without replacement. Find: (i) both red; (ii) exactly one red; (iii) the second ball is blue; (iv) given the second is blue, the first is red; (v) given at least one is blue, exactly one is blue.
Probability space. Label the balls so that \(R=\{1,2,3\}\) are red and \(B=\{4,5\}\) blue, \(E=\{1,\dots,5\}\). Model two successive draws, ordered, without replacement — urn model 1.36(ii) with \(n=5\), \(k=2\):
\[ \Omega=\{(\omega_1,\omega_2)\in E^2\mid\omega_1\ne\omega_2\},\quad \Aa=\pow(\Omega),\quad \P=U_\Omega, \]so \(|\Omega|=5\cdot4=20\). Write \(R_i=\{\omega\mid\omega_i\in R\}\) and \(B_i=\{\omega\mid\omega_i\in B\}\) for \(i\in\{1,2\}\).
(i) \(|R_1\cap R_2|=3\cdot2=6\) (three reds first, two reds left), so \(\P=\tfrac6{20}=\tfrac3{10}\).
(ii) "exactly one red" \(=(R_1\cap B_2)\,\dot\cup\,(B_1\cap R_2)\) — the dot on the union sign, \(\dot\cup\), is the script's and the sheet's way of recording that the two sets are disjoint (no outcome lies in both), which is why their sizes may simply be added — with \(|R_1\cap B_2|=3\cdot2=6\) and \(|B_1\cap R_2|=2\cdot3=6\), total 12, so \(\P=\tfrac{12}{20}=\tfrac35\).
(iii) \(B_2=(R_1\cap B_2)\,\dot\cup\,(B_1\cap B_2)\) with \(6\) and \(2\cdot1=2\), so \(|B_2|=8\) and \(\P(B_2)=\tfrac8{20}=\tfrac25\).
Worth pausing on: \(\tfrac25=|B|/|E|\) — the probability that the second ball is blue equals the probability that the first is. The reason is symmetry: the map that swaps the two coordinates, \((\omega_1,\omega_2)\mapsto(\omega_2,\omega_1)\), is a bijection of \(\Omega\) onto itself (it is its own inverse) which carries \(B_1\) onto \(B_2\), so the two sets have the same size. Looking at one draw on its own therefore gives the same answer whichever draw you pick; only the joint behaviour of the two draws differs — as parts (iv) and (v) show. This fact saves time in many exercises.
(iv) By the definition of conditional probability (Definition 1.69, which for the uniform distribution is just "restrict the counting to \(B_2\)"):
\[ \P(R_1\mid B_2)=\frac{\P(R_1\cap B_2)}{\P(B_2)}=\frac{|R_1\cap B_2|}{|B_2|}=\frac68=\frac34. \](v) Let \(A=B_1\cup B_2\) ("at least one blue") and \(C=(R_1\cap B_2)\,\dot\cup\,(B_1\cap R_2)\) ("exactly one blue"). Complement counting: \(\Omega\setminus A=R_1\cap R_2\) with 6 elements, so \(|A|=20-6=14\); and \(|C|=12\) from part (ii). Since \(C\subseteq A\),
\[ \P(C\mid A)=\frac{|C|}{|A|}=\frac{12}{14}=\frac67. \]Compare (iv) and (v): \(\tfrac34\) versus \(\tfrac67\). Knowing which ball is blue is different information from knowing some ball is blue. This is the same asymmetry as Exercise 5 below and as the two-card box of Example 0.4.
Sheet 0, Exercise 3 — a 4-digit PIN Sheet 0 · Ex 3
A PIN is chosen uniformly from \(\{0000,\dots,9999\}\). Find: (i) all four digits distinct; (ii) at least one digit repeated; (iii) exactly one pair; (iv) the PIN is a palindrome.
Probability space. A PIN is an ordered tuple of digits, so with replacement, ordered on \(E=\{0,\dots,9\}\):
\[ \Omega=\{0,\dots,9\}^4,\quad \Aa=\pow(\Omega),\quad \P=U_\Omega,\quad |\Omega|=10^4 . \](i) Let \(D=\{\omega\in\Omega\mid\omega_i\ne\omega_j\text{ for }i\ne j\}\) be the event "all four digits distinct". Choosing four distinct digits in order is urn model 1.36(ii) with \(n=10\), \(k=4\): \(|D|=10\cdot9\cdot8\cdot7=5040\), so
\[ \P(D)=\frac{5040}{10^4}=\frac{63}{125}=0.504. \](ii) The complement of (i): \(\P(\Omega\setminus D)=1-\tfrac{63}{125}=\tfrac{62}{125}\).
(iii) Let \(E_{\text{pair}}\) be the event "exactly one pair": one digit appears exactly twice, and the other two digits are distinct from each other and from the repeated one. Build such a PIN in four successive steps:
- choose the repeated digit \(d\): 10 ways;
- choose which two of the four positions carry \(d\): \(\binom42=6\) ways;
- fill the first remaining position from \(\{0,\dots,9\}\setminus\{d\}\): 9 ways;
- fill the last position from the remaining 8 digits: 8 ways.
Why this does not double-count: the last two steps fill two specific positions (the ones left over, in left-to-right order), so each PIN is produced exactly once. If instead you chose an unordered pair of digits for those two slots you would have to divide by 2 — and taking 9·8 already accounts for the order of the slots.
(iv) Write \(\Pi\) (capital Greek pi, the sheet's name for this event) for the set of palindromes. A palindrome satisfies \(\omega_1=\omega_4\) and \(\omega_2=\omega_3\), so it is determined by \((\omega_1,\omega_2)\in\{0,\dots,9\}^2\): \(|\Pi|=100\) and \(\P(\Pi)=\tfrac{100}{10^4}=\tfrac1{100}\).
Sheet 0, Exercise 4 — the bug detector and the base rate Sheet 0 · Ex 4
2 % of submissions contain a bug. The detector flags 90 % of buggy submissions and 5 % of bug-free ones. Among 10 000 submissions: (i) how many buggy ones are flagged? (ii) how many bug-free ones? (iii) given a submission was flagged, what is the probability it contains the bug?
Probability space. Model the population itself as the sample space: \(\Omega=\{1,\dots,10\,000\}\), \(\Aa=\pow(\Omega)\), \(\P=U_\Omega\), so \(\P(A)=|A|/10\,000\). "Choosing a submission uniformly at random" is then just picking a point of \(\Omega\). Let \(B\) = buggy and \(F\) = flagged. Reading off the percentages:
\[ |B|=0.02\cdot10\,000=200,\qquad |B\cap F|=0.9\cdot200=180,\qquad |\bar B\cap F|=0.05\cdot9800=490, \]where \(\bar B=\Omega\setminus B\).
(i) 180. (ii) 490.
(iii) \(|F|=|B\cap F|+|\bar B\cap F|=180+490=670\), and since \(B\cap F\subseteq F\),
\[ \P(B\mid F)=\frac{\P(B\cap F)}{\P(F)}=\frac{|B\cap F|}{|F|}=\frac{180}{670}=\frac{18}{67}\approx0.269. \]In words — the base-rate effect: even though the detector is fairly accurate, most flagged submissions are false positives, because the bug is rare. There are 49 times as many clean submissions as buggy ones, so even a 5 % false-positive rate produces more false alarms (490) than true ones (180).
This is Bayes' theorem (Theorem 1.70) done by counting, and it needs no theory at all when the population is finite and uniform. The script's own worked Bayes computation is Example 1.72 (who wrote a passage, given its British spelling); it has the same three-number shape, though not the extreme rarity that produces the base-rate effect here. Whenever a task hands you the three numbers of a testing problem — how common the condition is (here 2 %), how often the test says "yes" when the condition is present (here 90 %), and how often it says "yes" when it is absent (here 5 %) — build a table of counts for a concrete population such as 10 000. It is faster and far less error-prone than manipulating the formula.
Sheet 0, Exercise 5 — two aces, two kinds of information Sheet 0 · Ex 5
(i) You are dealt two cards and look at the first: it is an ace. What is the probability the second is also an ace? (ii) Same deal, but you do not look; someone truthfully tells you at least one of your two cards is an ace. Is the probability that both are aces the same?
Probability space. Number the cards \(\{1,\dots,52\}\) with \(K\subset\{1,\dots,52\}\), \(|K|=4\), the aces. Draw two in order without replacement:
\[ \Omega=\{(\omega_1,\omega_2)\mid\omega_1\ne\omega_2\},\quad |\Omega|=52\cdot51=2652, \qquad K_i=\{\omega\mid\omega_i\in K\}. \](i) \(|K_1\cap K_2|=4\cdot3=12\) and \(|K_1|=4\cdot51=204\), so
\[ \P(K_2\mid K_1)=\frac{|K_1\cap K_2|}{|K_1|}=\frac{12}{204}=\frac{3}{51}=\frac1{17}. \](ii) Now the conditioning event is \(A=K_1\cup K_2\) ("at least one ace"). Complement counting: \(|\bar K_1\cap\bar K_2|=48\cdot47=2256\), so \(|A|=2652-2256=396\). Since \(K_1\cap K_2\subseteq A\),
\[ \P(K_1\cap K_2\mid A)=\frac{12}{396}=\frac1{33}\;\ne\;\frac1{17}. \]The same answer in the unordered model. Take \(\tilde\Omega=\{\tilde\omega\subseteq\{1,\dots,52\}\mid|\tilde\omega|=2\}\) with \(U_{\tilde\Omega}\) — urn model 1.36(iii):
\[ \P(K_1\cap K_2\mid A)=\frac{\binom42}{\binom{52}{2}-\binom{48}{2}}=\frac{6}{1326-1128}=\frac{6}{198}=\frac1{33}. \;✓ \]Both models agree, because the event in question does not depend on order — a useful check that the modelling was consistent.
In words: the two conditioning events carry different information. Knowing that a specific card is an ace is stronger than knowing that some card in the pair is. Naming a position eliminates more possibilities.
A typo in the official solution: it cites "Gregorii, S2.3.1" for the unordered model; the reference is to Georgii (2015), the book listed in the script's literature section.
Sheet 2, Exercise 2 — at least one six in six dice Sheet 2 · Ex 2
\(\Omega_0=\{\text{⚀},\dots,\text{⚅}\}\) is the set of faces of a fair die. Let \(p\) be the probability of obtaining at least one ⚅ when throwing six fair dice at once. Compute \(p\), setting up the probability space properly.
Solution
Probability space. Six dice thrown at once, each showing one of six faces — with replacement, ordered (the dice are distinguishable, even if only conceptually):
\[ \Omega=\{\text{⚀},\dots,\text{⚅}\}^6,\quad \Aa=\pow(\Omega),\quad \P(A)=\frac{|A|}{6^6}. \]The event. \(A=\{\omega\in\Omega\mid\omega_j=\text{⚅ for at least one }j\in[6]\}\).
Complement counting. "No six at all" means every entry comes from the five non-six faces:
\[ p=\P(A)=1-\P(\Omega\setminus A)=1-\frac{|\{\text{⚀},\dots,\text{⚄}\}^6|}{|\Omega|} =1-\frac{5^6}{6^6}=1-\frac{15625}{46656}=\frac{31031}{46656}\approx0.6651. \]Why the direct count is a bad idea: the sets "die \(j\) shows a six" overlap heavily, so a direct count needs inclusion–exclusion with \(2^6-1=63\) terms. The complement is one product. The official solution gives the answer as \(\approx0.665\); the exact fraction is \(31031/46656\).
Connection to the distributions: the number of sixes among six dice is \(\Bin(6,\tfrac16)\), and \(\P(A)=1-p_{\Bin(6,1/6)}(0)=1-\binom60(\tfrac16)^0(\tfrac56)^6\) — the same computation seen through Example 1.39(iv). Note \(np=1\), so the Poisson approximation with \(\lambda=1\) would give \(1-e^{-1}\approx0.632\): in the right ballpark, but \(n=6\) is far too small for Theorem 1.42 to be accurate.
The Chevalier de Méré — whom Remark 0.1 of the script names, though for a different question, the problem of points — is also said to have bet on getting at least one six in four rolls of a single die. That is exactly the computation above with four dice instead of six: \(1-(5/6)^4\approx0.518\), just over a half, which is why the bet was profitable. (The historical anecdote is my addition; the script does not mention this bet.)
Sheet 2, Exercise 4 — nobody gets their own sheet back Sheet 2 · Ex 4
A tutor redistributes \(n\) anonymously submitted sheets at random. What is the probability that nobody gets their own sheet back? How does it behave as \(n\to\infty\)?
Solution
Probability space. A redistribution is a bijection of \([n]\) to itself, i.e. drawing \(n\) distinct balls in order — urn model 1.36(ii) with \(k=n\):
\[ \Omega=\{\omega=(\omega_1,\dots,\omega_n)\in[n]^n\mid\omega_i\ne\omega_j\ \forall i\ne j\}, \qquad |\Omega|=n!, \qquad \P=U_\Omega. \]Here \(\omega_i\) is the sheet handed to student \(i\), and \(\forall\) is the standard shorthand for "for all", so the condition reads "\(\omega_i\ne\omega_j\) for all \(i\ne j\)" — no sheet is handed out twice.
The events. \(A_i=\{\omega\mid\omega_i=i\}\) — "student \(i\) gets their own sheet". Fixing one coordinate leaves \((n-1)!\) arrangements of the rest, so
\[ \P(A_i)=\frac{(n-1)!}{n!}=\frac1n. \]More generally, fixing \(k\) distinct coordinates leaves \((n-k)!\) arrangements:
\[ \P(A_{i_1}\cap\cdots\cap A_{i_k})=\frac{(n-k)!}{n!}. \]Inclusion–exclusion (Theorem 1.22). For each \(k\) there are \(\binom nk\) choices of \(k\) indices, and each contributes the same value, so the inner sum collapses to a single product:
\[ \sum_{1\le i_1<\cdots<i_k\le n}\P(A_{i_1}\cap\cdots\cap A_{i_k}) =\binom nk\cdot\frac{(n-k)!}{n!} =\frac{n!}{k!\,(n-k)!}\cdot\frac{(n-k)!}{n!}=\frac1{k!}. \]That cancellation is the whole trick. Therefore
\[ \P\Bigl(\bigcup_{i=1}^{n}A_i\Bigr)=\sum_{k=1}^{n}(-1)^{k-1}\frac1{k!}, \]and the event we want is the complement — nobody gets their own sheet:
\[ \P\Bigl(\text{no fixed point}\Bigr)=1-\sum_{k=1}^{n}(-1)^{k-1}\frac1{k!} =\sum_{k=0}^{n}\frac{(-1)^{k}}{k!}. \](The last step: the \(k=0\) term of the right-hand sum is \(1\), and for \(k\ge1\) we have \(-(-1)^{k-1}=(-1)^k\).)
The limit. By the exponential series with \(x=-1\),
\[ \lim_{n\to\infty}\P(\text{no fixed point})=\sum_{k=0}^{\infty}\frac{(-1)^k}{k!}=e^{-1}\approx0.3679. \]In words: whether there are 5 students or 5 000, the chance that nobody gets their own sheet back is about 37 %. The convergence is extremely fast — already at \(n=5\) the value is \(\tfrac{11}{30}=0.36\overline{6}\) (the bar marks the digit 6 repeating for ever), within \(0.002\) of the limit \(0.3679\). Such a fixed-point-free permutation is called a derangement [fixpunktfreie Permutation].
A stale cross-reference: the official solution cites "Lemma 1.33 (without replacement ordered draw)". In the current version of the script the urn models are Lemma 1.36. The script is a living document and its numbering has shifted since the sheet was written — when a sheet and the script disagree on a number, trust the script.
Sheet 3, Exercise 4 — Agathe and the overcrowded subway Sheet 3 · Ex 4
At Marienplatz a train departs every 10 minutes, so crowded that only one person boards each time, with every person on the platform equally likely to be the one. Between trains, two new people arrive. Agathe and Balthasar start alone on the platform. Find the probability that Agathe boards (i) the \(n\)-th train, (ii) at the latest the \(n\)-th train.
Solution
Track the crowd first. Each cycle removes one person and adds two, so the platform grows by exactly one per train. It starts at 2, so when the \(n\)-th train arrives there are \(n+1\) people waiting. (Check: \(n=1\) gives 2 ✓; \(n=2\) gives 3 ✓.)
Everyone present is equally likely to board, so given that Agathe is still there when train \(i\) arrives, she boards it with probability \(\tfrac1{i+1}\) and fails to with probability \(1-\tfrac1{i+1}=\tfrac{i}{i+1}\).
(i) Agathe boards the \(n\)-th train exactly when she misses trains \(1,\dots,n-1\) and then boards train \(n\). Each factor is a probability given that she is still waiting, and such step-by-step probabilities multiply (the multiplication rule for conditional probabilities, §1.4; think "a fraction of a fraction"). The misses give:
\[ \prod_{i=1}^{n-1}\Bigl(1-\frac1{i+1}\Bigr)=\prod_{i=1}^{n-1}\frac{i}{i+1} =\frac12\cdot\frac23\cdot\frac34\cdots\frac{n-2}{n-1}\cdot\frac{n-1}{n}=\frac1n. \](The symbol \(\prod_{i=1}^{n-1}\) means "multiply the factors for \(i=1,\dots,n-1\)"; see primer item 5 or B3.)
This is a telescoping product (name mine): the numerator of each factor cancels the denominator of the previous one, leaving only the first numerator (1) and the last denominator (\(n\)). Multiplying by the probability of boarding train \(n\):
\[ \P(\text{Agathe boards train }n)=\frac1n\cdot\frac1{n+1}=\frac1{n(n+1)}. \](ii) "Boards at the latest with train \(n\)" is the complement of "misses all of the first \(n\) trains". The same telescoping product, now with \(n\) factors, gives \(\prod_{i=1}^{n}\tfrac{i}{i+1}=\tfrac1{n+1}\), so
\[ \P(\text{boards by train }n)=1-\frac1{n+1}=\frac{n}{n+1}. \]Two checks of mine.
- Consistency: summing (i) should give (ii). Indeed \(\sum_{m=1}^{n}\frac1{m(m+1)}=\sum_{m=1}^{n}\bigl(\frac1m-\frac1{m+1}\bigr)=1-\frac1{n+1}\) ✓ — another telescoping sum (the same idea as Analysis 3.1 — a telescoping series), using the partial-fraction split \(\frac1{m(m+1)}=\frac1m-\frac1{m+1}\).
- It is a genuine pmf: letting \(n\to\infty\) gives \(\sum_{m\ge1}\frac1{m(m+1)}=1\), so Agathe boards eventually with probability 1 — despite the platform growing without bound. The distribution of her boarding train is a legitimate pmf on \(\N_{>0}\) (Lemma 1.35(ii)), and it is a nice example of a distribution that is not one of the seven named ones.
Note on the official solution: part (ii) says "from part (a), the latter occurs with probability \(\tfrac1{n+1}\)", but part (a) computed \(\tfrac1n\) for missing the first \(n-1\) trains. The intended reading is "the same telescoping product, run one step further", and the answer \(\tfrac{n}{n+1}\) is correct.
Sheet 3, Exercise 3 — the Poisson limit theorem Sheet 3 · Ex 3
This is exactly Theorem 1.42, and it is worked in full inside the theorem box above, together with a note on the one step the official solution glosses.
Sheet 4, Exercise 1 — rolling a tetrahedron \(k\) times Sheet 4 · Ex 1
A fair tetrahedron (a four-sided die) has faces labelled 1, 2, 3, 4. It is rolled \(k\ge1\) times. \(E\) = "the same number appears in every roll"; \(F\) = "the product of the \(k\) numbers is even". Compute (i) \(\P(E)\), (ii) \(\P(F)\), (iii) \(\P(E\cup F)\).
This sheet belongs to §1.4 by date, but it uses only Laplace counting and inclusion–exclusion, so it lives here, next to the other counting tasks.
Solution
Model. An outcome is the list of results \(\omega=(x_1,\dots,x_k)\) with each \(x_i\in[4]=\{1,2,3,4\}\), so \(\Omega=[4]^k\) (all lists of length \(k\) from \([4]\)) and \(|\Omega|=4^k\) (four choices per roll, multiplied over \(k\) rolls — the product rule from the counting page). "Fair" means every list is equally likely, so we use the Laplace distribution: \(\P(A)=|A|/|\Omega|\) (Script 1.39(i)).
(i) \(E=\{(1,\dots,1),(2,\dots,2),(3,\dots,3),(4,\dots,4)\}\) has 4 elements, so
\[ \P(E)=\frac{4}{4^k}=\Bigl(\frac14\Bigr)^{k-1}. \](The last step: \(4/4^k=1/4^{k-1}\) by cancelling one factor 4.)
(ii) Counting "even product" directly is messy, so use the complement \(F^c\) = "product is odd". A product of whole numbers is odd exactly when every factor is odd (one even factor makes the whole product even). So \(F^c=\{1,3\}^k\), with \(2^k\) elements, and
\[ \P(F)=1-\P(F^c)=1-\frac{2^k}{4^k}=1-\Bigl(\frac12\Bigr)^{k}. \](The complement rule \(\P(F)=1-\P(F^c)\) is Proposition 1.19(ii) with \(B=\Omega\), \(A=F^c\), using \(\P(\Omega)=1\) — see §1.1.)
(iii) Inclusion–exclusion for two sets (Proposition 1.19(i), or Theorem 1.22 with \(n=2\); §1.1): \(\P(E\cup F)=\P(E)+\P(F)-\P(E\cap F)\). The event \(E\cap F\) = "all rolls equal and product even" means all rolls equal some \(i\) with \(i^k\) even, i.e. \(i\in\{2,4\}\). So \(|E\cap F|=2\) and \(\P(E\cap F)=2/4^k=\tfrac12(\tfrac14)^{k-1}\). Therefore
\[ \P(E\cup F)=\Bigl(\frac14\Bigr)^{k-1}+1-\Bigl(\frac12\Bigr)^{k}-\frac12\Bigl(\frac14\Bigr)^{k-1} =\frac12\Bigl(\frac14\Bigr)^{k-1}+1-\Bigl(\frac12\Bigr)^{k}. \]Check of mine. For \(k=1\) every single roll is "all equal", so \(E=\Omega\) and \(\P(E\cup F)\) must be 1. The formula gives \(\tfrac12\cdot1+1-\tfrac12=1\) ✓. For \(k=2\): \(\tfrac18+1-\tfrac14=\tfrac78\); directly, the only pairs outside \(E\cup F\) are the unequal all-odd pairs \((1,3),(3,1)\), i.e. \(2/16=\tfrac18\) ✓.
In words: count all-equal lists (4 of them), count odd-product lists (all odd, \(2^k\)), and correct for the overlap (the two all-even constant lists).
Official solution: checked — all three results are correct. One line in (iii) is sloppy: it writes \(E\cap F=E\cap\{(x_1,\dots,x_k)\mid x_i\in\{2,4\}\ \forall i\}\). But the second set is "all rolls even", not \(F\) ("product even"; e.g. \((1,2)\in F\)). The intersection with \(E\) happens to be the same, \(\{(2,\dots,2),(4,\dots,4)\}\), so the count \(|E\cap F|=2\) is right.
Old-exam tasks
No exam task is purely about §1.2 — but its objects are everywhere
I checked all three available exams task by task. None asks you to set up an urn model or to derive a discrete pmf from scratch. What the exams do instead is use the distributions of Example 1.39 as building blocks inside problems belonging to later chapters:
| Where | What it uses from this page | Belongs to |
|---|---|---|
| WiSe25 P5a — empirical cdf | each \(\one_{(-\infty,t]}(X_i)\sim\Ber(F(t))\); their sum is \(\Bin(n,F(t))\) | §3.2 |
| SoSe25 P5a — duck hunt | each hunter's target \(S_j\sim\Lap_{[m]}\), so \(\P(S_j\ne i)=\tfrac{m-1}{m}\) | §2.1 |
| SoSe26 P5 — randomised response | the sensitive attribute \(A\sim\Ber(p)\), the observed answers \(Y_i\sim\Ber(q(p))\), where \(q(p)=rp+\tfrac{1-r}2\) is a known function of \(p\) | §3.1, §3.2, §3.3 |
| SoSe26 P1a, P1b — true/false, mark one answer | \(X\sim\Ber(p)\) and \(Y:=1-X\); "for two Bernoulli RVs, \(\Cov[X,Y]=0\) implies independence" (\(\Cov\) is the covariance [Kovarianz], defined in §2.1; it measures whether two quantities tend to be large together) | §2.1 |
| SoSe26 P4 — characteristic functions | \(\P(X_j=\pm1)=\tfrac12\), a shifted-and-scaled \(\Ber(\tfrac12)\) | §2.3 |
| SoSe25 P4a–d — estimating and testing a Poisson rate; P4d light bulb factory | \(X_i\overset{\text{iid}}{\sim}\Poi(\lambda)\); the pmf \(e^{-\lambda}\lambda^x/x!\) is given as a hint and used for the likelihood; defectives per batch modelled as \(\Poi(\lambda)\) | §3.2 |
| WiSe25 P1d — true/false on the sample mean | \(X_1,X_2,\dots\sim\Poi(2)\), whose mean is the parameter 2 | §2.4 |
| SoSe25 P1a — true/false counterexample | the Laplace distribution on \(\Omega=\{0,1\}\) as the simplest possible probability space | §1.4 |
| SoSe26 P2c — true/false counterexample | \(X\) uniform on \(\{-1,0,1\}\), i.e. \(\Lap_{\{-1,0,1\}}\) | §2.1 |
What to take from this. You will not be asked "state the hypergeometric pmf". You will be asked a question whose first line is "let \(X_1,\dots,X_n\) be iid \(\Ber(p)\)", and you are expected to know without being told what that means, what its support is, and what its mean and variance are (Lemma 2.26). Learn the catalogue as vocabulary, not as a topic.
The inclusion–exclusion technique used in Example 1.41 and in Sheet 2 Exercise 4 is examined — see WiSe25 P6c, worked on the §1.1 page.
Summary sheet
The four urn models
| ordered | unordered | |
|---|---|---|
| with replacement | \(n^k\) | \(\binom{n+k-1}{k}\) |
| without replacement | \(\frac{n!}{(n-k)!}\) | \(\binom{n}{k}\) |
Memory hook: the two without entries differ by \(k!\) (the orderings of one subset); the two ordered entries are the ones your intuition reaches for first.
The seven distributions
| Name | Support \(\Omega\) | pmf \(p(\omega)\) | Models |
|---|---|---|---|
| \(\Lap_\Omega\) | finite \(\Omega\) | \(1/|\Omega|\) | all outcomes equally likely |
| \(\Hyp(N,K,n)\) | \(\{\max(0,n{+}K{-}N),\dots,\min(n,K)\}\) | \(\binom{K}{\omega}\binom{N-K}{n-\omega}/\binom{N}{n}\) | defectives in a sample drawn without replacement |
| \(\Ber(n,p)\) | \(\{0,1\}^n\) | \(p^{\sum\omega_i}(1-p)^{n-\sum\omega_i}\) | the sequence of \(n\) binary trials |
| \(\Bin(n,p)\) | \(\{0,\dots,n\}\) | \(\binom{n}{\omega}p^\omega(1-p)^{n-\omega}\) | the number of successes in \(n\) trials |
| \(\NegBin(r,p)\) | \(\N_{\ge r}\) | \(\binom{\omega-1}{r-1}p^r(1-p)^{\omega-r}\) | total trials to reach \(r\) successes |
| \(\Geo(p)\) | \(\N_{>0}\) | \((1-p)^{\omega-1}p\) | trials until the first success |
| \(\Poi(\lambda)\) | \(\N\) | \(e^{-\lambda}\lambda^\omega/\omega!\) | rare events at rate \(\lambda\) |
Relations between them
- \(\Ber(p)=\Ber(1,p)\); counting the successes of \(\Ber(n,p)\) gives \(\Bin(n,p)\).
- \(\NegBin(1,p)=\Geo(p)\).
- \(\Bin(n,\lambda/n)\to\Poi(\lambda)\) as \(n\to\infty\) — Theorem 1.42.
- \(\Hyp\) is the without-replacement analogue of \(\Bin\); for \(N\) much larger than \(n\) the two are close, since removing a few items barely changes the composition. (not in the script)
Formulas from this page
- Laplace
- \(\P(A)=|A|/|\Omega|\) — only when all outcomes are equally likely
- pmf ↔ measure
- \(p\ge0,\ \sum_\omega p(\omega)=1\) ⟺ a discrete probability measure (Lem. 1.35)
- complement
- \(\P(\text{at least one})=1-\P(\text{none})\)
- at-least-one-each
- \(b_i\ge1,\ \sum b_i=k\) over \(m\) bins ↔ \(c_i\ge0,\ \sum c_i=k-m\)
- derangements
- \(\P(\text{no fixed point})=\sum_{k=0}^{n}\frac{(-1)^k}{k!}\to e^{-1}\)
- Bertrand
- \(\tfrac13\), \(\tfrac12\), \(\tfrac14\) — endpoints, radial point, midpoint
Exam focus
- Know the seven pmfs cold, with their supports. Exam problems open with "let \(X_i\) be iid \(\Ber(p)\)" and never define it.
- \(\Ber(n,p)\) versus \(\Bin(n,p)\) — sequences versus counts. A wrong support loses the point.
- \(\Geo\) and \(\NegBin\) start at 1 and at \(r\) in this script, not at 0.
- Always state the model before counting, and say whether the outcomes are equally likely. Marking schemes award credits for the setup.
- Use the ordered model when in doubt (Example 1.41). It is always defensible.
- Complement counting for "at least one".
Not examined so far: Bertrand's paradox, the hypergeometric distribution, the negative binomial distribution, and the derivation of the urn-model counts.
Self-test
Section 1.3 · Lectures 4–5 (13 & 20 May 2026)
Densities, continuous distributions, and random variables
Dichten, stetige Verteilungen und Zufallsvariablen
What this page covers Script §1.3, pp. 30–43
Everything from Definition 1.44 to Example 1.63, plus the unnumbered motivation "Why random variables" and "Our obsession with real-valued random variables" that closes the section. The script's section goal: "Introduce a concise mathematical framework to talk about random variables and their distributions or probability densities."
Worked in place: Sheet 4 Ex 4, Sheet 5 Ex 1, and the old-exam tasks SoSe25 P3 (all four parts) and WiSe25 P3a. Sheet 3 Ex 1 — measurability on a generator — belongs here in spirit and is worked on the §1.1 page.
Exam weight: "Density computations" is a full problem in two of the three exams (9 and 11 credits). It is the most reliably examined skill on this page.
The big picture
The script states the goal of this section: "Introduce a concise mathematical framework to talk about random variables and their distributions or probability densities." It does two things. They look unrelated, but they turn out to be one idea.
- Densities. In §1.2 a discrete distribution was described by a pmf (probability mass function) \(p(x)=\P(\{x\})\): the probability of each single point. On the real line \(\R\) this fails. A single point, such as "the bus comes at exactly 10:07:00.000…", has probability 0. So we describe the distribution by a function \(p\) whose area above a set is the probability of that set. The motivation on page 0 built this picture; here it becomes a definition.
- Random variables. A random variable is a function \(X:\Omega\to\R\). It takes an abstract outcome \(\omega\) of the experiment (a card, a sequence of coin flips) and returns a number. Every random variable carries its own distribution \(\P_X\) on \(\R\). After that we almost never look back at the sample space \(\Omega\).
The link between the two: the distribution of a real random variable is a probability measure on \((\R,\mathcal B)\). (Here \(\mathcal B\) is the Borel σ-algebra: the collection of "reasonable" subsets of \(\R\), such as intervals, to which we assign probabilities; see §1.1.) Every such measure has a cdf (cumulative distribution function) \(F(x)=\P((-\infty,x])\) (Definition 1.23), and by Theorem 1.25 the cdf determines the measure completely. When the measure is nice enough, it also has a density (Theorem 1.48 below). So "let \(X\) have density \(p\)" is a complete description of a random quantity.
In words: in practice you will write "\(X\sim\Exp(\lambda)\)" and compute integrals of \(\lambda e^{-\lambda x}\). This page explains why that sentence means something precise, and teaches the integrals.
Primer: what you need My addition
From your Analysis guide Analysis guide
Everything on this page is integration. You need: the integral as area, the fundamental theorem (\(\tfrac{\mathrm d}{\mathrm dx}\int_a^x p=p(x)\) and \(\int_a^b F'=F(b)-F(a)\)), improper integrals \(\int_{-\infty}^\infty\), substitution and integration by parts, and continuity for Example 1.52.
Also used below: splitting an integral into pieces, \(\int_a^b=\int_a^c+\int_c^b\), and integrating a sum term by term (Analysis 8.2, needed for densities defined piece by piece); the derivative rules — chain rule, power rule, \((\sqrt x)'=\tfrac1{2\sqrt x}\) — used every time we turn a cdf into a pdf (Analysis 6.3); the logarithm \(\ln\) as the inverse of \(e^x\) (Analysis 5.2); real powers \(x^{a}:=e^{a\ln x}\) for non-integer \(a\) such as \(x^{1/2}\) or \(x^{\alpha-1}\) (Analysis 5); and inverse functions of strictly increasing maps (Analysis 5.1).
From this guide
Background page B4 explains what \(\int p\,\mathrm d\mu\), "\(\mu\)-integrable", the Lebesgue measure \(\lambda^n\) and Radon–Nikodym mean — the vocabulary of Definition 1.44 and Theorem 1.48, which the script uses but explicitly does not develop. Pre-images \(X^{-1}(B)\), which random variables are built on, are on B2.
Two integrals you will need over and over, both from the fundamental theorem:
\[ \int_a^b\lambda e^{-\lambda x}\,\mathrm dx=\bigl[-e^{-\lambda x}\bigr]_a^b=e^{-\lambda a}-e^{-\lambda b}, \qquad \int_a^b x^k\,\mathrm dx=\frac{b^{k+1}-a^{k+1}}{k+1}\ (k\ne-1). \]Probability density functions
The picture first My addition. Imagine one kilogram of sand spread along the real line. Some stretches hold a thick layer, others a thin one. The density \(p(x)\) is the thickness of the layer at \(x\): mass per unit length. The mass on a stretch \([a,b]\) is the area under \(p\) between \(a\) and \(b\), i.e. \(\int_a^bp(x)\,\mathrm dx\). Replace "mass" by "probability" and you have a probability density. Two rules follow at once: the thickness can never be negative, and the total mass is 1.
Symbols used below. A measure space \((\Omega,\Aa,\mu)\) is a set \(\Omega\), a σ-algebra \(\Aa\) (the subsets we may measure) and a measure \(\mu\) (a rule that gives each set in \(\Aa\) a size \(\ge0\)). \(\R_{\ge0}\) is the set of real numbers \(\ge0\). \(\int p\,\mathrm d\mu\) is the integral of \(p\) "weighted by \(\mu\)". \(\mathcal B^n\) is the Borel σ-algebra on \(\R^n\), and the Lebesgue measure \(\lambda^n\) gives each set its ordinary length (\(n=1\)), area (\(n=2\)) or volume (\(n=3\)). All of this is explained slowly on B4; the Lebesgue measure has its own section there. For the exam you only need the simplified Definition 1.45.
Definition 1.44 probability density function Script 1.44
Let \((\Omega,\Aa,\mu)\) be a measure space. A (probability) density function (pdf) [Wahrscheinlichkeitsdichte] on \((\Omega,\Aa,\mu)\) is a \(\mu\)-integrable function \(p:\Omega\to\R_{\ge0}\) such that \(\int p\,\mathrm d\mu=1\).
For \((\Omega,\Aa,\mu)=(\R^n,\mathcal B^n,\lambda^n)\), where \(\lambda^n\) is the \(n\)-dimensional Lebesgue measure, this reduces to \(p:\R^n\to\R_{\ge0}\) with
\[ \int_{\R^n}p(x)\,\mathrm dx=\int_{-\infty}^{\infty}\!\!\cdots\int_{-\infty}^{\infty}p(x_1,\dots,x_n)\,\mathrm dx_1\cdots\mathrm dx_n=1. \]Reading it. There are two conditions, exactly as for a pmf: \(p\) is non-negative, and its total mass is 1. "\(\mu\)-integrable" means the integral exists and is finite (B4). Writing the \(n\)-dimensional integral as \(n\) ordinary integrals, one after the other, is allowed by the Fubini–Tonelli theorem (B4).
Definition 1.45 density functions simplified Script 1.45
A (probability) density function on \(\R^n\) is a function \(p:\R^n\to\R_{\ge0}\) with \(\int_{-\infty}^\infty\cdots\int_{-\infty}^\infty p(x_1,\dots,x_n)\,\mathrm dx_1\cdots\mathrm dx_n=1\). "Here, we leave out the technicalities around (Lebesgue-)integrability and assume the function can be integrated and integrates to 1."
This is the working definition for the exam. Every "find \(c\) such that \(p\) is a valid pdf" task checks exactly these two conditions.
Remark 1.46 densities with respect to \(\lambda^n\); Riemann vs Lebesgue Script 1.46
In this lecture every density is a density on \((\R^n,\mathcal B^n,\lambda^n)\). In other words, the underlying measure is always the Lebesgue measure (ordinary length, area, volume).
The integral you know from school is the Riemann integral. It splits the area under a curve into many thin vertical rectangles and lets their width go to zero. It fails for functions with many jumps (discontinuities): only some functions are "Riemann-integrable". The Lebesgue integral is more general. Every Riemann-integrable function is also Lebesgue-integrable, and then both integrals give the same value. Some functions are Lebesgue-integrable but not Riemann-integrable. The script: "Unfortunately, we do not have time to go into the measure theoretic details." Those details, with an interactive comparison of the two ways of slicing, are on B4.
For every density in this course the two integrals agree, so you can compute with the school integral.
The misconception to kill immediately: a density is not a probability
\(p(x)\) is not \(\P(X=x)\) — that is 0 for every \(x\). And \(p(x)\) may exceed 1. Example: the uniform distribution on \([0,\tfrac12]\) has \(p(x)=2\) there, because the area \(2\cdot\tfrac12=1\). Only areas under \(p\) are probabilities; values of \(p\) are "probability per unit length".
What \(p(x)\) does mean: for a small width \(h\) and \(p\) continuous at \(x\), \(\P(x\le X\le x+h)\approx p(x)\,h\). So \(p(x)=2\) says intervals near \(x\) are hit twice as often per unit length as under the \(\Unif(0,1)\) density.
Proposition 1.47 density-induced probability measure Script 1.47
Let \(p:\R^n\to\R_{\ge0}\) be a pdf. Then
\[ \mathcal B^n\to[0,1],\qquad A\mapsto\int_{\R^n}p(x)\,\one_A(x)\,\mathrm dx \]uniquely defines a probability measure on \((\R^n,\mathcal B^n)\), the probability measure induced by \(p\) (with respect to \(\lambda^n\)). Here \(\one_A\) (the script writes \(\chi_A\)) is the indicator function of \(A\): \(\one_A(x)=1\) if \(x\in A\) and \(\one_A(x)=0\) otherwise.
Reading it: \(\int p\,\one_A\) is "the area under \(p\), but only above \(A\)", i.e. \(\int_Ap(x)\,\mathrm dx\). For an interval, \(\P([a,b])=\int_a^bp(x)\,\mathrm dx\).
Why it is a probability measure supplied by me — the script gives no proof
Write \(\P(A):=\int p\,\one_A\). We check the conditions of Definition 1.17 (the definition of a measure: empty set gets 0, values \(\ge0\), σ-additive) and \(\P(\R^n)=1\).
- \(\P(\emptyset)=0\): \(\one_\emptyset\equiv0\), so the integrand is 0.
- Non-negative: \(p\ge0\) and \(\one_A\ge0\), so the integral is \(\ge0\).
- \(\P(\R^n)=1\): \(\one_{\R^n}\equiv1\), and \(\int p=1\) is the pdf condition.
- σ-additive: for pairwise disjoint \(A_1,A_2,\dots\), each point lies in at most one \(A_i\), so \(\one_{\bigcup_iA_i}=\sum_i\one_{A_i}\) pointwise. The partial sums \(p\sum_{i\le k}\one_{A_i}\) increase in \(k\), so the monotone convergence theorem (B4) lets us swap sum and integral: \(\P(\bigcup_iA_i)=\int p\sum_i\one_{A_i}=\sum_i\int p\,\one_{A_i}=\sum_i\P(A_i)\).
"Uniquely" just says the formula leaves no choice: each \(A\) gets exactly one number. ∎
This is the continuous twin of Lemma 1.35(ii), where the sum over a pmf played the role of the integral — and the step that needed care there (regrouping a series) is the step that needs monotone convergence here.
Theorem 1.48 Radon–Nikodym (for \(\R^n\)) Script 1.48
Let \(\P\) be a probability measure on \((\R^n,\mathcal B^n)\). The following are equivalent (each one implies the other):
- \(\P\ll\lambda^n\) — read "\(\P\) is absolutely continuous with respect to \(\lambda^n\)" — meaning: for all \(A\in\mathcal B^n\) with \(\lambda^n(A)=0\) we also have \(\P(A)=0\). (\(\lambda^n(A)=0\) can essentially be read as \(\int\one_A(x)\,\mathrm dx=0\).)
- There exists a pdf \(p:\R^n\to\R_{\ge0}\) inducing \(\P\).
When these hold, \((\R^n,\mathcal B^n,\P)\) is called a continuous probability space.
Why (ii) ⇒ (i) is easy mine: if \(\lambda^n(A)=0\) then \(\int_Ap=0\) because integrals cannot see null sets (B4). The direction (i) ⇒ (ii) is the deep one and is not proved in this course.
What it rules out mine: any distribution with an atom, i.e. a single point with positive probability. Example: \(\Ber(\tfrac12)\) on \(\R\) (the fair coin, values 0 and 1) puts mass 1 on \(\{0,1\}\). This set has length 0, so condition (i) fails, and \(\Ber(\tfrac12)\) has no pdf. Discrete and continuous distributions are genuinely different. Mixtures of the two have neither a pmf nor a pdf (see B4).
In words: a distribution has a density exactly when every set of length zero also has probability zero.
Lemma 1.49 relationship between pdf and cdf Script 1.49
- If \(p\) is the pdf of \(\P\) on \((\R^n,\mathcal B^n)\) with cdf \(F\), then \(F(x_1,\dots,x_n)=\int_{-\infty}^{x_1}\!\cdots\int_{-\infty}^{x_n}p(y_1,\dots,y_n)\,\mathrm dy_n\cdots\mathrm dy_1\).
- If the cdf \(F\) of \(\P\) on \((\R,\mathcal B)\) is (weakly) differentiable, then \(p:=F'\) is the density of \(\P\).
In words: "the cdf is the integral of the pdf and the pdf is the derivative of the cdf."
Proof for \(n=1\) supplied by me
(i) By Definition 1.23 and Proposition 1.47, \(F(x)=\P((-\infty,x])=\int p\,\one_{(-\infty,x]}=\int_{-\infty}^xp(y)\,\mathrm dy\). ✓
(ii) Let \(p:=F'\). First, \(p\) is a pdf: a cdf never decreases, so its derivative is \(p\ge0\). Next, the fundamental theorem (Analysis 8.3) gives \(\int_a^bp=F(b)-F(a)\) for all \(a<b\). Let \(a\to-\infty\): since \(F(a)\to0\) (a property of every cdf), \(\int_{-\infty}^bp=F(b)\). Letting also \(b\to\infty\), where \(F(b)\to1\), gives \(\int p=1\). So the measure induced by \(p\) (Proposition 1.47) has the cdf \(F\) — the same cdf as \(\P\). By Theorem 1.25 a cdf determines its measure uniquely, so the measure induced by \(p\) is \(\P\). ✓ ∎
About "weakly". Real cdfs often have corners — \(\Unif(a,b)\) has kinks at \(a\) and \(b\), where \(F'\) does not exist. That is harmless: a density only matters up to null sets (B4), so you differentiate piecewise and set \(p\) to anything at the finitely many corners. "Weakly differentiable" is the technical name for exactly this.
The two directions you will use in every density problem
pdf → cdf: integrate from \(-\infty\) to \(x\), piece by piece if \(p\) is defined piecewise, carrying the accumulated mass from earlier pieces (\(\int_a^b=\int_a^c+\int_c^b\), Analysis 8.2). Always state \(F\) on the whole real line: \(0\) left of the support, \(1\) right of it.
cdf → pdf: differentiate on each piece (derivative rules: Analysis 6.3), set \(p=0\) outside the support.
Check: the pdf must be \(\ge0\); the cdf must be increasing, continuous (for a pdf), with limits 0 and 1.
A first example with real numbers My addition
Let \(p(x)=c\,x^2\) on \([0,3]\) and 0 elsewhere.
Find \(c\). \(\int_0^3cx^2\,\mathrm dx=c\cdot\frac{27}{3}=9c\stackrel!=1\), so \(c=\tfrac19\). Non-negativity holds since \(x^2\ge0\).
cdf. For \(0\le x\le3\): \(F(x)=\int_0^x\tfrac19y^2\,\mathrm dy=\tfrac{x^3}{27}\). So \(F(x)=0\) for \(x<0\), \(\tfrac{x^3}{27}\) on \([0,3]\), \(1\) for \(x>3\).
A probability. \(\P(1\le X\le2)=F(2)-F(1)=\tfrac{8-1}{27}=\tfrac7{27}\approx0.26\).
A value above 1. \(p(3)=1\), and on \([0,3]\) the density ranges over \([0,1]\) — but change the support to \([0,1]\) and you get \(c=3\) and \(p(1)=3>1\). Nothing is wrong.
Random variables
Why random variables? Script pp. 40–42, motivation
The script's argument, condensed. In the reshuffling game of the Chapter 1 motivation, the underlying randomness lives on the 52 cards, yet the outcome we cared about — the number of draws until \(\mathrm A\heartsuit\) — lives on \(\{1,2,\dots\}\), an entirely different space. We wrote down its pmf by intuition ("multiply the failure probabilities"), but could not justify why multiplying is right. The script asks: why multiply? And for \(k>2\), do we need a combinatorial factor for the order of the failures in \((\tfrac{51}{52})^{k-1}\)?
Sometimes intuition does not even tell us where the randomness comes from. Take the number of customers entering a store in one hour. What plays the role of "52 equally likely cards"? We would have to invent a pool of potential customers who each decide "randomly" whether to walk in. That is awkward.
The rigorous route: take the product space of infinitely many independent copies of the one-draw space (this is §1.4), and define a function \(X\) on it that looks for the first ace of hearts — e.g. \(X(7\spadesuit,2\heartsuit,\mathrm K\diamondsuit,2\heartsuit,\mathrm A\heartsuit,\dots)=5\). Then \(\P(X=5)\) is the probability of the event \(\{X=5\}\) in the product space, and it comes out as \((\tfrac{51}{52})^4\tfrac1{52}\), as intuition said.
In practice nobody does this. We say "this is a number-of-trials-until-success problem, so \(X\sim\Geo(p)\)", and that sentence specifies \(\Omega\) (implicitly), the σ-algebra (the power set) and \(\P\) (via the pmf) at once. Main takeaway (script): "In practice, we typically directly model our outcome of interest by a random variable with a prescribed distribution."
Second example from the script: count the aces in the first \(n=50\) draws (with reshuffling). By intuition: a draw is "no ace" with probability \(q:=\tfrac{48}{52}\). No ace at all needs all 50 draws to fail, so \(p(0)=q^{50}\). Exactly one ace: it can sit in any of the 50 positions (probability \(1-q\) there), and the other 49 draws are no ace, so \(p(1)=50(1-q)q^{49}\). Continuing gives the binomial pmf \(p(k)=\binom{50}{k}(1-q)^kq^{50-k}\). (Here "success" = ace has probability \(1-q\); the roles of \(q\) and \(1-q\) are swapped compared with §1.2, which is only naming.) The rigorous version would build the product space \(\Omega^{50}\) of all 50-card sequences with the uniform measure, define a function that counts the aces, and compute the probability of each pre-image. Tedious. Instead we recognise "number of successes in \(n\) independent trials" and say: \(\Bin(50,\tfrac4{52})\).
Two small slips in the script here. It writes \(p(1)=50(1-q)q\); the exponent must be \(49\) (the other 49 draws), i.e. \(p(1)=50(1-q)q^{49}\). And it writes the product space as \((\Omega^{50},\mathcal P(\N^{50}),\Lap^{50}_\Omega)\); the σ-algebra should be \(\mathcal P(\Omega^{50})\), the power set of the card sequences, not of \(\N^{50}\).
Definition 1.50 measurable map, random variable Script 1.50
Two words first. A measurable space \((\Omega,\Aa)\) is a set with a σ-algebra, i.e. a measure space without the measure yet. The pre-image \(X^{-1}(A')=\{\omega\in\Omega\mid X(\omega)\in A'\}\) is the set of all inputs that \(X\) sends into \(A'\) (B2); it exists even if \(X\) has no inverse.
Let \((\Omega,\Aa)\) and \((\Omega',\Aa')\) be measurable spaces. A map \(X:\Omega\to\Omega'\) is measurable (with respect to \(\Aa\) and \(\Aa'\)) if \(X^{-1}(A')\in\Aa\) for all \(A'\in\Aa'\).
Let \((\Omega,\Aa,\P)\) be a probability space. An \((\Omega',\Aa')\)-valued random variable [Zufallsvariable] on \((\Omega,\Aa,\P)\) is a measurable map \(\Omega\to\Omega'\). For \((\Omega',\Aa')=(\R,\mathcal B)\) it is a real-valued random variable; for \((\R^n,\mathcal B^n)\) a random vector.
Why "measurable" is exactly the right condition. We want to ask "what is the probability that \(X\) lands in \(A'\)?". The outcomes that make this happen form the set \(X^{-1}(A')\subseteq\Omega\), and \(\P\) can only evaluate it if it is an event. Measurability says: every question about \(X\) that makes sense on the target side is an event on the source side.
A random variable is neither random nor a variable. It is an ordinary, fixed function. The randomness sits in which \(\omega\) the experiment produces; \(X\) just reports a number about it.
Checking it in practice: by Sheet 3 Ex 1 it suffices to check a generator. The half-lines \((-\infty,c]\), \(c\in\R\), generate \(\mathcal B\), and their pre-images are the sets \(\{X\le c\}\). So a real \(X\) is measurable iff \(\{X\le c\}\in\Aa\) for all \(c\in\R\).
Convention 1.51 — (RV)RV, and event notation Script 1.51
The script abbreviates (real-valued) random variables as (RV)RV — this appears in every exam. For a random variable \(X\), \(A'\subseteq\Omega'\) and \(c'\in\Omega'\):
\[ \{X\in A'\}:=\{\omega\in\Omega\mid X(\omega)\in A'\}=X^{-1}(A'),\qquad \{X=c'\}:=X^{-1}(\{c'\}), \]and for real \(X\): \(\{X\le c\}:=X^{-1}((-\infty,c])\), \(\{c'\le X\le c\}:=X^{-1}([c',c])\), and so on. The script then "slowly increases the sloppiness level" to \(\P(X\le c)\) instead of \(\P(\{X\le c\})\), or even \(\P(\text{first throw hits the red target})\). Always remember that under the hood this is an event \(A\subseteq\Omega\).
Example 1.52 continuous functions are measurable Script 1.52
Continuous functions are measurable with respect to their Borel σ-algebras.
Why supplied by me — the script states it without argument
Take \(f:\R\to\R\) continuous. The pre-image of an open interval \((a,b)\) is an open set: if \(f(x_0)\in(a,b)\), continuity (Analysis 4.1, the ε–δ form) gives a \(\delta>0\) with \(f(x)\in(a,b)\) whenever \(|x-x_0|<\delta\), so a whole interval around \(x_0\) lies in \(f^{-1}((a,b))\), so \(f^{-1}((a,b))\) is open. Open sets are Borel (Sheet 2 Ex 5). The open intervals generate \(\mathcal B\) (that is how Example 1.13 defines \(\mathcal B\)), so by Sheet 3 Ex 1 — measurability need only be checked on a generator — \(f\) is measurable. ∎
Consequence you use constantly: if \(X\) is a random variable and \(g\) is continuous, then \(g(X)=g\circ X\) is a random variable, because \((g\circ X)^{-1}(B)=X^{-1}(g^{-1}(B))\) and both steps preserve measurability. (Here \(g\circ X\) means "first apply \(X\), then \(g\)"; the pre-image identity says: to land in \(B\) after both steps, \(X(\omega)\) must land in the set of points that \(g\) sends into \(B\). It is explained with an example on B2.) So \(X^2\), \(e^X\), \(\ln X\) (on \(X>0\)), \(aX+b\) are all random variables.
Definition 1.53 induced distribution Script 1.53
Let \(X:\Omega\to\Omega'\) be an \((\Omega',\Aa')\)-valued random variable on \((\Omega,\Aa,\P)\). Then
\[ \P_X:\Aa'\to[0,1],\qquad A'\mapsto\P\bigl(X^{-1}(A')\bigr)=\P(X\in A') \]is a probability measure on \((\Omega',\Aa')\), the (probability) distribution [Verteilung] of \(X\). In short \(\P_X=\P\circ X^{-1}\). We say \(X\) follows \(\P_X\) and write \(X\sim\P_X\), e.g. \(X\sim\Lap_\Omega\) or \(X\sim\mathcal N(0,\sigma^2)\).
Why \(\P_X\) is a probability measure supplied by me
First, \(\P_X(A')\) is defined only because \(X^{-1}(A')\in\Aa\) — measurability at work.
Total mass: \(X^{-1}(\Omega')=\Omega\), so \(\P_X(\Omega')=\P(\Omega)=1\).
σ-additivity: if \(A'_1,A'_2,\dots\) are pairwise disjoint, so are their pre-images (a point cannot map into two disjoint sets), and pre-images commute with unions (B2). Hence \(\P_X(\bigcup_iA'_i)=\P(\bigcup_iX^{-1}(A'_i))=\sum_i\P(X^{-1}(A'_i))=\sum_i\P_X(A'_i)\). ∎
This is Sheet 1 Ex 6 (push-forward σ-algebra) upgraded from sets to measures.
Definition 1.54 identically distributed Script 1.54
Random variables \((X_i)_{i\in I}\) with values in \((\Omega,\Aa)\) are identically distributed if \(\P_{X_i}=\P\) for all \(i\), for one probability measure \(\P\) on \((\Omega,\Aa)\). The base probability spaces of the \(X_i\) may be different.
Example mine: \(X(\omega)=\omega\) on \(\{0,1\}\) with the fair coin, and \(Y=\one_{\{U\le1/2\}}\) with \(U\) uniform on \([0,1]\). Different \(\Omega\)s, different functions — both \(\sim\Ber(\tfrac12)\), hence identically distributed. Identically distributed says nothing about the two being equal, or even defined on the same space.
Definition 1.55 non-degenerate Script 1.55
A real random variable or random vector \(X\) is non-degenerate if there is no \(x\) with \(\P(X=x)=1\). A degenerate one is almost surely constant (equal to one fixed number with probability 1) — "random" in name only. Degenerate variables have variance 0 and break formulas that divide by a standard deviation, which is why some definitions and theorems exclude them (e.g. the correlation coefficient, Definition 2.13, requires \(\sigma_X,\sigma_Y>0\)).
Definition 1.56 cdf and pdf of a random variable Script 1.56
For a real random variable \(X\): its cdf is \(F_X:=F_{\P_X}\), i.e. \(F_X(x)=\P(X\le x)\); if \(F_X\) is (weakly) differentiable (\(\P_X\) continuous), its pdf is \(p_X:=F_X'\).
Corollary 1.57 Script 1.57
Real-valued random variables are identically distributed if and only if they have the same cdf (or, if they exist, the same pdf).
Proof supplied by me
"⇒": same distribution gives \(F_X(x)=\P_X((-\infty,x])=\P_Y((-\infty,x])=F_Y(x)\). "⇐": by Theorem 1.25 a cdf determines its measure uniquely, so \(F_X=F_Y\) forces \(\P_X=\P_Y\). For pdfs, equal pdfs give equal cdfs by Lemma 1.49(i). ∎
Viewpoint 1.58 the common view of random variables Script 1.58
In practice we do not care about the underlying probability space, or even about the random variable as a function — all that matters is its distribution. We often "start from the assumed distribution" and posit a random variable following it. All results for probability measures transfer to random variables, since a random variable induces a measure. Machine-learning papers typically begin "let \(X\) be a random variable following distribution \(P\)" without mentioning \(\Omega\), \(\Aa\), \(\P\): the random variable is "another layer of abstraction on top of the model".
Remark 1.59 pdfs and cdfs are all we need Script 1.59
- The general Radon–Nikodym theorem works for any σ-finite measure space \((\Omega,\mathcal S,\mu)\): \(\P\) has a density with respect to \(\mu\) iff \(\P\ll\mu\). (σ-finite [σ-endlich]: \(\Omega\) can be covered by countably many sets of finite measure, as \(\R\) is covered by the intervals \([-n,n]\).)
- Theorem 1.48 says many "reasonable" probability measures are fully characterised by their pdf.
- Together with Viewpoint 1.58, this is why we describe a real random variable directly by the pdf of its distribution with respect to Lebesgue measure. The density is also called the Radon–Nikodym derivative of \(\P_X\) with respect to \(\lambda\).
- Probability mass functions are Radon–Nikodym derivatives with respect to the counting measure (the measure that gives each set its number of elements). (This is the unification explained on B4.)
- Sloppy but common: \(X\sim p(x)\) or \(X\sim F(x)\).
Our obsession with real-valued random variables Script pp. 42–43, motivation
Outcomes are often not numbers (cards), yet we want numerical summaries. A random variable supplies them. The script's simplified Blackjack: \(X(\text{Ace})=11\); \(X(\mathrm K)=X(\mathrm Q)=X(\mathrm J)=X(10)=10\); \(X(9)=9,\dots,X(2)=2\). Then \(\{X=10\}\) is the event "any K, Q, J or 10", 16 cards, so \(\P(X=10)=\tfrac{16}{52}\); \(\P(X=11)=\tfrac4{52}\); \(\P(X=k)=\tfrac4{52}\) for \(k=2,\dots,9\).
So \(X\) induces a new distribution on the value set \(\Omega_X=\{2,3,\dots,11\}\), with its own pmf \(p_X(k)=\P(X=k)\). With numbers we can compute two summaries:
- expectation (mean) [Erwartungswert] \(\E[X]=\sum_{k\in\Omega_X}k\,p_X(k)\): the "average" value of \(X\), e.g. the average point value over many draws from the full deck;
- variance \(\mathrm{var}[X]=\E[(X-\E[X])^2]\): how widely the values spread around the mean.
For the Blackjack \(X\) the script writes the expectation as \(\E[X]=\sum_{k=2}^9k\tfrac4{52}+10\tfrac{16}{52}+11\tfrac4{52}=\dots\) and stops. Finishing it: \(\sum_{k=2}^9k=2+3+\dots+9=44\), so, putting everything over the common denominator 52,
\[ \E[X]=\frac{4\cdot44+10\cdot16+11\cdot4}{52}=\frac{176+160+44}{52}=\frac{380}{52}=\frac{95}{13}\approx7.31. \]A die is the everyday case: each face is identified with its number of dots, and everyone knows the average roll is 3.5. For abstract outcomes like cards there is no such notion: "the average card" means nothing until a random variable attaches numbers — and the choice of numbers is arbitrary, so the mean is not always useful. But questions such as "how long should we expect to play until \(\mathrm A\heartsuit\) appears?" are natural. Expectations are defined properly in §2.1.
In words: random variables let us leave the complicated sample space behind and work with numbers. They are the bridge from qualitative outcomes to quantitative analysis.
The Gamma and Beta functions
A gap in your Analysis guide Analysis guide
Your guide mentions the Gamma function once in passing. Everything below is therefore written out in full. You need improper integrals, integration by parts, and real powers \(x^{\alpha-1}:=e^{(\alpha-1)\ln x}\) for non-integer \(\alpha\) (Analysis 5).
Definition 1.60 Gamma and Beta functions Script 1.60
\[ \Gamma(\alpha)=\int_0^\infty x^{\alpha-1}e^{-x}\,\mathrm dx,\quad\alpha>0;\qquad B(\alpha,\beta)=\int_0^1x^{\alpha-1}(1-x)^{\beta-1}\,\mathrm dx=\frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)},\quad\alpha,\beta>0. \]Why they are here: they are exactly the normalising constants that make the Gamma, χ², t and Beta densities integrate to 1. You rarely compute them from the integral; you use the rules below.
The four facts to know My addition — the script states only the definition
- \(\Gamma(1)=1\).
- \(\Gamma(\alpha+1)=\alpha\,\Gamma(\alpha)\) for \(\alpha>0\).
- \(\Gamma(n)=(n-1)!\) for \(n\in\N_{>0}\) — the Gamma function interpolates the factorial.
- \(\Gamma(\tfrac12)=\sqrt\pi\).
Proofs
(1) \(\Gamma(1)=\int_0^\infty e^{-x}\,\mathrm dx=[-e^{-x}]_0^\infty=0-(-1)=1\).
(2) Integrate by parts with \(u=x^\alpha\), \(v'=e^{-x}\):
\[ \Gamma(\alpha+1)=\int_0^\infty x^{\alpha}e^{-x}\,\mathrm dx =\bigl[-x^\alpha e^{-x}\bigr]_0^\infty+\alpha\int_0^\infty x^{\alpha-1}e^{-x}\,\mathrm dx=0+\alpha\Gamma(\alpha). \]The boundary term vanishes: at \(0\) because \(\alpha>0\) makes \(x^\alpha\to0\); at \(\infty\) because the exponential beats every power (Analysis 5.2).
(3) Induction on \(n\) from (1) and (2). Induction [vollständige Induktion] proves a statement for every \(n\) in two moves — show it for the smallest \(n\), then show that it carries from \(n\) to \(n+1\); the method is set out in Analysis 2.2. Base case \(n=1\): \(\Gamma(1)=1=0!\) by (1) (and \(0!=1\) by convention). Step: suppose \(\Gamma(n)=(n-1)!\) for some \(n\ge1\). Using (2) with \(\alpha=n>0\), \(\Gamma(n+1)=n\,\Gamma(n)=n\cdot(n-1)!=n!\), which is the statement for \(n+1\). So \(\Gamma(n)=(n-1)!\) holds for every \(n\in\N_{>0}\).
(4) Substitute \(x=z^2/2\), so \(\mathrm dx=z\,\mathrm dz\) and \(x^{-1/2}=\sqrt2/z\):
\[ \Gamma(\tfrac12)=\int_0^\infty x^{-1/2}e^{-x}\,\mathrm dx=\sqrt2\int_0^\infty e^{-z^2/2}\,\mathrm dz =\sqrt2\cdot\frac{\sqrt{2\pi}}2=\sqrt\pi, \]using the Gaussian integral \(\int_{-\infty}^\infty e^{-z^2/2}\,\mathrm dz=\sqrt{2\pi}\) proved in the normal-distribution box below, and symmetry to halve it. ∎
The Beta identity \(B(\alpha,\beta)=\Gamma(\alpha)\Gamma(\beta)/\Gamma(\alpha+\beta)\) needs a two-dimensional change of variables and is beyond this course; the script states it without proof, and so do I. A sanity check: \(B(1,1)=\int_0^11\,\mathrm dx=1\) and \(\Gamma(1)\Gamma(1)/\Gamma(2)=1\cdot1/1=1\) ✓.
The continuous distributions Script 1.61
Seven densities, the continuous counterpart of the discrete catalogue on the §1.2 page. The first four are daily bread; χ² and t matter from Chapter 3 on. For each one the script draws the pdf and the cdf for one parameter choice; those choices are listed in each box, and you can reproduce every figure in the widget.
The support \(\Omega\) is the set where the density can be positive. The script deliberately defines every density on all of \(\R\) and multiplies by the indicator \(\one_\Omega\) (script: \(\chi_\Omega\)), which switches it off outside the support. Many books instead define the density only on the support, e.g. \(p_{\mathrm{Beta}(\alpha,\beta)}:[0,1]\to\R_{\ge0}\). Both describe the same distribution. Script, note after 1.61
(i) Uniform distribution \(\Unif(a,b)\) Script 1.61(i)
For \(a<b\), on \(\Omega=[a,b]\): \(p(x)=\one_{[a,b]}(x)\dfrac1{b-a}\).
Models: a random draw where every point in \([a,b]\) is equally likely — a random time between two deadlines.
cdf \(F(x)=0\) for \(x<a\), \(\dfrac{x-a}{b-a}\) on \([a,b]\), \(1\) for \(x>b\). So \(\P(X\in[c,d])=\dfrac{d-c}{b-a}\) for \([c,d]\subseteq[a,b]\): length over total length, the continuous Laplace formula.
Script figure: \(a=2,b=5\): the pdf is a flat block of height \(\tfrac13\) on \([2,5]\); the cdf rises in a straight line from 0 at 2 to 1 at 5.
(ii) Normal distribution \(\mathcal N(\mu,\sigma^2)\) Script 1.61(ii)
For \(\mu\in\R\), \(\sigma>0\), on \(\Omega=\R\):
\[ p(x)=\frac1{\sqrt{2\pi}\,\sigma}\exp\Bigl(-\frac{(x-\mu)^2}{2\sigma^2}\Bigr). \]Models: natural variability and measurement noise — heights in a large population. "Arguably the most important (continuous) distribution of them all. A bit like the number π, it pops up over and over again in unexpected places." The reason is the central limit theorem, §2.4.
Parameters: \(\mu\) is the centre — the peak and the axis of symmetry — and \(\sigma\) is the width. Note the script's second parameter is the variance \(\sigma^2\), not \(\sigma\): \(\mathcal N(100,15^2)\) has standard deviation 15.
Where "centre" and "width" come from — the script only draws the picture, so here is the computation. Differentiating \(p\) with the chain rule (the outer function is \(e^{u}\), the inner one \(u=-\frac{(x-\mu)^2}{2\sigma^2}\) with \(u'=-\frac{x-\mu}{\sigma^2}\)) gives \(p'(x)=-\frac{x-\mu}{\sigma^2}\,p(x)\). Since \(p(x)>0\) everywhere, \(p'\) is zero only at \(x=\mu\), and it is positive left of \(\mu\) and negative right of it: \(p\) rises then falls, so \(\mu\) is the maximum — the peak (Analysis 7.1, extrema from the first derivative). Differentiating once more with the product rule, \(p''(x)=\bigl(\frac{(x-\mu)^2}{\sigma^4}-\frac1{\sigma^2}\bigr)p(x)\), which is zero exactly when \((x-\mu)^2=\sigma^2\), i.e. at \(x=\mu\pm\sigma\), and changes sign there. A point where \(p''\) changes sign is an inflection point [Wendepunkt]: the curve stops bending downwards and starts bending upwards (Analysis 7.7 names them; the link between the sign of \(f''\) and the bending is Analysis 7.6). So \(\sigma\) is exactly the distance from the centre to where the bell changes its bend — that is the precise sense in which it is "the width".
Standard normal: \(\mathcal N(0,1)\), with cdf written \(\Phi\). \(\Phi\) has no elementary formula; you read it from a table or software. Symmetry gives \(\Phi(-z)=1-\Phi(z)\).
Script figure: \(\mu=0\), \(\sigma^2=2.25\) (so \(\sigma=1.5\)): a bell centred at 0 with peak height \(\tfrac1{1.5\sqrt{2\pi}}\approx0.27\); the cdf is an S-curve through \((0,\tfrac12)\).
Why it integrates to 1: the Gaussian integral supplied by me
Substituting \(z=(x-\mu)/\sigma\) (so \(\mathrm dx=\sigma\,\mathrm dz\)) reduces the claim to \(I:=\int_{-\infty}^\infty e^{-z^2/2}\,\mathrm dz=\sqrt{2\pi}\). The antiderivative is not elementary, so use a trick: square it and go to two dimensions.
\[ I^2=\int_{-\infty}^\infty e^{-x^2/2}\,\mathrm dx\int_{-\infty}^\infty e^{-y^2/2}\,\mathrm dy =\iint_{\R^2}e^{-(x^2+y^2)/2}\,\mathrm dx\,\mathrm dy \](Fubini, B4). The integrand depends only on \(r^2=x^2+y^2\), so slice the plane into thin rings: the ring at radius \(r\) of width \(\mathrm dr\) has area \(\approx2\pi r\,\mathrm dr\) and on it the integrand is \(e^{-r^2/2}\). Adding up the rings,
\[ I^2=\int_0^\infty e^{-r^2/2}\,2\pi r\,\mathrm dr=2\pi\bigl[-e^{-r^2/2}\bigr]_0^\infty=2\pi. \]So \(I=\sqrt{2\pi}\). The factor \(r\) that appeared is exactly what makes the integral doable. (Rigorously this is a change to polar coordinates with Jacobian determinant \(r\) — the change-of-variables formula your Analysis guide does not cover; background page B5 does this polar-coordinate computation step by step, and the script sets up the formula in §2.3.) ∎
Primer: what is a "Poisson process of rate \(\beta\)"? My addition
In Example 1.61(iii) the script says the Gamma distribution "models the waiting time for \(\alpha\) events in a Poisson process of rate \(\beta\)", and in 1.61(iv) that the exponential distribution "models the time until the first event in a Poisson process of rate \(\lambda\)". Those two sentences are the only places the phrase "Poisson process" [Poisson-Prozess] appears in the whole script, and it is never defined there. Nothing on this page or in any exercise needs the formal definition, so this box is entirely my own addition: an intuitive picture, so that the script's two sentences mean something to you.
The picture. Events ("arrivals") happen at random moments on a time line: emails landing in your inbox, customers entering a shop, clicks of a Geiger counter. A Poisson process of rate \(\beta>0\) is the model in which
- on average \(\beta\) arrivals happen per unit of time (\(\beta\) = the rate);
- what happens in one stretch of time tells you nothing about a different, non-overlapping stretch (counts in disjoint intervals are independent [unabhängig]);
- arrivals come one at a time, never two at exactly the same moment.
"Independent" is only made precise in §1.4 (Definition 1.74, on the §1.4 page); until then read it as "knowing one of the two tells you nothing about the other". Because independence is not available yet, the two derivations below are a plausible picture rather than a proof, and nothing later on this page depends on them.
Count in \([0,t]\). Let \(N_t\) be the number of arrivals between time 0 and time \(t\). Then \(N_t\sim\Poi(\beta t)\), the Poisson distribution (§1.2) with parameter \(\beta t\): \(\P(N_t=j)=e^{-\beta t}\dfrac{(\beta t)^j}{j!}\) for \(j=0,1,2,\dots\) Why: cut \([0,t]\) into \(n\) tiny pieces. Each piece has (roughly) probability \(\beta t/n\) of containing an arrival, and the pieces are independent, so \(N_t\) is about \(\mathrm{Bin}(n,\beta t/n)\). As \(n\to\infty\) this becomes \(\Poi(\beta t)\) by the Poisson limit theorem (Theorem 1.42).
Waiting time to the 1st arrival. Call it \(T_1\). "The first arrival comes after time \(t\)" is the same event as "no arrival in \([0,t]\)", i.e. \(\{T_1>t\}=\{N_t=0\}\). Hence \(\P(T_1>t)=\P(N_t=0)=e^{-\beta t}\) (the \(j=0\) term, since \((\beta t)^0/0!=1\)), and the cdf is \(F(t)=1-e^{-\beta t}\) for \(t\ge0\). That is exactly the cdf of \(\Exp(\beta)\) in box (iv) below.
Waiting time to the \(k\)-th arrival. Call it \(T_k\). "The \(k\)-th arrival comes after \(t\)" means "at most \(k-1\) arrivals in \([0,t]\)": \(\{T_k>t\}=\{N_t\le k-1\}\), so
\[ \P(T_k>t)=\sum_{j=0}^{k-1}e^{-\beta t}\frac{(\beta t)^j}{j!}. \]The pdf is \(-\tfrac{\mathrm d}{\mathrm dt}\P(T_k>t)\): the cdf is \(F(t)=1-\P(T_k>t)\), and the pdf is \(F'\) (Lemma 1.49(ii)), and differentiating \(F(t)=1-\P(T_k>t)\) produces the minus sign. Differentiate the \(j\)-th term \(e^{-\beta t}\frac{(\beta t)^j}{j!}\) with the product rule: the derivative of \(e^{-\beta t}\) is \(-\beta e^{-\beta t}\) (chain rule), and the derivative of \((\beta t)^j\) is \(j\beta(\beta t)^{j-1}\) (power rule and chain rule), and \(j/j!=1/(j-1)!\). This gives
\[ \frac{\mathrm d}{\mathrm dt}\Bigl(e^{-\beta t}\frac{(\beta t)^j}{j!}\Bigr) =-\beta e^{-\beta t}\frac{(\beta t)^j}{j!}+\beta e^{-\beta t}\frac{(\beta t)^{j-1}}{(j-1)!}, \]where the second part is present only for \(j\ge1\) (for \(j=0\) the factor \((\beta t)^0=1\) is constant, so it contributes nothing). Add these up for \(j=0,\dots,k-1\): the positive part of the \(j\)-th line is the exact negative of the negative part of the \((j-1)\)-st line, so everything cancels in pairs (a telescoping sum) except the negative part of the last line. Hence
\[ \frac{\mathrm d}{\mathrm dt}\P(T_k>t)=-\beta e^{-\beta t}\frac{(\beta t)^{k-1}}{(k-1)!}, \]and the pdf is minus this. Writing \(\beta\cdot(\beta t)^{k-1}=\beta\cdot\beta^{k-1}t^{k-1}=\beta^kt^{k-1}\),
\[ p_{T_k}(t)=\frac{\beta^k}{(k-1)!}\,t^{k-1}e^{-\beta t}=\frac{\beta^k}{\Gamma(k)}\,t^{k-1}e^{-\beta t}\quad(t>0), \]using \(\Gamma(k)=(k-1)!\) from the Gamma section above (fact 3 there, for the positive integer \(k\)). That is the \(\Gamma(k,\beta)\) density of box (iii). (For non-integer shape \(\alpha\) the Gamma distribution still exists, but has no "number of arrivals" reading.)
Numeric example. Emails arrive at rate \(\beta=2\) per hour; look at \(t=1.5\) hours, so \(\beta t=3\).
- Number of emails in 1.5 h: \(N_{1.5}\sim\Poi(3)\); on average 3 emails.
- \(\P(\text{no email in 1.5 h})=e^{-3}\approx0.050\), which is also \(\P(T_1>1.5)\) for \(T_1\sim\Exp(2)\). Mean wait for the first email: \(1/\beta=0.5\) h.
- \(\P(\text{2nd email only after 1.5 h})=\P(N_{1.5}\le1)=e^{-3}(1+3)=4e^{-3}\approx0.199\), a tail probability of \(T_2\sim\Gamma(2,2)\).
In words: a Poisson process is "random arrivals at a steady average rate \(\beta\), with no memory". Counting arrivals in a window of length \(t\) gives a Poisson number with mean \(\beta t\); waiting for the first arrival gives \(\Exp(\beta)\); waiting for the \(k\)-th gives \(\Gamma(k,\beta)\). One model, three distributions.
(iii) Gamma distribution \(\Gamma(\alpha,\beta)\) Script 1.61(iii)
For \(\alpha,\beta>0\), on \(\Omega=\R_{>0}\): \(p(x)=\one_{(0,\infty)}(x)\dfrac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}\).
Models: the waiting time for \(\alpha\) events in a Poisson process of rate \(\beta\) (primer above) — the time until \(\alpha\) emails arrive at rate \(\beta\) per hour. \(\alpha\) is the shape, \(\beta\) the rate (some books use the scale \(1/\beta\) instead — check before looking up a formula).
Integrates to 1: substitute \(u=\beta x\): \(\int_0^\infty\frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}\,\mathrm dx =\frac1{\Gamma(\alpha)}\int_0^\infty u^{\alpha-1}e^{-u}\,\mathrm du=1\). The constant is precisely what Definition 1.60 provides.
Script figure: \(\alpha=3\), \(\beta=0.5\): a skewed hump with its peak at \(x=(\alpha-1)/\beta=4\) peak: my computation and a long right tail.
The script adds: the Gamma distribution has other important distributions as special cases — the next two boxes.
(iv) Exponential distribution \(\Exp(\lambda)=\Gamma(1,\lambda)\) Script 1.61(iv)
For \(\lambda>0\), on \(\Omega=\R_{>0}\): \(p(x)=\one_{(0,\infty)}(x)\,\lambda e^{-\lambda x}\).
Models: the time until the first event in a Poisson process of rate \(\lambda\) (primer above) — the next bus, the length of a call.
cdf and tail: \(F(x)=1-e^{-\lambda x}\) for \(x\ge0\), so the survival function is \(\P(X>x)=e^{-\lambda x}\). Memorise this one line — it solves most exponential problems in one step, including the memorylessness property on the §1.4 page.
Its mean is \(1/\lambda\) (§2.1): large rate, short waits.
Script figure: \(\lambda=1.5\): the pdf starts at height \(\lambda=1.5\) at \(x=0\) and decays; the cdf rises from 0 towards 1.
(v) Chi-squared distribution \(\chi^2_k=\Gamma(\tfrac k2,\tfrac12)\) Script 1.61(v)
For \(k>0\) (the degrees of freedom), on \(\Omega=\R_{>0}\): \(p(x)=\one_{(0,\infty)}(x)\dfrac1{2^{k/2}\Gamma(k/2)}x^{k/2-1}e^{-x/2}\).
Models: the sum of squares of \(k\) independent standard normals — the backbone of variance-based tests in §3.3. Mine: \(\chi^2_2=\Gamma(1,\tfrac12)=\Exp(\tfrac12)\).
Script figure: \(k=4\): a skewed hump peaking at \(x=2\), height about 0.18.
(vi) Student's t distribution \(t_\nu\) Script 1.61(vi)
For \(\nu>0\), on \(\Omega=\R\):
\[ p(x)=\frac{\Gamma\bigl(\frac{\nu+1}2\bigr)}{\sqrt{\nu\pi}\,\Gamma\bigl(\frac\nu2\bigr)}\Bigl(1+\frac{x^2}\nu\Bigr)^{-\frac{\nu+1}2}. \]Models: heavier-tailed data than the Gaussian; small-sample inference on a mean with unknown variance (the t-test, §3.3). Remark 1.62: \(t_\nu\) is the distribution of the ratio \(Z/\sqrt{V/\nu}\), where \(Z\sim\mathcal N(0,1)\) and \(V\sim\chi^2_\nu\) is independent of \(Z\).
Two special cases worth knowing: \(\nu=1\) gives the Cauchy density \(\frac1{\pi(1+x^2)}\), which has no mean (B4); as \(\nu\to\infty\), \(t_\nu\) approaches \(\mathcal N(0,1)\). Try both in the widget.
Script figure: \(\nu=5\): looks like a bell centred at 0 (peak \(\approx0.38\), slightly below the normal's 0.40) with heavier tails. Like \(\chi^2_k\), it is important in statistical testing.
(vii) Beta distribution \(\mathrm{Beta}(\alpha,\beta)\) Script 1.61(vii)
For \(\alpha,\beta>0\), on \(\Omega=[0,1]\): \(p(x)=\one_{[0,1]}(x)\dfrac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha,\beta)}\).
Models: random proportions — the fraction of defective items in a batch. \(\Unif(0,1)=\mathrm{Beta}(1,1)\). It returns in §3.5 as the standard prior for an unknown probability.
Script figure: \(\alpha=2,\beta=5\): a hump on \([0,1]\) peaking at \(x=\tfrac15\) with height about 2.46.
Remark 1.62 distributions as models Script 1.62
Student's \(t_\nu\) arises as the ratio of a standard normal and the square root of an independent \(\chi^2_\nu/\nu\). Many other continuous distributions — log-normal, Cauchy, Weibull, Pareto, Rayleigh — arise from those above by transformations, mixtures or limits. Real-world accuracy, simplicity, computational feasibility, theoretical guarantees or deliberate ignorance can all justify a modelling choice.
George Box: "Remember that all models are wrong; the practical question is how wrong do they have to be to not be useful." A Gaussian model of height is "wrong" — it gives \(\P(X<0)>0\) and \(\P(X>5\,\mathrm m)>0\) — yet may nail the fraction of people above 1.9 m. A Poisson model of store arrivals with a fixed \(\lambda\) ignores opening hours and lunch rushes. A time-dependent \(\lambda(t)\) fixes that but still ignores sudden rain or the pre-Christmas rush. Adding such covariates \(Z\) via \(\lambda(t,Z)\) still assumes customers arrive independently, so groups of friends are missed. Pushing on ends in simulating weather, the city and finally the universe. "Maybe the \(\Poi(\lambda)\) was actually quite good in answering the question you were originally interested in."
The script also warns: the Box quote is sometimes used to say "don't trust science too much". That is not its intended meaning. It says a model should be judged by whether it answers the question asked.
Computing probabilities with densities Script 1.63
Probabilities for a continuous random variable are computed by integrating its pdf over the region of interest. For \(X\) with pdf \(p_X\), \(\P(a\le X\le b)=\int_a^bp_X(x)\,\mathrm dx\). Below are the script's three applications, each re-derived.
(i) Bus arrival Script 1.63(i)
The bus arrives uniformly between 10:00 and 10:30; you arrive at 10:00. With \(T\sim\Unif(0,30)\) in minutes, \(p_T(t)=\tfrac1{30}\) on \([0,30]\):
\[ \P(0\le T<10)=\int_0^{10}\tfrac1{30}\,\mathrm dt=\tfrac{10}{30}=\tfrac13. \](ii) Component lifetime Script 1.63(ii)
Lifetime \(L\sim\Exp(\lambda)\) with mean 5 years; since the mean of \(\Exp(\lambda)\) is \(1/\lambda\) (used here ahead of §2.1), \(\lambda=0.2\).
\[ \P(L>10)=\int_{10}^\infty0.2\,e^{-0.2l}\,\mathrm dl=\bigl[-e^{-0.2l}\bigr]_{10}^\infty=e^{-2}\approx0.1353. \]Using the survival function directly: \(\P(L>10)=e^{-\lambda\cdot10}=e^{-2}\) — one line. So about a 13.53 % chance that a component lasts more than 10 years.
The script notes that a product developer would now ask follow-up questions: how many returns to expect over time, and how revenue changes if the mean lifetime grew by 6 months (to 5.5 years, i.e. \(\lambda=\tfrac1{5.5}\)).
(iii) Standardised test scores Script 1.63(iii)
\(X\sim\mathcal N(100,15^2)\). Want \(\P(90\le X\le120)=\int_{90}^{120}\tfrac1{15\sqrt{2\pi}}e^{-(x-100)^2/(2\cdot15^2)}\,\mathrm dx\),
which has no closed-form elementary solution; normally we ask a computer (e.g.
scipy.stats.norm.cdf in Python). By hand: standardise \(Z=\frac{X-\mu}\sigma\sim\mathcal N(0,1)\), so the limits
become \(z_1=\frac{90-100}{15}=-\tfrac23\) and \(z_2=\frac{120-100}{15}=\tfrac43\):
Why standardising works — available already now supplied by me; the script defers it to §2.3
\(\P(Z\le z)=\P(X\le\mu+\sigma z)=\int_{-\infty}^{\mu+\sigma z}\frac1{\sqrt{2\pi}\sigma}e^{-(x-\mu)^2/(2\sigma^2)}\,\mathrm dx\). Substitute \(u=(x-\mu)/\sigma\), \(\mathrm dx=\sigma\,\mathrm du\): the upper limit becomes \(z\) and the integrand becomes \(\frac1{\sqrt{2\pi}}e^{-u^2/2}\). So \(\P(Z\le z)=\Phi(z)\), i.e. \(Z\sim\mathcal N(0,1)\). ∎
Here \(\Phi\) is the cdf of \(\mathcal N(0,1)\), read from a table or software, and \(\Phi(-z)=1-\Phi(z)\) by symmetry. About 65.63 % of students score between 90 and 120.
The script asks two good questions in passing and leaves them open; the answers here are mine. Why is this model "wrong"? Test scores are bounded and discrete; the normal is neither. Why is the question still meaningful? Because the probability of the impossible regions is negligible (\(\P(X<0)=\Phi(-6.7)\approx10^{-11}\)), so the model's errors do not touch the question asked.
The cdf method: distributions of \(g(X)\) My addition
A question type that appears on a sheet and in two exams: given \(X\) and a function \(g\), find the distribution of \(Y=g(X)\). The script's general formula (Proposition 2.51) comes in §2.3, but everything needed is already here.
The recipe
- Support. Work out which values \(Y\) can take.
- cdf. For \(y\) in the support, write \(F_Y(y)=\P(g(X)\le y)\) and rewrite the event
\(\{g(X)\le y\}\) as an event about \(X\) — for increasing \(g\), \(\{X\le g^{-1}(y)\}\); for
decreasing \(g\), \(\{X\ge g^{-1}(y)\}\).
Why this is allowed. A continuous strictly increasing \(g\) on an interval has an inverse \(g^{-1}\), and that inverse is again continuous and strictly increasing (Analysis 5.1 proves exactly this). Applying an increasing map to both sides of an inequality does not change its direction, so from \(g(x)\le y\) we get \(x=g^{-1}(g(x))\le g^{-1}(y)\); applying \(g\) to \(x\le g^{-1}(y)\) gets us back to \(g(x)\le g(g^{-1}(y))=y\). The two inequalities describe the same set of \(x\), hence the same event. Increasing example: \(g(u)=u^2\) on \([0,1]\) is strictly increasing with \(g^{-1}(y)=\sqrt y\), so \(u^2\le\tfrac14\iff u\le\tfrac12\) — and the restriction to \([0,1]\) matters, because on all of \(\R\) the same inequality \(u^2\le\tfrac14\) also allows \(u=-\tfrac12\), so there \(g\) is not increasing and the rule does not apply.
Analysis 5.1 is stated for increasing maps, but the decreasing case needs no new theorem: if \(g\) is continuous and strictly decreasing, then \(-g\) is continuous and strictly increasing, so \(-g\) has a strictly increasing inverse, and therefore \(g\) has an inverse too, namely \(g^{-1}(y)=(-g)^{-1}(-y)\), which is strictly decreasing. Applying a decreasing map to both sides of an inequality turns it round, so this time \(g(x)\le y\iff x\ge g^{-1}(y)\). Decreasing example: \(g(u)=-\ln u\) on \((0,1)\) has \(g^{-1}(y)=e^{-y}\), and \(-\ln u\le y\iff u\ge e^{-y}\) — the flip used in WiSe25 P3a below. - Evaluate with \(F_X\).
- pdf. Differentiate (Lemma 1.49(ii)); set 0 off the support.
Why it is safer than the formula: you never have to remember \(|\tfrac{\mathrm d}{\mathrm dy}g^{-1}|\) — the absolute value appears by itself when \(g\) is decreasing, because the inequality flips.
Exercise-sheet tasks
Sheet 4, Exercise 4 — squaring a uniform number Sheet 4 · Ex 4
A real number is chosen uniformly from \([0,1]\) and squared; call the result \(X\). Find (i) the cdf, (ii) the pdf of \(X\), (iii) \(\P(X>\tfrac14)\) — first by intuition.
Setup. \(U\sim\Unif(0,1)\), \(X=U^2\). Support: \([0,1]\).
(i) For \(0\le x\le1\), since squaring is increasing on \([0,1]\),
\[ F_X(x)=\P(U^2\le x)=\P(U\le\sqrt x)=\sqrt x. \]So \(F_X(x)=0\) for \(x<0\), \(\sqrt x\) on \([0,1]\), \(1\) for \(x>1\).
(ii) Differentiate: \(p_X(x)=\dfrac1{2\sqrt x}\) for \(0<x\le1\), and 0 otherwise. Note that \(p_X(x)\to\infty\) as \(x\to0\) — an unbounded density that still has area 1 (\(\int_0^1\tfrac1{2\sqrt x}\,\mathrm dx=[\sqrt x]_0^1=1\)). Squaring small numbers makes them smaller still, crowding mass near 0.
(iii) \(\P(X>\tfrac14)=1-F_X(\tfrac14)=1-\tfrac12=\tfrac12\). Intuition: \(U^2>\tfrac14\iff U>\tfrac12\), which has probability \(\tfrac12\). The event did not change, only its description.
Sheet 5, Exercise 1 — Value at Risk Sheet 5 · Ex 1
A daily percentage return \(R\) has pdf \(p_R(r)=\tfrac2{15}(r+3)\) on \([-3,0)\), \(\tfrac15(2-r)\) on \([0,2]\), 0 otherwise. The \((100\alpha)\%\) VaR is the loss \(L>0\) with \(\P(R\le-L)=\alpha\).
(i) Valid pdf. \(p_R\ge0\) on both pieces. And
\[ \int_{-3}^0\tfrac2{15}(r+3)\,\mathrm dr+\int_0^2\tfrac15(2-r)\,\mathrm dr =\tfrac2{15}\Bigl[\tfrac{r^2}2+3r\Bigr]_{-3}^0+\tfrac15\Bigl[2r-\tfrac{r^2}2\Bigr]_0^2 =\tfrac2{15}\cdot\tfrac92+\tfrac15\cdot2=\tfrac35+\tfrac25=1. \]Picture: a triangle rising from \(-3\) to a peak of height \(0.4\) at \(0\) and falling to \(2\); area \(\tfrac12\cdot5\cdot0.4=1\) ✓ — a two-second check.
(ii) cdf, piece by piece, carrying the mass:
- \(r<-3\): \(F_R(r)=0\).
- \(-3\le r<0\): \(F_R(r)=\int_{-3}^r\tfrac2{15}(t+3)\,\mathrm dt=\tfrac{(r+3)^2}{15}\).
- \(0\le r<2\): \(F_R(r)=F_R(0)+\int_0^r\tfrac15(2-t)\,\mathrm dt=\tfrac9{15}+\tfrac15(2r-\tfrac{r^2}2)=\tfrac{6+4r-r^2}{10}\).
- \(r\ge2\): \(F_R(r)=1\) (check: \(\tfrac{6+8-4}{10}=1\) ✓).
(iii) VaR and quantiles. \(\P(R\le-L)=\alpha\) says \(-L\) is the \(\alpha\)-quantile \(r_\alpha=F_R^{-1}(\alpha)\) — the point with mass \(\alpha\) to its left. So \(\mathrm{VaR}=-r_\alpha=-F_R^{-1}(\alpha)\). (Quantiles are defined formally in Definition 2.20; for a continuous strictly increasing cdf, "the \(q\)-quantile" is just the solution of \(F(x)=q\).)
(iv) 5 % VaR. \(F_R(0)=\tfrac9{15}=0.6>0.05\), so \(r_{0.05}\) lies in \([-3,0)\). Solve \(\tfrac{(r+3)^2}{15}=0.05\): \((r+3)^2=0.75\), \(r=-3\pm\sqrt{0.75}\). Only \(-3+\sqrt{0.75}\approx-2.134\) lies in \([-3,0)\). VaR ≈ 2.134 %.
(v) Median. \(0.5<F_R(0)=0.6\), so again the first piece: \((r+3)^2=7.5\), \(r_{0.5}=-3+\sqrt{7.5}\approx-0.2614\). The median daily return is slightly negative even though the density peaks at 0 — the long left tail pulls it down.
Method to reuse: to find a quantile of a piecewise density, first evaluate the cdf at the breakpoints to see which piece the quantile lies in, then solve on that piece only. And always discard the root that falls outside the piece.
Old-exam tasks
SoSe 2025, Problem 3 — density computations SoSe25 · P3 · 9 credits
\(X\) has pdf \(p_X(x)=\tfrac xc\) on \([0,2]\), 0 otherwise.
a) Find \(c\). \(\int_0^2\tfrac xc\,\mathrm dx=\tfrac1c\cdot\tfrac{4}{2}=\tfrac2c\stackrel!=1\), so \(c=2\). With \(c=2>0\) and \(x\ge0\) on the support, \(p_X\ge0\) ✓.
b) cdf. For \(x\in[0,2]\): \(F_X(x)=\int_0^x\tfrac t2\,\mathrm dt=\tfrac{x^2}4\). So \(F_X(x)=0\) for \(x<0\), \(\tfrac{x^2}4\) on \([0,2]\), \(1\) for \(x>2\).
c) Mean and median. The mean belongs to §2.1; the formula is \(\E[X]=\int x\,p_X(x)\,\mathrm dx\). \(\E[X]=\int_0^2x\cdot\tfrac x2\,\mathrm dx=\tfrac{x^3}6\big|_0^2=\tfrac43\). Median: \(F_X(m)=\tfrac12\iff m^2=2\iff m=\sqrt2\approx1.414\) (the negative root is off the support).
d) pdf of \(Y=\ln X\). The official solution uses the change-of-variables formula given in the hint. The cdf method gives the same without it: \(X\in(0,2]\) almost surely, so \(Y\in(-\infty,\ln2]\). For such \(y\), \(\ln\) is increasing with inverse \(e^{(\cdot)}\) (Analysis 5.2), so
\[ F_Y(y)=\P(\ln X\le y)=\P(X\le e^y)=\frac{e^{2y}}4,\qquad p_Y(y)=F_Y'(y)=\frac{e^{2y}}2\ \ (y\le\ln2), \]and \(p_Y=0\) for \(y>\ln2\). Check: \(\int_{-\infty}^{\ln2}\tfrac{e^{2y}}2\,\mathrm dy=\tfrac{e^{2\ln2}}4=1\) ✓.
My verification: the official answers are all correct. One remark: the official text says "the support of \(X\) is \([0,2]\), so the support of \(Y\) is \((-\infty,\ln2]\)" — strictly, \(\ln0\) is undefined, but \(\P(X=0)=0\), so the point is irrelevant, as explained on B4.
WiSe 25/26, Problem 3a — the exponential from a uniform WiSe25 · P3a · 4 credits
\(U\sim\Unif(0,1)\), \(X=-\tfrac1\lambda\ln U\) for fixed \(\lambda>0\). Derive \(p_X\) and its support.
Support. \(U\in(0,1)\) gives \(\ln U\in(-\infty,0)\), so \(X\in(0,\infty)\).
cdf method. For \(x\ge0\), the map \(u\mapsto-\tfrac1\lambda\ln u\) is decreasing, so the inequality flips:
\[ F_X(x)=\P\bigl(-\tfrac1\lambda\ln U\le x\bigr)=\P(\ln U\ge-\lambda x)=\P(U\ge e^{-\lambda x})=1-e^{-\lambda x}. \]Differentiate: \(p_X(x)=\lambda e^{-\lambda x}\) for \(x\ge0\), 0 otherwise. So \(X\sim\Exp(\lambda)\).
My verification: matches the official solution, which uses the change-of-variables formula with \(g^{-1}(x)=e^{-\lambda x}\) and \(|\tfrac{\mathrm d}{\mathrm dx}g^{-1}|=\lambda e^{-\lambda x}\). Why that formula \(p_Y(y)=p_X(g^{-1}(y))\,|\tfrac{\mathrm d}{\mathrm dy}g^{-1}(y)|\) holds (it is the cdf method done once in general, then differentiated with the chain rule) is shown on B5. The step \(\ln U\ge-\lambda x\iff U\ge e^{-\lambda x}\) applies the increasing map \(e^{(\cdot)}\), the inverse of \(\ln\) (Analysis 5.2).
Why this matters beyond the exam: it is how computers generate exponential random numbers from uniform ones — inverse transform sampling (Remark 2.24). Part (b) of this problem, on memorylessness, is worked on the §1.4 page; part (c) uses the law of the unconscious statistician and belongs to §2.1.
Summary sheet
Definitions
- \(p\ge0\) with \(\int_{\R^n}p=1\); \(\P(A)=\int_Ap\) (Def 1.45, Prop 1.47)
- pdf ↔ cdf
- \(F(x)=\int_{-\infty}^xp\); \(p=F'\) (Lemma 1.49)
- has a pdf
- iff \(\P\ll\lambda^n\) (Thm 1.48); discrete laws never do
- random variable
- measurable \(X:\Omega\to\Omega'\): \(X^{-1}(A')\in\Aa\) (Def 1.50)
- distribution
- \(\P_X=\P\circ X^{-1}\), \(\P_X(A')=\P(X\in A')\) (Def 1.53)
- identically distr.
- same \(\P_X\) ⟺ same cdf (Cor 1.57); spaces may differ
- Gamma
- \(\Gamma(\alpha+1)=\alpha\Gamma(\alpha)\), \(\Gamma(n)=(n-1)!\), \(\Gamma(\tfrac12)=\sqrt\pi\)
The continuous catalogue
| Name | Support | Key fact | |
|---|---|---|---|
| \(\Unif(a,b)\) | \([a,b]\) | \(\frac1{b-a}\) | prob. = length ratio |
| \(\mathcal N(\mu,\sigma^2)\) | \(\R\) | \(\frac1{\sqrt{2\pi}\sigma}e^{-(x-\mu)^2/2\sigma^2}\) | standardise: \(\frac{X-\mu}\sigma\sim\mathcal N(0,1)\) |
| \(\Gamma(\alpha,\beta)\) | \((0,\infty)\) | \(\frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}\) | \(\alpha\) = shape, \(\beta\) = rate |
| \(\Exp(\lambda)\) | \((0,\infty)\) | \(\lambda e^{-\lambda x}\) | \(\P(X>x)=e^{-\lambda x}\) |
| \(\chi^2_k\) | \((0,\infty)\) | \(\Gamma(\tfrac k2,\tfrac12)\) | sum of \(k\) squared std. normals |
| \(t_\nu\) | \(\R\) | see (vi) | heavy tails; \(\nu=1\) is Cauchy |
| \(\mathrm{Beta}(\alpha,\beta)\) | \([0,1]\) | \(\frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha,\beta)}\) | \(\mathrm{Beta}(1,1)=\Unif(0,1)\) |
Exam focus
"Density computations" has been a full exam problem worth 9–11 credits in two of three exams. The pattern never changes:
- normalising constant (integrate, set equal to 1);
- cdf on the whole real line, piece by piece;
- a probability, quantile or median from the cdf;
- the distribution of a transformed variable — use the cdf method and state the support;
- a mean (§2.1) or a memorylessness question (§1.4).
Points are lost for: omitting the "0 otherwise" parts, forgetting to state the support, and taking the wrong root of a quadratic.
Self-test
Section 1.4 · Lecture 5 (20 May 2026)
Product spaces, independence, conditional probability
Produkträume, Unabhängigkeit, bedingte Wahrscheinlichkeit
What this page covers Script §1.4, pp. 43–51
Everything from Convention 1.64 to Definition 1.82. The script's section goal: "Formalize how we can talk about multiple measures (random variables) jointly, what it means for events (random variables) to be independent, and how to condition on events (random variables)."
Worked in place: Sheet 4 Ex 2 and 3, Sheet 5 Ex 2 and 3, and the old-exam tasks SoSe25 P1a, SoSe25 P1d, WiSe25 P3b, WiSe25 P6a, WiSe25 P6b and SoSe26 P5a (randomized response). Sheet 0 Ex 2(iv),(v), 4 and 5 already used conditional probability by counting. They are on the §1.2 page. This page supplies the theory behind them.
The big picture
So far every page looked at one random quantity at a time. Real questions involve several at once: two dice, a test result and a disease, a spelling habit and an author. This page answers three questions about several random quantities.
- How do we describe them together? By one joint distribution that gives a probability to every combination of values. Each quantity on its own is then a marginal. We get it back by adding up (or integrating) over all values of the others.
- How does learning one thing change the probability of another? By conditional probability, \(\P(A\mid B)=\P(A\cap B)/\P(B)\). We throw away every outcome outside \(B\) and rescale what is left so that it sums to 1. Bayes' rule turns \(\P(B\mid A)\) around into \(\P(A\mid B)\).
- When does learning one thing change nothing? When the two are independent. Then the joint probability is the product of the single probabilities. Independent and identically distributed (iid) samples are the standard model of data for the rest of the course.
In words: conditioning means "zoom in on the part of the world where \(B\) happened". Independence means "zooming in on \(B\) does not change the share of \(A\)".
Primer My addition
Cross-references
Cartesian products and tuples: B2. Double integrals and swapping the order of integration (Fubini–Tonelli): B4; your own Analysis guide states Fubini for continuous functions on rectangles in Analysis 9.2. The product σ-algebra of Remark 1.65: B4. The one-dimensional integrals are Analysis 8.3 and 9.1. For Sheet 5 Ex 2 you need the derivative of \(\ln\) and the quotient rule: Analysis 6.3.
Words and symbols this page uses from earlier pages
- Probability space \((\Omega,\Aa,\P)\): \(\Omega\) is the set of all outcomes, \(\Aa\) the collection of events (a σ-algebra), \(\P\) assigns each event a probability in \([0,1]\), with \(\P(\Omega)=1\). See §1.1. A measurable space \((\Omega,\Aa)\) is the same without \(\P\) (§1.1). \(\mathcal B\) is the Borel σ-algebra on \(\R\), the events built from intervals.
- Power set \(\pow(\Omega)\): the set of all subsets of \(\Omega\) (B2). Complement \(A^c=\Omega\setminus A\). \(A\,\dot\cup\,B\) means a union of two disjoint sets.
- Family \((\Omega_i)_{i\in I}\): one object \(\Omega_i\) for each label \(i\) in an index set \(I\) (B2). \([n]:=\{1,\dots,n\}\). \(\prod_{i}\) is a product, like \(\sum_i\) is a sum.
- Random variable \(X\): a (measurable) map from \(\Omega\) to a set of values. Its distribution \(\P_X:=\P\circ X^{-1}\) is the law \(\P_X(S)=\P(X\in S)\), where \(X^{-1}(S)=\{\omega\mid X(\omega)\in S\}\) is the pre-image (§1.3, B2).
- pmf \(p(\omega)=\P(\{\omega\})\) of a discrete law (§1.2); pdf (density) \(p\) with \(\P(X\in B)=\int_Bp(x)\,\mathrm dx\) (§1.3); cdf \(F_X(x)=\P(X\le x)\) (§1.1).
- Named laws: \(\Lap_\Omega\) is the uniform (Laplace) law on a finite \(\Omega\), each outcome with probability \(1/|\Omega|\); \(\Ber(p)\) takes value 1 with probability \(p\) and 0 otherwise (§1.2); \(\Exp(\lambda)\) has density \(\lambda e^{-\lambda x}\) for \(x\ge0\) (§1.3).
- Null set, "almost all": a set of Lebesgue measure (total length/area) zero; "for almost all \(x\)" means "except on such a set" (B4).
- Indicator \(\one_A\): equals 1 on \(A\) and 0 outside (B2).
Reading a double integral over a rectangle
\(\int_{0}^{2}\int_{0}^{1}f(x,y)\,\mathrm dx\,\mathrm dy\) is computed in two steps. First fix \(y\) and integrate \(f(x,y)\) over \(x\in[0,1]\), treating \(y\) as a constant. Then integrate the result over \(y\in[0,2]\). For a non-negative \(f\) the order does not matter (Tonelli).
Over a region that is not a rectangle, the inner limits depend on the outer variable. For the region \(\{0\le x\le ty\}\) you write \(\int_0^\infty\bigl(\int_0^{ty}f(x,y)\,\mathrm dx\bigr)\mathrm dy\). SoSe25 P1d is exactly this.
Product spaces and joint distributions
Picture first. Roll two dice. One outcome is a pair such as \((3,5)\): the first slot holds the first die, the second slot the second die. The set of all such pairs is \([6]\times[6]\), 36 pairs. A product space is this idea for any number of slots, each with its own set of possible values.
Convention 1.64 — assumptions, Cartesian product Script 1.64
Throughout this section \((\Omega,\Aa,\P)\) is a probability space. \((\Omega_i,\Aa_i)_{i\in I}\) is a family of measurable spaces, for a non-empty index set \(I\). Each \(X_i\) is a random variable with values in \((\Omega_i,\Aa_i)\).
The product space or Cartesian product [kartesisches Produkt] \(\Omega_I:=\prod_{i\in I}\Omega_i\) is the set of all maps \((\omega_i)_{i\in I}:I\to\bigcup_{i\in I}\Omega_i\) with \(\omega_i\in\Omega_i\) for every \(i\in I\). If all \(\Omega_i\) are equal to one set \(\Omega\), we write \(\Omega^I\). If \(n:=|I|<\infty\), we write \(\Omega^n\).
The script's intuition: the elements are "tuples with one slot for each element of \(I\)", and each slot \(i\) can be filled with any element of \(\Omega_i\). A tuple is written as a map "label \(i\) \(\mapsto\) entry \(\omega_i\)". This is what lets the definition handle infinite \(I\) as well, for example infinitely many coin tosses \(\{0,1\}^{\N}\).
Example. \(I=\{1,2\}\), \(\Omega_1=[6]\), \(\Omega_2=\{H,T\}\) (a die and a coin). Then \(\Omega_I\) has the \(6\cdot2=12\) elements \((1,H),(1,T),\dots,(6,T)\).
Remark 1.65 product σ-algebras and product measures Script 1.65
So far we had one probability space at a time. On the product \(\Omega_I\) there is a natural, unique product σ-algebra \(\Aa_I:=\bigotimes_{i\in I}\Aa_i\). If each factor also carries a probability measure \(\P_i\), there is a natural, unique product measure \(\P_I:=\bigotimes_{i\in I}\P_i\). Together they form the product probability space \(\bigl(\prod_i\Omega_i,\bigotimes_i\Aa_i,\bigotimes_i\P_i\bigr)=(\Omega_I,\Aa_I,\P_I)\).
What "product σ-algebra" means concretely (my addition): for finitely many factors it is the smallest σ-algebra on \(\Omega_1\times\cdots\times\Omega_n\) that contains every "box" \(A_1\times\cdots\times A_n\) with \(A_i\in\Aa_i\) — i.e. we declare all boxes to be events and then add exactly what the σ-algebra rules (complements, countable unions) force us to add. "Smallest σ-algebra containing a given collection" is the generated σ-algebra \(\sigma(\cdot)\) of Lemma 1.8, here applied to the collection of all boxes; in symbols \(\Aa_1\otimes\cdots\otimes\Aa_n=\sigma\bigl(\{A_1\times\cdots\times A_n\mid A_i\in\Aa_i\}\bigr)\). Example: for two dice with \(\Aa_1=\Aa_2=\pow([6])\), every one-element set \(\{(a,b)\}\) is already a box, namely \(\{a\}\times\{b\}\); every subset of \([6]^2\) is a union of finitely many one-element sets, and a σ-algebra is closed under unions, so here the product σ-algebra is all of \(\pow([6]^2)\). Details, including an example where the product σ-algebra is not everything: B4.
This construction lets us talk about "joint probability spaces" and "joint distributions" of any (finite) set of random variables. (The script notes that it silently moved from spaces to random variables here.) In practice we mostly need two cases: products of discrete random variables, and products of real-valued ones. For the real case it turns out that \(\bigotimes_{i=1}^n\mathcal B=\mathcal B^n\), the Borel σ-algebra of \(\R^n\) — the one generated by the open boxes \((a_1,b_1)\times\cdots\times(a_n,b_n)\) (Example 1.13, §1.1). The script states this equality without proof; half of the argument is written out in B4. So the joint law of \(n\) real random variables can be described by a joint density \(p:\R^n\to\R_{\ge0}\).
What "product measure" means concretely: it is the unique measure with \(\P_I(A_1\times\cdots\times A_n)=\P_1(A_1)\cdots\P_n(A_n)\) for all "boxes" \(A_1\times\cdots\times A_n\). So the product measure is the joint law of independent components (Definition 1.77 below). That is why it matters on this page.
Definition 1.66 joint and marginal distribution Script 1.66
Bundle all variables into one: \(X:=(X_i)_{i\in I}\). This \(X\) is itself a random variable with values in \((\Omega_I,\Aa_I)\). Its distribution \(\P_X:=\P\circ X^{-1}\) is called the joint distribution [gemeinsame Verteilung] of the family \((X_i)_{i\in I}\). For each \(i\), the distribution \(\P_{X_i}=\P\circ X_i^{-1}\) of the single variable is called the marginal distribution [Randverteilung] of \(X_i\) with respect to \(\P_X\).
The key asymmetry. The joint law determines every marginal (Theorem 1.68). The marginals do not determine the joint law. Example: two fair coins that always show the same face, and two independent fair coins. In both cases each coin alone is fair, so the marginals are identical. But \(\P(\text{both }1)\) is \(\tfrac12\) in the first case and \(\tfrac14\) in the second. What the marginals miss is how the variables depend on each other.
Example 1.67 product pmf and product pdf Script 1.67
Let \(p_1,\dots,p_n\) be pmfs on \(\Omega\) (\(n\ge1\)). The product pmf on \(\Omega^n\) is \(p(\omega):=\prod_{i\in[n]}p_i(\omega_i)\) for \(\omega=(\omega_i)_{i\in[n]}\in\Omega^n\).
Let \(p_1,\dots,p_n\) be pdfs on \(\R\). The product pdf on \(\R^n\) is \(p(x):=\prod_{i\in[n]}p_i(x_i)\) for \(x=(x_i)_{i\in[n]}\in\R^n\).
The script: "Intuitively, taking the joint of a finite collection of measures on the same space is represented by the product of the respective pmfs or pdfs."
Example. Two fair dice: \(p(\omega_1,\omega_2)=\tfrac16\cdot\tfrac16=\tfrac1{36}\). This is the Laplace distribution on \([6]^2\) from Sheet 0 Ex 1: it is exactly the product of two single-die laws.
Why the product is again a pmf: sum over all tuples and pull the sums apart (distributivity, the rule \((a+b)(c+d)=ac+ad+bc+bd\) read backwards): \(\sum_{\omega_1}\cdots\sum_{\omega_n}p_1(\omega_1)\cdots p_n(\omega_n)=\bigl(\sum_{\omega_1}p_1(\omega_1)\bigr)\cdots\bigl(\sum_{\omega_n}p_n(\omega_n)\bigr)=1\cdot\ldots\cdot1=1\). For pdfs the same works with integrals and Fubini.
Theorem 1.68 computing marginals Script 1.68
Let \(I=[n]\) and \(X=(X_i)_{i\in[n]}\).
- If all \(X_i\) are real-valued with joint cdf \(F_X(x)=\P(X_1\le x_1,\dots,X_n\le x_n)\) for \(x\in\R^n\), the marginal cdf of \(X_i\) is obtained by sending every other argument to \(+\infty\): \[ F_{X_i}(x_i)=\lim_{x_1\to\infty}\cdots\lim_{x_{i-1}\to\infty}\lim_{x_{i+1}\to\infty}\cdots\lim_{x_n\to\infty}F_X(x_1,\dots,x_n)\quad\text{for all }x_i\in\R. \]
- If \(X\) is discrete with joint pmf \(p_X:\prod_{i=1}^n\Omega_i\to[0,1]\), each \(X_i\) is discrete with marginal pmf \[ p_{X_i}(\omega_i)=\sum_{\omega_1\in\Omega_1}\cdots\sum_{\omega_{i-1}\in\Omega_{i-1}}\sum_{\omega_{i+1}\in\Omega_{i+1}}\cdots\sum_{\omega_n\in\Omega_n}p_X(\omega_1,\dots,\omega_n). \] In short: sum out every other coordinate.
- If \(X\) is continuous with joint pdf \(p_X:\R^n\to\R_{\ge0}\), each \(X_i\) is continuous with marginal pdf \[ p_{X_i}(x_i)=\int_\R\cdots\int_\R p_X(x_1,\dots,x_n)\,\mathrm dx_n\cdots\mathrm dx_{i+1}\,\mathrm dx_{i-1}\cdots\mathrm dx_1. \] In short: integrate out every other coordinate.
Example for (ii) mine. The two coins that always agree have \(p_X(0,0)=p_X(1,1)=\tfrac12\) and \(p_X(0,1)=p_X(1,0)=0\). Then \(p_{X_1}(0)=p_X(0,0)+p_X(0,1)=\tfrac12+0=\tfrac12\). The independent coins give \(p_{X_1}(0)=\tfrac14+\tfrac14=\tfrac12\) too — the same marginal from a different joint law.
Proofs supplied by me — the script gives none
(ii) The event \(\{X_i=\omega_i\}\) splits into the events \(\{X=(\omega_1,\dots,\omega_n)\}\), one for each choice of the other coordinates. These events are disjoint: a tuple has exactly one value in each other slot. There are countably many of them. So σ-additivity (probability of a countable disjoint union = sum of probabilities) gives the sum.
(iii) For any \(t\), \(\P(X_i\le t)=\int_{\{x_i\le t\}}p_X(x)\,\mathrm dx\). By Fubini (B4) we may do the \(x_i\)-integral last: \(\P(X_i\le t)=\int_{-\infty}^t\Bigl(\int\cdots\int p_X\prod_{j\ne i}\mathrm dx_j\Bigr)\mathrm dx_i\). So the inner bracket, integrated up to \(t\), gives the cdf of \(X_i\) for every \(t\). The cdf determines the whole law (Theorem 1.25), so \(\P(X_i\in B)=\int_B(\text{bracket})\,\mathrm dx_i\) for every event \(B\): the bracket is a density of \(X_i\).
(i) Take the innermost limit first: \(x_n\to\infty\), with all other arguments fixed. For \(m=1,2,\dots\) the events \(\{X_1\le x_1,\dots,X_{n-1}\le x_{n-1},\ X_n\le m\}\) grow with \(m\). Their union is \(\{X_1\le x_1,\dots,X_{n-1}\le x_{n-1}\}\), because every real number \(X_n(\omega)\) is below \(m\) once \(m\) is large enough. Continuity from below (Proposition 1.19(iv)) gives the limit along \(m=1,2,\dots\). Since \(F_X\) can only grow when \(x_n\) grows, the limit over all real \(x_n\to\infty\) is the same. So this limit simply deletes the condition \(X_n\le x_n\). Each further limit deletes one more condition, until only \(\{X_i\le x_i\}\) is left, whose probability is \(F_{X_i}(x_i)\). ∎
In words: to forget a variable, add up over all the values it could have taken.
Conditional probability
Picture first. Roll one die. Someone tells you "the number is even". Now only \(2,4,6\) are possible, each equally likely. The chance of a six has changed from \(\tfrac16\) to \(\tfrac13\). Conditional probability is the rule behind this update.
Definition 1.69 conditional probability Script 1.69
For events \(A,B\in\Aa\) with \(\P(B)>0\),
\[ \P(A\mid B):=\frac{\P(A\cap B)}{\P(B)} \]is the conditional probability of \(A\) given \(B\) [bedingte Wahrscheinlichkeit].
Reading it. Knowing that \(B\) happened removes every outcome outside \(B\). What remains has total probability \(\P(B)\). The part of it where \(A\) also holds has probability \(\P(A\cap B)\). Dividing by \(\P(B)\) rescales the remaining part to total 1. For a Laplace (uniform) law this is \(|A\cap B|/|B|\): count only inside \(B\). That is what Sheet 0 did.
Example. One die, \(A=\{6\}\), \(B=\{2,4,6\}\): \(\P(A\mid B)=\frac{\P(\{6\})}{\P(\{2,4,6\})}=\frac{1/6}{1/2}=\frac13\).
Why \(\P(B)>0\): otherwise we divide by 0. Conditioning on an event of probability 0 (such as \(\{X=x\}\) for a continuous \(X\)) needs the density version, Definition 1.78(ii).
\(\P(A\mid B)\) and \(\P(B\mid A)\) are different numbers SoSe25 · P1a
Exam statement: "Let \(A,B\in\Aa\) with \(\P(A)>0\), \(\P(B)>0\). Then \(\P(A\mid B)=\P(B\mid A)\)." False.
Official counterexample: \(\Omega=\{0,1\}\), \(\Aa=\pow(\Omega)\), \(\P\) Laplace, \(A=\{0,1\}\), \(B=\{0\}\). Then \(A\cap B=\{0\}\), so \(\P(A\mid B)=\frac{\P(A\cap B)}{\P(B)}=\frac{1/2}{1/2}=1\) but \(\P(B\mid A)=\frac{\P(A\cap B)}{\P(A)}=\frac{1/2}{1}=\frac12\).
My verification: correct. In words: given that the coin shows 0, it certainly shows "0 or 1". Given "0 or 1", it shows 0 only half the time.
The exact relation: both have the numerator \(\P(A\cap B)\). So \(\P(A\mid B)\,\P(B)=\P(B\mid A)\,\P(A)\). If \(\P(A\cap B)>0\), the two agree if and only if \(\P(A)=\P(B)\). Mixing them up is the "prosecutor's fallacy": the probability of the evidence given innocence is not the probability of innocence given the evidence. Bayes' rule below turns one into the other correctly.
Theorem 1.70 total probability and Bayes' rule Script 1.70
Let \(B\in\Aa\) with \(\P(B)>0\), and let \(I\) be a countable index set.
- The map \(\tilde\P:\Aa\to[0,1]\), \(A\mapsto\tilde\P(A):=\P(A\mid B)\) is a probability measure on \((\Omega,\Aa)\). The probability space \((B,\Aa|_B,\tilde\P|_B)\) is called the trace [Spur] of \((\Omega,\Aa,\P)\) on \(B\).
- Let \(\{B_i\mid i\in I\}\subseteq\Aa\) be a measurable partition of \(B\): the \(B_i\) are events, \(\bigcup_{i\in I}B_i=B\), and \(B_i\cap B_j=\emptyset\) for \(i\ne j\). Then for all \(A\in\Aa\) the law of total probability [Satz von der totalen Wahrscheinlichkeit] holds: \[ \P(A\cap B)=\sum_{i\in I}\P(A\mid B_i)\,\P(B_i). \]
- For each \(A\in\Aa\) with \(\P(A)>0\) and every measurable partition \(\{B_i\mid i\in I\}\) of \(\Omega\) with \(\P(B_i)>0\) for all \(i\), Bayes' rule [Satz von Bayes] holds: \[ \P(B_i\mid A)=\frac{\P(A\mid B_i)\,\P(B_i)}{\sum_{j\in I}\P(A\mid B_j)\,\P(B_j)}\qquad\text{for all }i\in I. \]
Notation in (i): \(\Aa|_B:=\{A\cap B\mid A\in\Aa\}\) are the events cut down to \(B\), and \(\tilde\P|_B\) is \(\tilde\P\) used only on those. The trace is "the world \(B\) as a probability space of its own".
Note on (ii): with \(B=\Omega\) it becomes the familiar \(\P(A)=\sum_i\P(A\mid B_i)\P(B_i)\): "average the conditional probabilities, weighted by how likely each case is". Each \(\P(B_i)>0\) is needed for \(\P(A\mid B_i)\) to be defined. The script states this assumption only in (iii); in (ii) it is implicit.
Proofs Sheet 4 · Ex 2
(i) Check the four axioms of a probability measure for \(\tilde\P(A)=\P(A\cap B)/\P(B)\). (1) \(\tilde\P(\emptyset)=\P(\emptyset\cap B)/\P(B)=\P(\emptyset)/\P(B)=0\). (2) \(\tilde\P(A)\ge0\), because \(\P(A\cap B)\ge0\) and \(\P(B)>0\). (3) σ-additivity: take pairwise disjoint \(A_1,A_2,\dots\). Then the sets \(A_n\cap B\) are pairwise disjoint too, and \((\bigcup_nA_n)\cap B=\bigcup_n(A_n\cap B)\) (distributive law for sets, also for countably many sets: B2). So \(\tilde\P(\bigcup_nA_n)=\frac{\sum_n\P(A_n\cap B)}{\P(B)}=\sum_n\tilde\P(A_n)\). (4) \(\tilde\P(\Omega)=\P(\Omega\cap B)/\P(B)=\P(B)/\P(B)=1\). ✓
(ii) By Definition 1.69, \(\P(A\mid B_i)\P(B_i)=\P(A\cap B_i)\). The sets \(A\cap B_i\) are pairwise disjoint, because the \(B_i\) are. Their union is \(A\cap\bigcup_iB_i=A\cap B\). σ-additivity gives \(\sum_i\P(A\cap B_i)=\P(A\cap B)\). ✓
(iii) By definition \(\P(B_i\mid A)=\P(B_i\cap A)/\P(A)\). Numerator: \(\P(B_i\cap A)=\P(A\mid B_i)\P(B_i)\) by Definition 1.69. Denominator: (ii) with \(B=\Omega\) gives \(\P(A)=\P(A\cap\Omega)=\sum_j\P(A\mid B_j)\P(B_j)\). ✓ ∎
Why (i) matters: every rule proved for probability measures also holds for \(\P(\cdot\mid B)\). For example \(\P(A^c\mid B)=1-\P(A\mid B)\), and inclusion–exclusion works under conditioning. No extra proof is needed.
In words: to get the probability of \(A\), split the world into cases, find the chance of \(A\) in each case, and average with the case weights. Bayes' rule then asks: of all the ways \(A\) could happen, what share went through case \(B_i\)?
Lemma 1.71 trivial factorisation (chain rule) Script 1.71
For events \(A_1,\dots,A_{n+1}\in\Aa\) with \(\P(\bigcap_{i\in[n]}A_i)>0\):
\[ \P\Bigl(\bigcap_{i\in[n+1]}A_i\Bigr)=\P(A_1)\,\P(A_2\mid A_1)\,\P(A_3\mid A_1\cap A_2)\cdots\P\Bigl(A_{n+1}\Bigm|\bigcap_{i\in[n]}A_i\Bigr). \]What it is: the formal version of "multiply along a branch of a tree diagram". It answers the question from the script's motivation: why may we multiply the probabilities of successive steps? It is called trivial because the proof is one line.
Proof supplied by me
First, every conditioning event has positive probability. For \(k\le n\) we have \(\bigcap_{i\le k}A_i\supseteq\bigcap_{i\le n}A_i\) (fewer conditions, bigger set). Monotonicity gives \(\P(\bigcap_{i\le k}A_i)\ge\P(\bigcap_{i\le n}A_i)>0\).
Now write each factor on the right as a ratio (Definition 1.69). Each numerator cancels the next denominator (the product "telescopes"):
\[ \P(A_1)\cdot\frac{\P(A_1\cap A_2)}{\P(A_1)}\cdot\frac{\P(A_1\cap A_2\cap A_3)}{\P(A_1\cap A_2)}\cdots\frac{\P(\bigcap_{i\le n+1}A_i)}{\P(\bigcap_{i\le n}A_i)}=\P\Bigl(\bigcap_{i\le n+1}A_i\Bigr). \;∎ \]Example 1.40(ii) redone by conditioning — as the script promised My addition
Five exercises go to five students. \(A_1\) = "the first student gets exercise 1", \(A_2\) = "the last student gets exercise 5". \(\P(A_1)=\tfrac15\). Given \(A_1\), exercise 5 is one of the 4 remaining exercises, and the last student is equally likely to get any of them: \(\P(A_2\mid A_1)=\tfrac14\). So \(\P(A_1\cap A_2)=\tfrac15\cdot\tfrac14=\tfrac1{20}\). This equals the counting answer \(\tfrac{3!}{5!}=\tfrac{6}{120}\).
Example 1.72 Bayes' rule: who fabricated the results? Script 1.72
Story. You and a friend write a report together in a shared document. Someone added fabricated results from an anonymous account; only the two of you worked on it. The section uses British spelling. From the existing text: you wrote 70 % of it, your friend 30 %. You use British spelling in 90 % of your text, your friend in only 20 %. How likely is it that you wrote the fabricated part?
Model (the script adds: "and we can argue about it!"). Two random variables: \(A\) = author, with values in \(\{y,f\}\) (you, friend), and \(S\) = spelling, with values in \(\{uk,us\}\). The sample space is \(\Omega=\{y,f\}\times\{uk,us\}\) with σ-algebra \(\pow(\Omega)\). \(\P\) is the joint distribution of \((A,S)\). We know the marginal of \(A\): \(\P_A(\{y\})=0.7\), \(\P_A(\{f\})=0.3\). (Here \(A\) is the author variable, not an event.)
To write the information as conditional probabilities we name three events: \(E_Y=\{(y,us),(y,uk)\}\) "you wrote it", \(E_F=\{(f,us),(f,uk)\}\) "your friend wrote it", \(E_{UK}=\{(y,uk),(f,uk)\}\) "British spelling was used". Given: \(\P(E_Y)=0.7\), \(\P(E_F)=0.3\), \(\P(E_{UK}\mid E_Y)=0.9\), \(\P(E_{UK}\mid E_F)=0.2\). We want \(\P(E_Y\mid E_{UK})\).
Step 1 — total probability (Theorem 1.70(ii); \(\{E_Y,E_F\}\) is a partition of \(\Omega\), since every outcome has exactly one author):
\[ \P(E_{UK})=\P(E_{UK}\mid E_Y)\P(E_Y)+\P(E_{UK}\mid E_F)\P(E_F)=0.9\cdot0.7+0.2\cdot0.3=0.63+0.06=0.69. \]Step 2 — Bayes' rule (Theorem 1.70(iii)):
\[ \P(E_Y\mid E_{UK})=\frac{\P(E_{UK}\mid E_Y)\P(E_Y)}{\P(E_{UK})}=\frac{0.63}{0.69}\approx0.913. \]The evidence moved the belief from 70 % to 91.3 %. The script's closing line: "Now don't fabricate results again!"
Remark 1.73 Bayesian inference Script 1.73
(i) Bayes' rule is often read as a rule for updating beliefs when new evidence arrives. \(A\) is the event of interest and \(B\) the evidence (\(\{A,A^c\}\) is the partition):
\[ \underbrace{\P(A\mid B)}_{\text{posterior}}=\frac{\overbrace{\P(B\mid A)}^{\text{likelihood}}\cdot\overbrace{\P(A)}^{\text{prior}}}{\underbrace{\P(B\mid A)\P(A)+\P(B\mid A^c)\P(A^c)}_{\text{marginal likelihood / total evidence}}}. \]In Example 1.72: the prior belief that you wrote it was \(\P(E_Y)=0.7\). The evidence (British spelling) has a high likelihood for you, \(\P(E_{UK}\mid E_Y)=0.9\). The updated belief, the posterior, is \(\P(E_Y\mid E_{UK})\approx0.913\).
(ii) In Bayesian inference one often sees the version
\[ p(\theta\mid D)=\frac{p(D\mid\theta)\,p(\theta)}{p(D)}. \]Here \(\theta\) are model parameters we want to infer and \(D\) is the observed data. The ingredients: a prior \(p(\theta)\) over models (often chosen "uninformative", or so that simple models are preferred); the likelihood \(p(D\mid\theta)\), how likely the data \(D\) are if \(\theta\) is the truth; and \(p(D)\), the overall probability of the data. Bayes' rule gives the posterior \(p(\theta\mid D)\): how probable each \(\theta\) is, given the data. In practice \(p(D)\) is often the hard part. Much can still be done from \(p(\theta\mid D)\propto p(D\mid\theta)\,p(\theta)\) ("\(\propto\)" means "proportional to", i.e. equal up to a constant factor). In this sense \(p(D)\) is just a "normalising constant". More in §3.5.
Independence
Picture first. Toss a coin and roll a die. Learning that the coin shows heads tells you nothing about the die. In numbers: \(\P(\text{six}\mid\text{heads})=\P(\text{six})=\tfrac16\). By Definition 1.69 this says \(\P(\text{six}\cap\text{heads})/\P(\text{heads})=\P(\text{six})\), i.e. \(\P(\text{six}\cap\text{heads})=\P(\text{six})\,\P(\text{heads})=\tfrac1{12}\). The definition uses this product form.
Definition 1.74 independent events Script 1.74
- Two events \(A,B\in\Aa\) are independent [unabhängig] (under \(\P\)), written \(A\perp\!\!\!\perp B\), if \(\P(A\cap B)=\P(A)\P(B)\).
- A family \((A_i)_{i\in I}\) of events is independent (under \(\P\)), written \(\perp\!\!\!\perp_{i\in I}A_i\), if for each finite subset \(J\subseteq I\): \(\P(\bigcap_{j\in J}A_j)=\prod_{j\in J}\P(A_j)\).
Link to conditioning: if \(\P(B)>0\), independence is equivalent to \(\P(A\mid B)=\P(A)\) (divide the definition by \(\P(B)\)). So learning \(B\) does not change the probability of \(A\). The product form is used as the definition because it also makes sense when \(\P(B)=0\), and because it is symmetric in \(A\) and \(B\).
Read (ii) carefully: for three events it demands four equations: one for each of the three pairs, and one for the triple. Example 1.75 shows that the triple does not follow from the pairs.
Three consequences worth knowing My addition
- Complements. If \(A\perp\!\!\!\perp B\), then also \(A\perp\!\!\!\perp B^c\), \(A^c\perp\!\!\!\perp B\) and \(A^c\perp\!\!\!\perp B^c\). Proof of the first: \(A\) splits into the disjoint parts \(A\cap B\) and \(A\cap B^c\), so \(\P(A\cap B^c)=\P(A)-\P(A\cap B)=\P(A)-\P(A)\P(B)=\P(A)\bigl(1-\P(B)\bigr)=\P(A)\P(B^c)\). The others follow by swapping the roles of \(A\) and \(B\) and repeating.
- Disjoint is not independent — it is the opposite. If \(A\cap B=\emptyset\), then \(\P(A\cap B)=0\). So \(A\perp\!\!\!\perp B\) would force \(\P(A)=0\) or \(\P(B)=0\). Two disjoint events of positive probability are always dependent: if one happened, the other did not.
- Null and certain events are independent of every event. If \(\P(N)=0\), then \(0\le\P(A\cap N)\le\P(N)=0=\P(A)\P(N)\). If \(\P(C)=1\), then \(C^c\) is a null event, so \(A\perp\!\!\!\perp C^c\), and by point 1 also \(A\perp\!\!\!\perp C\).
Example 1.75 pairwise independence does not imply independence Script 1.75
\(\Omega=\{\circ,\triangle,\square,\star\}\) with the uniform law on \(\pow(\Omega)\), each symbol with probability \(\tfrac14\). Let \(A=\{\circ,\triangle\}\), \(B=\{\circ,\square\}\), \(C=\{\circ,\star\}\). Each has probability \(\tfrac12\). Each pairwise intersection is \(\{\circ\}\), with probability \(\tfrac14=\tfrac12\cdot\tfrac12\). So the three events are pairwise independent. But
\[ \P(A\cap B\cap C)=\P(\{\circ\})=\tfrac14\ne\tfrac18=\P(A)\P(B)\P(C). \]So they are not independent as a family. The reverse does hold: an independent family is pairwise independent (take \(|J|=2\) in the definition).
Intuition: any one of the events says nothing about any other one. But knowing both \(A\) and \(B\) pins the outcome to \(\circ\), and that forces \(C\).
Example 1.76 independence despite "dependence" Script 1.76
Two distinct fair dice: \(\Omega=[6]^2\), σ-algebra \(\pow(\Omega)\), \(\P=\Lap_\Omega\). Let \(A=\{(i,j)\in\Omega\mid i+j=7\}\) ("the dice sum to 7") and \(B=\{(i,j)\in\Omega\mid i=6\}\) ("the first die shows 6"). Then \(|A|=|B|=6\) and \(A\cap B=\{(6,1)\}\). So \(\P(A\cap B)=\tfrac1{36}=\tfrac16\cdot\tfrac16=\P(A)\P(B)\): the events are independent. Yet intuitively the sum seems to "depend on" what the first die shows.
The script: "Independence is not equivalent to things that don't have anything to do with one another." It is an equality of numbers, nothing more.
Check: replace 7 by 8. Still \(A\cap B=\{(6,2)\}\), but now \(|A|=5\), and \(\tfrac1{36}\ne\tfrac5{36}\cdot\tfrac16\): dependent. The sum 7 is special because every value of the first die has exactly one partner that makes 7.
Definition 1.77 independence of random variables Script 1.77
- A family \((X_i)_{i\in I}\) of real-valued random variables is independent if for each finite \(J\subseteq I\) and all \(x_j\in\R\) (\(j\in J\)): \(\P(\bigcap_{j\in J}\{X_j\le x_j\})=\prod_{j\in J}\P(X_j\le x_j)\). For \(I=[n]\): \(X_1,\dots,X_n\) are independent if and only if for all \(x\in\R^n\) \(F_{(X_1,\dots,X_n)}(x_1,\dots,x_n)=\prod_{i\in[n]}F_{X_i}(x_i)\). We say the cdf factorises.
- If all \(\Omega_i\) are discrete, the random variables \(X_1,\dots,X_n\) are independent if for all tuples \(s=(s_1,\dots,s_n)\in\prod_{i\in[n]}\Omega_i\): \(p_{(X_1,\dots,X_n)}(s)=\prod_{i\in[n]}p_{X_i}(s_i)\). We say the pmf factorises.
- For a continuous random vector \((X_1,\dots,X_n)\), the \(X_i\) are independent if \(p_X(x)=\prod_{i\in[n]}p_{X_i}(x_i)\) for Lebesgue-almost all \(x\in\R^n\), i.e. everywhere except on a set of Lebesgue measure zero. We say the pdf factorises.
Example. Two fair dice with the product pmf of Example 1.67: \(p(\omega_1,\omega_2)=\tfrac1{36}=\tfrac16\cdot\tfrac16=p_{X_1}(\omega_1)p_{X_2}(\omega_2)\) in every cell, so \(X_1\perp\!\!\!\perp X_2\).
What it means: every event about \(X_i\) is independent of every event about \(X_j\). The joint law is the product measure of the marginals (Remark 1.65).
How to use it mine: independence is almost always an assumption of the model ("the matches do not influence each other"). Its payoff: you may multiply. To disprove it, find one cell with \(p(x,y)\ne p_X(x)p_Y(y)\). A zero in the joint table where both marginals are positive is an instant witness. See the "min and max" preset in the widget above.
Definition 1.78 conditional cdf, pmf, pdf Script 1.78
Let \(X,Y\) be random variables with values in \((\Omega,\Aa)\) and \((\Omega',\Aa')\), and let \(\P\) be their joint distribution (a law on \(\Omega\times\Omega'\)).
- Discrete \(\Omega,\Omega'\), with \(\P(\{X=x\})>0\), where \(\{X=x\}:=\{(x',y')\in\Omega\times\Omega'\mid x'=x\}\) (all pairs whose first entry is \(x\)). The conditional pmf of \(Y\) given \(X=x\) is \(p_{Y|X=x}(y)=\dfrac{\P(\{X=x\}\cap\{Y=y\})}{\P(X=x)}\).
- Continuous \(\Omega,\Omega'\), with \(X,Y\) having a density (with respect to Lebesgue measure), and \(x\in\R\) with \(p_X(x)>0\). The conditional pdf of \(Y\) given \(X=x\) is \(p_{Y|X=x}(y)=\dfrac{p_{X,Y}(x,y)}{p_X(x)}\).
Reading (i). It is Definition 1.69 with \(A=\{Y=y\}\) and \(B=\{X=x\}\). In a joint table: take the row of \(x\) and divide it by its row sum. Example: two dice, \(X=X_1\) and \(S=X_1+X_2\). Given \(X_1=6\), the sum is one of \(7,\dots,12\), each with \(p_{S|X_1=6}(s)=\frac{1/36}{1/6}=\frac16\).
Reading (ii). Here \(\P(X=x)=0\), so Definition 1.69 cannot be used. The formula is its density analogue. Take the slice of the joint density along \(X=x\) and rescale it to area 1. The rescaling constant is the marginal \(p_X(x)=\int p_{X,Y}(x,y)\,\mathrm dy\). Probabilities given \(X=x\) are then \(\P(Y\in B\mid X=x)=\int_Bp_{Y|X=x}(y)\,\mathrm dy\).
Note: the title also names the conditional cdf. The script gives no separate formula; it is the cdf of the conditional law, \(F_{Y|X=x}(y)=\sum_{y'\le y}p_{Y|X=x}(y')\) or \(\int_{-\infty}^yp_{Y|X=x}(u)\,\mathrm du\) (Convention 1.81 below).
Independence again: if \(X\perp\!\!\!\perp Y\), then \(p_{Y|X=x}=p_Y\) for every \(x\): the joint factorises, and the factor \(p_X(x)\) cancels. All slices have the same shape.
Definition 1.79 iid Script 1.79
Random variables \(X_1,\dots,X_n\) (or an infinite sequence \(X_1,X_2,\dots\)) are independent and identically distributed (iid) [unabhängig und identisch verteilt, u.i.v.] if they are independent and all have the same distribution \(\P_X\). We write \(X_i\overset{\text{iid}}{\sim}\P\). The script: "each random variable is a sample from the same underlying probability distribution, and the outcome of one does not influence the outcome of any other."
Joint law of an iid sample: the product pmf/pdf, \(p(x_1,\dots,x_n)=\prod_ip(x_i)\) (Example 1.67 with all \(p_i\) equal). It becomes the likelihood function of §3.1.
Remark 1.80 the centrality of the iid assumption Script 1.80
The iid assumption is one of the most used assumptions in probability, statistics and machine learning. Five reasons:
- Simpler models: the likelihood of iid data is a product, \(L(\theta\mid x_1,\dots,x_n)=\prod_{i=1}^np(x_i\mid\theta)\), which is much easier to work with, e.g. to maximise (maximum likelihood estimation, §3.2).
- Foundation for asymptotic theory: the laws of large numbers and the central limit theorem are usually stated and proved for iid sequences (§2.4). They explain why sample means converge to true means and are approximately normally distributed.
- Benchmark: even when iid is known to fail (time series with dependence over time, clustered data), it serves as the baseline model.
- Standard data collection: drawing a simple random sample from a large, stable population (e.g. to estimate an average height or the share of voters for a candidate) is idealised as iid.
- Machine learning: training data \(\{(x_1,y_1),\dots,(x_n,y_n)\}\) are assumed to be iid from an unknown joint law \(\P_{X,Y}\). Guarantees such as generalisation bounds (how well a model trained on a finite sample does on new data) rest on this.
Why data points are treated as random variables. A dataset \(x_1,\dots,x_n\) is fixed numbers, the ones actually observed. But statistics asks about "all the other datasets we could have observed". Example: you estimate the average height from 100 people drawn uniformly at random. How close is your estimate to the truth? Imagine repeating the experiment 1000 times, each time with 100 new random people. You get 1000 estimates. Their spread (variance) shows how far a single estimate may be from the true value. To formalise this, treat each measurement as a random variable \(X_i\) before it is taken — "acting as if I knew there was a measurement for person \(i\) to come, but I haven't picked that person yet". Then you can compute with the \(X_i\) and study, for instance, variances. Usually one assumes the \(X_i\) are iid: each person is picked independently, and each measurement comes from the same distribution.
The script admits the example is imperfect. There are only finitely many people. If the same person cannot appear twice, then once \(X_1\) is fixed, \(X_2\) is no longer drawn independently from the same distribution. For a large population the difference is tiny — compare the hypergeometric and binomial laws on the §1.2 page.
The script's conclusion: always check whether the iid assumption fits the real problem. Violations can lead to wrong conclusions and poor models. Still, it is a foundational concept and a useful simplification.
Convention 1.81 — notation Script 1.81
For brevity the course often uses the following notation.
| \(X,Y,Z,X_1,X_2,\dots\) | random variables (continuous or discrete) |
| \(x\) | a value of the random variable \(X\) |
| \(\P\) | (joint) probability measure |
| \(\P_X\) | probability measure induced by \(X\), the distribution of \(X\) |
| \(\P_{Y|X=x}\) | trace of \(Y\) given \(X=x\) (the conditional law) |
| \(\P_{Y|X}\) | the collection of all \(\P_{Y|X=x}\), one for each \(x\) |
| \(F_X\) | cdf of \(\P_X\) |
| \(F_{Y|X=x}\) | cdf of \(\P_{Y|X=x}\) |
| \(p\) | (joint) pmf/pdf of a discrete/continuous \(\P\) |
| \(p_X\) | pmf/pdf of \(\P_X\) |
| \(p(x)\) | pmf/pdf of \(\P_X\) evaluated at the point \(x\) |
| \(p(x,y)\) | joint pmf/pdf of \(\P_{X,Y}\) evaluated at \((x,y)\) |
| \(p(y\mid x)\) | (conditional) pmf/pdf of \(\P_{Y|X=x}\) evaluated at \(y\) |
In the literature you will also see \(f\) for pdfs (to tell them apart from pmfs), a plain \(P\) instead of \(\P\), and, mostly for discrete spaces, \(\Pr\) ("probability") for a probability measure.
Warning: in \(p(x)\) and \(p(y)\) the letter \(p\) means two different functions, \(p_X\) and \(p_Y\). The name of the argument tells you which one.
Definition 1.82 conditional independence Script 1.82
Let \(X,Y,Z\) be random variables on the same probability space. \(X\) and \(Y\) are conditionally independent given \(Z\) [bedingt unabhängig], written \(X\perp\!\!\!\perp Y\mid Z\), if \(F_{X,Y|Z=z}(x,y)=F_{X|Z=z}(x)\,F_{Y|Z=z}(y)\). When joint and marginal pmfs/pdfs exist, this is written \(p(x,y\mid z)=p(x\mid z)\,p(y\mid z)\) for (Lebesgue-almost) all \(x,y\). This assumes all terms are well defined, i.e. the conditioning marginals are positive.
In words: once you know \(Z\), learning \(X\) tells you nothing more about \(Y\).
Neither implies the other — two examples of mine:
- Conditionally independent, not independent. Pick one of two coins at random: a fair one, or a biased one with \(\P(\text{heads})=0.9\). \(Z\) records which coin. Flip it twice; \(X,Y\) are the results (1 = heads). Given \(Z\), the two flips are independent. Without knowing \(Z\), by total probability \(\P(X=1)=\tfrac12\cdot0.5+\tfrac12\cdot0.9=0.7\), but \(\P(X=Y=1)=\tfrac12\cdot0.25+\tfrac12\cdot0.81=0.53\ne0.7^2=0.49\). A first head is evidence for the biased coin, which makes a second head likelier.
- Independent, not conditionally independent. \(X,Y\) independent fair coins (values 0, 1), \(Z=\one_{\{X=Y\}}\). Given \(Z=1\), knowing \(X\) determines \(Y\) completely.
Memorylessness of the exponential distribution
An application of conditional probability. You wait for something, e.g. a reply. You have already waited \(s\) hours. Is the remaining wait shorter than for someone who just started? For the exponential distribution the answer is no: the past wait is "forgotten".
Sheet 5, Exercise 2 — the exponential has no memory Sheet 5 · Ex 2
\(X>0\) has a density \(p_X(x)>0\) for all \(x>0\). Show: \(X\sim\Exp(\lambda)\) for some \(\lambda>0\) if and only if
\[ \P(X>t+s\mid X>s)=\P(X>t)\qquad\text{for all }s,t\ge0. \tag{A} \]"If and only if" [genau dann, wenn], written \(\Longleftrightarrow\), claims both directions at once, so it needs two proofs: "⇒" (exponential implies (A)) and "⇐" ((A) implies exponential). It is the same two-halves pattern as a proof that two sets are equal, which is spelled out in B2.
The sheet's hint: the cdf of \(\Exp(\lambda)\) is \(F_X(x)=1-e^{-\lambda x}\), so \(\P(X>x)=1-F_X(x)=e^{-\lambda x}\).
"⇒". The event \(\{X>t+s\}\) lies inside \(\{X>s\}\) (because \(t\ge0\)). So their intersection is \(\{X>t+s\}\), and by Definition 1.69
\[ \P(X>t+s\mid X>s)=\frac{\P(X>t+s)}{\P(X>s)}=\frac{e^{-\lambda(t+s)}}{e^{-\lambda s}}=e^{-\lambda t}=\P(X>t). \]The middle step is exponent arithmetic: \(e^{-\lambda(t+s)}=e^{-\lambda t}e^{-\lambda s}\) by the functional equation \(e^{a+b}=e^ae^b\) (Analysis 3.4), then cancel \(e^{-\lambda s}\).
"⇐". Let \(f(x):=\P(X>x)=\int_x^\infty p_X(a)\,\mathrm da\). It is positive at every \(x\ge0\), which the argument below needs in order to divide by it: \(f(0)=\P(X>0)=1\) because \(X\) only takes positive values, and for \(x>0\) the integral of the strictly positive density \(p_X\) over \((x,\infty)\) is again strictly positive. Assume, as the official solution does, that the density is continuous. Then \(f\) is differentiable with \(f'=-p_X\): since \(X>0\) we can write \(f(x)=1-\int_0^xp_X(a)\,\mathrm da\), and the fundamental theorem (Analysis 8.3) says that differentiating \(\int_0^xp_X\) in \(x\) returns \(p_X(x)\); the minus sign comes from the minus in front.
- By the "⇒" computation, (A) says \(f(t+s)/f(s)=f(t)\), i.e. \(f(t+s)=f(t)f(s)\) for all \(s,t\ge0\).
- Fix \(t\) and differentiate both sides in \(s\) (chain rule on the left): \(f'(t+s)=f(t)f'(s)\).
- Divide by \(f(t+s)=f(t)f(s)\): \(\dfrac{f'(t+s)}{f(t+s)}=\dfrac{f'(s)}{f(s)}\) for all \(s,t\). Put \(s=0\): the function \(f'/f\) takes the same value \(c:=f'(0)/f(0)\) at every point \(t\). So \(f'/f=c\) is constant.
- \((\ln f)'=f'/f=c\) (chain rule, Analysis 6.3; \(\ln\) is the inverse of \(e^x\), Analysis 5.2). Integrate from 0 to \(t\) (fundamental theorem in the form \(\int_0^tg'(x)\,\mathrm dx=g(t)-g(0)\) for a continuous \(g'\), Analysis 8.3; equivalently: the function \(t\mapsto\ln f(t)-ct\) has derivative \(c-c=0\), and a function with derivative 0 is both increasing and decreasing, hence constant — Analysis 7.3 states \(g'\ge0\Longleftrightarrow g\) increasing and \(g'\le0\Longleftrightarrow g\) decreasing): \(\ln f(t)-\ln f(0)=ct\). Since \(f(0)=\P(X>0)=1\) and \(\ln1=0\), \(\ln f(t)=ct\); apply \(e^{(\cdot)}\) to both sides, using \(e^{\ln y}=y\): \(f(t)=e^{ct}\).
- Why \(c\) must be negative. First, \(f\) tends to 0: \(f(t)=\P(X>t)=1-F_X(t)\), and a cdf runs up to 1, \(\lim_{t\to\infty}F_X(t)=1\) (Lemma 1.24(v), §1.1), so \(f(t)\to1-1=0\). Now compare with \(f(t)=e^{ct}\). If \(c\ge0\), then \(ct\ge0\) and therefore \(e^{ct}\ge e^0=1\) for all \(t\ge0\), so \(f\) never gets near 0 — contradiction. Hence \(c<0\), and then \(e^{ct}\to0\) indeed (Analysis 3.4), so nothing is contradicted. Write \(c=-\lambda\), i.e. \(\lambda:=-c>0\). Then \(F_X(x)=1-e^{-\lambda x}\) and \(p_X(x)=F_X'(x)=\lambda e^{-\lambda x}\): \(X\sim\Exp(\lambda)\). ∎
Notes on the official solution. It sets \(\varphi(s)=f(t+s)/f(s)\), shows with (A) that \(\varphi(s)=f(t)=\varphi(0)\) is constant, and differentiates \(\varphi\) with the quotient rule. That is the same argument. Two small points: (1) differentiability of \(f\) needs a continuous density — the solution adds this ("Suppose X has a continuous density"), the exercise does not state it; (2) its last line writes \(1-\exp(-\lambda t)\) where \(x\) is meant. Neither affects the result. (Without any smoothness, \(f(t+s)=f(t)f(s)\) for a monotone \(f\) with \(f(0)=1\) still forces \(f(t)=e^{ct}\) — Cauchy's functional equation — but that proof is longer. A differentiable version of the same idea appears in your Analysis guide as the exam question Klausur SoSe19, Aufgabe 4, in Analysis 6.2: from \(f(x+y)=f(x)f(y)\), \(f(0)=1\) and \(f'(0)=1\) it concludes \(f=\exp\), by showing that \(g(x)=f(x)e^{-x}\) has \(g'=0\) and \(g(0)=1\), so \(g\equiv1\). The extra normalisation \(f'(0)=1\) is what pins the constant \(c\) down to 1 there; here \(c\) stays free and becomes \(-\lambda\).)
In words: the sheet says the exponential "forgets how much time has already elapsed". A lightbulb with exponential lifetime that has burned for 1000 hours is as good as new. That is unrealistic for lightbulbs and realistic for radioactive atoms. And the exponential is the only continuous distribution on \((0,\infty)\) with this property.
WiSe 25/26, Problem 3b — the professor's response time WiSe25 · P3b · 4 credits
\(X\sim\Exp(\lambda)\) (from part (a), worked on the §1.3 page) models the professor's response time to Moodle posts. The probability to wait at least 5 hours is \(\P(X\ge5)=p\in(0,1)\). Given that you have already waited 5 hours, what is the probability of waiting at least 5 more hours? (Hint in the exam: you may use \(F_X(x)=1-e^{-\lambda x}\) for \(x>0\).)
Solution via memorylessness: \(\P(X\ge10\mid X\ge5)=\P(X\ge5)=p\).
Solution directly: \(\P(X\ge x)=1-F_X(x)=e^{-\lambda x}\). Since \(\{X\ge10\}\subseteq\{X\ge5\}\), the intersection is \(\{X\ge10\}\), so
\[ \P(X\ge10\mid X\ge5)=\frac{\P(X\ge10)}{\P(X\ge5)}=\frac{e^{-10\lambda}}{e^{-5\lambda}}=e^{-5\lambda}=\P(X\ge5)=p. \]My verification: correct; both routes of the official solution agree. Using \(\ge\) instead of \(>\) changes nothing, because a single point has probability 0 under a continuous law. Note that the answer is in terms of \(p\): \(\lambda\) is never needed.
More exercise-sheet tasks
Sheet 4, Exercise 2 — trace, total probability, Bayes Sheet 4 · Ex 2
Prove the three parts of Theorem 1.70 (the sheet calls the partition in (iii) \(\{E_i\}\) instead of \(\{B_i\}\)). Worked in full in the proof strip of the theorem above.
The official solution to (iii) says "the \(E_i\) build a partitioning of \(\Omega\supseteq A\)" to justify \(\P(A)=\P(A\cap\Omega)=\sum_i\P(A\mid E_i)\P(E_i)\). That is part (ii) applied with \(B=\Omega\), the cleanest way to say it.
Sheet 4, Exercise 3 — Chapter 0's puzzles, done rigorously Sheet 4 · Ex 3
The two puzzles from Chapter 0 (Russian roulette, Example 0.5; the two-card box, Example 0.4), now with all modelling details.
(i) Russian roulette. A six-shot revolver holds two bullets in neighbouring chambers. Your opponent spins, pulls the trigger, and the gun does not fire. Should you spin again or pull directly? What is your survival probability in each case?
The sheet's "general construction principle". To model a sequence of \(n\) experiments with discrete outcome sets \(\Omega_1,\dots,\Omega_n\), specify two things: the law \(\P_{X_1}\) of the first outcome, and for each next step \(k\) the conditional law \(\P_{X_k|X_1=\omega_1,\dots,X_{k-1}=\omega_{k-1}}\) given what came before. Together these determine a unique law on sequences:
\[ \P(\{(\omega_1,\dots,\omega_n)\})=\P_{X_1}(\{\omega_1\})\,\P_{X_2|X_1=\omega_1}(\{\omega_2\})\cdots\P_{X_n|X_1=\omega_1,\dots,X_{n-1}=\omega_{n-1}}(\{\omega_n\}). \]This is the chain rule, Lemma 1.71: multiply along the branch.
Model. Two rounds, \(\Omega_1=\Omega_2=\{e,ne\}\) (e = the chamber is empty, ne = not empty). Spinning is modelled as uniform over the six chambers; four are empty, so \(\P_{X_1}(e)=\tfrac46\), \(\P_{X_1}(ne)=\tfrac26\). We observed \(X_1=e\).
- Spin again: the second round starts afresh, \(\P_{X_2|X_1=e}=\P_{X_1}\). Survival: \(\P_{X_2|X_1=e}(\{e\})=\tfrac46=\tfrac23\).
- Pull directly: symbol manipulation cannot give \(\P_{X_2|X_1=e}\); we must reason about the revolver. Each of the four empty chambers was equally likely to be the one just fired. The four empty chambers sit in a row (the two bullets are neighbours), and the cylinder moves one step in a fixed direction. Only the last of the four empty chambers is followed by a bullet; three are followed by an empty chamber. So \(\P_{X_2|X_1=e}(\{e\})=\tfrac34\).
Survival \(\tfrac34>\tfrac23\): pull directly. This matches the Chapter 0 answer (it fires with probability \(\tfrac14\) versus \(\tfrac13\)). My verification: correct.
The sheet's modelling remark. The result rests on understanding how revolvers work (one slot at a time, one direction) and on a "leap of faith" that spinning means uniform. Choosing these laws is the modelling. One could refine it: bullets have weight and may end up at the bottom more often; people may load habitual chambers; the force of a typical spin matters. One could also have numbered the chambers and modelled the index instead of just "e/ne".
(ii) The two cards. A box holds two cards: one red on both sides, one red on one side and blue on the other. You draw a card and put it on the table; a red side faces up. What is the probability that the other side is red too?
Model. \(X_{\text{card}}\in\{1,2\}\) is the card drawn (1 = red/red, 2 = red/blue), with \(\P_{X_{\text{card}}}=\Lap_{\{1,2\}}\). \(X_{\text{col}}\in\{\text{red},\text{blue}\}\) is the visible colour. Given card 1 the visible side is red for sure; given card 2 it is red with probability \(\tfrac12\). The other side is red exactly when the card is card 1. Bayes' rule with the partition by card:
\[ \P(X_{\text{card}}=1\mid X_{\text{col}}=\text{red})=\frac{\tfrac12\cdot1}{\tfrac12\cdot1+\tfrac12\cdot\tfrac12}=\frac{1/2}{3/4}=\frac23. \]The sheet's intuition: before looking, each of the four sides is equally likely to face up. Seeing red rules out the blue side. Three equally likely sides remain: two of the red/red card, one of the red/blue card. In two of these three the other side is red. My verification: correct.
Sheet 5, Exercise 3 — a conditional density Sheet 5 · Ex 3
\(p_{X,Y}(x,y)=\tfrac{x^2}4+\tfrac{y^2}4+\tfrac{xy}6\) for \(x\in[0,1]\), \(y\in[0,2]\), and 0 otherwise. For \(y\in[0,2]\) find (i) the conditional pdf \(p_{X|Y}(x\mid y)\), (ii) \(\P(X<\tfrac12\mid Y=y)\).
Sanity check first — is it a joint pdf? Integrate each term over the rectangle: \(\iint\tfrac{x^2}4=\tfrac1{12}\cdot2=\tfrac16\), \(\iint\tfrac{y^2}4=1\cdot\tfrac{8}{12}=\tfrac23\), \(\iint\tfrac{xy}6=\tfrac16\cdot\tfrac12\cdot2=\tfrac16\). Total \(\tfrac16+\tfrac23+\tfrac16=1\) ✓.
Step 1 — marginal of \(Y\) (Theorem 1.68(iii)): integrate out \(x\), holding \(y\) fixed.
\[ p_Y(y)=\int_0^1\Bigl(\tfrac{x^2}4+\tfrac{y^2}4+\tfrac{xy}6\Bigr)\mathrm dx=\tfrac1{12}+\tfrac{y^2}4+\tfrac y{12}=\frac{3y^2+y+1}{12}. \](i) Definition 1.78(ii). Write the joint density over the common denominator 12, \(\tfrac{3x^2+3y^2+2xy}{12}\), and divide:
\[ p_{X|Y}(x\mid y)=\frac{(3x^2+3y^2+2xy)/12}{(3y^2+y+1)/12}=\frac{3x^2+3y^2+2xy}{3y^2+y+1}\quad\text{for }x\in[0,1], \]and 0 otherwise. Check at \(y=0\): \(3x^2\), which integrates to 1 on \([0,1]\) ✓.
(ii) Integrate the conditional density over \(x\in[0,\tfrac12)\):
\[ \P(X<\tfrac12\mid Y=y)=\frac{\int_0^{1/2}(3x^2+3y^2+2xy)\,\mathrm dx}{3y^2+y+1} =\frac{\bigl[x^3+3y^2x+yx^2\bigr]_0^{1/2}}{3y^2+y+1}=\frac{\tfrac18+\tfrac{3y^2}2+\tfrac y4}{3y^2+y+1}. \]My verification: matches the official solution. Check at \(y=0\): \(\tfrac{1/8}{1}=\tfrac18\), and indeed \(\int_0^{1/2}3x^2\,\mathrm dx=\tfrac18\) ✓.
Old-exam tasks
SoSe25 P1a is worked in the warning box above, WiSe25 P3b in the memorylessness section. The remaining tasks follow.
SoSe 2025, Problem 1d — the ratio of two exponentials SoSe25 · P1d · 3 credits
Statement. \(X,Y\) iid \(\Exp(\lambda)\). True or false: \(F_{X/Y}(t)=\frac t{1+t}\) for \(t>0\) and 0 otherwise. (Hint: \(p_{\Exp(\lambda)}(x)=\lambda e^{-\lambda x}\) for \(x\ge0\); \(F_{X/Y}(t)=\P(X<tY)\).)
Official answer: True.
Step 1 — the case \(t\le0\). \(X>0\) and \(Y>0\) with probability 1, so \(X/Y>0\) with probability 1. Hence \(F_{X/Y}(t)=\P(X/Y\le t)=0\) for \(t\le0\).
Step 2 — rewrite for \(t>0\). Multiply by \(Y>0\): \(X/Y\le t\iff X\le tY\). (\(\le\) or \(<\) makes no difference for a continuous law.)
Step 3 — the joint density. \(X,Y\) are independent, so the joint density is the product of the marginals (Definition 1.77(iii), Example 1.67): \(\lambda e^{-\lambda x}\cdot\lambda e^{-\lambda y}\) for \(x,y\ge0\).
Step 4 — integrate over \(\{0\le x\le ty\}\), inner integral in \(x\) with \(y\) fixed:
\[ \begin{aligned} \P(X\le tY)&=\int_0^\infty\Bigl(\int_0^{ty}\lambda e^{-\lambda x}\,\mathrm dx\Bigr)\lambda e^{-\lambda y}\,\mathrm dy =\int_0^\infty\bigl(1-e^{-\lambda ty}\bigr)\lambda e^{-\lambda y}\,\mathrm dy\\ &=1-\lambda\int_0^\infty e^{-\lambda(t+1)y}\,\mathrm dy=1-\frac{\lambda}{\lambda(t+1)}=\frac t{t+1}. \end{aligned} \](The first term \(\int_0^\infty\lambda e^{-\lambda y}\,\mathrm dy=1\) is the total mass of a density; \(\int_0^\infty e^{-ay}\,\mathrm dy=\tfrac1a\) for \(a>0\).)
My verification: correct. Sanity checks: \(t=1\) gives \(\tfrac12\) — by symmetry \(X<Y\) and \(Y<X\) are equally likely ✓; \(t\to\infty\) gives 1 ✓; the answer does not depend on \(\lambda\), as it must, since changing the time unit changes neither \(X/Y\) nor its law. (The official write-up mixes up the \(\mathrm dx\) and \(\mathrm dy\) placement in its first integral; the computation is right.)
WiSe 25/26, Problem 6a — which schedule? WiSe25 · P6a · 4 credits
You win against the strong player (S) with probability \(p\) and against the weak player (W) with probability \(q\), where \(0<p<q<1\). Matches are independent. You play three matches and win the tournament if you win two consecutive matches. Schedule A is SWS, schedule B is WSW. Compute the winning probabilities, choose a schedule, and explain the choice intuitively.
Step 1 — name the events. \(W_i\) = "win match \(i\)", \(L_i=W_i^c\) = "lose match \(i\)".
Step 2 — split the winning event. "Two consecutive wins" happens exactly in two disjoint ways: \(W_1\cap W_2\) (the third match does not matter) or \(L_1\cap W_2\cap W_3\). They are disjoint because match 1 is won in the first and lost in the second. Nothing is missing: a winning run either includes match 1 (then it is matches 1, 2) or not (then it is 2, 3 with match 1 lost).
Step 3 — multiply (independence) and add (disjoint):
\[ \P(\text{win}\mid\mathrm{SWS})=pq+(1-p)qp=pq(2-p),\qquad \P(\text{win}\mid\mathrm{WSW})=qp+(1-q)pq=pq(2-q). \]Step 4 — compare. Since \(p<q\), \(2-p>2-q\), so SWS is better — even though you play the strong opponent twice.
Intuition (the exam asks for one): only consecutive wins count, so the middle match must be won in every winning outcome. Put the weak opponent in the middle.
My verification: correct. Numbers: \(p=0.3\), \(q=0.8\) give SWS \(0.24\cdot1.7=0.408\) and WSW \(0.24\cdot1.2=0.288\).
WiSe 25/26, Problem 6b — Bayes on the schedule WiSe25 · P6b · 2 credits
A fair coin picks the schedule. Someone is told only that you won. What is the probability that the schedule was SWS?
Step 1 — total probability (partition {SWS, WSW}, each with probability \(\tfrac12\)): \(\P(\text{win})=\tfrac12pq(2-p)+\tfrac12pq(2-q)=\tfrac12pq\bigl((2-p)+(2-q)\bigr)=\tfrac12pq(4-p-q)\).
Step 2 — Bayes:
\[ \P(\mathrm{SWS}\mid\text{win})=\frac{\tfrac12pq(2-p)}{\tfrac12pq(4-p-q)}=\frac{2-p}{4-p-q}. \]My verification: correct. Check: since \(p<q\), the numerator \(2-p\) is more than half of the denominator \(4-p-q=(2-p)+(2-q)\). So the posterior is above \(\tfrac12\): winning is evidence for the easier schedule, as it should be. With \(p=0.3\), \(q=0.8\): \(\tfrac{1.7}{2.9}\approx0.586\).
Part (c), with inclusion–exclusion, is on the §1.1 page.
SoSe 2026, Problem 5a — randomized response SoSe26 · P5a · 3 credits
Setting. In a survey each participant has a sensitive yes/no attribute \(A\sim\Ber(p)\) (1 = yes), with \(p\in[0,1]\) unknown. To protect privacy we do not observe \(A\). Instead we observe an answer \(Y\in\{0,1\}\) produced like this: with probability \(r\in(0,1]\) the participant answers truthfully (\(Y=A\)); with probability \(1-r\) the participant flips a fair coin, independently of \(A\), and reports the coin (\(Y\) = coin). The value \(r\) is known.
Task. Compute \(\P(Y=1)\) in terms of \(p\) and \(r\). Is \(p\) identifiable from the distribution of \(Y\)?
Tools: the law of total probability (Theorem 1.70(ii) with \(B=\Omega\)) and the meaning of independence (Definition 1.74).
Step 1 — name the cases. Let \(T\) be the event "the participant answers truthfully". Then \(\P(T)=r\) and \(\P(T^c)=1-r\). \(\{T,T^c\}\) is a partition of \(\Omega\): each participant uses exactly one of the two mechanisms.
Step 2 — the probability of \(Y=1\) in each case.
- On \(T\), \(Y=A\). The choice of mechanism does not depend on the attribute (this is how the mechanism is meant; the official solution uses it without saying so), so \(\P(Y=1\mid T)=\P(A=1\mid T)=\P(A=1)=p\).
- On \(T^c\), \(Y\) is a fair coin, so \(\P(Y=1\mid T^c)=\tfrac12\).
Step 3 — total probability.
\[ \P(Y=1)=\P(Y=1\mid T)\P(T)+\P(Y=1\mid T^c)\P(T^c)=p\cdot r+\tfrac12(1-r)=rp+\frac{1-r}2=:q(p). \]Since \(Y\) only takes the values 0 and 1, its whole distribution is \(\Ber(q(p))\): the number \(q(p)\) tells us everything about the law of \(Y\).
Step 4 — identifiability. Definition, my addition: a parameter is identifiable if different parameter values give different distributions of the observation. Here: if \(p_1\ne p_2\), is \(\Ber(q(p_1))\ne\Ber(q(p_2))\)? Suppose \(q(p_1)=q(p_2)\). Then \(rp_1+\tfrac{1-r}2=rp_2+\tfrac{1-r}2\); subtract \(\tfrac{1-r}2\) to get \(rp_1=rp_2\); divide by \(r>0\) to get \(p_1=p_2\). So the map \(p\mapsto q(p)\) is injective [injektiv] (different inputs always give different outputs; see B2) on \([0,1]\), and \(p\) is identifiable. Explicitly we can solve for \(p\): \(p=\bigl(q-\tfrac{1-r}2\bigr)/r\).
Example with numbers. \(r=0.5\), \(p=0.2\): \(q=0.5\cdot0.2+0.25=0.35\). Half the people answer truthfully and 20 % of them say yes (0.10 of all); the other half flip a coin and half of them say yes (0.25 of all); total 0.35 ✓. Going back: \((0.35-0.25)/0.5=0.2\) ✓.
Why \(r>0\) matters: if \(r=0\), everyone flips a coin, \(q(p)=\tfrac12\) for every \(p\), and the answers carry no information about \(p\) — not identifiable. For \(r\in(0,1]\), \(q(p)\) ranges over \([\tfrac{1-r}2,\tfrac{1+r}2]\) as \(p\) runs through \([0,1]\); part (b) uses this interval.
My verification: the official answer is correct (\(\P(Y=1)=rp+\tfrac{1-r}2\), injective since \(r>0\), hence identifiable). Marking: 1.5 points for the formula, 1 for the injectivity argument, 0.5 for the conclusion.
In words: the coin adds a known amount of noise, \(\tfrac{1-r}2\), to the share of "yes" answers and shrinks the true share by the factor \(r\). Because both are known, we can undo them and recover \(p\) — while no single answer reveals anyone's attribute.
Part (b), the maximum likelihood estimator, belongs to Chapter 3. Part (c), unbiasedness and variance, is on the §2.1 page.
Summary sheet
Formulas
- conditional
- \(\P(A\mid B)=\P(A\cap B)/\P(B)\), needs \(\P(B)>0\)
- chain rule
- \(\P(A_1\cap\dots\cap A_n)=\P(A_1)\P(A_2\mid A_1)\cdots\) (Lemma 1.71)
- total prob.
- \(\P(A)=\sum_i\P(A\mid B_i)\P(B_i)\) for a partition \((B_i)\)
- Bayes
- \(\P(B_i\mid A)=\P(A\mid B_i)\P(B_i)\big/\sum_j\P(A\mid B_j)\P(B_j)\)
- independence
- \(\P(A\cap B)=\P(A)\P(B)\); families: every finite subfamily
- indep. RVs
- joint cdf / pmf / pdf = product of marginals
- marginal
- sum or integrate the other variables out (Thm 1.68)
- cond. density
- \(p_{Y|X=x}(y)=p_{X,Y}(x,y)/p_X(x)\)
- memoryless
- \(\P(X>s+t\mid X>s)=\P(X>t)\) ⟺ exponential
Traps
- \(\P(A\mid B)\ne\P(B\mid A)\) in general; equal iff \(\P(A)=\P(B)\) (when \(\P(A\cap B)>0\)).
- Disjoint events with positive probability are dependent.
- Pairwise independent does not imply independent (Example 1.75).
- "Intuitively related" events can be independent (Example 1.76).
- Marginals do not determine the joint law.
- Conditional independence and independence imply neither each other.
Exam focus
Every exam uses this page, usually inside a longer problem: Bayes with a partition (WiSe25 P6b, Sheet 0 Ex 4), total probability over mechanisms (SoSe26 P5a), multiplying under an independence assumption (WiSe25 P6a, SoSe25 P5 duck hunt), a product density integrated over a non-rectangular region (SoSe25 P1d), memorylessness (WiSe25 P3b), and a True/False on the definitions (SoSe25 P1a). In the "story" problems the first marks go to naming the events and writing down which given probabilities are conditional ones.
Self-test
Section 2.1 · Lectures 6–7 (27 May and 3 June 2026)
Basic properties of distributions
Grundlegende Eigenschaften von Verteilungen
What this page covers Script §2.1, pp. 52–69
Everything from Definition 2.1 to Remark 2.37. The script's section goal: "Introduce key numerical summaries of distributions, such as their 'central tendency' (expectation), 'spread' (variance), quantiles, and the 'linear relationship' between pairs of variables (covariance and correlation) as well as some characteristics of these properties."
Worked in place: Sheet 6 Ex 1–3, Sheet 7 Ex 1, 3, 4, Sheet 8 Ex 3, and the old-exam tasks WiSe25 P1b, WiSe25 P3c (an integral via LOTUS), WiSe25 P5a–c (the empirical cdf), SoSe25 P1b, SoSe25 P5a–b, SoSe26 P1a, P1b, P2c, P2d, P4c, P5c.
Elsewhere: Sheet 7 Ex 2 (sums of independent variables via convolution) and Ex 5, and Sheet 8 Ex 1 and 5 use characteristic functions and Gaussian rules, so they belong to §2.3. Sheet 8 Ex 4 (Monte Carlo) needs the law of large numbers, §2.4. Every Markov and Chebyshev task is on the next page, §2.2.
How this long page is organised My addition
- Expectation — where a distribution sits (Def 2.1 – Prop 2.4).
- Variance — how spread out it is (Def 2.5 – Prop 2.8).
- Covariance and correlation — how two variables move together (Def 2.9 – Convention 2.19).
- Quantiles and the median, and how to simulate any distribution from a uniform one (Def 2.20 – Ex 2.25).
- The table of means and variances of every named distribution (Lemmas 2.26, 2.27), with derivations.
- Conditional expectation — the best guess of \(Y\) once \(X\) is known, and the laws of total expectation and variance (Def 2.28 – Remark 2.37).
The big picture
A distribution is a whole function — a pmf, a pdf or a cdf. That is a lot of information. Very often we want a few numbers that summarise it, the way "average grade" and "how much the grades vary" summarise a whole list of exam results. This page builds those numbers.
A concrete game (my example, used throughout the page). You pay nothing and win \(X\) euros, where
\[ \P(X=0)=0.5,\qquad \P(X=1)=0.4,\qquad \P(X=10)=0.1 . \]- Where does it sit? The mean (expectation) weights each value by its probability: \(0\cdot0.5+1\cdot0.4+10\cdot0.1=1.4\). If you played very many times, your average win per game would be close to 1.40 € (that is the law of large numbers, §2.4).
- Another notion of "middle": the median is a value with at least half the probability at or below it and at least half at or above it. Here every number between 0 and 1 qualifies — medians need not be unique. Note how far the mean (1.4) is from the median: the rare 10 € pulls the mean up but hardly moves the median.
- How spread out? The variance is the average squared distance from the mean: \(0.5(0-1.4)^2+0.4(1-1.4)^2+0.1(10-1.4)^2=0.98+0.064+7.396=8.44\). Its square root, the standard deviation \(\approx2.91\), is back in euros.
- Two variables together? Covariance and correlation measure whether two random quantities tend to be large at the same time.
- Learning something? If a friend tells you "you won something", your best guess of \(X\) changes: that is conditional expectation. Write \(\E[X\mid A]\) for the mean computed with the conditional distribution given an event \(A\) — keep only the outcomes in \(A\) and divide their probabilities by \(\P(A)\) so that they again add up to 1 (conditional probability, Definition 1.69, §1.4). With \(A=\{X>0\}\) and \(\P(A)=0.5\): \(\E[X\mid X>0]=\frac{1\cdot0.4+10\cdot0.1}{0.5}=2.8\). Definition 2.28 below does the same thing with \(A=\{X=x\}\).
In words: expectation = centre of mass, variance = how far the mass sits from that centre, covariance = whether two masses move together, quantiles = where given fractions of the mass are cut off, conditional expectation = the centre of mass after you have been told something.
Primer: the tools this page uses My addition
Symbols from Chapter 1 that this page uses My addition
- pmf \(p_X(x)=\P(X=x)\): the probability of each single value of a discrete \(X\) (§1.3). pdf \(p_X\): a density; probabilities are areas under it, \(\P(a\le X\le b)=\int_a^bp_X(x)\,\mathrm dx\). cdf \(F_X(x)=\P(X\le x)\).
- Distribution \(\P_X\): the rule \(B\mapsto\P(X\in B)\) that says how likely \(X\) lands in each set \(B\) of real numbers.
- \(X\perp\!\!\!\perp Y\): "\(X\) and \(Y\) are independent" [unabhängig] — knowing one tells you nothing about the other; for pmfs or pdfs, the joint one is the product of the marginals (§1.4). iid: independent and identically distributed.
- Almost surely (a.s.) [fast sicher]: "with probability 1".
- \(\Ber(p)\), \(\Bin(n,p)\), \(\Poi(\lambda)\), \(\Geo(p)\), \(\Exp(\lambda)\), \(\Unif(a,b)\), \(\mathcal N(\mu,\sigma^2)\): the named distributions of §1.3.
- iff means "if and only if": both directions hold.
- \([m]\) is short for \(\{1,2,\dots,m\}\) (set notation).
Cross-references to your Analysis guide
Series and why the order of summation can matter: Analysis 3.1, rearranging series, geometric series, the exponential series. Improper integrals \(\int_{-\infty}^{\infty}\): Analysis 9.1. Integration by parts and substitution: parts, substitution. Minimising a function by setting the derivative to zero: Analysis 7.1. Cauchy–Schwarz: Analysis 1.3. Vectors, matrices, transpose: Linear algebra you need. Integrals with respect to a measure and "almost surely": B4, B4 (null sets). Swapping the order of a double integral (Fubini): B4.
1. Sums over countably many values, and why "absolutely"
A discrete random variable can take infinitely many values \(x_1,x_2,\dots\). Its mean will be the series \(\sum_k x_k\,p(x_k)\). A series is the limit of its partial sums (Analysis 3.1), and that limit can depend on the order in which you add the terms: the alternating harmonic series \(1-\frac12+\frac13-\frac14+\dots\) converges to \(\ln2\), but a rearrangement of the same terms can be made to converge to any number you like (Riemann's rearrangement theorem, see rearranging).
The values of a random variable come in no natural order. So the course only accepts a sum whose value cannot depend on the order: an absolutely convergent one, meaning \(\sum_k|x_k|\,p(x_k)<\infty\). For such series every rearrangement gives the same value. This is the side condition you will see in Definition 2.1.
For terms that are all \(\ge0\), order never matters (the sum is either a finite number or \(+\infty\) whatever the order). That is why we may freely swap \(\sum_n\sum_k\) of non-negative terms — used in Sheet 7 Ex 3 below.
2. Integrals over the whole line
\(\int_{-\infty}^{\infty}f(x)\,\mathrm dx\) is an improper integral: the limit of \(\int_a^bf\) as \(a\to-\infty\) and \(b\to\infty\) (Analysis 9.1). Again the course asks for absolute integrability, \(\int_{-\infty}^\infty|f(x)|\,\mathrm dx<\infty\), before it calls \(\int f\) a number.
Odd functions. \(f\) is odd if \(f(-x)=-f(x)\) (e.g. \(x\), \(x^3\), \(x\sqrt{1-x^2}\)); even if \(f(-x)=f(x)\) (e.g. \(x^2\), \(e^{-x^2/2}\)). Odd times even is odd. If \(f\) is odd and absolutely integrable, then \(\int_{-a}^{a}f=0\): the area on the left is the mirror image of the area on the right with the sign flipped (the substitution \(u=-x\) turns \(\int_{-a}^0f\) into \(-\int_0^af\); see Analysis 8.2 for the rule). Warning: without absolute integrability this fails — \(\int_{-\infty}^\infty x\cdot\frac{1}{\pi(1+x^2)}\,\mathrm dx\) is not 0, it is undefined (see the Cauchy distribution below).
3. Integration by parts, the workhorse for means
\(\int_a^bu(x)v'(x)\,\mathrm dx=\bigl[u(x)v(x)\bigr]_a^b-\int_a^bu'(x)v(x)\,\mathrm dx\) (Analysis 8.4). Example: the mean of \(\Exp(\lambda)\) is \(\int_0^\infty x\,\lambda e^{-\lambda x}\,\mathrm dx\). Take \(u=x\), \(v'=\lambda e^{-\lambda x}\), so \(u'=1\), \(v=-e^{-\lambda x}\):
\[ \int_0^\infty x\lambda e^{-\lambda x}\,\mathrm dx=\bigl[-xe^{-\lambda x}\bigr]_0^\infty+\int_0^\infty e^{-\lambda x}\,\mathrm dx=0+\Bigl[-\tfrac1\lambda e^{-\lambda x}\Bigr]_0^\infty=\frac1\lambda . \]The boundary term is 0 because \(xe^{-\lambda x}\to0\) as \(x\to\infty\) (exponentials beat powers, Analysis 5.2) and it is \(0\) at \(x=0\).
4. Indicator functions
For an event \(A\), the indicator [Indikatorfunktion] \(\one_A:\Omega\to\{0,1\}\) is 1 on \(A\) and 0 off \(A\). It is a random variable taking the value 1 with probability \(\P(A)\) and 0 otherwise, i.e. \(\one_A\sim\Ber(\P(A))\). Two facts used again and again:
- \(\E[\one_A]=1\cdot\P(A)+0\cdot(1-\P(A))=\P(A)\): probabilities are expectations of indicators.
- \(\one_A^2=\one_A\) (because \(0^2=0\) and \(1^2=1\)) and \(\one_A\one_B=\one_{A\cap B}\) (the product is 1 exactly when both are 1).
Counting with indicators — "the number of ducks that survive is the sum over ducks of the indicator that this duck survives" — turns hard counting questions into easy expectations (SoSe25 P5 below).
5. Minimising a parabola
For \(a>0\), \(f(c)=ac^2+bc+d\) has its unique minimum at \(c=-\frac{b}{2a}\). Two ways to see it: \(f'(c)=2ac+b=0\) and \(f''=2a>0\) (Analysis 7.1), or complete the square: \(f(c)=a\bigl(c+\frac b{2a}\bigr)^2+\bigl(d-\frac{b^2}{4a}\bigr)\), and a square is smallest when it is 0. Used for "the mean minimises the mean squared error" (Remark 2.22(v)).
6. Column vectors, transpose, and the outer product
A random vector \(X=(X_1,\dots,X_m)^\top\) is written as a column; the transpose \({}^\top\) turns a column into a row and vice versa. For a column \(v\in\R^m\) and a column \(w\in\R^n\), the product \(v\,w^\top\) (column times row) is the \(m\times n\) matrix with entries \(v_iw_j\) — the outer product. Example:
\[ \begin{pmatrix}1\\2\end{pmatrix}\begin{pmatrix}3&4\end{pmatrix}=\begin{pmatrix}3&4\\6&8\end{pmatrix}. \]The expectation of a matrix of random variables is taken entry by entry. That is all the linear algebra the covariance matrix (Definition 2.9) needs. More in Linear algebra you need, and a slower walk through transpose, inner and outer products with more examples in B5.
7. Expectations of a function of two variables
The script uses, without numbering it, the two-variable version of Lemma 2.2 below: for a random vector \((X,Y)\) with joint pmf \(p\) or joint pdf \(p\) and a function \(g:\R^2\to\R\),
\[ \E[g(X,Y)]=\sum_{x,y}g(x,y)\,p(x,y)\qquad\text{or}\qquad \E[g(X,Y)]=\iint g(x,y)\,p(x,y)\,\mathrm dx\,\mathrm dy , \]provided the same with \(|g|\) is finite. It is Lemma 2.2 applied to the \(\R^2\)-valued variable \((X,Y)\). Example 2.11 uses it with \(g(x,y)=xy\).
Expectation
The idea. Put a weight \(p(x)\) at every point \(x\) of a see-saw. The expectation is the point where the see-saw balances — the centre of mass. For a fair die, the weights \(\frac16\) at \(1,\dots,6\) balance at \(3.5\), a value the die never shows. It is also the long-run average: roll very often and the average of the rolls settles near 3.5 (§2.4).
Definition 2.1 expectation, expected value, mean Script 2.1
Let \(X\) be a real-valued random variable with distribution \(\P_X\). Its expectation [Erwartungswert] (also expected value or mean), written \(\E[X]\) or \(\mu_X\), is:
(i) if \(X\) is discrete with pmf \(p_X\) on a countable set \(\Omega\subseteq\R\) of values (countable: finite, or listable as \(x_1,x_2,\dots\)),
\[ \E[X]=\sum_{x\in\Omega}x\,p_X(x),\qquad\text{provided}\quad\sum_{x\in\Omega}|x|\,p_X(x)<\infty ; \](ii) if \(X\) is continuous with pdf \(p_X\),
\[ \E[X]=\int_{-\infty}^{\infty}x\,p_X(x)\,\mathrm dx,\qquad\text{provided}\quad \int_{-\infty}^{\infty}|x|\,p_X(x)\,\mathrm dx<\infty . \]For a random vector \(X=(X_1,\dots,X_n)\) with joint pdf, \(\E[X]=\int_\R\cdots\int_\R x\,p_X(x)\,\mathrm dx_n\cdots\mathrm dx_1\), computed component by component: the \(i\)-th entry of \(\E[X]\) is \(\E[X_i]\) (my clarification).
Unified form. For every distribution, with or without pmf or pdf, \(\E[X]=\int_\R x\,\mathrm d\P_X(x)\) provided \(\int_\R|x|\,\mathrm d\P_X(x)<\infty\): an integral with respect to the measure \(\P_X\) (see B4). The script uses this notation as shorthand for "the sum in the discrete case, the integral in the continuous case". If the absolute condition fails, the expectation does not exist (is undefined).
The brackets. \(\E\) eats a whole function (a random variable) and returns a number; such a map is called a functional, and square brackets \(\E[\,\cdot\,]\) signal this. The script also writes \(\Var[X]\), \(\Cov[X,Y]\); most books write \(\operatorname{var}(X)\), \(\operatorname{cov}(X,Y)\).
Three quick examples (mine).
- Bernoulli. \(X\sim\Ber(p)\): \(\E[X]=0\cdot(1-p)+1\cdot p=p\).
- Fair die. \(\E[X]=\frac16(1+2+3+4+5+6)=\frac{21}6=3.5\).
- Exponential. \(\E[X]=\frac1\lambda\) (primer box 3). A mean waiting time of 10 minutes means \(\lambda=0.1\) per minute.
When the expectation does not exist My addition (the script mentions the Cauchy case in Remark 2.22(iii))
Infinite mean — St. Petersburg. A fair coin is tossed until the first head; if that happens on toss \(k\) you win \(2^k\) euros. \(\P(\text{toss }k)=2^{-k}\), so \(\sum_k2^k\cdot2^{-k}=\sum_k1=\infty\). The condition \(\sum|x|p(x)<\infty\) fails, and there is no expectation — no fair price for the game.
No mean at all — Cauchy. The density \(p(x)=\frac{1}{\pi(1+x^2)}\) (this is \(t_1\), Student's t with one degree of freedom) is symmetric around 0, so you might think \(\E[X]=0\). But \(\int_0^\infty\frac{x}{\pi(1+x^2)}\,\mathrm dx=\bigl[\frac1{2\pi}\ln(1+x^2)\bigr]_0^\infty=\infty\): both halves are infinite, and "\(\infty-\infty\)" has no value. Samples from a Cauchy distribution do not settle down when averaged.
Why the side condition is not pedantry. Without it, symmetric-looking distributions would get "means" that depend on how you cut off the integral, and the rules below (linearity, the law of large numbers) would break.
Lemma 2.2 expectations of functions (LOTUS) Script 2.2
Let \(X\) be a real random variable with distribution \(\P_X\) and \(g:\R\to\R\) measurable (a technical condition that every function you will meet satisfies, e.g. every continuous \(g\); see B4). Then \(Y=g(X)\) is again a real random variable and
\[ \E[g(X)]=\int_\R g(x)\,\mathrm d\P_X(x)\quad\text{provided}\quad\int_\R|g(x)|\,\mathrm d\P_X(x)<\infty. \]Concretely: \(\E[g(X)]=\sum_{x}g(x)\,p_X(x)\) for discrete \(X\) (provided \(\sum|g(x)|p_X(x)<\infty\)) and \(\E[g(X)]=\int_{-\infty}^\infty g(x)\,p_X(x)\,\mathrm dx\) for continuous \(X\) (provided \(\int|g|p_X<\infty\)). The name is the "Law of the Unconscious Statistician" (LOTUS): you compute \(\E[g(X)]\) from the distribution of \(X\), without first finding the distribution of \(Y=g(X)\).
The script's question "with respect to what σ-algebras?" (answer mine): \(g\) must be \(\mathcal B\)–\(\mathcal B\)-measurable (pre-images of Borel sets are Borel sets; see B4 — measurable functions). Then \(g(X)=g\circ X\) is \(\Aa\)–\(\mathcal B\)-measurable because \((g\circ X)^{-1}(B)=X^{-1}\bigl(g^{-1}(B)\bigr)\), and \(g^{-1}(B)\) is Borel, so its pre-image under \(X\) is in \(\Aa\) (this pre-image-of-a-composition rule is worked through in B2). Continuous \(g\) are always fine (Example 1.52).
Proof for discrete \(X\) supplied by me — the script gives none
\(Y=g(X)\) is discrete: its values are the numbers \(y=g(x)\). By Definition 2.1 applied to \(Y\), \(\E[Y]=\sum_yy\,\P(Y=y)\). The event \(\{Y=y\}\) is the disjoint union of the events \(\{X=x\}\) over all \(x\) with \(g(x)=y\), so \(\P(Y=y)=\sum_{x:\,g(x)=y}p_X(x)\) (σ-additivity). Hence
\[ \E[Y]=\sum_y y\sum_{x:\,g(x)=y}p_X(x)=\sum_y\ \sum_{x:\,g(x)=y}g(x)\,p_X(x)=\sum_xg(x)\,p_X(x). \]The middle step replaces \(y\) by \(g(x)\), which is allowed because inside the inner sum \(g(x)=y\). The last step regroups the terms: every \(x\) appears in exactly one group (the group of \(y=g(x)\)). Regrouping is allowed because the series converges absolutely — that is exactly the side condition \(\sum|g(x)|p_X(x)<\infty\) (primer box 1). ∎
Continuous case. For a strictly increasing differentiable \(g\) it is the substitution rule; in general it needs the integral with respect to a measure (B4), which the course does not develop. Take it as given.
Example (mine). Fair die, \(g(x)=x^2\): \(\E[X^2]=\frac16(1+4+9+16+25+36)=\frac{91}6\approx15.17\). Note \(\E[X^2]\ne(\E[X])^2=12.25\). Generally \(\E[g(X)]\ne g(\E[X])\) — how the two compare is Jensen's inequality (§2.2).
Example 2.3 expectation examples Script 2.3
(i) Discrete. A biased three-sided die, \(\Omega=\{1,2,3\}\), \(p_X(1)=0.5\), \(p_X(2)=0.3\), \(p_X(3)=0.2\): \(\E[X]=1\cdot0.5+2\cdot0.3+3\cdot0.2=0.5+0.6+0.6=1.7\). The condition \(\sum|x|p_X(x)=1.7<\infty\) holds (a finite sum is always finite).
(ii) Continuous. \(X\sim\Unif(a,b)\), \(a<b\), with \(p_X=\frac1{b-a}\) on \([a,b]\):
\[ \E[X]=\int_a^b\frac{x}{b-a}\,\mathrm dx=\frac1{b-a}\Bigl[\frac{x^2}2\Bigr]_a^b=\frac{b^2-a^2}{2(b-a)} =\frac{(b-a)(b+a)}{2(b-a)}=\frac{a+b}2 , \]using \(b^2-a^2=(b-a)(b+a)\) (third binomial formula) and cancelling \(b-a\ne0\). The midpoint, as the see-saw picture predicts. Absolute integrability holds because \(|x|\le\max(|a|,|b|)\) on a bounded interval.
(iii) Why only real-valued? On \(\Omega=\{\circ,\square,\triangle\}\) with probabilities \(0.5,0.3,0.2\) and \(X(\omega)=\omega\), "\(\circ\cdot0.5+\square\cdot0.3+\triangle\cdot0.2\)" is meaningless: you cannot multiply a circle by 0.5 or add shapes. Expectation needs values in a set where scaling and adding make sense, like \(\R\). A fair die's mean 3.5 only makes sense once the faces are read as the numbers 1–6. A fix: define a real-valued \(Y\) with \(Y(\circ)=3\), \(Y(\square)=1\), \(Y(\triangle)=0\); then \(\E[Y]=3\cdot0.5+1\cdot0.3+0\cdot0.2=1.8\).
Proposition 2.4 properties of expectation Script 2.4
Let \(X,Y\) be real random variables on the same probability space and \(a,b,c\in\R\); assume all expectations below exist.
- Linearity: \(\E[aX+bY]=a\E[X]+b\E[Y]\); in particular \(\E[aX+b]=a\E[X]+b\).
- Constants: \(\E[c]=c\).
- Non-negativity: if \(X(\omega)\ge0\) for all \(\omega\) (written \(X\ge0\)), then \(\E[X]\ge0\).
- Monotonicity: if \(X\ge Y\), then \(\E[X]\ge\E[Y]\).
- Products of independent variables: if \(X\perp\!\!\!\perp Y\), then \(\E[XY]=\E[X]\,\E[Y]\).
Proofs supplied by me — the script says "some of these will be shown in the exercises"; of these five, only (v) is done on a sheet (Sheet 6 Ex 3(i), for variables with a joint pdf)
For discrete \(X,Y\) with joint pmf \(p(x,y)\). The continuous case is the same with double integrals in place of double sums (and Fubini, B4, to split them).
(i) By primer box 7 with \(g(x,y)=ax+by\):
\[ \E[aX+bY]=\sum_{x,y}(ax+by)\,p(x,y)=a\sum_x x\underbrace{\sum_yp(x,y)}_{=p_X(x)}+b\sum_y y\underbrace{\sum_xp(x,y)}_{=p_Y(y)}=a\E[X]+b\E[Y]. \]We split one sum into two (allowed for absolutely convergent series) and used that summing the joint pmf over one variable gives the marginal of the other (Theorem 1.68). No independence is needed. The special case: take \(Y=1\) (the constant) and use (ii).
(ii) The constant \(c\) is a random variable with the single value \(c\), taken with probability 1: \(\E[c]=c\cdot1=c\).
(iii) If \(X\ge0\), every value \(x\) with \(p_X(x)>0\) is \(\ge0\), so every term \(x\,p_X(x)\) is \(\ge0\), and a sum of non-negative terms is \(\ge0\).
(iv) \(X-Y\ge0\), so by (iii) and (i): \(0\le\E[X-Y]=\E[X]-\E[Y]\).
(v) Independence of discrete variables means \(p(x,y)=p_X(x)\,p_Y(y)\) for all \(x,y\) (Definition 1.77(ii)). With \(g(x,y)=xy\):
\[ \E[XY]=\sum_{x,y}xy\,p_X(x)p_Y(y)=\Bigl(\sum_xx\,p_X(x)\Bigr)\Bigl(\sum_yy\,p_Y(y)\Bigr)=\E[X]\,\E[Y]. \]The middle step factors a double sum of products \(f(x)h(y)\) into a product of two sums, which is allowed for absolutely convergent series. ∎
The most useful line on this page is (i) without independence. It lets you compute the mean of a complicated count by writing it as a sum of indicators, even when those indicators depend on each other. The duck hunt (SoSe25 P5a) and the hypergeometric mean below both work this way. Property (v), by contrast, does need independence: for \(X=Y\sim\Ber(\frac12)\), \(\E[XY]=\E[X^2]=\frac12\ne\frac14=\E[X]\E[Y]\).
How to compute an expectation — the options, in the order to try them My addition
- Named distribution? Look it up in the table (Lemmas 2.26, 2.27, below).
- A sum of simpler pieces? Use linearity, often with indicators \(X=\sum_i\one_{A_i}\), so \(\E[X]=\sum_i\P(A_i)\).
- A function \(g(X)\)? Use LOTUS — do not compute the distribution of \(g(X)\).
- Non-negative with an easy tail? Use \(\E[X]=\sum_{n\ge1}\P(X\ge n)\) or \(\E[X]=\int_0^\infty\P(X>x)\,\mathrm dx\) (Sheet 7 Ex 3, below).
- A two-stage experiment? Condition on the first stage: \(\E[Y]=\E[\E[Y\mid X]]\) (Theorem 2.32).
- Otherwise compute the sum or integral directly — and check absolute convergence first.
Variance and standard deviation
The idea. Three random variables with mean 0: \(A=0\) always; \(B=\pm1\) with probability \(\frac12\) each; \(C=\pm10\) with probability \(\frac12\) each. Same centre, completely different spread. The mean alone cannot tell them apart. The variance measures the typical squared distance from the mean: \(0\), \(1\) and \(100\) here. Its square root, the standard deviation, is back in the units of \(X\): \(0\), \(1\), \(10\).
Why squares, not absolute values? (mine) \(\E[|X-\mu|]\) would also measure spread. Squares win because they expand algebraically — \((X-\mu)^2=X^2-2\mu X+\mu^2\) — so linearity of \(\E\) applies. That gives the shortcut \(\E[X^2]-\mu^2\) and makes variances of independent sums add up (Proposition 2.8(iv)), a sort of Pythagoras theorem for random variables.
Definition 2.5 variance, standard deviation Script 2.5
Let \(X\) be a real random variable whose mean \(\E[X]\) exists. The variance [Varianz] of \(X\) is
\[ \Var[X]=\E\bigl[(X-\E[X])^2\bigr], \]provided this expectation exists — for which \(\E[X^2]<\infty\) suffices. It is also written \(\sigma_X^2\). The standard deviation [Standardabweichung] is the non-negative root \(\sigma[X]=\sigma_X:=\sqrt{\Var[X]}\). The variance measures the squared size of the fluctuations of \(X\) around its mean; the standard deviation measures them in the original units.
Reading the formula. \(X-\E[X]\) is the random deviation from the mean; squaring makes every deviation positive and punishes large ones more; \(\E\) averages over all outcomes. By LOTUS (Lemma 2.2) with \(g(x)=(x-\mu)^2\): \(\Var[X]=\sum_x(x-\mu)^2p_X(x)\) or \(\int(x-\mu)^2p_X(x)\,\mathrm dx\).
Remark 2.6 the computational formula Script 2.6
\[ \Var[X]=\E[X^2]-(\E[X])^2 . \]Proof Script — each step explained
Write \(\mu_X:=\E[X]\), a fixed number.
\[ \begin{aligned} \Var[X]&=\E[(X-\mu_X)^2]=\E[X^2-2X\mu_X+\mu_X^2] &&\text{binomial formula }(a-b)^2=a^2-2ab+b^2\\ &=\E[X^2]-\E[2X\mu_X]+\E[\mu_X^2] &&\text{linearity, Prop. 2.4(i)}\\ &=\E[X^2]-2\mu_X\E[X]+\mu_X^2 &&\text{constants come out; }\E[c]=c\text{ (Prop. 2.4(ii))}\\ &=\E[X^2]-2\mu_X^2+\mu_X^2=\E[X^2]-\mu_X^2 . &&\E[X]=\mu_X \end{aligned} \]Two things follow at once. (a) Since \(\Var[X]\ge0\), \(\E[X^2]\ge(\E[X])^2\) — the first case of Jensen's inequality (§2.2). (b) The formula is the fast route in almost every exercise: compute \(\E[X]\) and \(\E[X^2]\) separately, then subtract. A classic slip is to write \(\E[X^2]-\E[X]\) — forgetting to square the mean.
Example 2.7 variance examples Script 2.7
(i) The biased three-sided die (\(\E[X]=1.7\)). By LOTUS, \(\E[X^2]=1^2\cdot0.5+2^2\cdot0.3+3^2\cdot0.2=0.5+1.2+1.8=3.5\). Hence \(\Var[X]=3.5-1.7^2=3.5-2.89=0.61\) and \(\sigma_X=\sqrt{0.61}\approx0.781\).
(ii) \(X\sim\Unif(a,b)\) (\(\E[X]=\frac{a+b}2\)). By LOTUS,
\[ \E[X^2]=\int_a^b\frac{x^2}{b-a}\,\mathrm dx=\frac{1}{b-a}\cdot\frac{b^3-a^3}{3}=\frac{a^2+ab+b^2}{3}, \]using \(b^3-a^3=(b-a)(b^2+ab+a^2)\) (multiply out the right side to check). Then, bringing both fractions to the common denominator 12:
\[ \Var[X]=\frac{a^2+ab+b^2}3-\frac{(a+b)^2}4=\frac{4a^2+4ab+4b^2-3a^2-6ab-3b^2}{12} =\frac{a^2-2ab+b^2}{12}=\frac{(b-a)^2}{12}. \]So \(\sigma_X=\frac{b-a}{\sqrt{12}}=\frac{b-a}{2\sqrt3}\approx0.29\,(b-a)\): the spread depends only on the length of the interval, not on where it sits — as it should.
Proposition 2.8 properties of variance Script 2.8
Let \(X,Y\) be real random variables, \(a,b\in\R\), all variances existing.
- Non-negativity: \(\Var[X]\ge0\), and \(\Var[X]=0\) iff \(\P(X=\E[X])=1\) (\(X\) is almost surely constant).
- Constants: \(\Var[b]=0\).
- Scaling and shifting: \(\Var[aX+b]=a^2\Var[X]\). Adding a constant does not change the variance.
- Sums of independent variables: if \(X\perp\!\!\!\perp Y\), then \(\Var[X+Y]=\Var[X]+\Var[Y]\). More generally, if \(X_1,\dots,X_n\) are pairwise independent, \(\Var[\sum_iX_i]=\sum_i\Var[X_i]\).
Proofs supplied by me — the script gives none
(i) \((X-\mu)^2\ge0\), so \(\Var[X]=\E[(X-\mu)^2]\ge0\) by Proposition 2.4(iii). If \(X=\mu\) almost surely, then \((X-\mu)^2=0\) almost surely and its expectation is 0. Conversely, suppose \(\Var[X]=0\). Discrete case: \(\sum_x(x-\mu)^2p_X(x)=0\) is a sum of non-negative terms, so every term is 0, so \(p_X(x)=0\) for every \(x\ne\mu\): all the mass sits at \(\mu\). General case: Markov's inequality (Theorem 2.38, next page — its proof does not use variance, so there is no circle) gives \(\P((X-\mu)^2\ge\frac1n)\le n\cdot\E[(X-\mu)^2]=0\) for every \(n\). The events \(\{(X-\mu)^2\ge\frac1n\}\) increase with \(n\) to \(\{X\ne\mu\}\), so by continuity from below (Proposition 1.19(iv)) \(\P(X\ne\mu)=\lim_n0=0\).
(ii) A constant equals its mean, so \((b-b)^2=0\).
(iii) \(\E[aX+b]=a\mu+b\) (Proposition 2.4(i)), so \((aX+b)-\E[aX+b]=a(X-\mu)\) — the \(b\) cancels. Hence \(\Var[aX+b]=\E[a^2(X-\mu)^2]=a^2\Var[X]\).
(iv) This is Proposition 2.12(vi) below with all covariances 0, and independent variables have covariance 0 (Proposition 2.12(v)). Only pairs enter the variance formula, which is why pairwise independence suffices — in fact "pairwise uncorrelated" suffices. ∎
Two traps. (1) For independent \(X,Y\): \(\Var[X-Y]=\Var[X]+\Var[-Y] =\Var[X]+(-1)^2\Var[Y]=\Var[X]+\Var[Y]\) — the variances add even for a difference. (2) \(\Var[2X]=4\Var[X]\), but for independent copies \(X_1,X_2\) of \(X\), \(\Var[X_1+X_2]=2\Var[X]\). Doubling one variable doubles every fluctuation; adding two independent ones lets fluctuations partly cancel. This is why averages of iid samples become precise (\(\Var[\bar X_n]=\sigma^2/n\), §2.4).
Covariance and correlation
The idea. Plot many samples of \((X,Y)\) as dots and draw a cross through the mean point \((\mu_X,\mu_Y)\). In the upper-right and lower-left quadrants, both deviations have the same sign, so the product \((x-\mu_X)(y-\mu_Y)\) is positive; in the other two quadrants it is negative. The covariance is the average of that product. Dots mostly along a rising line: positive. Mostly along a falling line: negative. Spread evenly: near zero.
Definition 2.9 covariance Script 2.9
Let \(X,Y\) be real random variables on \((\Omega,\Aa,\P)\) whose means exist. Their covariance [Kovarianz] is
\[ \Cov[X,Y]=\E\bigl[(X-\E[X])(Y-\E[Y])\bigr], \]provided this expectation exists; also written \(\sigma_{XY}\). Positive covariance: \(X\) tends to be large when \(Y\) is large. Negative: \(X\) tends to be small when \(Y\) is large.
Vector version. For random vectors \(X:\Omega\to\R^m\), \(Y:\Omega\to\R^n\) (measurable, with square-integrable components, i.e. \(\E[X_i^2]<\infty\) and \(\E[Y_j^2]<\infty\)), the covariance matrix is the \(m\times n\) matrix
\[ \Cov[X,Y]=\E\bigl[(X-\E[X])(Y-\E[Y])^\top\bigr]=\bigl(\Cov[X_i,Y_j]\bigr)_{i\in[m],\,j\in[n]}, \]an outer product (primer box 6) averaged entry by entry. \(\Cov[X]:=\Cov[X,X]\). For \(X=(X_1,X_2)^\top\) (my example):
\[ \Cov[X]=\begin{pmatrix}\Var[X_1]&\Cov[X_1,X_2]\\\Cov[X_2,X_1]&\Var[X_2]\end{pmatrix}, \]variances on the diagonal (Proposition 2.12(ii)), covariances off it, and symmetric (Proposition 2.12(i)). This matrix is the \(\Sigma\) of the multivariate Gaussian in §2.3.
Script typo: it writes \(Y=(Y_1,\dots,Y_m)^\top\); since \(Y\) is \(\R^n\)-valued it should be \((Y_1,\dots,Y_n)^\top\).
Remark 2.10 computational formula for covariance Script 2.10
\[ \Cov[X,Y]=\E[XY]-\E[X]\,\E[Y]. \]Proof Script — each step explained
With \(\mu_X=\E[X]\), \(\mu_Y=\E[Y]\): multiply out \((X-\mu_X)(Y-\mu_Y)=XY-X\mu_Y-Y\mu_X+\mu_X\mu_Y\). Linearity gives \(\E[XY]-\mu_Y\E[X]-\mu_X\E[Y]+\mu_X\mu_Y=\E[XY]-\mu_X\mu_Y-\mu_X\mu_Y+\mu_X\mu_Y=\E[XY]-\mu_X\mu_Y\).
Example 2.11 covariance of two random variables Script 2.11
Joint pmf of \((X,Y)\): \(p(0,0)=0.4\), \(p(0,1)=0.1\), \(p(1,0)=0.1\), \(p(1,1)=0.4\).
Marginals (add along rows / columns, Theorem 1.68): \(p_X(0)=0.4+0.1=0.5\), \(p_X(1)=0.5\), and the same for \(Y\). Means: \(\mu_X=\mu_Y=0\cdot0.5+1\cdot0.5=0.5\).
\(\E[XY]\): \(XY\) is 1 only when \(X=Y=1\), so \(\E[XY]=0\cdot0\cdot0.4+0\cdot1\cdot0.1+1\cdot0\cdot0.1+1\cdot1\cdot0.4=0.4\).
Covariance: \(\Cov[X,Y]=0.4-0.5\cdot0.5=0.15>0\): the two tend to agree. Indeed \(\P(Y=1\mid X=1)=\frac{p(1,1)}{p_X(1)}=\frac{0.4}{0.5}=0.8\).
My addition: \(\Var[X]=\Var[Y]=0.5-0.25=0.25\) (Bernoulli: \(p(1-p)\)), so the correlation (Definition 2.13) is \(\rho=\frac{0.15}{0.5\cdot0.5}=0.6\).
Proposition 2.12 properties of covariance Script 2.12
Let \(W,X,Y,Z\) be real random variables, \(a,b,c,d\in\R\), all covariances existing.
- Symmetry: \(\Cov[X,Y]=\Cov[Y,X]\).
- Relation to variance: \(\Cov[X,X]=\Var[X]\).
- Bilinearity: \(\Cov[aX+bY,Z]=a\Cov[X,Z]+b\Cov[Y,Z]\) and \(\Cov[X,cY+dZ]=c\Cov[X,Y]+d\Cov[X,Z]\).
- Constants: \(\Cov[X,c]=0\).
- Independence implies zero covariance: if \(X\perp\!\!\!\perp Y\), then \(\Cov[X,Y]=0\). The converse is false.
- Variance of a sum: \(\Var[X+Y]=\Var[X]+\Var[Y]+2\Cov[X,Y]\), and in general
For pairwise independent \(X_i\) all \(\Cov[X_i,X_j]\) with \(i\ne j\) vanish and \(\Var[\sum a_iX_i]=\sum a_i^2\Var[X_i]\).
Proofs supplied by me — (iii) and the two-variable (vi) are Sheet 6 Ex 1
(i), (ii) The product in the definition is symmetric in \(X\) and \(Y\); with \(Y=X\) it becomes \((X-\mu_X)^2\).
(iii) \((aX+bY)-\E[aX+bY]=a(X-\mu_X)+b(Y-\mu_Y)\). Multiply by \(Z-\mu_Z\) and take \(\E\): linearity splits it into \(a\Cov[X,Z]+b\Cov[Y,Z]\). The second slot follows by symmetry (i).
(iv) \(c-\E[c]=0\), so the product inside is 0.
(v) Remark 2.10 and Proposition 2.4(v): \(\E[XY]-\E[X]\E[Y]=0\).
(vi) By (ii) and bilinearity (iii), applied in each slot,
\[ \Var\Bigl[\sum_ia_iX_i\Bigr]=\Cov\Bigl[\sum_ia_iX_i,\sum_ja_jX_j\Bigr]=\sum_{i=1}^n\sum_{j=1}^na_ia_j\Cov[X_i,X_j]. \]Split the \(n^2\) terms: \(i=j\) gives \(a_i^2\Var[X_i]\); the terms with \(i\ne j\) come in pairs \((i,j)\), \((j,i)\) with equal value by symmetry, which gives \(2\sum_{i<j}\). ∎
Why the converse of (v) fails — Sheet 6 Ex 3, Sheet 8 Ex 3 and SoSe26 P2c below all give uncorrelated but dependent pairs. The simplest: \(X\) uniform on \(\{-1,0,1\}\), \(Y=X^2\). \(\E[XY]=\E[X^3]=0=\E[X]\E[Y]\), yet \(Y\) is a function of \(X\).
Definition 2.13 correlation coefficient Script 2.13
For real \(X,Y\) with \(\sigma_X>0\), \(\sigma_Y>0\), the (Pearson) correlation coefficient [Korrelationskoeffizient] is
\[ \rho_{X,Y}=\rho[X,Y]=\operatorname{corr}[X,Y]:=\frac{\Cov[X,Y]}{\sigma_X\sigma_Y} =\frac{\Cov[X,Y]}{\sqrt{\Var[X]\Var[Y]}}\in[-1,1]. \]It is dimensionless (measuring \(X\) in cm instead of m changes \(\Cov\) by a factor 100 but not \(\rho\)) and measures the strength and direction of the linear relationship. If \(\rho=0\), \(X\) and \(Y\) are called uncorrelated [unkorreliert].
Proposition 2.14 properties of the correlation coefficient Script 2.14
Let \(\sigma_X,\sigma_Y>0\).
- Range: \(-1\le\rho_{X,Y}\le1\).
- Perfect linear relationship: \(\rho_{X,Y}=1\) iff \(Y=aX+b\) almost surely for some \(a>0\), \(b\in\R\); \(\rho_{X,Y}=-1\) iff the same holds with \(a<0\).
- Invariance: for \(a,c\ne0\), \(\rho_{aX+b,\,cY+d}=\operatorname{sign}(ac)\,\rho_{X,Y}\), where \(\operatorname{sign}(t)\) is \(+1\) for \(t>0\) and \(-1\) for \(t<0\).
- Independence implies zero correlation; the converse is false: \(\rho=0\) only rules out a linear relationship.
Proofs supplied by me — the script gives none
(iii) By bilinearity and Proposition 2.12(iv), \(\Cov[aX+b,cY+d]=ac\Cov[X,Y]\). By Proposition 2.8(iii), \(\sigma_{aX+b}=\sqrt{a^2}\sigma_X=|a|\sigma_X\) and \(\sigma_{cY+d}=|c|\sigma_Y\). Divide: \(\frac{ac}{|a||c|}\rho_{X,Y}=\operatorname{sign}(ac)\rho_{X,Y}\).
(i) Standardise: \(U=\frac{X-\mu_X}{\sigma_X}\), \(V=\frac{Y-\mu_Y}{\sigma_Y}\). Then \(\Var[U]=\Var[V]=1\) and \(\Cov[U,V]=\rho\) (by (iii)). By Proposition 2.12(vi),
\[ 0\le\Var[U+V]=1+1+2\rho,\qquad 0\le\Var[U-V]=1+1-2\rho . \]The first gives \(\rho\ge-1\), the second \(\rho\le1\). (Equivalently: it is the Cauchy–Schwarz inequality \(|\E[UV]|\le\sqrt{\E[U^2]\E[V^2]}\), Analysis 1.3.)
(ii) \(\rho=1\) iff \(\Var[U-V]=0\) iff \(U-V\) is almost surely constant (Proposition 2.8(i)); since \(\E[U-V]=0\), the constant is 0, so \(V=U\), i.e. \(Y=\mu_Y+\frac{\sigma_Y}{\sigma_X}(X-\mu_X)\): linear with slope \(a=\sigma_Y/\sigma_X>0\). Conversely, if \(Y=aX+b\) with \(a>0\), then by (iii) \(\rho_{X,Y}=\rho_{X,aX+b}=\operatorname{sign}(a)\rho_{X,X}=1\) (and \(\rho_{X,X}=\Var[X]/\sigma_X^2=1\)). For \(-1\) use \(U+V\) and \(a<0\).
(iv) Proposition 2.12(v). ∎
Example 2.15 correlation coefficients in pictures Script 2.15
The script shows a well-known grid of scatter plots (taken from Wikipedia). Each plot shows many iid samples of a pair \((X,Y)\) as dots. Where the dots are dense, the joint pdf is large. So a scatter plot is a good picture of "what the distribution looks like".
- Top row: point clouds with \(\rho=1,0.8,0.4,0,-0.4,-0.8,-1\). The cloud flattens into a line as \(|\rho|\) approaches 1.
- Middle row: points exactly on lines of different steepness. All have \(\rho=1\) or \(\rho=-1\). So correlation is not the slope of a regression line: dividing by \(\sigma_X\sigma_Y\) removes the steepness and keeps only the direction. (The horizontal line in the middle of that row has \(\sigma_Y=0\), so \(\rho\) is undefined there.)
- Bottom row: rings, crosses, parabolas, clusters. All have \(\rho=0\). Yet all are dependent: in each picture, knowing \(X\) restricts where \(Y\) can be (on a ring, for example, \(Y\) must lie on the circle above or below \(X\)).
The widget reproduces these cases.
Definition 2.16 partial correlation coefficient Script 2.16
Let \(X\), \(Y\) and \(Z=(Z_1,\dots,Z_k)\) be random variables on one probability space. The partial correlation \(\rho_{X,Y\mid Z}=\rho[X,Y\mid Z]\) measures the linear relationship of \(X\) and \(Y\) after removing the linear effect of \(Z\). Let \(\hat X\), \(\hat Y\) be the best linear predictors of \(X\), \(Y\) from \(Z\), and \(X_{\mathrm{res}}=X-\hat X\), \(Y_{\mathrm{res}}=Y-\hat Y\) the residuals. Then \(\rho_{X,Y\mid Z}:=\rho_{X_{\mathrm{res}},Y_{\mathrm{res}}}\). For a single \(Z\),
\[ \rho_{X,Y\mid Z}=\frac{\rho_{X,Y}-\rho_{X,Z}\,\rho_{Y,Z}}{\sqrt{(1-\rho_{X,Z}^2)(1-\rho_{Y,Z}^2)}}, \qquad\text{provided }1-\rho_{X,Z}^2>0,\ 1-\rho_{Y,Z}^2>0. \]If \(\rho_{X,Y\mid Z}=0\), \(X\) and \(Y\) are partially uncorrelated given \(Z\). For several \(Z_i\) there are recursive formulas.
What "best linear predictor" means, and where the formula comes from supplied by me — the script only states it
Best linear predictor. Among all \(\hat X=\alpha+\beta Z\), choose \(\alpha,\beta\) to make the mean squared error \(\E[(X-\alpha-\beta Z)^2]\) smallest. Setting the partial derivatives in \(\alpha\) and \(\beta\) to zero (Analysis 11.2) gives \(\beta=\frac{\Cov[X,Z]}{\Var[Z]}\) and \(\alpha=\mu_X-\beta\mu_Z\), i.e. \(\hat X=\mu_X+\frac{\Cov[X,Z]}{\Var[Z]}(Z-\mu_Z)\) — the regression line.
Residual covariances. With \(X_{\mathrm{res}}=(X-\mu_X)-\beta_X(Z-\mu_Z)\) and similarly for \(Y\), bilinearity gives
\[ \Cov[X_{\mathrm{res}},Y_{\mathrm{res}}]=\Cov[X,Y]-\frac{\Cov[X,Z]\Cov[Y,Z]}{\Var[Z]},\qquad \Var[X_{\mathrm{res}}]=\Var[X](1-\rho_{X,Z}^2). \]Divide the first by \(\sqrt{\Var[X_{\mathrm{res}}]\Var[Y_{\mathrm{res}}]}\) and write every covariance as \(\rho\sigma\sigma\): the \(\sigma\)'s cancel and the formula appears.
Remark 2.17 interpretation: confounders Script 2.17
If \(X\) and \(Y\) are correlated only because both are driven by a third variable \(Z\) (a confounder), then \(\rho_{X,Y\mid Z}\) — the correlation with \(Z\) "held constant" — is near 0 even though \(\rho_{X,Y}\) is large. That suggests \(Z\) explains the relationship.
My numerical example. \(X\) = ice-cream sales, \(Y\) = swimming accidents, \(Z\) = temperature, with \(\rho_{X,Z}=0.8\), \(\rho_{Y,Z}=0.7\), \(\rho_{X,Y}=0.56\). Then \(\rho_{X,Y\mid Z}=\frac{0.56-0.8\cdot0.7}{\sqrt{(1-0.64)(1-0.49)}}=\frac{0}{\dots}=0\): ice cream does not cause accidents; hot days cause both.
Overview 2.18 notation Script 2.18
| expectation | \(\E[X]=\int x\,\mathrm d\P_X(x)=\int x\,p(x)\,\mathrm dx\) |
| variance | \(\Var[X]=\E[(X-\E[X])^2]=\E[X^2]-(\E[X])^2\) |
| standard deviation | \(\sigma[X]=\sqrt{\Var[X]}\) |
| covariance | \(\Cov[X,Y]=\E[(X-\E[X])(Y-\E[Y])]=\E[XY]-\E[X]\E[Y]\) |
| correlation | \(\rho[X,Y]=\Cov[X,Y]/(\sigma[X]\sigma[Y])\) |
| partial correlation | \(\rho[X,Y\mid Z]=\dfrac{\rho[X,Y]-\rho[X,Z]\rho[Y,Z]}{\sqrt{(1-\rho[X,Z]^2)(1-\rho[Y,Z]^2)}}\) |
Notation in the literature "varies wildly": \(P\) or \(\Pr\) for probability, \(f\) for pdfs, \(V\) for variance, \(\operatorname{var}(\cdot)\) with round brackets, even \(\E X\) without brackets. The script's motto: "anything goes".
Convention 2.19 integrability Script 2.19
Unless stated otherwise, random variables are tacitly assumed integrable (\(\E[|X|]<\infty\)) and square-integrable (\(\E[X^2]<\infty\)), so means and variances exist. Likewise, (joint) pdfs may be assumed to exist whenever convenient, unless the script points out that they may not.
In an exam this means: you do not need to check existence unless the problem says "if it exists" or uses a distribution without a mean (Cauchy / \(t_1\)). But the convention only grants you that the expectations exist — it grants nothing beyond that. SoSe26 P2a makes the point: there every \(\E[X_n]\) and \(\E[X]\) exist and are finite, and \(X_n\to X\) in distribution, yet \(\E[X_n]\not\to\E[X]\) (the counterexample is \(X_n=n\one_{\{U\le1/n\}}\) for \(U\sim\Unif(0,1)\), which has \(\E[X_n]=1\) for every \(n\) while \(X=0\)). That task belongs to §2.4.
Quantiles, the median, and simulating any distribution
The idea. "90 % of students finished within 80 minutes" names a quantile: the point below which a given fraction \(q\) of the probability lies. The median is the \(q=\frac12\) case. You read a quantile off the cdf: go up to height \(q\) on the vertical axis, then across until you hit the graph of \(F\), then down to the \(x\)-axis.
Definition 2.20 quantile, median Script 2.20
Let \(X\) be a real random variable and \(q\in(0,1)\). A \(q\)-quantile [\(q\)-Quantil] (a percentile if \(q\) is given in %) of \(X\) is any number \(x_q\) with
\[ \P(X\le x_q)\ge q\qquad\text{and}\qquad\P(X\ge x_q)\ge1-q . \]Equivalently \(F_X(x_q)\ge q\) and \(F_X(x_q^-)\le q\), where \(F_X(x^-)=\lim_{t\uparrow x}F_X(t)=\P(X<x)\) is the left limit of the cdf (the height just before a possible jump at \(x\)).
If \(F_X\) is continuous and strictly increasing, the \(q\)-quantile is unique: \(x_q=F_X^{-1}(q)\), the solution of \(F_X(x_q)=q\). (\(F_X^{-1}\) is the inverse function [Umkehrfunktion]: it undoes \(F_X\), so \(F_X^{-1}(q)\) is the one \(x\) with \(F_X(x)=q\); a strictly increasing function never takes the same value twice, which is why such an \(x\) is unique — see Analysis 5.1.) If \(F_X\) has flat pieces or jumps, quantiles need not be unique, and a common convention picks the smallest one. (\(\inf\), the infimum [Infimum], is the greatest lower bound of a set — see Analysis 1.2; for this set it is the smallest \(x\) with \(F_X(x)\ge q\), which exists because \(F_X\) is right-continuous, see Proposition 2.23 step 2.)
\[ x_q=\inf\{x\in\R\mid F_X(x)\ge q\}, \]the generalised inverse of \(F_X\), also called the quantile function.
Named quantiles. The median [Median] \(m=x_{0.5}\) splits the distribution into two equally probable halves. Quartiles: \(Q_1=x_{0.25}\), \(Q_2=x_{0.5}\) (the median), \(Q_3=x_{0.75}\). Deciles cut into 10 equal parts, percentiles into 100; the 5th/95th and 1st/99th percentiles are common in statistics, medicine and testing.
Why the two formulations are equivalent supplied by me
\(\P(X\le x)=F_X(x)\) is the definition of the cdf. For the other half, \(\P(X\ge x)=1-\P(X<x)=1-F_X(x^-)\) (complement), and \(\P(X<x)=\lim_{t\uparrow x}\P(X\le t)\) by continuity from below (Proposition 1.19(iv)) applied to \(\{X\le t\}\uparrow\{X<x\}\). So \(\P(X\ge x_q)\ge1-q\iff1-F_X(x_q^-)\ge1-q\iff F_X(x_q^-)\le q\).
Examples (mine). The game (0/1/10 with 0.5/0.4/0.1): \(F(x)=0.5\) for \(0\le x<1\). Every \(m\in[0,1]\) satisfies \(\P(X\le m)\ge0.5\) and \(\P(X\ge m)\ge0.5\), so all are medians; the convention picks \(\inf\{x:F(x)\ge0.5\}=0\). A fair die: \(F(3)=0.5\), so again \([3,4]\) are all medians. Continuous examples: the median of SoSe25 P3 (\(\sqrt2\), §1.3) and the value at risk of Sheet 5 Ex 1 (a 5 %-quantile, §1.3).
Example 2.21 quantiles of the exponential distribution Script 2.21
\(X\sim\Exp(\lambda)\): \(F_X(x)=1-e^{-\lambda x}\) for \(x\ge0\), 0 for \(x<0\) — continuous and strictly increasing on \([0,\infty)\). Solve \(F_X(x_q)=q\):
\[ 1-e^{-\lambda x_q}=q\iff e^{-\lambda x_q}=1-q\iff-\lambda x_q=\ln(1-q)\iff x_q=-\frac{\ln(1-q)}{\lambda}. \](Third step: take \(\ln\) of both sides, allowed since both are positive, and \(\ln e^{t}=t\) because \(\ln\) is the inverse function of \(\exp\); see Analysis 5.2.) The median is \(m=\frac{\ln2}{\lambda}\approx\frac{0.693}{\lambda}\), smaller than the mean \(\frac1\lambda\). A long right tail pulls the mean to the right of the median: the exponential distribution is right-skewed.
Remark 2.22 mean versus median Script 2.22 · start of Lecture 7
- The mean is the centre of mass. Every value influences it, including extreme ones; a very high outlier with little probability still moves it.
- The median is the middle value: at least 50 % of the mass at or below, at least 50 % at or above. It is robust: extreme values barely affect it. For skewed quantities (wealth in a country) the median is often the more representative "typical" value.
- The mean exists only if \(\E[|X|]<\infty\) (not for the Cauchy distribution); quantiles always exist (the generalised inverse is always a real number, Proposition 2.23 step 1).
- The mean is linear (Proposition 2.4(i)); the median is not (my counterexample: let \(X,Y\) be iid \(\Ber(0.4)\). Each has median 0: \(\P(X\le0)=0.6\ge\frac12\) and \(\P(X\ge0)=1\ge\frac12\), so 0 satisfies Definition 2.20 with \(q=\frac12\); and no larger value does, because \(\P(X\ge x)=0.4<\frac12\) for every \(x>0\). But \(X+Y\sim\Bin(2,0.4)\) has \(\P(X+Y\le0)=0.36<\frac12\), so 0 is no longer a median, while \(\P(X+Y\le1)=0.84\ge\frac12\) and \(\P(X+Y\ge1)=0.64\ge\frac12\) make 1 one: the median of the sum is \(1\ne0+0\)). The mean is the usual target of regression; "quantile regression" exists but is harder.
- Optimality. \(\mu=\E[X]\) is the \(c\) that minimises the mean squared error \(\E[(X-c)^2]\); the median \(m\) is a \(c\) that minimises the mean absolute error \(\E[|X-c|]\).
- For symmetric distributions (like the normal) mean and median coincide; for skewed ones the mean is pulled towards the longer tail. A full set of quantiles (quartiles, deciles) describes a distribution more completely than mean and variance.
Proof of (v) Script — each step explained
Mean. \(f(c):=\E[(X-c)^2]=\E[X^2-2cX+c^2]=\E[X^2]-2c\E[X]+c^2\) by linearity. This is a parabola in \(c\) opening upwards (primer box 5): \(f'(c)=-2\E[X]+2c=0\iff c=\E[X]\), and \(f''=2>0\), so \(\E[X]\) is the unique minimiser. Plugging it in gives \(f(\E[X])=\Var[X]\): the variance is the smallest possible mean squared error of a constant guess.
Median (assuming a pdf, and that differentiating under the integral is allowed). Split at \(c\):
\[ g(c)=\E[|X-c|]=\int_{-\infty}^c(c-x)p_X(x)\,\mathrm dx+\int_c^\infty(x-c)p_X(x)\,\mathrm dx . \]The script now says "by the Leibniz integral rule". That rule (differentiating an integral whose limits and integrand depend on \(c\)) is explained in B1. Here you can avoid it completely, using only the fundamental theorem of calculus and the product rule (this rewriting is my addition). Write \(F=F_X\) and \(p=p_X\), and assume \(\E[|X|]<\infty\) and that \(p\) is continuous at \(c\).
Step 1 — pull \(c\) out of the integrands. \(c\) is a constant inside \(\int\cdots\mathrm dx\), so it can be moved in front (linearity of the integral):
\[ \int_{-\infty}^c(c-x)p(x)\,\mathrm dx=c\underbrace{\int_{-\infty}^cp(x)\,\mathrm dx}_{=F(c)}-\int_{-\infty}^cx\,p(x)\,\mathrm dx,\qquad \int_c^\infty(x-c)p(x)\,\mathrm dx=\int_c^\infty x\,p(x)\,\mathrm dx-c\underbrace{\int_c^\infty p(x)\,\mathrm dx}_{=1-F(c)} . \]So
\[ g(c)=c\,F(c)-\int_{-\infty}^cx\,p(x)\,\mathrm dx+\int_c^\infty x\,p(x)\,\mathrm dx-c\,\bigl(1-F(c)\bigr). \]Now \(c\) appears only in two places: as an ordinary factor, and as a limit of an integral.
Step 2 — differentiate each of the four terms.
- The fundamental theorem of calculus [Hauptsatz der Differential- und Integralrechnung] (Analysis 8.3) says: if \(h\) is continuous at \(c\), then \(\frac{\mathrm d}{\mathrm dc}\int_a^ch(x)\,\mathrm dx=h(c)\) — the derivative of an integral with respect to its upper limit is the integrand at that limit. The lower limit \(-\infty\) does no harm: \(\int_{-\infty}^c=\int_{-\infty}^0+\int_0^c\), and the first piece is a constant with derivative 0. Applied to \(h=p\): \(F'(c)=p(c)\). Applied to \(h(x)=x\,p(x)\): \(\frac{\mathrm d}{\mathrm dc}\int_{-\infty}^cx\,p(x)\,\mathrm dx=c\,p(c)\). And since \(\int_c^\infty=\int_{-\infty}^\infty-\int_{-\infty}^c\) (the full integral is the constant \(\E[X]\)), \(\frac{\mathrm d}{\mathrm dc}\int_c^\infty x\,p(x)\,\mathrm dx=-c\,p(c)\).
- The product rule \((uv)'=u'v+uv'\) (Analysis 6.3) gives \(\bigl(c\,F(c)\bigr)'=1\cdot F(c)+c\,p(c)\) and \(\bigl(c\,(1-F(c))\bigr)'=1\cdot(1-F(c))+c\cdot(-p(c))\).
Step 3 — add up.
\[ g'(c)=\bigl[F(c)+c\,p(c)\bigr]-c\,p(c)+\bigl[-c\,p(c)\bigr]-\bigl[1-F(c)-c\,p(c)\bigr]=2F(c)-1 . \]All four \(c\,p(c)\) terms cancel (two with \(+\), two with \(-\)). This is what "the boundary contributions vanish" means in the script.
Step 4 — read off the minimum. \(g'(c)=2F(c)-1\) is negative while \(F(c)<\frac12\) (so \(g\) goes down), positive once \(F(c)>\frac12\) (so \(g\) goes up), and 0 exactly when \(F(c)=\frac12\), i.e. when \(\P(X\le c)=\frac12=\P(X>c)\): \(c\) is the median. Numeric check (mine): for \(X\sim\Unif(0,1)\), \(F(c)=c\) on \([0,1]\), and \(g(c)=\int_0^c(c-x)\,\mathrm dx+\int_c^1(x-c)\,\mathrm dx=\frac{c^2}2+\frac{(1-c)^2}2\), whose derivative \(c-(1-c)=2c-1\) is indeed \(2F(c)-1\); it vanishes at the median \(c=\frac12\).
Without a pdf, the same idea works as a slope argument: moving \(c\) a little to the right increases \(|x-c|\) for the mass left of \(c\) and decreases it for the mass right of \(c\). So \(g\) decreases while more than half the mass lies to the right and increases once more than half lies to the left — it is smallest exactly at the medians. The widget below shows both curves.
Proposition 2.23 quantile transformation Script 2.23
Let \(F:\R\to[0,1]\) be monotonically increasing and right-continuous with \(\lim_{c\to-\infty}F(c)=0\) and \(\lim_{c\to\infty}F(c)=1\) — a valid cdf (Theorem 1.25). On the probability space \(\bigl((0,1),\mathcal B|_{(0,1)},\Unif(0,1)\bigr)\) define
(Reading the space: the outcomes are the numbers \(u\) in \((0,1)\); the events are the Borel subsets of \((0,1)\), written \(\mathcal B|_{(0,1)}\) — "\(\mathcal B\) restricted to \((0,1)\)"; and \(\Unif(0,1)\) is Lebesgue measure \(\lambda\) restricted to \((0,1)\), which gives every interval its length, e.g. \(\P\bigl((0.2,0.5]\bigr)=0.3\). See B4 — Lebesgue measure.)
\[ X:(0,1)\to\R,\qquad X(u):=\inf\{c\in\R\mid F(c)\ge u\}, \]the quantile transformation. Then \(X\) is a random variable with \(F_X=F\).
Proof a streamlined version by me; the script's proof has the same four steps
Fix \(u\in(0,1)\) and let \(S_u:=\{c\in\R\mid F(c)\ge u\}\), so \(X(u)=\inf S_u\).
Step 1: \(X(u)\) is a real number. \(S_u\) is non-empty: \(F(c)\to1>u\) as \(c\to\infty\), so some \(c\) has \(F(c)\ge u\). \(S_u\) is bounded below: \(F(c)\to0<u\) as \(c\to-\infty\), so all sufficiently negative \(c\) are not in \(S_u\). A non-empty set of real numbers that is bounded below has a real infimum (the completeness of \(\R\): Analysis 1.2; also fact 5 in B1).
Step 2: the key equivalence \(X(u)\le c\iff u\le F(c)\).
- "\(\Leftarrow\)": if \(F(c)\ge u\), then \(c\in S_u\), and an infimum is \(\le\) every element: \(X(u)\le c\).
- "\(\Rightarrow\)": first, \(X(u)\in S_u\) itself. Take \(c_n\in S_u\) with \(c_n\to X(u)\) from above (possible by the definition of infimum: for every \(n\), \(X(u)+\frac1n\) is no longer a lower bound, so some \(c_n\in S_u\) has \(X(u)\le c_n<X(u)+\frac1n\); these \(c_n\) approach \(X(u)\) from the right); right-continuity gives \(F(X(u))=\lim_nF(c_n)\ge u\). Now if \(X(u)\le c\), monotonicity gives \(F(c)\ge F(X(u))\ge u\).
Step 3: \(X\) is measurable. By step 2, \(\{u\in(0,1)\mid X(u)\le c\}=\{u\in(0,1)\mid u\le F(c)\}=(0,F(c)]\cap(0,1)\), an interval, hence a Borel set. The sets \((-\infty,c]\) generate \(\mathcal B\), so this is enough (the generator criterion, Sheet 3 Ex 1 on §1.1).
Step 4: the cdf is right. The uniform distribution gives an interval its length: \(F_X(c)=\P(X\le c)=\lambda\bigl((0,F(c)]\cap(0,1)\bigr)=F(c)\). ∎
Note on the script's version. Its step (ii) contains the claim "\(X\circ F(c)=c\)". That is false when \(F\) is flat: if \(F=\frac12\) on \([1,2]\), then \(X(F(1.5))=X(\frac12)=1\ne1.5\). The claim is not needed — the equivalence of step 2 carries the whole proof.
Remark 2.24 inverse transform sampling Script 2.24
By Proposition 2.23, every distribution on \((\R,\mathcal B)\) is the distribution of a function of one uniform random number. A computer can produce (pseudo-)uniform numbers, so it can sample from any distribution whose cdf it knows:
- sample \(u_1,\dots,u_m\) from \(\Unif(0,1)\);
- find the generalised inverse \(F^{-1}=X\) of \(F\);
- output \(X(u_1),\dots,X(u_m)\).
The script's figure: uniform samples \(u_i\) on the vertical axis are sent across to the graph of \(F\) and down to the \(x\)-axis; the resulting \(x_i\) pile up where \(F\) is steep, i.e. where the pdf is large. The widget below does exactly this.
Example 2.25 inverse transform sampling for \(\Exp(\lambda)\) Script 2.25
From Example 2.21, \(X(u)=-\frac{\ln(1-u)}{\lambda}\), so \(X(U)\sim\Exp(\lambda)\) for \(U\sim\Unif(0,1)\). Since \(1-U\sim\Unif(0,1)\) as well, one usually implements \(x=-\frac{\ln u}{\lambda}\) — exactly the map of WiSe25 P3a (§1.3).
Means and variances of the named distributions
The script states both lemmas and skips the calculations ("I am not sure how much valuable insight one gains from these computations"). In exams you are expected to know the table, and several derivations are exercise-sheet tasks. So each row below has a derivation, labelled by source.
Lemma 2.26 discrete distributions Script 2.26
| distribution | \(\E[X]\) | \(\Var[X]\) | derivation |
|---|---|---|---|
| (i) \(\Lap_\Omega\), finite \(\Omega\subseteq\R\) | \(\frac1{|\Omega|}\sum_{\omega\in\Omega}\omega\) | \(\frac1{|\Omega|}\sum_{\omega}(\omega-\E[X])^2\) | Def 2.1 / 2.5 with \(p=\frac1{|\Omega|}\) |
| (ii) \(\Hyp(N,K,n)\) | \(n\frac KN\) | \(n\frac KN\bigl(1-\frac KN\bigr)\frac{N-n}{N-1}\) | mine, below |
| (iii) Bernoulli process \((X_1,\dots,X_n)\sim\Ber(n,p)\) | \(\E[X_i]=p\) | \(\Var[X_i]=p(1-p)\), \(\Cov[X_i,X_j]=0\) (\(i\ne j\)) | mine, below |
| (iv) \(\Bin(n,p)\) | \(np\) | \(np(1-p)\) | Sheet 6 Ex 2(ii) |
| (v) \(\Geo(p)\) on \(\{1,2,\dots\}\) | \(\frac1p\) | \(\frac{1-p}{p^2}\) | mean: Sheet 7 Ex 3(ii); variance: mine |
| (vi) \(\NegBin(r,p)\) on \(\{r,r+1,\dots\}\) | \(\frac rp\) | \(\frac{r(1-p)}{p^2}\) | mine, below |
| (vii) \(\Poi(\lambda)\) | \(\lambda\) | \(\lambda\) | Sheet 6 Ex 2(i) |
Derivations for (ii), (iii), (v) variance, (vi) supplied by me
(iii) Each \(X_i\sim\Ber(p)\): \(\E[X_i]=p\) and \(\E[X_i^2]=\E[X_i]=p\) (since \(0^2=0,1^2=1\)), so \(\Var[X_i]=p-p^2=p(1-p)\). The \(X_i\) are independent, so \(\Cov[X_i,X_j]=0\) for \(i\ne j\) (Proposition 2.12(v)).
(ii) Hypergeometric — indicators. Draw \(n\) of \(N\) items without replacement, \(K\) of them marked. Let \(I_j=1\) if the \(j\)-th draw is marked, so \(X=\sum_{j=1}^nI_j\). By symmetry every draw position is equally likely to hold any of the \(N\) items, so \(\P(I_j=1)=\frac KN\), and for \(j\ne k\), \(\P(I_j=I_k=1)=\frac KN\cdot\frac{K-1}{N-1}\) (first one marked, then one of the \(K-1\) remaining marked among \(N-1\) remaining). Linearity (despite dependence): \(\E[X]=n\frac KN\). Covariances:
\[ \Cov[I_j,I_k]=\frac{K(K-1)}{N(N-1)}-\frac{K^2}{N^2}=-\frac{K(N-K)}{N^2(N-1)}\qquad(j\ne k), \]negative, because a marked first draw makes a marked second draw less likely. By Proposition 2.12(vi) with \(n\) variances \(\frac KN(1-\frac KN)\) and \(n(n-1)\) ordered pairs:
\[ \Var[X]=n\frac KN\Bigl(1-\frac KN\Bigr)-n(n-1)\frac{K(N-K)}{N^2(N-1)} =n\frac KN\Bigl(1-\frac KN\Bigr)\Bigl(1-\frac{n-1}{N-1}\Bigr)=n\frac KN\Bigl(1-\frac KN\Bigr)\frac{N-n}{N-1}. \](Needs \(N\ge2\).) Compared with \(\Bin(n,\frac KN)\) (drawing with replacement), the variance is multiplied by the finite-population correction \(\frac{N-n}{N-1}\le1\): without replacement the sample is less variable, and for \(n=N\) it is not random at all.
(v) Geometric variance — condition on the first trial. Let \(X\sim\Geo(p)\). With probability \(p\) the first trial succeeds and \(X=1\); otherwise one trial is used up and, the trials being independent, the remaining waiting time is again \(\Geo(p)\): \(X=1+X'\) with \(X'\sim\Geo(p)\). By the law of total expectation (Theorem 2.32),
\[ \E[X]=p\cdot1+(1-p)\,\E[1+X]\ \Rightarrow\ p\,\E[X]=1\ \Rightarrow\ \E[X]=\tfrac1p , \] \[ \E[X^2]=p\cdot1+(1-p)\,\E[(1+X)^2]=p+(1-p)\bigl(1+2\E[X]+\E[X^2]\bigr) \ \Rightarrow\ p\,\E[X^2]=1+\tfrac{2(1-p)}p\ \Rightarrow\ \E[X^2]=\tfrac{2-p}{p^2}. \](Both moments are finite by the ratio test, so moving them across is legitimate.) Hence \(\Var[X]=\frac{2-p}{p^2}-\frac1{p^2}=\frac{1-p}{p^2}\).
(vi) Negative binomial. The number of trials until the \(r\)-th success is the sum of the waiting times between successes: \(X=G_1+\dots+G_r\), where \(G_i\) counts the trials after the \((i-1)\)-th success up to and including the \(i\)-th. These are iid \(\Geo(p)\) (the trials after a success are fresh independent trials). Linearity and Proposition 2.8(iv): \(\E[X]=\frac rp\), \(\Var[X]=\frac{r(1-p)}{p^2}\).
Lemma 2.27 continuous distributions Script 2.27
| distribution | \(\E[X]\) | \(\Var[X]\) | derivation |
|---|---|---|---|
| (i) \(\Unif(a,b)\) | \(\frac{a+b}2\) | \(\frac{(b-a)^2}{12}\) | Examples 2.3, 2.7 |
| (ii) \(\mathcal N(\mu,\sigma^2)\) | \(\mu\) | \(\sigma^2\) | mine, below |
| (iii) \(\Gamma(\alpha,\beta)\), rate \(\beta\) | \(\frac\alpha\beta\) | \(\frac\alpha{\beta^2}\) | mine, below |
| (iv) \(\Exp(\lambda)=\Gamma(1,\lambda)\) | \(\frac1\lambda\) | \(\frac1{\lambda^2}\) | (iii); mean also Sheet 7 Ex 3(iii) |
| (v) \(\chi^2_k=\Gamma(\frac k2,\frac12)\) | \(k\) | \(2k\) | (iii) |
| (vi) \(t_\nu\) | 0 if \(\nu>1\); undefined if \(\nu\le1\) | \(\frac\nu{\nu-2}\) if \(\nu>2\); \(\infty\) if \(1<\nu\le2\); undefined if \(\nu\le1\) | mine, below |
| (vii) \(\mathrm{Beta}(\alpha,\beta)\) | \(\frac\alpha{\alpha+\beta}\) | \(\frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}\) | mine, below |
Derivations for (ii), (iii), (v), (vi), (vii) supplied by me
(ii) Normal. Write \(X=\mu+\sigma Z\) with \(Z\sim\mathcal N(0,1)\) (the standardisation proved on §1.3). The standard density \(\varphi(z)=\frac1{\sqrt{2\pi}}e^{-z^2/2}\) is even, so \(z\varphi(z)\) is odd and \(\E[Z]=0\) (primer box 2; absolute integrability holds because \(e^{-z^2/2}\) decays faster than any power). For \(\E[Z^2]\) integrate by parts with \(u=z\), \(v'=z\varphi(z)\), \(v=-\varphi(z)\): \(\int z^2\varphi=\bigl[-z\varphi(z)\bigr]_{-\infty}^{\infty}+\int\varphi=0+1=1\). So \(\Var[Z]=1\), and by Propositions 2.4(i), 2.8(iii): \(\E[X]=\mu\), \(\Var[X]=\sigma^2\).
(iii) Gamma — all moments at once. With density \(\frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}\) on \(x>0\) and the integral \(\int_0^\infty x^{s-1}e^{-\beta x}\,\mathrm dx=\frac{\Gamma(s)}{\beta^s}\) (substitute \(y=\beta x\) in Definition 1.60, the definition \(\Gamma(s)=\int_0^\infty y^{s-1}e^{-y}\,\mathrm dy\) of the Gamma function, §1.3):
\[ \E[X^k]=\frac{\beta^\alpha}{\Gamma(\alpha)}\int_0^\infty x^{\alpha+k-1}e^{-\beta x}\,\mathrm dx =\frac{\beta^\alpha}{\Gamma(\alpha)}\cdot\frac{\Gamma(\alpha+k)}{\beta^{\alpha+k}} =\frac{\Gamma(\alpha+k)}{\Gamma(\alpha)\,\beta^k}. \]With \(\Gamma(\alpha+1)=\alpha\Gamma(\alpha)\): \(\E[X]=\frac\alpha\beta\), \(\E[X^2]=\frac{\alpha(\alpha+1)}{\beta^2}\), so \(\Var[X]=\frac{\alpha(\alpha+1)-\alpha^2}{\beta^2}=\frac\alpha{\beta^2}\). (iv) is \(\alpha=1,\beta=\lambda\); (v) is \(\alpha=\frac k2,\beta=\frac12\): \(\frac{k/2}{1/2}=k\) and \(\frac{k/2}{1/4}=2k\).
(vi) Student's t. The density is proportional to \((1+x^2/\nu)^{-(\nu+1)/2}\), which behaves like \(|x|^{-(\nu+1)}\) for large \(|x|\). So \(\int|x|p(x)\,\mathrm dx\) converges iff \(\nu+1-1>1\), i.e. \(\nu>1\) (compare \(\int^\infty x^{-s}\,\mathrm dx<\infty\iff s>1\), Analysis 9.1); then the mean is 0 by symmetry. Likewise \(\int x^2p\) converges iff \(\nu>2\); for \(1<\nu\le2\) the mean exists but \(\E[X^2]=\infty\). For \(\nu>2\), use the representation \(T=Z/\sqrt{V/\nu}\) with \(Z\sim\mathcal N(0,1)\) independent of \(V\sim\chi^2_\nu\) (mentioned on §1.3; the script does not prove it): \(\E[T^2]=\nu\,\E[Z^2]\,\E[1/V]\), and by the Gamma moment formula with \(k=-1\), \(\E[1/V]=\frac{\Gamma(\nu/2-1)}{\Gamma(\nu/2)}\cdot\frac12=\frac{1/2}{\nu/2-1}=\frac1{\nu-2}\). So \(\Var[T]=\frac\nu{\nu-2}\).
(vii) Beta. Same trick with the Beta integral: \(\E[X^k]=\frac{B(\alpha+k,\beta)}{B(\alpha,\beta)}\). Using \(B=\frac{\Gamma\Gamma}{\Gamma}\) and \(\Gamma(s+1)=s\Gamma(s)\): \(\E[X]=\frac\alpha{\alpha+\beta}\), \(\E[X^2]=\frac{\alpha(\alpha+1)}{(\alpha+\beta)(\alpha+\beta+1)}\). Subtracting \(\E[X]^2\) over the common denominator \((\alpha+\beta)^2(\alpha+\beta+1)\) leaves the numerator \(\alpha[(\alpha+1)(\alpha+\beta)-\alpha(\alpha+\beta+1)]=\alpha\beta\).
Conditional expectation
The idea. You are told the value of \(X\). What is your best guess of \(Y\) now? Take the conditional distribution of \(Y\) given \(X=x\) (§1.4, Definition 1.78) and compute its mean. That number depends on \(x\), so it is a function \(h(x)=\E[Y\mid X=x]\). Plugging in the random \(X\) gives a random variable \(\E[Y\mid X]=h(X)\): your guess, before you know which \(x\) will turn up.
A small example (mine). Roll a die; \(X\)=1 if the roll is even, 0 if odd; \(Y\) = the roll. Given \(X=1\), \(Y\) is uniform on \(\{2,4,6\}\), so \(\E[Y\mid X=1]=4\). Given \(X=0\), \(\E[Y\mid X=0]=3\). So \(\E[Y\mid X]=3+X\), a random variable equal to 3 or 4 with probability \(\frac12\) each — and its mean \(3.5\) is \(\E[Y]\). That last observation is the law of total expectation (Theorem 2.32).
Definition 2.28 conditional expectation given \(X=x\) Script 2.28
The conditional expectation [bedingter Erwartungswert] of \(Y\) given \(X=x\), \(\E[Y\mid X=x]\), is the expected value of the conditional distribution of \(Y\) given \(X=x\):
- discrete, with \(p_X(x)>0\): \(\displaystyle\E[Y\mid X=x]=\sum_yy\,p_{Y|X=x}(y)=\sum_yy\,\frac{p_{X,Y}(x,y)}{p_X(x)}\);
- continuous, with \(p_X(x)>0\): \(\displaystyle\E[Y\mid X=x]=\int_{-\infty}^{\infty}y\,p_{Y|X=x}(y)\,\mathrm dy =\int_{-\infty}^{\infty}y\,\frac{p_{X,Y}(x,y)}{p_X(x)}\,\mathrm dy\).
\(\E[Y\mid X=x]\) is a function of \(x\).
Example 2.29 conditional expectation Script 2.29
The joint pmf of Example 2.11: \(p(0,0)=0.4\), \(p(0,1)=0.1\), \(p(1,0)=0.1\), \(p(1,1)=0.4\), with \(p_X(0)=p_X(1)=0.5\).
- Given \(X=0\): \(p_{Y|X=0}(0)=\frac{0.4}{0.5}=0.8\), \(p_{Y|X=0}(1)=\frac{0.1}{0.5}=0.2\), so \(\E[Y\mid X=0]=0\cdot0.8+1\cdot0.2=0.2\).
- Given \(X=1\): \(p_{Y|X=1}(0)=0.2\), \(p_{Y|X=1}(1)=0.8\), so \(\E[Y\mid X=1]=0.8\).
My addition: as a random variable (Definition 2.30), \(\E[Y\mid X]=0.2+0.6X\). Check of Theorem 2.32: \(\E[\E[Y\mid X]]=0.5\cdot0.2+0.5\cdot0.8=0.5=\E[Y]\) ✓. The slope 0.6 is the correlation from Example 2.11 — for two \(\{0,1\}\)-variables with equal variances the conditional mean is exactly the regression line.
Definition 2.30 conditional expectation as a random variable Script 2.30
Let \(h(x):=\E[Y\mid X=x]\). The conditional expectation of \(Y\) given \(X\) is the random variable \(\E[Y\mid X]:=h(X)\): whenever \(X\) takes the value \(x\), it takes the value \(\E[Y\mid X=x]\).
Read the notation carefully: \(\E[Y\mid X=x]\) is a number (for fixed \(x\)), \(\E[Y\mid X]\) is a random variable, a function of \(X\). SoSe26 P2c tests exactly this distinction.
Remark 2.31 the best guess Script 2.31
\(\E[Y\mid X]\) is the best predictor of \(Y\) from \(X\) in the sense of mean squared error. It satisfies
\[ \E\bigl[(Y-\E[Y\mid X])\,g(X)\bigr]=0\qquad\text{for every suitable function }g : \]the prediction error is "orthogonal" to everything you can compute from \(X\). In machine learning, every regression method (linear regression, random forests, neural networks) is an attempt to estimate \(\E[Y\mid X]\).
Proofs of both claims, discrete case supplied by me — the script only states them
Orthogonality. Group the double sum by \(x\) and write \(p(x,y)=p_X(x)\,p_{Y|X=x}(y)\):
\[ \E[(Y-h(X))g(X)]=\sum_xg(x)\,p_X(x)\underbrace{\sum_y\bigl(y-h(x)\bigr)p_{Y|X=x}(y)}_{=h(x)-h(x)=0}=0 . \]The inner sum is \(\E[Y\mid X=x]-h(x)\cdot1\), which is 0 by the definition of \(h\).
Best predictor. Let \(f(X)\) be any other prediction. Insert \(\pm h(X)\):
\[ \E[(Y-f(X))^2]=\E[(Y-h(X))^2]+\E[(h(X)-f(X))^2]+2\,\E\bigl[(Y-h(X))\,(h(X)-f(X))\bigr]. \]The last term is 0 by orthogonality with \(g=h-f\); the middle term is \(\ge0\). So \(\E[(Y-f(X))^2]\ge\E[(Y-h(X))^2]\), with equality iff \(f(X)=h(X)\) almost surely. ∎ With \(X\) constant this is the "mean minimises squared error" of Remark 2.22(v).
Theorem 2.32 law of total expectation (tower property, iterated expectation) Script 2.32
For real random variables \(X,Y\) (with the relevant expectations existing),
\[ \E[Y]=\E\bigl[\E[Y\mid X]\bigr]. \]In the discrete case: \(\E[Y]=\sum_x\E[Y\mid X=x]\,p_X(x)\) — the overall mean is the weighted average of the group means. It is the expectation version of the law of total probability (Theorem 1.70).
Proof Script (continuous case) — each step explained
Let \(h(x)=\E[Y\mid X=x]=\int y\frac{p_{X,Y}(x,y)}{p_X(x)}\,\mathrm dy\).
\[ \begin{aligned} \E[\E[Y\mid X]]&=\E[h(X)]=\int h(x)\,p_X(x)\,\mathrm dx &&\text{LOTUS (Lemma 2.2)}\\ &=\int\Bigl(\int y\,\frac{p_{X,Y}(x,y)}{p_X(x)}\,\mathrm dy\Bigr)p_X(x)\,\mathrm dx &&\text{insert }h\\ &=\iint y\,p_{X,Y}(x,y)\,\mathrm dy\,\mathrm dx &&p_X(x)\text{ cancels (where }p_{X,Y}\ne0\text{, }p_X>0)\\ &=\int y\Bigl(\int p_{X,Y}(x,y)\,\mathrm dx\Bigr)\mathrm dy &&\text{swap the order (Fubini, B4)}\\ &=\int y\,p_Y(y)\,\mathrm dy=\E[Y] &&\text{marginal density (Thm. 1.68)} \end{aligned} \]The discrete case is the same with sums.
Example 2.33 customers and purchases Script 2.33
The number of customers in a day is \(N\sim\Poi(\lambda)\); each customer independently buys with probability \(q\); \(K\) = number of purchases. Given \(N=n\), \(K\) counts successes in \(n\) Bernoulli trials: "\(K\mid N=n\sim\Bin(n,q)\)" — shorthand, as the script admits, for \(p_{K|N=n}=p_{\Bin(n,q)}\). So \(\E[K\mid N=n]=nq\) (Lemma 2.26(iv)), i.e. \(\E[K\mid N]=Nq\), and
\[ \E[K]=\E[\E[K\mid N]]=\E[Nq]=q\,\E[N]=q\lambda . \]In fact \(K\sim\Poi(q\lambda)\) ("thinning" a Poisson count gives a Poisson count). The variance computed in Example 2.36, \(\lambda q\), agrees with that.
Definition 2.34 conditional variance Script 2.34
The conditional variance of \(Y\) given \(X=x\) is the variance of the conditional distribution:
\[ \Var[Y\mid X=x]=\E\bigl[(Y-\E[Y\mid X=x])^2\bigm| X=x\bigr]=\E[Y^2\mid X=x]-\bigl(\E[Y\mid X=x]\bigr)^2 . \](The second form is Remark 2.6 applied to the conditional distribution.) \(\Var[Y\mid X]\) is the random variable that equals \(\Var[Y\mid X=x]\) when \(X=x\).
Theorem 2.35 law of total variance Script 2.35
\[ \Var[Y]=\E\bigl[\Var[Y\mid X]\bigr]+\Var\bigl[\E[Y\mid X]\bigr]. \]In words: total variance = expected conditional variance ("within the groups") + variance of the conditional expectation ("between the groups").
Proof Script — each step explained
Let \(\mu_Y=\E[Y]\) and \(h(X)=\E[Y\mid X]\). Insert \(\pm h(X)\) and expand the square \((a+b)^2=a^2+b^2+2ab\) with \(a=Y-h(X)\), \(b=h(X)-\mu_Y\):
\[ \Var[Y]=\E[(Y-h(X))^2]+\E[(h(X)-\mu_Y)^2]+2\,\E[(Y-h(X))(h(X)-\mu_Y)] . \]Second term. By Theorem 2.32, \(\E[h(X)]=\E[Y]=\mu_Y\), so this is \(\E[(h(X)-\E[h(X)])^2]=\Var[\E[Y\mid X]]\).
First term. Apply the tower property to the random variable \((Y-h(X))^2\): its conditional expectation given \(X=x\) is \(\E[(Y-h(x))^2\mid X=x]=\Var[Y\mid X=x]\) by Definition 2.34 (since \(h(x)=\E[Y\mid X=x]\)). So the first term is \(\E[\Var[Y\mid X]]\).
Cross term. With \(g(X)=h(X)-\mu_Y\) it is \(2\E[(Y-h(X))g(X)]=0\) by the orthogonality of Remark 2.31. The script argues the same way: conditionally on \(X\), \(g(X)\) is a known constant and can be pulled out, leaving \(\E[Y-h(X)\mid X]=h(X)-h(X)=0\). ∎
Example 2.36 total variance of the purchases Script 2.36
Continuing Example 2.33: \(\Var[K\mid N=n]=nq(1-q)\) (binomial variance), so \(\Var[K\mid N]=Nq(1-q)\).
- Within: \(\E[\Var[K\mid N]]=q(1-q)\E[N]=q(1-q)\lambda\).
- Between: \(\Var[\E[K\mid N]]=\Var[Nq]=q^2\Var[N]=q^2\lambda\) (Proposition 2.8(iii); Poisson variance \(\lambda\)).
So \(\Var[K]=q(1-q)\lambda+q^2\lambda=\lambda q(1-q+q)=\lambda q\). Checks: \(q=1\) (everyone buys) gives \(K=N\) and \(\Var[K]=\lambda\) ✓; \(q=0\) gives \(K=0\) and \(\Var[K]=0\) ✓.
Remark 2.37 Bayesian reading: aleatoric and epistemic uncertainty Script 2.37
If \(Y\) is a predicted outcome and \(\theta\) the model parameters, then in \(\Var[Y]=\E[\Var[Y\mid\theta]]+\Var[\E[Y\mid\theta]]\) the first term is aleatoric uncertainty — randomness of \(Y\) that remains even if the parameters were known (within-model variance) — and the second is epistemic uncertainty — our uncertainty about the parameters, i.e. how much the mean prediction moves across plausible parameter values (between-model variance). More data shrinks the second, never the first. (Bayesian inference is §3.5.)
Exercise-sheet tasks
Sheet 6, Exercise 1 — the rules for variance and covariance Sheet 6 · Ex 1
For square-integrable \(X,Y:\Omega\to\R\), random vectors \(Z_1,Z_2,Z_3:\Omega\to\R^n\) and \(a,b\in\R\), verify from the definitions and the properties of \(\E\):
\[ \Var[aX+bY]=a^2\Var[X]+b^2\Var[Y]+2ab\Cov[X,Y],\qquad \Cov[aZ_1+bZ_2,Z_3]=a\Cov[Z_1,Z_3]+b\Cov[Z_2,Z_3]. \]Solution
First identity. Start from Remark 2.6 for the variable \(aX+bY\): \(\Var[aX+bY]=\E[(aX+bY)^2]-(\E[aX+bY])^2\). Expand both squares with \((u+v)^2=u^2+2uv+v^2\) and use linearity:
\[ \begin{aligned} \Var[aX+bY]&=\bigl(a^2\E[X^2]+b^2\E[Y^2]+2ab\E[XY]\bigr)-\bigl(a^2(\E[X])^2+b^2(\E[Y])^2+2ab\E[X]\E[Y]\bigr)\\ &=a^2\bigl(\E[X^2]-(\E[X])^2\bigr)+b^2\bigl(\E[Y^2]-(\E[Y])^2\bigr)+2ab\bigl(\E[XY]-\E[X]\E[Y]\bigr)\\ &=a^2\Var[X]+b^2\Var[Y]+2ab\Cov[X,Y], \end{aligned} \]by regrouping terms with the same coefficient, then Remarks 2.6 and 2.10.
Second identity. (The covariance matrix is \(\E\bigl[(Z-\E Z)(W-\E W)^\top\bigr]\), an outer product "column times row" whose \((i,j)\) entry is the \(i\)-th entry of the column times the \(j\)-th entry of the row — primer box 6, or more slowly B5.) The covariance matrix is computed entry by entry: \((\Cov[Z,W])_{ij}=\Cov[Z_i,W_j]\) (Definition 2.9). The \(i\)-th component of \(aZ_1+bZ_2\) is \(a(Z_1)_i+b(Z_2)_i\), so
\[ \bigl(\Cov[aZ_1+bZ_2,Z_3]\bigr)_{ij}=\E\Bigl[\bigl(a((Z_1)_i-\E[(Z_1)_i])+b((Z_2)_i-\E[(Z_2)_i])\bigr)\bigl((Z_3)_j-\E[(Z_3)_j]\bigr)\Bigr] \]and linearity of \(\E\) splits this into \(a(\Cov[Z_1,Z_3])_{ij}+b(\Cov[Z_2,Z_3])_{ij}\). Equal in every entry means equal as matrices.
Note on the official solution: the third line of its variance computation writes \(a^2\bigl(\E[X^2]-(\E[X])^2\bigr)^2\) — the outer square is a typo (likewise for the \(b^2\) term); the next line has it right.
Sheet 6, Exercise 2 — mean and variance of Poisson and binomial Sheet 6 · Ex 2
Compute \(\E[X]\) and \(\Var[X]\) for (i) \(X\) with pmf \(\rho(n)=\frac{\lambda^n}{n!}e^{-\lambda}\) on \(\N\) (that is \(\Poi(\lambda)\)); (ii) \(X\sim\Bin(n,p)\). Hint: write \(X=\sum_{i=1}^nY_i\) with \(Y_i\) iid \(\Ber(p)\).
Solution
(i) Mean. The \(n=0\) term is 0, and \(\frac{n}{n!}=\frac1{(n-1)!}\) for \(n\ge1\):
\[ \E[X]=\sum_{n=0}^\infty n\frac{\lambda^n}{n!}e^{-\lambda}=\lambda e^{-\lambda}\sum_{n=1}^\infty\frac{\lambda^{n-1}}{(n-1)!} =\lambda e^{-\lambda}\sum_{m=0}^\infty\frac{\lambda^m}{m!}=\lambda e^{-\lambda}e^{\lambda}=\lambda , \]with the index shift \(m=n-1\) and the exponential series \(\sum_m\frac{\lambda^m}{m!}=e^\lambda\) (Analysis 3.4).
The index shift, spelled out. An index shift only renames the counter; the terms themselves do not change. Write the first terms of the sum after dropping \(n=0\): \(\sum_{n=1}^\infty\frac{\lambda^{n-1}}{(n-1)!}=\frac{\lambda^0}{0!}+\frac{\lambda^1}{1!}+\frac{\lambda^2}{2!}+\dots\) (for \(n=1,2,3,\dots\)). Calling \(m:=n-1\), the counter \(m\) runs through \(0,1,2,\dots\) exactly when \(n\) runs through \(1,2,3,\dots\), and the term is \(\frac{\lambda^m}{m!}\) — the same list \(1+\lambda+\frac{\lambda^2}2+\dots\). Rule: replace \(n\) by \(m+1\) everywhere, and shift both limits by one (\(n=1\) becomes \(m=0\)). The same shift with \(m=n-2\) (\(n=2\) becomes \(m=0\)) is used for \(\E[X(X-1)]\) below. More on shifts in B3.
(i) Variance — the factorial-moment trick. \(\E[X^2]\) directly is awkward because \(n^2\) does not cancel with \(n!\). But \(n(n-1)\) does: \(\frac{n(n-1)}{n!}=\frac{1}{(n-2)!}\) for \(n\ge2\) (and the terms \(n=0,1\) vanish). So
\[ \E[X(X-1)]=\lambda^2e^{-\lambda}\sum_{n=2}^\infty\frac{\lambda^{n-2}}{(n-2)!}=\lambda^2 . \]Since \(X^2=X(X-1)+X\), linearity gives \(\E[X^2]=\lambda^2+\lambda\) and \(\Var[X]=\lambda^2+\lambda-\lambda^2=\lambda\).
(ii) Each \(Y_i\sim\Ber(p)\) has \(\E[Y_i]=p\), \(\Var[Y_i]=p-p^2=p(1-p)\). Linearity (no independence needed): \(\E[X]=\sum_i\E[Y_i]=np\). Independence (Proposition 2.8(iv)): \(\Var[X]=\sum_i\Var[Y_i]=np(1-p)\).
Why the direct route is worse: \(\sum_kk\binom nkp^k(1-p)^{n-k}\) needs \(k\binom nk=n\binom{n-1}{k-1}\) and the binomial theorem; the indicator route needs nothing.
Notes on the official sheet: the hint refers to "Exercise 4", which does not exist on Sheet 6 (it presumably means the independence property, Ex 3(i) / Proposition 2.8(iv)); and the last display writes \(\sum_i\Var[X_i]\) where \(\sum_i\Var[Y_i]\) is meant.
Sheet 6, Exercise 3 — uncorrelated is weaker than independent Sheet 6 · Ex 3
For square-integrable \(X,Y\) with joint pdf: (i) if \(X\perp\!\!\!\perp Y\), they are uncorrelated; (ii) give an example of uncorrelated but dependent \(X,Y\). Hint: \(Y=X^2\); show dependence with cdfs.
Solution
(i) Independence means \(p_{X,Y}(x,y)=p_X(x)p_Y(y)\) (Definition 1.77(iii)). Then, splitting the double integral of a product into a product of integrals (Fubini),
\[ \E[XY]=\iint xy\,p_X(x)p_Y(y)\,\mathrm dx\,\mathrm dy=\int x\,p_X(x)\,\mathrm dx\int y\,p_Y(y)\,\mathrm dy=\E[X]\E[Y], \]so \(\Cov[X,Y]=0\) and \(\rho_{X,Y}=0\) (the covariance is its numerator).
(ii) \(X\sim\Unif(-1,1)\), \(p_X=\frac12\) on \([-1,1]\), \(Y=X^2\). \(\E[X]=0\), and \(\E[XY]=\E[X^3]=\int_{-1}^1\frac{x^3}2\,\mathrm dx=\bigl[\frac{x^4}8\bigr]_{-1}^1=\frac18-\frac18=0\) (odd integrand: \((-x)^3=-x^3\), so the area left of 0 cancels the area right of 0; primer box 2 and Analysis 8.2). So \(\Cov[X,Y]=0-0\cdot\E[Y]=0\): uncorrelated.
Dependence. For \(y\in(0,1]\): \(F_Y(y)=\P(X^2\le y)=\P(-\sqrt y\le X\le\sqrt y)=\sqrt y\), and \(F_X(x)=\frac{x+1}2\) on \([-1,1]\). For \(x\ge-\sqrt y\): \(F_{X,Y}(x,y)=\P(-\sqrt y\le X\le\min\{x,\sqrt y\})=\frac12(\min\{x,\sqrt y\}+\sqrt y)\). At \(x=y=\frac14\) (\(\sqrt y=\frac12\)): \(F_{X,Y}=\frac12(\frac14+\frac12)=\frac38\), while \(F_X F_Y=\frac58\cdot\frac12=\frac5{16}\ne\frac38\). The joint cdf is not the product: dependent.
An even quicker witness: \(\P(X\le-\frac12,\ Y\le\frac1{16})=0\) (if \(X\le-\frac12\) then \(Y\ge\frac14\)), but \(\P(X\le-\frac12)\P(Y\le\frac1{16})=\frac14\cdot\frac14>0\). Visually: all the mass sits on the parabola \(y=x^2\), symmetric about the \(y\)-axis — no linear trend, but knowing \(X\) pins \(Y\) down completely.
Notes on the official solution: in (i) its second integral is written \(\int x\,p_Y(y)\,\mathrm dy\); the integrand must be \(y\,p_Y(y)\), otherwise the result would not be \(\E[Y]\) (a typo — the line before and the conclusion are right). In (ii) its formula for \(F_{X,Y}\) is stated "for \(x\in[-1,1]\)" but only holds for \(x\ge-\sqrt y\) (for smaller \(x\) the probability is 0, and the formula would go negative); and it asserts \(\ne\) without exhibiting a point — the point above supplies it.
Sheet 7, Exercise 1 — conditional expectations on a wedge Sheet 7 · Ex 1
\(p_{X,Y}(x,y)=e^{-y}\) if \(0\le x\le y\), 0 otherwise. (i) Check it is a pdf. (ii) Compute \(\E[X\mid Y]\). (iii) Compute \(\E[Y\mid X]\).
Solution
(i) \(p\ge0\). The density lives on the wedge \(\{0\le x\le y\}\), which is not a rectangle, so the inner integration limits depend on the outer variable. Read them off by fixing \(x\ge0\) and asking which \(y\) are allowed: exactly \(y\ge x\). (In the other order: fix \(y\ge0\); then \(0\le x\le y\) — this is the order used for \(p_Y\) in (ii).) How to set up and swap such limits is shown on B4 — integrals over non-rectangular regions. Integrate \(y\) first over \([x,\infty)\), then \(x\) over \([0,\infty)\): \(\int_0^\infty\int_x^\infty e^{-y}\,\mathrm dy\,\mathrm dx=\int_0^\infty e^{-x}\,\mathrm dx=1\).
(ii) Marginal of \(Y\): for \(y\ge0\), \(p_Y(y)=\int_0^ye^{-y}\,\mathrm dx=ye^{-y}\) (a \(\Gamma(2,1)\) density), and 0 for \(y<0\). Conditional density for \(y>0\): \(p_{X|Y=y}(x)=\frac{e^{-y}}{ye^{-y}}=\frac1y\) on \(0\le x\le y\): given \(Y=y\), \(X\) is uniform on \([0,y]\). Its mean is the midpoint: \(\E[X\mid Y=y]=\frac y2\), so \(\E[X\mid Y]=\frac Y2\).
(iii) Marginal of \(X\): for \(x\ge0\), \(p_X(x)=\int_x^\infty e^{-y}\,\mathrm dy=e^{-x}\) — so \(X\sim\Exp(1)\). Conditional density: \(p_{Y|X=x}(y)=\frac{e^{-y}}{e^{-x}}=e^{-(y-x)}\) for \(y\ge x\): given \(X=x\), \(Y-x\sim\Exp(1)\). So
\[ \E[Y\mid X=x]=e^{x}\int_x^\infty y\,e^{-y}\,\mathrm dy=e^x\Bigl(\bigl[-ye^{-y}\bigr]_x^\infty+\int_x^\infty e^{-y}\,\mathrm dy\Bigr)=e^x(xe^{-x}+e^{-x})=x+1 , \]by parts with \(u=y\), \(v'=e^{-y}\). Hence \(\E[Y\mid X]=X+1\).
Check with the tower property. \(\E[Y]=\E[X+1]=1+1=2\), and \(Y\sim\Gamma(2,1)\) has mean \(2\) ✓. \(\E[X]=\E[Y/2]=1\), and \(X\sim\Exp(1)\) has mean 1 ✓. The shape of (iii) is memorylessness (§1.4): having waited \(x\), the extra wait is again \(\Exp(1)\).
Sheet 7, Exercise 3 — expectations from tails Sheet 7 · Ex 3
(i) For \(X:\Omega\to\N\) show \(\E[X]=\sum_{n=1}^\infty\P(X\ge n)\) and say in one sentence what it means. (ii) Use it for \(X\sim\Geo(p)\). (iii) For non-negative continuous \(X\), \(\E[X]=\int_0^\infty(1-F_X(x))\,\mathrm dx\); use it for \(\Exp(\lambda)\).
Solution
(i) Write each \(n\) as a count of ones, \(n=\sum_{k=1}^n1=\sum_{k=1}^\infty\one_{\{k\le n\}}\), and swap the order of summation (allowed: all terms are \(\ge0\), primer box 1):
\[ \E[X]=\sum_{n=0}^\infty n\,\P(X=n)=\sum_{n=0}^\infty\sum_{k=1}^\infty\one_{\{k\le n\}}\P(X=n) =\sum_{k=1}^\infty\sum_{n\ge k}\P(X=n)=\sum_{k=1}^\infty\P(X\ge k). \]In words (the sentence the official solution leaves as "TODO"): the mean of a count equals the sum, over all levels \(k\), of the probability that the count reaches level \(k\) — each outcome \(X=n\) is counted once for every level \(1,\dots,n\) it reaches. Picture the bar chart of \(\P(X=n)\) sliced horizontally instead of vertically.
(ii) \(\P(X\ge n)=\P(\text{first }n-1\text{ trials fail})=(1-p)^{n-1}\) (the official solution derives it as \(1-\P(X\le n-1)\) with the partial geometric sum). Then, with the geometric series, \(\E[X]=\sum_{n\ge1}(1-p)^{n-1}=\frac1{1-(1-p)}=\frac1p\).
(iii) Same idea with \(x=\int_0^x1\,\mathrm dy\) and swapping the integrals (Tonelli):
\[ \E[X]=\int_0^\infty\Bigl(\int_0^x\mathrm dy\Bigr)p(x)\,\mathrm dx=\int_0^\infty\Bigl(\int_y^\infty p(x)\,\mathrm dx\Bigr)\mathrm dy =\int_0^\infty\bigl(1-F_X(y)\bigr)\,\mathrm dy . \]For \(\Exp(\lambda)\), \(1-F_X(x)=e^{-\lambda x}\), so \(\E[X]=\int_0^\infty e^{-\lambda x}\,\mathrm dx=\frac1\lambda\) — no integration by parts needed.
Note: the sheet says "\(X:\Omega\to\N\) geometrically distributed", while \(\Geo(p)\) lives on \(\N_{>0}\); the official solution notices this and the formula applies either way (the \(n=0\) term contributes 0).
Sheet 7, Exercise 4 — sampling and classifying fish Sheet 7 · Ex 4
Label \(Y=0\) (trout) and \(Y=1\) (salmon), \(\P(Y=0)=\P(Y=1)=\frac12\); size \(X\in[0,1]\) with likelihoods \(p(x\mid Y=0)=2-2x\) and \(p(x\mid Y=1)=2x\). (i) Derive inverse-transform formulas to sample \(X\) in each class. (ii) Code: generate data and compare empirical and true cdfs. (iii) Compute the average error rate \(\E[\one_{\{f(X)\ne Y\}}]\) of four classifiers with threshold \(x_t\): A predicts 1 iff \(x>x_t\); B the reverse; C a fair coin; D always 1. (iv) Code: compare with simulation over 10 datasets for \(N\in\{1000,10000\}\).
Solution
(i) cdfs on \([0,1]\): \(F_{X|Y=0}(x)=\int_0^x(2-2z)\,\mathrm dz=2x-x^2\) and \(F_{X|Y=1}(x)=x^2\). Invert (Proposition 2.23 — here \(F\) is continuous and strictly increasing on \([0,1]\), so the generalised inverse is the ordinary one):
- \(2x-x^2=u\iff(x-1)^2=1-u\iff x=1-\sqrt{1-u}\) (the root in \([0,1]\));
- \(x^2=u\iff x=\sqrt u\).
So: draw \(Y\sim\Ber(\frac12)\), draw \(U\sim\Unif(0,1)\), and output \(X=\sqrt U\) if \(Y=1\), \(X=1-\sqrt{1-U}\) if \(Y=0\).
(iii) The error rate is the probability of a wrong label. For A, the errors are "trout larger than \(x_t\)" and "salmon at most \(x_t\)":
\[ \tfrac12\int_{x_t}^1(2-2x)\,\mathrm dx+\tfrac12\int_0^{x_t}2x\,\mathrm dx=\Bigl[x-\tfrac{x^2}2\Bigr]_{x_t}^1+\Bigl[\tfrac{x^2}2\Bigr]_0^{x_t} =\tfrac12-x_t+x_t^2=\tfrac14+\bigl(x_t-\tfrac12\bigr)^2 . \]Minimal at \(x_t=\frac12\) with error \(\frac14\). B makes exactly the errors A avoids: \(1-\text{(A)}=\frac34-(x_t-\frac12)^2\). C: \(\hat Y\) is independent of \(Y\), and each of the four combinations has probability \(\frac14\); two are wrong, so \(\frac12\). D: wrong exactly when \(Y=0\): \(\frac12\).
Why \(\frac12\) is the best threshold. The optimal rule predicts the class with the larger \(p(x\mid y)p(y)\) (Bayes rule, §1.4): \(2x>2-2x\iff x>\frac12\). (ii) and (iv) are coding tasks (Jupyter notebook in the official solution); the widget below runs them in your browser. The spread across datasets shrinks like \(1/\sqrt N\): the empirical error is an average of \(N\) indicators, so its standard deviation is \(\sqrt{e(1-e)/N}\approx0.014\) for \(N=1000\) and \(0.004\) for \(N=10000\) at \(e=\frac14\).
Sheet 8, Exercise 3 — uniform on the unit disc Sheet 8 · Ex 3
\((X,Y)\) uniform on the closed unit disc \(D=\{x^2+y^2\le1\}\), \(p_{X,Y}=\frac1\pi\one_D\). (i) Find the marginals. (ii) Find means and variances. (iii) Are \(X,Y\) independent? Uncorrelated?
Solution
(i) For \(x\in[-1,1]\), the vertical line at \(x\) meets the disc for \(-\sqrt{1-x^2}\le y\le\sqrt{1-x^2}\) (solve \(x^2+y^2\le1\) for \(y\): \(y^2\le1-x^2\); reading off limits on a disc is worked through on B4): \(p_X(x)=\int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}}\frac1\pi\,\mathrm dy=\frac2\pi\sqrt{1-x^2}\) (a semicircle shape), and 0 outside \([-1,1]\). By symmetry \(p_Y(y)=\frac2\pi\sqrt{1-y^2}\) on \([-1,1]\).
(ii) \(\E[X]=\frac2\pi\int_{-1}^1x\sqrt{1-x^2}\,\mathrm dx=0\): odd times even is odd (primer box 2). For \(\E[X^2]\), the integrand is even, so \(\E[X^2]=\frac4\pi\int_0^1x^2\sqrt{1-x^2}\,\mathrm dx\). Substitute \(x=\sin u\), \(\mathrm dx=\cos u\,\mathrm du\), \(u\in[0,\frac\pi2]\), \(\sqrt{1-\sin^2u}=\cos u\):
\[ \E[X^2]=\frac4\pi\int_0^{\pi/2}\sin^2u\cos^2u\,\mathrm du=\frac1\pi\int_0^{\pi/2}\sin^2(2u)\,\mathrm du =\frac1\pi\int_0^{\pi/2}\Bigl(\frac12-\frac12\cos4u\Bigr)\mathrm du=\frac1\pi\Bigl[\frac u2-\frac{\sin4u}8\Bigr]_0^{\pi/2}=\frac14 , \]using \(2\sin u\cos u=\sin2u\) (so \(4\sin^2u\cos^2u=\sin^2 2u\)) and \(\sin^2t=\frac12-\frac12\cos2t\) with \(t=2u\). Both come from the addition theorems (Analysis 5.3); the second in one line: \(\cos2t=\cos^2t-\sin^2t=(1-\sin^2t)-\sin^2t=1-2\sin^2t\), using \(\cos^2t+\sin^2t=1\); solve for \(\sin^2t\). (derivation mine) So \(\Var[X]=\Var[Y]=\frac14\).
(iii) Both means are 0, so \(\Cov[X,Y]=\E[XY]\). In polar coordinates \(x=r\cos\theta\), \(y=r\sin\theta\) (\(r\in[0,1]\) the distance from the centre, \(\theta\in[0,2\pi)\) the angle) with Jacobian factor \(r\): a small patch \(\mathrm dr\,\mathrm d\theta\) has area \(r\,\mathrm dr\,\mathrm d\theta\) (see B5 — change of variables). The second step also uses \(\cos\theta\sin\theta=\frac12\sin2\theta\):
\[ \E[XY]=\int_0^{2\pi}\!\!\int_0^1r\cos\theta\,r\sin\theta\,\frac1\pi\,r\,\mathrm dr\,\mathrm d\theta =\frac1{2\pi}\int_0^1r^3\,\mathrm dr\int_0^{2\pi}\sin2\theta\,\mathrm d\theta=0 . \]Uncorrelated. Not independent: on the corners of the square, e.g. near \((0.9,0.9)\) (outside the disc), \(p_{X,Y}=0\) while \(p_X(x)p_Y(y)>0\) — a whole region of positive area where the joint density is not the product.
A no-integral argument for \(\Cov=0\): \((X,Y)\) and \((X,-Y)\) have the same distribution (the disc is symmetric under reflection), so \(\E[XY]=\E[-XY]\), hence 0.
Notes on the official sheet: the statement says the density "has value \(\pi\)" — it is \(\frac1\pi\), as the formula right after shows. In (ii) the second integral should run over \([0,1]\), not \([-1,1]\), and the antiderivative should be \(\frac u2-\frac18\sin4u\), not \(\frac u2-2\sin4u\); both slips leave the value \(\frac14\) unchanged because \(\sin(4u)\) vanishes at both limits.
Old-exam tasks
WiSe 25/26, Problem 1b — conditional variance never exceeds variance on average WiSe25 · P1b · 3 credits
Statement. True or false, with justification: \(\Var[Y]\ge\E[\Var[Y\mid X]]\).
Official answer: True. By the law of total variance (Theorem 2.35), \(\Var[Y]=\E[\Var[Y\mid X]]+\Var[\E[Y\mid X]]\), and the second summand is a variance, hence \(\ge0\) (Proposition 2.8(i)).
In words: on average, learning \(X\) can only reduce your uncertainty about \(Y\). (For a particular \(x\), \(\Var[Y\mid X=x]\) can exceed \(\Var[Y]\) — only the average cannot.) The official solution is correct.
WiSe 25/26, Problem 3c — an integral computed with LOTUS WiSe25 · P3c · 3 credits
Setting. \(U\sim\Unif(0,1)\) and \(X=g(U)=-\frac1\lambda\ln U\) for a fixed \(\lambda>0\). Parts (a) and (b) show \(X\sim\Exp(\lambda)\) and its memorylessness; they are worked on the §1.3 page and the §1.4 page.
Statement (c). You are given \(\E[X]=\frac1\lambda\). Use this to compute \(\int_0^1\ln u\,\mathrm du\) without integrating directly (no integration by parts).
Which tool. \(X\) is a function of \(U\), and we know the pdf of \(U\). That is exactly the situation of LOTUS (Lemma 2.2): \(\E[g(U)]=\int g(u)\,p_U(u)\,\mathrm du\).
Solution.
- The pdf of \(U\) is \(p_U(u)=1\) for \(u\in(0,1)\) and 0 otherwise.
- LOTUS with \(g(u)=-\frac1\lambda\ln u\): \[ \frac1\lambda=\E[X]=\E[g(U)]=\int_{-\infty}^\infty g(u)\,p_U(u)\,\mathrm du =\int_0^1\Bigl(-\frac1\lambda\ln u\Bigr)\cdot1\,\mathrm du=-\frac1\lambda\int_0^1\ln u\,\mathrm du . \] (Outside \((0,1)\) the pdf is 0, so only \((0,1)\) contributes. The constant \(-\frac1\lambda\) comes out of the integral.)
- Multiply both sides by \(-\lambda\): \(\displaystyle\int_0^1\ln u\,\mathrm du=-1\).
Why LOTUS is allowed here. Its side condition asks \(\int|g(u)|p_U(u)\,\mathrm du<\infty\). On \((0,1)\), \(\ln u<0\), so \(g(u)>0\) and \(|g|=g\). The integral of \(|g|\) is therefore \(\E[X]=\frac1\lambda<\infty\). Check by direct integration: an antiderivative of \(\ln u\) is \(u\ln u-u\) (differentiate: \(\ln u+1-1\)). Since \(u\ln u\to0\) as \(u\downarrow0\), we get \([u\ln u-u]_0^1=(0-1)-(0-0)=-1\) ✓. The official solution is correct.
In words: a known expectation is a known integral in disguise. LOTUS translates between the two, so you can read off an integral from a mean you already know.
WiSe 25/26, Problem 5a–c — the empirical cdf WiSe25 · P5a WiSe25 · P5b WiSe25 · P5c · 3 + 2 + 2 credits
Setting. \(X_1,\dots,X_n\) are iid real random variables with cdf \(F:=F_{X_1}\) (all \(X_i\) have the same cdf, because they are identically distributed). Fix a number \(t\in\R\). The empirical cdf [empirische Verteilungsfunktion] is
\[ \hat F_n(t):=\frac1n\sum_{i=1}^n\chi_{(-\infty,t]}(X_i). \]Here \(\chi_{(-\infty,t]}\) is the indicator function of the interval \((-\infty,t]\) (primer box 4 writes \(\one\)): \(\chi_{(-\infty,t]}(x)=1\) if \(x\le t\) and 0 otherwise. So \(\hat F_n(t)\) is simply the fraction of the \(n\) data points that are \(\le t\).
Small example (mine). Data \(2,\,5,\,1,\,7\) (\(n=4\)) and \(t=4\): two values (2 and 1) are \(\le4\), so \(\hat F_4(4)=\frac24=0.5\).
(a) Show that \(n\hat F_n(t)\sim\Bin(n,F(t))\).
- Let \(Y_i:=\chi_{(-\infty,t]}(X_i)\). It takes only the values 0 and 1, so it is a Bernoulli variable. Its success probability is \(\P(Y_i=1)=\P(X_i\le t)=F(t)\) (definition of the cdf). So \(Y_i\sim\Ber(F(t))\), with the same parameter for every \(i\).
- The \(Y_i\) are independent. Reason: \(Y_i\) is a function of \(X_i\) alone (equivalently, the indicator of the event \(\{X_i\le t\}\)), and functions of independent random variables are independent (§1.4).
- \(n\hat F_n(t)=\sum_{i=1}^nY_i\) counts the successes in \(n\) independent trials that each succeed with probability \(F(t)\). That is the definition of \(\Bin(n,F(t))\) (§1.3). ∎
(b) Is \(\hat F_n(t)\) an unbiased estimator of \(F(t)\)?
Background (mine; full definitions in §3.2): an estimator [Schätzer] is a random quantity computed from the data to guess an unknown number (here the unknown number is \(F(t)\)). It is unbiased [erwartungstreu] if its expectation equals the number it tries to guess.
Solution: yes. The mean of \(\Bin(n,p)\) is \(np\) (Lemma 2.26(iv)). So by (a), \(\E[n\hat F_n(t)]=nF(t)\). Linearity (Proposition 2.4(i)) lets us divide by the constant \(n\): \(\E[\hat F_n(t)]=F(t)\). ∎
Linearity alone also works, without (a): \(\E[\hat F_n(t)]=\frac1n\sum_i\E[Y_i]=\frac1n\cdot nF(t)=F(t)\), using \(\E[\one_A]=\P(A)\).
(c) Compute the mean squared error \(\operatorname{mse}[\hat F_n(t)]\).
Background (mine; see §3.2): the mean squared error of an estimator \(\hat\theta\) of a number \(\theta\) is \(\operatorname{mse}[\hat\theta]:=\E[(\hat\theta-\theta)^2]\), the average squared distance from the truth. If \(\hat\theta\) is unbiased, then \(\theta=\E[\hat\theta]\), and the mse is exactly \(\E[(\hat\theta-\E[\hat\theta])^2]=\Var[\hat\theta]\) (Definition 2.5).
Solution. By (b), \(\hat F_n(t)\) is unbiased, so its mse is its variance. The variance of \(\Bin(n,p)\) is \(np(1-p)\) (Lemma 2.26(iv)), so by (a) \(\Var[n\hat F_n(t)]=nF(t)(1-F(t))\). Dividing a variable by \(n\) divides its variance by \(n^2\) (Proposition 2.8(iii) with \(a=\frac1n\)):
\[ \operatorname{mse}[\hat F_n(t)]=\Var[\hat F_n(t)]=\frac{nF(t)(1-F(t))}{n^2}=\frac{F(t)\bigl(1-F(t)\bigr)}{n}. \]What it tells you. The error shrinks like \(\frac1n\). Since \(p(1-p)\le\frac14\) (a parabola with top at \(p=\frac12\), primer box 5), the mse is at most \(\frac1{4n}\) for every \(t\). Numbers: with \(n=100\) and \(F(t)=0.3\), the mse is \(\frac{0.3\cdot0.7}{100}=0.0021\), a standard deviation of about \(0.046\). Part (d) (an approximate confidence interval for \(F(t)\)) belongs to §3.4. The official solutions of (a)–(c) are correct.
In words: "how many data points are below \(t\)" is a binomial count. So the fraction below \(t\) is right on average, and its error has the binomial variance divided by \(n^2\).
SoSe 2025, Problem 1b — a weighted average of unbiased estimators SoSe25 · P1b · 3 credits
Statement. \(\hat\theta_1,\hat\theta_2\) are unbiased estimators of \(\theta\). Is \(\frac13\hat\theta_1+\frac23\hat\theta_2\) unbiased?
Background (mine; the definitions are in §3.2): an estimator is a random variable computed from the data; it is unbiased if its mean equals the true parameter, \(\E[\hat\theta]=\theta\).
Official answer: True. Linearity: \(\E[\frac13\hat\theta_1+\frac23\hat\theta_2]=\frac13\theta+\frac23\theta=\theta\). Any weights summing to 1 work; independence is not needed. Correct.
SoSe 2025, Problem 5a–b — the duck hunt SoSe25 · P5a, P5b · 4 + 4 credits
Statement. \(n\) hunters each pick one of \(m\) ducks uniformly at random, independently, and never miss. \(X\) = number of surviving ducks. (a) Compute \(\E[X]\). Hint: let \(A_i\) = "duck \(i\) survives" and build \(X\) from \(\one_{A_i}\). (b) Compute \(\Var[X]\). (Part (c) uses Chebyshev and is on §2.2.)
(a) Let \(S_j\sim\Lap_{[m]}\) be hunter \(j\)'s target, \(S_1,\dots,S_n\) iid. Duck \(i\) survives iff no hunter picks it; by independence,
\[ \P(A_i)=\P(S_1\ne i)\cdots\P(S_n\ne i)=\Bigl(\frac{m-1}m\Bigr)^n . \]With \(X_i=\one_{A_i}\), \(X=\sum_{i=1}^mX_i\), and by linearity — although the \(X_i\) are dependent —
\[ \E[X]=\sum_{i=1}^m\P(A_i)=m\Bigl(\frac{m-1}m\Bigr)^n . \](b) \(\Var[X]=\E[X^2]-(\E[X])^2\) with \(\E[X^2]=\sum_{i,k}\E[X_iX_k]=\sum_{i,k}\P(A_i\cap A_k)\) (primer box 4: \(\one_{A_i}\one_{A_k}=\one_{A_i\cap A_k}\)). For \(i=k\) this is \(\P(A_i)\); for \(i\ne k\), both ducks survive iff every hunter picks one of the other \(m-2\): \(\P(A_i\cap A_k)=(\frac{m-2}m)^n\). There are \(m\) diagonal and \(m(m-1)\) off-diagonal pairs:
\[ \Var[X]=m\Bigl(\frac{m-1}m\Bigr)^n+m(m-1)\Bigl(\frac{m-2}m\Bigr)^n-m^2\Bigl(\frac{m-1}m\Bigr)^{2n}. \]Sanity checks. \(m=1\): the single duck is always hit, and the formula gives \(\E[X]=0\), \(\Var[X]=0\) ✓. \(n=1\): exactly \(m-1\) ducks survive, and \(\E[X]=m\cdot\frac{m-1}m=m-1\), \(\Var[X]=(m-1)+(m-1)(m-2)-(m-1)^2=0\) ✓. The off-diagonal covariances \(\Cov[X_i,X_k]=(\frac{m-2}m)^n-(\frac{m-1}m)^{2n}\) are negative: one duck surviving makes it more likely the shots went elsewhere. The official solution is correct.
SoSe 2026, Problem 1a, 1b — two true/false questions on covariance SoSe26 · P1a, P1b · 1 + 1 credits
(a) \(X\sim\Ber(\frac12)\), \(Y:=1-X\). Are \(X\) and \(Y\) uncorrelated? Official: False. \(\Cov[X,1-X]=-\Cov[X,X]=-\Var[X]=-\frac14\ne0\) (bilinearity, Proposition 2.12(iii),(iv)); in fact \(\rho=-1\), a perfect negative linear relation.
(b) For any two Bernoulli variables, \(\Cov[X,Y]=0\) implies \(X\perp\!\!\!\perp Y\). Official: True. No justification was required; here is one (mine). Let \(a=\P(X=1)\), \(b=\P(Y=1)\), \(c=\P(X=1,Y=1)=\E[XY]\). \(\Cov=0\) means \(c=ab\). Then the other three cells factor too:
\[ \P(1,0)=a-c=a(1-b),\quad\P(0,1)=b-c=(1-a)b,\quad\P(0,0)=1-a-b+c=(1-a)(1-b). \]All four cells of the joint pmf are products of the marginals, which is independence (Definition 1.77(ii)). Only for two-valued variables is "uncorrelated" this strong.
SoSe 2026, Problem 2c — mean-independence is not independence SoSe26 · P2c · 3 credits
Statement. Integrable \(X,Y\) with \(\E[X\mid Y]=\E[X]\). Then \(X\perp\!\!\!\perp Y\)?
Official answer: False. \(X\) uniform on \(\{-1,0,1\}\), \(Y:=X^2\). \(\E[X]=0\). If \(Y=0\) then \(X=0\); if \(Y=1\) then \(X\) is uniform on \(\{-1,1\}\). So \(\E[X\mid Y=0]=\E[X\mid Y=1]=0\), i.e. \(\E[X\mid Y]=0=\E[X]\). But \(\P(X=0,Y=0)=\frac13\ne\frac13\cdot\frac13=\P(X=0)\P(Y=0)\). Correct.
The ladder of strength: independent \(\Rightarrow\) \(\E[X\mid Y]=\E[X]\) \(\Rightarrow\) uncorrelated. The second arrow: \(\E[XY]=\E[\E[XY\mid Y]]=\E[Y\,\E[X\mid Y]]=\E[Y]\E[X]\) (tower property, and \(Y\) is a known constant once we condition on \(Y\)). Neither arrow reverses.
SoSe 2026, Problem 2d — independent sum and difference SoSe26 · P2d · 3 credits
Statement. \(X,Y\) with finite variance and \(X+Y\perp\!\!\!\perp X-Y\). Then \(\Var[X]=\Var[Y]\)?
Official answer: True. Independence gives \(\Cov[X+Y,X-Y]=0\) (Proposition 2.12(v)). Bilinearity and symmetry: \(\Cov[X+Y,X-Y]=\Cov[X,X]-\Cov[X,Y]+\Cov[Y,X]-\Cov[Y,Y]=\Var[X]-\Var[Y]\). So the variances are equal. Correct.
SoSe 2026, Problem 4c — mean and variance of a scaled random walk SoSe26 · P4c · 2 credits
Statement. \(X_1,X_2,\dots\) iid with \(\P(X_j=1)=\P(X_j=-1)=\frac12\); \(Z_n:=\frac1{\sqrt n}\sum_{j=1}^nX_j\). Compute \(\E[Z_n]\) and \(\Var[Z_n]\).
Solution. \(\E[X_j]=\frac12-\frac12=0\); \(X_j^2=1\) always, so \(\Var[X_j]=1-0=1\). Linearity: \(\E[Z_n]=\frac1{\sqrt n}\sum_j0=0\). Scaling (Proposition 2.8(iii)) and independence (2.8(iv)): \(\Var[Z_n]=\frac1n\sum_{j=1}^n\Var[X_j]=\frac1n\cdot n=1\).
The factor \(\frac1{\sqrt n}\) is chosen exactly so that the variance stays 1 — the scaling of the central limit theorem (§2.4). The official solution also computes both via the characteristic function \(\cos^n(t/\sqrt n)\); that route is on §2.3, and part (d) (Markov bound) is on §2.2. Correct.
SoSe 2026, Problem 5c — randomized response: unbiasedness and variance SoSe26 · P5c · 2 credits
Setting. A sensitive attribute \(A\sim\Ber(p)\). With probability \(r\in(0,1]\) a participant answers truthfully; otherwise they report a fair coin flip. By total probability (§1.4, part (a) of the problem), each answer is \(Y\sim\Ber(q)\) with \(q=rp+\frac{1-r}2\). We observe iid \(Y_1,\dots,Y_n\), \(\bar Y_n=\frac1n\sum Y_i\). (c) Show that \(\hat p:=\bigl(\bar Y_n-\frac{1-r}2\bigr)/r\) is unbiased and compute \(\Var[\hat p]\).
Solution. \(\E[\bar Y_n]=\frac1n\cdot nq=q\) (linearity), so \(\E[\hat p]=\frac{q-(1-r)/2}r=\frac{rp}r=p\): unbiased. \(\Var[\bar Y_n]=\frac1{n^2}\cdot n\,q(1-q)=\frac{q(1-q)}n\) (Proposition 2.8(iii),(iv)); subtracting a constant does not change the variance and dividing by \(r\) multiplies it by \(\frac1{r^2}\):
\[ \Var[\hat p]=\frac{q(1-q)}{n\,r^2}. \]The price of privacy is the factor \(\frac1{r^2}\): with \(r=\frac12\) you need four times as many participants for the same precision. Parts (b) (maximum likelihood) and (d) (a test) belong to §3.2 and §3.3. The official solution is correct.
Summary sheet
Formulas
- mean
- \(\E[X]=\sum x\,p(x)\) or \(\int x\,p(x)\,\mathrm dx\); needs \(\E|X|<\infty\)
- LOTUS
- \(\E[g(X)]=\sum g(x)p(x)\) or \(\int g(x)p(x)\,\mathrm dx\)
- linearity
- \(\E[aX+bY]=a\E[X]+b\E[Y]\) — no independence needed
- indicators
- \(\E[\one_A]=\P(A)\); counts = sums of indicators
- tails
- \(\E[X]=\sum_{n\ge1}\P(X\ge n)\) (\(\N\)-valued); \(\int_0^\infty\P(X>x)\,\mathrm dx\) (\(X\ge0\))
- variance
- \(\E[(X-\mu)^2]=\E[X^2]-\mu^2\); \(\Var[aX+b]=a^2\Var[X]\)
- covariance
- \(\E[XY]-\E[X]\E[Y]\); bilinear, symmetric
- sum
- \(\Var[\sum a_iX_i]=\sum a_i^2\Var[X_i]+2\sum_{i<j}a_ia_j\Cov[X_i,X_j]\)
- correlation
- \(\rho=\Cov/(\sigma_X\sigma_Y)\in[-1,1]\); \(\pm1\) iff linear
- quantile
- \(x_q=\inf\{x:F(x)\ge q\}\); median \(x_{0.5}\)
- sampling
- \(U\sim\Unif(0,1)\Rightarrow F^{-1}(U)\sim F\)
- tower
- \(\E[Y]=\E[\E[Y\mid X]]\)
- total var.
- \(\Var[Y]=\E[\Var[Y\mid X]]+\Var[\E[Y\mid X]]\)
The table (memorise)
| \(\E\) | \(\Var\) | \(\E\) | \(\Var\) | ||
|---|---|---|---|---|---|
| \(\Ber(p)\) | \(p\) | \(p(1-p)\) | \(\Unif(a,b)\) | \(\frac{a+b}2\) | \(\frac{(b-a)^2}{12}\) |
| \(\Bin(n,p)\) | \(np\) | \(np(1-p)\) | \(\mathcal N(\mu,\sigma^2)\) | \(\mu\) | \(\sigma^2\) |
| \(\Hyp(N,K,n)\) | \(n\frac KN\) | \(n\frac KN(1-\frac KN)\frac{N-n}{N-1}\) | \(\Exp(\lambda)\) | \(\frac1\lambda\) | \(\frac1{\lambda^2}\) |
| \(\Geo(p)\) | \(\frac1p\) | \(\frac{1-p}{p^2}\) | \(\Gamma(\alpha,\beta)\) | \(\frac\alpha\beta\) | \(\frac\alpha{\beta^2}\) |
| \(\NegBin(r,p)\) | \(\frac rp\) | \(\frac{r(1-p)}{p^2}\) | \(\chi^2_k\) | \(k\) | \(2k\) |
| \(\Poi(\lambda)\) | \(\lambda\) | \(\lambda\) | \(t_\nu\) | 0 (\(\nu>1\)) | \(\frac\nu{\nu-2}\) (\(\nu>2\)) |
| \(\mathrm{Beta}(\alpha,\beta)\) | \(\frac\alpha{\alpha+\beta}\) | \(\frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}\) |
Traps
- \(\E[XY]=\E[X]\E[Y]\) and \(\Var[X+Y]=\Var[X]+\Var[Y]\) need independence (or at least uncorrelatedness); \(\E[X+Y]=\E[X]+\E[Y]\) does not.
- \(\Var[X-Y]=\Var[X]+\Var[Y]\) for independent \(X,Y\) — plus, not minus.
- \(\Var[2X]=4\Var[X]\ne2\Var[X]\).
- Uncorrelated \(\not\Rightarrow\) independent (except for two Bernoullis, and jointly Gaussian vectors, §2.3).
- \(\E[g(X)]\ne g(\E[X])\) in general (Jensen, §2.2).
- \(\E[Y\mid X=x]\) is a number; \(\E[Y\mid X]\) is a random variable.
- Medians need not be unique; means need not exist.
Exam focus
Every exam has used this page. Recurring shapes: mean and variance of a count via indicators (SoSe25 P5, duck hunt: 8 credits), true/false on covariance versus independence (SoSe26 P1a, P1b, P2c, P2d), laws of total expectation / variance (WiSe25 P1b), and means and variances of averages as the first step of every estimator and every Chebyshev or clt problem (SoSe26 P4c, P5c; WiSe25 P5a–c; WiSe25 P4b on §2.2), and LOTUS to evaluate an integral (WiSe25 P3c). Know the table by heart.
Self-test
Section 2.2 · Lecture 8 (10 June 2026)
Basic probability inequalities
Grundlegende Ungleichungen der Wahrscheinlichkeitstheorie
What this page covers Script §2.2, pp. 70–72
Everything from Theorem 2.38 (Markov) to Remark 2.45: Markov's, Chebyshev's and Jensen's inequalities, with their examples and remarks. The script's section goal: "Introduce fundamental inequalities that provide bounds on probabilities without requiring full knowledge of the distribution but only relying on properties like the mean or variance."
Worked in place: Sheet 8 Ex 2, Sheet 9 Ex 2(i), (iii), Sheet 10 Ex 4, and the old-exam tasks SoSe25 P5c, WiSe25 P4b, SoSe26 P3a, P3b, SoSe26 P4d.
Elsewhere: the parts of Sheet 9 Ex 1–2 that need the central limit theorem or the law of large numbers, and Sheet 9 Ex 3–4 (which use Markov and Chebyshev to prove modes of convergence), are on §2.4. Everything here builds on means and variances from §2.1.
The big picture
Often you do not know the whole distribution of a random quantity. You know only a summary: its mean [Erwartungswert], maybe its variance [Varianz]. Still you want a guarantee about a probability. The inequalities on this page give such guarantees. Each one holds for every distribution with that summary.
A concrete question (my example). Your bus comes after a random waiting time \(X\) (in minutes). A waiting time is never negative, so \(X\ge0\). On average you wait 10 minutes. How likely is a wait of at least an hour?
- Markov uses only the mean: \(\P(X\ge60)\le\frac{10}{60}=\frac16\). Why: suppose more than a sixth of all days had waits of 60 minutes or more. Those days alone would contribute more than \(\frac16\cdot60=10\) to the average. The average would then be above 10 — a contradiction.
- Chebyshev also uses the standard deviation [Standardabweichung], say 5 minutes. A wait of 60 is 50 minutes above the mean, which is 10 standard deviations. Chebyshev gives \(\P(X\ge60)\le\frac{5^2}{50^2}=0.01\). More information gives a sharper bound.
- Jensen answers a different kind of question: how does \(\E[g(X)]\) compare with \(g(\E[X])\)? If the ticket price grows like \(X^2\), the average price is at least the price of the average wait: \(\E[X^2]\ge(\E[X])^2=100\).
In words: Markov — a non-negative quantity is rarely much larger than its mean. Chebyshev — any quantity is rarely many standard deviations away from its mean. Jensen — averaging and then applying a convex function gives at most as much as applying the function and then averaging.
Primer My addition
Cross-references
Convex functions and the second-derivative test: Analysis 7.6. Tangent lines: Analysis 6.2. The logarithm is strictly increasing: Analysis 5.2. Mean, variance, indicators, the median's optimality: §2.1.
0. Symbols and words used on this page
- Probability space [Wahrscheinlichkeitsraum] \((\Omega,\Aa,\P)\): \(\Omega\) is the set of all possible outcomes \(\omega\); \(\Aa\) is the collection of events (subsets of \(\Omega\)) that get a probability; \(\P\) assigns each event its probability (sets, measure background).
- Real random variable [reelle Zufallsvariable] \(X:\Omega\to\R\): a rule that turns each outcome into a number. The script abbreviates it "RVRV" (real-valued random variable).
- \(\E[X]\) or \(\mu\): the mean (expected value). \(\Var[X]=\E[(X-\mu)^2]\) or \(\sigma^2\): the variance, the mean squared distance from \(\mu\). \(\sigma=\sqrt{\Var[X]}\): the standard deviation (§2.1).
- Indicator [Indikatorfunktion] \(\one_A\) of an event \(A\), written \(\chi_A\) in the script and on this page: the random variable that is 1 when \(A\) happens and 0 otherwise. Its mean is \(1\cdot\P(A)+0\cdot\P(\text{not }A)=\P(A)\).
- Almost surely [fast sicher] (a.s.) / "with probability 1": a statement may fail only on an event of probability 0.
- Independent [unabhängig], written \(X\perp\!\!\!\perp Y\); iid = independent and identically distributed (all have the same distribution).
- Median [Median] \(m\): a number with \(\P(X\le m)\ge\frac12\) and \(\P(X\ge m)\ge\frac12\) — the "middle" of the distribution (§2.1).
- clt = central limit theorem [zentraler Grenzwertsatz]: sums of many iid variables are approximately normal. \(\mathcal N(0,1)\) is the standard normal distribution and \(\Phi\) its cdf (cumulative distribution function [Verteilungsfunktion]), that is \(\Phi(a)=\P(Z\le a)\) for \(Z\sim\mathcal N(0,1)\) (§2.4).
- "iff" = "if and only if". \(\lceil x\rceil\) (ceiling) = the smallest integer \(\ge x\), e.g. \(\lceil1.58\rceil=2\).
1. A function below another gives a smaller mean
Everything on this page rests on one fact, the monotonicity of expectation (Proposition 2.4(iv)): if \(Y(\omega)\le Z(\omega)\) for every outcome \(\omega\), then \(\E[Y]\le\E[Z]\). Combine it with \(\P(A)=\E[\one_A]\) (box 0). This gives a recipe: to bound \(\P(A)\) from above, find a random variable that is at least \(\one_A\) everywhere and whose mean you know.
Example. For \(X\ge0\) and \(\varepsilon>0\): \(\one_{\{X\ge\varepsilon\}}\le\frac X\varepsilon\). Check both cases: where \(X\ge\varepsilon\), the left side is 1 and the right side is \(\ge1\); where \(X<\varepsilon\), the left side is 0 and the right side is \(\ge0\). Taking \(\E\) gives \(\P(X\ge\varepsilon)\le\E[X]/\varepsilon\) — that is Markov's inequality. The picture below shows the step function lying under the line.
2. Convex and concave functions
A function \(g:\R\to\R\) is convex [konvex] if for all \(x_1,x_2\) and all \(t\in[0,1]\)
\[ g\bigl(tx_1+(1-t)x_2\bigr)\le t\,g(x_1)+(1-t)\,g(x_2). \]Picture: \(tx_1+(1-t)x_2\) runs over the segment between \(x_1\) and \(x_2\); the right side runs over the straight chord joining \((x_1,g(x_1))\) and \((x_2,g(x_2))\). Convex means: the graph never rises above any of its chords — it "holds water". Concave means the reverse inequality (\(-g\) is convex).
- Test: if \(g\) is twice differentiable, \(g\) is convex iff \(g''\ge0\) everywhere (Analysis 7.6); strictly convex if \(g''>0\).
- Convex: \(x^2\) (\(g''=2\)), \(e^x\) (\(g''=e^x\)), \(|x|\) (not differentiable at 0, but the chord test holds), \(-\ln x\) on \((0,\infty)\) (\(g''=1/x^2\)), \(1/x\) on \((0,\infty)\).
- Concave: \(\ln x\), \(\sqrt x\) on \((0,\infty)\); linear functions are both convex and concave.
- Tangent below the graph. A differentiable convex \(g\) lies above each of its tangent lines: \(g(x)\ge g(x_0)+g'(x_0)(x-x_0)\) for all \(x\). (A convex function without a derivative still has a "supporting line" through every point that stays below the graph.)
3. Absolute values inside events
\(\{|Y|\ge\varepsilon\}=\{Y\ge\varepsilon\}\cup\{Y\le-\varepsilon\}\): "far from 0 on either side". So \(\P(Y\ge\varepsilon)\le\P(|Y|\ge\varepsilon)\) — a two-sided bound also bounds each single side. The exercises use this to turn "the server is overloaded" (one side) into a Chebyshev question (two sides).
Markov's inequality
The idea. A non-negative quantity cannot often be much larger than its mean. If it were, the large values alone would already push the mean up too far. Primer box 1 turned this into a one-line proof. The script states a more general version: first transform \(X\) by an increasing function \(f\), then use the mean of \(f(X)\).
Theorem 2.38 Markov's inequality Script 2.38
Let \((\Omega,\Aa,\P)\) be a probability space and \(X:\Omega\to\R\) a real random variable. Write \(S_X=\operatorname{im}(X)=X(\Omega)\) for the set of values that \(X\) can take ("im" = image). Let \(f:S_X\to\R_{\ge0}\) be monotonically increasing [monoton wachsend] (\(x\le y\Rightarrow f(x)\le f(y)\)) with values \(\ge0\). Then for every \(\varepsilon\in\R\) with \(f(\varepsilon)>0\):
\[ \P(X\ge\varepsilon)\le\frac{\E[f(X)]}{f(\varepsilon)}. \]The usual special case (take \(f(x)=x\)). Let \(X\) be non-negative, i.e. \(\P(X\ge0)=1\). Then for every constant \(\varepsilon>0\),
\[ \P(X\ge\varepsilon)\le\frac{\E[X]}{\varepsilon}. \](The script's statement also assumes that \(X\) has a density that is integrable. The general proof below does not use this. Only the second proof, written with integrals, needs it. One more piece of small print (mine): the script writes "for each \(\varepsilon\in\R\)", but \(f\) is only defined on \(S_X\), so \(f(\varepsilon)\) makes sense only for \(\varepsilon\in S_X\). Read the theorem as: for every \(\varepsilon\in S_X\) with \(f(\varepsilon)>0\). In the special case \(f(x)=x\) this is no restriction, because the bound \(\E[X]/\varepsilon\) is then defined for every \(\varepsilon>0\) anyway.)
Proof Script — each step explained
General version. Look at a single outcome \(\omega\). Two cases.
- If \(X(\omega)\ge\varepsilon\): \(f\) is increasing, so \(f(X(\omega))\ge f(\varepsilon)\). The indicator \(\one_{\{X\ge\varepsilon\}}\) equals 1 here.
- If \(X(\omega)<\varepsilon\): the indicator equals 0.
In both cases \(f(\varepsilon)\one_{\{X\ge\varepsilon\}}\le f(X)\one_{\{X\ge\varepsilon\}}\le f(X)\). The last step holds because \(f\ge0\), so dropping the indicator (replacing 0 by \(f(X)\ge0\)) can only make things larger. Now take expectations (monotonicity, Proposition 2.4(iv)) and divide by \(f(\varepsilon)>0\):
\[ \P(X\ge\varepsilon)=\E[\one_{\{X\ge\varepsilon\}}]=\E\Bigl[\tfrac{f(\varepsilon)}{f(\varepsilon)}\one_{\{X\ge\varepsilon\}}\Bigr] \le\E\Bigl[\tfrac{f(X)}{f(\varepsilon)}\one_{\{X\ge\varepsilon\}}\Bigr]\le\frac{\E[f(X)]}{f(\varepsilon)}. \]Special case with a density \(p_X\) (the function whose integral gives probabilities, \(\P(X\ge\varepsilon)=\int_\varepsilon^\infty p_X(x)\,\mathrm dx\)). Since \(X\ge0\), the mean is \(\E[X]=\int_0^\infty x\,p_X(x)\,\mathrm dx\). Split this integral at \(\varepsilon\) and throw away the left part:
\[ \begin{aligned} \E[X]&=\int_0^\varepsilon x\,p_X(x)\,\mathrm dx+\int_\varepsilon^\infty x\,p_X(x)\,\mathrm dx \ \ge\ \int_\varepsilon^\infty x\,p_X(x)\,\mathrm dx &&\text{the first integrand is }\ge0\\ &\ge\int_\varepsilon^\infty\varepsilon\,p_X(x)\,\mathrm dx=\varepsilon\,\P(X\ge\varepsilon) &&x\ge\varepsilon\text{ on the range of integration} \end{aligned} \]and divide by \(\varepsilon>0\). The discrete case is the same with sums.
Notes on the script's proof. (1) The script first shows that \(f\) is measurable — a technical condition that makes \(f(X)\) a random variable, so that \(\E[f(X)]\) makes sense (B4 — measurable functions). It cites "Exercise 2.1", which is not on the sheets, and its displayed set mixes \(\ge\) and \(>\). A short argument: for increasing \(f\), every set \(\{x:f(x)\ge a\}\) is an interval of the form \([A,\infty)\) or \((A,\infty)\), with \(A=\inf\{x:f(x)\ge a\}\) (the largest lower bound of that set, the infimum [Infimum]; see Analysis 1.2) — or the empty set, or all of \(S_X\). Why an interval: if \(f(x)\ge a\) and \(y\ge x\), then \(f(y)\ge f(x)\ge a\), so the set contains everything to the right of any of its points. Intervals are Borel sets, which is what measurability asks for. (2) It claims \(\{f(x)\ge f(\varepsilon)\}=\{x\ge\varepsilon\}\); that is only true for strictly increasing \(f\), but only the inclusion \(\{x\ge\varepsilon\}\subseteq\{f(x)\ge f(\varepsilon)\}\) is used, and that holds for every increasing \(f\).
How good is it? The script: Markov is "very crude/loose, but requires hardly any assumptions on the distribution of \(X\)"; the bound uses only the mean. It helps only for \(\varepsilon>\E[X]\). For \(\varepsilon\le\E[X]\) the right side is \(\ge1\), and every probability is \(\le1\) anyway. Still, it cannot be improved in general (mine). Take \(0<\mu\le\varepsilon\) and let \(X=\varepsilon\) with probability \(\frac\mu\varepsilon\), \(X=0\) otherwise. Then \(\E[X]=\varepsilon\cdot\frac\mu\varepsilon=\mu\) and \(\P(X\ge\varepsilon)=\frac\mu\varepsilon\) — exactly the bound.
In words: the probability that a non-negative quantity reaches \(\varepsilon\) is at most its mean divided by \(\varepsilon\).
Example 2.39 website hits Script 2.39
A website has on average \(\E[X]=50\) hits per day. How likely are at least 150 hits on a given day? The number of hits is never negative, so Markov applies. With \(\varepsilon=150\) (the script calls it \(a\)):
\[ \P(X\ge150)\le\frac{\E[X]}{150}=\frac{50}{150}=\frac13 . \]So at least 150 hits happen with probability at most \(\frac13\). The script adds: this bound is "quite general and might not be very tight".
For comparison: if the hits were Poisson distributed, \(\Poi(50)\), then \(\P(X\ge150)\approx3.5\cdot10^{-30}\) (computed numerically). Markov knows nothing about the shape. So it must allow the worst case: a distribution with a third of its mass at 150 and the rest at 0.
Chebyshev's inequality
The idea. Apply Markov not to \(X\) but to the squared distance from the mean, \((X-\mu)^2\), whose mean is the variance. A small variance then forces \(X\) to stay close to \(\mu\) with high probability.
Theorem 2.40 Chebyshev's inequality Script 2.40
Let \(X\) be a real random variable with finite mean \(\E[X]\) and finite variance \(\Var[X]>0\). Then for every \(\varepsilon>0\),
\[ \P\bigl(|X-\E[X]|\ge\varepsilon\bigr)\le\frac{\Var[X]}{\varepsilon^2}. \]The "\(k\) standard deviations" form (mine; Example 2.41 uses it): with \(\varepsilon=k\sigma_X\),
\[ \P\bigl(|X-\mu|\ge k\sigma_X\bigr)\le\frac1{k^2}. \]At most \(\frac14\) of the mass lies 2 or more standard deviations from the mean, at most \(\frac19\) at 3 or more — for every distribution.
Proof Script, with one step repaired
Let \(Y:=X-\E[X]\). Then \(|Y|\ge0\), and \(f(x)=x^2\) is increasing on \([0,\infty)\) with \(f(\varepsilon)=\varepsilon^2>0\). Markov (Theorem 2.38) applied to the random variable \(|Y|\) with this \(f\):
\[ \P(|X-\E[X]|\ge\varepsilon)=\P(|Y|\ge\varepsilon)\le\frac{\E[|Y|^2]}{\varepsilon^2}=\frac{\E[(X-\E[X])^2]}{\varepsilon^2}=\frac{\Var[X]}{\varepsilon^2}. \]Note on the script's proof. It applies Theorem 2.38 "with \(f(x)=x^2\)" to \(X\) directly and writes \(\P(|X|\ge\varepsilon)\le\varepsilon^{-2}\E[X^2]\). But \(x^2\) is not increasing on \(\R\), and Theorem 2.38 bounds \(\P(X\ge\varepsilon)\), not \(\P(|X|\ge\varepsilon)\). Applying it to \(|X|\) (or \(|Y|\)), as above, fixes both points; the conclusion is unchanged. Also, the assumption \(\Var[X]>0\) is not needed: if \(\Var[X]=0\), then \(X=\E[X]\) almost surely (Proposition 2.8(i)) and the left side is 0.
Markov versus Chebyshev Script. Chebyshev needs more information (mean and variance), but it can give much better (tighter) bounds.
One-sided use. \(\P(X\ge\mu+\varepsilon)\le\P(|X-\mu|\ge\varepsilon)\le\sigma^2/\varepsilon^2\) (primer box 3). This is how the exercises bound "overload" or "loss" events.
In words: the probability of landing at least \(\varepsilon\) away from the mean is at most the variance divided by \(\varepsilon^2\). At least \(k\) standard deviations away happens with probability at most \(1/k^2\).
Example 2.41 three standard deviations Script 2.41
\(X\) has mean \(\mu_X=10\) and variance \(\sigma_X^2=4\), so \(\sigma_X=2\). How likely is a deviation of 3 standard deviations or more, i.e. of 6 or more? Chebyshev with \(\varepsilon=6\) (the script writes "\(k=3\)", meaning \(\varepsilon=k\sigma_X=3\cdot2\)):
\[ \P(|X-10|\ge6)\le\frac{4}{36}=\frac19 . \]So \(X\) lies outside \((4,16)\) with probability at most \(\frac19\), whatever its distribution, as long as mean and variance are finite.
Small wording slip in the script: it asks for "more than" 3 standard deviations but computes \(\P(|X-10|\ge6)\), i.e. "at least". The bound \(\frac19\) covers both, since \(\{|X-10|>6\}\subseteq\{|X-10|\ge6\}\). For a normal distribution the true value is about 0.0027 (the "99.7 % rule"). Chebyshev pays for its universality. It is exact for the three-point distribution \(X\in\{\mu-k\sigma,\mu,\mu+k\sigma\}\) with probabilities \(\frac1{2k^2},1-\frac1{k^2},\frac1{2k^2}\) (check: its variance is \(2\cdot\frac1{2k^2}(k\sigma)^2=\sigma^2\), and \(\P(|X-\mu|\ge k\sigma)=\frac1{k^2}\)).
Jensen's inequality
The idea with two points. Let \(X\) be \(x_1\) or \(x_2\), each with probability \(\frac12\). Then \(\E[X]\) is the midpoint and \(\E[g(X)]=\frac12g(x_1)+\frac12g(x_2)\) is the midpoint of the chord. For a convex \(g\) the chord lies above the graph, so \(\E[g(X)]\ge g(\E[X])\). With other probabilities you move along the chord — that is exactly the definition of convexity with \(t=\P(X=x_1)\). Jensen's inequality says the same holds for any distribution.
Theorem 2.42 Jensen's inequality Script 2.42
Let \(X\) be a real random variable with finite \(\E[X]\), and \(g:\R\to\R\) convex, i.e. \(g(tx_1+(1-t)x_2)\le tg(x_1)+(1-t)g(x_2)\) for all \(x_1,x_2\in\R\), \(t\in[0,1]\). Then
\[ \E[g(X)]\ge g(\E[X]). \]If \(g\) is strictly convex, equality holds iff \(X=\E[X]\) with probability 1 (\(X\) is almost surely constant). If \(g\) is concave, the inequality reverses: \(\E[g(X)]\le g(\E[X])\).
Script typo: the convexity condition is written with \(f\) instead of \(g\). Also, for functions like \(-\ln\) or \(\sqrt{\ }\) that live only on \((0,\infty)\), the theorem is used for \(X\) with values in that interval (Example 2.43(i) does this). Does \(\E[g(X)]\) have to exist? No extra assumption is needed: by the tangent-line property (primer box 2) \(g(X)\ge a+bX\) for suitable constants \(a,b\), and \(\E[a+bX]=a+b\E[X]\) is a finite number, so \(\E[g(X)]\) is either a real number or \(+\infty\). In the second case the inequality \(\E[g(X)]\ge g(\E[X])\) is true for the trivial reason that \(+\infty\) is larger than any number.
Proof sketch for differentiable \(g\) Script — each step explained
Step 1: the tangent line. A differentiable convex \(g\) lies above each of its tangent lines (primer box 2). Take the tangent at the point \(x_0=\E[X]\). It is the first-order Taylor approximation
\[ L(x)=g(\E[X])+g'(\E[X])\,(x-\E[X]). \]Step 2: plug in \(X\). Since \(g(x)\ge L(x)\) for every number \(x\), also \(g(X)\ge g(\E[X])+g'(\E[X])(X-\E[X])\) for every outcome.
Step 3: take expectations. One reason per line:
\[ \begin{aligned} \E[g(X)]&\ge\E\bigl[g(\E[X])+g'(\E[X])(X-\E[X])\bigr] &&\text{monotonicity of }\E\\ &=\E[g(\E[X])]+\E\bigl[g'(\E[X])(X-\E[X])\bigr] &&\text{linearity of }\E\\ &=g(\E[X])+g'(\E[X])\,\E[X-\E[X]] &&g(\E[X]),\,g'(\E[X])\text{ are constants}\\ &=g(\E[X])+g'(\E[X])\,(\E[X]-\E[X]) &&\text{linearity; }\E[\text{constant}]=\text{constant}\\ &=g(\E[X])+g'(\E[X])\cdot0=g(\E[X]). \end{aligned} \]Without a derivative. The script remarks that a rigorous proof for non-differentiable \(g\) uses a supporting line: a straight line through \((\E[X],g(\E[X]))\) that stays below the graph. For convex \(g\) such a line always exists, and it replaces the tangent in the steps above.
Concave: apply the result to the convex \(-g\), which gives \(\E[-g(X)]\ge-g(\E[X])\); multiplying by \(-1\) flips the inequality to \(\E[g(X)]\le g(\E[X])\).
Equality for strictly convex \(g\) (mine). Put \(D:=g(X)-L(X)\). Strict convexity means \(g(x)>L(x)\) for every \(x\ne\E[X]\), so \(D\ge0\) everywhere, and \(D=0\) exactly on the event \(\{X=\E[X]\}\). Equality \(\E[g(X)]=g(\E[X])\) means \(\E[D]=0\) (because \(\E[L(X)]=g(\E[X])\), as computed in step 3). A non-negative random variable with mean 0 is 0 almost surely — here is the one line that shows it, using Markov's inequality (Theorem 2.38) itself: for every \(n\in\N\), \(\P(D\ge\frac1n)\le n\,\E[D]=0\), and \(\{D>0\}=\bigcup_{n\ge1}\{D\ge\frac1n\}\) is a countable union of events of probability 0, hence has probability 0 (\(\sigma\)-subadditivity, Proposition 1.19(vi)). So \(D=0\) almost surely, i.e. \(X=\E[X]\) almost surely. Conversely, if \(X=\E[X]\) almost surely then both sides equal \(g(\E[X])\), so equality holds.
In words: for a convex \(g\), "first average, then apply \(g\)" gives at most as much as "first apply \(g\), then average". For a concave \(g\) it is the other way round.
Example 2.43 applications of Jensen Script 2.43
(i) \(g(x)=-\ln x\) is convex on \((0,\infty)\) (\(g''=1/x^2>0\)). For a positive \(X\): \(\E[-\ln X]\ge-\ln\E[X]\), i.e. \(\E[\ln X]\le\ln\E[X]\): the logarithm of the mean is at least the mean of the logarithm. This is the AM–GM inequality in disguise (worked out by me): for \(X\) uniform on positive numbers \(a_1,\dots,a_n\), \(\frac1n\sum\ln a_i\le\ln\frac1n\sum a_i\); exponentiating (\(\exp\) is increasing) gives \(\sqrt[n]{a_1\cdots a_n}\le\frac{a_1+\dots+a_n}n\) — geometric mean \(\le\) arithmetic mean.
(ii) Mean \(\mu\), median \(m\), standard deviation \(\sigma\), finite variance. Then \(|\mu-m|\le\sigma\): the mean and the median are never more than one standard deviation apart. The chain, one reason per step:
\[ \begin{aligned} |\mu-m|&=\bigl|\E[X-m]\bigr| &&\text{linearity: }\E[X-m]=\mu-m\\ &\le\E\bigl[|X-m|\bigr] &&\text{Jensen with the convex }g(x)=|x|\\ &\le\E\bigl[|X-\mu|\bigr] &&\text{the median minimises }c\mapsto\E|X-c|\text{ (Remark 2.22(v))}\\ &=\E\Bigl[\sqrt{(X-\mu)^2}\Bigr]\le\sqrt{\E[(X-\mu)^2]}=\sigma &&\text{Jensen with the concave }\sqrt{\ }\text{, applied to }(X-\mu)^2 \end{aligned} \]Check with Example 2.21: for \(\Exp(\lambda)\), \(\mu-m=\frac{1-\ln2}{\lambda}\approx\frac{0.31}{\lambda}\le\frac1\lambda=\sigma\) ✓. Other everyday consequences: \(\E[X^2]\ge(\E[X])^2\) (i.e. \(\Var\ge0\)), \(\E[e^X]\ge e^{\E[X]}\) (SoSe26 P3b), \(\E[1/X]\ge1/\E[X]\) for \(X>0\).
Remark 2.44 "Jensen oh Jensen" Script 2.44
Jensen's inequality is "infamous among researchers, because it's always 'the wrong way round'". The script quotes Francis Bach: "Jensen's inequality is often not in the direction that you would hope it to be."
A memory aid for the direction: \(g(x)=x^2\) gives \(\E[X^2]\ge(\E X)^2\), which you know is right because the difference is the variance. Convex — "function of the mean is smaller".
Remark 2.45 concentration inequalities Script 2.45
Markov and Chebyshev bound the probability that \(X\) is large or far from its mean — how concentrated the mass is. When a function of many (typically independent) random variables "does not depend too much on any single one of them" (a sum or an average, say), much stronger results hold: its distribution concentrates tightly around its mean. These concentration inequalities (Chernoff, Hoeffding, Azuma, McDiarmid, Bennett, Bernstein) are a cornerstone of statistics and machine learning. Markov and Chebyshev give polynomial bounds in \(\varepsilon\); for sums of independent bounded variables one gets exponential bounds. ("Polynomial in \(\varepsilon\)": the bound falls like a power, e.g. \(1/\varepsilon^2\). "Exponential": it falls like \(e^{-c\varepsilon^2}\), far faster.) The script links to a short online overview and to a standard reference book on concentration inequalities, to give a feeling for what the different variants look like.
Taste of one (not examinable here). Hoeffding: for iid \(X_i\in[a,b]\), \(\P(|\bar X_n-\mu|\ge\varepsilon)\le2\exp\bigl(-\frac{2n\varepsilon^2}{(b-a)^2}\bigr)\). For fair coin flips and \(\varepsilon=0.1\): with \(n=100\), Chebyshev gives \(\frac{0.25/100}{0.01}=0.25\) and Hoeffding \(2e^{-2}\approx0.27\) — no better. With \(n=1000\): Chebyshev \(0.025\), Hoeffding \(2e^{-20}\approx4\cdot10^{-9}\). The exponential bound wins once \(n\) is large.
Exercise-sheet tasks
Sheet 8, Exercise 2 — server overload Sheet 8 · Ex 2
Requests per hour: \(N_A\) with mean and variance 50, \(N_B\) with mean and variance 100, independent; capacity \(C=200\); \(N_T=N_A+N_B\). (i) \(\E[N_T]\), \(\Var[N_T]\). (ii) Chebyshev bound on \(\P(N_T>C)\). (iii) Markov bound; compare. (iv) A suitable model for \(N_A,N_B\)? (v) Using \(X\sim\Poi(\lambda_1)\perp\!\!\!\perp Y\sim\Poi(\lambda_2)\Rightarrow X+Y\sim\Poi(\lambda_1+\lambda_2)\), compute \(\P(N_T>C)\) exactly and discuss.
Solution
(i) Linearity: \(\E[N_T]=50+100=150\). Independence (Proposition 2.8(iv)): \(\Var[N_T]=50+100=150\).
(ii) Counts are integers, so \(\{N_T>200\}=\{N_T\ge201\}=\{N_T-150\ge51\}\subseteq\{|N_T-150|\ge51\}\). Chebyshev with \(\varepsilon=51\): \(\P(N_T>200)\le\frac{150}{51^2}=\frac{150}{2601}\approx0.0577\).
(iii) \(N_T\ge0\), so Markov: \(\P(N_T>200)\le\P(N_T\ge200)\le\frac{150}{200}=0.75\) (using \(\varepsilon=201\) gives \(0.746\)). Chebyshev is far sharper because it also uses the variance: the spread \(\sigma\approx12.2\) is small compared with the distance 51 to the capacity.
(iv) Poisson: counts of independent events in a fixed time window, and a Poisson variable has mean = variance, exactly as given. So \(N_A\sim\Poi(50)\), \(N_B\sim\Poi(100)\).
(v) \(N_T\sim\Poi(150)\) (proved in Sheet 8 Ex 1 with characteristic functions, §2.3), so \(\P(N_T>200)=1-\sum_{k=0}^{200}e^{-150}\frac{150^k}{k!}\approx4.2\cdot10^{-5}\) (computed numerically). That is more than a thousand times smaller than the Chebyshev bound.
Discussion (as in the official solution): bounds hold for every distribution with the given mean and variance, so they are safe but loose; the exact value depends on the Poisson assumption, which may underestimate the risk if requests arrive in bursts rather than independently. The official solution is correct.
Sheet 9, Exercise 2 (i), (iii) — insurance claims Sheet 9 · Ex 2
An insurer has \(n=10^4\) clients. Client \(i\) claims a random amount \(X_i\) per year; the \(X_i\) are iid with \(\mu=500\) and \(\sigma^2=800^2=640\,000\). Each client pays a premium [Prämie] of \(Z\) euros per year. \(S_n=\sum_{i=1}^n X_i\) is the total claimed. (i) Minimal \(Z\) for an expected profit of 500 000. (iii) With \(Z=550\), use Chebyshev to check whether the company is at least 95 % sure that premiums cover claims. (Parts (ii) and (iv) use the law of large numbers and the clt: §2.4.)
Solution
(i) Profit = premiums collected minus claims, \(nZ-S_n\). Its mean is \(nZ-\E[S_n]=nZ-n\mu=10^4Z-5\cdot10^6\) (linearity). Setting it to \(5\cdot10^5\): \(Z=\frac{5\cdot10^5+5\cdot10^6}{10^4}=550\).
(iii) A loss means \(S_n>nZ=5.5\cdot10^6\). \(\E[S_n]=5\cdot10^6\) and \(\Var[S_n]=n\sigma^2=6.4\cdot10^9\) (independence). One-sided to two-sided (primer box 3), then Chebyshev with \(\varepsilon=5\cdot10^5\):
\[ \P(S_n>5.5\cdot10^6)\le\P\bigl(|S_n-\E[S_n]|\ge5\cdot10^5\bigr)\le\frac{6.4\cdot10^9}{(5\cdot10^5)^2}=\frac{6.4\cdot10^9}{2.5\cdot10^{11}}=0.0256\le0.05 . \]So yes: the probability of a loss is at most 2.56 %, and the 95 % requirement is met. (The clt approximation in (iv) gives about \(2\cdot10^{-10}\).) The official solution is correct.
Sheet 10, Exercise 4 — the best weights for an average Sheet 10 · Ex 4
iid \(X_1,\dots,X_n\) with unknown mean \(\mu\) and standard deviation \(\sigma\) (dart distances). \(\hat\mu=\sum_i\lambda_iX_i\) with \(\lambda_i\ge0\), \(\sum_i\lambda_i=1\) (a convex combination). (i) Show \(\hat\mu\) is unbiased. (ii) Prove \(\frac1n\sum_i\lambda_i^2\ge\frac1{n^2}\) (hint: Jensen for a suitable discrete random variable). (iii) Which \(\lambda_i\) minimise the mean squared error?
Solution
(i) Linearity: \(\E[\hat\mu]=\sum_i\lambda_i\mu=\mu\sum_i\lambda_i=\mu\). "Unbiased" means exactly \(\E[\hat\mu]=\mu\) (§3.2).
(ii) Let \(Z\) take the values \(\lambda_1,\dots,\lambda_n\), each with probability \(\frac1n\) (a Laplace distribution on the list). Then \(\E[Z]=\frac1n\sum_i\lambda_i=\frac1n\) and \(\E[Z^2]=\frac1n\sum_i\lambda_i^2\). Jensen with the convex \(x\mapsto x^2\):
\[ \frac1n\sum_i\lambda_i^2=\E[Z^2]\ge(\E[Z])^2=\frac1{n^2}. \](iii) The mean squared error [mittlere quadratische Abweichung] is \(\operatorname{mse}[\hat\mu]=\E[(\hat\mu-\mu)^2]\). By (i), \(\mu=\E[\hat\mu]\), so \(\operatorname{mse}[\hat\mu]=\E[(\hat\mu-\E[\hat\mu])^2]=\Var[\hat\mu]\) (bias–variance decomposition, §3.2). Independence and Proposition 2.8(iii),(iv) (\(\Var[aY]=a^2\Var[Y]\); variances of independent summands add): \(\Var[\hat\mu]=\sum_i\lambda_i^2\sigma^2\ge\frac{\sigma^2}n\) by (ii). The choice \(\lambda_i=\frac1n\) gives exactly \(\frac{\sigma^2}n\), so the ordinary average is the best convex combination. Equality in Jensen for the strictly convex \(x^2\) forces \(Z\) to be constant, i.e. all \(\lambda_i\) equal — so, as long as \(\sigma>0\), it is the unique best choice (uniqueness added by me). (If \(\sigma=0\) every \(X_i\) equals \(\mu\) with probability 1, so every choice of weights has mean squared error 0 and nothing is to be optimised.)
The official solution is correct (its statement has a harmless typo, "\(\sum_{i=1}^n\lambda_1=1\)" for \(\sum_{i=1}^n\lambda_i=1\)). The general lesson: Jensen with a uniform distribution over a finite list turns into an inequality between averages — a quick way to prove the power-mean-type inequalities that exams like.
Old-exam tasks
SoSe 2025, Problem 5c — the duck hunt with two hunters SoSe25 · P5c · 4 credits
Setting (parts (a), (b) are on §2.1). \(n\) hunters with perfect aim each shoot once at one of \(m\) ducks, chosen uniformly at random and independently. \(X\) is the number of surviving ducks. Part (b) gives \(\Var[X]=m\bigl(\frac{m-1}m\bigr)^n+m(m-1)\bigl(\frac{m-2}m\bigr)^n-m^2\bigl(\frac{m-1}m\bigr)^{2n}\).
Statement (c). Now \(n=2\) hunters. Find \(k\in\N\) as a function of \(m\) such that the number \(X\) of surviving ducks lies in \([\E[X]-k,\E[X]+k]\) with probability at least 90 %. Hint: rewrite so that Chebyshev applies.
Solution. \(\P(X\in[\E X-k,\E X+k])\ge0.9\) holds if \(\P(|X-\E X|>k)\le0.1\), which holds if \(\P(|X-\E X|\ge k)\le0.1\), which Chebyshev guarantees once \(\frac{\Var[X]}{k^2}\le0.1\), i.e. \(k^2\ge10\Var[X]\). With \(n=2\), part (b) gives
\[ \Var[X]=\frac{(m-1)^2}m+\frac{(m-1)(m-2)^2}m-\frac{(m-1)^4}{m^2}=\frac{m-1}{m^2}\bigl[m(m-1)+m(m-2)^2-(m-1)^3\bigr]=\frac{m-1}{m^2}, \]because the bracket expands to \((m^2-m)+(m^3-4m^2+4m)-(m^3-3m^2+3m-1)=1\). Hence \(k=\Bigl\lceil\frac{\sqrt{10(m-1)}}m\Bigr\rceil\), rounding up so the inequality still holds.
What that number is. \(10(m-1)/m^2\le1\) iff \(m^2-10m+10\ge0\) iff \(m\ge9\), so the formula gives \(k=0\) for \(m=1\), \(k=2\) for \(2\le m\le8\), and \(k=1\) for \(m\ge9\). How loose Chebyshev is here: with two hunters at least \(m-2\) and at most \(m-1\) ducks survive, and \(\E[X]=\frac{(m-1)^2}m=m-2+\frac1m\). Both possible values lie within distance 1 of the mean, so \(k=1\) already works with probability 1 for every \(m\ge2\). The official answer is correct — it answers "find a \(k\)" with a valid one — but a sharper \(k\) exists. Small slip in the official solution: "at least 90 %" means \(\P(\text{outside})\le0.1\), but it writes "\(<0.1\)" and then sets \(\Var[X]/k^2=0.1\). The version above with "\(\le\)" is the consistent one; the final \(k\) is the same.
WiSe 25/26, Problem 4b — Chebyshev for an estimator WiSe25 · P4b · 3 credits
Setting. Rainfall amounts \(X_1,\dots,X_n\) iid with density \(p_\theta(x)=\frac1{\theta^2}xe^{-x/\theta}\) on \(x\ge0\); part (a) (maximum likelihood, §3.2) derives the estimator \(\hat\theta=\frac1{2n}\sum_{i=1}^nX_i\). (b) Use Chebyshev to bound the probability that \(\hat\theta\) deviates from \(\theta\) by at least \(\varepsilon>0\). Hint: \(\E[X_i]=2\theta\), \(\Var[X_i]=2\theta^2\).
Solution. Linearity: \(\E[\hat\theta]=\frac1{2n}\cdot n\cdot2\theta=\theta\). Independence and scaling: \(\Var[\hat\theta]=\frac1{(2n)^2}\cdot n\cdot2\theta^2=\frac{\theta^2}{2n}\). Chebyshev (\(\P_\theta\) means: probability when the true parameter is \(\theta\)):
\[ \P_\theta\bigl(|\hat\theta-\theta|\ge\varepsilon\bigr)\le\frac{\theta^2}{2n\varepsilon^2}. \]Where the hint comes from: the Gamma distribution [Gammaverteilung] \(\Gamma(\alpha,\beta)\) has density \(\frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}\) for \(x>0\) (Example 1.61(iii); here \(\Gamma(\alpha)\) is the Gamma function of Definition 1.60, with \(\Gamma(2)=1!=1\)). Putting \(\alpha=2\) and \(\beta=\frac1\theta\) turns this into \(\frac{(1/\theta)^2}{1}x\,e^{-x/\theta}=\frac1{\theta^2}xe^{-x/\theta}\), which is exactly \(p_\theta\). So \(X_i\sim\Gamma(2,\frac1\theta)\) and Lemma 2.27(iii) gives \(\E=\frac\alpha\beta=\frac{2}{1/\theta}=2\theta\) and \(\Var=\frac\alpha{\beta^2}=\frac2{(1/\theta)^2}=2\theta^2\). The bound shrinks like \(\frac1n\) — enough to show \(\hat\theta\to\theta\) in probability (consistency, §2.4 and §3.2). Parts (c), (d) compare with the clt (§2.4). The official solution is correct.
SoSe 2026, Problem 3 — Jensen's inequality SoSe26 · P3 · 5 credits
(a) State Jensen's inequality with all required assumptions. Official answer: \(X\) a real random variable with finite \(\E[X]\); \(g:\R\to\R\) convex; then \(\E[g(X)]\ge g(\E[X])\). One point each for "finite expectation", "convex \(g\)" and the correct inequality; the equality case and the concave version were not graded.
(b) If \(\E[X]\) and \(\E[e^X]\) are finite, show \(\E[X]\le\log\E[e^X]\). Solution. \(g(x)=e^x\) is convex (\(g''=e^x>0\)), so Jensen gives \(e^{\E[X]}\le\E[e^X]\). Since \(e^x>0\), also \(\E[e^X]>0\), so the logarithm is defined there; it is strictly increasing, and applying it to both sides keeps the direction: \(\E[X]=\log e^{\E[X]}\le\log\E[e^X]\).
Marks were given separately for "\(\log\) is increasing on \((0,\infty)\)" and "\(\E[e^X]>0\)" — say both explicitly. The official solution is correct.
SoSe 2026, Problem 4d — a Markov bound for a scaled random walk SoSe26 · P4d · 3 credits
Setting. \(Z_n=\frac1{\sqrt n}\sum_{j=1}^nX_j\) with iid \(X_j=\pm1\) (probability \(\frac12\) each); part (c) (§2.1) gives \(\E[Z_n]=0\), \(\Var[Z_n]=1\). (d) For \(a>0\), use Markov to bound \(\P(|Z_n|\ge a)\), and use the clt to approximate it.
Solution. \(Z_n^2\ge0\), and \(|Z_n|\ge a\iff Z_n^2\ge a^2\) (both sides non-negative; squaring is increasing on \([0,\infty)\)). Markov for \(Z_n^2\) with \(\varepsilon=a^2\):
\[ \P(|Z_n|\ge a)=\P(Z_n^2\ge a^2)\le\frac{\E[Z_n^2]}{a^2}=\frac1{a^2}, \]using \(\E[Z_n^2]=\Var[Z_n]+(\E[Z_n])^2=1\). By the clt, \(Z_n\) is approximately \(\mathcal N(0,1)\), so \(\P(|Z_n|\ge a)\approx2(1-\Phi(a))=2\Phi(-a)\) (§2.4). The factor 2 counts both tails, \(Z_n\ge a\) and \(Z_n\le-a\); they are equally likely because \(\mathcal N(0,1)\) is symmetric about 0.
This "Markov applied to \(Z^2\)" is Chebyshev. For \(a=2\): the bound is 0.25, the normal approximation 0.046. For \(a\le1\) the bound is \(\ge1\) and useless. The official solution is correct.
Summary sheet
The three inequalities
- Markov
- \(X\ge0\), \(\varepsilon>0\): \(\P(X\ge\varepsilon)\le\E[X]/\varepsilon\); general: \(\P(X\ge\varepsilon)\le\E[f(X)]/f(\varepsilon)\) for increasing \(f\ge0\)
- Chebyshev
- \(\P(|X-\mu|\ge\varepsilon)\le\sigma^2/\varepsilon^2\); \(\P(|X-\mu|\ge k\sigma)\le1/k^2\)
- Jensen
- \(g\) convex: \(\E[g(X)]\ge g(\E[X])\); concave: \(\le\)
- one-sided
- \(\P(X\ge\mu+\varepsilon)\le\P(|X-\mu|\ge\varepsilon)\)
- integers
- \(\{N>200\}=\{N\ge201\}\) for integer-valued \(N\)
Recipe for a Chebyshev problem
- Compute \(\E\) and \(\Var\) of the quantity (linearity; independence for the variance of sums).
- Rewrite the event as "distance from the mean at least \(\varepsilon\)" — enlarge a one-sided event to a two-sided one if needed.
- Plug in; for "find \(k\) / \(n\) such that probability \(\ge1-\alpha\)", solve \(\Var/\varepsilon^2\le\alpha\) and round in the safe direction.
Traps
- Markov needs \(X\ge0\) (apply it to \(|X|\), \(X^2\), \(e^{X}\)… otherwise).
- A bound \(\ge1\) is true but useless: Markov only helps for \(\varepsilon>\E[X]\), Chebyshev for \(\varepsilon>\sigma\).
- These are upper bounds, not approximations; the clt gives approximations, not bounds.
- Jensen's direction: convex \(\Rightarrow\) \(\E[g(X)]\) is the larger side (think \(\E[X^2]\ge(\E X)^2\)).
- When stating Jensen in an exam: "\(\E[X]\) finite" and "\(g\) convex" are both graded.
Exam focus
Chebyshev appears in almost every exam, usually as the "bound" half of a "bound versus clt approximation" comparison (WiSe25 P4b–d, SoSe26 P4d, Sheet 9 Ex 2(iii)–(iv)) or as "find \(k\)" (SoSe25 P5c). Jensen appeared as a 5-credit definition-plus-application problem (SoSe26 P3).
Self-test
Section 2.3 · Lectures 8–9 (10 and 17 June 2026)
Computations with distributions
Rechnen mit Verteilungen
What this page covers Script §2.3, pp. 73–78
Everything from Definition 2.46 to Remark 2.54. The script's section goal: "We introduce and get used to a set of tools that are useful for performing computations with distributions, including characteristic functions (cf), transformations of distributions, and explicit computation rules for special distributions (e.g., Gaussians)."
Worked in place: Sheet 7 Ex 2 and 5, Sheet 8 Ex 1 and 5, Sheet 9 Ex 5, and the old-exam tasks SoSe26 P1c, P4a, P4b (plus the characteristic-function route to SoSe26 P4c). WiSe25 P3a is re-solved here with Proposition 2.51 as a cross-check of §1.3.
Background you need: complex numbers (primer below), and matrices, determinants, inverses, positive definiteness and the multivariable change of variables — all on the new background page B5.
The big picture
§2.1 summarised a distribution by a few numbers. This page is about computing with whole distributions. Three typical questions:
- What is the distribution of a sum? Two independent Poisson counts: is the total Poisson again? Adding densities directly means a convolution integral (Sheet 7 Ex 2). The characteristic function turns "sum of independent variables" into "product of functions", which is much easier.
- What is the density of \(g(X)\)? If you know \(p_X\) and apply a smooth invertible \(g\), the change-of-variables formula (Proposition 2.51) gives \(p_{g(X)}\) directly: take \(p_X\) at the pre-image and correct by how much \(g\) stretches space.
- How do Gaussians behave? Sums, linear maps, marginals and conditionals of Gaussians are again Gaussian (Lemma 2.53), so every computation reduces to linear algebra with the mean vector and the covariance matrix.
In words: a characteristic function is a fingerprint of a distribution that multiplies under independent sums; the change-of-variables formula moves densities through maps; Gaussians are the family closed under everything linear.
Primer: complex numbers and \(e^{it}\) My addition
Cross-references
Complex numbers from scratch: Analysis: complex numbers; Euler's formula with a widget: Analysis 5.3. Taylor expansion: Analysis 10.1. Complex numbers as this course uses them (Euler, derivatives in \(t\), the complex limit \((1+z_n/n)^n\to e^z\)): B1. Differentiating under an integral sign: Analysis 9.2 treats only a continuous integrand on a bounded rectangle; for integrals over all of \(\R\) and expectations the justification is dominated convergence (B4, and B1). Matrices and change of variables: B5.
What you need about complex numbers
- \(i\) is a number with \(i^2=-1\). A complex number is \(z=a+bi\) with real part \(a\) and imaginary part \(b\); picture it as the point \((a,b)\) in the plane. Add and multiply as usual, replacing \(i^2\) by \(-1\).
- Modulus \(|z|=\sqrt{a^2+b^2}\) (distance from 0); conjugate \(\bar z=a-bi\) (mirror image); \(z\) is real iff \(z=\bar z\).
- Euler's formula: \(e^{i\theta}=\cos\theta+i\sin\theta\) — the point at angle \(\theta\) on the unit circle. Hence \(|e^{i\theta}|=\sqrt{\cos^2\theta+\sin^2\theta}=1\), \(\overline{e^{i\theta}}=e^{-i\theta}\), and \(e^{i\alpha}e^{i\beta}=e^{i(\alpha+\beta)}\).
- Derivatives of complex-valued functions of a real \(t\) (B1). A function \(f(t)=u(t)+i\,v(t)\) with real \(u,v\) is differentiated part by part: \(f'(t):=u'(t)+i\,v'(t)\) — \(i\) is just a constant. Sum rule, product rule, chain rule (with a real inner function) and Taylor expansion then hold exactly as for real functions: multiply everything out into its real and its imaginary part and apply the real rule to each part. Key example, for a real constant \(c\): by Euler \(e^{ict}=\cos(ct)+i\sin(ct)\), so \(\frac{\mathrm d}{\mathrm dt}e^{ict}=-c\sin(ct)+ic\cos(ct)=ic\bigl(\cos(ct)+i\sin(ct)\bigr)=ic\,e^{ict}\) (in the middle step we wrote \(-c\sin(ct)=ic\cdot i\sin(ct)\), using \(i^2=-1\)). Repeating it \(n\) times: \(\frac{\mathrm d^n}{\mathrm dt^n}e^{ict}=(ic)^ne^{ict}\) — exactly the real rule \((e^{ct})'=ce^{ct}\) with \(c\) replaced by \(ic\). Its size: \(|ic\,e^{ict}|=|ic|\cdot|e^{ict}|=|c|\cdot1=|c|\), because \(ic=0+ci\) has modulus \(\sqrt{0^2+c^2}=|c|\) and \(|e^{ict}|=1\) by the bullet above. This bound is what makes the moment formula of Remark 2.47(iii) work.
- Expectation of a complex random variable is taken part by part: \(\E[U+iV]:=\E[U]+i\E[V]\). Linearity, \(|\E[Z]|\le\E[|Z|]\) and "independent factors: \(\E[Z_1Z_2]=\E[Z_1]\E[Z_2]\)" carry over.
- Small-\(o\) notation (Analysis 6.1): \(f(s)=o(s^2)\) means \(f(s)/s^2\to0\) as \(s\to0\) — "negligible compared with \(s^2\)".
Example. For \(X=\pm1\) with probability \(\frac12\) each: \(\E[e^{itX}]=\frac12e^{it}+\frac12e^{-it}=\frac12(\cos t+i\sin t)+\frac12(\cos t-i\sin t)=\cos t\).
Words and symbols used on this page My addition — one-line reminders
- RVRV: a real-valued random variable [reellwertige Zufallsvariable]. \(\P\) is probability, \(\E\) the expectation [Erwartungswert], \(\Var\) the variance, \(\Cov\) the covariance (§2.1).
- pmf \(p_X(x)=\P(X=x)\) for a discrete \(X\); pdf (density [Dichte]) \(p_X\) for a continuous \(X\), with \(\P(a\le X\le b)=\int_a^bp_X(x)\,\mathrm dx\); cdf \(F_X(x)=\P(X\le x)\) (§1.3). The derivative of the cdf is the pdf: \(F_X'=p_X\).
- Support \(S_X=\{x:p_X(x)>0\}\): the set of values where the density is positive.
- \(X\perp\!\!\!\perp Y\): \(X\) and \(Y\) are independent [unabhängig]. iid: independent and identically distributed (all have the same distribution).
- \(X\sim\) "name": \(X\) has this distribution. \(\P_X\) is the distribution [Verteilung] of \(X\), i.e. \(\P_X(B)=\P(X\in B)\).
- Gamma function \(\Gamma(\alpha)=\int_0^\infty u^{\alpha-1}e^{-u}\,\mathrm du\) for \(\alpha>0\) (for whole numbers \(\Gamma(n)=(n-1)!\)). Gamma distribution \(\Gamma(\alpha,\beta)\): density \(\frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}\) for \(x>0\) (shape \(\alpha\), rate \(\beta\)). \(\chi^2_k\) ("chi-squared with \(k\) degrees of freedom") is \(\Gamma(\frac k2,\frac12)\). The Cauchy distribution has density \(\frac1{\pi(1+x^2)}\); it has no mean. All from §1.3.
- \(\varphi^{(n)}\): the \(n\)-th derivative of \(\varphi\). \(X_n\xrightarrow{d}X\): "\(X_n\) converges in distribution to \(X\)" — the cdfs of \(X_n\) approach the cdf of \(X\) at every point where the latter is continuous (Definition 2.56, §2.4).
- Vectors, matrices, transpose \(A^\top\), inverse \(A^{-1}\), determinant \(\det A\) (also written \(|A|\)), the Jacobian matrix and the Cholesky factor: B5.
Characteristic functions
The idea. A pmf lists \(\P(X=x)\) for every \(x\). A characteristic function stores the same information in a different form: one complex number \(\E[e^{itX}]\) for every real \(t\). Nothing is lost: the distribution can be recovered from it (uniqueness). The new form has two advantages. First, it turns sums of independent variables into products. Second, its derivatives at \(t=0\) give the moments \(\E[X],\E[X^2],\dots\). It always exists, because \(e^{itX}\) always has size 1.
Definition 2.46 characteristic function Script 2.46
The characteristic function [charakteristische Funktion] of a real random variable \(X\) is
\[ \varphi_X(t)=\E\bigl[e^{itX}\bigr]=\E[\cos(tX)]+i\,\E[\sin(tX)],\qquad t\in\R . \]- discrete \(X\) with pmf \(p_X\): \(\varphi_X(t)=\sum_xe^{itx}p_X(x)\);
- continuous \(X\) with pdf \(p_X\): \(\varphi_X(t)=\int_{-\infty}^{\infty}e^{itx}p_X(x)\,\mathrm dx\).
Here \(i=\sqrt{-1}\) is the imaginary unit and \(t\) is a real number of our choice. It exists for every \(X\) and every \(t\), because \(|e^{itX}|=\sqrt{\cos^2(tX)+\sin^2(tX)}=1\): we take the expectation of a bounded function.
Small example (mine). \(X\sim\Ber(0.3)\), so \(X=0\) with probability 0.7 and \(X=1\) with probability 0.3. By (i), \(\varphi_X(t)=e^{it\cdot0}\cdot0.7+e^{it\cdot1}\cdot0.3=0.7+0.3e^{it}\). At \(t=\pi\): \(e^{i\pi}=\cos\pi+i\sin\pi=-1\), so \(\varphi_X(\pi)=0.7-0.3=0.4\).
Characteristic functions to know My table; Poisson is Sheet 8 Ex 1, Gamma is Example 2.50, normal is Example 2.48
| distribution | \(\varphi(t)\) | how |
|---|---|---|
| \(\pm1\) with prob. \(\frac12\) | \(\cos t\) | primer example |
| \(\Ber(p)\) | \(1-p+pe^{it}\) | two terms: \(e^{0}(1-p)+e^{it}p\) |
| \(\Bin(n,p)\) | \((1-p+pe^{it})^n\) | sum of \(n\) independent \(\Ber(p)\), Remark 2.47(iv) |
| \(\Poi(\lambda)\) | \(\exp\bigl(\lambda(e^{it}-1)\bigr)\) | exponential series, Sheet 8 Ex 1 |
| \(\Unif(-1,1)\) | \(\frac{\sin t}{t}\) (and 1 at \(t=0\)) | \(\frac12\int_{-1}^1\cos(tx)\,\mathrm dx\); the \(\sin\)-part is odd |
| \(\Exp(\lambda)\) | \(\frac{\lambda}{\lambda-it}\) | \(\Gamma(1,\lambda)\), Example 2.50(ii) |
| \(\Gamma(\alpha,\beta)\) | \((1-it/\beta)^{-\alpha}\) | Example 2.50(ii) |
| \(\mathcal N(\mu,\sigma^2)\) | \(\exp(i\mu t-\frac12\sigma^2t^2)\) | Example 2.48 |
| Cauchy \(t_1\) | \(e^{-|t|}\) | stated only; not differentiable at 0 — no mean |
Remark 2.47 properties of characteristic functions Script 2.47
- \(\varphi_X(0)=1\) and \(|\varphi_X(t)|\le1\).
- \(\varphi_{aX+b}(t)=e^{itb}\varphi_X(at)\).
- Moments: \(\E[X^n]=i^{-n}\varphi_X^{(n)}(0)\) (if the moments exist). In particular \(\E[X]=-i\varphi_X'(0)\) and \(\E[X^2]=-\varphi_X''(0)\).
- Independent sums: if \(X\perp\!\!\!\perp Y\), then \(\varphi_{X+Y}(t)=\varphi_X(t)\varphi_Y(t)\).
- Uniqueness: the characteristic function determines the distribution; there are explicit inversion formulas (e.g. Lévy's inversion theorem).
- Lévy's continuity theorem: \(X_n\xrightarrow{d}X\) (Definition 2.56) iff \(\varphi_{X_n}(t)\to\varphi_X(t)\) for every \(t\) ("pointwise"); the script adds "and \(\varphi_X\) is continuous at \(t=0\)" (see the note in the proof box). This is the engine of the proof of the central limit theorem.
In words: the cf starts at 1 and never leaves the unit disc; shifting \(X\) multiplies it by a factor, stretching \(X\) stretches its argument; derivatives at 0 give moments; independent sums give products; the cf identifies the distribution; and convergence of cfs means convergence in distribution.
Proofs of (i)–(iv) (i), (ii), (iv): Sheet 9 Ex 5 (iii): mine
(i) \(\varphi_X(0)=\E[e^0]=1\). And \(|\E[e^{itX}]|\le\E[|e^{itX}|]=\E[1]=1\) (the triangle inequality for integrals, i.e. Jensen with the convex \(|\cdot|\)).
(ii) \(\E[e^{it(aX+b)}]=\E[e^{itb}e^{i(at)X}]=e^{itb}\E[e^{i(at)X}]=e^{itb}\varphi_X(at)\): \(e^{itb}\) is a constant and comes out of \(\E\).
(iv) \(e^{itX}\) and \(e^{itY}\) are functions of independent variables, hence independent, so \(\E[e^{itX}e^{itY}]=\E[e^{itX}]\E[e^{itY}]\) (Proposition 2.4(v), applied to real and imaginary parts). By induction the same holds for \(n\) independent summands.
(iii) For fixed \(x\), the primer rule with \(c=x\) gives \(\frac{\mathrm d^n}{\mathrm dt^n}e^{itx}=(ix)^ne^{itx}\). We want to pull \(\frac{\mathrm d}{\mathrm dt}\) inside \(\E\) ("differentiate under the expectation sign"). This is allowed when the derivative is bounded, for all \(t\) at once, by something with finite expectation — that is the dominated convergence theorem [Satz von der majorisierten Konvergenz] (B4; the rule for parameter integrals is in B1). Here the bound is simple: \(\bigl|\frac{\mathrm d}{\mathrm dt}e^{itx}\bigr|=|ix\,e^{itx}|=|x|\) and, for the \(k\)-th derivative, \(|(ix)^ke^{itx}|=|x|^k\), which does not depend on \(t\). The bound we need for the \(k\)-th step is therefore the function \(x\mapsto|x|^k\), and its expectation is \(\E|X|^k\). So if \(\E|X|^n<\infty\) — which also makes \(\E|X|^k<\infty\) for every \(k\le n\), since \(|x|^k\le1+|x|^n\) (if \(|x|\le1\) then \(|x|^k\le1\); if \(|x|>1\) then \(|x|^k\le|x|^n\)) and the expectation of the right-hand side is \(1+\E|X|^n<\infty\) — we may differentiate \(n\) times under \(\E\): \(\varphi_X^{(n)}(t)=\E[(iX)^ne^{itX}]=i^n\E[X^ne^{itX}]\), and at \(t=0\) (where \(e^{0}=1\)): \(\varphi_X^{(n)}(0)=i^n\E[X^n]\). Multiply by \(i^{-n}\). (Analysis 9.2 only covers a continuous integrand on a bounded rectangle, so it does not by itself justify this step for an integral over all of \(\R\).)
(v), (vi) are deep theorems of Fourier analysis; the course uses them without proof.
On the script's wording of (vi): it says convergence in distribution holds iff the characteristic functions converge "and \(\varphi_X\) is continuous at 0". The standard statement has two halves: (a) \(X_n\xrightarrow dX\iff\varphi_{X_n}\to\varphi_X\) pointwise; (b) if \(\varphi_{X_n}\) converge pointwise to some function \(\varphi\) that is continuous at 0, then \(\varphi\) is the characteristic function of some \(X\) and \(X_n\xrightarrow dX\). The continuity condition belongs to (b).
Example of (iii) (mine). \(Z\sim\mathcal N(0,1)\), \(\varphi(t)=e^{-t^2/2}\): \(\varphi'(t)=-te^{-t^2/2}\), \(\varphi''(t)=(t^2-1)e^{-t^2/2}\). So \(\E[Z]=-i\cdot0=0\) and \(\E[Z^2]=-\varphi''(0)=1\) ✓.
Example 2.48 characteristic function of the normal distribution Script 2.48
\[ X\sim\mathcal N(\mu,\sigma^2)\quad\Longrightarrow\quad\varphi_X(t)=\exp\Bigl(i\mu t-\tfrac12\sigma^2t^2\Bigr). \]Derivation supplied by me — the script states the result
First \(Z\sim\mathcal N(0,1)\) with density \(\phi(x)=\frac1{\sqrt{2\pi}}e^{-x^2/2}\). The imaginary part \(\int\sin(tx)\phi(x)\,\mathrm dx\) vanishes (odd integrand), so \(\varphi(t)=\int\cos(tx)\phi(x)\,\mathrm dx\). Now differentiate under the integral sign, using \(\frac{\mathrm d}{\mathrm dt}\cos(tx)=-x\sin(tx)\) (chain rule, \(x\) is a constant here).
Why this is allowed: the derivative of the integrand obeys \(|-x\sin(tx)\phi(x)|\le|x|\phi(x)\) for every \(t\), because \(|\sin|\le1\); and this bound, which no longer contains \(t\), has finite integral, \(\int|x|\phi(x)\,\mathrm dx=\E|Z|=2\int_0^\infty x\phi(x)\,\mathrm dx=2\bigl[-\phi(x)\bigr]_0^\infty =2\phi(0)=\frac{2}{\sqrt{2\pi}}=\sqrt{2/\pi}<\infty\) (the antiderivative \(-\phi\) of \(x\phi\) is justified in the next line; the factor 2 is because \(|x|\phi(x)\) is symmetric about 0). That is the dominating function required by dominated convergence, exactly as in the proof of Remark 2.47(iii) (B4, B1).
Then integrate by parts with \(u=\sin(tx)\), \(v'=x\phi(x)\), \(v=-\phi(x)\) (by the chain rule \(\phi'(x)=-x\phi(x)\), so \(-\phi\) is an antiderivative of \(x\phi\)). The boundary term vanishes because \(\phi(x)\to0\) as \(x\to\pm\infty\):
\[ \varphi'(t)=-\int x\sin(tx)\phi(x)\,\mathrm dx=-\Bigl(\bigl[-\sin(tx)\phi(x)\bigr]_{-\infty}^{\infty}+\int t\cos(tx)\phi(x)\,\mathrm dx\Bigr)=-t\,\varphi(t). \]So \(\varphi'=-t\varphi\) with \(\varphi(0)=1\). The function \(e^{-t^2/2}\) solves this, and it is the only solution: \(\frac{\mathrm d}{\mathrm dt}\bigl(\varphi(t)e^{t^2/2}\bigr)=(\varphi'+t\varphi)e^{t^2/2}=0\), so \(\varphi(t)e^{t^2/2}\) is constant, equal to its value 1 at \(t=0\). Hence \(\varphi_Z(t)=e^{-t^2/2}\).
General case: \(X=\mu+\sigma Z\) (Example 2.52(iii)), and Remark 2.47(ii) gives \(\varphi_X(t)=e^{i\mu t}\varphi_Z(\sigma t)=e^{i\mu t-\sigma^2t^2/2}\).
Remark 2.49 moment generating functions Script 2.49
The moment generating function (MGF) is \(M_X(t)=\E[e^{tX}]\) for real \(t\) where it exists (typically near \(t=0\)). If it exists and is differentiable, \(\E[X^n]=M_X^{(n)}(0)\) — no powers of \(i\). Like cfs, \(M_{X+Y}=M_XM_Y\) for independent \(X,Y\), and an MGF that exists near 0 determines the distribution. But MGFs do not always exist (Cauchy: \(\E[e^{tX}]=\infty\) for every \(t\ne0\)), while the cf always does.
Script, paragraph after 2.49 Together with uniqueness and the continuity theorem, cfs are powerful "calculation tools". Results about distributions are proved with tools from (complex) analysis: derivatives, Taylor series, convergence of functions.
Example: \(Z\sim\mathcal N(0,1)\) has \(M_Z(t)=e^{t^2/2}\) (same derivation with the sign flipped), so \(\E[Z^4]=M^{(4)}(0)=3\).
Example 2.50 sums of independent random variables Script 2.50
(i) Poisson + Poisson. \(X_1\sim\Poi(\lambda_1)\perp\!\!\!\perp X_2\sim\Poi(\lambda_2)\) \(\Rightarrow\) \(X_1+X_2\sim\Poi(\lambda_1+\lambda_2)\). Proof: Sheet 8 Ex 1 below.
(ii) Gamma + Gamma with the same rate. \(X_1\sim\Gamma(\alpha_1,\beta)\perp\!\!\!\perp X_2\sim\Gamma(\alpha_2,\beta)\) \(\Rightarrow\) \(X_1+X_2\sim\Gamma(\alpha_1+\alpha_2,\beta)\). First the cf of \(X\sim\Gamma(\alpha,\beta)\):
\[ \varphi_X(t)=\int_0^\infty e^{itx}\frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}\,\mathrm dx =\frac{\beta^\alpha}{\Gamma(\alpha)}\int_0^\infty x^{\alpha-1}e^{-(\beta-it)x}\,\mathrm dx . \](The two exponentials were combined: \(e^{itx}e^{-\beta x}=e^{-(\beta-it)x}\).) Substitute \(u=(\beta-it)x\), so \(x=\frac{u}{\beta-it}\) and \(\mathrm dx=\frac{\mathrm du}{\beta-it}\). The integral becomes
\[ \int_0^\infty\Bigl(\frac{u}{\beta-it}\Bigr)^{\alpha-1}e^{-u}\,\frac{\mathrm du}{\beta-it}=\frac{1}{(\beta-it)^\alpha}\int_0^\infty u^{\alpha-1}e^{-u}\,\mathrm du=\frac{\Gamma(\alpha)}{(\beta-it)^\alpha}, \]using the definition of the Gamma function (§1.3). The \(\Gamma(\alpha)\) cancels, so \(\varphi_X(t)=\bigl(\frac{\beta}{\beta-it}\bigr)^\alpha=(1-it/\beta)^{-\alpha}\) (divide top and bottom by \(\beta\)). For the sum, Remark 2.47(iv):
\[ \varphi_{X_1+X_2}(t)=(1-it/\beta)^{-\alpha_1}(1-it/\beta)^{-\alpha_2}=(1-it/\beta)^{-(\alpha_1+\alpha_2)}, \]the cf of \(\Gamma(\alpha_1+\alpha_2,\beta)\); by uniqueness (Remark 2.47(v)) that is the distribution of the sum. Since \(\Exp(\lambda)=\Gamma(1,\lambda)\) and \(\chi^2_k=\Gamma(\frac k2,\frac12)\): the sum of \(n\) iid \(\Exp(\lambda)\) is \(\Gamma(n,\lambda)\), and \(\chi^2_k+\chi^2_l=\chi^2_{k+l}\) for independent summands.
A caveat on the substitution. \(u=(\beta-it)x\) is a complex number, so the new path of integration is a ray in the complex plane, not \([0,\infty)\). That it gives the same value is a theorem of complex analysis (Cauchy's integral theorem), not covered by your Analysis course. For \(\alpha=1\) you can check it by hand: \(\int_0^\infty\beta e^{-(\beta-it)x}\,\mathrm dx=\frac{\beta}{\beta-it}\) because \(|e^{-(\beta-it)x}|=e^{-\beta x}\to0\).
Sheet 7, Exercise 2 — sums of independent variables by convolution Sheet 7 · Ex 2
\(X\perp\!\!\!\perp Y\) with densities \(p_X,p_Y\). (i) Show \(p_{X+Y}(z)=\int_\R p_X(z-y)\,p_Y(y)\,\mathrm dy\) (the convolution \(p_X\star p_Y\)). (ii) \(X,Y\) iid \(\Exp(\lambda)\): density of \(X+Y\). (iii) \(X\sim\mathcal N(\mu_x,\sigma_x^2)\perp\!\!\!\perp Y\sim\mathcal N(\mu_y,\sigma_y^2)\): show \(X+Y\sim\mathcal N(\mu_x+\mu_y,\sigma_x^2+\sigma_y^2)\).
Solution
(i) The cdf method. With \(A_z=\{(x,y):x+y\le z\}\) and the product density (independence, Definition 1.77(iii)):
\[ F_{X+Y}(z)=\iint_{A_z}p_X(x)p_Y(y)\,\mathrm dx\,\mathrm dy=\int_{-\infty}^\infty\Bigl(\int_{-\infty}^{z-y}p_X(x)\,\mathrm dx\Bigr)p_Y(y)\,\mathrm dy =\int_{-\infty}^{z}\Bigl(\int_{-\infty}^\infty p_X(u-y)p_Y(y)\,\mathrm dy\Bigr)\mathrm du . \](Inner substitution \(x=u-y\); then swap the order, Fubini.) So \(F_{X+Y}\) is the integral up to \(z\) of the bracket, which is therefore a density of \(X+Y\) (Lemma 1.49).
(ii) \(p_X(z-y)p_Y(y)=\lambda e^{-\lambda(z-y)}\lambda e^{-\lambda y}=\lambda^2e^{-\lambda z}\) where both factors are non-zero, i.e. \(0\le y\le z\). So for \(z\ge0\): \(p_{X+Y}(z)=\int_0^z\lambda^2e^{-\lambda z}\,\mathrm dy=\lambda^2ze^{-\lambda z}\), and 0 for \(z<0\): the \(\Gamma(2,\lambda)\) density, as Example 2.50(ii) predicts.
(iii) — the short way (mine). By Example 2.48 and Remark 2.47(iv), \(\varphi_{X+Y}(t)=e^{i\mu_xt-\sigma_x^2t^2/2}e^{i\mu_yt-\sigma_y^2t^2/2}=e^{i(\mu_x+\mu_y)t-(\sigma_x^2+\sigma_y^2)t^2/2}\), the cf of \(\mathcal N(\mu_x+\mu_y,\sigma_x^2+\sigma_y^2)\); uniqueness finishes.
(iii) — the long way (as the sheet asks), in shifted variables to keep it short. Write \(s^2:=\sigma_x^2+\sigma_y^2\), \(w:=z-\mu_x-\mu_y\), and substitute \(u:=x-\mu_x\) (a shift, so \(\mathrm dx=\mathrm du\)). Then \(z-x-\mu_y=w-u\). By (i), written with the integration variable called \(x\) (substitute \(y=z-x\) in the formula of (i); the order of the two factors does not matter),
\[ p_{X+Y}(z)=\int p_X(x)p_Y(z-x)\,\mathrm dx=\frac{1}{2\pi\sigma_x\sigma_y}\int_{-\infty}^{\infty}\exp\Bigl(-\frac{u^2}{2\sigma_x^2}-\frac{(w-u)^2}{2\sigma_y^2}\Bigr)\mathrm du . \]Complete the square in \(u\). Put \(\tau^2:=\sigma_x^2\sigma_y^2/s^2\) and \(m:=\sigma_x^2w/s^2\). Multiplying out and collecting powers of \(u\) gives
\[ \frac{u^2}{\sigma_x^2}+\frac{(w-u)^2}{\sigma_y^2}=\frac{(u-m)^2}{\tau^2}+\frac{w^2}{s^2} . \](Check: the \(u^2\)-coefficient is \(\frac1{\sigma_x^2}+\frac1{\sigma_y^2}=\frac{s^2}{\sigma_x^2\sigma_y^2}=\frac1{\tau^2}\); the \(u\)-coefficient is \(-\frac{2w}{\sigma_y^2}=-\frac{2m}{\tau^2}\); the constant is \(\frac{w^2}{\sigma_y^2}-\frac{m^2}{\tau^2}=\frac{w^2}{\sigma_y^2}\bigl(1-\frac{\sigma_x^2}{s^2}\bigr)=\frac{w^2}{s^2}\).) The factor \(e^{-w^2/(2s^2)}\) does not depend on \(u\) and comes out of the integral. The rest is a normal density without its constant: \(\int e^{-(u-m)^2/(2\tau^2)}\,\mathrm du=\sqrt{2\pi}\,\tau\) (the \(\mathcal N(m,\tau^2)\) density \(\frac1{\sqrt{2\pi}\tau}e^{-(u-m)^2/(2\tau^2)}\) integrates to 1 — see §1.3; the Gaussian integral behind it is computed in B5). So
\[ p_{X+Y}(z)=\frac{\sqrt{2\pi}\,\tau}{2\pi\sigma_x\sigma_y}e^{-w^2/(2s^2)}=\frac{1}{\sqrt{2\pi}\,s}\exp\Bigl(-\frac{(z-\mu_x-\mu_y)^2}{2s^2}\Bigr), \]the \(\mathcal N(\mu_x+\mu_y,\sigma_x^2+\sigma_y^2)\) density (using \(\tau/(\sigma_x\sigma_y)=1/s\)).
Notes on the official solution: in (iii) the exponent is labelled \(-\frac{(z+(\mu_x+\mu_y))^2}{2\sigma_z^2}\); the sign must be \(z-(\mu_x+\mu_y)\) (the final line has the right distribution). Also, in the completing-the-square lines it twice writes \(\sigma_x^2(z-\mu_x)\) where \(\sigma_x^2(z-\mu_y)\) is meant (the line before has it right). The hint's set should be in \(\R^2\), not \(\R^n\). The answer in (ii) should add "and 0 for \(z<0\)".
Transformation of densities
The idea. Push the random point \(X\) through a map \(g\). Probability is conserved: the mass in a tiny interval \([x,x+\mathrm dx]\) moves to \([g(x),g(x)+g'(x)\mathrm dx]\). If \(g\) stretches the interval (\(|g'|>1\)), the same mass is spread thinner, so the density goes down by the stretch factor. That is all the formula says. It is the general version of the cdf method from §1.3.
A number example first (mine). \(X\sim\Unif(0,1)\) has density 1 on \((0,1)\). Let \(Y=2X+1\). The map doubles lengths and moves \((0,1)\) to \((1,3)\). The total mass 1 is now spread over an interval of length 2, so \(p_Y(y)=\frac12\) on \((1,3)\) and 0 elsewhere. The formula below gives the same: \(g^{-1}(y)=\frac{y-1}2\), its derivative is \(\frac12\), and \(p_X=1\) there.
Words in the statement. Strictly monotone: strictly increasing or strictly decreasing, so each \(y\) comes from at most one \(x\). Continuously differentiable: \(g'\) exists and is continuous. \(g^{-1}\) is the inverse map (\(g^{-1}(y)\) is the \(x\) with \(g(x)=y\)), and \(g(S_X)\) is the set of all values \(g(x)\) with \(x\in S_X\). In the vector version, bijective means every \(y\) comes from exactly one \(x\), and the Jacobian matrix \(J_g(x)\) is the matrix of all partial derivatives \(\partial g_i/\partial x_j\); \(|\det J_g|\) is the factor by which \(g\) stretches small volumes (B5). Strictly monotone functions and their inverses: Analysis 5.1; the chain rule and the derivative of an inverse function: Analysis 6.3.
Proposition 2.51 transformation of densities / change of variables Script 2.51
Let \(X\) be continuous with density \(p_X\), support \(S_X:=\{x:p_X(x)>0\}\), and \(g:\R\to\R\) continuously differentiable and strictly monotone on \(S_X\). For \(Y:=g(X)\):
\[ p_Y(y)=p_X\bigl(g^{-1}(y)\bigr)\,\Bigl|\frac{\mathrm d}{\mathrm dy}g^{-1}(y)\Bigr|\quad\text{for }y\in g(S_X),\qquad p_Y(y)=0\text{ otherwise}. \]Vector version. For a random vector \(X\) in \(\R^n\) and \(g:\R^n\to\R^n\) continuously differentiable and bijective with \(\det J_g(x)\ne0\) on \(S_X\):
\[ p_Y(y)=p_X\bigl(g^{-1}(y)\bigr)\,\bigl|\det J_{g^{-1}}(y)\bigr|=\frac{p_X(x)}{|\det J_g(x)|}\Bigg|_{x=g^{-1}(y)}\quad\text{for }y\in g(S_X). \]Here \(J_{g^{-1}}(y)=\bigl[\frac{\partial g_i^{-1}}{\partial y_j}\bigr]_{i,j}\) is the Jacobian matrix of the inverse map \(g^{-1}\), built the same way as \(J_g\) but from the partial derivatives of \(g^{-1}\). The second equality uses \(J_{g^{-1}}(y)=[J_g(g^{-1}(y))]^{-1}\) and \(\det(A^{-1})=1/\det A\) (B5). Why that first identity holds (my addition; the script states it without proof): \(g(g^{-1}(y))=y\) for every \(y\); differentiating both sides with the multivariate chain rule gives \(J_g(g^{-1}(y))\cdot J_{g^{-1}}(y)=I\) (the identity matrix is the Jacobian of \(y\mapsto y\)), so \(J_{g^{-1}}(y)\) is the inverse matrix of \(J_g(g^{-1}(y))\) — the vector version of \((g^{-1})'(y)=1/g'(g^{-1}(y))\); details in B5.
Proof sketch for the scalar case Script — each step explained
\(g\) strictly increasing. Then \(g(X)\le y\iff X\le g^{-1}(y)\), so \(F_Y(y)=F_X(g^{-1}(y))\). Chain rule: \(p_Y(y)=F_Y'(y)=p_X(g^{-1}(y))\cdot\frac{\mathrm d}{\mathrm dy}g^{-1}(y)\), and the derivative is positive (the inverse of an increasing function increases), so it equals its absolute value.
\(g\) strictly decreasing. Then \(g(X)\le y\iff X\ge g^{-1}(y)\), so \(F_Y(y)=1-\P(X<g^{-1}(y))=1-F_X(g^{-1}(y))\) (for continuous \(X\), \(\P(X=c)=0\)). Differentiating gives \(-p_X(g^{-1}(y))\frac{\mathrm d}{\mathrm dy}g^{-1}(y)\), and now the derivative is negative, so again the result is \(p_X(g^{-1}(y))\bigl|\frac{\mathrm d}{\mathrm dy}g^{-1}(y)\bigr|\).
Not monotone: split the support into pieces on which \(g\) is strictly monotone and add the contributions of all pre-images. Vector case: it is the transformation theorem for integrals (B5) applied to \(\P(Y\in B)=\P(X\in g^{-1}(B))=\int_{g^{-1}(B)}p_X\).
Recipe. (1) Find the support of \(Y\). (2) Solve \(y=g(x)\) for \(x=g^{-1}(y)\). (3) Differentiate \(g^{-1}\), take the absolute value (or the \(|\det|\) of the Jacobian). (4) Multiply. (5) Say "0 outside".
In words: the density of \(Y=g(X)\) at \(y\) is the density of \(X\) at the point that \(g\) sends to \(y\), divided by how much \(g\) stretches space there.
Example 2.52 affine transformations Script 2.52
(i) \(Y=aX+b\), \(a\ne0\): \(g^{-1}(y)=\frac{y-b}a\), derivative \(\frac1a\), so \(p_Y(y)=\frac1{|a|}p_X\bigl(\frac{y-b}a\bigr)\).
(ii) \(Y=AX+b\) with invertible \(A\in\R^{n\times n}\): \(J_g=A\), so \(p_Y(y)=\frac{p_X(A^{-1}(y-b))}{|\det A|}\).
(iii) \(X\sim\mathcal N(0,1)\Rightarrow Z:=\sigma X+\mu\sim\mathcal N(\mu,\sigma^2)\) for \(\sigma\ne0\); conversely \((Z-\mu)/\sigma\sim\mathcal N(0,1)\). (Plug the standard density into (i).)
Three more examples My addition
WiSe25 P3a again. \(U\sim\Unif(0,1)\), \(Y=-\ln(U)/\lambda\). \(g\) is decreasing on \((0,1)\) with \(g(0,1)=(0,\infty)\); \(g^{-1}(y)=e^{-\lambda y}\), \(\bigl|\frac{\mathrm d}{\mathrm dy}g^{-1}\bigr|=\lambda e^{-\lambda y}\), \(p_U=1\) there. So \(p_Y(y)=\lambda e^{-\lambda y}\) for \(y>0\): \(\Exp(\lambda)\), as found with the cdf method on §1.3.
A non-monotone map: \(Y=X^2\) with \(X\sim\mathcal N(0,1)\). For \(y>0\) there are two pre-images \(\pm\sqrt y\), each with \(|\frac{\mathrm d}{\mathrm dy}(\pm\sqrt y)|=\frac1{2\sqrt y}\). Add both: \(p_Y(y)=2\cdot\frac1{\sqrt{2\pi}}e^{-y/2}\cdot\frac1{2\sqrt y}=\frac{1}{\sqrt{2\pi y}}e^{-y/2}\) — the \(\chi^2_1\) density. Hence (Example 2.50) a sum of \(k\) squared independent standard normals is \(\chi^2_k\).
Box–Muller (two dimensions). \(U_1,U_2\) iid \(\Unif(0,1)\), \(R=\sqrt{-2\ln U_1}\), \(\Theta=2\pi U_2\). Then \(R\) has density \(re^{-r^2/2}\) on \(r>0\) (cdf method: \(\P(R\le r)=\P(U_1\ge e^{-r^2/2})=1-e^{-r^2/2}\)), \(\Theta\) is uniform on \((0,2\pi)\), independent. The polar map \((r,\theta)\mapsto(r\cos\theta,r\sin\theta)\) has \(|\det J|=r\) (B5), so \(p_{X,Y}(x,y)=\frac{re^{-r^2/2}\cdot\frac1{2\pi}}{r}=\frac1{2\pi}e^{-(x^2+y^2)/2}\): two independent standard normals. This answers Sheet 7 Ex 5(i).
Computing with Gaussians
The idea. A multivariate Gaussian is a bell-shaped cloud in \(\R^d\) whose contour lines are ellipses (ellipsoids). It is completely described by two things: its centre \(\mu\) and its covariance matrix \(\Sigma\), which fixes the shape and orientation of the ellipses (B5). And every linear operation — shifting, rotating, projecting, adding, conditioning — keeps it Gaussian.
Lemma 2.53 (first part) the multivariate Gaussian density Script 2.53
The density of the multivariate Gaussian with mean \(\mu\in\R^d\) and covariance matrix \(\Sigma\in\R^{d\times d}\) is
\[ p(x)=\frac{1}{(2\pi)^{d/2}|\Sigma|^{1/2}}\exp\Bigl(-\tfrac12(x-\mu)^\top\Sigma^{-1}(x-\mu)\Bigr), \]where \(|\Sigma|=\det\Sigma\); we write \(X\sim\mathcal N(\mu,\Sigma)\). A valid covariance matrix is symmetric (\(\Sigma^\top=\Sigma\): entry \((j,k)\) equals entry \((k,j)\), because \(\Cov[X_j,X_k]=\Cov[X_k,X_j]\)) and positive semi-definite (\(x^\top\Sigma x\ge0\) for all \(x\in\R^d\), written \(\Sigma\succeq0\); this holds because \(x^\top\Sigma x=\Var[x^\top X]\ge0\)). To get a density one assumes the stronger positive definite (\(x^\top\Sigma x>0\) for \(x\ne0\), written \(\Sigma\succ0\)); then \(\Sigma^{-1}\) exists.
Here \(x^\top\) turns the column vector \(x\) into a row, so \(x^\top\Sigma x=\sum_{j,k}x_j\Sigma_{jk}x_k\) is a single number (B5).
Reading it piece by piece (mine). For \(d=1\), \(\Sigma=\sigma^2\): the exponent is \(-\frac{(x-\mu)^2}{2\sigma^2}\) and the constant \(\frac{1}{\sqrt{2\pi}\sigma}\) — the familiar normal density. In general \((x-\mu)^\top\Sigma^{-1}(x-\mu)\) is a squared distance measured in the "units" of \(\Sigma\) (the Mahalanobis distance); \(|\Sigma|^{1/2}\) is the volume factor that makes the total integral 1.
Example (mine). \(d=2\), \(\mu=0\), \(\Sigma=\begin{pmatrix}\sigma_X^2&\rho\sigma_X\sigma_Y\\\rho\sigma_X\sigma_Y&\sigma_Y^2\end{pmatrix}\) with \(|\rho|<1\). Then \(|\Sigma|=\sigma_X^2\sigma_Y^2(1-\rho^2)\) and
\[ p(x,y)=\frac{1}{2\pi\sigma_X\sigma_Y\sqrt{1-\rho^2}}\exp\Bigl(-\frac{1}{2(1-\rho^2)}\Bigl[\frac{x^2}{\sigma_X^2}-\frac{2\rho xy}{\sigma_X\sigma_Y}+\frac{y^2}{\sigma_Y^2}\Bigr]\Bigr). \]Lemma 2.53 (second part) computation rules for Gaussians Script 2.53
Let \(Z=(X,Y)\sim\mathcal N(\mu,\Sigma)\) with \(X\in\R^{d_X}\), \(Y\in\R^{d_Y}\), \(\mu=(\mu_X,\mu_Y)\) and
\[ \Sigma=\begin{pmatrix}\Sigma_{XX}&\Sigma_{XY}\\\Sigma_{XY}^\top&\Sigma_{YY}\end{pmatrix}. \]So \(Z\) is the long vector \(X\) stacked on top of \(Y\), and \(d=d_X+d_Y\). The blocks are: \(\Sigma_{XX}\in\R^{d_X\times d_X}\) the covariances among the entries of \(X\), \(\Sigma_{YY}\in\R^{d_Y\times d_Y}\) those among the entries of \(Y\), and \(\Sigma_{XY}\in\R^{d_X\times d_Y}\) the covariances between an entry of \(X\) and an entry of \(Y\). The marginal distribution of \(X\) is the distribution of \(X\) alone (ignoring \(Y\)); the conditional distribution of \(X\) given \(Y=y\) is how \(X\) is distributed once we know \(Y=y\).
- \(X\perp\!\!\!\perp Y\) iff \(\Sigma_{XY}=0\).
- \(AZ+b\sim\mathcal N(A\mu+b,\ A\Sigma A^\top)\) for \(A\in\R^{d\times d}\), \(b\in\R^d\) (assuming \(A\Sigma A^\top\succ0\)).
- Marginals: \(X\sim\mathcal N(\mu_X,\Sigma_{XX})\) and \(Y\sim\mathcal N(\mu_Y,\Sigma_{YY})\).
- Conditionals: \(X\mid Y=y\ \sim\ \mathcal N(\mu_{X|y},\Sigma_{X|y})\) with \(\mu_{X|y}=\mu_X+\Sigma_{XY}\Sigma_{YY}^{-1}(y-\mu_Y)\) and \(\Sigma_{X|y}=\Sigma_{XX}-\Sigma_{XY}\Sigma_{YY}^{-1}\Sigma_{XY}^\top\).
- If \(d_X=d_Y\) and \(\Sigma_{XY}=0\) (so \(X,Y\) are independent), then \(aX+bY\sim\mathcal N(a\mu_X+b\mu_Y,\ a^2\Sigma_{XX}+b^2\Sigma_{YY})\) for \(a,b\in\R\).
- In general (any \(d_X,d_Y\), any \(\Sigma_{XY}\)), for \(A\in\R^{k\times d_X}\), \(B\in\R^{k\times d_Y}\), \(c\in\R^k\): \(AX+BY+c\sim\mathcal N\bigl(A\mu_X+B\mu_Y+c,\ A\Sigma_{XX}A^\top+B\Sigma_{XY}^\top A^\top+A\Sigma_{XY}B^\top+B\Sigma_{YY}B^\top\bigr)\) — possibly "degenerate" (covariance not positive definite).
Numbers (mine, with the matrix of Sheet 7 Ex 5): \(\mu=(1,2)\), \(\Sigma=\begin{pmatrix}2&1\\1&2\end{pmatrix}\). Then \(X\sim\mathcal N(1,2)\); \(X\mid Y=y\sim\mathcal N\bigl(1+\tfrac12(y-2),\ 2-\tfrac12\bigr)\), so observing \(Y=4\) moves the mean of \(X\) to 2 and shrinks its variance from 2 to 1.5; \(X+Y\sim\mathcal N(3,\,2+2+2\cdot1)=\mathcal N(3,6)\) by (vi) with \(A=B=1\); and \(X,Y\) are dependent because \(\Sigma_{XY}=1\ne0\).
In words: for a Gaussian vector, independence is the same as zero covariance; and linear maps, dropping coordinates, conditioning and linear combinations all give Gaussians again. The new mean and covariance come from simple matrix formulas.
Proofs of (i)–(vi) a streamlined route of mine; the official Sheet 8 Ex 5 solution integrates directly and has several slips (listed below)
Step 0 (Sheet 8 Ex 5, preliminary: \(\E[X]=\mu\), \(\Cov=\Sigma\)) — building \(\mathcal N(\mu,\Sigma)\) from independent standard normals. Let \(W=(W_1,\dots,W_d)\) have iid \(\mathcal N(0,1)\) entries; its density is the product \((2\pi)^{-d/2}e^{-w^\top w/2}\). Take the Cholesky factor \(\Sigma=LL^\top\) (B5); \(\det L=\sqrt{\det\Sigma}>0\), so \(L\) is invertible. Put \(Z:=\mu+LW\). Example 2.52(ii) gives
\[ p_Z(z)=\frac{p_W(L^{-1}(z-\mu))}{|\det L|}=\frac{1}{(2\pi)^{d/2}|\Sigma|^{1/2}}\exp\Bigl(-\tfrac12(z-\mu)^\top\underbrace{L^{-\top}L^{-1}}_{=(LL^\top)^{-1}=\Sigma^{-1}}(z-\mu)\Bigr) , \]exactly the density of the lemma. Also \(\E[Z]=\mu+L\E[W]=\mu\) and \(\Cov[Z]=L\,\Cov[W]\,L^\top=LIL^\top=\Sigma\) (the matrix rule \(\Cov[AW]=A\Cov[W]A^\top\) is Sheet 6 Ex 1 entry by entry). So the parameters really are the mean and the covariance matrix. Any \(X\) with this density has the same distribution as \(Z\) (a density fixes the distribution), hence also \(\E[X]=\mu\) and \(\Cov[X]=\Sigma\). In block form this says \(\Cov[X]=\Sigma_{XX}\), \(\Cov[X,Y]=\Sigma_{XY}\), \(\Cov[Y]=\Sigma_{YY}\) — the facts the official solution proves first.
The official route for \(\E[X]=\mu\), for comparison: write \(\E[X]=\int x\,p(x)\,\mathrm dx\) and substitute \(u=x-\mu\), so \(x=\mu+u\). This splits into \(\mu\int p=\mu\cdot1\) plus \(\int u\,c\,e^{-u^\top\Sigma^{-1}u/2}\,\mathrm du\), and the last integral is 0: replacing \(u\) by \(-u\) leaves the exponential unchanged but flips the sign of \(u\), so the integral equals its own negative.
(ii) [Sheet 8 Ex 5(ii)] For invertible \(A\), Example 2.52(ii) gives \(p_{AZ+b}(y)=p_Z(A^{-1}(y-b))/|\det A|\). In the exponent, \(A^{-1}(y-b)-\mu=A^{-1}\bigl(y-(A\mu+b)\bigr)\), so the quadratic form becomes \((y-(A\mu+b))^\top A^{-\top}\Sigma^{-1}A^{-1}(y-(A\mu+b))\) and \(A^{-\top}\Sigma^{-1}A^{-1}=(A\Sigma A^\top)^{-1}\). The constant: \(|\Sigma|^{1/2}|\det A|=(\det A\det\Sigma\det A^\top)^{1/2}=|A\Sigma A^\top|^{1/2}\). That is the \(\mathcal N(A\mu+b,A\Sigma A^\top)\) density.
(i) [Sheet 8 Ex 5(i)] "\(\Rightarrow\)": independence gives zero covariance entry by entry (Proposition 2.12(v)). "\(\Leftarrow\)": if \(\Sigma_{XY}=0\), \(\Sigma\) is block-diagonal, so \(\Sigma^{-1}\) is block-diagonal with blocks \(\Sigma_{XX}^{-1},\Sigma_{YY}^{-1}\) and \(|\Sigma|=|\Sigma_{XX}||\Sigma_{YY}|\) (B5). The quadratic form splits into an \(x\)-part plus a \(y\)-part, so \(p_Z(x,y)\) is the product of the \(\mathcal N(\mu_X,\Sigma_{XX})\) density in \(x\) and the \(\mathcal N(\mu_Y,\Sigma_{YY})\) density in \(y\). A joint density that factorises into densities means independence with those marginals (Definition 1.77(iii), Theorem 1.68).
(iii) and (iv) [Sheet 8 Ex 5(iii), (iv)] — decorrelate first. Let \(B:=\Sigma_{XY}\Sigma_{YY}^{-1}\) and \(V:=X-BY\). The map \((X,Y)\mapsto(V,Y)\) is linear with matrix \(M=\begin{pmatrix}I&-B\\0&I\end{pmatrix}\), which is invertible (block-triangular, \(\det M=1\)). By (ii), \((V,Y)\) is Gaussian with covariance \(M\Sigma M^\top\), whose blocks are (bilinearity)
\[ \Cov[V,Y]=\Sigma_{XY}-B\Sigma_{YY}=0,\qquad \Cov[V]=\Sigma_{XX}-B\Sigma_{XY}^\top-\Sigma_{XY}B^\top+B\Sigma_{YY}B^\top=\Sigma_{XX}-\Sigma_{XY}\Sigma_{YY}^{-1}\Sigma_{XY}^\top=:S , \]and \(\E[V]=\mu_X-B\mu_Y\). By (i), \(V\perp\!\!\!\perp Y\), with \(Y\sim\mathcal N(\mu_Y,\Sigma_{YY})\) — that is (iii) for \(Y\); swapping the roles of \(X\) and \(Y\) gives (iii) for \(X\). For (iv): \(X=V+BY\) with \(V\) independent of \(Y\). Given \(Y=y\), \(X\) is therefore \(V+By\), i.e. \(\mathcal N(\mu_X-B\mu_Y+By,\ S)=\mathcal N(\mu_X+\Sigma_{XY}\Sigma_{YY}^{-1}(y-\mu_Y),\ S)\). (Formally: \(p_{X|Y=y}(x)=p_{V,Y}(x-By,y)/p_Y(y)=p_V(x-By)\), using \(\det M=1\).) \(S\) is called the Schur complement (the name for the matrix \(\Sigma_{XX}-\Sigma_{XY}\Sigma_{YY}^{-1}\Sigma_{XY}^\top\)) (B5); it is positive definite because \(M\Sigma M^\top\) is.
(vi) and (v) [Sheet 8 Ex 5(vi), (v)]. \(AX+BY+c=CZ+c\) with \(C=[A\ B]\in\R^{k\times d}\). If \(C\) has full row rank (its \(k\) rows are linearly independent: no row of \(C\) is a linear combination of the other rows — and then, because \(\Sigma\succ0\), equivalently \(C\Sigma C^\top\succ0\); rank, linear independence and extending rows to an invertible matrix: B5), add \(d-k\) further rows, each not a combination of the rows chosen so far (always possible in \(\R^d\)), to get an invertible \(d\times d\) matrix whose first \(k\) rows are \(C\); by (ii) the transformed vector is Gaussian, and by (iii) its first \(k\) coordinates, \(CZ+c\), are \(\mathcal N(C\mu+c,C\Sigma C^\top)\). Multiplying out in blocks, \(C\Sigma C^\top=A\Sigma_{XX}A^\top+A\Sigma_{XY}B^\top+B\Sigma_{XY}^\top A^\top+B\Sigma_{YY}B^\top\), which is (vi). (v) is \(A=aI\), \(B=bI\), \(\Sigma_{XY}=0\). If \(C\) does not have full row rank, the result is a degenerate Gaussian without a density; the cf \(e^{it^\top(C\mu+c)-t^\top C\Sigma C^\top t/2}\) still identifies it. (Here the cf of a random vector \(V\in\R^k\) is \(\varphi_V(t)=\E\bigl[e^{i\,t^\top V}\bigr]\) for \(t\in\R^k\), where \(t^\top V=t_1V_1+\dots+t_kV_k\) is a real number — the same definition as 2.46 with the product \(tX\) replaced by this sum. The script defines the cf only for real \(X\); this remark is my addition and not needed for exams.)
Remark 2.54 why Gaussians are so useful Script 2.54 · start of Lecture 9
Lemma 2.53 says: (i) for jointly Gaussian variables, uncorrelated and independent are the same; (ii)–(vi) Gaussians are closed under affine maps, marginalisation, conditioning and linear combinations. Since a Gaussian is fixed by its mean vector and covariance matrix, "every computation with Gaussian distributions just becomes linear algebra". Together with their maximum-entropy property and the central limit theorem (§2.4), this is why they are everywhere: Gaussian processes (regression), normalising flows and diffusion models (generative modelling), Gaussian splatting (computer vision).
Warning: (i) needs joint Gaussianity. Two variables can each be \(\mathcal N(0,1)\), uncorrelated, and still dependent: \(X\sim\mathcal N(0,1)\), \(S=\pm1\) a fair sign independent of \(X\), \(Y=SX\). Then \(Y\sim\mathcal N(0,1)\), \(\Cov[X,Y]=\E[S]\E[X^2]=0\), but \(|Y|=|X|\). The pair \((X,Y)\) is not jointly Gaussian (\(X+Y\) is 0 with probability \(\frac12\)).
Exercise-sheet tasks
Sheet 7 Ex 2 is worked above, right after Example 2.50.
Sheet 7, Exercise 5 (bonus) — sampling from a 2D Gaussian Sheet 7 · Ex 5
Sample from \(\mathcal N(\mu,\Sigma)\) with \(\mu=(1,2)\), \(\Sigma=\begin{pmatrix}2&1\\1&2\end{pmatrix}\). (i) Derive a transformation that samples \(\mathcal N(0,1)\). (ii) Code: use \(AZ+b\sim\mathcal N(A\mu+b,A\Sigma A^\top)\) (hint: Cholesky).
Solution mine — the official solution is empty
(i) Inverse transform sampling needs \(\Phi^{-1}\), the inverse of the standard normal cdf. It exists because \(\Phi\) is continuous and strictly increasing, and by the quantile transformation (Proposition 2.23) \(\Phi^{-1}(U)\sim\mathcal N(0,1)\) for \(U\sim\Unif(0,1)\). But \(\Phi^{-1}\) has no closed form; libraries evaluate it numerically. A closed-form alternative is Box–Muller (derived above): \(X=\sqrt{-2\ln U_1}\cos(2\pi U_2)\) and \(Y=\sqrt{-2\ln U_1}\sin(2\pi U_2)\) are two independent \(\mathcal N(0,1)\) values from two uniforms.
(ii) With \(W=(W_1,W_2)\) iid \(\mathcal N(0,1)\) and the Cholesky factor \(L=\begin{pmatrix}\sqrt2&0\\1/\sqrt2&\sqrt{3/2}\end{pmatrix}\) (B5), set \(Z=\mu+LW\). By Lemma 2.53(ii), \(Z\sim\mathcal N(\mu,LL^\top)=\mathcal N(\mu,\Sigma)\). Concretely: \(Z_1=1+\sqrt2W_1\), \(Z_2=2+\frac{W_1}{\sqrt2}+\sqrt{\tfrac32}W_2\). Check: \(\Var[Z_1]=2\), \(\Var[Z_2]=\frac12+\frac32=2\), \(\Cov[Z_1,Z_2]=\sqrt2\cdot\frac1{\sqrt2}=1\) ✓.
The sheet's hint writes "\(AZ+b\sim\mathcal N(A\mu+b,A\Sigma A^\top)\) where \(Z\sim\mathcal N(\mu,\Sigma)\)", reusing \(\mu,\Sigma\) for the input; for the sampling task the input is \(W\sim\mathcal N(0,I)\).
Sheet 8, Exercise 1 — the sum of independent Poissons is Poisson Sheet 8 · Ex 1
\(X\sim\Poi(\lambda_1)\perp\!\!\!\perp Y\sim\Poi(\lambda_2)\). Show \(X+Y\sim\Poi(\lambda_1+\lambda_2)\) using characteristic functions.
Solution
\(\varphi_X(t)=\sum_{k\ge0}e^{itk}e^{-\lambda}\frac{\lambda^k}{k!}=e^{-\lambda}\sum_{k\ge0}\frac{(\lambda e^{it})^k}{k!}=e^{-\lambda}e^{\lambda e^{it}}=\exp\bigl(\lambda(e^{it}-1)\bigr)\), using \(e^{itk}\lambda^k=(\lambda e^{it})^k\) and the exponential series \(e^w=\sum_{k\ge0}\frac{w^k}{k!}\) together with \(e^{w+z}=e^we^z\) (both valid for complex \(w,z\): Analysis 3.4 defines \(\exp\) on \(\mathbb C\) and proves this). By Remark 2.47(iv), \(\varphi_{X+Y}(t)=e^{\lambda_1(e^{it}-1)}e^{\lambda_2(e^{it}-1)}=e^{(\lambda_1+\lambda_2)(e^{it}-1)}\), the cf of \(\Poi(\lambda_1+\lambda_2)\); uniqueness (2.47(v)) finishes.
A check without cfs (discrete convolution): \(\P(X+Y=n)=\sum_{k=0}^n\frac{e^{-\lambda_1}\lambda_1^k}{k!}\frac{e^{-\lambda_2}\lambda_2^{n-k}}{(n-k)!} =\frac{e^{-(\lambda_1+\lambda_2)}}{n!}\sum_k\binom nk\lambda_1^k\lambda_2^{n-k}=\frac{e^{-(\lambda_1+\lambda_2)}(\lambda_1+\lambda_2)^n}{n!}\) by the binomial theorem. The official solution is correct (it switches between \(X,Y\) and \(X_1,X_2\)). Used in Sheet 8 Ex 2(v) on §2.2.
Sheet 8, Exercise 5 — prove the Gaussian computation rules Sheet 8 · Ex 5
The statement is Lemma 2.53 (i)–(vi) verbatim. All proofs are in the proof box "Proofs of (i)–(vi)" of Lemma 2.53 above (open it), by a shorter route than the official one. Each part is labelled there with "[Sheet 8 Ex 5 (…)]". Where to find what:
Sheet 8 Ex 5 — part by part Sheet 8 · Ex 5
- Preliminary (\(\E[X]=\mu\), \(\Cov[Z]=\Sigma\) with the blocks \(\Sigma_{XX},\Sigma_{XY},\Sigma_{YY}\)): Step 0. Idea: \(Z=\mu+LW\) with \(W\) standard normal and \(\Sigma=LL^\top\); then \(\E[Z]=\mu\), \(\Cov[Z]=LL^\top=\Sigma\).
- (ii) affine maps: change of variables (Example 2.52(ii)) and the matrix identity \(A^{-\top}\Sigma^{-1}A^{-1}=(A\Sigma A^\top)^{-1}\). The official solution adds an aside: "if \(A\) is not injective, use the pseudo-inverse \(A^\dagger\) (the inverse of \(A\) restricted to the orthogonal complement of its kernel)". This guide deliberately avoids the pseudo-inverse: it only ever applies (ii) to invertible square matrices, and handles non-square \(A\) by completing it to an invertible matrix in (vi) (rank: B5). You do not need the pseudo-inverse for this course.
- (i) independence \(\iff\Sigma_{XY}=0\): with \(\Sigma_{XY}=0\) the density factorises into an \(x\)-part times a \(y\)-part.
- (iii) marginals and (iv) conditionals: subtract \(BY\) from \(X\) (with \(B=\Sigma_{XY}\Sigma_{YY}^{-1}\)) to get \(V\) independent of \(Y\); then read off.
- (vi) \(AX+BY+c\): complete \([A\ B]\) to an invertible matrix, apply (ii), then (iii). (v) is the special case \(A=aI\), \(B=bI\), \(\Sigma_{XY}=0\); in one dimension it is also Sheet 7 Ex 2(iii) with \(aX\), \(bY\) in place of \(X\), \(Y\) (the official solution does it this way).
Slips in the official solution of Sheet 8 Ex 5 checked by me
- Twice it writes \(\Sigma^{-1}=U\Lambda U^\top\); correct is \(\Sigma^{-1}=U\Lambda^{-1}U^\top\) (the decomposition \(U\Lambda^{-1/2}\Lambda^{-1/2}U^\top\) written next to it is right). An integral limit reads \(\int_\infty^\infty\) instead of \(\int_{-\infty}^\infty\).
- (i) uses \(\Sigma^{XX},\Sigma^{YY}\) without defining them; they must be the blocks of \(\Sigma^{-1}\) (which, when \(\Sigma_{XY}=0\), equal \(\Sigma_{XX}^{-1},\Sigma_{YY}^{-1}\)).
- (ii) the final exponent has \((A\Sigma A^\top)\) where \((A\Sigma A^\top)^{-1}\) is needed.
- (iii) applies (ii), which was proved for invertible square \(A\), to \(A=[I_{d_X},0]^\top\) — that matrix is not square (and the transpose is the wrong way round). The gap is exactly why my proof decorrelates with an invertible block-triangular map first.
- (v) the exponent is labelled \(-(z+(\mu_x+\mu_y))^2/(2\sigma_z^2)\); the sign should be minus. As in Sheet 7 Ex 2(iii), it twice writes \(z-\mu_x\) where \(z-\mu_y\) is meant.
- (vi) the final line reads \(\mathcal N(a\mu_X+b\mu_Y,\ a^2\sigma_X^2+b^2\sigma_Y^2,\ a^2\sigma_X^2+b^2\sigma_Y^2+2ab\sigma_X\sigma_Y)\). The line above it expands to \(a^2\sigma_X^2+b^2\sigma_Y^2+2ab\rho\sigma_X\sigma_Y\) — the \(\rho\) is missing, and there is a stray third entry. Correct: \(aX+bY\sim\mathcal N(a\mu_X+b\mu_Y,\ a^2\sigma_X^2+b^2\sigma_Y^2+2ab\rho\sigma_X\sigma_Y)\), which also follows from Proposition 2.12(vi).
- Preliminary part (\(\E[X]=\mu\)): the substitution is written \(v=uU\Lambda^{-1/2}\) (wrong order for column vectors; it should be \(v=\Lambda^{-1/2}U^\top u\)), and the antiderivative of \(v e^{-v^2/2}\) is written without its minus sign (\(-e^{-v^2/2}\) is correct). Neither changes the result 0.
- Preliminary part (\(\Cov[Z]=\Sigma\)): after substituting \(u=B(z-\mu)\) the volume factor is written \(|B|\,\mathrm du\); correct is \(\mathrm dz=|\det B|^{-1}\mathrm du=|\Sigma|^{1/2}\mathrm du\). Only with \(|B|^{-1}\) does the constant \(1/\sqrt{(2\pi)^d|\Sigma|}\) cancel to \(1/\sqrt{(2\pi)^d}\).
- The sheet calls a valid covariance matrix positive definite; the script (Lemma 2.53) says positive semi-definite in general and assumes definite only to get a density.
Sheet 9, Exercise 5 (bonus) — basic properties of \(\varphi_X\) Sheet 9 · Ex 5
Show (i) \(|\varphi_X|\le1\), \(\varphi_X(0)=1\); (ii) \(\varphi_{aX+b}(t)=e^{ibt}\varphi_X(at)\); (iii) \(\P_X=\P_{-X}\) iff \(\varphi_X\) is real-valued; (iv) \(\varphi_{X_1+\dots+X_n}=\varphi_{X_1}\cdots\varphi_{X_n}\) for independent \(X_i\).
Solution
(i), (ii), (iv) are the proofs in the Remark 2.47 box above.
(iii) By (ii) with \(a=-1,b=0\), \(\varphi_{-X}(t)=\varphi_X(-t)\). And \(\varphi_X(-t)=\E[\cos(tX)-i\sin(tX)]=\overline{\varphi_X(t)}\) (cos is even, \(\cos(-u)=\cos u\); sin is odd, \(\sin(-u)=-\sin u\); both are stated in Analysis 5.3, in the box on Euler's formula). So
- "\(\Rightarrow\)": \(\P_X=\P_{-X}\) gives \(\varphi_X=\varphi_{-X}=\overline{\varphi_X}\), i.e. \(\varphi_X\) is real.
- "\(\Leftarrow\)": \(\varphi_X\) real gives \(\varphi_X(t)=\overline{\varphi_X(t)}=\varphi_{-X}(t)\) for all \(t\); by uniqueness (Remark 2.47(v)) \(\P_X=\P_{-X}\).
The official solution states the "iff" in one chain but does not mention that the backward direction needs the uniqueness theorem — equal characteristic functions only give equal distributions because of it. Otherwise correct. In words: a distribution is symmetric about 0 exactly when its cf has no imaginary part (check with the widget above).
Old-exam tasks
SoSe 2026, Problem 1c — a cf of a sum SoSe26 · P1c · 1 credit
Statement. \(X\perp\!\!\!\perp Y\) with \(\varphi_X(t)=\varphi_Y(t)=\cos t\). Then \(\varphi_{2X+Y}(t)=\cos(2t)\cos(t)\)?
Official answer: True. By Remark 2.47(iv) and (ii): \(\varphi_{2X+Y}(t)=\varphi_{2X}(t)\varphi_Y(t)=\varphi_X(2t)\varphi_Y(t)=\cos(2t)\cos t\). Correct.
SoSe 2026, Problem 4a–c — a scaled random walk via cfs SoSe26 · P4a, P4b, (P4c) · 1 + 3 (+ 2) credits
Setting. \(X_1,X_2,\dots\) iid with \(\P(X_j=\pm1)=\frac12\); \(Z_n=\frac1{\sqrt n}\sum_{j=1}^nX_j\).
(a) \(\varphi_{X_1}(t)=\frac12e^{it}+\frac12e^{-it}=\cos t\) (Euler's formula; the hint gives it).
(b) \(\varphi_{Z_n}(t)=\E\bigl[\prod_je^{i(t/\sqrt n)X_j}\bigr]=\prod_j\varphi_{X_j}(t/\sqrt n)=\cos^n(t/\sqrt n)\): independence turns the expectation of the product into the product of expectations, and each factor is \(\varphi_{X_1}\) at \(t/\sqrt n\). Points: scaling \(t/\sqrt n\), product by independence, final form.
(c) via the cf (the direct route is on §2.1). Write \(f(t)=\cos^n(t/\sqrt n)\). \(f'(t)=-\sqrt n\cos^{n-1}(t/\sqrt n)\sin(t/\sqrt n)\), so \(f'(0)=0\) and \(\E[Z_n]=-if'(0)=0\). For \(f''(0)\), differentiate \(f'(t)=-\sqrt n\,c^{n-1}s\) once more with the product and chain rules (Analysis 6.3), where \(c=\cos(t/\sqrt n)\), \(s=\sin(t/\sqrt n)\), \(c'=-s/\sqrt n\), \(s'=c/\sqrt n\): \(f''(t)=-\sqrt n\bigl((n-1)c^{n-2}\cdot(-\tfrac{s}{\sqrt n})\cdot s+c^{n-1}\cdot\tfrac{c}{\sqrt n}\bigr)=(n-1)c^{n-2}s^2-c^n\). At \(t=0\): \(c=1\), \(s=0\), so \(f''(0)=-1\). Hence \(\E[Z_n^2]=i^{-2}f''(0)=-f''(0)=1\) and \(\Var[Z_n]=\E[Z_n^2]-\E[Z_n]^2=1\). The official solution states \(\varphi''_{Z_n}(0)=-1\) without the computation; the lines above supply it. Its moment formulas \(\E[Z_n]=\frac1i\varphi'(0)\), \(\E[Z_n^2]=\frac1{i^2}\varphi''(0)\) are Remark 2.47(iii) and correct.
(c) directly (the official first route): \(\E[X_j]=\frac12\cdot1+\frac12\cdot(-1)=0\) and \(\Var[X_j]=\E[X_j^2]-0=1\). Linearity gives \(\E[Z_n]=\frac1{\sqrt n}\sum_j\E[X_j]=0\); independence gives \(\Var[Z_n]=\frac1n\sum_j\Var[X_j]=1\) (the factor \(\frac1{\sqrt n}\) comes out squared). Grading: 1 point each for mean and variance, by either route.
Part (d) (Markov bound and the clt) is on §2.2 and §2.4. Note that \(\cos^n(t/\sqrt n)\to e^{-t^2/2}\) — the clt for coin flips in one line.
Summary sheet
Characteristic functions
- definition
- \(\varphi_X(t)=\E[e^{itX}]\), exists always, \(\varphi(0)=1\), \(|\varphi|\le1\)
- affine
- \(\varphi_{aX+b}(t)=e^{itb}\varphi_X(at)\)
- sums
- independent: \(\varphi_{X+Y}=\varphi_X\varphi_Y\)
- moments
- \(\E[X^n]=i^{-n}\varphi^{(n)}(0)\): \(\E X=-i\varphi'(0)\), \(\E X^2=-\varphi''(0)\)
- uniqueness
- same cf ⟺ same distribution; symmetric ⟺ real cf
- normal
- \(e^{i\mu t-\sigma^2t^2/2}\); Poisson \(e^{\lambda(e^{it}-1)}\); Gamma \((1-it/\beta)^{-\alpha}\)
- closed sums
- Poi+Poi, Γ+Γ (same β), Exp+…+Exp = Γ(n, λ), χ²+χ², N+N
Change of variables
- 1D
- \(p_Y(y)=p_X(g^{-1}(y))\,|(g^{-1})'(y)|\), 0 outside \(g(S_X)\); several pre-images: add
- nD
- \(p_Y(y)=p_X(g^{-1}(y))\,|\det J_{g^{-1}}(y)|\); linear: \(p_X(A^{-1}(y-b))/|\det A|\)
Gaussians
- affine
- \(AZ+b\sim\mathcal N(A\mu+b,A\Sigma A^\top)\)
- marginal
- read off the blocks: \(X\sim\mathcal N(\mu_X,\Sigma_{XX})\)
- conditional
- \(\mu_X+\Sigma_{XY}\Sigma_{YY}^{-1}(y-\mu_Y)\), \(\Sigma_{XX}-\Sigma_{XY}\Sigma_{YY}^{-1}\Sigma_{XY}^\top\)
- independence
- jointly Gaussian: uncorrelated ⟺ independent
- 2D
- \(X\mid Y=y\sim\mathcal N\bigl(\mu_X+\rho\frac{\sigma_X}{\sigma_Y}(y-\mu_Y),\ \sigma_X^2(1-\rho^2)\bigr)\)
Traps
- \(\varphi_{X+Y}=\varphi_X\varphi_Y\) needs independence; \(\varphi_{2X}(t)=\varphi_X(2t)\), not \(\varphi_X(t)^2\).
- In the change-of-variables formula: the derivative of the inverse, in absolute value, and "0 outside".
- "Uncorrelated ⟹ independent" only for jointly Gaussian vectors.
- The conditional variance does not depend on the observed \(y\).
Exam focus
So far cfs appear as short computations (SoSe26 P1c, P4a–b: 5 credits), always "product by independence, then rescale the argument". Change of variables appears inside density problems (WiSe25 P3, SoSe25 P3, via either method). Gaussian rules are the working tool of §3 (confidence intervals, tests) rather than a separate exam question in the three exams we have.
Self-test
Section 2.4 · Lecture 9 (17 June 2026)
Convergence of random variables and limit theorems
Konvergenz von Zufallsvariablen und Grenzwertsätze
What this page covers Script §2.4, pp. 78–83
This page covers everything from Remark 2.55 to Remark 2.65. The script states the goal of the section like this: "Introduce different ways in which a sequence of RVs can converge to another RVs or a constant, and then state and discuss the foundational limit theorems of probability: the laws of large numbers (lln) and the central limit theorem (clt)."
So there are three parts: (1) three ways a sequence of random variables can converge, and how they relate; (2) the weak and the strong law of large numbers; (3) the central limit theorem.
Worked in place: Sheet 8 Ex 4 (Monte Carlo), Sheet 9 Ex 1, 2(ii), 2(iv), 3, 4, and the old-exam tasks WiSe25 P1d, P2a, P2b, P4c, P4d, SoSe25 P2a, P2b, SoSe26 P1d, P2a and the clt part of SoSe26 P4d. This is the most examined page of the course. WiSe25 and SoSe25 each asked for a definition and a theorem statement from it; SoSe26 asked true/false items and a clt approximation instead.
The big picture
Toss a fair coin again and again. After \(n\) tosses, let \(\bar X_n\) be the fraction of heads so far (number of heads divided by \(n\)). At first \(\bar X_n\) jumps around. Then it settles near \(\frac12\). Two questions make this precise.
- In what sense does \(\bar X_n\) "go to" \(\frac12\)? \(\bar X_n\) is random, so the school definition of a
limit does not apply directly. We need new definitions, and there are several of different strength:
- almost surely: for almost every infinite sequence of tosses, the numbers \(\bar X_n\) converge;
- in probability: a big deviation from \(\frac12\) becomes unlikely;
- in distribution: only the histograms (the shapes of the distributions) approach each other.
- How big is the remaining error for large \(n\)? The central limit theorem answers this. The error \(\bar X_n-\mu\) (where \(\mu\) is the true mean, here \(\frac12\)) is roughly of size \(\sigma/\sqrt n\) (where \(\sigma\) is the standard deviation of one toss, here \(\frac12\)). Rescaled by that factor, the error looks normally distributed (bell-shaped). This holds whatever the distribution of a single toss is.
Numbers (my example). Take 100 fair tosses. One toss has mean \(\mu=\frac12\) and standard deviation \(\sigma=\frac12\). So \(\bar X_{100}\) has standard deviation \(\frac{\sigma}{\sqrt{100}}=\frac{0.5}{10}=0.05\). The value 0.6 lies \(\frac{0.6-0.5}{0.05}=2\) standard deviations above the mean. The clt then says \(\P(\bar X_{100}\ge0.6)\approx1-\Phi(2)\approx0.023\), where \(\Phi\) is the standard normal cdf (primer box 2). With a continuity correction (see the recipe below) one gets \(0.029\); the exact binomial value is \(0.028\). With 10 000 tosses the standard deviation is \(\frac{0.5}{100}=0.005\), and 0.6 is \(\frac{0.1}{0.005}=20\) standard deviations away — practically impossible.
In words: averages of many independent measurements settle at the true mean (lln). The way they scatter around it is a bell curve whose width shrinks like \(1/\sqrt n\) (clt).
Primer My addition
Cross-references
Convergence of real sequences (the ε–\(n_0\) definition): Analysis 2.1. \((1+\frac xn)^n\to e^x\) for every real \(x\): Analysis 6.3 (Lemma 6.24) (Analysis 2.2 only does \(x=1\), Euler's number); the complex version is proved in step (vi) of the CLT proof below and in B1. Convergent sequences are bounded: Analysis 2.1. Accumulation points, lim sup and lim inf: Analysis 4.3 (with Bolzano–Weierstrass). Continuity at a point and the sequence criterion (\(x_n\to x\Rightarrow f(x_n)\to f(x)\)): Analysis 4.1, which also proves that \(\exp\) is continuous on the complex numbers; the complex exponential series and the rule \(e^{u}e^{v}=e^{u+v}\): Analysis 3.4. Triangle inequality: Analysis 1.3. Landau symbols \(o(\cdot)\): Analysis 6.1. Taylor expansion: Analysis 10.1. Characteristic functions: §2.3. Chebyshev: §2.2. Markov: §2.2. Null sets and "almost surely": B4.
0. Words and symbols used on this page
- Probability space \((\Omega,\Aa,\P)\): \(\Omega\) is the set of all possible outcomes, a single outcome is written \(\omega\); \(\Aa\) is the collection of events (subsets of \(\Omega\) we can assign probabilities to); \(\P\) assigns each event its probability.
- Random variable [Zufallsvariable] (RV): a function \(X:\Omega\to\R\) that turns each outcome \(\omega\) into a number \(X(\omega)\) (§1.3). The script writes "RVRV" for a real-valued random variable.
- Sequence of random variables \((X_n)_{n\in\N}\): one random variable \(X_1,X_2,X_3,\dots\) for every natural number \(n\). For a fixed outcome \(\omega\), the values \(X_1(\omega),X_2(\omega),\dots\) form an ordinary sequence of numbers.
- iid: "independent and identically distributed" — the variables do not influence each other (§1.4) and all have the same distribution.
- Mean and variance: \(\mu=\E[X_i]\) is the expected value, \(\sigma^2=\Var[X_i]\) the variance, \(\sigma\) the standard deviation (§2.1).
- Covariance [Kovarianz] \(\Cov[X,Y]=\E\bigl[(X-\E[X])(Y-\E[Y])\bigr]\) (Definition 2.9, §2.1): how strongly \(X\) and \(Y\) deviate from their means in the same direction. Uncorrelated means \(\Cov[X,Y]=0\).
- Sum and sample mean: \(S_n=X_1+\dots+X_n\) and \(\bar X_n=\frac{S_n}n\).
- cdf \(F_X(x)=\P(X\le x)\) (§1.1), and characteristic function (cf) \(\varphi_X(t)=\E[e^{itX}]\) (§2.3). Both describe the distribution of \(X\) completely.
- Indicator \(\one_A\): equals 1 on the set \(A\) and 0 outside it.
- \(\varepsilon\) (epsilon) always stands for a small positive number, a "tolerance".
- Null set: an event of probability 0. Almost surely (a.s.) [fast sicher]: "outside a null set", i.e. with probability 1.
1. Three facts about probabilities of events that you will need
- Union bound (σ-subadditivity, Proposition 1.19(vi)): \(\P(A\cup B)\le\P(A)+\P(B)\), and more generally \(\P(\bigcup_kA_k)\le\sum_k\P(A_k)\) for countably many events. Consequence: a countable union of null sets is a null set (a sum of zeros is zero).
- Continuity from above (Proposition 1.19(v)): if the events shrink, \(B_1\supseteq B_2\supseteq\dots\), then \(\P(B_n)\to\P(\bigcap_nB_n)\), the probability of the part common to all of them. (Proposition 1.19(v) also requires the first set to have finite measure; for a probability measure that is automatic, since \(\P(B_1)\le1\).)
- Splitting an inequality: if \(|a+b|\ge\varepsilon\), then \(|a|\ge\frac\varepsilon2\) or \(|b|\ge\frac\varepsilon2\). Reason: if both were smaller than \(\frac\varepsilon2\), the triangle inequality \(|a+b|\le|a|+|b|\) (Analysis 1.3) would give \(|a+b|<\varepsilon\). As events: \(\{|U+V|\ge\varepsilon\}\subseteq\{|U|\ge\frac\varepsilon2\}\cup\{|V|\ge\frac\varepsilon2\}\). This is the standard move in Sheet 9 Ex 3.
2. The standard normal cdf \(\Phi\) and how to read it
\(Z\sim\mathcal N(0,1)\) means: \(Z\) is normally distributed with mean 0 and variance 1 ("standard normal"). Its cdf is written \(\Phi(z)=\P(Z\le z)\). There is no closed formula for \(\Phi\). Exams give values or let you leave \(\Phi(\cdot)\) in the answer.
The bell curve is symmetric around 0, so \(\Phi(-z)=1-\Phi(z)\). Hence \(\P(|Z|\ge a)=\P(Z\le-a)+\P(Z\ge a)=2(1-\Phi(a))=2\Phi(-a)\). Values worth knowing:
| \(z\) | 1 | 1.645 | 1.96 | 2 | 2.5 | 2.576 | 3 |
|---|---|---|---|---|---|---|---|
| \(\Phi(z)\) | 0.841 | 0.950 | 0.975 | 0.977 | 0.994 | 0.995 | 0.9987 |
For \(X\sim\mathcal N(\mu,\sigma^2)\), standardise first (Example 2.52(iii)): \(\P(X\le x)=\Phi\bigl(\frac{x-\mu}\sigma\bigr)\).
3. lim inf and lim sup of a sequence of numbers
Take a bounded sequence of real numbers \((a_n)\). An accumulation point is a value that the sequence comes arbitrarily close to again and again. \(\limsup_na_n\) is the largest and \(\liminf_na_n\) the smallest accumulation point. The sequence converges exactly when the two agree.
Useful trick: suppose \(c\le\liminf a_n\le\limsup a_n\le d\), and you can make \(c\) and \(d\) as close to a number \(L\) as you like. Then lim inf and lim sup are both \(L\), so \(a_n\to L\). (Used in the proof that convergence in probability implies convergence in distribution.)
Modes of convergence
Remark 2.55 why sequences Script 2.55
In probability and statistics we often ask: what happens to a sequence of random variables as it gets longer? The concentration inequalities of §2.2 already gave a first answer for sums and means: the average of many observations gets closer to the true mean of the underlying process.
In such settings the variables in the sequence are usually independent observations — the data points of a dataset, as in Remark 1.80. The lln and the clt continue this theme. But first we must say precisely what "getting closer" means for random variables. That is Definition 2.56.
After that, the laws of large numbers and the central limit theorem state that and how the means of iid sequences get closer and closer to their mean (in probability or almost surely).
Definition 2.56 modes of convergence Script 2.56
Setup. Let \((X_n)_{n\in\N}\) be a sequence of real random variables and \(X\) another real random variable (\(X\) may also be a constant). All of them are defined on the same probability space \((\Omega,\Aa,\P)\).
- In probability [stochastische Konvergenz], written \(X_n\xrightarrow{\P}X\), if for every \(\varepsilon>0\): \[\lim_{n\to\infty}\P(|X_n-X|\ge\varepsilon)=0 .\] Intuition: for large \(n\) it is very unlikely that \(X_n\) is far from \(X\).
- Almost surely [fast sicher], written \(X_n\xrightarrow{\text{a.s.}}X\) or \(X_n\to X\) a.s., if \[\P\bigl(\{\omega\in\Omega\mid\lim_{n\to\infty}X_n(\omega)=X(\omega)\}\bigr)=1 .\] Intuition: for almost every outcome \(\omega\), the sequence of numbers \(X_n(\omega)\) converges to the number \(X(\omega)\).
- In distribution (also: weakly) [Konvergenz in Verteilung], written \(X_n\xrightarrow{d}X\) or \(X_n\Rightarrow X\), if \[\lim_{n\to\infty}F_{X_n}(x)=F_X(x)\quad\text{for every }x\in\R\text{ at which }F_X\text{ is continuous.}\] Intuition: the overall shape of the distribution of \(X_n\) approaches the shape of the distribution of \(X\). Equivalently (Lévy's continuity theorem, Remark 2.47(vi)): \(\varphi_{X_n}(t)\to\varphi_X(t)\) for all \(t\in\R\).
How to read each definition (mine).
- (i): fix \(\varepsilon\). For each \(n\), compute the number \(p_n=\P(|X_n-X|\ge\varepsilon)\). Ask that \(p_n\to0\), as an ordinary sequence of numbers.
- (ii): fix an outcome \(\omega\). You get a sequence of numbers \(X_n(\omega)\). Ask that it converges to \(X(\omega)\). This must work for all \(\omega\) except a null set.
- (iii): no \(\omega\) appears at all — only the cdfs, which are ordinary functions.
Why "at continuity points"? (my example) Let \(X_n=\frac1n\) (a constant) and \(X=0\). In any reasonable sense \(X_n\to0\). Now look at the cdfs at \(x=0\): \(F_{X_n}(0)=\P(\frac1n\le0)=0\) for every \(n\), while \(F_0(0)=\P(0\le0)=1\). So the cdfs fail to converge at \(x=0\) — exactly the point where \(F_0\) jumps from 0 to 1. At every other \(x\) they do converge. Ignoring jump points makes the definition give the sensible answer. (A cdf \(F\) is continuous at \(x\) when \(F(x_n)\to F(x)\) for every sequence \(x_n\to x\) — no jump there; Analysis 4.1.)
Remark 2.57 relations between the modes Script 2.57
\[ X_n\xrightarrow{\text{a.s.}}X\ \Longrightarrow\ X_n\xrightarrow{\P}X\ \Longrightarrow\ X_n\xrightarrow{d}X . \]In words: almost sure convergence implies convergence in probability, which implies convergence in distribution.
The reverse implications fail in general (Examples 2.58 and 2.59 below). Two partial reverses hold:
- If \(X_n\xrightarrow\P X\), then some subsequence of \((X_n)\) converges almost surely to \(X\).
- If \(X_n\xrightarrow dc\) for a constant \(c\in\R\), then also \(X_n\xrightarrow\P c\).
Proofs of the three implications supplied by me — the script states them
a.s. ⟹ in probability. Fix \(\varepsilon>0\). Let \(B_n=\bigcup_{m\ge n}\{|X_m-X|\ge\varepsilon\}\): the event "some term from index \(n\) on is at least \(\varepsilon\) away from \(X\)".
- The \(B_n\) shrink as \(n\) grows (fewer indices \(m\) are allowed).
- If \(\omega\) lies in every \(B_n\), then \(|X_m(\omega)-X(\omega)|\ge\varepsilon\) for infinitely many \(m\). So \(X_m(\omega)\) does not converge to \(X(\omega)\). By assumption, such \(\omega\) form a null set: \(\P(\bigcap_nB_n)=0\).
- Continuity from above (primer box 1) gives \(\P(B_n)\to0\).
- \(\{|X_n-X|\ge\varepsilon\}\subseteq B_n\) (take \(m=n\)), so \(\P(|X_n-X|\ge\varepsilon)\le\P(B_n)\to0\).
In probability ⟹ in distribution. Let \(x\) be a point where \(F_X\) is continuous, and \(\varepsilon>0\).
- Upper bound: if \(X_n\le x\) and \(|X_n-X|<\varepsilon\), then \(X<x+\varepsilon\). So \(\{X_n\le x\}\subseteq\{X\le x+\varepsilon\}\cup\{|X_n-X|\ge\varepsilon\}\). The union bound gives \(F_{X_n}(x)\le F_X(x+\varepsilon)+\P(|X_n-X|\ge\varepsilon)\).
- Lower bound: if \(X\le x-\varepsilon\) and \(|X_n-X|<\varepsilon\), then \(X_n<x\). So \(\{X\le x-\varepsilon\}\subseteq\{X_n\le x\}\cup\{|X_n-X|\ge\varepsilon\}\), which gives \(F_X(x-\varepsilon)\le F_{X_n}(x)+\P(|X_n-X|\ge\varepsilon)\).
- Let \(n\to\infty\). The probabilities \(\P(|X_n-X|\ge\varepsilon)\) go to 0, so \(F_X(x-\varepsilon)\le\liminf_n F_{X_n}(x)\le\limsup_n F_{X_n}(x)\le F_X(x+\varepsilon)\).
- Now let \(\varepsilon\to0\). Because \(F_X\) is continuous at \(x\), both bounds tend to \(F_X(x)\). By primer box 3, \(F_{X_n}(x)\to F_X(x)\).
In distribution to a constant ⟹ in probability. The constant \(c\) has cdf \(F_c(x)=0\) for \(x<c\) and \(F_c(x)=1\) for \(x\ge c\). Its only jump is at \(c\), so every \(x\ne c\) is a continuity point. If \(|X_n-c|\ge\varepsilon\), then either \(X_n\le c-\varepsilon\) or \(X_n\ge c+\varepsilon\) (and then certainly \(X_n>c+\frac\varepsilon2\)). Hence \[\P(|X_n-c|\ge\varepsilon)\le F_{X_n}(c-\varepsilon)+1-F_{X_n}(c+\tfrac\varepsilon2)\xrightarrow{n\to\infty}0+1-1=0 .\]
The subsequence statement needs the Borel–Cantelli lemma; it is not proved here.
Example 2.58 in probability does not imply almost surely: the travelling bump Script 2.58
Setup. The probability space is \(([0,1],\mathcal B|_{[0,1]},\lambda|_{[0,1]})\): outcomes are points \(\omega\in[0,1]\), and the probability of an interval is its length (the uniform distribution on \([0,1]\); \(\mathcal B\) are the Borel sets, \(\lambda\) is length, B4).
The sequence. Write each \(n\) as \(n=2^k+j\) with \(0\le j<2^k\) (\(j,k\in\N\)), and set \(X_n=\one_{[j/2^k,\,(j+1)/2^k]}\). Concretely:
- \(X_1\) (\(k=0\)) is the indicator of \([0,1]\);
- \(X_2,X_3\) (\(k=1\)) are the indicators of the two halves \([0,\frac12]\), \([\frac12,1]\);
- \(X_4,\dots,X_7\) (\(k=2\)) are the indicators of the four quarters; and so on.
So in round \(k\) a "bump" of width \(2^{-k}\) sweeps once across \([0,1]\), and each round it gets narrower.
- In probability to 0: take \(\varepsilon\in(0,1)\). Since \(X_n\) only takes the values 0 and 1, \(\P(|X_n-0|\ge\varepsilon)=\P(X_n=1)\). This is the length of the bump, \(2^{-k}\). As \(n\to\infty\) also \(k\to\infty\), so \(\P(X_n=1)\to0\). Hence \(X_n\xrightarrow\P0\).
- Not almost surely: fix any \(\omega\). In every round \(k\) the bump passes over \(\omega\), so \(X_n(\omega)=1\) for at least one \(n\) in every round — infinitely many \(n\) in total. Also \(X_n(\omega)=0\) for infinitely many \(n\). So the number sequence \(X_n(\omega)\) does not converge (certainly not to 0), for any \(\omega\). Thus \(\P(\lim_nX_n=0)=0\ne1\).
Detail: the script says "for each \(k\) there is exactly one \(j\)" with \(\omega\) in the interval. At dyadic endpoints like \(\omega=\frac12\) there are two, because the closed intervals overlap. The argument only needs "at least one", and that holds. The widget shows the bump and the sequence \(X_n(\omega)\).
In words: the chance of being hit at step \(n\) goes to 0, but every single point is still hit again in every round. "Rarely wrong at each time" is weaker than "eventually always right".
Example 2.59 in distribution does not imply in probability Script 2.59
Let \(U\sim\Ber(0.5)\) (a fair 0/1 coin). Define \(X_n:=U\) for every \(n\), and \(Y:=1-U\).
- In distribution: \(Y\) is also 0 or 1 with probability \(\frac12\) each, so \(Y\sim\Ber(0.5)\). Hence \(F_{X_n}=F_Y=F_{\Ber(0.5)}\) for all \(n\), and \(X_n\xrightarrow dY\) trivially.
- Not in probability: \(|X_n-Y|=|U-(1-U)|=|2U-1|\). Since \(U\in\{0,1\}\), this is \(|-1|=1\) or \(|1|=1\). So \(\P(|X_n-Y|=1)=1\) for all \(n\). In particular \(\P(|X_n-Y|\ge\frac12)=1\not\to0\).
In words: convergence in distribution compares only the shapes of the distributions. \(X_n\) and \(Y\) have the same shape, but they are never close — in fact they always disagree.
Remark 2.60 what kind of "closeness" each mode means Script 2.60
- Almost sure convergence and convergence in probability are strong notions. They compare \(X_n\) and \(X\)
on the same probability space \((\Omega,\Aa,\P)\), that is, on the same "outcome label" of the actual random
experiment. For a given outcome, the variables really end up taking similar values. This only makes sense if they
"measure the exact same process".
- Almost surely: for almost every specific \(\omega\), the real numbers \(X_n(\omega)\) converge to the real number \(X(\omega)\). This is a direct, pointwise relationship on the sample space.
- In probability: slightly weaker. For large \(n\), \(X_n(\omega)\) is very likely close to \(X(\omega)\).
- Convergence in distribution is much weaker. Only the cdfs \(F_{X_n}\) converge to \(F_X\) (at continuity points). \(X_n\) and \(X\) need not even be defined on the same probability space, and the values \(X_n(\omega)\) and \(X(\omega)\) can be entirely unrelated. One \(X_i\) could be measurements in a physics lab, another a count of microbes in a river, and \(X\) some property of galaxies. All that matters is that their "probabilistic shapes" (distributions) become similar.
This distinction matters for the clt, which is a statement about convergence in distribution. The standardised sum \(Z_n\) does not become equal to a standard normal \(Z\) pointwise; only its distribution increasingly resembles that of \(Z\).
The laws of large numbers
Theorem 2.61 weak law of large numbers (wlln) Script 2.61
Assumptions. \(X_1,X_2,\dots\) are real random variables that are
- identically distributed,
- with finite mean \(\E[X_i]=\mu<\infty\),
- and pairwise uncorrelated (\(\Cov[X_i,X_j]=0\) for \(i\ne j\)).
Conclusion. The sample mean \(\bar X_n:=\frac1n\sum_{i=1}^nX_i\) converges in probability to \(\mu\): \(\bar X_n\xrightarrow\P\mu\).
Proof with finite variance Script — each step explained
Assume in addition \(\Var[X_i]=\sigma^2<\infty\).
Step 1 (mean). By linearity of expectation, \(\E[\bar X_n]=\frac1n\sum_{i=1}^n\E[X_i]=\frac1n\cdot n\mu=\mu\).
Step 2 (variance). A constant factor comes out squared (Proposition 2.8(iii)), and for uncorrelated variables the variance of a sum is the sum of the variances (Proposition 2.12(vi), all covariances are 0): \[\Var[\bar X_n]=\Var\Bigl[\frac1n\sum_{i=1}^nX_i\Bigr]=\frac1{n^2}\sum_{i=1}^n\Var[X_i]=\frac1{n^2}\cdot n\sigma^2=\frac{\sigma^2}n .\]
Step 3 (Chebyshev). Chebyshev's inequality (Theorem 2.40) says \(\P(|Y-\E[Y]|\ge\varepsilon)\le\Var[Y]/\varepsilon^2\). With \(Y=\bar X_n\), for any \(\varepsilon>0\):
\[ \P(|\bar X_n-\mu|\ge\varepsilon)\le\frac{\Var[\bar X_n]}{\varepsilon^2}=\frac{\sigma^2/n}{\varepsilon^2}=\frac{\sigma^2}{n\varepsilon^2}\xrightarrow{n\to\infty}0 . \]That is exactly Definition 2.56(i) with \(X=\mu\).
Further remarks from the script.
- The wlln holds even if only the mean is finite (the variance may be infinite), but the proof is more involved.
- Convergence is slower when the variances can vary, especially when they become large or infinite. (The bound \(\frac{\sigma^2}{n\varepsilon^2}\) shows this: a larger \(\sigma^2\) needs a larger \(n\).)
- The wlln also holds when \(X_1,X_2,\dots\) are iid, since independent variables are pairwise uncorrelated (Proposition 2.12(v)).
My notes on the statement. (1) "Pairwise uncorrelated" only makes sense when the variances are finite (a covariance needs \(\E[X_i^2]<\infty\)). So the proof above covers exactly the uncorrelated case. The version with "only the mean finite" is true for iid variables (more generally, pairwise independent and identically distributed ones) and needs a different proof. (2) The script's proof says "since the \(X_i\) are iid", but only uncorrelatedness is used. (3) The Chebyshev bound also gives a rate: the probability of an \(\varepsilon\)-deviation is at most \(\sigma^2/(n\varepsilon^2)\).
Theorem 2.62 strong law of large numbers (slln) Script 2.62
Assumptions. \(X_1,X_2,\dots\) are iid real random variables with finite mean \(\E[X_i]=\mu<\infty\).
Conclusion. The sample mean \(\bar X_n=\frac1n\sum_{i=1}^nX_i\) converges almost surely: \(\bar X_n\xrightarrow{\text{a.s.}}\mu\).
The script gives no proof (see Remark 2.63). The theorem is examined as a statement: WiSe25 P2a asked for it "with all required assumptions" — iid, finite mean, almost sure convergence of the sample mean.
Compare with the wlln: the slln needs the stronger assumption (iid instead of pairwise uncorrelated) and gives the stronger conclusion (a.s. instead of in probability).
Remark 2.63 wlln versus slln Script 2.63
- The slln implies the wlln (because a.s. ⟹ in probability, Remark 2.57). It says more: the sample mean \(\bar X_n\) converges to \(\mu\) for almost every sequence of outcomes — not just that large deviations become unlikely.
- The proof of the slln is more complex, especially without assuming finite variance. It typically uses the Borel–Cantelli lemmas to show that large deviations from the mean occur only finitely often. (The first Borel–Cantelli lemma says: if the probabilities of events \(A_1,A_2,\dots\) have a finite sum, then almost surely only finitely many of the \(A_n\) happen. It is not proved in this course.)
- The Wikipedia article on the law of large numbers gives structured overviews of how the proofs work. In particular, the wlln can be proven elegantly with characteristic functions and Lévy's continuity theorem.
- The laws of large numbers are fundamental in statistics: they justify using sample averages to estimate population means. This can hardly be overstated. We want to reason about a whole distribution ("all humans", "any conditions I could ever encounter"), but we only have a fixed, finite number of observations (data). Without the llns (or the clt, or concentration inequalities), we would have no reason to believe that the average of the data has anything to do with the true mean.
- For both the wlln and the slln there are many variants that relax some assumptions while adding others.
- What the llns do not tell us: how \(\bar X_n\) is distributed around \(\mu\) for large but finite \(n\), and how fast it converges. That is what the clt addresses.
The central limit theorem
Idea first (mine). The lln says \(\bar X_n-\mu\to0\). Multiply this shrinking error by the growing factor \(\sqrt n/\sigma\). The result neither shrinks to 0 nor blows up: it keeps mean 0 and variance 1. The clt says its distribution approaches the standard normal bell curve.
Theorem 2.64 central limit theorem (clt) [zentraler Grenzwertsatz] Script 2.64
Assumptions. \(X_1,X_2,\dots\) are iid real random variables with finite mean \(\E[X_i]=\mu\) and finite, non-zero variance \(\Var[X_i]=\sigma^2\in\R_{>0}\).
Notation. \(S_n:=\sum_{i=1}^nX_i\) is the sum and \(\bar X_n=S_n/n\) the sample mean. The standardised sum (or standardised mean) is
\[ Z_n=\frac{S_n-\E[S_n]}{\sqrt{\Var[S_n]}}=\frac{S_n-n\mu}{\sigma\sqrt n}=\frac{\bar X_n-\mu}{\sigma/\sqrt n}. \]Conclusion. \(Z_n\xrightarrow{d}\mathcal N(0,1)\).
The quantity \(\sigma/\sqrt n\) sets the "asymptotic standard deviation" of \(\bar X_n\) as \(n\to\infty\). It is called the standard error [Standardfehler].
Why the three forms of \(Z_n\) are the same number: \(\E[S_n]=n\mu\) by linearity; \(\Var[S_n]=n\sigma^2\) because the \(X_i\) are independent, so \(\sqrt{\Var[S_n]}=\sigma\sqrt n\). Dividing numerator and denominator by \(n\) turns \(\frac{S_n-n\mu}{\sigma\sqrt n}\) into \(\frac{\bar X_n-\mu}{\sigma/\sqrt n}\). Note that \(Z_n\) has mean 0 and variance 1 for every \(n\); the theorem is about its shape.
Proof idea with characteristic functions Script — each step explained
The proof uses characteristic functions and Lévy's continuity theorem. \(o(s^2)\) means "a term that, divided by \(s^2\), goes to 0 as \(s\to0\)" (Landau symbol).
(i) Standardise each summand: \(Y_i=(X_i-\mu)/\sigma\). These are iid with \(\E[Y_i]=0\) and \(\Var[Y_i]=1\). Then \(\sum_iY_i=\frac{S_n-n\mu}\sigma\), so \(Z_n=\frac1{\sqrt n}\sum_{i=1}^nY_i\).
(ii) \(\varphi_{Z_n}(t)=\E[e^{itZ_n}]=\E\bigl[\exp\bigl(\frac{it}{\sqrt n}\sum Y_i\bigr)\bigr]=\varphi_{Y_1}\bigl(\frac t{\sqrt n}\bigr)^n\). Reason: the exponential of a sum is a product of exponentials; independence turns the expectation of the product into the product of expectations (Remark 2.47(iv)); scaling by \(\frac1{\sqrt n}\) replaces \(t\) by \(\frac t{\sqrt n}\) (Remark 2.47(ii)); identical distribution makes all \(n\) factors equal.
(iii) Taylor-expand \(\varphi=\varphi_{Y_1}\) around \(s=0\) to second order: \(\varphi(s)=\varphi(0)+s\varphi'(0)+\frac{s^2}2\varphi''(0)+o(s^2)\). By Remark 2.47(i),(iii): \(\varphi(0)=1\), \(\varphi'(0)=i\E[Y_1]=0\), \(\varphi''(0)=i^2\E[Y_1^2]=-\Var[Y_1]=-1\). So \(\varphi_{Y_1}(s)=1-\frac{s^2}2+o(s^2)\).
(iv) Substitute \(s=t/\sqrt n\): \(\varphi_{Y_1}(t/\sqrt n)=1-\frac{t^2}{2n}+o\bigl(\frac{t^2}n\bigr)\).
(v) Therefore \(\varphi_{Z_n}(t)=\bigl(1-\frac{t^2}{2n}+o(\frac{t^2}n)\bigr)^n\).
(vi) Write the bracket as \(1+\frac{z_n}n\) with \(z_n=-\frac{t^2}2+n\cdot o(\frac{t^2}n)\to-\frac{t^2}2\). (Why the last term vanishes, for fixed \(t\ne0\): \(n\cdot o(\frac{t^2}n)=t^2\cdot\frac{o(t^2/n)}{t^2/n}\), and the fraction tends to 0 by the meaning of \(o(\cdot)\), because \(\frac{t^2}n\to0\). For \(t=0\) there is nothing to show.) The fact "\(z_n\to z\Rightarrow(1+\frac{z_n}n)^n\to e^z\)" (the complex-number version of \((1+\frac xn)^n\to e^x\), Analysis 6.3, Lemma 6.24; proof just below) gives \(\varphi_{Z_n}(t)\to e^{-t^2/2}\). This is the cf of \(\mathcal N(0,1)\) (Example 2.48).
Why the Taylor step (iii) is allowed for a complex \(\varphi\). Here \(\varphi=\varphi_{Y_1}\) is a function of the real variable \(s\) whose values are complex numbers. Split it into real and imaginary part, \(\varphi=u+iv\), where \(u=\operatorname{Re}\varphi\) and \(v=\operatorname{Im}\varphi\) are ordinary real-valued functions of \(s\). Such a function is differentiated part by part, \(\varphi'=u'+iv'\) (§2.3 primer, B1), so \(u\) and \(v\) are twice differentiable at 0 exactly when \(\varphi\) is. Apply the real Taylor formula (Analysis 10.1) to \(u\) and to \(v\) separately and add the two expansions; the parts reassemble into \(\varphi(0)+s\varphi'(0)+\frac{s^2}2\varphi''(0)\). The two remainders combine into one remainder that is again \(o(s^2)\): call them \(r_u(s)\) and \(r_v(s)\), so \(r_u(s)/s^2\to0\) and \(r_v(s)/s^2\to0\). The combined remainder is \(r_u(s)+ir_v(s)\), and the triangle inequality together with \(|i|=1\) gives \(\bigl|r_u(s)+ir_v(s)\bigr|\le|r_u(s)|+|r_v(s)|\). Divide this by \(s^2\): the right-hand side tends to 0, so the left-hand side does too. That is exactly what \(o(s^2)\) means.
Proof of the complex limit. Neither the script nor the Analysis guide proves this version: the Analysis proof of \((1+\frac xn)^n\to e^x\) takes a logarithm, and the logarithm has no single continuous extension to the complex numbers. Numbers first: for \(z_n=z=-\frac12\) and \(n=10\), \((1-0.05)^{10}\approx0.5987\) while \(e^{-1/2}\approx0.6065\) — a gap of about \(0.0078\); at \(n=100\), \((1-0.005)^{100}\approx0.6058\), a gap of about \(0.00076\). Ten times larger \(n\), roughly ten times smaller gap: the gap shrinks like \(\frac1n\), and that is what the proof shows.
Let \(z_n\to z\) be complex numbers. (For complex numbers, \(z_n\to z\) means \(|z_n-z|\to0\), where \(|u+iv|=\sqrt{u^2+v^2}\) is the distance from 0 in the plane, B1.) A convergent sequence is bounded, so there is a number \(C\ge0\) with \(|z_n|\le C\) for all \(n\) (Analysis 2.1 states this for real sequences; the proof given there uses nothing but the absolute value, so it works word for word with the complex modulus \(|\cdot|\)). Now fix \(n\) and put \(w=\frac{z_n}n\) (so \(|w|\le\frac Cn\)), \(a=1+w\) and \(b=e^{w}\). All three depend on \(n\); the notation suppresses that to keep the formulas short.
- \(b^n\to e^z\). \(b^n=(e^{w})^n=e^{nw}\): apply the rule \(e^{u}e^{v}=e^{u+v}\), which holds for all complex \(u,v\) (Analysis 3.4, functional equation), \(n-1\) times. And \(nw=n\cdot\frac{z_n}n=z_n\), so \(b^n=e^{z_n}\). Finally \(e^{z_n}\to e^z\), because \(\exp\) is continuous on all of \(\mathbb C\) (Analysis 4.1, Lemma 4.4) and continuity means exactly that \(z_n\to z\) forces \(e^{z_n}\to e^{z}\).
- An algebra identity. \(a^n-b^n=(a-b)\bigl(a^{n-1}+a^{n-2}b+\dots+ab^{n-2}+b^{n-1}\bigr)\) — multiply out: all middle terms cancel in pairs (for \(n=2\): \((a-b)(a+b)=a^2-b^2\)). The bracket has \(n\) terms \(a^{n-1-k}b^{k}\), \(k=0,\dots,n-1\), and each has modulus \(|a|^{n-1-k}|b|^{k}\le M^{n-1}\) with \(M=\max(|a|,|b|)\). Bounding the sum of the \(n\) terms by the triangle inequality gives \(|a^n-b^n|\le n\,|a-b|\,M^{n-1}\).
- \(M^{n-1}\) stays bounded. \(|a|=|1+w|\le1+|w|\le e^{|w|}\) (triangle inequality; and \(e^{x}=1+x+\frac{x^2}2+\dots\ge1+x\) for \(x\ge0\), since all the dropped terms are \(\ge0\)). \(|b|=|e^w|\le e^{|w|}\) (from the series: \(|\sum\frac{w^k}{k!}|\le\sum\frac{|w|^k}{k!}\); this is Analysis 3.4, property \(|e^{z}|\le e^{|z|}\)). Both \(|a|\) and \(|b|\) are therefore at most \(e^{|w|}\), so \(M=\max(|a|,|b|)\le e^{|w|}\) and \(M^{n-1}\le e^{(n-1)|w|}\le e^{n|w|}\le e^{n\cdot C/n}=e^C\), using \(|w|\le\frac Cn\) in the last step.
- \(a\) and \(b\) are very close. \(b-a=e^w-1-w=\frac{w^2}{2!}+\frac{w^3}{3!}+\dots\), so \(|a-b|\le|w|^2\bigl(\frac1{2!}+\frac{|w|}{3!}+\frac{|w|^2}{4!}+\dots\bigr)\le|w|^2e^{|w|}\le\frac{C^2}{n^2}e^C\) (each \(\frac1{(k+2)!}\le\frac1{k!}\), and \(|w|\le\frac Cn\le C\)).
- Put together. Feed the bounds of steps 4 and 3 into step 2: \(|a^n-b^n|\le n\cdot\frac{C^2}{n^2}e^C\cdot e^C=\frac{C^2e^{2C}}n\to0\), since \(C\) does not depend on \(n\). By the triangle inequality, \(|a^n-e^z|\le|a^n-b^n|+|b^n-e^z|\to0+0\), i.e. \((1+\frac{z_n}n)^n\to e^z\). \(\square\)
In words: \(1+\frac{z_n}n\) and \(e^{z_n/n}\) differ only by a term of size about \(\frac1{n^2}\); raising both to the \(n\)-th power multiplies that gap by at most about \(n\), so the gap is of size \(\frac1n\) and disappears, and \((e^{z_n/n})^n=e^{z_n}\) tends to \(e^z\).
(vii) Lévy's continuity theorem (Remark 2.47(vi)): the cfs converge to the cf of \(\mathcal N(0,1)\), so \(Z_n\xrightarrow d\mathcal N(0,1)\).
Where the assumptions were used: finite variance for the second-order Taylor expansion (step iii); \(\sigma>0\) to divide by it (step i); independence and identical distribution for the \(n\)-th power (step ii). For coin flips \(\pm1\), step (ii) is exactly SoSe26 P4b, which asks for \(\varphi_{Z_n}(t)=\cos^n(t/\sqrt n)\); steps (iii)–(vi) then show that this tends to \(e^{-t^2/2}\) (the exam did not ask for the limit).
Remark 2.65 significance of the clt Script 2.65
- Why it matters. The clt is one of the most remarkable results in probability theory. The sum (or average) of many iid random variables is approximately normal, whatever the distribution of a single one (as long as mean and variance are finite). This is why the normal distribution appears so often in nature and in statistics.
- Other ways to write it. The clt implies \(\sqrt n(\bar X_n-\mu)\xrightarrow d\mathcal N(0,\sigma^2)\) (multiply
\(Z_n\) by the constant \(\sigma\)). It is often read as
\[S_n\approx\mathcal N(n\mu,n\sigma^2)\qquad\text{or equivalently}\qquad\bar X_n\approx\mathcal N\Bigl(\mu,\frac{\sigma^2}n\Bigr),\]
where "\(\approx\)" means "approximately distributed like". In words: for large \(n\), the sum is approximately
Gaussian with mean \(n\mu\) and variance \(n\sigma^2\), and the sample mean is approximately Gaussian with mean \(\mu\)
and variance \(\sigma^2/n\).
Sometimes the clt is sloppily written as \(\bar X_n\xrightarrow d\mathcal N(\mu,\sigma^2/n)\). This is mathematically incorrect: convergence in distribution needs a fixed target, so the right-hand side must not depend on \(n\). Also, as \(n\to\infty\), \(\mathcal N(\mu,\sigma^2/n)\) degenerates to a point mass at \(\mu\) — and that is what the llns already say. - Statistics. These approximations are the basis of many inference procedures, such as confidence intervals and hypothesis tests for means (§3.3, §3.4). For example, when a plot shows the standard error as an uncertainty interval, it implicitly invokes the clt: it assumes the plotted quantity is Gaussian and shows the scaled standard deviation as a meaningful measure of that Gaussian's spread. The \(\sqrt n\) rate of convergence is a key insight — statisticians are "obsessed with \(\sqrt n\)-rates" in all kinds of tasks.
- Beyond iid. Theorem 2.64 assumes iid variables, but the clt holds much more generally. The Lindeberg–Feller clt covers sums of independent but not identically distributed variables, provided no single variable contributes too much to the total variance (formalised by the Lindeberg condition). There are also versions for certain dependent variables (e.g. martingales, mixing sequences — special kinds of dependent sequences that this course does not cover). This broad applicability underlines how fundamental the normal distribution is.
- A caution. The clt is often invoked as a blanket justification whenever one would like something to be Gaussian (because that is convenient for computations). "There are many unmeasured additive influences on our outcome whose sum, mumble mumble, clt, mumble… so Gaussian noise is reasonable."
- Visualisations. The script points to a visualisation on Moodle and several online ones for building intuition. On this page, use the widget above.
Recipe: a normal approximation with the clt My addition
- Identify \(S_n=\sum X_i\) (or \(\bar X_n\)) with iid summands. Compute \(\mu=\E[X_i]\) and \(\sigma^2=\Var[X_i]\).
- Standardise the event (subtract \(n\mu\), divide by \(\sigma\sqrt n\) on both sides): \(\P(S_n\le s)=\P\bigl(Z_n\le\frac{s-n\mu}{\sigma\sqrt n}\bigr)\approx\Phi\bigl(\frac{s-n\mu}{\sigma\sqrt n}\bigr)\).
- For "\(>\)" use \(1-\Phi(\cdot)\); for two-sided events \(\P(|Z_n|\ge a)\approx2\Phi(-a)\).
- Write "approximately, by the clt". It is an approximation, not a bound (contrast Chebyshev, §2.2).
- Optional: for integer-valued \(S_n\), a continuity correction (replace \(s\) by \(s+\frac12\)) improves accuracy. Example: 100 fair coins, \(\P(S\ge60)=\P(S>59.5)\approx1-\Phi\bigl(\frac{59.5-50}5\bigr)=1-\Phi(1.9)=0.0287\), versus the exact \(0.0284\); without the correction \(1-\Phi(2)=0.0228\).
Exercise-sheet tasks
Sheet 8, Exercise 4 (optional, coding) — Monte Carlo integration Sheet 8 · Ex 4
Idea. By the lln, the mean of a random variable \(Y\) can be estimated by averaging iid samples: \(\E[Y]\approx\frac1n\sum_{i=1}^nY_i\). Apply this to \(Y=f(X)\) with \(X\) uniform on a bounded region \(U\subsetneq\R^d\). The mean of \(f(X)\) is \(\frac1{\lambda^d(U)}\int_Uf(x)\,\mathrm dx\), where \(\lambda^d(U)\) is the area/volume of \(U\). So for iid \(X_1,\dots,X_n\sim\Unif(U)\) with observed values \(x_1,\dots,x_n\): \(\hat I_n:=\frac1n\sum_{i=1}^nf(x_i)\approx\frac1{\lambda^d(U)}\int_Uf(x)\,\mathrm dx\).
Task. Approximate the integral of \(f(x)=10-x_1^2-x_2^2\) over the unit disc \(D_2=\{x\in\R^2\mid x_1^2+x_2^2<1\}\): (i) draw \(n\) samples uniformly and independently inside \(D_2\) (not in \((-1,1)^2\)); (ii) use them to estimate the area of \(D_2\), which is \(\pi\); (iii) approximate \(\int_{D_2}f\) and compare with the true value.
Solution
(i) Rejection sampling: draw \((u_1,u_2)\) uniformly in the square \([-1,1]^2\). Keep the point if \(u_1^2+u_2^2<1\), otherwise discard it. The kept points are uniform on \(D_2\).
(ii) Apply the lln to the indicator "point was kept". Its mean is \(\frac{\text{area}(D_2)}{\text{area}([-1,1]^2)}=\frac\pi4\). So the fraction of kept points estimates \(\frac\pi4\), and \(\hat\pi=4\times\)(fraction kept).
(iii) With \(m\) kept points \(x_i\): \(\widehat I=\hat\pi\cdot\frac1m\sum_{\text{kept}}f(x_i)\) (area times average value). True value, using polar coordinates \(x=(r\cos\theta,r\sin\theta)\), where the area element is \(r\,\mathrm dr\,\mathrm d\theta\) (B5) and \(x_1^2+x_2^2=r^2\):
\[ \int_0^{2\pi}\!\!\int_0^1(10-r^2)\,r\,\mathrm dr\,\mathrm d\theta=2\pi\int_0^1(10r-r^3)\,\mathrm dr=2\pi\Bigl[5r^2-\frac{r^4}4\Bigr]_0^1=2\pi\cdot\frac{19}4=\frac{19\pi}2\approx29.85 . \]Note on the official solution: it writes the antiderivative as \(5r^2-\frac{r^3}3\) and the result as \(2\pi\cdot\frac{14}3\approx29.34\) (and \(2\pi\cdot\frac{14}3\) is in fact \(\approx29.32\)). That drops the Jacobian factor \(r\) from the \(r^2\) term (the integrand is \(10r-r^3\), not \(10r-r^2\)). The correct value is \(\frac{19\pi}2\approx29.85\); the widget below confirms it numerically. By the clt, the Monte Carlo error shrinks like \(1/\sqrt n\).
Sheet 9, Exercise 1 — heavy planes Sheet 9 · Ex 1
A plane carries at most 100 passengers and has fuel for at most 8 t. For a fully booked flight, \(X_i\) is the weight of passenger \(i\) in kg. (i) Give one convincing argument for or against modelling the \(X_i\) as independent. From now on assume they are iid with \(\E[X_i]=75\) and \(\sigma[X_i]=20\). (ii) Can you compute the exact probability that 8 t is exceeded? (iii) Approximate it with the clt. (iv) The profit is 3 € per passenger; going over capacity costs 3000 € per flight. Is the plane profitable on average (always fully booked)?
Solution
(i) For independence: passengers are diverse and fly for all kinds of reasons; there is no reason one person's weight should depend on another's. Even if a route connects countries whose average weight is above or below the global mean, the individual weights can still be iid from that route's weight distribution. Against: families and groups book together, and people who live together share eating and activity habits, so their weights are dependent. A plane carrying the Japan Sumo Association or the Austrian State Ballet makes a big difference.
(ii) No. Let \(S_{100}=\sum_{j=1}^{100}X_j\) be the total weight. To compute \(\P(S_{100}>8000)\) exactly we need the full distribution of the \(X_i\). Mean and standard deviation alone do not determine it: a heavily skewed weight distribution with the same mean and variance gives a different probability.
(iii) \(\E[S_{100}]=100\cdot75=7500\) (linearity). \(\Var[S_{100}]=100\cdot20^2=40\,000\) (independence), so \(\sigma[S_{100}]=200\). By the clt, standardise: \(\P(S_{100}>8000)=\P\bigl(\frac{S_{100}-7500}{200}>\frac{8000-7500}{200}\bigr)\approx1-\Phi(2.5)\approx0.0062\).
(iv) Revenue per full flight: \(100\cdot3=300\) €. Expected extra cost: \(3000\cdot\P(\text{overload})\approx3000\cdot0.0062\approx18.6\) €. Expected profit per flight (linearity of expectation) \(\approx300-18.6=281.4\) € \(>0\): profitable. The official solution is correct.
For comparison: Chebyshev (§2.2) only guarantees \(\P(S_{100}\ge8000)\le\P(|S_{100}-7500|\ge500)\le\frac{40\,000}{500^2}=0.16\). That would allow an expected cost of up to 480 €, and the flight might be unprofitable. The clt's extra assumption (approximate normality) is what makes the flight look safe.
Sheet 9, Exercise 2 (ii), (iv) — insurance claims Sheet 9 · Ex 2
An insurer has \(n=10^4\) clients with iid yearly claims \(X_i\): mean \(\mu=500\), variance \(\sigma^2=800^2\). The premium per client is \(Z=550\). (Parts (i) and (iii) — the premium 550 and the Chebyshev bound 0.0256 — are on §2.2.) (ii) What does the wlln say about the average claim \(\bar X_n=S_n/n\) as \(n\) becomes very large? (iv) Approximate \(\P(S_n>nZ)\) with the clt, compare with Chebyshev, and say which you would trust.
Solution
(ii) The wlln gives \(\bar X_n\xrightarrow\P500\) as \(n\to\infty\). With many clients, the average claim per client is very likely close to 500.
(iv) \(\E[S_n]=n\mu=5\cdot10^6\), \(\Var[S_n]=n\sigma^2=6.4\cdot10^9\), \(\sigma[S_n]=\sqrt n\,\sigma=100\cdot800=8\cdot10^4\). The total premium is \(nZ=5.5\cdot10^6\). Standardise: \(\P(S_n>5.5\cdot10^6)\approx1-\Phi\bigl(\frac{5.5\cdot10^6-5\cdot10^6}{8\cdot10^4}\bigr)=1-\Phi(6.25)\approx2\cdot10^{-10}\). The official solution puts this in perspective: about one loss year in the age of the universe.
Which to trust? Chebyshev's 2.56 % is a guaranteed upper bound. It holds for any claim distribution with this mean and variance. The clt value is an approximation: \(S_n\) is only normal in the limit \(n\to\infty\). For finite \(n\) its quality depends on the claim distribution — especially in the far tail (6 standard deviations!). For heavily skewed claims it can badly underestimate the risk. If the normal approximation is good, the clt uses much more information and is much more precise. The official solution makes the same points ("you decide!") and is correct.
Sheet 9, Exercise 3 — rules for convergence in probability Sheet 9 · Ex 3
Show: (i) \(X_n\xrightarrow\P X\) and \(Y_n\xrightarrow\P Y\) ⟹ \(X_n+Y_n\xrightarrow\P X+Y\). (ii) \(\E|X_n-X|\to0\) ⟹ \(X_n\xrightarrow\P X\). (iii) \(X_n\xrightarrow\P X\) and \(X_n\xrightarrow\P Y\) ⟹ \(\P(X=Y)=1\). (iv) \(\E|X_n-X|\to0\) and \(\E|X_n-Y|\to0\) ⟹ \(\P(X=Y)=1\).
Solution
(i) Fix \(\varepsilon>0\). Write \((X_n+Y_n)-(X+Y)=(X_n-X)+(Y_n-Y)\). By primer box 1, \(\{|(X_n+Y_n)-(X+Y)|\ge\varepsilon\}\subseteq\{|X_n-X|\ge\frac\varepsilon2\}\cup\{|Y_n-Y|\ge\frac\varepsilon2\}\). The union bound gives \(\P(|(X_n+Y_n)-(X+Y)|\ge\varepsilon)\le\P(|X_n-X|\ge\frac\varepsilon2)+\P(|Y_n-Y|\ge\frac\varepsilon2)\). Both terms go to 0 by assumption (use Definition 2.56(i) with \(\frac\varepsilon2\)). Probabilities are \(\ge0\), so the limit is 0.
(ii) Markov's inequality (Theorem 2.38) for the non-negative variable \(|X_n-X|\): \(\P(|X_n-X|\ge\varepsilon)\le\frac{\E|X_n-X|}\varepsilon\to0\) for every fixed \(\varepsilon>0\). (The mode "\(\E|X_n-X|\to0\)" is called convergence "in \(L^1\)" or "in mean".)
(iii) For every \(n\), the triangle inequality gives \(|X-Y|\le|X-X_n|+|X_n-Y|\). So, as in (i), \(\P(|X-Y|\ge\varepsilon)\le\P(|X_n-X|\ge\frac\varepsilon2)+\P(|X_n-Y|\ge\frac\varepsilon2)\). The left side does not depend on \(n\); the right side tends to 0. Hence \(\P(|X-Y|\ge\varepsilon)=0\) for every \(\varepsilon>0\). Finally, \(X\ne Y\) means \(|X-Y|\ge\frac1k\) for some \(k\in\N\) (if the number \(d=|X-Y|\) is positive, the Archimedean property supplies a \(k\in\N\) with \(\frac1k<d\), and then \(|X-Y|=d\ge\frac1k\) — Analysis 1.2), so \(\{X\ne Y\}=\bigcup_{k\ge1}\{|X-Y|\ge\frac1k\}\). This is a countable union of null sets, so \(\P(X\ne Y)\le\sum_k0=0\) (σ-subadditivity), i.e. \(\P(X=Y)=1\).
(iv) By (ii), both assumptions give convergence in probability: \(X_n\xrightarrow\P X\) and \(X_n\xrightarrow\P Y\). Then (iii) applies. The official solution is correct.
(iii) says limits in probability are unique almost surely. That is the best one can hope for: changing \(X\) on a null set changes no probability.
Sheet 9, Exercise 4 — convergence of normal random variables Sheet 9 · Ex 4
Let \(X_n\sim\mathcal N(\mu_n,\sigma_n^2)\) for each \(n\). (i) If \(\mu_n\to\mu\in\R\) and \(\sigma_n^2\to\sigma^2>0\), then \(X_n\xrightarrow dX\) with \(X\sim\mathcal N(\mu,\sigma^2)\). (ii) If \(\mu_n\to\mu\) and \(\sigma_n^2\to0\), then \(X_n\xrightarrow\P\mu\). (Hint: the cf of \(\mathcal N(m,s^2)\) is \(\varphi(t)=\exp(imt-\frac12s^2t^2)\).)
Solution
(i) \(\varphi_{X_n}(t)=e^{i\mu_nt-\sigma_n^2t^2/2}\). Fix \(t\). The exponent is the complex number \(i\mu_nt-\frac12\sigma_n^2t^2\); since \(\mu_n\to\mu\) and \(\sigma_n^2\to\sigma^2\), its imaginary part \(\mu_nt\) and its real part \(-\frac12\sigma_n^2t^2\) converge, so the exponent converges to \(i\mu t-\frac12\sigma^2t^2\). The exponential function is defined for complex arguments by its series (Analysis 3.4) and is continuous on all of \(\mathbb C\) (Analysis 4.1, Lemma 4.4) — continuity of a function \(f\) at a point means precisely that \(x_n\to x\) implies \(f(x_n)\to f(x)\). Hence \(\varphi_{X_n}(t)\to e^{i\mu t-\sigma^2t^2/2}\). This is the cf of \(\mathcal N(\mu,\sigma^2)\), and it is continuous at \(t=0\) (the extra condition in Lévy's continuity theorem, Remark 2.47(vi)). So Lévy's theorem gives \(X_n\xrightarrow dX\).
(ii) Route 1 (Chebyshev). \(\P(|X_n-\mu_n|\ge\varepsilon)\le\sigma_n^2/\varepsilon^2\to0\), so \(X_n-\mu_n\xrightarrow\P0\). The numbers \(\mu_n-\mu\to0\); viewed as constant random variables they also converge in probability to 0. Since \(X_n-\mu=(X_n-\mu_n)+(\mu_n-\mu)\), Sheet 9 Ex 3(i) gives \(X_n-\mu\xrightarrow\P0\), i.e. \(X_n\xrightarrow\P\mu\).
Route 2 (cfs). As in (i), \(\varphi_{X_n}(t)\to e^{i\mu t}\), the cf of the constant \(\mu\) (continuous at 0). So \(X_n\xrightarrow d\mu\). Convergence in distribution to a constant implies convergence in probability (Remark 2.57).
The official solution is correct. One small point in its alternative route: it writes "from part (i), \(X_n\xrightarrow d\mathcal N(\mu,0)\)", but part (i) assumed \(\sigma^2>0\). Route 2 above avoids this by redoing the cf limit directly with \(\sigma^2=0\).
Old-exam tasks
WiSe 25/26, Problem 2 — definitions WiSe25 · P2a, P2b · 6 credits
(a) State the strong law of large numbers with all required assumptions. Answer: Let \(X_1,X_2,\dots\) be a sequence of iid real random variables with finite mean \(\E[X_i]=\mu<\infty\). Let \(\bar X_n=\frac1n\sum_{i=1}^nX_i\) be the sample mean. Then \(\bar X_n\xrightarrow{\text{a.s.}}\mu\).
(b) Give the full definition (including setup/assumptions) of the type of convergence in the slln. Answer: Let \((X_n)_{n\in\N}\) be a sequence of real random variables and \(X\) another real random variable, all defined on the same probability space \((\Omega,\Aa,\P)\). Then \(X_n\xrightarrow{\text{a.s.}}X\) if \(\P(\{\omega\in\Omega\mid\lim_{n\to\infty}X_n(\omega)=X(\omega)\})=1\).
Both official answers are correct and match Theorem 2.62 and Definition 2.56(ii) word for word. The "setup" credit goes to "on the same probability space".
SoSe 2025, Problem 2 — definitions SoSe25 · P2a, P2b · 6 credits
(a) State the clt with all required assumptions. Answer: Let \(X_1,X_2,\dots\) be iid real random variables with finite mean \(\E[X_i]=\mu\) and finite, non-zero variance \(\Var[X_i]=\sigma^2\in\R_{>0}\). Then \(Z_n=\frac{S_n-\E[S_n]}{\sqrt{\Var[S_n]}}=\frac{S_n-n\mu}{\sigma\sqrt n}=\frac{\bar X_n-\mu}{\sigma/\sqrt n}\xrightarrow d\mathcal N(0,1)\); equivalently \(\sqrt n(\bar X_n-\mu)\xrightarrow d\mathcal N(0,\sigma^2)\).
(b) Give the full general definition of the type of convergence in the clt. Answer: Definition 2.56(iii), including "for every \(x\in\R\) at which \(F_X\) is continuous". Pointwise convergence of the cfs was also accepted.
The official solution also accepted "\(S_n\xrightarrow d\mathcal N(n\mu,n\sigma^2)\)" and "\(\bar X_n\xrightarrow d\mathcal N(\mu,\sigma^2/n)\)", while noting that they are mathematically incorrect (Remark 2.65). Do not rely on that leniency. One small inconsistency: the official (b) requires \(X_n\) and \(X\) on the same probability space. Convergence in distribution does not need that (Remark 2.60) — harmless, but not "general".
WiSe 25/26, Problem 1d — the lln needs independence WiSe25 · P1d · 3 credits
Statement. For \(X_1,X_2,\dots\sim\Poi(2)\), the sample mean satisfies \(\bar X_n\xrightarrow\P2\). True or false?
Official answer: False — the statement says nothing about independence. Counterexample: \(X_i:=X_1\) for all \(i\). Then \(\bar X_n=\frac1n\cdot nX_1=X_1\) for every \(n\). For any \(\varepsilon>0\), \(\P(|X_1-2|\ge\varepsilon)>0\), since a Poisson variable takes every value \(k\in\N_0\) with positive probability (for small \(\varepsilon\), e.g. \(\P(|X_1-2|\ge\varepsilon)\ge\P(X_1=0)=e^{-2}\)). This probability does not depend on \(n\), so it does not tend to 0. Correct.
The official statement is printed as "\(\lim_{n\to\infty}\bar X_n\xrightarrow\P2\)" — the "lim" is redundant notation; read it as \(\bar X_n\xrightarrow\P2\). With "iid" (or even "pairwise uncorrelated") added, the statement is true by the wlln. Reading assumptions carefully is the whole point of such items.
WiSe 25/26, Problem 4c, 4d — clt versus Chebyshev for an estimator WiSe25 · P4c, P4d · 3 + 1 credits
Setting (part b is on §2.2). Rainfall amounts \(X_1,\dots,X_n\) are iid with \(\E[X_i]=2\theta\) and \(\Var[X_i]=2\theta^2\). The estimator is \(\hat\theta=\frac1{2n}\sum_{i=1}^nX_i\). Then \(\E[\hat\theta]=\frac1{2n}\cdot n\cdot2\theta=\theta\) and \(\Var[\hat\theta]=\frac1{(2n)^2}\cdot n\cdot2\theta^2=\frac{\theta^2}{2n}\).
(c) Use the clt to approximate the distribution of \(\hat\theta\) by a Gaussian, and approximate \(\P(|\hat\theta-\theta|\ge\varepsilon)\) in terms of \(\Phi\). Answer: \(\hat\theta\) is \(\frac12\bar X_n\), so its standardisation equals \(Z_n\) for the \(X_i\): \(\frac{\hat\theta-\theta}{\sqrt{\Var[\hat\theta]}}=\frac{\hat\theta-\theta}{\theta/\sqrt{2n}}\xrightarrow d\mathcal N(0,1)\). Hence \(\hat\theta\approx\mathcal N(\theta,\frac{\theta^2}{2n})\) and
\[\P(|\hat\theta-\theta|\ge\varepsilon)=\P\Bigl(\Bigl|\frac{\hat\theta-\theta}{\theta/\sqrt{2n}}\Bigr|\ge\frac{\varepsilon\sqrt{2n}}\theta\Bigr)\approx2\Phi\Bigl(-\frac{\sqrt{2n}\,\varepsilon}\theta\Bigr).\](d) Compare (b) and (c). Answer: Chebyshev gives a guaranteed bound \(\frac{\theta^2}{2n\varepsilon^2}\) that uses only the variance and decays like \(\frac1n\). The clt gives an approximation that decays exponentially fast in \(n\) (roughly like \(e^{-n\varepsilon^2/\theta^2}\), because \(\Phi(-a)\) behaves like \(e^{-a^2/2}\)). Guaranteed but loose versus sharp but approximate.
The official (d) calls the clt result "stricter". Careful wording: it is not a bound at all, so it cannot be "stricter" in the sense of a guarantee — it is sharper as an estimate. Otherwise correct.
SoSe 2026, Problem 1d — in probability implies in distribution SoSe26 · P1d · 1 credit
Statement. Let \(X_1,X_2,\dots\) be random variables on a common probability space and \(c\in\R\). If \(X_n\xrightarrow\P c\), then \(X_n\xrightarrow dc\). Official: True (Remark 2.57: in probability ⟹ in distribution). Correct. For a constant limit the converse also holds.
SoSe 2026, Problem 2a — convergence does not carry expectations along SoSe26 · P2a · 3 credits
Statement. \(X_n\xrightarrow dX\) on a common probability space, and all expectations \(\E[X_n]\), \(\E[X]\) exist and are finite ⟹ \(\lim_n\E[X_n]=\E[X]\)?
Official answer: False. Let \(U\sim\Unif(0,1)\), \(X_n:=n\one_{\{U\le1/n\}}\) and \(X:=0\). Then \(\P(X_n=n)=\frac1n\) and \(\P(X_n=0)=1-\frac1n\). For every \(\varepsilon>0\) and \(n\ge\varepsilon\), \(\P(|X_n|\ge\varepsilon)=\frac1n\to0\). So \(X_n\xrightarrow\P0\), and therefore \(X_n\xrightarrow d0\) (Remark 2.57). But \(\E[X_n]=n\cdot\frac1n+0=1\) for every \(n\), while \(\E[X]=0\). Correct.
The probability \(\frac1n\) sits on the ever larger value \(n\): rare but huge values keep the mean at 1. In fact \(X_n(\omega)\to0\) for every \(\omega\) with \(U(\omega)>0\), so even almost sure convergence does not help. This is the "escaping mass" phenomenon of B4, where the dominated convergence theorem says which extra assumption fixes it.
SoSe 2026, Problem 4d (clt part) — approximating \(\P(|Z_n|\ge a)\) SoSe26 · P4d
Setting. \(X_1,X_2,\dots\) iid with \(\P(X_j=1)=\P(X_j=-1)=\frac12\), and \(Z_n=\frac1{\sqrt n}\sum_{j=1}^nX_j\). For \(a>0\), use the clt to approximate \(\P(|Z_n|\ge a)\). (The Markov bound \(1/a^2\) is on §2.2.)
Answer. Each \(X_j\) has \(\mu=\frac12\cdot1+\frac12\cdot(-1)=0\) and \(\sigma^2=\E[X_j^2]-0^2=1\). So \(Z_n=\frac{S_n-n\cdot0}{1\cdot\sqrt n}\) is exactly the standardised sum of Theorem 2.64, and \(Z_n\xrightarrow d\mathcal N(0,1)\). Hence, for large \(n\), \(\P(|Z_n|\ge a)\approx2(1-\Phi(a))=2\Phi(-a)\). The official solution is correct.
For \(a=2\): the clt gives \(2(1-0.977)\approx0.046\), while the Markov bound gives only \(\frac14=0.25\).
Summary sheet
Definitions (learn them word for word — they are examined)
Setup: \((X_n)_{n\in\N}\) and \(X\) real random variables on the same probability space \((\Omega,\Aa,\P)\).
- in probability
- \(\forall\varepsilon>0:\ \P(|X_n-X|\ge\varepsilon)\to0\)
- almost surely
- \(\P(\{\omega:X_n(\omega)\to X(\omega)\})=1\)
- in distribution
- \(F_{X_n}(x)\to F_X(x)\) at every continuity point \(x\) of \(F_X\) (⟺ cfs converge)
- relations
- a.s. ⟹ P ⟹ d; d to a constant ⟹ P; P ⟹ a.s. along a subsequence
Theorems
- wlln
- identically distributed, finite mean (and variance), pairwise uncorrelated: \(\bar X_n\xrightarrow\P\mu\)
- slln
- iid, finite mean: \(\bar X_n\xrightarrow{\text{a.s.}}\mu\)
- clt
- iid, finite mean, finite variance \(>0\): \(\frac{\bar X_n-\mu}{\sigma/\sqrt n}\xrightarrow d\mathcal N(0,1)\)
- approximation
- \(\P(S_n\le s)\approx\Phi\bigl(\frac{s-n\mu}{\sigma\sqrt n}\bigr)\); standard error \(\sigma/\sqrt n\)
Counterexamples to know
- P but not a.s.: the travelling bump (Example 2.58).
- d but not P: \(X_n=U\), \(Y=1-U\) (Example 2.59).
- Convergence without convergence of means: \(n\one_{\{U\le1/n\}}\) (SoSe26 P2a).
- lln fails without independence: \(X_i=X_1\) (WiSe25 P1d); lln fails without a mean: Cauchy.
Traps
- "\(\bar X_n\xrightarrow d\mathcal N(\mu,\sigma^2/n)\)" is wrong notation: the limit cannot depend on \(n\).
- Forgetting "iid", "finite variance", "non-zero variance" or "same probability space" costs points.
- The clt gives approximations, Chebyshev gives bounds.
Exam focus
WiSe25 and SoSe25: one definition (a.s. or in distribution, 3 credits) and one theorem statement (slln or clt, 3 credits). True/false items on the relations or on missing assumptions (WiSe25 P1d, SoSe26 P1d, P2a), and a "Chebyshev versus clt" computation (WiSe25 P4, SoSe26 P4, Sheet 9 Ex 1–2).
Self-test
Section 3.1 · Lecture 10 or later (the script marks no lecture numbers after Lecture 9)
Statistical models and basic concepts
Statistische Modelle und Grundbegriffe
What this page covers Script Ch. 3 intro and §3.1, pp. 84–92
This is the entry page of Part 3, statistical inference [statistische Inferenz]. It covers the chapter introduction (Overview 3.1, Example 3.2, Overview 3.3) and then all of §3.1, from Definition 3.4 to Remark 3.16, including the unnumbered remark on "inference" in statistics versus machine learning. The script's section goal: "Introduce the fundamental concepts of statistical inference, including statistical models, statistics, parameters of interest, and parameter identifiability."
The page has four parts: (1) what statistics wants and how it differs from probability; (2) the statistical model — the list of distributions we consider possible; (3) statistics (numbers computed from data), parameters of interest and identifiability; (4) the likelihood function, the bridge from data back to parameters.
Worked in place: the identifiability part of SoSe26 P5a (randomized response), solved again with Definition 3.11 (the conditional-probability side is on §1.4). From the sheets: the likelihood of Sheet 10 Ex 2(i) (the mle parts (ii)–(iii) are on §3.2) and Sheet 10 Ex 5(i)–(ii) (toaster box: distribution and statistical model; the estimator part (iii) is on §3.2). The true/false and definition problems of all three old exams were checked: none asks about §3.1 alone. SoSe25 P1b and SoSe26 P1e are on §3.2 and SoSe25 P1c on §3.3.
The big picture
Probability (Parts 1 and 2 of this course) works in one direction. Someone hands you the model — "this coin shows heads with probability \(p=0.5\)" — and you compute how likely various data are. Statistics works in the opposite direction. Someone hands you data — "I tossed this coin 10 times and got 7 heads" — and you ask which model produced it.
Numbers (my example). Write \(K\) for the number of heads in 10 independent tosses of a coin with heads probability \(p\). Then \(K\sim\Bin(10,p)\) (binomial distribution, §1.2), which means \[\P(K=k)=\binom{10}{k}p^k(1-p)^{10-k},\qquad k=0,1,\dots,10 .\] Here \(\binom{10}{k}\) ("10 choose \(k\)") counts the orders in which \(k\) heads can appear among 10 tosses (B3); \(\binom{10}{7}=120\).
- Probability direction (\(p\) fixed, data vary). Take \(p=0.5\). Then \(\P(K=7)=120\cdot0.5^{10}=\frac{120}{1024}\approx0.117\). Doing this for every \(k=0,\dots,10\) gives a table of 11 probabilities that add up to 1: the distribution of the data.
- Statistics direction (data fixed, \(p\) varies). We saw \(k=7\). Keep 7 fixed and try different
\(p\):
The value \(p=0.7\) makes the observed data most probable. A fair coin (\(p=0.5\)) is less good at explaining "7 of 10", but far from impossible. \(p=0.3\) explains the data badly. This function of \(p\) is the likelihood (Definition 3.13 below).
\(p\) 0.3 0.5 0.6 0.7 0.8 0.9 \(120\,p^7(1-p)^3\) 0.009 0.117 0.215 0.267 0.201 0.057
Same formula, read in two directions. Everything in Part 3 is about the second reading: which parameter values fit the data (estimation, §3.2), is a specific value like \(p=0.5\) believable (testing, §3.3), and what range of values is plausible (interval estimation, §3.4). Before any of that we need a precise language: what the "possible models" are (statistical model), what we compute from data (statistic), what we want to learn (parameter of interest), whether the data can reveal it at all (identifiability), and how well a parameter fits the data (likelihood).
In words: probability goes from a known model to probabilities of data; statistics goes from observed data back to an unknown model. This page sets up the vocabulary for the way back.
Primer: what you need from earlier My addition
Cross-references
The natural logarithm and its rules: Analysis 5.2. Maxima of a function: Analysis 7.1. Injective maps and inverses: Analysis 5.1 and B2. Indexed families \((A_i)_{i\in I}\): B2. σ-algebras and measurable spaces: §1.1, §1.1. Measurable functions: B4. Named distributions: §1.2 (discrete) and §1.3 (continuous). Product spaces: §1.4. Independence: §1.4. Sample mean and the law of large numbers: §2.4.
0. Words and symbols used on this page
- Measurable space \((\Omega,\Aa)\): \(\Omega\) is the set of possible outcomes; \(\Aa\) is a σ-algebra on \(\Omega\) — the collection of subsets ("events") we are allowed to give probabilities to (§1.1). \(\pow(\Omega)\) is the power set, the collection of all subsets; it is used when \(\Omega\) is finite or countable. \(\mathcal B\) is the Borel σ-algebra on \(\R\) (generated by the intervals), used when \(\Omega=\R\); \(\mathcal B^n\) is its version on \(\R^n\). \(\mathcal B|_\Omega\) means "the Borel sets that lie inside \(\Omega\)".
- Probability distribution (probability measure) \(\P\) on \((\Omega,\Aa)\): a rule that gives each event \(A\in\Aa\) a number \(\P(A)\in[0,1]\), with \(\P(\Omega)=1\) and additivity over disjoint events (§1.1).
- pmf and pdf. For a discrete distribution the pmf (probability mass function) is \(p(x)=\P(X=x)\). For a continuous one the pdf (density [Dichte]) \(p(x)\) satisfies \(\P(a\le X\le b)=\int_a^bp(x)\,\mathrm dx\) (§1.3).
- Named distributions: \(\Ber(p)\) — 1 with probability \(p\), else 0; its pmf can be written \(p^x(1-p)^{1-x}\) for \(x\in\{0,1\}\) (put in \(x=1\) and \(x=0\) to check). \(\Bin(m,p)\) — number of 1s in \(m\) independent \(\Ber(p)\) trials. \(\Poi(\lambda)\) — counts with mean \(\lambda\). \(\Unif(a,b)\) — uniform on an interval. \(\Exp(\lambda)\) — waiting times, pdf \(\lambda e^{-\lambda x}\) for \(x\ge0\). \(\mathcal N(\mu,\sigma^2)\) — normal with mean \(\mu\) and variance \(\sigma^2\).
- Indexed family \((P_\theta)_{\theta\in\Theta}\): one object \(P_\theta\) for each index \(\theta\) in an index set \(\Theta\) (B2). \(\theta\) is the Greek letter theta, \(\Theta\) its capital.
- \(\R_{>0}\) are the positive reals, \(\R_{\ge0}\) the non-negative reals, \(\N=\{0,1,2,\dots\}\) (the script counts 0 as natural, Convention 1.1), \(\N_{>0}=\{1,2,\dots\}\). \(\R^k\) is the set of lists of \(k\) real numbers.
- iid: independent and identically distributed. RVRV: real-valued random variable (script abbreviation).
- \(\prod_{i=1}^na_i=a_1\cdot a_2\cdots a_n\) (product), \(\sum_{i=1}^na_i=a_1+\dots+a_n\) (sum).
- Injective [injektiv]: a map \(f\) is injective if different inputs always give different outputs: \(a\ne b\Rightarrow f(a)\ne f(b)\). Equivalently \(f(a)=f(b)\Rightarrow a=b\).
1. Logarithm rules used on this page
\(\ln\) is the natural logarithm, defined for positive numbers (Analysis 5.2).
- \(\ln(ab)=\ln a+\ln b\), so \(\ln\prod_ia_i=\sum_i\ln a_i\): products become sums.
- \(\ln(a^r)=r\ln a\), and \(\ln(e^y)=y\).
- \(\ln\) is strictly increasing: \(a<b\Rightarrow\ln a<\ln b\). So \(\ln\) never changes which of two positive numbers is bigger, and a function \(L>0\) and \(\ln L\) have their maxima at the same place.
Example: \(\ln(0.7^7\cdot0.3^3)=7\ln0.7+3\ln0.3\approx7\cdot(-0.357)+3\cdot(-1.204)=-6.109\).
From probability to statistics
Overview 3.1 from probability to statistics Script 3.1
In the previous chapters we assumed that we know the underlying probability distribution (for example \(X\sim\mathcal N(\mu,\sigma^2)\) with known \(\mu\) and \(\sigma^2\)). We then calculated probabilities of events or properties of random variables. This is often called deductive inference [deduktive Inferenz]: moving from general principles (the model) to specific outcomes (probabilities of data).
Statistical inference, in contrast, typically involves inductive inference [induktive Inferenz]: we observe data (samples) and want to make statements or draw conclusions about the underlying — often unknown — probability distribution, or its parameters, that generated the data. We aim to learn from data.
The script's figure, described in words: on the left, a box "general principles, (assumed) ground truth, population"; on the right, a box "specific instances, concrete manifestations, samples / data". An arrow from left to right is labelled "deductive inference (probability)"; an arrow from right to left is labelled "inductive inference (statistics)". Redrawn:
Why the words: deduction draws conclusions that follow with certainty from the premises (if \(p=0.5\), then \(\P(K=7)=0.117\), no doubt about it). Induction generalises from particular cases to a general rule, and can never be certain (7 heads of 10 does not prove anything about \(p\)). This is why statistical answers come with "confidence" and "significance" instead of certainty (Overview 3.3(iv)).
Example 3.2 what we want from statistical inference Script 3.2
The script lists ten questions that statistical inference should help to answer. My short comments (marked mine) say which later page takes up the question, and sometimes do a first rough calculation with tools from Part 2.
- Coin flips. We observe \(n\) coin flips \(x_1,\dots,x_n\in\{0,1\}\) (1 = heads). Questions:
(a) what is the probability \(p\) of heads for this coin? (b) can we say — with confidence? — whether the coin
is fair (\(p=0.5\))? That is, can we test the hypothesis that the coin is fair against the alternative that
it is biased? (c) what is a plausible range of values for \(p\), and how confident are we in that range?
mine These are exactly the three tasks of Part 3: (a) point estimation (§3.2), (b) hypothesis testing (§3.3), (c) interval estimation (§3.4). - Hard drives. A producer of NVMe hard drives signs a contract with Apple promising that at most 1 in
10 000 drives fails within the first year. Apple orders 12 million drives, tracks 112 345 MacBooks sold in the
first months, and receives 15 complaints about failed drives within one year. Can Apple sue?
mine If the promise holds exactly (failure probability \(10^{-4}\)), the expected number of failures among 112 345 drives is \(112\,345\cdot10^{-4}\approx11.2\). With a Poisson approximation (many trials, tiny success probability — Poisson limit theorem, §1.2), seeing 15 or more failures has probability about 0.16 — not rare at all. So these numbers alone are weak evidence. Making this reasoning precise is a test (§3.3). - Bottling machine. A machine for 0.33 l bottles is certified to be precise up to ±2 ml. After selling
345 234 bottles of beer you notice you brewed at least 500 l more than you apparently sold. Is the machine a
major suspect? Would measuring the exact amount in the next 100 bottles help?
mine 500 l = 500 000 ml spread over 345 234 bottles is about 1.45 ml per bottle. That is inside ±2 ml for each single bottle, but a systematic overfill of 1.45 ml on average would be a different claim from "random errors of at most 2 ml around 330 ml". Example 3.5(vii) builds models for this. - Bertrand's paradox (§1.2). Someone drops Mikado sticks "randomly"
on a circle drawn on a table 1000 times to get random chords; 281 land in the favourable region and 719 do not.
Does this tell us whether \(P_1=\frac13\), \(P_2=\frac12\) or \(P_3=\frac14\) is "correct"?
mine The observed fraction is 0.281. If the truth were \(\frac14\), the fraction of 1000 trials would have standard deviation \(\sqrt{0.25\cdot0.75/1000}\approx0.014\) (one trial is \(\Ber(0.25)\) with variance \(0.25\cdot0.75\); averaging 1000 independent trials divides the variance by 1000, and the standard deviation is the square root of the variance — central limit theorem [zentraler Grenzwertsatz], "clt", §2.4: the fraction of successes in many independent trials is approximately normal with this spread), so 0.281 is about 2.3 standard deviations away; from \(\frac13\) it is about 3.5 away, and from \(\frac12\) about 14. The data fit none of the three perfectly — perhaps the physical stick dropping is a fourth way of choosing a chord. The data speak about this experiment, not about which mathematical model is "correct". - Clinical study. 46 participants get a new drug, 234 in the control group get the conventional
treatment. 42 of 46 survive in the treatment group, 201 of 234 in the control group. Should the new drug
replace the old one?
mine Survival rates \(\frac{42}{46}\approx0.913\) versus \(\frac{201}{234}\approx0.859\). Whether a difference of about 5 percentage points with only 46 treated patients could be chance is a testing question (§3.3). - Election survey. On a Thursday morning at Marienplatz 239 people are interviewed; the CSU gets an
approval rate of 79 %. Can we conclude they will get at least 2/3 of the votes in the Bavarian state election
[Landtagswahl] the following Sunday?
mine The main problem is not the sample size but the sample: people at Marienplatz on a Thursday morning are not a random sample of Bavarian voters, and "approval" is not "vote". No formula can repair a sample that does not come from the population the model describes (a mis-specified model, Definition 3.4). - Algorithms. You measure CPU execution times of two algorithms on benchmark tasks on your laptop. Can
we decide whether one is "significantly" faster, or estimate the average difference in execution time?
mine Estimating the difference is §3.2/§3.4; "significantly" is §3.3. - Higgs boson. The discovery paper states: "Clear evidence for the production of a neutral boson with a
measured mass of 126.0 ± 0.4(stat) ± 0.4(sys) GeV is presented. This observation, which has a significance of 5.9
standard deviations, corresponding to a background fluctuation probability of \(1.7\times10^{-9}\), is compatible
with the production and decay of the Standard Model Higgs boson." Have we discovered the Higgs boson or not?
mine "5.9 standard deviations" and "background fluctuation probability" are the language of tests and p-values (a p-value is the probability of data at least as extreme as the data actually seen, computed under the assumption that the claim being tested is true; §3.3); "±0.4" is the language of interval estimates (§3.4). - Gravitational waves. The first LIGO detection paper states (emphasis in the script): "The signal was
observed with a matched-filter signal-to-noise ratio of 24 and a false alarm rate estimated to be less than 1
event per 203 000 years, equivalent to a significance greater than 5.1σ. The source lies at a luminosity distance
of \(410^{+160}_{-180}\) Mpc corresponding to a redshift \(z=0.09^{+0.03}_{-0.04}\). In the source frame, the
initial black hole masses are \(36^{+5}_{-4}M_\odot\) and \(29^{+4}_{-4}M_\odot\) […] All uncertainties define 90 %
credible intervals." What does all that mean?
mine A confidence interval [Konfidenzintervall] is a range computed from the data together with a level such as 90 %, in the sense that the procedure produces a range covering the truth in 90 % of repetitions (§3.4). The Bayesian approach instead treats the unknown parameter itself as random and gives it a distribution; its ranges are called credible intervals (§3.5). The asymmetric ranges like \({}^{+160}_{-180}\) show that the plausible region does not have to be symmetric around the estimate. - Review sentiment. As a data scientist at Amazon you analyse the sentiment of (verified) reviews of
office equipment. Reviews by buyers who self-identify as male are on average 0.21 % more critical than those by
buyers who identify as female, and further tests call the difference statistically significant. What do you
recommend to your manager?
mine "Statistically significant" only means "unlikely to be pure chance"; with enough data even a tiny difference like 0.21 % becomes significant. Whether it matters is a separate question (Overview 3.3(v): the actual numbers play a big role).
The script adds: unfortunately we will not be able to answer all of these questions fully. The goal of the chapter is to give first glimpses of, and pointers to, how statistical inference approaches such questions.
Overview 3.3 how to approach this Script 3.3
Trying to tackle the questions of Example 3.2 brings out the following points.
- We still need modelling assumptions. First of all we must decide what not to model, and what we consider possible. We start from a "collection of possibilities": a statistical model — a set of distributions we deem possible, so that we can then decide how likely each of them is to be the ground truth given the data ("which is most likely?"). We usually assume, implicitly, that the true distribution is inside this collection — even though that itself is unlikely.
- Real models have many moving parts. In reality the statistical model is often built from many components. Think of all the ways "noise" or "randomness" can enter the final observation of the Higgs particle. Introductory examples usually hide this.
- The quantity of interest can be close to or far from the model. The heads probability \(p\) of a coin is literally the one parameter describing the distribution. The measured sentiment of written reviews is a complicated construction on top of the actual (random?) process of people expressing their impressions.
- No final answers. It feels "wrong" to give final answers to most such questions. One is almost forced to speak in "levels of confidence" rather than "certainties".
- The numbers matter. The actual numbers involved (sample sizes, effect sizes, error rates) play a big role.
Point (i) is the reason for Definition 3.4, point (iii) for Definition 3.9 (parameter of interest), and point (iv) for everything in §3.3–§3.4.
Statistical models
Section goal Script §3.1: introduce the fundamental concepts of statistical inference — statistical models, statistics, parameters of interest, and parameter identifiability.
Idea first (mine). In probability we had one probability space \((\Omega,\Aa,\P)\). In statistics we do not know \(\P\). So we write down a whole list of candidate distributions, one for each value of an unknown label \(\theta\) (the parameter), all on the same \((\Omega,\Aa)\). For a coin: "\(\Ber(p)\) for some \(p\) between 0 and 1" is the list \(\{\Ber(0),\dots,\Ber(0.5),\dots,\Ber(1)\}\), labelled by \(p\). The data then help us decide which entry of the list is plausible.
Definition 3.4 statistical model [statistisches Modell] Script 3.4
Let \((\Omega,\Aa)\) be a measurable sample space and \(\Theta\) a non-empty index set, called the parameter space [Parameterraum]. For a family of probability distributions \(\mathcal P_\Theta:=(P_\theta)_{\theta\in\Theta}\) on \((\Omega,\Aa)\), we call \((\Omega,\Aa,\mathcal P_\Theta)\) a statistical model. Often we just call \(\mathcal P_\Theta\) the statistical model, when the sample space and σ-algebra are clear.
- Well-specified / mis-specified. The model is well-specified [korrekt spezifiziert] if there is a \(\theta\in\Theta\) such that \(P_\theta\) is the true distribution of the random experiment; this \(\theta\) is then called the true parameter. In words: the ground truth is inside your space of possibilities. Otherwise the model is mis-specified [fehlspezifiziert].
- Parametric / non-parametric. If \(\Theta\subseteq\R^k\) for some finite \(k\), the model is parametric. Otherwise it is non-parametric. The literature has different explicit definitions of "non-parametric"; a common one is "\(\Theta\) is infinite-dimensional" (for example the set of all continuous distributions). my addition "Infinite-dimensional" means: no fixed, finite list of numbers \((\theta_1,\dots,\theta_k)\) is enough to pin down every member of \(\Theta\) — for example the set of all continuous densities on \(\R\) cannot be described by 2, 10 or a million numbers, whereas every normal distribution is pinned down by the two numbers \((\mu,\sigma^2)\) (dimension is explained in B5, rank and dimension). Broadly, non-parametric models put very few or no restrictions on the distributions considered. This chapter focuses mainly on parametric models.
- Notation. If a random variable \(X\) satisfies \(X\sim P_\theta\) for some \(\theta\in\Theta\), we say \(X\) follows (is distributed according to) \((\Omega,\Aa,\mathcal P_\Theta)\) and write, in abuse of notation, \(X\sim\mathcal P_\Theta\).
Reading each part (mine).
- \((\Omega,\Aa)\) is fixed and known: it says what the data can look like (for a coin: \(\{0,1\}\)).
- \(\Theta\) is the set of labels we consider possible. \(\theta\) may be a single number (\(p\)) or a list of numbers (\((\mu,\sigma^2)\)).
- For each label \(\theta\), \(P_\theta\) is a complete probability distribution on \((\Omega,\Aa)\). If the model is well-specified, at least one of them is the true distribution; we do not know which. It need not be only one label: two different \(\theta\) can name the very same distribution, and then both of them are true parameters. Whether that can happen is exactly the question of identifiability (Definition 3.11 below); Example 3.12 is a model where it does happen.
- "\(X\sim\mathcal P_\Theta\)" is an "abuse of notation" because \(\mathcal P_\Theta\) is a whole family, not a single distribution. It means "\(X\sim P_\theta\) for one \(\theta\) we do not know".
Small example. \(\Omega=\{0,1\}\), \(\Aa=\pow(\{0,1\})\), \(\Theta=[0,1]\), \(P_p=\Ber(p)\). If the coin really has heads probability 0.62, the model is well-specified with true parameter \(p=0.62\). The model \((\Ber(p))_{p\in\{0.5\}}\) ("the coin is fair") is mis-specified for that coin. Both are parametric (\(\Theta\subseteq\R^1\)).
Non-parametric example (mine): "all distributions on \(\R\) that have a density". No finite list of numbers can label all of them, so \(\Theta\) cannot be a subset of any \(\R^k\).
How it is used. Exercises often say "write down an adequate statistical model" (Sheet 10 Ex 5(ii), below): give \(\Omega\), \(\Aa\), and the family \((P_\theta)_{\theta\in\Theta}\) with the parameter space stated explicitly. Exam problems start with "Let \((\R,\mathcal B,\mathcal P_\Theta)\) be a statistical model" (SoSe25 P1b, SoSe26 P1e).
Example 3.5 parametric models Script 3.5
Models for some of the situations in Example 3.2 and elsewhere. In each case: \(\Omega\) = possible values of one observation, \(\Aa\) = its σ-algebra, then the family.
- Coin flips: \(\bigl(\Omega=\{0,1\},\ \Aa=\pow(\{0,1\}),\ (\Ber(p))_{p\in[0,1]}\bigr)\). The parameter space is \(\Theta=[0,1]\), and we write \(p\) for \(\theta\).
- Gender of a consumer, coded 1 for female and 0 for male: again a Bernoulli model \(\bigl(\{0,1\},\pow(\{0,1\}),(\Ber(p))_{p\in[0,1]}\bigr)\).
- Defective screws in bags of 50: the number of defective screws in a bag, modelled binomially, \(\bigl(\{0,\dots,50\},\pow(\{0,\dots,50\}),(\Bin(50,p))_{p\in[0,1]}\bigr)\).
- Call centre: numbers of incoming calls in 20 consecutive 15-minute intervals, modelled by \(\bigl(\N,\pow(\N),(\Poi(\lambda))_{\lambda\in\R_{>0}}\bigr)\). (\(\N\) contains 0: an interval may have no calls.)
- Subway waiting time recorded every day for a year: \(\bigl(\R,\mathcal B,(\Unif(0,\theta))_{\theta\in\R_{>0}}\bigr)\) — the train comes at a uniformly random moment within a maximal waiting time \(\theta\).
- Light bulbs: lifetimes of 2000 newly installed bulbs over 5 years, \(\bigl(\R,\mathcal B,(\Exp(\lambda))_{\lambda\in\R_{>0}}\bigr)\).
- Bottling machine (Example 3.2(iii)). Reading "±2 ml" as a strict bound gives, for example,
\[\bigl(\Omega=[328,332],\ \mathcal B|_\Omega,\ \Unif([328,332])\bigr),\]
where \(|\Theta|=1\): only one distribution is allowed. Then there is nothing to infer about the distribution,
and most interesting questions go back to probability theory, e.g. "what is the probability of overfilling by
500 l within \(n\) bottles?"
Reading "±2 ml" instead as "deviations are (mumble, mumble, clt) normally distributed and stay within 330 ± 2 ml in most cases" gives \[\bigl(\Omega=\R,\ \mathcal B,\ (\mathcal N(330,\sigma^2))_{\sigma^2\in\R_{>0}}\bigr),\] and we try to infer from measurements what \(\sigma^2\) is (or in which range it likely lies) and how that relates to ±2 ml. The parameter space is \(\Theta=\R_{>0}\), the possible variances. This model assumes the average fill is exactly 330 ml. Dropping that assumption: \[\bigl(\Omega=\R,\ \mathcal B,\ (\mathcal N(\mu,\sigma^2))_{(\mu,\sigma^2)\in\R\times\R_{>0}}\bigr),\] with \(\Theta=\R\times\R_{>0}\) containing both mean and variance. Both normal models are "wrong" in that they allow negative amounts or 1 litre, which cannot fit in the bottle — yet they may be useful. The script asks: can you argue for and against the case that they are well-specified?
My answer. Against: strictly, neither normal model can be well-specified: every normal distribution gives positive probability to impossible values (below 0 ml, above the bottle's volume), and the true distribution gives them probability 0. So no \(P_\theta\) equals the truth exactly. The first normal model also fails if the machine is systematically miscalibrated (true mean \(\ne330\)), which the brewer's 500 l suggest. For: the probability a normal distribution with \(\sigma\) of about 1 ml puts on impossible values is astronomically small (330 ml is hundreds of standard deviations from 0), so the model can be "well-specified up to negligible error", which is all we need in practice. The second normal model at least allows a shifted mean. - Image generation by "diffusion". Start from a high-dimensional standard Gaussian
\(\mathcal N(0,\mathbf 1_{n\times n})\) (mean 0, covariance the \(n\times n\) identity matrix, i.e. \(n\) independent
\(\mathcal N(0,1)\) coordinates; identity matrix: B5; Gaussian vectors: §2.3), where \(n\) is large — 3 times the number of pixels, for the colours RGB. This is
transformed by a complex neural net with weights (parameters) \(\theta\in\R^d\), where \(d\) is in the millions or
billions. The final "image distribution" is obtained by (repeated) application of the change-of-variables
formula for densities (§2.3). So images are modelled as \(f_\theta(X)\) for a standard
Gaussian \(X\), where \(f_\theta\) represents the (repeated) application of the net, giving the statistical model
\[\bigl(\Omega=\R^{n\times n},\ \mathcal B^{n\times n},\ (P_{f_\theta(X)})_{\theta\in\R^d}\bigr),\]
where \(P_{f_\theta(X)}\) is the distribution of the random variable \(f_\theta(X)\). Training such a model can be
seen as inferring the parameters \(\theta\in\Theta=\R^d\) that "best explain the observed images in the training
set" (in practice: minimising a loss like the mean squared error [mittlerer quadratischer Fehler] — the
average of the squared differences between what the net produces and what it should produce). The script's author does not think this
justifies the slogan "machine learning / artificial intelligence is just statistics on steroids", but one can
see where it comes from.
My note on notation: the script writes \(X\in\mathcal N(0,\mathbf 1_{n\times n})\) — read "\(X\sim\)". Since the covariance matrix is \(n\times n\), \(X\) is a vector with \(n\) entries, so the natural sample space is \((\R^n,\mathcal B^n)\); the script's \(\R^{n\times n}\) looks like a slip. It changes nothing in the idea. Note this model is still parametric by Definition 3.4: \(d\) is huge but finite. - Other ways to build models. Models can be constrained and defined in many ways. In graphical models one considers all distributions with certain properties with respect to a given graph. In latent variable models one specifies a distribution of hidden ("latent") variables and a conditional distribution of the observed variables given the latent ones; integrating out ("marginalising") the latent variables gives the allowed distributions of the observed variables. There are also autoregressive, hierarchical, generalised linear and many other models; all of them produce a certain set of distributions over the observed variables by defining or constraining mechanisms and assumptions.
Remark (unnumbered) "inference" in statistics versus machine learning Script, after 3.5
- In statistics, inference means learning about unknown quantities — like parameters or properties of distributions — from observed data, typically through estimation and uncertainty quantification. The "inference targets" are properties of the population distribution.
- In machine learning, inference often means applying a trained model to new inputs, i.e. producing new predictions. The "inference targets" are predictions for new inputs, or newly generated outputs (images, text, …) for generative models. Terms like "inference time" (= "test time", "deployment time") and "inference cost" (the cost of making predictions after training) come from this usage.
- This causes confusion: what statisticians call inference amounts to "fitting the model" and "finding the best parameters" — which machine learning calls training. What machine learning calls inference, statistics calls prediction (a word machine learning also uses). So "inference" names different stages of the pipeline in the two fields.
- This shows a key difference: statistics aims to infer properties of an unknown ground truth; machine learning aims to infer predictions on new inputs.
For this course: "inference" always has the statistics meaning — from data to the unknown \(\theta\).
Sheet 10, Exercise 5 — the toaster box: distribution, model, estimator Sheet 10 · Ex 5
Task. A box holds \(n\in\N_{>1}\) toasters (so \(n\ge2\)), of which a fixed number \(d\) are broken. You draw two toasters uniformly at random (without putting the first back). (i) What is the distribution \(P_d\) of the number of broken toasters among the two? (ii) \(d\) is unknown and is to be estimated from this sample of two: write down an adequate statistical model and explain it briefly. (iii) Give an unbiased estimator for \(d\) and justify it.
Relevant tools. Laplace (equally likely) counting: probability = favourable cases / all cases (§1.1); the binomial coefficient \(\binom m2=\frac{m(m-1)}2\) = number of ways to choose 2 objects out of \(m\) when the order does not matter (B3); Definition 3.4 for (ii); Definition 3.6 and the definition of unbiasedness (Definition 3.20(i), §3.2) for (iii). An estimator [Schätzer] is simply a statistic that we use as our guess for the unknown parameter (Definition 3.18, §3.2); it is called unbiased [erwartungstreu] if its expected value equals the true parameter, for every possible value of that parameter.
(i) The distribution. Two drawn toasters contain 0, 1 or 2 broken ones, so the outcome space is \(\Omega=\{0,1,2\}\) with \(\Aa=\pow(\Omega)\). Every unordered pair of toasters is equally likely, and there are \(\binom n2=\frac{n(n-1)}2\) pairs.
- 0 broken: both toasters come from the \(n-d\) working ones: \(\binom{n-d}2=\frac{(n-d)(n-d-1)}2\) pairs. Dividing by \(\frac{n(n-1)}2\) (the factors \(\frac12\) cancel): \(\ p_d(0)=\dfrac{(n-d)(n-d-1)}{n(n-1)}\).
- 2 broken: both from the \(d\) broken ones: \(\binom d2=\frac{d(d-1)}2\) pairs, so \(\ p_d(2)=\dfrac{d(d-1)}{n(n-1)}\).
- 1 broken: one of the \(d\) broken and one of the \(n-d\) working ones: \(d(n-d)\) pairs, so \(\ p_d(1)=\dfrac{d(n-d)}{n(n-1)/2}=\dfrac{2d(n-d)}{n(n-1)}\).
Check that they add up to 1. Numerator sum: \((n-d)(n-d-1)+2d(n-d)+d(d-1)\). Expand: \((n-d)^2-(n-d)+2dn-2d^2+d^2-d = n^2-2nd+d^2-n+d+2dn-2d^2+d^2-d = n^2-n=n(n-1)\). Divided by \(n(n-1)\) this is 1 ✓. (The official solution gets \(p_d(1)\) the other way round, as \(1-p_d(0)-p_d(2)=\frac{2(nd-d^2)}{n(n-1)}\); same result, since \(nd-d^2=d(n-d)\).) This is the hypergeometric distribution with 2 draws (§1.2).
Numbers (mine): \(n=5\), \(d=2\): \(p_2(0)=\frac{3\cdot2}{20}=0.3\), \(p_2(1)=\frac{2\cdot2\cdot3}{20}=0.6\), \(p_2(2)=\frac{2\cdot1}{20}=0.1\); sum 1 ✓.
(ii) An adequate statistical model (official answer, correct): \[\bigl(\{0,1,2\},\ \pow(\{0,1,2\}),\ (P_d)_{d\in\{0,\dots,n\}}\bigr).\] Reading it with Definition 3.4: the sample space \(\{0,1,2\}\) lists what we can observe (0, 1 or 2 broken among the two drawn); the σ-algebra is the power set because the space is finite; the unknown parameter is \(d\), and the parameter space is \(\Theta=\{0,\dots,n\}\) because there cannot be fewer than 0 or more than \(n\) broken toasters. \(n\) is known, so it is part of the model's description, not a parameter. The model is parametric (\(\Theta\subseteq\R^1\)) with a finite parameter space, and it is well-specified as long as the draw really is uniform.
Is \(d\) identifiable (Definition 3.11)? Yes. The mean of the observed count under \(P_d\) is \(0\cdot p_d(0)+1\cdot p_d(1)+2\cdot p_d(2)=\frac{2d(n-d)+2d(d-1)}{n(n-1)}=\frac{2d(n-1)}{n(n-1)}=\frac{2d}n\). If \(P_{d_1}=P_{d_2}\), the means agree, \(\frac{2d_1}n=\frac{2d_2}n\), so \(d_1=d_2\). (This is my addition; the sheet does not ask it.)
The official exercise statement writes \(d\in\{0,\dots,d\}\); that is a typo for \(\{0,\dots,n\}\), which the solution then uses.
(iii) An unbiased estimator. The answer is \(\hat d(\omega)=\frac{\omega n}{2}\): the fraction of broken toasters in the sample, \(\frac\omega2\), scaled up to all \(n\) toasters. Why it is unbiased (its mean is exactly \(d\) for every \(d\)), its variance, and a check of the official solution are worked out on §3.2, Sheet 10 Ex 5, where estimators are introduced.
Statistics and parameters of interest
Idea first (mine). Once data \(x_1,\dots,x_n\) are in, we compute numbers from them: the average, the largest value, the spread. Such a recipe "data in, number out" is a statistic. The one rule: the recipe may use only the data, never the unknown \(\theta\) — otherwise you could not compute it.
Definition 3.6 statistic [Statistik] Script 3.6
Let \((\Omega,\Aa,(P_\theta)_{\theta\in\Theta})\) be a statistical model and \((X_1,\dots,X_n)\) a random sample [Stichprobe], i.e. a random vector on the product space \((\Omega^n,\bigotimes_{i=1}^n\Aa)\). A statistic is a measurable function \[T:\Omega^n\to\R^k\qquad\text{for some }k\in\N_{>0},\] that does not depend on the unknown parameter \(\theta\). Its value \(t=T(x_1,\dots,x_n)\) is computed from a realised data sample \(x=(x_1,\dots,x_n)\). The key property of a statistic is that it is an observable quantity once the data are collected.
Each part (mine).
- \(\Omega^n\) is the set of lists \((x_1,\dots,x_n)\) of \(n\) possible observations; \(\bigotimes_{i=1}^n\Aa\) is the product σ-algebra on it (§1.4). So \((X_1,\dots,X_n)\) is simply "the whole data set before we look at it".
- Capital vs small letters: \(X_i\) is the random variable (before the experiment), \(x_i\) its observed value (after). \(T(X_1,\dots,X_n)\) is a random variable; \(t=T(x_1,\dots,x_n)\) is a number.
- Measurable (B4) is a technical condition that makes \(T(X_1,\dots,X_n)\) a random variable with a distribution. Every formula built from sums, products, max, min and continuous functions is measurable, so in practice you never have to check it.
- \(k\) is the number of outputs: \(k=1\) for "the average", \(k=2\) for "average and variance together".
- Not depending on \(\theta\) is the real content. Counterexample (mine): in the model \((\mathcal N(\mu,1))_{\mu\in\R}\), the quantity \(\bar X_n-\mu\) is not a statistic: to compute it you need the unknown \(\mu\).
Example 3.7 statistics Script 3.7
For a sample \(X_1,\dots,X_n\) of real random variables:
- the sample mean [Stichprobenmittel] \(\bar X_n:=\frac1n\sum_{i=1}^nX_i\) is a statistic;
- the sample variance [Stichprobenvarianz] \(S_n^2:=\frac1{n-1}\sum_{i=1}^n(X_i-\bar X_n)^2\) is a statistic;
- the maximum \(X_{(n)}:=\max(X_1,\dots,X_n)\) is a statistic;
- \(T(X_1,\dots,X_n)=\pi\) (a constant) and \(T(X_1,\dots,X_n)=X_6\) are also statistics.
With numbers (mine). Sheet 10 Ex 1 uses bus waiting times (in minutes) \(x=(4,1,7,12,5,9,10,2)\), so \(n=8\).
- \(\bar x=\frac{4+1+7+12+5+9+10+2}8=\frac{50}8=6.25\).
- Deviations \(x_i-\bar x\): \(-2.25,-5.25,0.75,5.75,-1.25,2.75,3.75,-4.25\). Their squares add up to \(5.0625+27.5625+0.5625+33.0625+1.5625+7.5625+14.0625+18.0625=107.5\). So \(s^2=\frac{107.5}{8-1}\approx15.36\).
- \(x_{(8)}=\max=12\). Also \(x_{(1)}=\min=1\), and the median (middle value of the sorted list \(1,2,4,5,7,9,10,12\): average of the two middle ones) is \(\frac{5+7}2=6\).
- \(T=\pi\) gives 3.14159… whatever the data; \(T=X_6\) gives the sixth value, 9.
Why divide by \(n-1\) in \(S_n^2\) rather than \(n\)? With \(n-1\), the expected value of \(S_n^2\) is exactly the true variance (it is unbiased); this is shown in §3.2. The subscript "\((n)\)" in \(X_{(n)}\) means "the \(n\)-th smallest", i.e. the largest; \(X_{(1)}\) is the smallest. (iv) shows that a statistic does not have to be useful — it only has to be computable from the data. The widget below computes all of these for any list you type.
Remark 3.8 the \(n\) is implicit Script 3.8
A given statistic is only defined for a fixed \(n\) (its domain is \(\Omega^n\)). Usually the number of samples \(n\) is left variable, and we assume we have a version of the statistic for every \(n\). For Example 3.7(i)–(iii) this is straightforward. We then just write \(T\), or \(T_n\) to make the dependence on \(n\) visible. Example 3.7(iv) shows that a statistic in general need not have "a version for every \(n\)". In practice we only consider statistics that have "a natural version for every \(n\)".
Concretely: \(T=X_6\) makes no sense for \(n=5\) data points — there is no sixth one. \(\bar X_n\) has one single formula that works for every \(n\); that is what "natural version for any \(n\)" means. This matters because statements like "\(\bar X_n\to\mu\) as \(n\to\infty\)" (law of large numbers, §2.4) talk about a whole sequence of statistics \(T_1,T_2,T_3,\dots\).
Definition 3.9 parameter of interest Script 3.9
Often we are not interested in the whole parameter \(\theta\in\Theta\), but in a specific function of it. A parameter of interest is a function \(\gamma:\Theta\to\R^k\). The goal of statistical inference is then to make statements about the value \(\gamma(\theta)\).
\(\gamma\) is the Greek letter gamma. Example: a lab only cares about the average fill of the bottling machine, not how much it varies; in the model \((\mathcal N(\mu,\sigma^2))\) it chooses \(\gamma(\mu,\sigma^2)=\mu\). The unknown \(\theta\) goes in, the number we care about comes out. It is the formal version of Overview 3.3(iii).
Example 3.10 parameters of interest in Gaussians Script 3.10
In the Gaussian model \(\bigl(\R,\mathcal B,(\mathcal N(\mu,\sigma^2))_{\mu\in\R,\sigma^2\in\R_{>0}}\bigr)\) with \(\theta=(\theta_1,\theta_2)=(\mu,\sigma^2)\) we might be interested only in
- the mean: \(\gamma(\theta)=\theta_1=\mu\);
- the variance: \(\gamma(\theta)=\theta_2=\sigma^2\);
- the coefficient of variation [Variationskoeffizient]: \(\gamma(\theta)=\sqrt{\theta_2}/\theta_1=\sigma/\mu\).
We will mostly take \(\gamma=\mathrm{id}\) (the identity map, \(\gamma(\theta)=\theta\)): the parameter of interest is all of \(\theta\).
Numbers: for \(\theta=(330,4)\) (mean 330 ml, variance 4 ml², so \(\sigma=2\) ml) the three parameters of interest are 330, 4 and \(2/330\approx0.006\). The coefficient of variation measures spread relative to size. Small detail: \(\sigma/\mu\) is undefined when \(\mu=0\), so strictly this \(\gamma\) is a function on \(\Theta=(\R\setminus\{0\})\times\R_{>0}\).
Identifiability
Idea first (mine). Data can only ever tell us about the distribution that produced them: with more and more data, the frequencies and averages settle at the true distribution's values (law of large numbers, §2.4). So if two different parameter values produce exactly the same distribution, no amount of data can tell them apart. A parameter is identifiable if this never happens.
Tiny example. A friend picks a whole number \(\theta\) and then reports \(X=\theta^2+\) noise, with the noise \(\mathcal N(0,1)\). If \(\theta=3\) or \(\theta=-3\), \(X\sim\mathcal N(9,1)\) in both cases. Even a million reports cannot reveal the sign of \(\theta\). But \(\theta^2\) (and \(|\theta|\)) can be learned.
Definition 3.11 identifiability [Identifizierbarkeit] Script 3.11
A parameter of interest \(\gamma(\theta)\) (which may be the full parameter \(\theta\)) is identifiable in a model \((\Omega,\Aa,\mathcal P_\Theta)\) if for all \(\theta_1,\theta_2\in\Theta\): \[\gamma(\theta_1)\ne\gamma(\theta_2)\ \Longrightarrow\ P_{\theta_1}\ne P_{\theta_2}.\] Equivalently: \(P_{\theta_1}=P_{\theta_2}\ \Longrightarrow\ \gamma(\theta_1)=\gamma(\theta_2)\). If a parameter of interest is not identifiable, it is impossible to determine its value uniquely even with an infinite amount of data, and we call it unidentifiable.
Each part (mine).
- "\(\gamma(\theta_1)\ne\gamma(\theta_2)\Rightarrow P_{\theta_1}\ne P_{\theta_2}\)": whenever two parameters differ in the part we care about, their distributions differ somewhere — so the data can in principle distinguish them.
- Why "equivalently". "\(A\Rightarrow B\)" is logically the same as "not \(B\Rightarrow\) not \(A\)" (the contrapositive). Here not \(B\) is "\(P_{\theta_1}=P_{\theta_2}\)" and not \(A\) is "\(\gamma(\theta_1)=\gamma(\theta_2)\)". The second form is usually easier to prove: assume two distributions are equal and derive that the \(\gamma\)-values are equal.
- Full parameter (\(\gamma=\mathrm{id}\)): \(\theta\) is identifiable exactly when the map \(\theta\mapsto P_\theta\) is injective — different labels, different distributions.
- \(P_{\theta_1}=P_{\theta_2}\) means equality as distributions: \(P_{\theta_1}(A)=P_{\theta_2}(A)\) for every event \(A\). For two pmfs it is enough that they agree at every point. For two densities it is enough that they agree outside a null set [Nullmenge] — a set of total length 0, such as a single point or a finite list of points (B4). Changing a density on such a set changes no integral, hence no probability, hence not the distribution.
Examples (mine).
- Bernoulli, identifiable. In \((\Ber(p))_{p\in[0,1]}\): if \(\Ber(p_1)=\Ber(p_2)\), then in particular they give the event \(\{1\}\) the same probability, so \(p_1=p_2\).
- Normal, identifiable. In \((\mathcal N(\mu,\sigma^2))\): if \(\mathcal N(\mu_1,\sigma_1^2)=\mathcal N(\mu_2,\sigma_2^2)\), then their means and variances agree (the mean and variance are computed from the distribution alone), so \((\mu_1,\sigma_1^2)=(\mu_2,\sigma_2^2)\).
- Not identifiable. In \((\mathcal N(\theta^2,1))_{\theta\in\R}\), \(\theta=3\) and \(\theta=-3\) give the same distribution but \(3\ne-3\). The parameter of interest \(\gamma(\theta)=\theta^2\) is identifiable: equal distributions have equal means, and the mean is \(\theta^2\).
- Over-parametrised Bernoulli. \((\Ber(ab))_{(a,b)\in[0,1]^2}\): \((a,b)=(0.5,0.6)\) and \((0.6,0.5)\) both give \(\Ber(0.3)\). Only the product \(ab\) is identifiable.
How it is used. Exam pattern (SoSe26 P5a, below): compute the distribution of the observation as a function of the parameter, then check whether that function is injective. If it is not, find two parameter values with the same distribution — that is the whole proof of non-identifiability.
Example 3.12 identifiability in Gaussians Script 3.12
Let \(X=A+B\), where \(A\sim\mathcal N(\mu_A,1)\) and \(B\sim\mathcal N(\mu_B,1)\) are independent. Then \(X\) follows the statistical model \(\mathcal P_\Theta=(\mathcal N(\theta_1+\theta_2,2))_{\theta\in\R^2}\) with \(\theta=(\mu_A,\mu_B)\). The parameter \(\theta\) is not identifiable: for example \((1,2)\) and \((2,1)\) give the same distribution of \(X\). But the mean of \(X\), as parameter of interest \(\gamma(\theta)=\mu_A+\mu_B\), is identifiable.
Details supplied by me — the script states the facts
Why \(X\sim\mathcal N(\mu_A+\mu_B,2)\). A sum of independent normal random variables is normal, with the means added and the variances added (Lemma 2.53(v) with \(a=b=1\), §2.3). Means: \(\mu_A+\mu_B\). Variances: \(1+1=2\).
\(\theta\) not identifiable. \(\theta_1=(1,2)\) gives \(\mathcal N(1+2,2)=\mathcal N(3,2)\), and \(\theta_2=(2,1)\) gives \(\mathcal N(2+1,2)=\mathcal N(3,2)\). So \(P_{\theta_1}=P_{\theta_2}\) although \(\theta_1\ne\theta_2\): the condition of Definition 3.11 (with \(\gamma=\mathrm{id}\)) fails. In fact every \(\theta\) on the line \(\mu_A+\mu_B=3\), such as \((0,3)\), \((-10,13)\), \((1.5,1.5)\), gives the same distribution.
\(\gamma(\theta)=\mu_A+\mu_B\) identifiable. Use the second form of Definition 3.11. Suppose \(P_{\theta}=P_{\theta'}\), i.e. \(\mathcal N(\mu_A+\mu_B,2)=\mathcal N(\mu_A'+\mu_B',2)\). Equal distributions have equal means, so \(\mu_A+\mu_B=\mu_A'+\mu_B'\), i.e. \(\gamma(\theta)=\gamma(\theta')\).
In words: if you only see the total \(A+B\), you can learn the total mean, but not how it is split between \(A\) and \(B\). The widget lets you move \((\mu_A,\mu_B)\) and watch the distribution of \(X\) stay put along the line \(\mu_A+\mu_B=\) const.
The likelihood function
Idea first (mine). Take the formula for "the probability (or density) of the data", \(p(x\mid\theta)\). In probability we fix \(\theta\) and let the data \(x\) vary. The likelihood does the opposite: it fixes the observed data \(x\) and lets \(\theta\) vary. It answers "how well does \(\theta\) explain what we saw?" — exactly the table in the big picture.
Definition 3.13 likelihood function [Likelihood-Funktion] Script 3.13
Let \((X_1,\dots,X_n)\) be a random sample from a statistical model \((\Omega,\Aa,\mathcal P_\Theta)\) in which every \(P_\theta\) has a pmf or density \(p_\theta(\cdot)=:p(\cdot\mid\theta)\). Given observed data \(x=(x_1,\dots,x_n)\), the likelihood (function) is \[L(\cdot\mid x):\Theta\to\R_{\ge0},\qquad \theta\mapsto L(\theta\mid x):=p_\theta(x)=p(x\mid\theta)=p(x_1,\dots,x_n\mid\theta).\] If \(X_1,\dots,X_n\) are iid, then \[L(\theta\mid x)=\prod_{i=1}^np(x_i\mid\theta).\] The log-likelihood function is \(\ell(\theta\mid x):=\ln\bigl(L(\theta\mid x)\bigr)\).
Each part (mine).
- \(p(x_1,\dots,x_n\mid\theta)\) is the joint pmf/density of the whole sample under \(P_\theta\), evaluated at the observed values. For discrete data it is literally \(P_\theta(X_1=x_1,\dots,X_n=x_n)\), the probability of seeing exactly these data.
- Why the product for iid data: for independent random variables the joint pmf (density) is the product of the single pmfs (densities) (§1.4); identically distributed means each factor uses the same \(p(\cdot\mid\theta)\).
- The output is \(\ge0\) because pmfs and densities are. It can be larger than 1 for densities (a density is not a probability).
- \(\ell\) is only defined where \(L>0\); where \(L=0\) one sets \(\ell=-\infty\) (my convention; the script does not discuss it).
Example: 10 coin tosses, 7 heads (the big picture). Model \((\Ber(p))_{p\in[0,1]}\), data a sequence \(x_1,\dots,x_{10}\in\{0,1\}\) with seven 1s. With the Bernoulli pmf \(p(x_i\mid p)=p^{x_i}(1-p)^{1-x_i}\): \[L(p\mid x)=\prod_{i=1}^{10}p^{x_i}(1-p)^{1-x_i}=p^{\sum x_i}(1-p)^{10-\sum x_i}=p^7(1-p)^3,\] using \(a^ra^s=a^{r+s}\) to collect the powers. \(\ell(p\mid x)=7\ln p+3\ln(1-p)\). At \(p=0.7\): \(L=0.7^7\cdot0.3^3\approx0.00222\), \(\ell\approx-6.109\).
In the big picture I used \(120\,p^7(1-p)^3\), the probability of the count "7 heads" (any order). Here the data are the sequence, whose probability has no factor 120. The two likelihoods differ by the constant factor 120, which does not depend on \(p\) — so they rank all values of \(p\) the same way and have the same maximiser. Constant factors never matter for likelihood comparisons.
Short example: writing a likelihood Sheet 10 · Ex 2(i)
Task. \(X_1,\dots,X_n\) iid from \((\Exp(\lambda))_{\lambda\in\R_{>0}}\), with pdf \(p(x\mid\lambda)=\lambda e^{-\lambda x}\) for \(x\ge0\). Write down \(L(\lambda\mid x)\) and \(\ell(\lambda\mid x)\).
Solution. iid, so Definition 3.13 gives a product; assume all \(x_i\ge0\) (otherwise a factor is 0 and \(L=0\)): \[L(\lambda\mid x)=\prod_{i=1}^n\lambda e^{-\lambda x_i}=\lambda^n\exp\Bigl(-\lambda\sum_{i=1}^nx_i\Bigr),\] because the \(n\) factors \(\lambda\) give \(\lambda^n\), and \(e^ae^b=e^{a+b}\) turns the product of exponentials into one exponential of the sum. Taking \(\ln\) (primer box 1: \(\ln(ab)=\ln a+\ln b\), \(\ln\lambda^n=n\ln\lambda\), \(\ln e^y=y\)): \[\ell(\lambda\mid x)=n\ln\lambda-\lambda\sum_{i=1}^nx_i .\] This matches the official solution. Parts (ii)–(iii) — finding the \(\lambda\) that maximises \(\ell\) (the maximum likelihood estimator [Maximum-Likelihood-Schätzer], mle) and checking its bias — are worked on §3.2; Ex 1 and Ex 3 of Sheet 10 as well.
Sheet 10 Ex 1(i) is the warning case: for \(\Unif(0,\theta)\) the density \(\frac1\theta\one_{[0,\theta]}(x_i)\) contains an indicator (\(\one_A\) is 1 on \(A\), 0 outside), so \(L(\theta\mid x)=\theta^{-n}\) only when \(\theta\ge\max_ix_i\), and 0 otherwise. For the bus data (max 12) that is \(\theta^{-8}\) for \(\theta\ge12\) and 0 for \(\theta<12\). Forgetting the indicator is the classic mistake.
Remark 3.14 how to interpret the likelihood Script 3.14
- The likelihood measures how "likely" a parameter value \(\theta\) is to have produced the observed data \(x\). It is a function of \(\theta\) (not of \(x\)), and it is defined only for a given set of observations. It does not exist without reference to data; in particular it is not a property of the statistical model alone.
- Maximising \(L(\theta\mid x)\) over \(\theta\) amounts to "finding the model (parameter) that is most likely to have generated the data \(x\)". (This is the maximum likelihood estimator of §3.2.)
- The likelihood function is not a probability density for \(\theta\).
- It is one possible way to get from "given the probability distribution, what can we say about possible observations" (probability theory) to "given observed data, what can we say about the underlying distribution (parameter)" (statistical inference).
- The new (and in principle unnecessary) notation \(p(x\mid\theta)\), and \(L(\theta\mid x)\) or \(\ell(\theta\mid x)\), stresses that we "condition" on the parameter or on the data, respectively, which we treat as fixed. It just highlights what is fixed and what varies.
- Especially for iid random variables the log-likelihood is useful: it turns products into sums and constant pre-factors into constant summands. Since the logarithm is strictly monotonic, optimising \(L(\theta\mid x)\) over \(\theta\) is the same as optimising \(\ell(\theta\mid x)\), and the latter is often more convenient.
(iii) with numbers (mine). A probability density for \(p\in[0,1]\) must have area 1. Compute the area under \(L(p)=120p^7(1-p)^3\) from the big picture. Expand \((1-p)^3=1-3p+3p^2-p^3\) (binomial formula), so \(p^7(1-p)^3=p^7-3p^8+3p^9-p^{10}\), and integrate term by term with \(\int_0^1p^m\,\mathrm dp=\frac1{m+1}\): \[\int_0^1p^7(1-p)^3\,\mathrm dp=\frac18-\frac39+\frac3{10}-\frac1{11}=\frac1{1320},\qquad \int_0^1120\,p^7(1-p)^3\,\mathrm dp=\frac{120}{1320}=\frac1{11}\approx0.091\ne1 .\] (Check of \(\frac1{1320}\): over the common denominator 3960, \(\frac{495-1320+1188-360}{3960}=\frac3{3960}=\frac1{1320}\).) So the likelihood does not integrate to 1 over \(\theta\). Compare: for fixed \(p\), the 11 values \(\P(K=k)\), \(k=0,\dots,10\), do add up to 1 — the likelihood is a pmf in \(x\), not in \(\theta\). The widget "two directions" below shows both sums.
(i) with numbers. "How likely \(\theta\) is to have produced \(x\)" must be read as a comparison: \(L(0.7)/L(0.5)=0.267/0.117\approx2.3\) says the observed data are 2.3 times as probable under \(p=0.7\) as under \(p=0.5\). It does not say "\(p=0.7\) has probability 0.267". In the frequentist view of this course \(\theta\) is not random at all; giving \(\theta\) a probability distribution is the Bayesian approach (§3.5).
(vi), why the maximiser does not change (mine). Let \(L(\theta^*)\ge L(\theta)\) for all \(\theta\) (with \(L>0\)). Because \(\ln\) is increasing, \(\ln L(\theta^*)\ge\ln L(\theta)\) for all \(\theta\): \(\theta^*\) also maximises \(\ell\). Conversely, \(e^y\) is increasing too, so a maximiser of \(\ell\) maximises \(L=e^\ell\). The same argument works for minimisers. Note: the script's text says "minimizing \(L\) … is the same as minimizing \(\ell\)"; that is true, but in context (maximum likelihood) the relevant statement is maximising. I wrote "optimising" above to cover both.
In words: the likelihood is the probability of the data you actually saw, viewed as a function of the unknown parameter. Higher means "explains the data better". It is a score for comparing parameter values, not a probability of the parameter.
Example 3.15 likelihood for a normal distribution Script 3.15
Let \(X_1,\dots,X_n\) be iid \(\mathcal N(\mu,\sigma^2)\), so \(\theta=(\mu,\sigma^2)\). The pdf of a single observation is \[p(x_i\mid\mu,\sigma^2)=(2\pi\sigma^2)^{-1/2}\exp\Bigl(-\frac{(x_i-\mu)^2}{2\sigma^2}\Bigr).\] The likelihood is \[L(\mu,\sigma^2\mid x)=\prod_{i=1}^n(2\pi\sigma^2)^{-1/2}\exp\Bigl(-\frac{(x_i-\mu)^2}{2\sigma^2}\Bigr)=(2\pi\sigma^2)^{-n/2}\exp\Bigl(-\frac1{2\sigma^2}\sum_{i=1}^n(x_i-\mu)^2\Bigr).\] The log-likelihood is \[\ell(\mu,\sigma^2\mid x)=-\frac n2\ln(2\pi)-\frac n2\ln(\sigma^2)-\frac1{2\sigma^2}\sum_{i=1}^n(x_i-\mu)^2 .\]
Every step (mine).
- First equality: Definition 3.13 for iid data (product of the single densities).
- Second equality: the constant factor \((2\pi\sigma^2)^{-1/2}\) appears \(n\) times, giving \(\bigl((2\pi\sigma^2)^{-1/2}\bigr)^n=(2\pi\sigma^2)^{-n/2}\). The exponentials combine by \(e^{a_1}\cdots e^{a_n}=e^{a_1+\dots+a_n}\), and the common factor \(-\frac1{2\sigma^2}\) is pulled out of the sum.
- Log-likelihood: \(\ln\) of a product is the sum of the \(\ln\)s. \(\ln(2\pi\sigma^2)^{-n/2}=-\frac n2\ln(2\pi\sigma^2) =-\frac n2\ln(2\pi)-\frac n2\ln(\sigma^2)\), and \(\ln\) of the exponential is its exponent.
Numbers (mine). Data \(x=(2,4,6)\), \(n=3\), and \(\sigma^2=4\) known. Then \(-\frac32\ln(2\pi)-\frac32\ln4\approx-2.757-2.079=-4.836\), and
- \(\mu=4\): \(\sum(x_i-4)^2=4+0+4=8\), so \(\ell=-4.836-\frac8{8}=-5.836\);
- \(\mu=3\): \(\sum(x_i-3)^2=1+1+9=11\), so \(\ell=-4.836-\frac{11}8=-6.211\); \(\mu=5\) gives the same by symmetry.
Only the last term depends on \(\mu\), and it is largest when the sum of squares \(\sum(x_i-\mu)^2\) is smallest. For this data that happens at \(\mu=4=\bar x\) — the maximum likelihood estimate of \(\mu\) is the sample mean; the general proof is on §3.2. The first preset of the likelihood widget is exactly this data set.
Remark 3.16 revisiting the implicit \(n\) Script 3.16
Our definition of a statistical model contains no \(n\), yet statistics is all about inference from \(n\) observations \(x:=(x_1,\dots,x_n)\) for some \(n\in\N_{>0}\). In practice we mostly consider \(n\) iid real random variables \(X_1,\dots,X_n\). Two viewpoints are possible:
- Viewpoint 1: each \(X_i\) follows (independently) a fixed statistical model \(X_i\sim(\R,\mathcal B,\mathcal P_\Theta)\), and they all share the same true parameter \(\theta\in\Theta\).
- Viewpoint 2: the vector \(X=(X_1,\dots,X_n)\) follows a statistical model \((\R^n,\mathcal B^n,\mathcal P_\Theta)\).
The second is more general in several ways (it need not assume iid), but the first is often more intuitive when we really talk about iid samples — which we will almost all the time. So the script uses the first. Do not be surprised to see \(X\sim\mathcal P_\Theta\) where \(X\) already has \(n\) components.
Coin example in both views: (1) each toss \(X_i\sim(\{0,1\},\pow(\{0,1\}),(\Ber(p))_{p\in[0,1]})\), all with the same \(p\); (2) the whole sequence \(X\in\{0,1\}^{10}\) with the family of distributions on \(\{0,1\}^{10}\) whose pmfs are \(p_p(x)=p^{\sum x_i}(1-p)^{10-\sum x_i}\) — the probability that the ten tosses come out exactly as the list \(x=(x_1,\dots,x_{10})\). The likelihood in Definition 3.13 is this pmf of view (2) evaluated at the data.
Exercise-sheet tasks
The Sheet 10 tasks that start by writing down a statistical model or a likelihood are solved above:
- Sheet 10 · Ex 5 — toaster box, parts (i)–(ii): box after Example 3.5; part (iii) on §3.2.
- Sheet 10 · Ex 2(i) — likelihood and log-likelihood for \(\Exp(\lambda)\) (box after Definition 3.13), with a note on the likelihood of Ex 1(i).
The maximum likelihood parts of Sheet 10 (Ex 1, Ex 2(ii)–(iii), Ex 3) are solved fully on §3.2.
Method to reuse: writing down a model and a likelihood My addition
- Sample space: what values can one observation take? That is \(\Omega\); use \(\pow(\Omega)\) if it is finite or countable, \(\mathcal B\) if it is \(\R\) or an interval.
- Family and parameter space: which distribution type, and which parameter values are possible? State \(\Theta\) explicitly (\([0,1]\), \(\R_{>0}\), \(\{0,\dots,n\}\), …).
- Likelihood: write the pmf/pdf of one observation, including indicator functions for its support; for iid data multiply over \(i=1,\dots,n\).
- Simplify: collect powers (\(\prod\lambda=\lambda^n\)), merge exponentials into one exponential of a sum, and state for which \(\theta\) the likelihood is 0.
- Log-likelihood: take \(\ln\), turning products into sums.
Old-exam tasks
SoSe 2026, Problem 5a — randomized response: identifiability SoSe26 · P5a · 3 credits
Setting. Each survey participant has a sensitive yes/no attribute \(A\sim\Ber(p)\), \(p\in[0,1]\) unknown. We do not observe \(A\). We observe a privacy-protected answer \(Y\in\{0,1\}\): with probability \(r\in(0,1]\) the participant answers truthfully (\(Y=A\)); with probability \(1-r\) the participant flips a fair coin, independently of \(A\), and reports it. \(r\) is known. We observe iid answers \(Y_1,\dots,Y_n\).
Task. Compute \(\P(Y=1)\) in terms of \(p\) and \(r\). Is \(p\) identifiable from the distribution of \(Y\)?
Step 1 — the distribution of \(Y\). By the law of total probability over the two mechanisms (worked step by step on §1.4): \[\P(Y=1)=r\cdot p+(1-r)\cdot\tfrac12=rp+\frac{1-r}2=:q(p).\] \(Y\) takes only the values 0 and 1, so \(Y\sim\Ber(q(p))\).
Step 2 — the statistical model. In the language of Definition 3.4 (viewpoint 1 of Remark 3.16), each answer follows \[\Bigl(\{0,1\},\ \pow(\{0,1\}),\ \bigl(\Ber(q(p))\bigr)_{p\in[0,1]}\Bigr),\qquad q(p)=rp+\tfrac{1-r}2,\ r\text{ fixed and known}.\] The parameter is \(\theta=p\), \(\Theta=[0,1]\), and \(P_p=\Ber(q(p))\).
Step 3 — identifiability via Definition 3.11. We use the second form: assume \(P_{p_1}=P_{p_2}\) and show \(p_1=p_2\).
- \(P_{p_1}=P_{p_2}\) means \(\Ber(q(p_1))=\Ber(q(p_2))\). Two Bernoulli distributions are equal only if they give \(\{1\}\) the same probability, so \(q(p_1)=q(p_2)\).
- Write it out: \(rp_1+\frac{1-r}2=rp_2+\frac{1-r}2\). Subtract \(\frac{1-r}2\) on both sides: \(rp_1=rp_2\).
- Divide by \(r\), which is allowed because \(r>0\): \(p_1=p_2\).
So \(p\mapsto P_p\) is injective: \(p\) is identifiable. In words: different true "yes" rates always produce different answer rates, so the answers carry the information needed to recover \(p\), namely \(p=\bigl(q-\frac{1-r}2\bigr)/r\).
Numbers. \(r=0.5\): \(q(0.2)=0.1+0.25=0.35\) and \(q(0.4)=0.2+0.25=0.45\) — different, as predicted. Recovering: \((0.35-0.25)/0.5=0.2\) ✓.
Why the assumptions matter. If \(r=0\) (excluded by \(r\in(0,1]\)), \(q(p)=\frac12\) for every \(p\): all \(P_p\) are \(\Ber(\frac12)\), and \(p\) is unidentifiable — nobody answers truthfully, so the answers say nothing. If \(r\) were unknown, so that \(\theta=(p,r)\), then \(p\) would not be identifiable either (my extension): \(q=r(p-\frac12)+\frac12\), and \((p,r)=(1,0.2)\) and \((0.75,0.4)\) both give \(q=0.6\), so \(P_{(1,0.2)}=P_{(0.75,0.4)}=\Ber(0.6)\) although \(\gamma(\theta)=p\) differs (1 versus 0.75).
Verification of the official solution: correct. It states \(\P(Y=1)=rp+\frac{1-r}2\) and "since \(r>0\), the map \(p\mapsto q(p)\) is injective on \([0,1]\); thus \(p\) is identifiable". The one step it leaves implicit is why injectivity of \(p\mapsto q(p)\) is the same as injectivity of \(p\mapsto P_p\) (Definition 3.11): because \(\Ber(a)=\Ber(b)\) exactly when \(a=b\). Marking: 1.5 points for \(\P(Y=1)\), 1 for the injectivity argument, 0.5 for the conclusion. Part (b), the maximum likelihood estimator of \(p\), belongs to §3.2.
SoSe25 · P1b (true/false: a weighted average \(\frac13\hat\theta_1+\frac23\hat\theta_2\) of two unbiased estimators is unbiased) uses a statistical model, but it is about estimators, so it is solved on §3.2.
Other exam problems checked for this page. All true/false and definition problems of the three old exams (SoSe25 P1a–d, P2a–b; WiSe25 P1a–d, P2a–b; SoSe26 P1a–e, P2a–d) were read. Apart from SoSe25 P1b (pointer above), none is about statistical models, statistics, identifiability or the likelihood. Two further items live in Part 3 but belong to other pages: SoSe26 P1e (does the mle always have the smallest mean squared error?) on §3.2, and SoSe25 P1c (what a rejected test at level 5 % means) on §3.3. Every mle problem (SoSe25 P4a, WiSe25 P4a, SoSe26 P5b) begins by writing down the likelihood as on this page; the full solutions are on §3.2. Do not read anything into this for future exams: the previous exams asking little about §3.1 directly does not mean the next one will.
Summary sheet
The shift
Probability (deductive): known model → probabilities of data. Statistics (inductive): observed data → unknown model. Tasks: estimate (§3.2), test (§3.3), give ranges (§3.4).
Definitions
- statistical model
- \((\Omega,\Aa,(P_\theta)_{\theta\in\Theta})\): measurable space plus a family of distributions indexed by the parameter space \(\Theta\ne\emptyset\)
- well-/mis-specified
- true distribution is / is not some \(P_\theta\); that \(\theta\) is the true parameter
- parametric
- \(\Theta\subseteq\R^k\), \(k\) finite; otherwise non-parametric (e.g. infinite-dimensional \(\Theta\))
- statistic
- measurable \(T:\Omega^n\to\R^k\) not depending on \(\theta\); observable once data are in
- examples
- \(\bar X_n\), \(S_n^2=\frac1{n-1}\sum(X_i-\bar X_n)^2\), \(X_{(n)}=\max\), even constants; \(\bar X_n-\mu\) is not one
- parameter of interest
- \(\gamma:\Theta\to\R^k\); usually \(\gamma=\mathrm{id}\)
- identifiable
- \(P_{\theta_1}=P_{\theta_2}\Rightarrow\gamma(\theta_1)=\gamma(\theta_2)\); for \(\gamma=\mathrm{id}\): \(\theta\mapsto P_\theta\) injective
- likelihood
- \(L(\theta\mid x)=p(x\mid\theta)\), iid: \(\prod_ip(x_i\mid\theta)\); log-likelihood \(\ell=\ln L\)
Formulas
- Bernoulli
- \(L(p\mid x)=p^{\sum x_i}(1-p)^{n-\sum x_i}\)
- Exponential
- \(L=\lambda^ne^{-\lambda\sum x_i}\), \(\ell=n\ln\lambda-\lambda\sum x_i\)
- Normal
- \(\ell=-\frac n2\ln(2\pi)-\frac n2\ln\sigma^2-\frac1{2\sigma^2}\sum(x_i-\mu)^2\)
- Uniform(0, θ)
- \(L=\theta^{-n}\) for \(\theta\ge\max x_i\), else 0 (keep the indicator!)
Key facts and traps
- The likelihood is a function of \(\theta\) for fixed data; it is not a density for \(\theta\) (area \(\frac1{11}\) in the 7-of-10 example).
- \(\ln\) is strictly increasing: \(L\) and \(\ell\) have the same maximiser; constant factors do not matter.
- Non-identifiable: two parameters, same distribution — no amount of data separates them (\(X=A+B\): only \(\mu_A+\mu_B\) is learnable).
- To prove identifiability: assume \(P_{\theta_1}=P_{\theta_2}\), derive \(\gamma(\theta_1)=\gamma(\theta_2)\). To disprove: exhibit two parameters with the same distribution.
Exam focus
SoSe26 P5a: compute the distribution of the observation and check injectivity of the parameter map (3 credits). SoSe25 P1b: linear combinations with weights summing to 1 keep unbiasedness. Every mle problem (SoSe25 P4a, WiSe25 P4a, SoSe26 P5b, Sheet 10) starts by writing the likelihood correctly — that step is this page.
Self-test
Section 3.2 · Lectures 10–12 (the exact lecture is unknown: the script marks no lecture numbers after Lecture 9)
Point estimation
Punktschätzung
What this page covers Script §3.2, pp. 92–99
Everything from Convention 3.17 to Overview 3.32. The script states the goal of the section like this: "One common goal of statistical inference is to provide a single 'best guess' for an unknown parameter of interest based on the observed data. This guess is called a point estimate."
There are three parts: (1) what an estimator [Schätzer] is (Definition 3.18, Example 3.19); (2) how to judge whether an estimator is good — bias, consistency, variance, mean squared error, asymptotic normality, efficiency (Definition 3.20 and Examples 3.21–3.25); (3) a general recipe for building estimators, the maximum likelihood estimator (Definition 3.27 to Example 3.31), and an outlook (Overview 3.32).
Worked in place: Sheet 10 Ex 1, 2, 3, 5 (Sheet 10 Ex 4 is on §2.2 and is linked where it fits; Sheet 9 has no estimation exercise), and the old-exam tasks SoSe25 P1b, P4a, P4b, P4c, WiSe25 P4a–d (estimation side), WiSe25 P5b, P5c, SoSe26 P1e, P5b, P5c. Every old exam so far had a "derive the mle" task worth about 3–4 credits; that does not guarantee the next one will.
The big picture
You wait for the subway every morning. The train comes at regular intervals, but you do not know the interval length \(\theta\) (in minutes). Arriving at a random moment, your waiting time is somewhere between 0 and \(\theta\), each value equally likely: a uniform distribution \(\Unif(0,\theta)\). On eight days you write down your waiting times (these are the numbers used in Sheet 10 Ex 1):
\[ x=(4,\ 1,\ 7,\ 12,\ 5,\ 9,\ 10,\ 2). \]What is your single best guess for \(\theta\)? Three reasonable answers (my numbers):
- Twice the average. The average waiting time of \(\Unif(0,\theta)\) is \(\frac\theta2\) (the middle of the interval). The average of the data is \(\frac{4+1+7+12+5+9+10+2}{8}=\frac{50}8=6.25\). So guess \(2\cdot6.25=12.5\).
- The largest value. You waited 12 minutes once, so \(\theta\ge12\) for sure. Guess \(12\).
- The largest value, a bit enlarged. The largest of 8 draws usually lies a little below \(\theta\). Correct for that: \(\frac{8+1}8\cdot12=13.5\).
Each rule is an estimator: a recipe that turns the data into a number. The number it produces for your particular data (12.5, 12 or 13.5) is an estimate. This page answers two questions:
- How do we compare estimators? An estimator is itself random (other days give other data). We ask: is it right on average (bias)? How much does it scatter (variance)? How far off is it on average, in squared distance (mean squared error)? Does it become exact with lots of data (consistency)? For the subway, the third rule turns out best among the three (Example 3.24).
- Is there a general recipe? Yes: choose the parameter value under which the observed data would have been most probable — the maximum likelihood estimator (mle). For the subway it gives the second rule, 12.
In words: an estimator is a formula that guesses an unknown parameter from data. We judge it by how its guesses are spread around the truth over many imagined repetitions of the experiment, and maximum likelihood is the standard way to find a good formula.
Primer My addition
Cross-references
Derivatives: Analysis 6.2; rules (product, chain): Analysis 6.3; the logarithm: Analysis 5.2; extrema: Analysis 7.1; monotonicity from the sign of \(f'\): Analysis 7.3; second derivatives: Analysis 7.5; partial derivatives: Analysis 11.2; improper integrals: Analysis 9.1. Statistical models, statistics, likelihood: §3.1. Expectation and variance: §2.1, §2.1; table of means and variances: §2.1. Convergence in probability, lln, clt: §2.4, §2.4, §2.4. Chebyshev and Markov: §2.2, §2.2.
0. Words and symbols from §3.1 used on this page
- Statistical model [statistisches Modell] \((\Omega,\Aa,\mathcal P_\Theta)\) (Definition 3.4, §3.1): a set \(\Omega\) of possible observations, a collection \(\Aa\) of events, and a whole family of probability distributions \(\mathcal P_\Theta=(\P_\theta)_{\theta\in\Theta}\), one for each value of a parameter \(\theta\). \(\Theta\) (capital theta) is the parameter space, the set of allowed values. Example: \((\R,\mathcal B,(\Unif(0,\theta))_{\theta>0})\) for the subway, with \(\Theta=\R_{>0}=(0,\infty)\).
- True parameter: the value \(\theta\) whose distribution \(\P_\theta\) really generated the data. It is unknown; estimating it is the whole point.
- Sample: random variables \(X_1,\dots,X_n\), usually iid (independent and identically distributed, §1.4) with distribution \(\P_\theta\). The observed data (realisation) are the numbers \(x=(x_1,\dots,x_n)\) that actually came out. Capital letters = random, small letters = observed numbers.
- Statistic [Statistik] (Definition 3.6): any function \(T(X_1,\dots,X_n)\) of the sample that can be computed without knowing \(\theta\). Examples: the sample mean \(\bar X_n=\frac1n\sum_{i=1}^nX_i\), the maximum \(X_{(n)}=\max\{X_1,\dots,X_n\}\) (also written \(X_{\max}\)).
- Parameter of interest \(\gamma(\theta)\) (Definition 3.9): the part or function of \(\theta\) we care about, e.g. only the mean \(\mu\) of a normal distribution \(\mathcal N(\mu,\sigma^2)\).
- Identifiable (Definition 3.11): different values of \(\gamma(\theta)\) give different distributions — so infinitely much data would pin \(\gamma(\theta)\) down. If two parameter values give the same distribution, no estimator can tell them apart.
- Likelihood [Likelihood] (Definition 3.13): for fixed observed data \(x\), the function \(L(\theta\mid x)=p(x_1,\dots,x_n\mid\theta)\) of \(\theta\), where \(p(\cdot\mid\theta)\) is the pmf (discrete case) or pdf (continuous case) under \(\P_\theta\). For iid data \(L(\theta\mid x)=\prod_{i=1}^np(x_i\mid\theta)\) (the symbol \(\prod\) means "product of"). The log-likelihood is \(\ell(\theta\mid x)=\ln L(\theta\mid x)\).
- \(\E_\theta\), \(\Var_\theta\), \(\P_\theta\): expectation, variance, probability computed when \(\theta\) is the true parameter. The script usually drops the index \(\theta\).
- Indicator \(\one_A(x)\) (the script writes \(\chi_A\)): equals 1 if \(x\in A\) and 0 otherwise. A product of indicators is the indicator of the intersection, \(\one_A\one_B=\one_{A\cap B}\) (B2).
1. Finding the maximum of a function with calculus
Maximum likelihood means: find the \(\theta\) where a function is largest. School calculus is the tool.
- Derivative \(f'(t)\): the slope of the graph of \(f\) at \(t\) (Analysis 6.2). Rules used here: \((t^k)'=kt^{k-1}\); \((\ln t)'=\frac1t\) for \(t>0\); \((\frac1t)'=-\frac1{t^2}\); constants in front stay; the derivative of a sum is the sum of the derivatives (Analysis 6.3).
- At an interior maximum the slope is 0. If \(f\) is differentiable and has its largest value at a point \(t^*\) inside an open interval, then \(f'(t^*)=0\) (Analysis 7.1). Reason: to the left of the peak the graph cannot go down towards the peak, to the right it cannot go up, so the tangent is flat. Points with \(f'=0\) are called critical points.
- \(f'=0\) is not enough. A critical point can also be a minimum or a flat step. Two checks:
- Second-derivative check (Analysis 7.5): if \(f'(t^*)=0\) and \(f''(t^*)<0\) (the slope is decreasing — the graph bends downwards), then \(t^*\) is a local maximum.
- Sign check (Analysis 7.3): if \(f'(t)>0\) for all \(t<t^*\) and \(f'(t)<0\) for all \(t>t^*\), then \(f\) increases up to \(t^*\) and decreases afterwards, so \(t^*\) is the global maximum (the largest value overall). This is the stronger statement and the one we really need.
- Maxima at the edge or at a jump. If the function is not differentiable everywhere (the uniform likelihood jumps), or the maximum sits at the boundary of the allowed interval, \(f'=0\) finds nothing. Then argue directly with "increasing" or "decreasing" (Sheet 10 Ex 1 and 3).
- Several parameters. For \(f(\mu,v)\), the partial derivative \(\frac{\partial f}{\partial\mu}\) is the ordinary derivative in \(\mu\) with \(v\) held fixed (Analysis 11.2). The gradient \(\nabla f\) is the vector of all partial derivatives; at an interior maximum it is the zero vector.
Tiny example. \(f(t)=6t-t^2\). \(f'(t)=6-2t=0\) gives \(t^*=3\). \(f''(t)=-2<0\): maximum. Sign check: \(f'(t)>0\) for \(t<3\) and \(<0\) for \(t>3\), so it is the global maximum, \(f(3)=9\).
2. Why we take the logarithm of the likelihood
The natural logarithm \(\ln\) is defined for positive numbers (Analysis 5.2). Three properties do all the work:
- Products become sums: \(\ln(ab)=\ln a+\ln b\), hence \(\ln\prod_{i=1}^na_i=\sum_{i=1}^n\ln a_i\). Differentiating a sum term by term is much easier than differentiating a product of \(n\) factors.
- Powers and exponentials simplify: \(\ln(a^k)=k\ln a\) and \(\ln(e^{s})=s\).
- \(\ln\) is strictly increasing: \(a<b\Rightarrow\ln a<\ln b\). So \(L(\theta_1\mid x)<L(\theta_2\mid x)\) exactly when \(\ell(\theta_1\mid x)<\ell(\theta_2\mid x)\): the two functions go up and down at the same places and have their maximum at the same \(\theta\). (The maximum value differs; the location does not, and the location is all we want.)
Example. Three coin tosses give 1, 0, 1. Under \(\Ber(p)\), \(L(p)=p\cdot(1-p)\cdot p=p^2(1-p)\) and \(\ell(p)=2\ln p+\ln(1-p)\). At \(p=\frac23\): \(L=\frac49\cdot\frac13=\frac4{27}\approx0.148\) and \(\ell=\ln0.148\approx-1.91\). Both are largest at \(p=\frac23\) (derivation in Example 3.29(i) below).
Caution: \(\ln\) needs positive input. Where \(L(\theta\mid x)=0\) the logarithm is undefined (\(-\infty\)); such \(\theta\) are never the maximum anyway, but they must be excluded first (Sheet 10 Ex 1, 3).
3. Facts about expectation and variance used on this page
- Linearity: \(\E[aX+bY+c]=a\E[X]+b\E[Y]+c\) (§2.1).
- Variance \(\Var[X]=\E[(X-\E[X])^2]=\E[X^2]-(\E[X])^2\); \(\Var[aX+c]=a^2\Var[X]\); for independent \(X_i\): \(\Var[\sum X_i]=\sum\Var[X_i]\) (§2.1). Consequence for iid with variance \(\sigma^2\): \(\Var[\bar X_n]=\frac{\sigma^2}n\).
- Expectation of a function (LOTUS): \(\E[g(X)]=\int g(t)\,p_X(t)\,\mathrm dt\) for a density \(p_X\).
- Named distributions (§2.1): \(\Ber(p)\): mean \(p\), variance \(p(1-p)\); \(\Poi(\lambda)\): mean and variance \(\lambda\); \(\Exp(\lambda)\) (density \(\lambda e^{-\lambda x}\), \(x\ge0\)): mean \(\frac1\lambda\), variance \(\frac1{\lambda^2}\); \(\Unif(0,\theta)\): mean \(\frac\theta2\), variance \(\frac{\theta^2}{12}\); \(\mathcal N(\mu,\sigma^2)\): mean \(\mu\), variance \(\sigma^2\); Gamma \(\Gamma(\alpha,\beta)\) (density \(\frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}\), \(x>0\), §1.3): mean \(\frac\alpha\beta\), variance \(\frac\alpha{\beta^2}\).
- Convergence in probability \(Y_n\xrightarrow{\P}c\): \(\P(|Y_n-c|\ge\varepsilon)\to0\) for every tolerance \(\varepsilon>0\); almost surely: \(Y_n(\omega)\to c\) for all outcomes \(\omega\) outside an event of probability 0 (§2.4); in distribution, \(Y_n\xrightarrow{d}Y\): the cdfs \(F_{Y_n}(x)\to F_Y(x)\) at every \(x\) where \(F_Y\) is continuous (same place). The lln says \(\bar X_n\to\mu\) in both senses for iid data with finite mean; the clt says \(\frac{\bar X_n-\mu}{\sigma/\sqrt n}\) is approximately standard normal for large \(n\).
Estimators and estimates
Convention 3.17 the standing assumptions Script 3.17
Throughout §3.2, \((\Omega,\Aa,\mathcal P_\Theta)\) is a parametric statistical model (the parameter is a list of finitely many numbers, \(\Theta\subseteq\R^k\)) and \(n\in\N_{>0}\) is the number of observations. We call the parameter of interest \(\theta\), but everything also works for a derived parameter of interest \(\gamma(\theta)\). Finally, \(\theta\) (or \(\gamma\)) is assumed to be identifiable.
Why identifiability is assumed: if two values \(\theta_1\ne\theta_2\) gave the same distribution of the data, the data could never distinguish them, and "estimating \(\theta\)" would have no correct answer. Example 3.12 (§3.1): from \(X=A+B\) you can estimate \(\mu_A+\mu_B\), but never \(\mu_A\) alone.
Definition 3.18 estimator and estimate Script 3.18
An estimator [Schätzer] for a parameter of interest \(\gamma\) is a statistic \(\hat\gamma=T(X_1,\dots,X_n)\). An estimate [Schätzwert] is the specific value \(\hat\gamma_{\text{obs}}:=\hat\gamma(x)=T(x_1,\dots,x_n)\) obtained by applying the estimator to a particular realisation \(x\) of the data.
As for statistics in general, we assume the estimator exists for every \(n\), and sometimes write \(\hat\gamma_n\) to show the dependence on \(n\). For the full parameter, \(\gamma(\theta)=\theta\), we write \(\hat\theta\).
Each part explained (mine).
- The hat \(\hat{\ }\) is the universal sign for "an estimate of". \(\hat\theta\) is read "theta hat".
- An estimator is a random variable: it is a function of the random sample \(X_1,\dots,X_n\). This is what makes it possible to talk about its mean, its variance, its distribution.
- An estimate is a number: the estimator evaluated at the data you actually have.
- Being a statistic means: the formula may not contain the unknown \(\theta\). "\(\hat\theta=\theta\)" is not an estimator. Beyond that, any statistic counts as an estimator — also silly ones. Quality is judged afterwards (Definition 3.20).
Example (mine): \(\hat\theta=2\bar X_n\) is an estimator for the subway interval; with the data of the big picture, the estimate is \(\hat\theta_{\text{obs}}=12.5\).
Example 3.19 can I win? Script 3.19
At the yearly CIT graduation celebration you can buy lottery tickets for a TUM hoodie. There are 10 winning tickets. To judge your chances you want the total number of tickets \(N\in\N_{>0}\). You buy a ticket and try to estimate \(N\) from its number.
Model. You draw the ticket yourself, so its number \(X\) is Laplace distributed (uniform on \(\{1,\dots,N\}\), each number with probability \(\frac1N\)): the model is \((\N_{>0},\pow(\N_{>0}),(\Lap[N])_{N\in\N})\) — here \(\pow(\N_{>0})\) is the power set (all subsets) and the parameter space is \(\Theta=\N\). You observe one number \(x\) (so \(n=1\), \(x=x_1\)).
Possible estimators, all valid:
- \(\hat N(X)=X\): just the number you drew. But it seems unlikely you drew the very largest number.
- \(\hat N(X)=X+15\) or \(\hat N(X)=\operatorname{round}(1.2X)\): a bit more than what you drew.
- \(\hat N(X)=2X\): if you expect to have drawn a number "in the middle", double it.
Then you buy two more tickets and have \(x=(x_1,x_2,x_3)\) (assume \(N\) is so large that these are still essentially independent draws from \(\Lap[N]\)). Is \(\hat N(x)=\max\{x_1,x_2,x_3\}\) reasonable? What about \(\max\{x_1,x_2,x_3\}\) + the empirical variance? Or \(\hat N(x)=1000\)? All of these are valid estimates (numbers plugged in) or estimators (random variables plugged in). We need ways to decide which are good.
A first quality check, done with Definition 3.20(i) below. For \(X\sim\Lap[N]\), \(\E[X]=\frac1N(1+2+\dots+N)=\frac1N\cdot\frac{N(N+1)}2=\frac{N+1}2\) (the sum formula \(1+\dots+N=\frac{N(N+1)}2\)). So:
- \(\hat N=X\) has \(\E[\hat N]=\frac{N+1}2\): on average it guesses about half the true value.
- \(\hat N=2X\) has \(\E[\hat N]=N+1\): on average one too many.
- \(\hat N=2X-1\) has \(\E[\hat N]=2\cdot\frac{N+1}2-1=N\): right on average ("unbiased").
- \(\hat N=1000\) is right on average only if \(N=1000\) — useless unless you already know the answer.
- The maximum of three draws is always \(\le N\), so it underestimates on average; the maximum likelihood recipe below nevertheless picks exactly this estimator (\(L(N\mid x)=N^{-3}\) for \(N\ge\max x_i\) and 0 otherwise, which is largest at \(N=\max x_i\) — the same argument as in Sheet 10 Ex 1). The enlarged maximum repairs the bias, like \(\frac{n+1}n X_{(n)}\) in Example 3.24. (This is the famous "German tank problem" of statistics.)
Properties of estimators
Idea first (mine). Imagine repeating the whole experiment many times — new eight mornings of waiting, again and again. Each repetition gives a new estimate. You get a cloud of estimates on the number line, and the true \(\theta\) is somewhere. A good estimator has its cloud centred on \(\theta\) (small bias), narrow (small variance), and — combining both — close to \(\theta\) on average (small mean squared error). With more data, the cloud should shrink onto \(\theta\) (consistency). Think of darts: bias is aiming at the wrong spot, variance is a shaky hand.
Definition 3.20 properties of estimators Script 3.20
Let \(\hat\theta\) be an estimator for the parameter \(\theta\). Its quality can be assessed by several properties.
- Bias [Verzerrung]: \(\operatorname{bias}[\hat\theta]=\E[\hat\theta]-\theta\). The estimator is unbiased [erwartungstreu] if \(\operatorname{bias}[\hat\theta]=0\), i.e. \(\E[\hat\theta]=\theta\), for all \(\theta\in\Theta\). The script asks: what is the expectation over?
- Consistency [Konsistenz]: \(\hat\theta_n\) is consistent if \(\hat\theta_n\xrightarrow{\P}\theta\), and strongly consistent if \(\hat\theta_n\xrightarrow{\text{a.s.}}\theta\).
- Variance: \(\Var[\hat\theta]=\E[(\hat\theta-\E[\hat\theta])^2]\). For a vector parameter \(\theta\) this becomes the covariance matrix \(\Cov[\hat\theta,\hat\theta]\) (the \(k\times k\) table whose entry \((i,j)\) is \(\Cov[\hat\theta_i,\hat\theta_j]=\E[(\hat\theta_i-\E\hat\theta_i)(\hat\theta_j-\E\hat\theta_j)]\); the diagonal holds the variances of the coordinates, §2.1).
- Mean squared error (mse) [mittlerer quadratischer Fehler]: \[ \operatorname{mse}[\hat\theta]=\E[(\hat\theta-\theta)^2]=\Var[\hat\theta]+(\operatorname{bias}[\hat\theta])^2 . \] The equality is the bias–variance decomposition. For a vector parameter, \(\operatorname{mse}[\hat\theta]=\E[\|\hat\theta-\theta\|_2^2]\), where \(\|v\|_2^2=v_1^2+\dots+v_k^2\) is the squared Euclidean length (length of a vector in \(\R^k\) by Pythagoras; more on lengths/norms: Analysis 1.3).
- Asymptotic normality: \(\hat\theta_n\) is asymptotically normal if, properly centred and scaled, its distribution converges to a normal one: there is a quantity \(V(\theta)\), the asymptotic variance, with \[ \sqrt n(\hat\theta_n-\theta)\xrightarrow{d}\mathcal N(0,V(\theta)) . \] This is fundamental for approximate confidence intervals and tests with large samples (§3.3, §3.4), because it means \(\hat\theta_n\) is approximately \(\mathcal N(\theta,V(\theta)/n)\).
- Efficiency [Effizienz]: compares the variances of unbiased estimators. An estimator is a minimum variance unbiased estimator (mvue) if it has the smallest variance among all unbiased estimators.
Each part explained (mine).
- (i) What is the expectation over? Over the random sample. \(\theta\) is fixed (the truth), the data \(X_1,\dots,X_n\) are drawn from \(\P_\theta\), and \(\hat\theta=T(X_1,\dots,X_n)\) is averaged over all possible data sets. Precisely, \(\E[\hat\theta]=\E_\theta[T(X_1,\dots,X_n)]\), which in general depends on \(\theta\). So the bias is a function of \(\theta\), and "unbiased" demands it is zero for every possible true value — because we do not know which one is true. Example: the constant estimator \(\hat\theta=5\) has bias \(5-\theta\), which is 0 only when \(\theta=5\); it is not unbiased.
- (ii) Consistency is a statement about the sequence \(\hat\theta_1,\hat\theta_2,\dots\) as the sample grows: for every tolerance \(\varepsilon>0\), \(\P_\theta(|\hat\theta_n-\theta|\ge\varepsilon)\to0\). Again this must hold for every \(\theta\in\Theta\).
- (iii) Variance measures scatter around the estimator's own mean, not around the truth. A constant estimator has variance 0 and can still be terrible.
- (iv) The mse measures scatter around the truth. It punishes both a wrong centre (bias) and a wide cloud (variance). Its square root has the units of \(\theta\) (the "root mean squared error").
- (vi) Only unbiased estimators compete here; otherwise the constant estimator would always win with variance 0.
Proof of the bias–variance decomposition My proof — the script states it
Write \(m=\E[\hat\theta]\) (a fixed number). Add and subtract \(m\) inside the square:
\[ (\hat\theta-\theta)^2=\bigl((\hat\theta-m)+(m-\theta)\bigr)^2=(\hat\theta-m)^2+2(m-\theta)(\hat\theta-m)+(m-\theta)^2 , \]by the binomial formula \((a+b)^2=a^2+2ab+b^2\). Take expectations and use linearity; \(m-\theta\) is a constant, so it comes out of the expectation:
\[ \E[(\hat\theta-\theta)^2]=\E[(\hat\theta-m)^2]+2(m-\theta)\,\E[\hat\theta-m]+(m-\theta)^2 . \]The first term is \(\Var[\hat\theta]\) by definition (iii). In the middle, \(\E[\hat\theta-m]=\E[\hat\theta]-m=0\). The last term is \((\operatorname{bias}[\hat\theta])^2\) by definition (i). Hence \(\operatorname{mse}=\Var+\operatorname{bias}^2\). ∎
Numbers: an estimator with bias \(0.3\) and variance \(0.16\) has mse \(0.16+0.09=0.25\), i.e. a typical distance of \(\sqrt{0.25}=0.5\) from the truth.
The bias–variance tradeoff, as discussed in the script. The decomposition is often read as an inherent tradeoff. The argument: simple estimators or models (few parameters) often have large bias — they cannot fully capture \(\theta\); they "underfit" the data. Complex estimators or models (many parameters) can bring the bias down, but they increase the variance — they "move more to capture the observations"; they "overfit". This argument is plausible and nicely visualised in polynomial regression, but it does not necessarily hold, so there is no necessary tradeoff. Modern machine learning has shown that even extremely complex, overparameterised models can have low variance. One can reduce bias and variance, and thus the mse, simultaneously. In practice, especially in machine learning, one looks for an estimator that minimises the mse.
A simple case where both go down together: \(\bar X_n\) versus \(X_1\) for the mean. Both are unbiased, but \(\Var[\bar X_n]=\sigma^2/n\) is smaller — more data lowers variance without adding bias. The widget below shows genuine tradeoffs (dividing by \(n\) instead of \(n-1\)) and cases where one estimator wins on both counts.
A test for consistency: mse → 0 My addition — used again and again in exercises
Claim. If \(\operatorname{mse}[\hat\theta_n]\to0\) as \(n\to\infty\) (for every \(\theta\)), then \(\hat\theta_n\) is consistent. In particular: if \(\hat\theta_n\) is unbiased (or its bias tends to 0) and \(\Var[\hat\theta_n]\to0\), it is consistent.
Proof. Fix \(\varepsilon>0\). The event \(|\hat\theta_n-\theta|\ge\varepsilon\) is the same as \((\hat\theta_n-\theta)^2\ge\varepsilon^2\) (both sides are non-negative, so squaring keeps the order). Markov's inequality (§2.2: \(\P(Y\ge a)\le\E[Y]/a\) for \(Y\ge0\), \(a>0\)) with \(Y=(\hat\theta_n-\theta)^2\) gives
\[ \P(|\hat\theta_n-\theta|\ge\varepsilon)\le\frac{\E[(\hat\theta_n-\theta)^2]}{\varepsilon^2}=\frac{\operatorname{mse}[\hat\theta_n]}{\varepsilon^2}\xrightarrow{n\to\infty}0 . \]By the bias–variance decomposition, \(\operatorname{mse}=\Var+\operatorname{bias}^2\to0\) when both parts go to 0. ∎
Warning. "Bias → 0" alone is not enough: \(X_1\) is unbiased for \(\mu\) and not consistent (Example 3.23). The variance must shrink too.
Example 3.21 properties of the sample mean Script 3.21
Setup. \(X_1,\dots,X_n\) are iid real random variables with mean \(\mu\) and finite variance \(\sigma^2>0\). More precisely, \(X_1,\dots,X_n\sim\P_\theta\) iid, where \(\theta=(\mu,\sigma^2,\dots)\in\Theta\) is the true parameter, \(\mu\) is the mean and \(\sigma^2\) the variance of \(\P_\theta\). Neither \(\P_\theta\) nor any other distribution in the model needs to be Gaussian; \(\theta\) may contain further parameters describing other properties. The estimator is \(\hat\mu=\bar X_n=\frac1n\sum X_i\) for the parameter of interest \(\gamma(\theta)=\mu\).
- Unbiased: \(\E[\bar X_n]=\mu\). Reason: linearity, \(\E[\bar X_n]=\frac1n\sum_{i=1}^n\E[X_i]=\frac1n\cdot n\mu=\mu\).
- Strongly consistent: by the wlln and slln, \(\bar X_n\xrightarrow\P\mu\) and \(\bar X_n\xrightarrow{\text{a.s.}}\mu\) (§2.4).
- Variance \(\Var[\bar X_n]=\sigma^2/n\), decreasing in \(n\) — as expected from the clt. Reason: primer box 3, \(\frac1{n^2}\cdot n\sigma^2\).
- mse: since \(\hat\mu\) is unbiased, \(\operatorname{mse}[\bar X_n]=\Var[\bar X_n]=\sigma^2/n\).
- Asymptotically normal with asymptotic variance \(V(\theta)=\sigma^2\), by the clt (§2.4: \(\sqrt n(\bar X_n-\mu)\xrightarrow d\mathcal N(0,\sigma^2)\)).
- Efficiency: \(\bar X_n\) is efficient (an mvue) for Gaussian models, but need not be for other distributions.
For (vi): the counterexample is Example 3.24. For \(\Unif(0,\theta)\), the mean is \(\mu=\frac\theta2\), and \(\frac{n+1}{2n}X_{(n)}\) is also unbiased for \(\mu\) with variance \(\frac14\cdot\frac{\theta^2}{n(n+2)}=\frac{\theta^2}{4n(n+2)}\), which is smaller than \(\Var[\bar X_n]=\frac{\theta^2}{12n}\) for every \(n\ge2\): dividing the two variances gives the factor \(\frac{\theta^2}{4n(n+2)}\big/\frac{\theta^2}{12n}=\frac{12n}{4n(n+2)}=\frac3{n+2}\), which is below 1 exactly when \(n>1\) (it equals \(\frac34\) at \(n=2\) and shrinks to 0 for large \(n\)). Related: among all weighted averages \(\sum_{i=1}^n\lambda_iX_i\) whose weights \(\lambda_i\) sum to 1 — all of them unbiased — the equal weights \(\frac1n\) give the smallest variance. That is Sheet 10 Ex 4, solved on §2.2. Its Jensen argument never uses the sign of the \(\lambda_i\) (the auxiliary random variable there may take negative values), so it covers every linear unbiased estimator, not only the convex combinations (\(\lambda_i\ge0\)) written down on the sheet: \(\bar X_n\) is the best linear unbiased estimator (a blue, Remark 3.26), even when it is not the best unbiased estimator overall.
Example 3.22 the sample variance Script 3.22
\(X_1,\dots,X_n\) iid with mean \(\mu\) and variance \(\sigma^2\). The sample variance [Stichprobenvarianz]
\[ S_n^2=\frac1{n-1}\sum_{i=1}^n(X_i-\bar X_n)^2 \]is an unbiased estimator of \(\sigma^2\): \(\E[S_n^2]=\sigma^2\). Dividing by \(n-1\) instead of \(n\) is called Bessel's correction. The "naive" estimator \(\hat\sigma^2=\frac1n\sum_{i=1}^n(X_i-\bar X_n)^2\) is biased: \(\E[\hat\sigma^2]=\frac{n-1}n\sigma^2<\sigma^2\). Both are consistent estimators of \(\sigma^2\).
Numbers with the subway data (\(n=8\), \(\bar x=6.25\)): the squared deviations \((x_i-6.25)^2\) add up to \(107.5\), so \(s^2=\frac{107.5}7\approx15.36\) and \(\hat\sigma^2=\frac{107.5}8\approx13.44\). Why \(\frac1n\) is too small: the deviations are measured from \(\bar X_n\), which is computed from the same data and therefore sits closer to the data than the true \(\mu\) does. The proof of \(\E[S_n^2]=\sigma^2\) is in Example 3.31(i) below.
Why both are consistent My proof — the script only states it
Step 1. From the identity in Example 3.31(i), divided by \(n\): \(\hat\sigma^2=\frac1n\sum_{i=1}^n(X_i-\mu)^2-(\bar X_n-\mu)^2\).
Step 2. The variables \(Y_i=(X_i-\mu)^2\) are iid with mean \(\E[Y_i]=\Var[X_i]=\sigma^2\). The lln for the \(Y_i\) (iid with finite mean, Theorem 2.62) gives \(\frac1n\sum Y_i\to\sigma^2\) almost surely.
Step 3. The lln for the \(X_i\) gives \(\bar X_n\to\mu\) almost surely, so \((\bar X_n-\mu)^2\to0\) almost surely (square of a sequence tending to 0).
Step 4. Outside a probability-0 event both limits hold at once (the union of two null sets is a null set), so by the ordinary limit rules for number sequences (Analysis 2.2, limit rules), \(\hat\sigma^2\to\sigma^2-0=\sigma^2\) almost surely: strongly consistent, hence consistent (a.s. ⟹ in probability, Remark 2.57).
Step 5. \(S_n^2=\frac n{n-1}\hat\sigma^2\) and the numbers \(\frac n{n-1}=\frac1{1-1/n}\to\frac1{1-0}=1\) (divide top and bottom by \(n\), then \(\frac1n\to0\) and the quotient rule for limits, Analysis 2.2), so \(S_n^2\to1\cdot\sigma^2\) almost surely as well. ∎
Example 3.23 biased but consistent, unbiased but not consistent Script 3.23
\(X_1,\dots,X_n\) iid with mean \(\mu\) and finite variance \(\sigma^2>0\). Bias and consistency are independent of each other:
- Biased but consistent: \(\hat\mu_n=\bar X_n+\frac1n\). Then \(\E[\hat\mu_n]=\E[\bar X_n]+\frac1n=\mu+\frac1n\ne\mu\): biased. By the wlln (Theorem 2.61) \(\bar X_n\xrightarrow\P\mu\), and \(\frac1n\to0\) (Analysis 2.2, limit rules), so \(\hat\mu_n\) is consistent. (Precisely: \(\hat\mu_n-\mu=(\bar X_n-\mu)+\frac1n\), a sum of two sequences that go to 0 in probability — a constant sequence of numbers tending to 0 does so trivially — and Sheet 9 Ex 3(i) on §2.4 says sums preserve convergence in probability.)
- Unbiased but not consistent: \(\tilde\mu_n=X_1\) (ignore all data except the first observation). Then \(\E[\tilde\mu_n]=\E[X_1]=\mu\): unbiased. But \(\P(|\tilde\mu_n-\mu|\ge\varepsilon)=\P(|X_1-\mu|\ge\varepsilon)\) does not depend on \(n\), and since \(\Var[X_1]=\sigma^2>0\), \(X_1\) is not almost surely equal to the constant \(\mu\). So for some \(\varepsilon>0\) this probability is a fixed positive number, not tending to 0: not consistent.
Detail for the second bullet: if \(\P(|X_1-\mu|\ge\varepsilon)=0\) held for every \(\varepsilon>0\), then \(X_1=\mu\) almost surely (take \(\varepsilon=\frac1k\) for all \(k\) and use that a countable union of null sets is null), and then \(\Var[X_1]=0\) — contradiction. Concretely, for a fair die (\(\mu=3.5\)) and \(\varepsilon=1\): \(\P(|X_1-3.5|\ge1)=\P(X_1\in\{1,2,5,6\})=\frac46\) for every \(n\).
Example 3.24 an mvue for the uniform distribution Script 3.24
An iid sample \(X_1,\dots,X_n\) from the model \((\R,\mathcal B,(\Unif(0,\theta))_{\theta>0})\), so \(\Theta=\R_{>0}\). This is the subway model of Example 3.5(v) (§3.1): we want the maximum waiting time \(\theta\), and we look for an estimator with good properties.
- Naive: twice the sample mean. \(\bar X_n\) is an unbiased, strongly consistent, asymptotically normal estimator of \(\E[X_i]=\theta/2\) (Example 3.21). By linearity, \(\hat\theta_1:=2\bar X_n\) has the same properties as an estimator of \(\theta\). Its variance: \[ \Var[\hat\theta_1]=\Var[2\bar X_n]=4\Var[\bar X_n]=\frac{4\Var[X_1]}n=\frac4n\cdot\frac{\theta^2}{12}=\frac{\theta^2}{3n} . \] (Steps: \(\Var[aX]=a^2\Var[X]\) with \(a=2\); \(\Var[\bar X_n]=\Var[X_1]/n\); \(\Var[X_1]=\theta^2/12\) for \(\Unif(0,\theta)\).)
- A "better" estimator: the rescaled maximum. In the exercises (Sheet 10 Ex 1, below) the maximum likelihood estimator is \(\hat\theta_{\text{mle}}=X_{(n)}=\max\{X_1,\dots,X_n\}\), with \(\E[X_{(n)}]=\frac n{n+1}\theta\). So \(\hat\theta_{\text{mle}}\) is biased. Rescaling gives an unbiased estimator \[ \hat\theta_2:=\frac{n+1}nX_{(n)},\qquad \E[\hat\theta_2]=\frac{n+1}n\cdot\frac n{n+1}\theta=\theta . \] For its variance we first need \(\Var[X_{(n)}]\). With the density \(p_{X_{(n)}}(y)=\frac{ny^{n-1}}{\theta^n}\) on \([0,\theta]\) (derived in Sheet 10 Ex 1; the integral uses the power rule \(\int y^m\,\mathrm dy=\frac{y^{m+1}}{m+1}\), Analysis 8.3): \[ \E[X_{(n)}^2]=\int_0^\theta y^2\,\frac{ny^{n-1}}{\theta^n}\,\mathrm dy=\frac n{\theta^n}\int_0^\theta y^{n+1}\,\mathrm dy=\frac n{\theta^n}\cdot\frac{\theta^{n+2}}{n+2}=\frac n{n+2}\theta^2 . \] So \[ \Var[X_{(n)}]=\E[X_{(n)}^2]-(\E[X_{(n)}])^2=\frac n{n+2}\theta^2-\Bigl(\frac n{n+1}\theta\Bigr)^2=\frac{n\theta^2}{(n+2)(n+1)^2}, \] and therefore \[ \Var[\hat\theta_2]=\frac{(n+1)^2}{n^2}\Var[X_{(n)}]=\frac{\theta^2}{n(n+2)} . \] For every \(n>1\) we have \(n(n+2)>3n\), so \(\Var[\hat\theta_2]<\Var[\hat\theta_1]\). Hence \(\hat\theta_1=2\bar X_n\) is unbiased but not the mvue. We say \(\hat\theta_2\) is more efficient than \(\hat\theta_1\).
In fact \(\hat\theta_2\) is the unique mvue for \(\theta\) (the script states this without proof). The sample mean is often "good", but sometimes not the "best".
Algebra filled in. The variance step: put both terms over the common denominator \((n+2)(n+1)^2\): \(\frac{n\theta^2[(n+1)^2-n(n+2)]}{(n+2)(n+1)^2}\), and \((n+1)^2-n(n+2)=n^2+2n+1-n^2-2n=1\). Then \(\frac{(n+1)^2}{n^2}\cdot\frac{n\theta^2}{(n+2)(n+1)^2}=\frac{\theta^2}{n(n+2)}\). The comparison: \(n(n+2)>3n\iff n+2>3\iff n>1\) (divide by \(n>0\)). For \(n=1\) the two estimators coincide (\(2X_1\)).
Numbers (\(\theta=1\)): for \(n=10\), \(\Var[\hat\theta_1]=\frac1{30}\approx0.0333\) and \(\Var[\hat\theta_2]=\frac1{120}\approx0.0083\) — four times smaller. The first shrinks like \(\frac1n\), the second like \(\frac1{n^2}\): far faster than the \(\frac1n\) rate of Example 3.21. For the subway data, \(\hat\theta_1=12.5\) and \(\hat\theta_2=\frac98\cdot12=13.5\).
The mse of the mle itself (useful for SoSe26 P1e below). By the bias–variance decomposition, with \(\operatorname{bias}[X_{(n)}]=\frac n{n+1}\theta-\theta=-\frac\theta{n+1}\): \[ \operatorname{mse}[X_{(n)}]=\frac{n\theta^2}{(n+2)(n+1)^2}+\frac{\theta^2}{(n+1)^2}=\frac{(n+n+2)\theta^2}{(n+2)(n+1)^2}=\frac{2\theta^2}{(n+1)(n+2)} . \] Compare \(\operatorname{mse}[\hat\theta_2]=\frac{\theta^2}{n(n+2)}\): the mle is worse whenever \(\frac2{n+1}>\frac1n\iff2n>n+1\iff n>1\). For \(n=2\): \(\frac16\theta^2\approx0.167\theta^2\) versus \(\frac18\theta^2=0.125\theta^2\).
In words: for the subway interval, "twice the average" and "the enlarged maximum" are both right on average, but the enlarged maximum scatters far less, so it is the better estimator; the plain maximum (the mle) is slightly too small on average.
Example 3.25 the James–Stein estimator Script 3.25
Setup. One observation \(X\sim\mathcal N(\mu,I_d)\) from a \(d\)-dimensional normal distribution: \(X=(X_1,\dots,X_d)\) with independent coordinates \(X_j\sim\mathcal N(\mu_j,1)\) (\(I_d\) is the \(d\times d\) identity matrix — 1 on the diagonal, 0 elsewhere, B5 — used as the covariance matrix; zero covariances mean independent coordinates for Gaussian vectors, §2.3). We want the unknown mean vector \(\mu\in\R^d\).
The standard estimator \(\hat\mu(X)=X\) (unbiased, and also the mle) has
\[ \operatorname{mse}[\hat\mu]=\E[\|X-\mu\|^2]=\sum_{j=1}^d\E[(X_j-\mu_j)^2]=\sum_{j=1}^d\Var[X_j]=d . \](The script writes "\(=\dots=d\)"; the filled-in steps: the squared length is the sum of squared coordinates, linearity of expectation, and each coordinate has mean \(\mu_j\) and variance 1.)
For dimensions \(d\ge3\), the biased James–Stein shrinkage estimator is
\[ \hat\mu_{\text{js}}=\Bigl(1-\frac{d-2}{\|X\|^2}\Bigr)X . \]It shrinks the observation \(X\) towards the origin (multiplies it by a factor below 1). The remarkable result: it has uniformly lower risk than the mle, \(\operatorname{mse}[\hat\mu_{\text{js}}]<d\) for all \(\mu\in\R^d\).
Small caveat on the word "shrinks" (my addition): the factor \(1-\frac{d-2}{\|X\|^2}\) is below 1, but it is negative when \(\|X\|^2<d-2\), so in that case the estimator does not stop at the origin — it flips to the opposite side. That is why statisticians usually use the "positive-part" version \(\max\bigl\{0,\,1-\frac{d-2}{\|X\|^2}\bigr\}X\), which has an even smaller mse. The script states the plain version; the conclusion \(\operatorname{mse}<d\) is true for both.
This is paradoxical: wherever the mean of the Gaussian really is, shrinking towards the origin improves the estimate. One can also show that shrinking in any other direction improves it as well — even more surprising. The script refers to the Wikipedia page for why this makes sense.
Numbers (my simulation, 200 000 repetitions, \(d=10\)): with \(\mu=0\) the James–Stein mse is \(\approx2.0\) (exactly 2 by a known formula), with \(\|\mu\|=3\) it is \(\approx6.0\), with \(\|\mu\|=10\) it is \(\approx9.4\) — always below the mle's 10, with the biggest gain near the origin. "Any other direction" is best read as: shrinking towards any fixed point \(\nu\), i.e. \(\nu+\bigl(1-\frac{d-2}{\|X-\nu\|^2}\bigr)(X-\nu)\), also beats \(X\). The lesson for this page: the mle, although unbiased here, does not have the smallest mse (SoSe26 P1e).
Maximum likelihood estimation
Remark 3.26 constructing estimators Script 3.26
So far it looked as if we must "come up with" estimators by hand and then check their properties. But there are general procedures to construct estimators with certain properties, and a large statistical literature on when and how one can obtain mvues or blues (best linear unbiased estimators — the smallest variance among unbiased estimators that are linear combinations \(\sum_ic_iX_i\) of the data) etc. So it is less guesswork than it seemed. Still, finding better estimators for very specific settings is an active research area. We now see one general procedure.
A blue you have already met: Sheet 10 Ex 4 (§2.2) shows that among all unbiased weighted averages \(\sum_{i=1}^n\lambda_iX_i\) (unbiased means \(\sum_i\lambda_i=1\)), the plain mean \(\bar X_n\) has the smallest variance.
Definition 3.27 maximum likelihood estimation (mle) Script 3.27
The maximum likelihood estimator [Maximum-Likelihood-Schätzer] \(\hat\theta_{\text{mle}}\) is the value of \(\theta\in\Theta\) that maximises the likelihood function \(L(\theta\mid x)\):
\[ \hat\theta_{\text{mle}}(x)\in\operatorname*{arg\,max}_{\theta\in\Theta}L(\theta\mid x)=\operatorname*{arg\,max}_{\theta\in\Theta}\ell(\theta\mid x) . \]Maximising the log-likelihood is often mathematically simpler. If \(\ell(\theta\mid x)\) is differentiable and the maximum lies in the interior of \(\Theta\), \(\hat\theta_{\text{mle}}\) can often be found by solving the likelihood equation \(\nabla_\theta\,\ell(\theta\mid x)=0\) for \(\theta\).
"Interior" [Inneres] (my addition): a point of \(\Theta\) is an interior point if you can move a little in every direction and still stay inside \(\Theta\) — in \(\R\): a small interval \((\theta-\varepsilon,\theta+\varepsilon)\) around it lies in \(\Theta\); in \(\R^k\): a small ball around it does. Example: the interior of \(\Theta=[0,1]\) is \((0,1)\); the endpoints 0 and 1 are boundary points, and there the slope of \(\ell\) need not be 0 (see Sheet 10 Ex 1 below, where the maximum sits at the boundary). More: interior and boundary.
Each part explained (mine).
- The idea. Look at the data you actually got. For each candidate \(\theta\), ask: "if this were the truth, how probable (or how dense) would exactly these data be?" That number is \(L(\theta\mid x)\). Pick the \(\theta\) that makes your data least surprising.
- \(\operatorname{arg\,max}_{\theta\in\Theta}f(\theta)\) is the set of all \(\theta\) where \(f\) reaches its largest value (the "argument of the maximum", as opposed to the maximum value itself). It is written with "\(\in\)" because there may be several maximisers (then any one of them is an mle) — or none (then no mle exists).
- The two arg max sets are equal because \(\ln\) is strictly increasing (primer box 2).
- \(\nabla_\theta\ell\) is the gradient: for one parameter just the derivative \(\frac{\mathrm d\ell}{\mathrm d\theta}\), for several the vector of partial derivatives (primer box 1). The likelihood equation finds candidates; you still have to check that the candidate is the global maximum (second derivative or sign check), and remember cases where the maximum is at the edge of \(\Theta\) or where \(\ell\) is not differentiable (uniform model).
- The estimate \(\hat\theta_{\text{mle}}(x)\) depends on the data; plugging in the random sample \(X\) instead of \(x\) gives the estimator \(\hat\theta_{\text{mle}}(X)\).
Small example (mine): the coin data 1, 0, 1 of primer box 2. Candidate values: \(L(0.5)=0.125\), \(L(\frac23)\approx0.148\), \(L(0.9)=0.081\). The maximiser is \(\hat p=\frac23\), the fraction of ones.
Recipe: deriving an mle in an exam My addition
- Write the likelihood for iid data: \(L(\theta\mid x)=\prod_{i=1}^np(x_i\mid\theta)\). Keep the indicator functions if the support depends on \(\theta\) (uniform-type models!).
- If \(L>0\) on the relevant \(\theta\)-range, take logs: \(\ell=\sum_i\ln p(x_i\mid\theta)\). Terms without \(\theta\) are constants and can be dropped.
- Differentiate in \(\theta\), set \(\ell'(\theta)=0\), solve.
- Check it is a maximum: \(\ell''<0\) at the candidate, or better the sign of \(\ell'\) on both sides (global maximum).
- If the support depends on \(\theta\): no derivative; find where \(L=0\), and where \(L\) is increasing/decreasing; the maximum is usually at the boundary (the sample max or min).
- Write the answer as an estimator with capital letters, e.g. \(\hat\lambda_{\text{mle}}=\bar X_n\).
Example 3.28 mle for the Gaussian Script 3.28
From Example 3.15 (§3.1), for an iid sample \(X_1,\dots,X_n\sim\mathcal N(\mu,\sigma^2)\):
\[ \ell(\mu,\sigma^2\mid x)=-\frac n2\ln(2\pi)-\frac n2\ln(\sigma^2)-\frac1{2\sigma^2}\sum_{i=1}^n(x_i-\mu)^2 . \](Where it comes from: the density of one observation is \((2\pi\sigma^2)^{-1/2}\exp\bigl(-\frac{(x_i-\mu)^2}{2\sigma^2}\bigr)\). Its log is \(-\frac12\ln(2\pi)-\frac12\ln\sigma^2-\frac{(x_i-\mu)^2}{2\sigma^2}\) by the rules of primer box 2; sum over \(i\).)
We maximise over \(\theta=(\mu,\sigma^2)\). Derivative in \(\mu\) (with \(\sigma^2\) fixed). Only the last term contains \(\mu\); by the chain rule, \(\frac{\partial}{\partial\mu}(x_i-\mu)^2=2(x_i-\mu)\cdot(-1)\):
\[ \frac{\partial\ell}{\partial\mu}=-\frac1{2\sigma^2}\sum_{i=1}^n2(x_i-\mu)(-1)=\frac1{\sigma^2}\Bigl(\sum_{i=1}^nx_i-n\mu\Bigr) . \]Setting this to zero gives \(\sum x_i-n\mu=0\), so
\[ \hat\mu_{\text{mle}}=\frac1n\sum_{i=1}^nx_i=\bar x_n . \]Derivative in \(\sigma^2\). Treat \(v=\sigma^2\) as the variable (not \(\sigma\)!). \(\frac{\mathrm d}{\mathrm dv}\ln v=\frac1v\) and \(\frac{\mathrm d}{\mathrm dv}\frac1v=-\frac1{v^2}\):
\[ \frac{\partial\ell}{\partial\sigma^2}=-\frac n{2\sigma^2}+\frac1{2(\sigma^2)^2}\sum_{i=1}^n(x_i-\mu)^2 . \]Setting it to zero (and multiplying by 2) gives \(-\frac n{\sigma^2}+\frac1{(\sigma^2)^2}\sum(x_i-\mu)^2=0\), so \(\sigma^2=\frac1n\sum(x_i-\mu)^2\). Plugging in \(\hat\mu_{\text{mle}}\) for \(\mu\):
\[ \hat\sigma^2_{\text{mle}}=\frac1n\sum_{i=1}^n(x_i-\bar x_n)^2 . \]As noted before, \(\hat\mu_{\text{mle}}\) is unbiased (it is the sample mean), but \(\hat\sigma^2_{\text{mle}}\) is biased (Example 3.22).
Why this critical point is the global maximum My addition — the script only solves the equations
In \(\mu\). For any fixed \(v=\sigma^2\), \(\ell\) depends on \(\mu\) only through \(-\frac1{2v}\sum(x_i-\mu)^2\), a downward parabola in \(\mu\). Its peak is where the derivative vanishes, \(\mu=\bar x_n\) — the same for every \(v\). So \(\ell(\mu,v)\le\ell(\bar x_n,v)\) for all \(\mu\).
In \(v\). Write \(Q=\sum(x_i-\bar x_n)^2\) (assume \(Q>0\), i.e. not all data equal). Then \(f(v)=\ell(\bar x_n,v)=\text{const}-\frac n2\ln v-\frac Q{2v}\) and \(f'(v)=-\frac n{2v}+\frac Q{2v^2}=\frac{Q-nv}{2v^2}\). This is positive for \(v<\frac Qn\) and negative for \(v>\frac Qn\) (sign check, primer box 1): global maximum at \(\hat v=\frac Qn\).
Together: \(\ell(\mu,v)\le\ell(\bar x_n,v)\le\ell(\bar x_n,\hat v)\) for all \((\mu,v)\). This also justifies "plugging \(\hat\mu_{\text{mle}}\) in for \(\mu\)". ∎
Example 3.29 mles for common distributions Script 3.29
For an iid sample \(X_1,\dots,X_n\) from the respective distribution. In general, an mle need not have a closed-form expression; then it has to be computed numerically.
- Bernoulli \(\Ber(p)\): \(\hat p_{\text{mle}}(X)=\frac1n\sum X_i=\bar X_n\).
- Poisson \(\Poi(\lambda)\): \(\hat\lambda_{\text{mle}}(X)=\bar X_n\). Derived in SoSe25 P4a below.
- Exponential \(\Exp(\lambda)\): \(\hat\lambda_{\text{mle}}(X)=\frac1{\bar X_n}\). Derived in Sheet 10 Ex 2 below.
- Gaussian \(\mathcal N(\mu,\sigma^2)\): \(\hat\mu_{\text{mle}}(X)=\bar X_n\) and \(\hat\sigma^2_{\text{mle}}(X)=\frac1n\sum(X_i-\bar X_n)^2\) (Example 3.28).
- Uniform \(\Unif(0,\theta)\): \(\hat\theta_{\text{mle}}(X)=X_{(n)}=\max\{X_1,\dots,X_n\}\). Derived in Sheet 10 Ex 1 below.
Derivation of (i) My derivation
The pmf of \(\Ber(p)\) is \(p(x\mid p)=p^x(1-p)^{1-x}\) for \(x\in\{0,1\}\) (it gives \(p\) for \(x=1\) and \(1-p\) for \(x=0\)). Let \(k=\sum x_i\) be the number of ones. Then
\[ L(p\mid x)=\prod_{i=1}^np^{x_i}(1-p)^{1-x_i}=p^{k}(1-p)^{n-k}, \]because exponents add when multiplying equal bases. For \(0<p<1\): \(\ell(p)=k\ln p+(n-k)\ln(1-p)\), and by the chain rule \((\ln(1-p))'=\frac{-1}{1-p}\):
\[ \ell'(p)=\frac kp-\frac{n-k}{1-p}=\frac{k(1-p)-(n-k)p}{p(1-p)}=\frac{k-np}{p(1-p)} . \]The denominator is positive, so \(\ell'(p)>0\) for \(p<\frac kn\) and \(\ell'(p)<0\) for \(p>\frac kn\): global maximum at \(\hat p=\frac kn=\bar x_n\). Edge cases: if \(k=0\), \(L(p)=(1-p)^n\) is largest at \(p=0=\bar x_n\); if \(k=n\), \(L(p)=p^n\) is largest at \(p=1=\bar x_n\). So the formula holds in all cases (with \(\Theta=[0,1]\)).
Properties of the mle
Remark 3.30 properties of mles Script 3.30
For finite \(n\) we cannot give many general guarantees for mles (see Example 3.24: the mle \(X_{(n)}\) is biased). But under fairly mild regularity conditions — which hold for most common models, and which we always assume — mles have desirable properties as \(n\to\infty\):
- Consistency: \(\hat\theta_{\text{mle}}\xrightarrow\P\theta\).
- Asymptotic normality: \(\sqrt n(\hat\theta_{\text{mle}}-\theta)\xrightarrow d\mathcal N(0,V(\theta))\), where \(V(\theta)=I(\theta)^{-1}\) and \(I(\theta)\) is the Fisher information (matrix) — an extremely important object in statistics which the course does not have time to cover (a glimpse is in Overview 3.32).
- Asymptotic efficiency: mles achieve the lowest possible variance among a large class of estimators as \(n\to\infty\).
- Invariance: if \(\hat\theta_{\text{mle}}\) is the mle of \(\theta\) and \(g\) is a function, then \(g(\hat\theta_{\text{mle}})\) is the mle of \(g(\theta)\) (provided \(g\) does not reduce the dimensionality of \(\Theta\)). For instance, for a normal distribution the mle of the standard deviation \(\sigma\) is \(\sqrt{\hat\sigma^2_{\text{mle}}}\).
Reading note on \(V(\theta)\) versus \(I(\theta)\). Two things to keep apart.
- Inverse, not the thing itself. The script's sentence "where \(V(\theta)=I(\theta)^{-1}\) is the Fisher information matrix" reads as if \(V(\theta)\) were the Fisher information. It is its inverse: \(I(\theta)\) is the Fisher information, and the asymptotic variance is \(V(\theta)=I(\theta)^{-1}\) (for a single parameter simply \(V=1/I\)). So a large Fisher information — much information about \(\theta\) in the data — means a small asymptotic variance, which is the sensible direction.
- One observation or all \(n\)? The script writes \(I(\theta)\) with the log-likelihood \(\ell(\theta\mid x)\), which elsewhere in §3.1 means the log-likelihood of the whole sample, but describes it as the information "an observable random variable \(X\) carries", which points at a single observation. The two readings differ by the factor \(n\): for iid data the log-likelihoods add, so \(I_n(\theta)=n\,I_1(\theta)\), where \(I_1\) uses one observation. On this page I always write \(I_1(\theta)\) for the one-observation version. Both statements in the script are then correct with the reading that fits them: \(V(\theta)=I_1(\theta)^{-1}\) here in Remark 3.30(ii), and \(\Var[\hat\theta]\ge1/I_n(\theta)=1/(n\,I_1(\theta))\) for the Cramér–Rao bound in Overview 3.32 (an estimator built from all \(n\) observations cannot be bounded using the information in one of them). The two fit together: \(\Var[\hat\theta_n]\approx\frac{V(\theta)}n=\frac1{n\,I_1(\theta)}\).
Examples for (i) and (ii). Poisson: \(\hat\lambda_{\text{mle}}=\bar X_n\to\lambda\) by the lln, and by the clt \(\sqrt n(\bar X_n-\lambda)\xrightarrow d\mathcal N(0,\lambda)\), so \(V(\lambda)=\lambda\) (SoSe25 P4c). Uniform: the regularity conditions fail (the support \([0,\theta]\) moves with \(\theta\)); \(X_{(n)}\) is still consistent (Sheet 10 Ex 1 below), but its error shrinks like \(\frac1n\), not like \(\frac1{\sqrt n}\). So \(\sqrt n(X_{(n)}-\theta)\to0\) (a useless, degenerate limit), and with the right scaling \(n(\theta-X_{(n)})\) the limit is an exponential distribution, not a normal one: from Sheet 10 Ex 1, \(\P(n(\theta-X_{(n)})>s)=\bigl(1-\frac s{n\theta}\bigr)^n\to e^{-s/\theta}\) for \(s\ge0\).
Why invariance holds for a one-to-one \(g\) My proof
Let \(g\) be a bijection from \(\Theta\) onto a set \(H\), and write \(\eta=g(\theta)\) (eta) for the new parameter. The same model, described by \(\eta\), has likelihood \(L^*(\eta\mid x)=L(g^{-1}(\eta)\mid x)\): the distribution labelled \(\eta\) is the one labelled \(\theta=g^{-1}(\eta)\). As \(\eta\) runs through \(H\), \(g^{-1}(\eta)\) runs through all of \(\Theta\), so \(L^*\) takes exactly the same values as \(L\), just relabelled. The largest value is reached at \(\eta\) with \(g^{-1}(\eta)=\hat\theta_{\text{mle}}\), i.e. at \(\hat\eta=g(\hat\theta_{\text{mle}})\). ∎
Example: for \(\sigma=\sqrt{\sigma^2}\) (a bijection of \((0,\infty)\)), the mle of \(\sigma\) is \(\sqrt{\hat\sigma^2_{\text{mle}}}\). For SoSe26 P5b below, \(g\) is the affine map \(p\mapsto rp+\frac{1-r}2\). The condition "does not reduce dimensionality" rules out things like \(g(\mu,\sigma^2)=\mu\); for such \(g\) the statement is usually taken as a definition of the mle of \(g(\theta)\).
In words: with lots of data, the mle homes in on the truth, its errors look normal and are as small as they can be; and to estimate a function of the parameter, you may simply apply that function to the mle. For small samples none of this is promised.
Example 3.31 variance estimation: unbiased versus mle Script 3.31
Continuing Example 3.22, compare \(S_n^2=\frac1{n-1}\sum(X_i-\bar X_n)^2\) and \(\hat\sigma^2=\frac1n\sum(X_i-\bar X_n)^2\) as estimators of \(\sigma^2\). The first is unbiased in any model; the second is the mle in a Gaussian model. Both are estimators of \(\sigma^2\) in any model ("anything is a valid estimator").
(i) The expectation. A key algebraic identity (write \(X_i-\bar X_n=(X_i-\mu)-(\bar X_n-\mu)\)):
\[ \begin{aligned} \sum_{i=1}^n(X_i-\bar X_n)^2&=\sum_{i=1}^n\bigl((X_i-\mu)-(\bar X_n-\mu)\bigr)^2\\ &=\sum_{i=1}^n(X_i-\mu)^2-2(\bar X_n-\mu)\sum_{i=1}^n(X_i-\mu)+n(\bar X_n-\mu)^2\\ &=\sum_{i=1}^n(X_i-\mu)^2-2n(\bar X_n-\mu)^2+n(\bar X_n-\mu)^2\\ &=\sum_{i=1}^n(X_i-\mu)^2-n(\bar X_n-\mu)^2 . \end{aligned} \]Line by line: (1) insert \(\pm\mu\); (2) expand \((a-b)^2=a^2-2ab+b^2\) inside the sum; the factor \(\bar X_n-\mu\) does not depend on \(i\), so it comes out of the sum, and \(\sum_{i=1}^nb^2=nb^2\); (3) \(\sum_{i=1}^n(X_i-\mu)=\sum X_i-n\mu=n\bar X_n-n\mu=n(\bar X_n-\mu)\); (4) collect \(-2n+n=-n\).
Taking expectations and using linearity:
\[ \E\Bigl[\sum_{i=1}^n(X_i-\bar X_n)^2\Bigr]=\sum_{i=1}^n\E[(X_i-\mu)^2]-n\E[(\bar X_n-\mu)^2]=\sum_{i=1}^n\Var[X_i]-n\Var[\bar X_n]=n\sigma^2-n\frac{\sigma^2}n=(n-1)\sigma^2 . \](\(\E[(X_i-\mu)^2]=\Var[X_i]\) because \(\mu=\E[X_i]\); \(\E[(\bar X_n-\mu)^2]=\Var[\bar X_n]\) because \(\mu=\E[\bar X_n]\). Only "iid with finite variance" is used — no normality.)
(ii) Bias. \(\E[\hat\sigma^2]=\frac1n\E\bigl[\sum(X_i-\bar X_n)^2\bigr]=\frac{n-1}n\sigma^2\): biased (bias \(-\frac{\sigma^2}n\)). \(\E[S_n^2]=\frac1{n-1}\E\bigl[\sum(X_i-\bar X_n)^2\bigr]=\sigma^2\): unbiased. This is where Bessel's correction comes from. Does this mean \(S_n^2\) is better?
(iii) mse for normal data. Now let \(X_i\sim\mathcal N(\mu,\sigma^2)\). One can compute (the script skips it) \(\Var[S_n^2]=\frac{2\sigma^4}{n-1}\). Since \(S_n^2\) is unbiased,
\[ \operatorname{mse}[S_n^2]=\Var[S_n^2]=\frac{2\sigma^4}{n-1} . \]For \(\hat\sigma^2\) (also skipped in the script):
\[ \operatorname{mse}[\hat\sigma^2]=\Var[\hat\sigma^2]+(\operatorname{bias}[\hat\sigma^2])^2=\frac{2(n-1)\sigma^4}{n^2}+\Bigl(-\frac{\sigma^2}n\Bigr)^2=\frac{(2n-1)\sigma^4}{n^2} . \]Since \(\frac2{n-1}>\frac{2n-1}{n^2}\) for all \(n>1\), \(\hat\sigma^2\) has the better (smaller) mse. This is a classic example supporting the bias–variance tradeoff idea: accepting a small bias reduces the variance enough to improve the overall mse.
Checks. \(\Var[\hat\sigma^2]=\bigl(\frac{n-1}n\bigr)^2\Var[S_n^2]=\frac{(n-1)^2}{n^2}\cdot\frac{2\sigma^4}{n-1}=\frac{2(n-1)\sigma^4}{n^2}\) (since \(\hat\sigma^2=\frac{n-1}nS_n^2\)); adding \(\frac{\sigma^4}{n^2}\) gives \(\frac{(2n-2+1)\sigma^4}{n^2}\). The inequality: \(\frac2{n-1}>\frac{2n-1}{n^2}\iff2n^2>(2n-1)(n-1)=2n^2-3n+1\iff3n>1\). Numbers for \(n=5\), \(\sigma^2=1\): \(0.5\) versus \(0.36\). Even better is dividing by \(n+1\): mse \(\frac{2\sigma^4}{n+1}\), i.e. \(0.333\) for \(n=5\) — the smallest mse among all estimators of the form \(c\sum(X_i-\bar X_n)^2\) (proof below). Try all three in the widget above.
Proof of \(\Var[S_n^2]=\frac{2\sigma^4}{n-1}\) for normal data My proof — the script skips it
Shifting all \(X_i\) by the same constant does not change \(S_n^2\), so assume \(\mu=0\). Write \(\mu_4=\E[X_i^4]\) (the fourth moment), \(A=\sum_iX_i^2\), \(B=(\sum_iX_i)^2\). By the identity in (i) with \(\mu=0\): \(Q:=\sum(X_i-\bar X_n)^2=A-\frac Bn\).
Three expectations. Expand the products into sums over indices. A term \(\E[X_iX_jX_kX_l]\) vanishes whenever some index appears exactly once (independence splits off a factor \(\E[X_i]=0\)). The surviving terms:
- \(\E[A^2]=\sum_i\E[X_i^4]+\sum_{i\ne j}\E[X_i^2]\E[X_j^2]=n\mu_4+n(n-1)\sigma^4\).
- \(\E[AB]=\sum_i\sum_{j,k}\E[X_i^2X_jX_k]\): only \(j=k\) survives, giving \(\sum_i\sum_j\E[X_i^2X_j^2]=n\mu_4+n(n-1)\sigma^4\).
- \(\E[B^2]=\sum_{i,j,k,l}\E[X_iX_jX_kX_l]\): all four indices equal (\(n\) terms, each \(\mu_4\)) or two different indices each appearing twice (\(3n(n-1)\) ordered tuples: 3 ways to pair up the four positions, \(n(n-1)\) ways to choose the two indices), so \(\E[B^2]=n\mu_4+3n(n-1)\sigma^4\).
Combine. \(\E[Q^2]=\E[A^2]-\frac2n\E[AB]+\frac1{n^2}\E[B^2] =\bigl(n\mu_4+n(n-1)\sigma^4\bigr)\frac{n-2}n+\frac{\mu_4+3(n-1)\sigma^4}n =\frac{(n-1)^2}n\mu_4+\frac{(n-1)(n^2-2n+3)}n\sigma^4\). With \(\E[Q]=(n-1)\sigma^2\) from (i):
\[ \Var[Q]=\E[Q^2]-(n-1)^2\sigma^4=\frac{(n-1)^2}n\mu_4-\frac{(n-1)(n-3)}n\sigma^4 ,\qquad \Var[S_n^2]=\frac{\Var[Q]}{(n-1)^2}=\frac{\mu_4}n-\frac{(n-3)\sigma^4}{n(n-1)} . \]This holds for any iid data with finite fourth moment. For the normal distribution \(\mu_4=3\sigma^4\) (a standard fact, e.g. from the fourth derivative of the characteristic function \(e^{-\sigma^2t^2/2}\), §2.3), so \(\Var[S_n^2]=\frac{\sigma^4}n\bigl(3-\frac{n-3}{n-1}\bigr)=\frac{\sigma^4}n\cdot\frac{2n}{n-1}=\frac{2\sigma^4}{n-1}\). ∎
Best divisor. For an estimator \(cQ\): \(\operatorname{mse}(c)=c^2\E[Q^2]-2c\sigma^2\E[Q]+\sigma^4\), a parabola in \(c\) with minimum at \(c^*=\frac{\sigma^2\E[Q]}{\E[Q^2]}\). For normal data \(\E[Q^2]=\Var[Q]+(\E Q)^2=2(n-1)\sigma^4+(n-1)^2\sigma^4=(n-1)(n+1)\sigma^4\), so \(c^*=\frac{(n-1)\sigma^4}{(n-1)(n+1)\sigma^4}=\frac1{n+1}\), with mse \(\sigma^4\bigl(1-\frac{n-1}{n+1}\bigr)=\frac{2\sigma^4}{n+1}\).
In words: dividing the sum of squared deviations by \(n-1\) makes the variance estimate right on average; dividing by \(n\) (the Gaussian mle) makes it a little too small on average but less jumpy, and for normal data that trade makes its mean squared error smaller.
Overview 3.32 outlook on point estimation Script 3.32
Maximum likelihood is a general principle for constructing estimators with good asymptotic properties. There is a rich classical theory for finding and evaluating estimators, especially optimal estimators for finite samples, which the course has no time to cover. It shows the limits of estimation and how to construct optimal estimators systematically. A brief glimpse of the central concepts:
- Fisher information \[ I(\theta)=\E\Bigl[\Bigl(\frac{\partial}{\partial\theta}\ell(\theta\mid X)\Bigr)^2\,\Big|\,\theta\Bigr]=-\E\Bigl[\frac{\partial^2}{\partial\theta^2}\ell(\theta\mid X)\,\Big|\,\theta\Bigr] \] quantifies how much information an observable random variable \(X\) carries about the unknown \(\theta\). (The second equality needs regularity conditions.) So the Fisher information is the variance of the score \(\frac{\partial}{\partial\theta}\ell(\theta\mid x)\), and can also be written as the negative expected second derivative (the Hessian matrix of second derivatives for vector \(\theta\), Analysis 11.3).
- Cramér–Rao lower bound (crlb): for any unbiased estimator \(\hat\theta\), \(\Var[\hat\theta]\ge1/I(\theta)\). The Fisher information limits how precise an estimator can be. (Here \(I(\theta)\) is the Fisher information of the whole sample the estimator is built from; for iid data that is \(I_n(\theta)=n\,I_1(\theta)\), so the bound reads \(\Var[\hat\theta]\ge\frac1{n\,I_1(\theta)}\) and shrinks like \(\frac1n\) — see the reading note in Remark 3.30.)
- Efficient estimator: an unbiased estimator whose variance attains the crlb; it is then an mvue. Every efficient estimator is an mvue, but an mvue may exist even if no estimator reaches the crlb (lots of room for research).
- Sufficiency: a statistic \(T(X)\) is sufficient if it captures all information about \(\theta\) in the sample. The Rao–Blackwell theorem improves any unbiased estimator by conditioning it on a sufficient statistic (taking its conditional expectation given that statistic, §2.1), which often leads to an mvue.
- blue: the mvue within the class of linear estimators. The Gauss–Markov theorem says the ordinary least
squares estimator is the blue for linear regression models under certain assumptions.
What is linear regression / least squares? (my addition; outlook, not examined) You observe pairs \((x_1,y_1),\dots,(x_n,y_n)\) — say hours studied \(x_i\) and exam points \(y_i\) — and model \(y_i=\beta_0+\beta_1x_i+\varepsilon_i\): a straight line with unknown intercept \(\beta_0\) and slope \(\beta_1\) (the parameters), plus random errors \(\varepsilon_i\) with mean 0. Ordinary least squares (OLS) [Methode der kleinsten Quadrate] estimates \(\beta_0,\beta_1\) by the line that makes the sum of squared vertical distances \(\sum_{i=1}^n(y_i-\beta_0-\beta_1x_i)^2\) as small as possible. Example: the points \((0,1),(1,2),(2,3)\) lie exactly on \(y=1+x\), so OLS gives \(\hat\beta_0=1,\hat\beta_1=1\) with sum of squares 0. The resulting estimators are linear in the \(y_i\), and Gauss–Markov says no other linear unbiased estimator has smaller variance (if the errors are uncorrelated with equal variance). The fitted slope equals \(\operatorname{Cov}/\operatorname{Var}\) of the data, the same quantity as in the covariance and correlation section §2.1.
The figure (a concept map, described in words). Arrows connect the concepts: Fisher information defines the Cramér–Rao lower bound; the crlb bounds the variance of unbiased estimators; a sufficient statistic is used by the Rao–Blackwell theorem, which improves unbiased estimators and constructs an mvue; the unbiased estimator with minimal variance is the mvue; an unbiased estimator attaining the crlb is an efficient estimator, and an efficient estimator is an mvue.
A worked number for the Poisson model. For one observation \(\ell(\lambda\mid x)=-\lambda+x\ln\lambda-\ln x!\), so \(\frac{\partial\ell}{\partial\lambda}=-1+\frac x\lambda\) and \(\frac{\partial^2\ell}{\partial\lambda^2}=-\frac x{\lambda^2}\). Using the second form of the definition, \(I_1(\lambda)=-\E\bigl[-\frac X{\lambda^2}\bigr]=\frac{\E[X]}{\lambda^2}=\frac\lambda{\lambda^2}=\frac1\lambda\) (the Poisson mean is \(\lambda\)). For \(n\) iid observations the log-likelihoods add, so \(I_n(\lambda)=n\,I_1(\lambda)=\frac n\lambda\) and the crlb is \(\frac1{I_n(\lambda)}=\frac\lambda n\). Since \(\Var[\bar X_n]=\frac\lambda n\), the mle \(\bar X_n\) attains the bound: it is efficient, hence the mvue. And \(V(\lambda)=\lambda=I_1(\lambda)^{-1}\), matching Remark 3.30(ii). For the uniform model the regularity conditions fail (the support \([0,\theta]\) moves with \(\theta\), so one may not differentiate under the integral sign), and the crlb indeed does not apply: \(\Var[\hat\theta_2]=\frac{\theta^2}{n(n+2)}\) shrinks like \(\frac1{n^2}\), faster than any bound of the shape \(\frac{c(\theta)}n\).
In words: the Fisher information measures how sharply the log-likelihood peaks at the true \(\theta\) — a sharp peak means the data pin \(\theta\) down well. The Cramér–Rao bound turns this into a hard floor: no unbiased estimator can have a variance below \(1/I(\theta)\). An estimator that reaches the floor is called efficient and is then the best unbiased estimator (mvue); Rao–Blackwell is a recipe for improving an unbiased estimator towards that goal, and "blue" is the same idea restricted to estimators that are linear in the data.
Exercise-sheet tasks
Sheet 10, Exercise 1 — mle for the uniform distribution Sheet 10 · Ex 1
\(X_1,\dots,X_n\) iid \(\Unif(0,\theta)\), \(\theta>0\) unknown, with pdf \(p(x_i\mid\theta)=\frac1\theta\one_{[0,\theta]}(x_i)\). (i) Write down the likelihood \(L(\theta\mid x)\), careful with the indicators. (ii) Find \(\hat\theta_{\text{mle}}\) (hint: not differentiable — reason with monotonicity and where it is non-zero). (iii) Compute \(\E[\hat\theta_{\text{mle}}]\) (hint: cdf, then pdf, then expectation). Is it unbiased?
Solution
(i) By independence the joint density is the product:
\[ L(\theta\mid x)=\prod_{i=1}^n\frac1\theta\one_{[0,\theta]}(x_i)=\Bigl(\frac1\theta\Bigr)^n\prod_{i=1}^n\one_{[0,\theta]}(x_i) . \]A product of indicators is 1 exactly when every factor is 1, i.e. when \(0\le x_i\le\theta\) for all \(i\). That is the same as \(x_{\min}:=\min_ix_i\ge0\) and \(x_{\max}:=\max_ix_i\le\theta\). The data come from \(\Unif(0,\theta)\), so all \(x_i\ge0\), and
\[ L(\theta\mid x)=\begin{cases}\theta^{-n}&\text{if }\theta\ge x_{\max},\\ 0&\text{if }\theta<x_{\max}.\end{cases} \](Assume \(x_{\max}>0\), which happens with probability 1.)
(ii) For \(\theta<x_{\max}\) the likelihood is 0: such a \(\theta\) cannot have produced an observation larger than itself. For \(\theta\ge x_{\max}\), \(\theta^{-n}\) is strictly decreasing in \(\theta\) (a larger interval spreads the probability thinner). So the maximum sits at the smallest allowed value: \(\hat\theta_{\text{mle}}=x_{\max}\), as an estimator \(\hat\theta_{\text{mle}}=X_{(n)}=\max\{X_1,\dots,X_n\}\). Setting \(\ell'=0\) would not work: \(\ell(\theta)=-n\ln\theta\) on \([x_{\max},\infty)\) has derivative \(-\frac n\theta\ne0\) everywhere; the maximum is at the boundary.
Bus example from the official solution: waiting times \((4,1,7,12,5,9,10,2)\) minutes give the estimate 12 minutes.
(iii) cdf of the maximum. \(X_{(n)}\le t\) holds exactly when every \(X_i\le t\). By independence, for \(0\le t\le\theta\):
\[ F_{X_{(n)}}(t)=\P(X_1\le t,\dots,X_n\le t)=\prod_{i=1}^n\P(X_i\le t)=\Bigl(\frac t\theta\Bigr)^n , \]using the uniform cdf \(F_{X_i}(t)=\frac t\theta\) on \([0,\theta]\) (0 below, 1 above). pdf by differentiating the cdf (pdf \(=F'\), §1.3; power rule for derivatives, Analysis 6.2): \(p_{X_{(n)}}(t)=\frac{nt^{n-1}}{\theta^n}\) on \([0,\theta]\), 0 elsewhere. Expectation (antiderivative of \(t^n\) is \(\frac{t^{n+1}}{n+1}\), Analysis 8.3):
\[ \E[X_{(n)}]=\int_0^\theta t\cdot\frac{nt^{n-1}}{\theta^n}\,\mathrm dt=\frac n{\theta^n}\int_0^\theta t^n\,\mathrm dt=\frac n{\theta^n}\Bigl[\frac{t^{n+1}}{n+1}\Bigr]_0^\theta=\frac n{\theta^n}\cdot\frac{\theta^{n+1}}{n+1}=\frac n{n+1}\theta . \]So \(\operatorname{bias}[\hat\theta_{\text{mle}}]=\frac n{n+1}\theta-\theta=-\frac\theta{n+1}\ne0\): biased (it underestimates, because the maximum is always \(\le\theta\)). The bias tends to 0 as \(n\to\infty\): "asymptotically unbiased". The unbiased correction is \(\frac{n+1}nX_{(n)}\) (Example 3.24); for the bus data \(\frac98\cdot12=13.5\).
Consistency (not asked, but instructive): for \(0<\varepsilon<\theta\), \(\P(|X_{(n)}-\theta|\ge\varepsilon)=\P(X_{(n)}\le\theta-\varepsilon)=\bigl(\frac{\theta-\varepsilon}\theta\bigr)^n\to0\), since the base is below 1. So the mle is consistent. Verification: the official solution is correct. One subtle point it relies on: the pdf uses the closed interval \([0,\theta]\). With \((0,\theta)\) the likelihood at \(\theta=x_{\max}\) would be 0, and the supremum would not be attained — no mle in the strict sense. Densities can be changed at single points without changing the distribution, so this is a convention, but it matters for the argmax.
Method to reuse. When the support depends on \(\theta\): write the indicators, turn them into one condition on \(\theta\) (here \(\theta\ge x_{\max}\)), and maximise the remaining monotone function at the boundary. For the distribution of a maximum: \(\P(\max\le t)=\prod\P(X_i\le t)\); for a minimum: \(\P(\min>t)=\prod\P(X_i>t)\).
Sheet 10, Exercise 2 — mle for the exponential distribution Sheet 10 · Ex 2
\(X_1,\dots,X_n\) iid \(\Exp(\lambda)\), \(n\ge2\), rate \(\lambda>0\) unknown. (i) Write down \(L(\lambda\mid x)\) and \(\ell(\lambda\mid x)\). (ii) Find \(\hat\lambda_{\text{mle}}\). (iii) Compute \(\E[\hat\lambda_{\text{mle}}]\); is it unbiased? Hint: \(\Exp(\lambda)=\Gamma(1,\lambda)\), so \(S_n=\sum X_i\sim\Gamma(n,\lambda)\); \(\frac1{\bar X_n}=\frac n{S_n}\); for \(Y\sim\Gamma(\alpha,\beta)\) with \(\alpha>1\), \(\E[\frac1Y]=\frac\beta{\alpha-1}\).
Solution
(i) The pdf is \(p(x\mid\lambda)=\lambda e^{-\lambda x}\) for \(x\ge0\). By independence (all \(x_i\ge0\)):
\[ L(\lambda\mid x)=\prod_{i=1}^n\lambda e^{-\lambda x_i}=\lambda^n\exp\Bigl(-\lambda\sum_{i=1}^nx_i\Bigr),\qquad \ell(\lambda\mid x)=n\ln\lambda-\lambda\sum_{i=1}^nx_i , \]using \(e^ae^b=e^{a+b}\), then \(\ln(\lambda^n)=n\ln\lambda\) and \(\ln(e^s)=s\).
(ii) \(\frac{\mathrm d\ell}{\mathrm d\lambda}=\frac n\lambda-\sum x_i=0\iff\lambda=\frac n{\sum x_i}=\frac1{\bar x_n}\). Second derivative \(\frac{\mathrm d^2\ell}{\mathrm d\lambda^2}=-\frac n{\lambda^2}<0\) for all \(\lambda>0\), so \(\ell\) bends downwards everywhere and the critical point is the global maximum (a function with negative second derivative on an interval has at most one critical point, and it is the global maximum; equivalently, \(\ell'\) is positive before and negative after). Hence \(\hat\lambda_{\text{mle}}=\frac1{\bar X_n}\).
Sanity check: the mean of \(\Exp(\lambda)\) is \(\frac1\lambda\), so \(\bar X_n\approx\frac1\lambda\), i.e. \(\lambda\approx\frac1{\bar X_n}\). Light bulbs lasting \(1.2, 0.4, 2.5, 0.9, 1.6, 0.3, 3.1, 1.0\) years (sum 11) give \(\hat\lambda=\frac8{11}\approx0.73\) per year (preset in the log-likelihood widget).
(iii) \(\E[\hat\lambda_{\text{mle}}]=\E[\frac n{S_n}]=n\E[\frac1{S_n}]\). With \(S_n\sim\Gamma(n,\lambda)\) and \(n>1\): \(\E[\frac1{S_n}]=\frac\lambda{n-1}\), so
\[ \E[\hat\lambda_{\text{mle}}]=\frac n{n-1}\lambda,\qquad\operatorname{bias}[\hat\lambda_{\text{mle}}]=\frac n{n-1}\lambda-\lambda=\frac\lambda{n-1}\ne0 . \]The mle is biased (it overestimates). For \(n=1\), \(\E[\frac1{X_1}]=\int_0^\infty\frac1x\lambda e^{-\lambda x}\,\mathrm dx\) diverges (near \(x=0\) the integrand behaves like \(\frac\lambda x\), since \(e^{-\lambda x}\to1\), and \(\int_0^1\frac1x\,\mathrm dx=\infty\) — the benchmark improper integral, Analysis 9.1), so the expectation is \(+\infty\).
The two facts from the hint My proofs
\(S_n\sim\Gamma(n,\lambda)\). \(\Exp(\lambda)\) has density \(\lambda e^{-\lambda x}\), which is the \(\Gamma(1,\lambda)\) density \(\frac{\lambda^1}{\Gamma(1)}x^0e^{-\lambda x}\) (\(\Gamma(1)=1\)). Sums of independent Gammas with the same rate are Gamma with the shapes added (proved with characteristic functions on §2.3). So \(S_n\sim\Gamma(1+\dots+1,\lambda)=\Gamma(n,\lambda)\).
\(\E[1/Y]=\frac\beta{\alpha-1}\) for \(Y\sim\Gamma(\alpha,\beta)\), \(\alpha>1\). By LOTUS,
\[ \E\Bigl[\frac1Y\Bigr]=\int_0^\infty\frac1y\cdot\frac{\beta^\alpha}{\Gamma(\alpha)}y^{\alpha-1}e^{-\beta y}\,\mathrm dy =\frac{\beta^\alpha}{\Gamma(\alpha)}\int_0^\infty y^{(\alpha-1)-1}e^{-\beta y}\,\mathrm dy =\frac{\beta^\alpha}{\Gamma(\alpha)}\cdot\frac{\Gamma(\alpha-1)}{\beta^{\alpha-1}}=\frac{\beta\,\Gamma(\alpha-1)}{\Gamma(\alpha)}=\frac\beta{\alpha-1} . \]The middle integral is the \(\Gamma(\alpha-1,\beta)\) density without its constant, so it equals the reciprocal of that constant, \(\frac{\Gamma(\alpha-1)}{\beta^{\alpha-1}}\) (a density integrates to 1; needs \(\alpha-1>0\)). The last step uses \(\Gamma(\alpha)=(\alpha-1)\Gamma(\alpha-1)\) (§1.3).
The official solution — one wrong justification
It ends with "It is consistent as \(\lim_{n\to\infty}\frac n{n-1}\lambda=\lambda\)". That limit only shows the bias tends to 0 (asymptotic unbiasedness), which does not imply consistency: \(X_1\) is even exactly unbiased and not consistent (Example 3.23). The conclusion is true, with a correct reason: by the slln, \(\bar X_n\to\frac1\lambda\) almost surely; the function \(t\mapsto\frac1t\) is continuous at \(\frac1\lambda>0\) (continuity: Analysis 4.1), so \(\frac1{\bar X_n}\to\lambda\) almost surely (for each outcome in the probability-1 event, \(\bar X_n(\omega)\) is a number sequence tending to \(\frac1\lambda\ne0\), and the limit rule for quotients of number sequences, Analysis 2.2, gives \(\frac1{\bar X_n(\omega)}\to\lambda\)). Hence \(\hat\lambda_{\text{mle}}\) is strongly consistent. (Alternatively: bias → 0 and variance → 0, then the mse test above.) Everything else in the official solution is correct.
An unbiased version: \(\frac{n-1}n\hat\lambda_{\text{mle}}=\frac{n-1}{S_n}\) has expectation \(\frac{n-1}n\cdot\frac n{n-1}\lambda=\lambda\).
Method to reuse. Product → log → derivative → solve → sign of second derivative. For expectations of \(\frac1{S_n}\), identify the distribution of \(S_n\) and integrate against its density, spotting another density inside the integral.
Sheet 10, Exercise 3 — the density \(2c^2/x^3\) Sheet 10 · Ex 3
\(X\) has pdf \(p_X(x)=\frac{2c^2}{x^3}\) for \(x\ge c\) and 0 otherwise, with \(c>0\). (i) Show \(p_X\) is a valid pdf for all \(c>0\). (ii) Find the cdf. (iii) For iid \(X_1,\dots,X_n\) from this distribution, find the mle for \(c\) (hint: what if a sample value is below \(c\)?).
Solution
(i) A pdf must be \(\ge0\) and integrate to 1. Non-negative: for \(x\ge c>0\), \(2c^2>0\) and \(x^3>0\); elsewhere it is 0. Integral — an improper integral (Analysis 9.1): integrate up to \(a\), then let \(a\to\infty\). An antiderivative of \(x^{-3}\) is \(-\frac12x^{-2}\) (power rule \(\int x^m\,\mathrm dx=\frac{x^{m+1}}{m+1}\) with \(m=-3\), Analysis 8.3):
\[ \int_c^\infty\frac{2c^2}{x^3}\,\mathrm dx=2c^2\lim_{a\to\infty}\Bigl[-\frac1{2x^2}\Bigr]_c^a=2c^2\lim_{a\to\infty}\Bigl(-\frac1{2a^2}+\frac1{2c^2}\Bigr)=2c^2\cdot\frac1{2c^2}=1 . \](ii) \(F_X(x)=\int_{-\infty}^xp_X(t)\,\mathrm dt\). For \(x<c\) the density is 0 there, so \(F_X(x)=0\). For \(x\ge c\):
\[ F_X(x)=\int_c^x\frac{2c^2}{t^3}\,\mathrm dt=2c^2\Bigl[-\frac1{2t^2}\Bigr]_c^x=2c^2\Bigl(\frac1{2c^2}-\frac1{2x^2}\Bigr)=1-\frac{c^2}{x^2} . \]Check: \(F_X(c)=0\) and \(F_X(x)\to1\) as \(x\to\infty\).
(iii) With the support written as an indicator, \(p_X(x_i)=\frac{2c^2}{x_i^3}\one_{[c,\infty)}(x_i)\), and by independence
\[ L(c\mid x)=\prod_{i=1}^n\frac{2c^2}{x_i^3}\one_{[c,\infty)}(x_i)=\begin{cases}(2c^2)^n\prod_{i=1}^nx_i^{-3}&\text{if }c\le x_{\min},\\0&\text{if }c>x_{\min},\end{cases} \]because all indicators equal 1 exactly when every \(x_i\ge c\), i.e. \(x_{\min}=\min_ix_i\ge c\). For fixed data, \(\prod x_i^{-3}\) is a positive constant, and \((2c^2)^n=2^nc^{2n}\) is strictly increasing in \(c>0\). So make \(c\) as large as possible without making \(L=0\): \(\hat c_{\text{mle}}=x_{\min}\), as an estimator \(\hat c_{\text{mle}}=\min\{X_1,\dots,X_n\}\).
Verification: the official solution is correct in all three parts. As in Ex 1, the closed interval \([c,\infty)\) makes the maximum attained at \(c=x_{\min}\).
Extra: is it unbiased? The mirror image of Ex 1. For \(t\ge c\): \(\P(\min_iX_i>t)=\prod_i\P(X_i>t)=\bigl(\frac{c^2}{t^2}\bigr)^n=\frac{c^{2n}}{t^{2n}}\). The density of the minimum is the derivative of \(1-\frac{c^{2n}}{t^{2n}}\), namely \(\frac{2nc^{2n}}{t^{2n+1}}\), and \(\E[\min X_i]=\int_c^\infty t\cdot\frac{2nc^{2n}}{t^{2n+1}}\,\mathrm dt=2nc^{2n}\cdot\frac{c^{1-2n}}{2n-1}=\frac{2n}{2n-1}c\). So the mle overestimates (the minimum is always \(\ge c\)), bias \(\frac c{2n-1}\to0\); \(\frac{2n-1}{2n}\min X_i\) is unbiased.
Method to reuse. "Support depends on the parameter" ⟹ mle is a sample extreme. If the likelihood decreases in the parameter on the allowed range, take the smallest allowed value (the sample maximum in Ex 1); if it increases, take the largest allowed value (the sample minimum here).
Sheet 10, Exercise 5 — how many toasters are broken? Sheet 10 · Ex 5
A box holds \(n\in\N_{>1}\) toasters; a fixed but unknown number \(d\) of them is broken. You draw two toasters uniformly at random (without putting the first one back). (i) What is the distribution \(P_d\) of the number of broken toasters among the two? (Hint: a distribution on a set with only 3 elements; give its pmf.) (ii) Now \(d\) is unknown and is to be estimated from this sample of two. Write down an adequate statistical model and explain it briefly. (iii) Give an unbiased estimator for \(d\) in this model and justify your choice.
Solution
Picture first (mine). Take \(n=10\) toasters, \(d=3\) of them broken. If both drawn toasters work, you would guess "few are broken"; if both are broken, "many". The exercise turns this gut feeling into an estimator and checks that it is right on average.
(i) The number of broken toasters among the two drawn ones can be 0, 1 or 2, so the sample space is \(\Omega=\{0,1,2\}\) with all subsets as events, \(\Aa=\pow(\Omega)\). Every pair of toasters is equally likely (a Laplace experiment, §1.1: probability = favourable cases / all cases). The draw is without replacement and the order does not matter, so the cases are the 2-element subsets of the \(n\) toasters. There are \(\binom n2=\frac{n(n-1)}2\) of them (\(\binom nk\), "n choose k", is the number of ways to choose \(k\) of \(n\) objects, B3). Label the toasters \(1,\dots,n\) so that the broken ones are \(1,\dots,d\).
- No broken one: both toasters come from the \(n-d\) working ones: \(\binom{n-d}2\) pairs, so \[ p_d(0)=\frac{\binom{n-d}2}{\binom n2}=\frac{(n-d)(n-d-1)/2}{n(n-1)/2}=\frac{(n-d)(n-d-1)}{n(n-1)} . \]
- Two broken ones: both come from the \(d\) broken ones: \(\binom d2\) pairs, so \(p_d(2)=\frac{d(d-1)}{n(n-1)}\).
- Exactly one broken one: the rest of the probability, \[ p_d(1)=1-p_d(0)-p_d(2)=\frac{n(n-1)-(n-d)(n-d-1)-d(d-1)}{n(n-1)}=\frac{2d(n-d)}{n(n-1)} . \] Algebra: \((n-d)(n-d-1)=n^2-2nd+d^2-n+d\) and \(d(d-1)=d^2-d\); subtracting both from \(n^2-n\) leaves \(2nd-2d^2=2d(n-d)\). Direct count as a check: one of the \(d\) broken times one of the \(n-d\) working toasters gives \(d(n-d)\) pairs, and \(\frac{d(n-d)}{n(n-1)/2}=\frac{2d(n-d)}{n(n-1)}\) ✓.
\(P_d\) is the distribution on \(\{0,1,2\}\) with this pmf. It is the hypergeometric distribution \(\Hyp(n,d,2)\) (§1.2) — in the script's order of arguments: \(n\) objects in total, \(d\) of them "marked" (here: broken), \(2\) of them drawn without replacement, and the value counts how many marked ones you drew. Numbers for \(n=10\), \(d=3\): \(p_3(0)=\frac{7\cdot6}{90}=\frac7{15}\), \(p_3(1)=\frac{2\cdot3\cdot7}{90}=\frac7{15}\), \(p_3(2)=\frac{3\cdot2}{90}=\frac1{15}\); they add up to 1 ✓.
(ii) An adequate statistical model (Definition 3.4, §3.1) is
\[ \bigl(\{0,1,2\},\ \pow(\{0,1,2\}),\ (P_d)_{d\in\{0,\dots,n\}}\bigr). \]The observation is the number of broken toasters in the sample (0, 1 or 2). The unknown parameter is \(d\), and the parameter space is \(\Theta=\{0,1,\dots,n\}\): there cannot be fewer than 0 or more than \(n\) broken toasters. For each candidate value \(d\) the model contains the distribution \(P_d\) from (i). (More on this model: §3.1.)
(iii) Idea: the fraction of broken toasters in the sample, \(\frac\omega2\) (where \(\omega\in\{0,1,2\}\) is the observed number), should be about the fraction \(\frac dn\) in the whole box. Scale it up to all \(n\) toasters:
\[ \hat d:\{0,1,2\}\to\R,\qquad \omega\mapsto\hat d(\omega)=\frac{\omega\,n}2 . \]It is a function of the data only (it does not use \(d\)); every map on the finite set \(\{0,1,2\}\) with the power set is measurable, so it is a statistic and hence an estimator (Definition 3.18). Unbiased: the expectation of a function of a discrete random variable is the sum of its values weighted by the pmf, so
\[ \E_d[\hat d]=\sum_{\omega=0}^2p_d(\omega)\,\hat d(\omega)=p_d(0)\cdot0+p_d(1)\cdot\frac n2+p_d(2)\cdot n =\frac n2\Bigl(\frac{2d(n-d)}{n(n-1)}+\frac{2d(d-1)}{n(n-1)}\Bigr) . \]Take out the common factor \(\frac{2d}{n(n-1)}\) from the bracket: \(\frac n2\cdot\frac{2d}{n(n-1)}\bigl((n-d)+(d-1)\bigr) =\frac{d}{n-1}\cdot(n-1)=d\). This holds for every \(d\in\{0,\dots,n\}\), so \(\hat d\) is unbiased (Definition 3.20(i)). ∎
Numbers (\(n=10\), \(d=3\)): the estimate is 0, 5 or 10 with probabilities \(\frac7{15},\frac7{15},\frac1{15}\), and \(0\cdot\frac7{15}+5\cdot\frac7{15}+10\cdot\frac1{15}=\frac{45}{15}=3\) ✓. Note that the estimate is never 3 — unbiased only means "right on average over many repetitions".
How precise is it? (Not asked.) By the same sum, \(\E_d[\hat d^2]=p_d(1)\frac{n^2}4+p_d(2)n^2\), and \(\Var[\hat d]=\E[\hat d^2]-d^2\) simplifies to \(\Var[\hat d]=\operatorname{mse}[\hat d]=\frac{d(n-d)(n-2)}{2(n-1)}\) (checked exactly with fractions for all \(d\) and several \(n\)). For \(n=10\), \(d=3\): \(\frac{3\cdot7\cdot8}{18}=\frac{28}3\approx9.3\), a standard deviation of about 3 toasters — two toasters are very little data.
It is the only unbiased estimator. (Not asked.) Any estimator is a triple of values \(T(0),T(1),T(2)\). Unbiasedness means \(T(0)p_d(0)+T(1)p_d(1)+T(2)p_d(2)=d\) for all \(d\in\{0,\dots,n\}\). Multiply by \(n(n-1)\): both sides are polynomials in \(d\) of degree at most 2 that agree at the \(n+1\ge3\) points \(0,\dots,n\), so they are the same polynomial (two different polynomials of degree \(\le2\) agree in at most 2 points). \(d=0\) gives \(T(0)n(n-1)=0\), so \(T(0)=0\); comparing the \(d^2\)-coefficients gives \(-2T(1)+T(2)=0\); comparing the \(d\)-coefficients gives \(2nT(1)-T(2)=n(n-1)\). Hence \(T(1)=\frac n2\), \(T(2)=n\): exactly \(\hat d\).
Note on the official solution
The exercise statement says "\(d\in\{0,\dots,d\}\)"; this is a typo for \(d\in\{0,\dots,n\}\), which the solution then uses in (ii). The computations in (i) and (iii) are correct (checked above and with exact fractions).
Method to reuse. "Give an unbiased estimator": guess by matching fractions or means (here sample fraction \(\approx\) population fraction), then compute \(\E_\theta[\hat\theta]\) with the model's pmf and show it equals \(\theta\) for every \(\theta\in\Theta\).
Sheet 9. Sheet 10 Ex 1 is marked "repeated from sheet 9", but the Sheet 9 solutions uploaded to the project contain no estimation exercise (Sheet 9 covers the lln, the clt and convergence, §2.4). So nothing from Sheet 9 is missing on this page.
Sheet 10 Ex 4 (best weights for an average: unbiasedness and minimal mse of \(\sum\lambda_iX_i\)) is solved on §2.2, because its key step is Jensen's inequality. In the language of this page: a weighted average \(\sum_{i=1}^n\lambda_iX_i\) is an unbiased estimator of \(\mu\) exactly when \(\sum_i\lambda_i=1\), its mse is then its variance \(\sigma^2\sum_i\lambda_i^2\), and equal weights make that smallest — so \(\bar X_n\) is the blue (Remark 3.26). The sheet states the task for convex combinations (\(\lambda_i\ge0\)), but its Jensen step works for negative weights too, so the conclusion holds for all linear unbiased estimators.
Old-exam tasks
SoSe 2025, Problem 1b — a weighted average of unbiased estimators SoSe25 · P1b · 3 credits
Statement (true or false, with justification). Let \((\Omega,\Aa,\mathcal P_\Theta)\) be a statistical model and \(\hat\theta_1,\hat\theta_2\) unbiased estimators of \(\theta\). Then \(\frac13\hat\theta_1+\frac23\hat\theta_2\) is an unbiased estimator of \(\theta\) as well.
Answer: True (official answer, correct). Justification. Unbiased means \(\E_\theta[\hat\theta_1]=\theta\) and \(\E_\theta[\hat\theta_2]=\theta\) for every \(\theta\in\Theta\) (Definition 3.20(i)). By linearity of expectation (§2.1: constants come out, expectations of sums add),
\[ \E_\theta\Bigl[\tfrac13\hat\theta_1+\tfrac23\hat\theta_2\Bigr]=\tfrac13\E_\theta[\hat\theta_1]+\tfrac23\E_\theta[\hat\theta_2] =\tfrac13\theta+\tfrac23\theta=\theta\quad\text{for every }\theta\in\Theta . \]Also, the combination is again a function of the data only (both \(\hat\theta_i\) are statistics), so it is an estimator. ∎
What makes it work, and what does not matter. Only that the weights add up to 1: for weights \(a,b\), \(\E[a\hat\theta_1+b\hat\theta_2]=(a+b)\theta\), which equals \(\theta\) for all \(\theta\) exactly when \(a+b=1\). Counterexample for weights not adding to 1: \(\frac12\hat\theta_1+\frac12\cdot\frac12\hat\theta_2\) has expectation \(\frac34\theta\ne\theta\) (whenever \(\theta\ne0\)). Independence of \(\hat\theta_1,\hat\theta_2\) is not needed — linearity holds for any random variables with finite expectation. Independence would matter only for the variance of the combination; choosing the weights to make that variance small is Sheet 10 Ex 4 (§2.2). The same item is also on §2.1.
SoSe 2025, Problem 4a — mle for Poisson SoSe25 · P4a · 4 credits
Task. \(X_1,\dots,X_n\) iid \(\Poi(\lambda)\), \(\lambda>0\) unknown. Derive \(\hat\lambda_{\text{mle}}\) explicitly. (Hint in the exam: the pmf is \(e^{-\lambda}\frac{\lambda^x}{x!}\) on \(\N_0\), with mean and variance \(\lambda\); the derivative of \(\ln t\) is \(\frac1t\).)
Solution. Likelihood, by independence and \(e^ae^b=e^{a+b}\), \(\lambda^a\lambda^b=\lambda^{a+b}\):
\[ L(\lambda\mid x)=\prod_{i=1}^ne^{-\lambda}\frac{\lambda^{x_i}}{x_i!}=\frac{e^{-n\lambda}\lambda^{\sum_ix_i}}{\prod_ix_i!} . \]Log-likelihood (log of a quotient is the difference of logs):
\[ \ell(\lambda\mid x)=-n\lambda+\Bigl(\sum_{i=1}^nx_i\Bigr)\ln\lambda-\ln\Bigl(\prod_{i=1}^nx_i!\Bigr) . \]The last term does not contain \(\lambda\), so its derivative is 0:
\[ \frac{\mathrm d\ell}{\mathrm d\lambda}=-n+\frac1\lambda\sum_{i=1}^nx_i\overset!=0\iff\lambda=\frac1n\sum_{i=1}^nx_i=\bar x_n . \]Second derivative \(\frac{\mathrm d^2\ell}{\mathrm d\lambda^2}=-\frac{\sum x_i}{\lambda^2}<0\), so this is a maximum (and, being negative for all \(\lambda>0\), the global one). Hence \(\hat\lambda_{\text{mle}}=\bar X_n\).
Verification. The official solution is correct. One edge case it skips: "\(-\frac{\sum x_i}{\lambda^2}<0\)" needs \(\sum x_i>0\). If all observations are 0, \(\ell(\lambda)=-n\lambda\) is strictly decreasing on \((0,\infty)\) and has no maximum there — the mle would be \(\lambda=0\), which is outside \(\Theta\). This has probability \(e^{-n\lambda}\), tiny for large \(n\); a remark in the exam would be a bonus, not required. Example: calls in 8 intervals \(3,5,2,4,6,3,4,5\) give \(\hat\lambda=\frac{32}8=4\) (preset in the log-likelihood widget).
SoSe 2025, Problem 4b — is it unbiased? SoSe25 · P4b · 2 credits
Solution. Yes. \(\E[\hat\lambda_{\text{mle}}]=\E[\bar X_n]=\frac1n\sum_{i=1}^n\E[X_i]=\frac1n\cdot n\lambda=\lambda\) for every \(\lambda>0\) (linearity; the Poisson mean is \(\lambda\)). mles are not unbiased in general (Sheet 10 Ex 1, 2), but this one is a sample mean, and sample means are unbiased for the mean (Example 3.21(i)). The official solution says the same and is correct.
SoSe 2025, Problem 4c — clt approximation of the mle SoSe25 · P4c · 2 credits
Task. Use the clt to find the approximate distribution of \(\hat\lambda_{\text{mle}}\) for large \(n\).
Solution. The \(X_i\) are iid with \(\E[X_i]=\lambda\) and \(\Var[X_i]=\lambda\in(0,\infty)\), so the clt (§2.4) applies: \(\frac{\bar X_n-\lambda}{\sqrt{\lambda/n}}\xrightarrow d\mathcal N(0,1)\), equivalently \(\sqrt n(\bar X_n-\lambda)\xrightarrow d\mathcal N(0,\lambda)\). For large \(n\) this is read as
\[ \hat\lambda_{\text{mle}}=\bar X_n\ \approx\ \mathcal N\Bigl(\lambda,\frac\lambda n\Bigr) . \]Verification. The official answer \(\bar X_n\approx\mathcal N(\lambda,\lambda/n)\) is correct as an approximation. Remember (Remark 2.65, §2.4) that "\(\xrightarrow d\mathcal N(\lambda,\lambda/n)\)" would be wrong notation — write "\(\approx\)" or the \(\sqrt n\) form. Numbers: \(\lambda=4\), \(n=100\) gives standard deviation \(\sqrt{0.04}=0.2\). In the language of Definition 3.20(v): the mle is asymptotically normal with \(V(\lambda)=\lambda\), matching Remark 3.30(ii). Part d (a test built on this) belongs to §3.3.
WiSe 25/26, Problem 4a — mle for the rainfall density \(\frac1{\theta^2}xe^{-x/\theta}\) WiSe25 · P4a · 4 credits
Task. Rainfall amounts \(X_1,\dots,X_n\) iid with density \(p_\theta(x)=\frac1{\theta^2}xe^{-x/\theta}\) on \(\R_{\ge0}\), \(\theta>0\). Show by a full derivation that \(\hat\theta_{\text{mle}}=\frac1{2n}\sum_{i=1}^nX_i\).
Solution. For data \(x\in\R_{\ge0}^n\) (with all \(x_i>0\), which has probability 1):
\[ L(\theta\mid x)=\prod_{i=1}^n\frac1{\theta^2}x_ie^{-x_i/\theta}=\theta^{-2n}\Bigl(\prod_{i=1}^nx_i\Bigr)\exp\Bigl(-\frac1\theta\sum_{i=1}^nx_i\Bigr) . \]Log-likelihood: \(\ln\theta^{-2n}=-2n\ln\theta\), \(\ln\prod x_i=\sum\ln x_i\) (a constant in \(\theta\)), \(\ln e^s=s\):
\[ \ell(\theta\mid x)=-2n\ln\theta-\frac1\theta\sum_{i=1}^nx_i+\sum_{i=1}^n\ln x_i . \]Derivative, with \((\ln\theta)'=\frac1\theta\) and \((\frac1\theta)'=-\frac1{\theta^2}\); write \(s=\sum x_i>0\):
\[ \frac{\mathrm d\ell}{\mathrm d\theta}=-\frac{2n}\theta+\frac s{\theta^2}=\frac{-2n\theta+s}{\theta^2}\overset!=0\iff\theta=\frac s{2n}=\frac1{2n}\sum_{i=1}^nx_i . \]Second-derivative check. \(\bigl(-\frac{2n}\theta\bigr)'=\frac{2n}{\theta^2}\) and \(\bigl(\frac s{\theta^2}\bigr)'=-\frac{2s}{\theta^3}\), so
\[ \frac{\mathrm d^2\ell}{\mathrm d\theta^2}=\frac{2n}{\theta^2}-\frac{2s}{\theta^3}=\frac2{\theta^3}(n\theta-s) . \]At \(\hat\theta=\frac s{2n}\): \(n\hat\theta-s=\frac s2-s=-\frac s2<0\), and \(\frac2{\hat\theta^3}>0\), so \(\ell''(\hat\theta)<0\): a maximum. Hence \(\hat\theta_{\text{mle}}=\frac1{2n}\sum_{i=1}^nX_i\).
Verification and one gap. The official solution is correct and matches this line by line. Note that \(\ell''\) is not negative everywhere here (it is positive for \(\theta>\frac sn\)), so the second-derivative check alone only proves a local maximum. The global statement follows from the sign of \(\ell'=\frac{s-2n\theta}{\theta^2}\): positive for \(\theta<\hat\theta\), negative for \(\theta>\hat\theta\) (sign check, primer box 1). One extra line in the exam makes the argument complete. Plausibility: this density is \(\Gamma(2,\frac1\theta)\) with mean \(2\theta\), so \(\bar X_n\approx2\theta\), i.e. \(\theta\approx\frac{\bar X_n}2\) — exactly the mle. Parts b, c, d (Chebyshev and clt for this estimator) are also on §2.2 and §2.4; the estimation side is solved in the next box.
WiSe 25/26, Problem 4b–d — bias, variance, consistency and asymptotic normality of the rainfall mle WiSe25 · P4b WiSe25 · P4c WiSe25 · P4d · 3 + 3 + 1 credits
Tasks. For \(\hat\theta_{\text{mle}}=\frac1{2n}\sum_{i=1}^nX_i\) from P4a: (b) use the Chebyshev inequality to bound the probability that the estimate deviates from the true \(\theta\) by at least \(\varepsilon>0\); (c) use the clt to approximate the distribution of \(\hat\theta_{\text{mle}}\) by a Gaussian and approximate \(\P(|\hat\theta_{\text{mle}}-\theta|\ge\varepsilon)\) in terms of the standard normal cdf \(\Phi\); (d) comment on the key differences between (b) and (c). Hint for (b), (c): \(\E[X_i]=2\theta\), \(\Var[X_i]=2\theta^2\).
Step 1 — bias and variance (needed by both (b) and (c)). By linearity of expectation, \(\E[\hat\theta_{\text{mle}}]=\frac1{2n}\sum_{i=1}^n\E[X_i]=\frac1{2n}\cdot n\cdot2\theta=\theta\), for every \(\theta>0\): the mle is unbiased, bias 0. For the variance, a constant factor \(c\) comes out squared, \(\Var[cY]=c^2\Var[Y]\), and for independent \(X_i\) variances add (§2.1):
\[ \Var[\hat\theta_{\text{mle}}]=\frac1{(2n)^2}\sum_{i=1}^n\Var[X_i]=\frac{n\cdot2\theta^2}{4n^2}=\frac{\theta^2}{2n} . \]Because the bias is 0, the bias–variance decomposition (Definition 3.20(iv)) gives \(\operatorname{mse}[\hat\theta_{\text{mle}}]=\Var[\hat\theta_{\text{mle}}]+0^2=\frac{\theta^2}{2n}\).
(b) Chebyshev. The Chebyshev inequality (§2.2) says \(\P(|Y-\E[Y]|\ge\varepsilon)\le\frac{\Var[Y]}{\varepsilon^2}\) for a random variable \(Y\) with finite variance and any \(\varepsilon>0\). With \(Y=\hat\theta_{\text{mle}}\) and \(\E[Y]=\theta\) from Step 1:
\[ \P_\theta\bigl(|\hat\theta_{\text{mle}}-\theta|\ge\varepsilon\bigr)\le\frac{\theta^2}{2n\varepsilon^2} . \]Consequence for estimation (mine; not asked): the right side tends to 0 as \(n\to\infty\) for every fixed \(\varepsilon>0\) and every \(\theta\), so \(\hat\theta_{\text{mle}}\xrightarrow\P\theta\): the estimator is consistent (Definition 3.20(ii)). This is the "mse \(\to0\)" test above in action; the lln gives even strong consistency, since \(\hat\theta_{\text{mle}}=\frac12\bar X_n\to\frac12\cdot2\theta\) almost surely.
(c) clt. The \(X_i\) are iid with finite mean \(2\theta\) and finite, non-zero variance \(2\theta^2\), so the clt (§2.4) applies to their average. \(\hat\theta_{\text{mle}}\) is the average divided by 2, so after standardising with the mean and variance from Step 1,
\[ \frac{\hat\theta_{\text{mle}}-\theta}{\sqrt{\Var[\hat\theta_{\text{mle}}]}}=\frac{\hat\theta_{\text{mle}}-\theta}{\theta/\sqrt{2n}}\xrightarrow{d}\mathcal N(0,1), \qquad\text{i.e.}\qquad \hat\theta_{\text{mle}}\approx\mathcal N\Bigl(\theta,\frac{\theta^2}{2n}\Bigr)\ \text{for large }n . \](The two fractions are the same because the standardisation of \(\frac12\bar X_n\) equals that of \(\bar X_n\): the factor \(\frac12\) cancels between numerator and denominator.) Write \(Z\) for a standard normal variable. The event \(|\hat\theta_{\text{mle}}-\theta|\ge\varepsilon\) is, after dividing by \(\theta/\sqrt{2n}>0\), the event \(|Z_n|\ge\frac{\sqrt{2n}\,\varepsilon}\theta\) for the standardised variable \(Z_n\approx Z\). The two tails \(Z\ge a\) and \(Z\le-a\) have the same probability \(\Phi(-a)\) by symmetry of \(\mathcal N(0,1)\), so
\[ \P_\theta\bigl(|\hat\theta_{\text{mle}}-\theta|\ge\varepsilon\bigr)\approx2\,\Phi\Bigl(-\frac{\sqrt{2n}\,\varepsilon}\theta\Bigr) . \]In the language of this page: \(\sqrt n(\hat\theta_{\text{mle}}-\theta)\xrightarrow d\mathcal N\bigl(0,\frac{\theta^2}2\bigr)\), so the mle is asymptotically normal with asymptotic variance \(V(\theta)=\frac{\theta^2}2\) (Definition 3.20(v), Remark 3.30(ii)).
(d) Differences. Chebyshev uses only the variance and is a guaranteed upper bound for every \(n\), but it can be loose and decays only like \(\frac1n\). The clt value is only an approximation (valid for large \(n\)), but it is usually much sharper and decays much faster (like the tail of a normal distribution, faster than any power of \(\frac1n\)). Numbers for \(\theta=1\), \(n=50\), \(\varepsilon=0.2\): Chebyshev gives \(\frac1{2\cdot50\cdot0.04}=0.25\); the clt gives \(2\Phi(-\sqrt{100}\cdot0.2)=2\Phi(-2)\approx0.0455\); a simulation with 200 000 repetitions gives \(\approx0.045\). The bound is true but more than five times too large.
Verification. The official solutions of (b), (c), (d) are correct and give the same formulas. Extra link to Overview 3.32: for one observation, \(\ell(\theta\mid x)=-2\ln\theta+\ln x-\frac x\theta\), so \(\frac{\partial^2\ell}{\partial\theta^2}=\frac2{\theta^2}-\frac{2x}{\theta^3}\) and \(I_1(\theta)=-\E\bigl[\frac2{\theta^2}-\frac{2X}{\theta^3}\bigr] =-\frac2{\theta^2}+\frac{2\cdot2\theta}{\theta^3}=\frac2{\theta^2}\). The Cramér–Rao bound for \(n\) observations is \(\frac1{nI_1(\theta)}=\frac{\theta^2}{2n}\) — exactly \(\Var[\hat\theta_{\text{mle}}]\). So this mle is unbiased and attains the bound: it is efficient, hence the mvue; and \(V(\theta)=\frac{\theta^2}2=I_1(\theta)^{-1}\), as Remark 3.30(ii) predicts.
In words: the rainfall mle is right on average, its error shrinks like \(\theta/\sqrt{2n}\), it becomes exact as the data grow, and for large \(n\) its errors look normal. Chebyshev guarantees a bound; the clt gives a much smaller, approximate value.
WiSe 25/26, Problem 5b, 5c — the empirical cdf as an estimator WiSe25 · P5b WiSe25 · P5c · 2 + 2 credits
Setting. \(X_1,\dots,X_n\) iid with cdf \(F:=F_{X_1}\) (the cdf \(F(t)=\P(X_1\le t)\)). For a fixed \(t\in\R\), the empirical cdf [empirische Verteilungsfunktion] \(\hat F_n(t)=\frac1n\sum_{i=1}^n\chi_{(-\infty,t]}(X_i)\) is the fraction of data points \(\le t\) (\(\chi_A\) = indicator of \(A\), 1 inside and 0 outside). Part (a) shows \(n\hat F_n(t)\sim\Bin(n,F(t))\) (full solution on §2.1): each indicator is \(\Ber(F(t))\), and they are independent — \(\Bin(n,p)\) being the binomial distribution (§1.2), the number of successes in \(n\) independent trials each with success probability \(p\), with mean \(np\) and variance \(np(1-p)\). (b) Is \(\hat F_n(t)\) an unbiased estimator of \(F(t)\)? (c) Compute \(\operatorname{mse}[\hat F_n(t)]\).
(b) Yes. The mean of \(\Bin(n,p)\) is \(np\), so \(\E[n\hat F_n(t)]=nF(t)\), and dividing by the constant \(n\) (linearity) gives \(\E[\hat F_n(t)]=F(t)\), for every possible distribution of the data: unbiased.
(c) Because it is unbiased, mse = variance (bias–variance decomposition with bias 0). The variance of \(\Bin(n,p)\) is \(np(1-p)\), and \(\Var[\frac1nY]=\frac1{n^2}\Var[Y]\):
\[ \operatorname{mse}[\hat F_n(t)]=\Var[\hat F_n(t)]=\frac{nF(t)(1-F(t))}{n^2}=\frac{F(t)\bigl(1-F(t)\bigr)}n . \]Estimation properties (not asked). The mse tends to 0, so \(\hat F_n(t)\) is consistent (mse test above); by the slln it is even strongly consistent, since it is the sample mean of the iid \(\Ber(F(t))\) indicators. By the clt it is asymptotically normal with \(V=F(t)(1-F(t))\) — the basis of the confidence interval in part (d) on §3.4. Numbers: \(n=100\), \(F(t)=0.3\): mse \(=\frac{0.21}{100}=0.0021\). The official solutions are correct.
SoSe 2026, Problem 1e — does the mle have the smallest mse? SoSe26 · P1e · 1 credit
Statement. Let \((\R,\mathcal B,\mathcal P_\Theta)\) be a statistical model, \(\hat\theta_n^{(\text{mle})}\) the mle for \(\theta\) and \(\hat\theta_n\) any other estimator. Then for every finite \(n\) and every \(\theta\in\Theta\), \(\operatorname{mse}[\hat\theta_n^{(\text{mle})}]\le\operatorname{mse}[\hat\theta_n]\). True or false?
Answer: False (official answer, correct). The good properties of the mle are asymptotic (Remark 3.30); for finite \(n\) there are no such guarantees. To refute a "for every" claim, one concrete case is enough:
- Uniform (Example 3.24). \(\Unif(0,\theta)\) with \(\theta=1\), \(n=2\): the mle \(X_{(2)}\) has \(\operatorname{mse}=\frac{2}{3\cdot4}=\frac16\approx0.167\), while \(\frac32X_{(2)}\) has \(\operatorname{mse}=\frac1{2\cdot4}=0.125\). Smaller.
- Normal mean, many dimensions (Example 3.25): James–Stein beats the mle \(X\) for every \(\mu\) when \(d\ge3\).
- Trivial: the constant estimator \(\hat\theta\equiv\theta_0\) has mse 0 at \(\theta=\theta_0\), while the mle's mse there is positive (e.g. \(\frac\lambda n\) for Poisson). This alone refutes the "every \(\theta\)" claim.
Example 3.31 shows the other direction: there the mle \(\hat\sigma^2\) beats the unbiased \(S_n^2\). So the mle is sometimes better, sometimes worse at finite \(n\) — exactly why the statement is false.
SoSe 2026, Problem 5b — mle in randomized response SoSe26 · P5b · 3 credits
Setting. A sensitive attribute \(A\sim\Ber(p)\), \(p\in[0,1]\) unknown. With probability \(r\in(0,1]\) (known) a participant answers truthfully, otherwise reports a fair coin flip. Part (a): each answer is \(Y\sim\Ber(q)\) with \(q=q(p)=rp+\frac{1-r}2\), and \(p\) is identifiable because \(p\mapsto q(p)\) is injective for \(r>0\). We observe iid \(Y_1,\dots,Y_n\), \(\bar y_n=\frac1n\sum y_i\). Task (b): assuming \(\bar y_n\in\bigl[\frac{1-r}2,\frac{1+r}2\bigr]\), derive the mle for \(p\). (Hint: the Bernoulli mle is the sample mean.)
Solution. Step 1 — likelihood. With \(k=\sum y_i\), exactly as in Example 3.29(i), as a function of \(p\):
\[ L(p\mid y)=q(p)^{k}\bigl(1-q(p)\bigr)^{n-k},\qquad q(p)=rp+\tfrac{1-r}2 . \]Step 2 — maximise in terms of \(q\). As \(p\) runs through \([0,1]\), \(q(p)\) runs through the interval \(\bigl[\frac{1-r}2,\frac{1+r}2\bigr]\) (plug in \(p=0\) and \(p=1\); the map is increasing and affine). The Bernoulli likelihood \(q^k(1-q)^{n-k}\) increases for \(q<\bar y_n\) and decreases for \(q>\bar y_n\) (Example 3.29(i)). By assumption \(\bar y_n\) lies in the reachable interval, so the best reachable \(q\) is \(\hat q=\bar y_n\).
Step 3 — translate back. Solve \(\bar y_n=r\hat p+\frac{1-r}2\) for \(\hat p\) (subtract \(\frac{1-r}2\), divide by \(r>0\)):
\[ \hat p_{\text{mle}}=\frac{\bar Y_n-\frac{1-r}2}r . \]The assumption on \(\bar y_n\) makes this lie in \([0,1]\): \(\bar y_n\ge\frac{1-r}2\) gives \(\hat p\ge0\), and \(\bar y_n\le\frac{1+r}2\) gives \(\hat p\le\frac{r}{r}=1\). This is the invariance property (Remark 3.30(iv)) for the one-to-one map \(p\mapsto q(p)\).
Alternative by calculus (for \(\hat p\) inside \((0,1)\)): by the chain rule, \(\frac{\mathrm d\ell}{\mathrm dp}=\frac{\mathrm d\ell}{\mathrm dq}\cdot\frac{\mathrm dq}{\mathrm dp}=\frac{k-nq}{q(1-q)}\cdot r\), which is 0 exactly when \(q=\frac kn=\bar y_n\), positive before and negative after — same answer. Numbers (from part d of the same exam): \(r=\frac12\), 64 of 100 answers are 1, so \(\bar y=0.64\in[0.25,0.75]\) and \(\hat p=\frac{0.64-0.25}{0.5}=0.78\). If the assumption fails, e.g. \(\bar y_n<\frac{1-r}2\), the likelihood is decreasing on the whole reachable range and the mle is the boundary value \(\hat p=0\) (similarly \(\hat p=1\) above) — the unrestricted formula would give a negative "probability".
Verification. The official solution is correct; its step "the Bernoulli likelihood is maximised at \(\hat q=\bar y_n\)" silently needs \(\bar y_n\) to be a reachable \(q\), which is exactly the assumption given. Part (c) follows in the next box (also on §2.1); part (d) (a test) is on §3.3.
SoSe 2026, Problem 5c — randomized response: unbiasedness and variance SoSe26 · P5c · 2 credits
Task. Same setting as P5b: \(Y_1,\dots,Y_n\) iid \(\Ber(q)\) with \(q=q(p)=rp+\frac{1-r}2\), \(r\in(0,1]\) known. Show that \[ \hat p:=\frac{\bar Y_n-\frac{1-r}2}r \] is unbiased for \(p\) and compute \(\Var[\hat p]\).
Unbiased. Each \(Y_i\sim\Ber(q)\) has mean \(q\), so by linearity \(\E[\bar Y_n]=\frac1n\cdot nq=q\). Linearity again (a constant is subtracted, then everything is divided by the constant \(r\)):
\[ \E[\hat p]=\frac{\E[\bar Y_n]-\frac{1-r}2}r=\frac{q(p)-\frac{1-r}2}r=\frac{rp}r=p\qquad\text{for every }p\in[0,1] . \]Variance. A \(\Ber(q)\) variable has variance \(q(1-q)\); for independent \(Y_i\), \(\Var[\bar Y_n]=\frac1{n^2}\cdot n\,q(1-q)=\frac{q(1-q)}n\). Subtracting a constant does not change a variance, and dividing by \(r\) multiplies it by \(\frac1{r^2}\) (\(\Var[aY+b]=a^2\Var[Y]\)):
\[ \Var[\hat p]=\frac1{r^2}\Var[\bar Y_n]=\frac{q(p)\bigl(1-q(p)\bigr)}{n\,r^2} . \]Estimation view (not asked). Since \(\hat p\) is unbiased, \(\operatorname{mse}[\hat p]=\Var[\hat p]\to0\), so \(\hat p\) is consistent. The factor \(\frac1{r^2}\) is the price of privacy: with \(r=\frac12\) you need four times as many participants as with direct questions (\(r=1\)) for the same variance — in fact even more, because \(q(1-q)\) moves towards \(\frac14\). Numbers from part (d): \(r=\frac12\), \(n=100\), \(\bar y=0.64\) give \(\hat p=0.78\) and an estimated standard deviation \(\sqrt{0.64\cdot0.36/(100\cdot0.25)}\approx0.096\).
Subtle point: \(\hat p\) and the mle are not always the same. P5b assumed \(\bar y_n\in[\frac{1-r}2,\frac{1+r}2]\); then the mle equals \(\hat p\). Without that assumption the mle is \(\hat p\) cut off at 0 and 1 (see P5b), because \(\hat p\) itself can be negative or above 1 — for example \(r=\frac12\), \(n=4\), all answers 0 gives \(\hat p=\frac{0-0.25}{0.5}=-0.5\). So \(\hat p\) is unbiased but can leave \([0,1]\); the cut-off mle always lies in \([0,1]\) but is (slightly) biased near \(p=0\) and \(p=1\). This is another instance of "mles need not be unbiased". The official solution is correct for the task as posed.
Summary sheet
Definitions
- estimator / estimate
- statistic \(\hat\theta=T(X_1,\dots,X_n)\) (random) / its value \(T(x_1,\dots,x_n)\) (a number)
- bias
- \(\E[\hat\theta]-\theta\); unbiased: 0 for all \(\theta\in\Theta\)
- consistent
- \(\hat\theta_n\xrightarrow\P\theta\); strongly: a.s.
- mse
- \(\E[(\hat\theta-\theta)^2]=\Var[\hat\theta]+\operatorname{bias}^2\)
- asympt. normal
- \(\sqrt n(\hat\theta_n-\theta)\xrightarrow d\mathcal N(0,V(\theta))\)
- mvue
- smallest variance among all unbiased estimators; blue: among linear unbiased ones
- mle
- \(\hat\theta_{\text{mle}}\in\arg\max_\theta L(\theta\mid x)=\arg\max_\theta\ell(\theta\mid x)\)
Results to know
- sample mean
- unbiased, strongly consistent, \(\Var=\sigma^2/n\), asymptotically normal (\(V=\sigma^2\))
- variance
- \(\E[\frac1n\sum(X_i-\bar X)^2]=\frac{n-1}n\sigma^2\); \(S_n^2\) (divide by \(n-1\)) unbiased; normal data: mse \(\frac{2\sigma^4}{n-1}\) vs \(\frac{(2n-1)\sigma^4}{n^2}\)
- uniform
- \(\E[X_{(n)}]=\frac n{n+1}\theta\); \(\frac{n+1}nX_{(n)}\) is the mvue, \(\Var=\frac{\theta^2}{n(n+2)}\); \(\Var[2\bar X_n]=\frac{\theta^2}{3n}\)
- consistency test
- mse → 0 ⟹ consistent (Markov); bias → 0 alone is not enough
- combinations
- \(a\hat\theta_1+b\hat\theta_2\) unbiased for all θ iff \(a+b=1\) (linearity, no independence needed)
- unbiased by scaling
- toasters: \(\hat d=\frac{n}{2}\omega\); randomized response: \(\hat p=(\bar Y_n-\frac{1-r}2)/r\), \(\Var=\frac{q(1-q)}{nr^2}\); empirical cdf: mse \(\frac{F(t)(1-F(t))}n\)
- rainfall mle
- \(\frac1{2n}\sum X_i\): unbiased, \(\Var=\operatorname{mse}=\frac{\theta^2}{2n}\), \(V(\theta)=\frac{\theta^2}2\), attains the crlb
- mle table
- Ber, Poi: \(\bar X_n\); Exp: \(1/\bar X_n\); normal: \(\bar X_n\), \(\frac1n\sum(X_i-\bar X_n)^2\); Unif(0,θ): \(X_{(n)}\); \(2c^2/x^3\): \(\min X_i\); rainfall \(xe^{-x/\theta}/\theta^2\): \(\bar X_n/2\)
- mle properties
- asymptotic: consistent, asymptotically normal (\(V(\theta)=I_1(\theta)^{-1}\), the inverse Fisher information of one observation), asymptotically efficient; invariance \(g(\hat\theta)\); finite \(n\): no guarantees
- outlook
- Fisher information, crlb \(\Var[\hat\theta]\ge1/I_n(\theta)=\frac1{n\,I_1(\theta)}\), efficient ⟹ mvue, Rao–Blackwell, Gauss–Markov
Methods
- mle: product → log → derivative = 0 → check maximum (second derivative or, better, sign of \(\ell'\)).
- Support depends on \(\theta\): indicators → condition on \(\theta\) → monotone → boundary (sample max/min).
- Distribution of \(\max\): \(\P(\max\le t)=\prod\P(X_i\le t)\); of \(\min\): \(\P(\min>t)=\prod\P(X_i>t)\).
- Reparametrised model: maximise in the convenient parameter, translate back (invariance).
Traps
- Asymptotically unbiased does not imply consistent (official Sheet 10 Ex 2 slip; \(X_1\) counterexample).
- mle ≠ smallest mse at finite \(n\) (SoSe26 P1e).
- \(\ell''<0\) at the critical point proves only a local maximum.
- Differentiate in \(\sigma^2\), not \(\sigma\), when the parameter is \(\sigma^2\).
Exam focus
Every exam so far had an mle derivation (SoSe25 P4a Poisson, WiSe25 P4a rainfall, SoSe26 P5b randomized response), followed by unbiasedness/variance, a Chebyshev bound or a clt approximation of the same estimator. Short items so far: unbiasedness of a weighted combination (SoSe25 P1b), unbiasedness and mse of the empirical cdf (WiSe25 P5b, c), and a true/false item on finite-\(n\) optimality of the mle (SoSe26 P1e). This describes past exams only.
Self-test
Section 3.3 · after Lecture 9 (the script marks no lecture numbers after Lecture 9)
Hypothesis testing
Hypothesentests
What this page covers Script §3.3, pp. 100–110
This page covers everything from Overview 3.33 to Overview 3.53. The script states the goal of the section like this: "Hypothesis testing provides a formal framework for making decisions about claims on population (true) parameters based on sample data/observations. We formulate a 'null hypothesis' (H0), often representing a default state, no effect, or a statement to be falsified, and an 'alternative hypothesis' (H1), representing the claim we wish to support. Then we use the observed data to decide (ideally with high confidence) whether we can reject the null hypothesis."
There are four parts: (1) the building blocks of a test — hypotheses, test, rejection region, the two kinds of error, level, power (Overview 3.33 – Convention 3.37); (2) optimal tests and the Neyman–Pearson lemma (Definition 3.38 – Example 3.41); (3) how tests are built in practice, with the z-test, the t-test, the χ²-test and the two-sample t-test (Viewpoint 3.42 – Remark 3.47); (4) p-values, how they are misread, p-hacking, and an outlook (Definition 3.48 – Overview 3.53).
Worked in place: Sheet 11 Ex 1, 2, 3, 4 (Sheet 11 itself has no confidence-interval part; §3.4 re-reads Ex 1 and Ex 3 as intervals: Ex 1 as a ci, Ex 3 as a ci, and the test–interval duality Remark 3.59 is at §3.4), and the old-exam tasks SoSe25 P1c, SoSe25 P4d and SoSe26 P5d. The earlier parts of those exam problems (the maximum-likelihood estimator, abbreviated mle, and the central-limit-theorem approximation, abbreviated clt — SoSe25 P4a–c and SoSe26 P5b–c) are on §3.2; SoSe26 P5a is on §1.4.
The big picture
A friend hands you a coin and says "it is fair". You are suspicious. You toss it 100 times and count heads. How many heads would make you say "I do not believe you"?
Hypothesis testing turns this gut feeling into a rule. It works like a court of law:
- The null hypothesis [Nullhypothese] \(H_0\) is the "defendant is innocent" statement — here "the coin is fair". We keep believing it unless the evidence is strong.
- The alternative [Alternativhypothese] \(H_1\) is what we suspect — "the coin is not fair".
- We compute how surprising the data would be if \(H_0\) were true. If the data would be very surprising, we reject \(H_0\) ("guilty"). Otherwise we do not reject it ("not proven guilty") — which is not the same as "proven innocent".
Numbers (my example). Let \(S\) be the number of heads in 100 tosses. If the coin is fair, one toss has mean \(\frac12\) and standard deviation \(\frac12\), so \(S\) has mean \(100\cdot\frac12=50\) and standard deviation \(\sqrt{100}\cdot\frac12=5\). By the central limit theorem (clt, §2.4) \(S\) is roughly normally distributed. We measure the surprise by the number of standard deviations between the observed count and 50, the standardised value \(z=\frac{S-50}{5}\), and by the probability that a fair coin gives a result at least this far from 50 (the p-value, Definition 3.48 below):
| heads observed | \(z=\frac{S-50}5\) | p-value (clt) | p-value (exact binomial) | verdict at "5 %" |
|---|---|---|---|---|
| 55 | 1 | 0.317 | 0.368 | not surprising — do not reject |
| 60 | 2 | 0.046 | 0.057 | borderline — the approximation says reject, the exact value says do not |
| 65 | 3 | 0.0027 | 0.0035 | very surprising — reject |
The "5 %" is the significance level \(\alpha\) [Signifikanzniveau]: we decide in advance that we reject \(H_0\) whenever the data fall into a region that a fair coin would only produce with probability 5 %. Then, if the coin really is fair, we wrongly accuse it in only 5 % of all experiments. That wrong accusation is the type I error. The opposite mistake — not noticing that the coin is biased — is the type II error.
In words: a test asks "could the data plausibly have come from \(H_0\)?". If the answer is "only with a tiny probability", we reject \(H_0\). The small print (the row with 60 heads) shows that the answer depends on how well we know the distribution of our statistic under \(H_0\).
Primer: what you need from earlier My addition
Cross-references
Natural logarithm and its monotonicity: Analysis 5.2. Antiderivatives (for integrating the exponential density): Analysis 8.3. The normal, \(t\) and \(\chi^2\) distributions: §1.3. Quantiles: §2.1. Affine maps of Gaussians (standardising): §2.3. The clt: §2.4. Bayes' theorem: §1.4. Measurable maps: B4. Statistical models, statistics and the likelihood: §3.1. Estimators, the sample variance, the mle: §3.2.
0. Words and symbols from §3.1 and §3.2 used on this page
- Parameter space \(\Theta\) (Theta): the set of all parameter values we consider possible, e.g. \(\Theta=\R\) for an unknown mean. A single parameter value is written \(\theta\) (theta).
- Statistical model \((\Omega,\Aa,\P_\Theta)\) (Definition 3.4, §3.1): a sample space \(\Omega\) of possible observations, its events \(\Aa\), and a whole family \(\P_\Theta=(\P_\theta)_{\theta\in\Theta}\) of candidate distributions, one for each parameter value. The model is well-specified if one of the \(\P_\theta\) is the true distribution of the data; that \(\theta\) is the true parameter.
- \(\P_\theta(\cdot)\) and \(\E_\theta[\cdot]\): probability and expectation computed as if \(\theta\) were the true parameter. Example: \(\P_{\mu_0}(\bar X_n>c)\) is "the probability that the sample mean exceeds \(c\), if the true mean is \(\mu_0\)".
- Sample \(X=(X_1,\dots,X_n)\): the random data (before we look), usually iid (independent and identically distributed). The observed data are the numbers \(x=(x_1,\dots,x_n)\). Capital letter = random, small letter = the value we actually saw. \(\Omega^n\) is the set of all possible data vectors of length \(n\).
- Statistic (Definition 3.6): any function \(T(X)\) of the data alone, e.g. the sample mean \(\bar X_n=\frac1n\sum_{i=1}^nX_i\) and the sample variance \(S_n^2=\frac1{n-1}\sum_{i=1}^n(X_i-\bar X_n)^2\) (Example 3.7). \(S_n=\sqrt{S_n^2}\) is the sample standard deviation. Observed values are written \(\bar x_n\), \(s_n^2\), \(t_{\text{obs}}=T(x)\). A hat, as in \(\hat\theta\) or \(\hat\lambda_{\text{mle}}\), marks an estimator of the quantity under the hat — a statistic used as a guess for it (§3.2).
- Likelihood (Definition 3.13): \(L(\theta\mid x)=p(x\mid\theta)\), the probability mass function (pmf, for discrete data: \(p(x\mid\theta)=\P_\theta(X=x)\)) or density (for continuous data) of the observed data \(x\), read as a function of \(\theta\). For iid data it is the product \(\prod_{i=1}^np(x_i\mid\theta)\).
- Indicator \(\one_R(t)\) (the Greek letter chi with the set \(R\) as index, as in the script): equals 1 if \(t\in R\) and 0 otherwise (B2). Its expectation is a probability: \(\E[\one_R(T)]=1\cdot\P(T\in R)+0\cdot\P(T\notin R)=\P(T\in R)\). This fact is used all the time below.
- \(\sup\) (supremum): the smallest upper bound of a set of numbers. For a finite set, or when the largest value is attained, it is simply the maximum. Example: the set \(\{0.5,0.9,0.99,0.999,\dots\}\) has no largest element, but its supremum is 1. Full treatment: Analysis 1.2.
- \(\Theta=\Theta_0\mathbin{\dot\cup}\Theta_1\) (the script writes a small circle over the union sign): \(\Theta\) is split into two parts with no overlap (\(\Theta_0\cap\Theta_1=\emptyset\)) that together give all of \(\Theta\) — a partition. \(|\Theta_0|\) is the number of elements of \(\Theta_0\).
- Measurable map (B4): a technical condition which guarantees that \(\varphi(X)\) is again a random variable, so that \(\E_\theta[\varphi(X)]\) makes sense. Every formula-defined test on this page is measurable; you never have to check it in exercises.
1. The standard normal: \(\Phi\), standardising, and the upper quantiles \(z_\alpha\)
\(Z\sim\mathcal N(0,1)\) means \(Z\) is normally distributed with mean 0 and variance 1. Its cumulative distribution function [Verteilungsfunktion], abbreviated cdf — the function that returns, for each number \(z\), the probability of landing at or below \(z\) — is \(\Phi(z)=\P(Z\le z)\) (the area under the bell curve to the left of \(z\)). There is no closed formula; exams give values. The bell curve is symmetric about 0, so \(\Phi(-z)=1-\Phi(z)\).
Standardising (Example 2.52, §2.3): if \(Y\sim\mathcal N(m,s^2)\), then \(\frac{Y-m}{s}\sim\mathcal N(0,1)\). So \(\P(Y\le y)=\P\bigl(\frac{Y-m}s\le\frac{y-m}s\bigr)=\Phi\bigl(\frac{y-m}s\bigr)\). For iid \(X_i\sim\mathcal N(\mu,\sigma^2)\), the sample mean is again normal, \(\bar X_n\sim\mathcal N(\mu,\frac{\sigma^2}n)\) (sums of independent Gaussians are Gaussian, §2.3; mean by linearity, variance \(\frac1{n^2}\cdot n\sigma^2\)). Hence
\[ \frac{\bar X_n-\mu}{\sigma/\sqrt n}\sim\mathcal N(0,1). \]\(\sigma/\sqrt n\) is the standard error of the sample mean.
Upper quantiles (the notation of this section). A \(q\)-quantile is a point below which probability \(q\) lies (Definition 2.20, §2.1). In testing, the script writes \(z_\alpha\) for the point with probability \(\alpha\) above it:
\[ \P(Z>z_\alpha)=\alpha,\qquad\text{i.e. }z_\alpha\text{ is the }(1-\alpha)\text{-quantile of }\mathcal N(0,1),\qquad \Phi(z_\alpha)=1-\alpha . \]Watch the index: \(z_{0.05}\) is the 0.95-quantile. A two-sided test at level \(\alpha\) needs \(z_{\alpha/2}\): half of \(\alpha\) in each tail. The values you need (computed with Python/scipy):
| \(\alpha\) | 0.10 | 0.05 | 0.025 | 0.01 | 0.005 | 0.0005 |
|---|---|---|---|---|---|---|
| \(z_\alpha\) | 1.2816 | 1.6449 | 1.9600 | 2.3263 | 2.5758 | 3.2905 |
| used for | one-sided 10 % | one-sided 5 % | two-sided 5 % | one-sided 1 % | two-sided 1 % | two-sided 0.1 % |
Exam hints round these to 1.28, 1.64 (or 1.645), 1.96, 2.33, 2.576 and 3.29. Useful \(\Phi\) values: \(\Phi(1)=0.8413\), \(\Phi(2)=0.9772\), \(\Phi(3)=0.99865\), and \(1-\Phi(5)=2.87\cdot10^{-7}\).
A small \(\Phi\) table my addition, computed with Python/scipy (enough for this course's exercises; exams print the values they need):
| \(z\) | 0 | 0.17 | 0.5 | 1 | 1.28 | 1.5 | 1.645 | 1.96 | 2 | 2.326 | 2.5 | 2.576 | 3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| \(\Phi(z)\) | 0.5000 | 0.5675 | 0.6915 | 0.8413 | 0.8997 | 0.9332 | 0.9500 | 0.9750 | 0.9772 | 0.9900 | 0.9938 | 0.9950 | 0.99865 |
Negative \(z\). Tables list only \(z\ge0\). For negative arguments use the symmetry rule \(\Phi(-z)=1-\Phi(z)\). Why: the bell curve is a mirror image around 0, so the area to the left of \(-z\) equals the area to the right of \(+z\), and the area to the right of \(z\) is the total area 1 minus the area to its left, \(1-\Phi(z)\). Example: \(\Phi(-0.17)=1-\Phi(0.17)=1-0.5675=0.4325\) (used in Sheet 11 Ex 4 below).
2. Student's \(t\) and the \(\chi^2\) distribution
Both are introduced in Script 1.61 (§1.3). What you need here:
- \(\chi^2_k\) (chi-squared with \(k\) degrees of freedom): the distribution of \(Z_1^2+\dots+Z_k^2\) for independent standard normals \(Z_i\). It lives on \((0,\infty)\), has mean \(k\), and is skewed to the right.
- \(t_\nu\) (Student's \(t\) with \(\nu\) degrees of freedom, Remark 1.62): the distribution of \(\frac{Z}{\sqrt{V/\nu}}\) with \(Z\sim\mathcal N(0,1)\) and \(V\sim\chi^2_\nu\) independent. It is a bell curve centred at 0, symmetric, but with heavier tails than \(\mathcal N(0,1)\). As \(\nu\to\infty\) it approaches \(\mathcal N(0,1)\).
- Why the t appears in testing: if we do not know \(\sigma\) and replace it by the estimate \(S_n\), the standardised mean \(\frac{\bar X_n-\mu}{S_n/\sqrt n}\) is no longer exactly normal: the random denominator adds extra spread. For Gaussian data it is exactly \(t_{n-1}\) (Example 3.45 below).
Upper quantiles are written like \(z_\alpha\): \(t_{\nu,\alpha}\) has probability \(\alpha\) above it, and \(\chi^2_{k,\alpha}\) likewise. Values (scipy):
| \(\nu\) | 1 | 2 | 5 | 9 | 14 | 29 | 99 | \(\infty\) (normal) |
|---|---|---|---|---|---|---|---|---|
| \(t_{\nu,0.025}\) | 12.706 | 4.303 | 2.571 | 2.262 | 2.145 | 2.045 | 1.984 | 1.960 |
| \(t_{\nu,0.05}\) | 6.314 | 2.920 | 2.015 | 1.833 | 1.761 | 1.699 | 1.660 | 1.645 |
The \(t\) quantiles are larger than the normal ones: with an estimated \(\sigma\) you need stronger evidence before rejecting. The difference is large for small samples and vanishes for large ones.
3. Two algebra facts used in the Neyman–Pearson computations
- \(\ln\) keeps inequalities: \(\ln\) is strictly increasing (Analysis 5.2), so for positive \(a,b\): \(a>b\iff\ln a>\ln b\). Also \(\ln(e^u)=u\).
- Dividing by a negative number flips an inequality: \(-2x>6\iff x<-3\). Dividing by a positive number keeps it.
Building blocks of a test
Overview 3.33 hypothesis testing motivation Script 3.33
A statistical hypothesis is a claim about the parameters of a statistical model. We usually consider two competing claims that cannot both be true:
- The null hypothesis \(H_0\): a statement of "no effect" or "no difference", often the default or status quo. Formally it is a subset \(\Theta_0\subseteq\Theta\) of the parameter space: "the true \(\theta\) lies in \(\Theta_0\)".
- The alternative hypothesis \(H_1\) (or \(H_A\)): contradicts the null; it is the claim we want to find evidence for. It is a subset \(\Theta_1\subseteq\Theta\) with \(\Theta_0\cap\Theta_1=\emptyset\).
Given a sample \(X=(X_1,\dots,X_n)\sim\P_\Theta\), we want to decide whether the smaller model \((\Omega,\Aa,\P_{\Theta_0})\) is misspecified — whether we can conclude that the true parameter is not in \(\Theta_0\). Then we reject the null. This is a yes/no decision based only on the sample, so a test maps observed data \(x\) to \(\{0,1\}\) (reject or not).
How to design the rule. Take a real-valued statistic \(T(X)\) whose distribution we can work out (at least approximately) assuming the null is true. For the observed data we compute the number \(T(x)\), and we know which distribution it would come from if \(H_0\) held. If \(T(x)\) is exceedingly unlikely under that distribution (judged by a threshold fixed in advance), we reject the null.
In the coin example of the big picture: \(\Theta=[0,1]\) (the probability of heads), \(\Theta_0=\{0.5\}\), \(\Theta_1=[0,1]\setminus\{0.5\}\), \(T=\) number of heads, and under \(H_0\) we know \(T\sim\Bin(100,0.5)\approx\mathcal N(50,25)\).
Definition 3.34 building blocks and properties of hypothesis tests Script 3.34
Setup. \((\Omega,\Aa,\P_\Theta)\) is a statistical model and \(\Theta=\Theta_0\mathbin{\dot\cup}\Theta_1\) a partition of the parameter space.
- Simple vs composite. A hypothesis is simple [einfach] if it contains exactly one parameter, \(|\Theta_0|=1\) (or \(|\Theta_1|=1\)); its element is then called \(\theta_0\) (or \(\theta_1\)). Otherwise (\(|\Theta_{0}|>1\), resp. \(|\Theta_1|>1\)) it is composite [zusammengesetzt]. Composite hypotheses often have a special "boundary" value too, e.g. \(\Theta_0=\{\theta\in\Theta\mid\theta>\theta_0\}\).
- Which one is valid. For \(X\sim\P_\Theta\): the null \(H_0\) is valid if \((\Omega,\Aa,\P_{\Theta_0})\) is well-specified (the true parameter lies in \(\Theta_0\)). Otherwise the alternative \(H_1\) is valid.
- Test. A statistical test [Test] is a measurable map \(\varphi:\Omega^n\to[0,1]\), read as a decision rule for rejecting the null. If \(\varphi\) only takes the values 0 and 1, the test is non-randomized; otherwise it is randomized. The course focuses on non-randomized tests.
- Rejection region and errors. For a non-randomized test, \(\varphi(x)=1\) means "reject the null". The set
\(\varphi^{-1}(\{1\})=\{x\in\Omega^n\mid\varphi(x)=1\}\) is the rejection region [Ablehnungsbereich /
kritischer Bereich]. (\(\varphi^{-1}(\{1\})\) is the pre-image of \(\{1\}\): all data vectors the test sends to 1.
It does not mean an inverse function — B2. The set-builder form after the equals sign
says the same thing.)
- Type I error [Fehler 1. Art]: rejecting \(H_0\) although it is true (\(\varphi(x)=1\) while \(\P_{\Theta_0}\) is well-specified).
- Type II error [Fehler 2. Art]: not rejecting \(H_0\) although it is false (\(\varphi(x)=0\) while \(\P_{\Theta_1}\) is well-specified).
true state \ decision fail to reject \(H_0\) reject \(H_0\) \(H_0\) is true correct decision type I error \(H_1\) is true type II error correct decision - Size and level. The significance level or size [Signifikanzniveau, Umfang] of \(\varphi\) is the largest probability of a type I error: \[ \alpha:=\sup_{\theta\in\Theta_0}\E_\theta[\varphi]. \] \(\varphi\) is a test at (significance) level \(\alpha\) for a given \(\alpha\in[0,1]\) if \(\sup_{\theta\in\Theta_0}\E_\theta[\varphi]\le\alpha\).
- Power function. The power function [Gütefunktion] of the test is \[ G_\varphi:\Theta\to[0,1],\qquad\theta\mapsto\E_\theta[\varphi]. \] For \(\theta\in\Theta_1\), \(G_\varphi(\theta)\) is the power [Macht, Trennschärfe] of \(\varphi\) against the alternative \(\theta\): the probability that the alternative is recognised when it is true. The probability of a type II error at \(\theta\in\Theta_1\) is \(\beta(\theta):=1-G_\varphi(\theta)\).
How to read each part (mine).
- Why \(\E_\theta[\varphi]\) is a probability. Write \(\varphi\) short for \(\varphi(X)\). For a non-randomized test \(\varphi(X)\) is 0 or 1, i.e. the indicator of "\(X\) in the rejection region". By the indicator fact (primer 0), \(\E_\theta[\varphi]=\P_\theta(\text{reject }H_0)\). So the power function is "probability of rejecting", as a function of the true parameter. On \(\Theta_0\) its values are type I error probabilities (we want them small); on \(\Theta_1\) its values are the power (we want it large). For a randomized test the same holds: by Remark 3.36(iv) we reject with probability \(\varphi(x)\) once the data \(x\) are seen, and averaging this over the data (law of total probability, §1.4) gives \(\P_\theta(\text{reject})=\E_\theta[\varphi(X)]\).
- Why a supremum in (v). A composite null contains many parameter values, each with its own probability of wrongly rejecting. The size is the worst of them. "Level \(\alpha\)" is a promise: whatever \(\theta\in\Theta_0\) is true, we wrongly reject with probability at most \(\alpha\).
- Size vs level. The script uses "significance level" for both. Strictly, the size is the number \(\sup_{\Theta_0}\E_\theta[\varphi]\), while "at level \(\alpha\)" only asks size \(\le\alpha\). A test of size 0.01 is also a test at level 0.05.
A small example with real numbers (mine). Toss a coin 10 times; \(S\) = number of heads, \(S\sim\Bin(10,p)\). Test \(H_0:p=0.5\) (simple) against \(H_1:p>0.5\) (composite) with the rule "reject if \(S\ge9\)". So \(\varphi(x)=\one_{\{9,10\}}(S)\), and the rejection region is "9 or 10 heads".
- Size: \(G_\varphi(0.5)=\P_{0.5}(S\ge9)=\binom{10}9\frac1{2^{10}}+\binom{10}{10}\frac1{2^{10}}=\frac{10+1}{1024}=0.0107\). This is a test at level 0.05 (and even at level 0.011).
- Power against \(p=0.8\): \(G_\varphi(0.8)=10\cdot0.8^9\cdot0.2+0.8^{10}=0.376\). So \(\beta(0.8)=1-0.376=0.624\): a coin with 80 % heads is missed 62 % of the time. Ten tosses are not much evidence.
- Power against \(p=0.6\): \(G_\varphi(0.6)=0.046\), barely above the size.
How it is used. Exams ask you to state \(H_0\), \(H_1\), the test statistic, its distribution under \(H_0\), the rejection rule, the observed value and the decision (SoSe26 P5d below), or to compute \(\beta\) and the power (Sheet 11 Ex 4).
Example 3.35 hypotheses Script 3.35
- A coin with unknown probability of heads \(p\): is it fair? \(H_0:p=0.5\) (simple) versus \(H_1:p\ne0.5\) (composite).
- \(\mu\) is the average recovery time with a new drug; the current standard is \(\mu_0=10\) days. Is the new drug better? \(H_0:\mu\ge10\) (no improvement or worse) versus \(H_1:\mu<10\) (improvement). Both are composite. A simpler setup that is often used: \(H_0:\mu=10\) versus \(H_1:\mu<10\).
Note which claim goes where: the claim we want to show (the drug is better) is \(H_1\). The reason is the asymmetry of Remark 3.36: only a rejection is a strong statement, so we set things up so that rejecting \(H_0\) means "we found evidence for what we care about". In (ii), \(H_0:\mu\ge10\) and \(H_0:\mu=10\) lead to the same test, because the worst case over \(\mu\ge10\) is the boundary \(\mu=10\) (Viewpoint 3.42(iii)).
Remark 3.36 testing in practice Script 3.36
- Deliberate asymmetry. Type I and type II errors are not treated equally. We mainly want to detect "non-default situations", i.e. to detect when the null should be rejected. So in practice we first fix a desired level \(\alpha\) (which determines the rejection region), and then look for a test that (a) satisfies \(G_\varphi(\theta)\le\alpha\) for all \(\theta\in\Theta_0\) and (b) maximises \(G_\varphi(\theta)\) for all \(\theta\in\Theta_1\). We demand an upper bound on type I errors, and within that requirement minimise type II errors.
- Trade-off. For a fixed sample size \(n\), \(\alpha\) and \(\beta\) pull against each other. A smaller \(\alpha\) generally makes the rejection region smaller: more extreme observations are needed to reject. Being more conservative in this way increases the type II error \(\beta(\theta)\) for at least some alternatives, i.e. lowers the power against them. (Try it in the z-test widget below: move \(\alpha\) and watch \(\beta\).)
- Not rejecting is not accepting. Failing to reject the null does not mean accepting it or having strong evidence for it. Absence of evidence against the null is not evidence for the null. A test can have weak power regardless of its level.
- Randomized tests. When \(\varphi(x)\in(0,1)\), one rejects with probability \(\varphi(x)\): the decision is a single draw of a \(\Ber(\varphi(x))\) random variable. Randomized tests matter in the theory of "uniformly most powerful" tests (Definition 3.38).
Why one would ever randomize (my example, continuing the 10-toss test). With a discrete statistic you often cannot hit a level exactly: "reject if \(S\ge9\)" has size 0.0107, and "reject if \(S\ge8\)" has size \(\frac{56}{1024}=0.0547>0.05\). The randomized test "reject if \(S\ge9\); if \(S=8\), reject with probability \(\gamma\)" has size \(0.0107+\gamma\cdot\frac{45}{1024}\). Setting this equal to 0.05 gives \(\gamma=0.893\), and the power at \(p=0.8\) rises from 0.376 to 0.646. In practice nobody flips an extra coin to decide a medical study — but the theory needs such tests to make "most powerful at exactly level \(\alpha\)" always possible.
Convention 3.37 Script 3.37
From now on we always have a statistical model \((\Omega,\Aa,\P_\Theta)\), a partition \(\Theta=\Theta_0\mathbin{\dot\cup}\Theta_1\) into the null hypothesis \(H_0:\Theta_0\) and the alternative \(H_1:\Theta_1\), and a test \(\varphi\) of \(H_0\) against \(H_1\).
Optimal tests and the Neyman–Pearson lemma
Idea first (mine). Remark 3.36(i) says: among all tests whose type I error is at most \(\alpha\), find the one that detects the alternative most often. The next two definitions name the ideal (a test that is best against every alternative at once) and a minimal sanity requirement (never be worse than guessing). The Neyman–Pearson lemma then solves the problem completely in the simplest case: one null value against one alternative value.
Definition 3.38 uniformly most powerful test (ump) Script 3.38
Let \(\alpha\in[0,1]\). A test \(\varphi\) at level \(\alpha\) is (uniformly) most powerful [gleichmäßig bester Test] at level \(\alpha\) if for every other test \(\psi\) of \(H_0\) against \(H_1\) at level \(\alpha\):
\[ G_\varphi(\theta)\ge G_\psi(\theta)\qquad\text{for all }\theta\in\Theta_1 . \]"Uniformly" means: the same test \(\varphi\) beats every competitor at every alternative \(\theta\). That is a lot to ask; often one test is best against small effects and another against large ones, and then no ump exists (Overview 3.53(i)). When \(\Theta_1\) has only one element, "uniformly" adds nothing and one just says "most powerful". (The script's definition does not repeat that \(\varphi\) itself must be at level \(\alpha\); this is meant.)
Definition 3.39 unbiased test Script 3.39
Let \(\alpha\in[0,1]\). \(\varphi\) is unbiased [unverfälscht] at level \(\alpha\) if
\[ G_\varphi(\theta_0)\le\alpha\le G_\varphi(\theta_1)\qquad\text{for all }\theta_0\in\Theta_0,\ \theta_1\in\Theta_1 . \]Intuition (mine): the test rejects at least as often when \(H_1\) is true as when \(H_0\) is true. A biased test would reject a true null more often than some false one — worse than a coin flip that rejects with probability \(\alpha\) regardless of the data.
Counterexample (mine). Test \(H_0:\mu=\mu_0\) against the two-sided \(H_1:\mu\ne\mu_0\), but use the one-sided rule "reject if \(\frac{\bar X_n-\mu_0}{\sigma/\sqrt n}>z_\alpha\)" (Example 3.41). If the true mean is one standard error below \(\mu_0\), the standardised mean is \(\mathcal N(-1,1)\), and the power is \(\P(Z-1>1.645)=1-\Phi(2.645)=0.004<0.05\). So this test is not unbiased for the two-sided alternative. The two-sided z-test (Example 3.44) is unbiased; the power widget below shows both curves.
Theorem 3.40 Neyman–Pearson lemma (1932) Script 3.40
Assumptions. A binary statistical model \((\Omega,\Aa,(\P_{\theta_0},\P_{\theta_1}))\) — only two candidate distributions. We test the simple null \(H_0:\{\theta_0\}\) against the simple alternative \(H_1:\{\theta_1\}\). \(L(\theta\mid x)\) is the likelihood (pmf or density of the data under \(\theta\)). A level \(\alpha\in(0,1)\) is given.
Conclusion. The most powerful test at level \(\alpha\) is the likelihood ratio test (lrt) [Likelihood-Quotienten-Test], which rejects \(H_0\) if and only if
\[ \frac{L(\theta_1\mid x)}{L(\theta_0\mid x)}>k , \]where the constant \(k\) is chosen such that the test has size \(\alpha\) (the script adds: "implying that such a test exists").
Intuition (mine). We have a "budget" of \(\alpha\) probability under \(H_0\) to spend on the rejection region. Each possible data point \(x\) costs \(L(\theta_0\mid x)\) (its probability under \(H_0\)) and earns \(L(\theta_1\mid x)\) (its probability under \(H_1\), which counts towards the power). The best buy is to put into the rejection region the data points with the best earnings-per-cost ratio \(\frac{L(\theta_1\mid x)}{L(\theta_0\mid x)}\), starting with the best, until the budget \(\alpha\) is used up. The cut-off ratio is \(k\).
Why the assumptions matter. Both hypotheses must be simple: with several alternative values, the best region could depend on which alternative we aim at (then there may be no ump). "Size exactly \(\alpha\)" is essential in the proof; for discrete data such a \(k\) may not exist without randomizing (Remark 3.36(iv)) — so the script's "implying that such a test exists" really needs either continuous data or randomized tests.
Proof (for densities, non-randomized) My proof — the script states the lemma without proof
Write \(p_0(x)=L(\theta_0\mid x)\) and \(p_1(x)=L(\theta_1\mid x)\) for the densities of the data under the two hypotheses (for discrete data replace integrals by sums). Let \(\varphi(x)=1\) if \(p_1(x)>k\,p_0(x)\) and \(\varphi(x)=0\) otherwise, with \(k\ge0\) chosen so that \(\E_{\theta_0}[\varphi]=\alpha\). Let \(\psi\) be any test with values in \([0,1]\) and \(\E_{\theta_0}[\psi]\le\alpha\). We show \(\E_{\theta_1}[\varphi]\ge\E_{\theta_1}[\psi]\).
Step 1 (a pointwise inequality). For every \(x\): \[ \bigl(\varphi(x)-\psi(x)\bigr)\bigl(p_1(x)-k\,p_0(x)\bigr)\ge0 . \] Reason, case by case:
- If \(p_1(x)>kp_0(x)\): then \(\varphi(x)=1\), and \(\psi(x)\le1\), so the first bracket is \(\ge0\); the second is \(>0\). Product \(\ge0\).
- If \(p_1(x)\le kp_0(x)\): then \(\varphi(x)=0\), and \(\psi(x)\ge0\), so the first bracket is \(\le0\); the second is \(\le0\). Product of two non-positive numbers \(\ge0\).
Step 2 (integrate). Integrating a non-negative function gives a non-negative number: \[ 0\le\int(\varphi-\psi)(p_1-kp_0)\,\mathrm dx=\underbrace{\int\varphi p_1-\int\psi p_1}_{\E_{\theta_1}[\varphi]-\E_{\theta_1}[\psi]}-k\underbrace{\Bigl(\int\varphi p_0-\int\psi p_0\Bigr)}_{\E_{\theta_0}[\varphi]-\E_{\theta_0}[\psi]} . \] (Expanding the product and using linearity of the integral; \(\int\varphi p_1\,\mathrm dx\) is the expectation of \(\varphi(X)\) when \(X\) has density \(p_1\).)
Step 3 (use the sizes). Rearranging: \(\E_{\theta_1}[\varphi]-\E_{\theta_1}[\psi]\ge k\bigl(\E_{\theta_0}[\varphi]-\E_{\theta_0}[\psi]\bigr)=k\bigl(\alpha-\E_{\theta_0}[\psi]\bigr)\ge0\), because \(k\ge0\) and \(\E_{\theta_0}[\psi]\le\alpha\). So \(G_\varphi(\theta_1)\ge G_\psi(\theta_1)\): no test at level \(\alpha\) has more power. ∎
Where the assumptions were used: size exactly \(\alpha\) in step 3 (if \(\varphi\) had size below \(\alpha\), a competitor could spend the rest of the budget and win); simple hypotheses so that there is a single \(p_0\) and a single \(p_1\). (Why \(k\ge0\): for \(k<0\) every \(x\) would satisfy \(p_1>kp_0\), and the test would always reject, with size 1.)
Example 3.41 testing the mean of a Gaussian Script 3.41
Setting. \(X_1,\dots,X_n\) iid \(\mathcal N(\mu,\sigma^2)\) with unknown mean and known variance \(\sigma^2\); so \(\theta=\mu\in\Theta=\R\). Test the simple \(H_0:\{\mu_0\}\) against the simple \(H_1:\{\mu_1\}\), with \(\mu_1>\mu_0\) for concreteness.
Step 1: the likelihood ratio. The likelihood of iid normal data is \(L(\mu\mid x)=\prod_i\frac1{\sqrt{2\pi\sigma^2}}e^{-(x_i-\mu)^2/(2\sigma^2)}=(2\pi\sigma^2)^{-n/2}\exp\bigl(-\frac1{2\sigma^2}\sum_i(x_i-\mu)^2\bigr)\) (product of exponentials = exponential of the sum). In the ratio the constant \((2\pi\sigma^2)^{-n/2}\) cancels:
\[ \Lambda(x):=\frac{\exp\bigl(-\frac1{2\sigma^2}\sum(x_i-\mu_1)^2\bigr)}{\exp\bigl(-\frac1{2\sigma^2}\sum(x_i-\mu_0)^2\bigr)} =\exp\Bigl(\frac1{2\sigma^2}\Bigl[\sum(x_i-\mu_0)^2-\sum(x_i-\mu_1)^2\Bigr]\Bigr) =\exp\Bigl(\frac1{2\sigma^2}\Bigl[2(\mu_1-\mu_0)\sum x_i+n(\mu_0^2-\mu_1^2)\Bigr]\Bigr). \]The last step: expand \((x_i-\mu)^2=x_i^2-2\mu x_i+\mu^2\). In the difference the \(x_i^2\) cancel, leaving \(\sum(-2\mu_0x_i+\mu_0^2)-\sum(-2\mu_1x_i+\mu_1^2)=2(\mu_1-\mu_0)\sum x_i+n(\mu_0^2-\mu_1^2)\).
Step 2: simplify the rule. Reject if \(\Lambda(x)>k\). Since \(\ln\) is strictly increasing (primer 3), this is equivalent to
\[ \frac1{2\sigma^2}\Bigl[2(\mu_1-\mu_0)\sum x_i+n(\mu_0^2-\mu_1^2)\Bigr]>\ln k . \]With \(\mu_1>\mu_0\), rearrange to isolate \(\bar x_n=\frac1n\sum x_i\): the rule becomes \(\bar x_n>c\) for a constant \(c\) depending on \(k\). Explicitly (mine): multiply by \(2\sigma^2\), add \(n(\mu_1^2-\mu_0^2)\), divide by the positive number \(2n(\mu_1-\mu_0)\), and use \(\mu_1^2-\mu_0^2=(\mu_1-\mu_0)(\mu_1+\mu_0)\): \(c=\frac{\sigma^2\ln k}{n(\mu_1-\mu_0)}+\frac{\mu_0+\mu_1}2\). So the most powerful test depends on the data only through the sample mean.
Step 3: choose \(c\) for size \(\alpha\). We need \(\P_{\mu_0}(\bar X_n>c)=\alpha\). Under \(H_0\), \(\bar X_n\sim\mathcal N(\mu_0,\sigma^2/n)\), so \(Z=\frac{\bar X_n-\mu_0}{\sigma/\sqrt n}\sim\mathcal N(0,1)\) (primer 1), and we need
\[ \P\Bigl(Z>\frac{c-\mu_0}{\sigma/\sqrt n}\Bigr)=\alpha\quad\Longrightarrow\quad\frac{c-\mu_0}{\sigma/\sqrt n}=z_\alpha\quad\Longrightarrow\quad c=\mu_0+z_\alpha\frac{\sigma}{\sqrt n}, \]where \(z_\alpha\) satisfies \(\P(Z\ge z_\alpha)=\alpha\): the \((1-\alpha)\)-quantile of the standard normal. The script notes that this is a common convention in testing: \(t_\alpha\) denotes the \((1-\alpha)\)-quantile of a random variable \(T\).
Result. Reject \(H_0\) whenever \(\bar x_n>\mu_0+z_\alpha\frac\sigma{\sqrt n}\). This is the one-sided z-test. (If \(\mu_1<\mu_0\), dividing by the negative \(\mu_1-\mu_0\) flips the inequality, and the region is \(\bar x_n<c'\).)
Numbers (mine): \(\mu_0=0\), \(\mu_1=1\), \(\sigma=1\), \(n=4\), \(\alpha=0.05\). Standard error \(\frac1{\sqrt4}=0.5\), so \(c=0+1.645\cdot0.5=0.822\). Power: \(\P_{\mu_1}(\bar X_4>0.822)=\P\bigl(Z>\frac{0.822-1}{0.5}\bigr)=\P(Z>-0.355)=0.639\).
Two notes. (1) The script calls this test "the ump". For a simple alternative "most powerful" is the right word. But notice that \(c\) does not depend on \(\mu_1\): the same test is most powerful against every \(\mu_1>\mu_0\), so it is indeed uniformly most powerful for \(H_0:\mu=\mu_0\) against \(H_1:\mu>\mu_0\) (and, since its power function increases in \(\mu\), also for \(H_0:\mu\le\mu_0\)). (2) The statistic \(\bar X_n\) arose automatically from the likelihood ratio — this is how Neyman–Pearson constructs tests (Viewpoint 3.42).
In words: for normal data with known variance, the best test of "mean \(\mu_0\)" against "a larger mean" rejects when the sample mean is more than \(z_\alpha\) standard errors above \(\mu_0\).
Constructing tests in practice
Viewpoint 3.42 constructing tests in practice Script 3.42
So far Theorem 3.40 is our only way of constructing tests, and Example 3.41 showed how it works. Viewing a test as a map \(\varphi:\mathcal X\to\{0,1\}\) (\(\mathcal X\) = the set of possible data sets, \(\Omega^n\) above) is good for theory, but in practice nobody writes down \(\varphi\) directly. Instead, one follows the steps extracted from Example 3.41:
- Choose a real-valued test statistic [Teststatistik] \(T:\mathcal X\to\R\) — any statistic. For a mean, the sample mean is a good start; for a variance, a sample variance. It can get more sophisticated. The goal: reduce the high-dimensional sample \(x\) to a single number \(T(x)\).
- Know its null distribution. Choose \(T\) such that you can (approximately) derive the distribution of \(T(X)\) if the null were true. In Example 3.41, \(T_n(X)=\bar X_n\sim\mathcal N(\mu_0,\sigma^2/n)\) under the null. In other settings, invoke the clt for an approximate normal distribution, or find other ways to approximate the distribution of \(T(X)\) for \(X\sim\P_{\theta_0}\) (\(\theta_0\in\Theta_0\)).
- Define the rejection region \(R\) via quantiles of \(T(X)\) under the null. E.g. reject if the observed \(t_{\text{obs}}=T(x)>t_\alpha\) (the \((1-\alpha)\)-quantile of \(T(X)\)). Or reject outside the \(\alpha/2\)- and \((1-\alpha/2)\)-quantiles (two tails). The value \(t_\alpha\) is the critical value [kritischer Wert] and the rejection region the critical region. For a composite null (\(|\Theta_0|>1\)) there is no single null distribution; since \(\alpha=\sup_{\theta\in\Theta_0}G_\varphi(\theta)\), the supremum determines \(R\). In many settings where \(\Theta\subset\R\) is an interval, \(G_\varphi\) is monotone in \(\theta\) and only one boundary value of \(\Theta_0\) matters — the null boundary.
- Final test: \[ \varphi(x)=\one_R(T(x))=\begin{cases}1&\text{if }T(x)\in R\ \text{(reject }H_0),\\0&\text{if }T(x)\notin R\ \text{(don't reject }H_0).\end{cases} \]
The central tasks: choose a good statistic \(T(X)\), and find \(R\) from the distribution of \(T(X)\) under the null so that the test has size \(\alpha\).
Why the boundary is the worst case, in the one-sided z-test with \(H_0:\mu\le\mu_0\): the rule is \(\bar x_n>c\), and \(\P_\mu(\bar X_n>c)\) grows as \(\mu\) grows (the whole bell curve moves right). So over \(\mu\le\mu_0\) the largest rejection probability occurs at \(\mu=\mu_0\). Choosing \(c\) for \(\mu_0\) gives level \(\alpha\) for the whole composite null. This is the argument behind "under \(H_0\) boundary" in Example 3.46.
Definition 3.43 one-sided and two-sided tests Script 3.43
Let \(\Theta\subset\R\).
- A one-sided (one-tailed) test [einseitiger Test] is used for directional hypotheses such as \(H_1:\theta>\theta_0\) or \(H_1:\theta<\theta_0\). The rejection region lies entirely in one tail of the distribution of the test statistic.
- A two-sided (two-tailed) test [zweiseitiger Test] is used for non-directional hypotheses such as \(H_1:\theta\ne\theta_0\). The rejection region is split between the two tails.
For a given \(\alpha\), a one-sided test is more powerful for detecting an effect in the specified direction, but has no power to detect an effect in the opposite direction.
Why: the one-sided test puts all of \(\alpha\) in one tail, so its cut-off is lower (1.645 instead of 1.96 at \(\alpha=0.05\)) — easier to exceed. The price is the "wrong" tail: an effect in the other direction is never detected (the biased-test counterexample under Definition 3.39). Choose the direction before seeing the data; choosing it afterwards secretly doubles \(\alpha\).
Example 3.44 z-test for a normal mean (again) Script 3.44
\(X_1,\dots,X_n\) iid \(\mathcal N(\mu,\sigma^2)\) with \(\sigma^2\) known. Test \(H_0:\mu=\mu_0\) versus \(H_1:\mu\ne\mu_0\). Following Example 3.41, the test statistic is the standardised sample mean
\[ Z=\frac{\bar X_n-\mu_0}{\sigma/\sqrt n} . \]Under \(H_0\), \(Z\sim\mathcal N(0,1)\). We reject \(H_0\) when the observed \(z_{\text{obs}}\) is "too far in either tail of \(\mathcal N(0,1)\)": for a fixed level \(\alpha\in(0,1)\), reject if \(|z_{\text{obs}}|>z_{\alpha/2}\), the \((1-\alpha/2)\)-quantile of \(\mathcal N(0,1)\). For \(\alpha=0.05\): \(z_{\alpha/2}\approx1.96\), so reject if \(|z_{\text{obs}}|>1.96\).
Check of the size: \(\P_{\mu_0}(|Z|>z_{\alpha/2})=\P(Z>z_{\alpha/2})+\P(Z<-z_{\alpha/2})=\frac\alpha2+\frac\alpha2=\alpha\) (symmetry of the bell curve). Power function (mine): if the true mean is \(\mu\), then \(Z\sim\mathcal N(\delta,1)\) with \(\delta=\frac{\mu-\mu_0}{\sigma/\sqrt n}\) (the shift in standard-error units). Hence \(G(\mu)=\P(Z>z_{\alpha/2})+\P(Z<-z_{\alpha/2})=1-\Phi(z_{\alpha/2}-\delta)+\Phi(-z_{\alpha/2}-\delta)\). For the one-sided version \(G(\mu)=1-\Phi(z_\alpha-\delta)\). Both formulas are what the two widgets below draw.
Example 3.45 one-sample t-test for a mean Script 3.45
If \(\sigma^2\) in Example 3.44 is unknown, estimate it by the sample variance \(S_n^2\). The test statistic becomes
\[ T=\frac{\bar X_n-\mu_0}{S_n/\sqrt n}. \]Under \(H_0\), \(T\) follows Student's \(t\)-distribution with \(n-1\) degrees of freedom, \(T\sim t_{n-1}\) (primer 2). The rejection region of the two-sided test is \(|t_{\text{obs}}|>t_{n-1,\alpha/2}\), the \((1-\alpha/2)\)-quantile of \(t_{n-1}\).
Why \(T\sim t_{n-1}\) (sketch) My addition — the script states it without proof
Write \(T=\dfrac{\frac{\bar X_n-\mu_0}{\sigma/\sqrt n}}{\sqrt{\frac{(n-1)S_n^2/\sigma^2}{n-1}}}\) (divide numerator and denominator by \(\sigma/\sqrt n\); the \(\sigma\)'s cancel, so \(T\) does not depend on the unknown \(\sigma\)). For iid Gaussian data, three facts hold (the last two are a standard theorem, often called Cochran's or Student's theorem, not proved in this course):
- the numerator is \(\mathcal N(0,1)\) under \(H_0\) (primer 1);
- \(V=(n-1)S_n^2/\sigma^2\sim\chi^2_{n-1}\) — one degree of freedom is "used up" by estimating the mean with \(\bar X_n\);
- \(\bar X_n\) and \(S_n^2\) are independent.
So \(T=Z/\sqrt{V/(n-1)}\) with independent \(Z\sim\mathcal N(0,1)\), \(V\sim\chi^2_{n-1}\): by Remark 1.62 this is \(t_{n-1}\).
Example 3.46 common Gaussian tests Script 3.46
\(X_1,\dots,X_n\) iid \(\mathcal N(\mu,\sigma^2)\), \(\alpha\in(0,1)\). A subscript denotes the upper \(\alpha\)-quantile (the \((1-\alpha)\)-quantile): \(z_\alpha\) is the value with \(\P(Z>z_\alpha)=\alpha\) for \(Z\sim\mathcal N(0,1)\), and likewise \(t_{\nu,\alpha}\), \(\chi^2_{k,\alpha}\). "Under \(H_0\) boundary" means: the distribution holds at the boundary value of the composite null (Viewpoint 3.42(iii)).
- One-sided z-test for the mean, \(\sigma^2\) known. \(H_0:\mu\le\mu_0\) against \(H_1:\mu>\mu_0\). Statistic \(Z=\frac{\bar X_n-\mu_0}{\sigma/\sqrt n}\sim\mathcal N(0,1)\) (under \(H_0\) boundary). Reject if \(z_{\text{obs}}>z_\alpha\).
- Two-sided z-test, \(\sigma^2\) known. \(H_0:\mu=\mu_0\) against \(H_1:\mu\ne\mu_0\). Same \(Z\); reject if \(|z_{\text{obs}}|>z_{\alpha/2}\).
- One-sided t-test, \(\sigma^2\) unknown. \(H_0:\mu\le\mu_0\) against \(H_1:\mu>\mu_0\). Statistic \(T=\frac{\bar X_n-\mu_0}{S_n/\sqrt n}\sim t_{n-1}\) (under \(H_0\) boundary), \(S_n\) the sample standard deviation. Reject if \(t_{\text{obs}}>t_{n-1,\alpha}\).
- Two-sided t-test, \(\sigma^2\) unknown. \(H_0:\mu=\mu_0\) against \(H_1:\mu\ne\mu_0\). Same \(T\); reject if \(|t_{\text{obs}}|>t_{n-1,\alpha/2}\).
- One-sided χ²-test for the variance, \(\mu\) unknown. \(H_0:\sigma^2\le\sigma_0^2\) against \(H_1:\sigma^2>\sigma_0^2\). Statistic \(C=\frac{(n-1)S_n^2}{\sigma_0^2}\sim\chi^2_{n-1}\) (under \(H_0\) boundary). Reject if \(c_{\text{obs}}>\chi^2_{n-1,\alpha}\). For the left-sided test (\(H_1:\sigma^2<\sigma_0^2\)) reject if \(c_{\text{obs}}<\chi^2_{n-1,1-\alpha}\).
- Two-sided χ²-test for the variance, \(\mu\) unknown. \(H_0:\sigma^2=\sigma_0^2\) against \(H_1:\sigma^2\ne\sigma_0^2\). Same \(C\); reject if \(c_{\text{obs}}<\chi^2_{n-1,1-\alpha/2}\) or \(c_{\text{obs}}>\chi^2_{n-1,\alpha/2}\). (The \(\chi^2\) distribution is not symmetric, so the two cut-offs are not mirror images.)
- Two-sample t-test for means, unknown but equal variances. \(X_1,\dots,X_{n_X}\) and \(Y_1,\dots,Y_{n_Y}\) are two independent iid samples from \(\mathcal N(\mu_X,\sigma^2)\) and \(\mathcal N(\mu_Y,\sigma^2)\). \(H_0:\mu_X=\mu_Y\) against \(H_1:\mu_X\ne\mu_Y\). Statistic \[ T=\frac{\bar X_{n_X}-\bar Y_{n_Y}}{S_p\sqrt{\frac1{n_X}+\frac1{n_Y}}}\sim t_{n_X+n_Y-2}\ \ (\text{under }H_0),\qquad S_p^2=\frac{(n_X-1)S_{n_X}^2+(n_Y-1)S_{n_Y}^2}{n_X+n_Y-2}, \] where \(S_p^2\) is the pooled sample variance (a weighted average of the two sample variances). Reject if \(|t_{\text{obs}}|>t_{n_X+n_Y-2,\alpha/2}\).
Beyond Gaussian data. For many of these tests we only need the null distribution of the statistic. By the clt (§2.4), for large \(n\) we can relax the assumptions to \(X_i\) iid with mean \(\mu\) and finite variance \(\sigma^2>0\) (not necessarily normal): then \(\frac{\bar X_n-\mu}{\sigma/\sqrt n}\) is approximately \(\mathcal N(0,1)\), and the same tests can still be used approximately. (The script prints \(\bar X_n-\mu/(\sigma/\sqrt n)\); the brackets around \(\bar X_n-\mu\) are meant.) This is how SoSe25 P4d and SoSe26 P5d below work.
Overview of the standard tests (the script's table). One- and two-sided versions use the same statistics and null distributions; only the rejection region moves to one or both tails.
| name | \(H_0\) | statistic | null distr. |
|---|---|---|---|
| single mean \(\mu\) | |||
| z-test (\(\sigma^2\) known) | \(\mu=\mu_0\) | \(Z=\frac{\bar X_n-\mu_0}{\sigma/\sqrt n}\) | \(\mathcal N(0,1)\) |
| t-test (\(\sigma^2\) unknown) | \(\mu=\mu_0\) | \(T=\frac{\bar X_n-\mu_0}{S_n/\sqrt n}\) | \(t_{n-1}\) |
| single variance \(\sigma^2\) | |||
| χ²-test (\(\mu\) unknown) | \(\sigma^2=\sigma_0^2\) | \(C=\frac{(n-1)S_n^2}{\sigma_0^2}\) | \(\chi^2_{n-1}\) |
| comparing means \(\mu_X,\mu_Y\) | |||
| two-sample t-test (equal variances) | \(\mu_X=\mu_Y\) | \(T=\frac{\bar X-\bar Y}{S_p\sqrt{\frac1{n_X}+\frac1{n_Y}}}\) | \(t_{n_X+n_Y-2}\) |
Two worked numbers for (v) and (vii) (mine).
- (v): 10 bottles with sample variance \(s_{10}^2=4\,\text{ml}^2\) (the brewery of Sheet 11 Ex 3). Is the filling machine less precise than the specification \(\sigma_0^2=1\)? \(H_0:\sigma^2\le1\), \(H_1:\sigma^2>1\), \(c_{\text{obs}}=\frac{9\cdot4}1=36>\chi^2_{9,0.05}=16.92\): reject at level 0.05.
- (vii): \(n_X=n_Y=8\), \(\bar x=10.2\), \(\bar y=9.0\), \(s_X^2=1.5\), \(s_Y^2=2.1\). Pooled: \(s_p^2=\frac{7\cdot1.5+7\cdot2.1}{14}=1.8\), \(s_p=1.342\). Then \(t_{\text{obs}}=\frac{1.2}{1.342\cdot\sqrt{1/8+1/8}}=\frac{1.2}{0.671}=1.79<t_{14,0.025}=2.145\): do not reject at level 0.05.
How to recognise which test (mine): what is tested (mean or variance; one sample or two)? Is \(\sigma\) known (z) or estimated from the data (t)? Is \(H_1\) directional (one tail) or not (two tails)? Exams give the needed quantile in a hint — the quantile named in the hint often tells you which test is expected.
Remark 3.47 the testing zoo Script 3.47
There is a large zoo of statistical tests for different questions, distributional assumptions and prior knowledge. Many flowcharts and guides online say which test to use when. Many of these tests are robust approximations, and they all have different gotchas — which you can now understand.
The script's figure (a flowchart titled "What statistical test should I do?", credited to @statsandr), described in words as far as the text of the figure can be read. It branches first on how many variables:
- One variable. Qualitative: 2 groups → one-proportion test; more than 2 groups → chi-square goodness-of-fit test. Quantitative: parametric → one-sample Student's t-test (Example 3.45); nonparametric → one-sample Wilcoxon test.
- Two variables.
- Two quantitative: parametric → Pearson correlation; nonparametric → Spearman's rank correlation.
- Two qualitative: with 2 groups for each variable → for independent samples, Fisher's exact test (expected frequencies below 5) or the chi-square test of independence (at least 5); for paired samples, McNemar's test. With more than 2 groups for at least one variable → chi-square test of independence (independent samples) or Cochran's Q test (paired samples).
- One quantitative and one qualitative → depends on the number of groups to compare. 2 groups, independent samples: Student's t-test for 2 independent samples (equal variances, Example 3.46(vii)), Welch's t-test (unequal variances), Mann–Whitney U test (nonparametric). 2 groups, paired samples: Student's t-test for paired samples, or the Wilcoxon signed-rank test. More than 2 groups, independent: one-way ANOVA (analysis of variance; equal variances), Welch's ANOVA (unequal), Kruskal–Wallis test (nonparametric). More than 2 groups, paired: repeated-measures ANOVA, or the Friedman test.
- More than two variables. Quantitative dependent variable → multiple linear regression. Qualitative dependent variable → binary logistic regression (2 groups) or multinomial logistic regression (more than 2).
"Parametric" means the test assumes a specific family of distributions (usually Gaussian); "nonparametric" tests use ranks or counts and make weaker assumptions. None of the names beyond Example 3.46 are needed for this course; the point is that each box is a Viewpoint-3.42 recipe with its own statistic and null distribution.
p-values
Idea first (mine). A test only says "reject" or "not". But \(z_{\text{obs}}=2.0\) and \(z_{\text{obs}}=5.0\) are very different amounts of surprise. The p-value reports how surprising the observed statistic is under \(H_0\) — and you can then compare it with any \(\alpha\) you like.
Definition 3.48 p-value Script 3.48
Viewpoint 3.42 and Definition 3.43 lead to the p-value [p-Wert]: the probability, assuming the null hypothesis is true, of observing a test statistic at least as extreme as the one computed from the sample. The direction of "extreme" is determined by the alternative \(H_1\). For an observed statistic \(t_{\text{obs}}\):
- if \(H_1:\theta>\theta_0\): p-value \(=\P_{\theta_0}(T(X)\ge t_{\text{obs}})\);
- if \(H_1:\theta<\theta_0\): p-value \(=\P_{\theta_0}(T(X)\le t_{\text{obs}})\);
- if \(H_1:\theta\ne\theta_0\): p-value \(=\P_{\theta_0}(T(X)\text{ as or more extreme than }t_{\text{obs}})\).
The test is then \(\varphi(x)=1\) if the p-value is less than or equal to the chosen level \(\alpha\in[0,1]\).
Reading it (mine).
- Two-sided, symmetric null distribution (z- and t-tests): "as or more extreme" means "at least as far from 0", so p-value \(=\P_{\theta_0}(|T|\ge|t_{\text{obs}}|)=2\bigl(1-F(|t_{\text{obs}}|)\bigr)\), with \(F\) the null cdf. For the z-test: \(2(1-\Phi(|z_{\text{obs}}|))\).
- Why "p ≤ α" is the same test as "\(t_{\text{obs}}\) beyond the critical value" (one-sided, continuous \(T\)): \(\P_{\theta_0}(T\ge t)\) decreases as \(t\) increases, and equals \(\alpha\) exactly at \(t=t_\alpha\). So p-value \(\le\alpha\iff t_{\text{obs}}\ge t_\alpha\). (Whether the boundary itself counts — "\(>\)" in Example 3.44, "\(\le\)" here — has probability 0 for continuous statistics and does not matter.)
- Example: the light bulbs of Sheet 11 Ex 1 give \(z_{\text{obs}}=2\), two-sided, so p-value \(=2(1-\Phi(2))=2\cdot0.02275=0.0455\). Rejected at \(\alpha=0.05\), not at \(\alpha=0.01\) or 0.001. The p-value is the smallest level at which the data would still lead to rejection.
- What the p-value is NOT: the probability that \(H_0\) is true. See Caveat 3.50.
Viewpoint 3.49 falsification vs confirmation Script 3.49
The logic of hypothesis testing is rooted in the philosophy of falsification, popularised by Karl Popper. We cannot prove a scientific theory (or \(H_0\)) true, because we can never observe all possible instances. But we can find evidence that falsifies it. Hypothesis testing adopts this principle: we never "accept" \(H_0\). We either find enough evidence to "reject" it in favour of \(H_1\), or we "fail to reject" it because the evidence is insufficient. This distinction is crucial: failing to find evidence against a claim is not the same as finding evidence for it.
Classic picture: "all swans are white" cannot be proven by counting white swans, but one black swan refutes it. In the coin example, 52 heads in 100 tosses does not show the coin is fair — a coin with \(p=0.52\) would produce such data just as easily.
Caveat 3.50 p-value misinterpretations Script 3.50
The p-value is one of the most misinterpreted concepts in statistics.
- It is not the probability that the null is true: p-value \(\ne\P(H_0\text{ is true}\mid\text{data})\). This is a very common mistake. The p-value is calculated assuming \(H_0\) is true.
- A large p-value (e.g. \(p>0.05\)) does not mean \(H_0\) is true. It only means the data are not inconsistent with \(H_0\). It could also mean the test had low power to detect a true effect.
- Statistical significance does not imply practical significance. A tiny effect can be statistically significant with a large enough sample, yet irrelevant in practice.
- Thresholds as rituals. In practice, instead of comparing the p-value with a pre-chosen \(\alpha\), people report p-values and call a result "statistically significant" if \(p\le0.05\), or "highly statistically significant" if \(p\le0.001\) (default values the community has converged on). This suggests the p-value is a continuous indicator of "how true the claim is". It is not.
- Other fields are much stricter. In physics a discovery is often considered real at "5σ" or "6σ": the statistic lies more than 5 or 6 standard deviations out in the normal distribution, a p-value close to \(2.86\cdot10^{-7}\). Genome-wide association studies commonly use thresholds of \(5\cdot10^{-8}\).
The American Statistical Association (ASA) published a statement in 2016 to address the widespread misuse of p-values. In another statement they wrote: "We conclude, based on our review of the articles in this special issue and the broader literature, that it is time to stop using the term 'statistically significant' entirely. Nor should variants such as 'significantly different,' 'p ≤ 0.05,' and 'nonsignificant' survive, whether expressed in words, by asterisks in a table, or in some other way."
Numbers and sources. The 5σ value is the one-sided tail \(1-\Phi(5)=2.87\cdot10^{-7}\) (the script's \(2.86\cdot10^{-7}\) is this number truncated; two-sided it would be \(5.7\cdot10^{-7}\)); 6σ gives \(1-\Phi(6)=9.9\cdot10^{-10}\). The quoted passage is from the editorial "Moving to a World Beyond 'p < 0.05'" (Wasserstein, Schirm, Lazar) that opened a 2019 special issue of The American Statistician. The 2016 ASA statement lists six principles: p-values can indicate how incompatible the data are with a specified model; they do not measure the probability that the hypothesis is true or that the data arose by chance alone; conclusions should not rest only on whether a p-value passes a threshold; proper inference needs full reporting and transparency; a p-value does not measure the size of an effect or its importance; by itself a p-value is not a good measure of evidence.
Why \(\P(\text{data}\mid H_0)\ne\P(H_0\mid\text{data})\), with numbers. Suppose 90 % of the hypotheses a lab tests are in fact true nulls, the tests have level 0.05 and power 0.5. By Bayes' theorem (§1.4), among the rejections the fraction of true nulls is \(\frac{0.9\cdot0.05}{0.9\cdot0.05+0.1\cdot0.5}=\frac{0.045}{0.095}=0.47\). Nearly half of the "discoveries" are false, although every test had level 5 %. The p-value alone cannot tell you this; it needs the prior share of true nulls (the Bayesian view, §3.5).
Remark 3.51 p-hacking and the replication crisis Script 3.51
p-hacking (or data dredging) is re-analysing data in many different ways until a statistically significant result appears: trying different tests, removing "outliers", or testing many different hypotheses. This dramatically increases the rate of false positives and has contributed to the replication crisis in many fields: published findings fail to be replicated by independent researchers. Preregistering study designs and analysis plans is one proposed remedy.
The arithmetic (mine). Run \(k\) independent tests, each at level 0.05, when every null is true. Each test avoids a false alarm with probability 0.95, so by independence (multiply) all \(k\) avoid it with probability \(0.95^k\), and at least one false alarm happens with probability \(1-0.95^k\): 0.05 (\(k=1\)), 0.226 (\(k=5\)), 0.401 (\(k=10\)), 0.642 (\(k=20\)), 0.923 (\(k=50\)). Twenty tries give a "significant" result about two times in three, with no effect at all. The Bonferroni correction (Overview 3.53(iv)) tests each at level \(\alpha/k\). Then the chance of at least one false alarm is at most \(k\cdot\frac\alpha k=\alpha\), by the union bound [σ-Subadditivität]: for any events, \(\P(A_1\cup\dots\cup A_k)\le\P(A_1)+\dots+\P(A_k)\) (the probability of "at least one" never exceeds the sum of the single probabilities, because overlaps are counted at most once on the left and at least once on the right; Proposition 1.19(vi), §1.1). Here \(A_j\) = "test \(j\) gives a false alarm", each with probability \(\frac\alpha k\). The union bound needs no independence.
Remark 3.52 summary: how to build a hypothesis test Script 3.52
- Formulate \(H_0\) and \(H_1\) from the research question. This includes statistical modelling (writing down your model).
- Choose a test statistic \(T(X)\) that is expected to behave differently under \(H_0\) and \(H_1\). Often it is based on an estimator of the parameter of interest.
- Find the sampling distribution of \(T(X)\) assuming \(H_0\) is true — the most critical and often most
difficult step.
- For some models (like the Gaussian) the exact distribution is known.
- For large samples it can often be approximated with the clt.
- Otherwise, simulation methods (like permutation tests or bootstrapping) can approximate the null distribution.
The two simulation methods in one line each (not examined): a permutation test compares two groups by shuffling the group labels many times — if \(H_0\) "no difference" holds, the labels do not matter, so the shuffled data show how the statistic varies under \(H_0\); bootstrapping draws many new samples of size \(n\) with replacement from the observed data and recomputes the statistic on each, to imitate "fresh data".
- Specify \(\alpha\) and determine the rejection region \(R\) from the null distribution of \(T(X)\).
- Collect data, compute \(t_{\text{obs}}\), and decide: reject \(H_0\) if \(t_{\text{obs}}\in R\).
This is exactly the list of items an exam asks for (SoSe26 P5d: "state the test statistic, its approximate distribution at the null boundary, the rejection rule, the observed value, and the conclusion") — one point each. Always add the one-sentence conclusion in words ("we reject \(H_0\) at level 0.05; the data give evidence that …").
Overview 3.53 outlook on hypothesis testing Script 3.53
- The Neyman–Pearson lemma constructs most powerful tests for simple hypotheses. For composite hypotheses umps rarely exist, except for simple one-sided examples in exponential families and similar cases. In many real settings, the quality of tests is judged empirically, in simulation studies that mimic the expected data. (An exponential family [Exponentialfamilie] is, roughly, a model whose density has the form \(h(x)\,e^{\eta(\theta)T(x)-A(\theta)}\) — normal, exponential, Poisson, Bernoulli and binomial all do. Example 3.41 and Sheet 11 Ex 2 are such one-sided cases: the Neyman–Pearson region did not depend on the particular alternative, so one test was best against all of them. For the two-sided \(H_1:\mu\ne\mu_0\) no ump exists: the one-sided test "\(z>z_\alpha\)" is most powerful against every \(\mu>\mu_0\) but useless against \(\mu<\mu_0\), and the mirror test "\(z<-z_\alpha\)" is the other way round, so neither beats the other everywhere on \(\Theta_1\). The power widget's third button draws the first of the two: its curve rises above \(\alpha\) only to the right of \(\mu_0\) and sinks below \(\alpha\) to the left; the mirror test's curve is that same curve reflected at \(\mu_0\).)
- When tests are used to decide on a change — switching to a new medication, introducing a new design on a large online platform — high power matters. Especially for studies on humans, one performs a power analysis up front to determine the sample size \(n\) needed for a desired power (at fixed size \(\alpha\)). Example (mine): in the setting of Sheet 11 Ex 4 (\(\sigma=3\), \(\mu_0=10\), one-sided, \(\alpha=0.01\)), what \(n\) gives power 0.8 against \(\mu_a=11.5\)? Power \(=1-\Phi\bigl(z_\alpha-\frac{\mu_a-\mu_0}{\sigma/\sqrt n}\bigr)\ge0.8\) means \(z_\alpha-\frac{1.5\sqrt n}{3}\le-z_{0.2}\), i.e. \(\sqrt n\ge\frac{3(z_{0.01}+z_{0.2})}{1.5}=2(2.326+0.842)=6.34\), so \(n\ge40.1\): 41 observations instead of 25 (which gave power 0.57). For power 0.9: \(n\ge52.1\), i.e. 53.
- This section covered the frequentist (Neyman–Pearson) approach, dominant in many sciences. Other approaches exist. Bayesian hypothesis testing uses no p-values; it computes the Bayes factor, the ratio of the marginal likelihood of the data under \(H_1\) to that under \(H_0\). This allows quantifying evidence for \(H_0\) or \(H_1\). (Priors and posteriors: §3.5.) The marginal likelihood under a hypothesis is the likelihood \(L(\theta\mid x)\) averaged over the parameter values in that hypothesis, weighted by a prior distribution on them. For two simple hypotheses there is nothing to average, and the Bayes factor is exactly the Neyman–Pearson ratio \(\frac{L(\theta_1\mid x)}{L(\theta_0\mid x)}\) — but it is read as "how many times better \(H_1\) explains the data", not compared with a cut-off chosen for size \(\alpha\).
- Multiple testing is a crucial issue: when many hypotheses are tested simultaneously (genomics, online A/B testing), the probability of at least one type I error inflates dramatically. Procedures like the Bonferroni correction or methods controlling the false discovery rate (FDR) are essential. (See the arithmetic under Remark 3.51 and the widget above.) Bonferroni: test each of \(k\) hypotheses at level \(\alpha/k\). The FDR is the expected fraction of false discoveries among all rejections — in the lab example under Caveat 3.50 that fraction was 47 %; FDR methods (e.g. Benjamini–Hochberg) keep it below a chosen bound and are less strict than Bonferroni.
- The framework — especially tests for simple hypotheses like the z- and t-test — is the foundation for more complex models: analysis of variance (ANOVA), chi-squared tests, regression analysis, where hypotheses concern model parameters or their relationships.
Exercise-sheet tasks
Sheet 11, Exercise 1 — has the light-bulb lifetime changed? Sheet 11 · Ex 1
Historical mean lifetime \(\mu_0=1200\) h, known standard deviation \(\sigma=150\) h. A new process; a sample of \(n=36\) bulbs has \(\bar x_{36}=1250\) h. Lifetimes are normal. (i) State \(H_0\) and \(H_1\). (ii) Compute the test statistic. (iii) Reject at \(\alpha=0.05\)? At \(\alpha=0.001\)? What does that mean for the confidence you should have in the rejection?
Solution
Relevant tools: two-sided z-test (Example 3.44, Example 3.46(ii)), since \(\sigma\) is known and the data are normal; Definition 3.34(v) for the meaning of \(\alpha\).
(i) "Has changed" has no direction, so the test is two-sided: \(H_0:\mu=1200\) against \(H_1:\mu\ne1200\).
(ii) \(Z=\frac{\bar X_n-\mu_0}{\sigma/\sqrt n}\), which is \(\mathcal N(0,1)\) under \(H_0\) (primer 1). Standard error \(\frac{150}{\sqrt{36}}=\frac{150}6=25\). So \(z_{\text{obs}}=\frac{1250-1200}{25}=\frac{50}{25}=2\).
(iii) Reject if \(|z_{\text{obs}}|>z_{\alpha/2}\).
- \(\alpha=0.05\): \(z_{0.025}=1.96\), and \(2>1.96\): reject.
- \(\alpha=0.001\): \(z_{0.0005}=3.29\), and \(2<3.29\): do not reject.
- p-value (mine): \(2(1-\Phi(2))=0.0455\). The data lead to rejection exactly at levels \(\alpha\ge0.0455\).
What it means. \(\alpha=\E_{\mu_0}[\varphi]\) is a probability over repeating the whole procedure on new data sets drawn under the null: if \(H_0\) were true, a level-0.05 test would wrongly reject in 5 % of repetitions. It is a property of the procedure, not a probability statement about this one data set, and not "95 % confidence that the lifetime changed". We do not know whether the null is true; if it is false, \(\alpha\) does not describe any real probability of this situation at all. That the result flips between \(\alpha=0.05\) and \(\alpha=0.001\) says: the evidence is moderate — enough for the conventional 5 % rule, far from overwhelming.
Verification. The official solution is correct. Small differences: it writes the rule as \(|z_{\text{obs}}|\ge z_{\alpha/2}\) where the script uses "\(>\)" (irrelevant for a continuous statistic, see Definition 3.48), and "\(z_{\alpha/2}\approx3.29\)" is \(z_{0.0005}=3.2905\) — correct.
Same data as an interval. The 95 % confidence interval \(1250\pm1.96\cdot25=[1201.0,\,1299.0]\) does not contain 1200 — the same verdict as the level-0.05 test, by the duality of Remark 3.59. Worked out on §3.4.
Method to reuse: known \(\sigma\) + normal data (or large \(n\)) → z-test. Standard error first, then \(z_{\text{obs}}\), then compare with the right quantile (\(z_{\alpha/2}\) for two-sided). When asked "what does it mean", answer: \(\alpha\) is the long-run type I error rate of the procedure under \(H_0\).
Sheet 11, Exercise 2 — Neyman–Pearson test for an exponential sample Sheet 11 · Ex 2
One observation \(X\sim\Exp(\lambda)\). Test \(H_0:\{\lambda_0\}\) against \(H_1:\{\lambda_1\}\) with \(\lambda_1>\lambda_0>0\). (i) Write down \(\Lambda(x)=\frac{L(\lambda_1\mid x)}{L(\lambda_0\mid x)}\). (ii) The most powerful test rejects if \(\Lambda(x)>k'\); show this is equivalent to \(x<c\) or \(x>c\) for a constant \(c\), and decide which. (iii) Find \(c\) for level \(\alpha\). (iv) What is the power?
Solution
Relevant tools: Neyman–Pearson lemma (Theorem 3.40); the exponential density \(p(x\mid\lambda)=\lambda e^{-\lambda x}\) for \(x\ge0\) (§1.3), mean \(\frac1\lambda\); primer 3.
(i) With one observation the likelihood is the density: \(L(\lambda\mid x)=\lambda e^{-\lambda x}\). So \[ \Lambda(x)=\frac{\lambda_1e^{-\lambda_1x}}{\lambda_0e^{-\lambda_0x}}=\frac{\lambda_1}{\lambda_0}e^{-(\lambda_1-\lambda_0)x}\qquad(x\ge0), \] using \(\frac{e^a}{e^b}=e^{a-b}\) with \(a-b=-\lambda_1x+\lambda_0x\).
(ii) \(\Lambda(x)>k'\) (with \(k'>0\)). Multiply by the positive \(\frac{\lambda_0}{\lambda_1}\): \(e^{-(\lambda_1-\lambda_0)x}>k''\) with \(k'':=k'\frac{\lambda_0}{\lambda_1}>0\). Take \(\ln\) (strictly increasing, so the inequality stays): \(-(\lambda_1-\lambda_0)x>\ln k''\). Since \(\lambda_1>\lambda_0\), the number \(-(\lambda_1-\lambda_0)\) is negative; dividing by it flips the inequality: \[ x<-\frac{\ln k''}{\lambda_1-\lambda_0}=:c . \] So the region is of the form \(x<c\). Intuition: a larger rate \(\lambda_1\) means faster decay and smaller typical values (mean \(\frac1{\lambda_1}<\frac1{\lambda_0}\)), so small observations speak for \(H_1\). For a non-trivial test we need \(c>0\) (otherwise \(\P_{\lambda_0}(X<c)=0\)), which happens exactly when \(\ln k''<0\), i.e. \(0<k''<1\).
(iii) The size is the probability of rejecting under \(H_0\): with the antiderivative \(-e^{-\lambda_0x}\) of \(\lambda_0e^{-\lambda_0x}\) (Analysis 8.3), \[ \alpha=\P_{\lambda_0}(X<c)=\int_0^c\lambda_0e^{-\lambda_0x}\,\mathrm dx=\bigl[-e^{-\lambda_0x}\bigr]_0^c=1-e^{-\lambda_0c}. \] Solve: \(e^{-\lambda_0c}=1-\alpha\), so \(-\lambda_0c=\ln(1-\alpha)\) and \[ c=-\frac{\ln(1-\alpha)}{\lambda_0}. \] Since \(0<1-\alpha<1\), \(\ln(1-\alpha)<0\), so \(c>0\). The test rejects \(H_0\) if \(x<-\frac{\ln(1-\alpha)}{\lambda_0}\). (Note: \(c\) is the \(\alpha\)-quantile of \(\Exp(\lambda_0)\) — the lower tail, because small values are "extreme" here.)
(iv) The power is the probability of rejecting under \(H_1\): \[ G_\varphi(\lambda_1)=\P_{\lambda_1}(X<c)=1-e^{-\lambda_1c}=1-e^{\frac{\lambda_1}{\lambda_0}\ln(1-\alpha)}=1-\bigl(e^{\ln(1-\alpha)}\bigr)^{\lambda_1/\lambda_0}=1-(1-\alpha)^{\lambda_1/\lambda_0}. \] (Substituting \(c\): \(-\lambda_1c=\frac{\lambda_1}{\lambda_0}\ln(1-\alpha)\); then \(e^{ab}=(e^a)^b\).)
Numbers and checks. \(\lambda_0=1\), \(\lambda_1=2\), \(\alpha=0.05\): \(c=-\ln0.95=0.0513\), power \(1-0.95^2=0.0975\). Only about 10 %: one observation is weak evidence. (The Neyman–Pearson widget shows exactly this case at its defaults, and that other regions of the same size have even less power: right tail \(0.05^2=0.0025\), middle interval \(0.525^2-0.475^2=0.05\).) Checks: (a) since \(\frac{\lambda_1}{\lambda_0}>1\) and \(0<1-\alpha<1\), \((1-\alpha)^{\lambda_1/\lambda_0}<1-\alpha\), so the power exceeds \(\alpha\) — the test is unbiased (Definition 3.39); (b) \(c\) does not depend on \(\lambda_1\), so the same test is most powerful against every \(\lambda_1>\lambda_0\) — a ump for \(H_1:\lambda>\lambda_0\), as in Example 3.41.
Verification. The official solution is correct in every step.
Method to reuse: (1) write \(\Lambda\) and cancel; (2) take \(\ln\) and isolate the statistic, watching the sign when dividing; (3) the direction of the region comes out of the algebra — check it with intuition; (4) set \(\P_{\theta_0}(\text{region})=\alpha\) and solve for \(c\); (5) power = same probability under \(\theta_1\).
Sheet 11, Exercise 3 — one-sample t-test: does the brewery fill 330 ml? Sheet 11 · Ex 3
A brewery claims its bottles contain exactly 330 ml. A student measures \(n=10\) bottles: \(\bar x_{10}=328.5\) ml, sample variance \(s_{10}^2=4\) ml². The content is normal. (i) State the hypotheses for "the true mean differs from 330 ml". (ii) Which test? State the statistic and its null distribution. (iii) Test at \(\alpha=0.05\). Reject the claim? (Hint: \(t_{9,0.025}\approx2.262\).)
Solution
Relevant tools: two-sided one-sample t-test (Example 3.45, Example 3.46(iv)): normal data, \(\sigma^2\) unknown (only the sample variance is given).
(i) \(H_0:\mu=330\) (the claim) against \(H_1:\mu\ne330\). Two-sided, because "differs" has no direction.
(ii) One-sample t-test. \(T=\frac{\bar X_n-\mu_0}{S_n/\sqrt n}\) with \(\mu_0=330\) and \(S_n=\sqrt{S_n^2}\). Under \(H_0\), \(T\sim t_{n-1}=t_9\).
(iii) \(s_{10}=\sqrt4=2\); standard error \(\frac2{\sqrt{10}}=\frac2{3.1623}=0.6325\). So \(t_{\text{obs}}=\frac{328.5-330}{0.6325}=\frac{-1.5}{0.6325}=-2.372\). Reject if \(|t_{\text{obs}}|>t_{9,0.025}=2.262\). Since \(2.372>2.262\): reject \(H_0\). At the 5 % level the data give evidence that the mean content is not 330 ml (here: less).
Extras. p-value \(=2\,\P(t_9\ge2.372)=0.042\) — just below 0.05, so the conclusion is fragile. Had we wrongly used the normal quantile 1.96, we would compute \(p=0.018\) and overstate the evidence: with only 10 observations, the estimated \(\sigma\) adds real uncertainty. Also note that the data point in a direction (under-filling) that matters to customers — but since \(H_1\) was two-sided, we may only conclude "different"; choosing a one-sided test after seeing the data would be p-hacking.
Verification. The official solution is correct. It rounds the standard error to 0.632 and reports \(t_{\text{obs}}\approx-2.373\); with more digits \(t_{\text{obs}}=-2.3717\). The decision is unaffected.
Same data as an interval. The 95 % t-interval \(328.5\pm2.262\cdot0.6325=[327.07,\,329.93]\) just misses 330 — matching the narrow rejection (Remark 3.59). Worked out on §3.4.
Method to reuse: sample variance given, \(\sigma\) not → t-test with \(n-1\) degrees of freedom. Take the square root of \(s^2\) before dividing by \(\sqrt n\).
Sheet 11, Exercise 4 — type II error and power of a z-test Sheet 11 · Ex 4
Normal data with known \(\sigma^2=9\), \(n=25\). Test \(H_0:\mu\le10\) against \(H_1:\mu>10\) at \(\alpha=0.01\). (i) Determine the rejection region (\(z_{0.01}\approx2.33\)). (ii) Compute the type II error probability \(\beta\) if the true mean is \(\mu_a=11.5\). (iii) What is the power against \(\mu_a=11.5\)?
Solution
Relevant tools: one-sided z-test (Example 3.46(i)); null boundary (Viewpoint 3.42(iii)); type II error and power (Definition 3.34(vi)); standardising (primer 1).
(i) At the null boundary \(\mu_0=10\): \(Z=\frac{\bar X_{25}-10}{3/\sqrt{25}}=\frac{\bar X_{25}-10}{0.6}\sim\mathcal N(0,1)\). Reject if \(z_{\text{obs}}>2.33\). In terms of the sample mean (multiply by 0.6, add 10): \[ \bar X_{25}>10+2.33\cdot0.6=10+1.398=11.398 . \] Because the rejection probability increases in \(\mu\), every \(\mu\le10\) gives type I error at most 0.01.
(ii) A type II error happens if we do not reject although \(\mu=11.5\): \(\beta=\P_{11.5}(\bar X_{25}\le11.398)\). Under \(\mu=11.5\), \(\bar X_{25}\sim\mathcal N(11.5,\frac9{25})=\mathcal N(11.5,0.36)\), standard deviation 0.6. Standardise with the true mean 11.5: \[ \beta=\P\Bigl(\frac{\bar X_{25}-11.5}{0.6}\le\frac{11.398-11.5}{0.6}\Bigr)=\P(Z'\le-0.17)=\Phi(-0.17)=1-\Phi(0.17)=1-0.5675=0.4325, \] with \(Z'\sim\mathcal N(0,1)\). (Here \(\frac{11.398-11.5}{0.6}=\frac{-0.102}{0.6}=-0.17\); the value \(\Phi(0.17)=0.5675\) comes from the \(\Phi\) table, and the symmetry rule \(\Phi(-z)=1-\Phi(z)\) handles the minus sign.) About 43 %.
(iii) Power \(=1-\beta=0.5675\), about 57 %: a true mean of 11.5 is detected only slightly more often than a coin flip.
Note on the official solution. It writes \(\beta\) = "\(P(\text{fail to reject }H_0\mid\mu=\mu_a)\)" (in quotation marks). In this frequentist setting \(\mu\) is a fixed number, not a random variable, so there is no event "\(\mu=\mu_a\)" to condition on; the correct notation is \(\P_{\mu_a}(\bar X_{25}\le11.398)\) — "computed as if the true mean were \(\mu_a\)", which the solution then uses. The quotation marks show the authors know this; in an exam write \(\P_{\mu_a}\).
Verification. The numbers are correct. With the unrounded quantile \(z_{0.01}=2.3263\) the cut-off is 11.396, \(\beta=\Phi(-0.174)=0.431\) and power 0.569 — the widget above uses these exact values. The power analysis under Overview 3.53(ii) shows that \(n=41\) would be needed for power 0.8.
Method to reuse: (1) find the cut-off for \(\bar X\) using the null mean; (2) compute the probability of landing on the non-rejection side using the alternative mean. Two different standardisations — the most common mistake is to use \(\mu_0\) in step 2.
Old-exam tasks
Hypothesis testing appeared in SoSe 2025 (a true/false item and the last part of Problem 4) and in SoSe 2026 (the last part of Problem 5). In both cases the test came at the end of a longer problem whose earlier parts built the estimator and its clt approximation. That is a pattern of these two exams, not a prediction.
SoSe 2025, Problem 1c — what does a rejection at level 5 % say? SoSe25 · P1c · 3 credits
Statement. From a large batch of switches you take a random subsample of size \(n\) and run a suitable test at \(\alpha=0.05\) of \(H_0\): "the proportion of defective switches in the batch is at most what the manufacturer claimed" against \(H_1\): "the proportion is larger". The test rejects \(H_0\). "You can therefore conclude that the probability that the entire batch conforms to the claimed proportion is at most 5 %." True or false?
Answer: False. Reasons, step by step:
- What \(\alpha\) is. By Definition 3.34(v), \(\alpha\ge\sup_{\theta\in\Theta_0}\P_\theta(\text{reject})\). It is a probability of rejecting, computed assuming \(H_0\): "if the batch conforms, this procedure rejects in at most 5 % of repeated samples". It describes the procedure.
- What the statement claims. It claims \(\P(H_0\text{ true}\mid\text{rejected})\le0.05\) — a probability of the hypothesis, given the data. That is the reverse conditional (Caveat 3.50, first bullet).
- Why that probability does not exist here. In the frequentist framework, the batch's defect proportion is a fixed, unknown number. The batch either conforms or it does not; there is nothing random about it, so "the probability that the batch conforms" is not defined by the test.
- Even with a prior it is not 5 %. If we added a prior probability for "batch conforms" (Bayesian view, §3.5), Bayes' theorem would give \(\P(H_0\mid\text{reject})\), and it depends on the prior and the power. With the numbers under Caveat 3.50 (90 % of batches conform, power 0.5) it would be 47 %, not \(\le5\) %.
The official answer ("False. The significance level makes claims about the procedure, not probabilities of the true parameter (or how it manifests in a given batch).") is correct. A correct statement would be: "If the batch conforms, the probability that this procedure rejects is at most 5 %." For full credit give the direction of conditioning explicitly.
SoSe 2025, Problem 4d — approximate one-sided test for a Poisson rate SoSe25 · P4d · 4 credits
Setting. \(X_1,\dots,X_n\) iid \(\Poi(\lambda)\) (mean and variance \(\lambda\)). Earlier parts (on §3.2): (a) \(\hat\lambda_{\text{mle}}=\bar X_n\); (b) it is unbiased; (c) by the clt, \(\bar X_n\approx\mathcal N(\lambda,\lambda/n)\). Now: defects per batch are Poisson; historically \(\lambda_0=4\). After a process change, \(n=100\) batches give \(\bar x_{100}=5\). Construct an approximate test of whether the mean number of defects has increased, at \(\alpha=0.05\) (hint \(z_{0.05}\approx1.64\)). Reject?
Solution (Remark 3.52, step by step).
- Hypotheses: \(H_0:\lambda=4\) (or \(H_0:\lambda\le4\); both work) against \(H_1:\lambda>4\). One-sided: only an increase matters.
- Statistic: based on the estimator \(\bar X_n\). Under \(H_0\) its mean is 4 and its variance \(\frac4n\) (Poisson: variance = mean; divided by \(n\) for a mean of iid variables). Standardise: \(Z=\frac{\bar X_n-4}{\sqrt{4/n}}=\frac{\bar X_n-4}{\sqrt{4/100}}=\frac{\bar X_n-4}{0.2}\).
- Null distribution: by the clt (§2.4), approximately \(\mathcal N(0,1)\) under \(H_0\) (at the null boundary).
- Rejection rule: reject if \(z_{\text{obs}}>z_{0.05}\approx1.64\).
- Observed value and decision: \(z_{\text{obs}}=\frac{5-4}{0.2}=5>1.64\). Reject \(H_0\): the data give strong evidence that the defect rate increased.
Verification and extras. The official solution is correct (the hint's 1.64 is \(z_{0.05}=1.6449\) rounded; irrelevant here since \(z_{\text{obs}}=5\)). (1) It uses the null variance \(\lambda_0/n\) — the natural choice, because the null distribution is computed assuming \(H_0\). Plugging in the estimate instead (\(\sqrt{5/100}\)) gives \(z=4.47\): same decision. (2) For the composite \(H_0:\lambda\le4\), the rule "\(\bar x>4+1.64\cdot0.2=4.33\)" has its largest rejection probability at \(\lambda=4\) (larger rates push the sample mean up), so the boundary gives the size. (3) p-value: \(1-\Phi(5)=2.9\cdot10^{-7}\). Exactly, \(\sum X_i\sim\Poi(400)\) under \(H_0\) (sums of independent Poissons, §2.3), and \(\P(\sum X_i\ge500)=8.1\cdot10^{-7}\): the clt tail is off by a factor of about 3 this far out, but both are tiny and the decision is the same.
SoSe 2026, Problem 5d — testing a sensitive proportion with randomized response SoSe26 · P5d · 5 credits
Setting. Each participant has a sensitive attribute \(A\sim\Ber(p)\), \(p\) unknown. With probability \(r\) they answer truthfully, otherwise they report a fair coin flip. Part (a) (on §1.4) gave \(q(p):=\P(Y=1)=rp+\frac{1-r}2\); parts (b), (c) (on §3.2) gave the mle \(\hat p=\frac{\bar Y_n-(1-r)/2}r\). Now \(r=\frac12\), \(n=100\) iid responses, 64 of them equal 1. Do more than 60 % have the attribute? Formulate the hypotheses and perform an approximate test at \(\alpha=0.05\) (\(z_{0.05}\approx1.64\)): statistic, its approximate distribution at the null boundary, rejection rule, observed value, conclusion.
Solution.
- Hypotheses (1 point): the claim to show goes into \(H_1\): \(H_0:p\le0.6\) against \(H_1:p>0.6\). One-sided.
- Null boundary (1 point): with \(r=\frac12\), \(q(p)=\frac12p+\frac14\), which increases in \(p\). So "large \(p\)" means "many ones", and the worst case of the null is its boundary \(p_0=0.6\), where \(q_0=q(0.6)=0.3+0.25=0.55\). Each \(Y_i\sim\Ber(0.55)\) there, so \(\E[\bar Y_{100}]=0.55\) and \(\Var[\bar Y_{100}]=\frac{0.55\cdot0.45}{100}=0.002475\) (Bernoulli variance \(q(1-q)\), divided by \(n\)).
- Statistic and null distribution (1 point): \(Z=\frac{\bar Y_{100}-0.55}{\sqrt{0.55\cdot0.45/100}}\), approximately \(\mathcal N(0,1)\) at the null boundary by the clt.
- Rejection rule and observed value (1 point): reject if \(z_{\text{obs}}>z_{0.05}\approx1.64\). Observed \(\bar y_{100}=\frac{64}{100}=0.64\), standard error \(\sqrt{0.002475}=0.04975\), so \(z_{\text{obs}}=\frac{0.64-0.55}{0.04975}=\frac{0.09}{0.04975}=1.81\).
- Conclusion (1 point): \(1.81>1.64\), so reject \(H_0\) at (approximate) level 0.05. The data give evidence that more than 60 % of the population have the attribute.
Why the null boundary gives level α for all of \(H_0\). The rule is \(\bar y>c\) with \(c=0.55+1.64\cdot0.04975=0.632\). For \(p<0.6\), \(q(p)<0.55\), and a Bernoulli mean with a smaller success probability exceeds \(c\) less often. So the rejection probability over \(H_0\) is largest at \(p=0.6\), where it is (approximately) 0.05.
Verification and extras. The official solution is correct (\(z_{\text{obs}}=1.809\)). Remarks: (1) the cut-off 0.632 means the test rejects for 64 or more ones out of 100 — the observed 64 is the smallest count that rejects, so the result is borderline; p-value \(1-\Phi(1.81)=0.035\). The exact binomial p-value \(\P(\Bin(100,0.55)\ge64)=0.043\) is also below 0.05, so the decision stands. (2) The same test can be written with the estimator: \(\hat p=\frac{0.64-0.25}{0.5}=0.78\), and \(\frac{\hat p-0.6}{\sqrt{\Var_{0.6}[\hat p]}}=\frac{0.18}{2\cdot0.04975}=1.81\) — identical, since \(\hat p\) is an affine function of \(\bar Y\) (standardisation removes the \(a\) and \(b\) of \(a\bar Y+b\), up to the sign of \(a\)). (3) The privacy mechanism costs power: the standard error of \(\hat p\) is \(2\cdot0.04975=0.0995\) instead of \(\sqrt{0.6\cdot0.4/100}=0.049\) for direct answers.
Summary sheet
Definitions
- hypotheses
- \(\Theta=\Theta_0\mathbin{\dot\cup}\Theta_1\); \(H_0:\theta\in\Theta_0\), \(H_1:\theta\in\Theta_1\); simple = one element, composite = more
- test
- \(\varphi:\Omega^n\to[0,1]\); non-randomized: values in \(\{0,1\}\), 1 = reject; rejection region \(\varphi^{-1}(\{1\})\)
- errors
- type I: reject a true \(H_0\); type II: keep a false \(H_0\)
- power function
- \(G_\varphi(\theta)=\E_\theta[\varphi]=\P_\theta(\text{reject})\); power at \(\theta\in\Theta_1\); \(\beta(\theta)=1-G_\varphi(\theta)\)
- size / level
- size \(=\sup_{\theta\in\Theta_0}\E_\theta[\varphi]\); level \(\alpha\) if size \(\le\alpha\)
- ump
- level \(\alpha\) and \(G_\varphi\ge G_\psi\) on \(\Theta_1\) for every level-\(\alpha\) test \(\psi\)
- unbiased
- \(G_\varphi\le\alpha\) on \(\Theta_0\) and \(G_\varphi\ge\alpha\) on \(\Theta_1\)
- p-value
- \(\P_{\theta_0}(T\text{ at least as extreme as }t_{\text{obs}})\), direction from \(H_1\); reject iff p \(\le\alpha\)
Results
- Neyman–Pearson
- simple vs simple: reject iff \(\frac{L(\theta_1\mid x)}{L(\theta_0\mid x)}>k\), \(k\) chosen for size \(\alpha\) — most powerful
- Gaussian mean
- lrt ⟹ reject iff \(\bar x_n>\mu_0+z_\alpha\sigma/\sqrt n\) (one-sided z-test; ump for \(\mu>\mu_0\))
- z-test
- \(Z=\frac{\bar X_n-\mu_0}{\sigma/\sqrt n}\sim\mathcal N(0,1)\); one-sided \(z>z_\alpha\), two-sided \(|z|>z_{\alpha/2}\)
- t-test
- \(T=\frac{\bar X_n-\mu_0}{S_n/\sqrt n}\sim t_{n-1}\); \(t>t_{n-1,\alpha}\) or \(|t|>t_{n-1,\alpha/2}\)
- χ²-test
- \(C=\frac{(n-1)S_n^2}{\sigma_0^2}\sim\chi^2_{n-1}\); right: \(c>\chi^2_{n-1,\alpha}\); left: \(c<\chi^2_{n-1,1-\alpha}\)
- two-sample t
- \(T=\frac{\bar X-\bar Y}{S_p\sqrt{1/n_X+1/n_Y}}\sim t_{n_X+n_Y-2}\), \(S_p^2\) pooled
- approximate
- large \(n\), any iid data with finite variance: z-test via the clt
- power (z)
- one-sided \(G(\mu)=1-\Phi(z_\alpha-\delta)\), \(\delta=\frac{\mu-\mu_0}{\sigma/\sqrt n}\); \(n\ge\bigl(\frac{(z_\alpha+z_\beta)\sigma}{\mu_a-\mu_0}\bigr)^2\) for power \(1-\beta\)
- quantiles
- \(z_{0.1}=1.28\), \(z_{0.05}=1.645\), \(z_{0.025}=1.96\), \(z_{0.01}=2.33\), \(z_{0.005}=2.576\)
Method (Remark 3.52)
Hypotheses (claim to show in \(H_1\)) → statistic → its distribution under \(H_0\) (at the null boundary) → rejection rule from \(\alpha\) → observed value → decision + one sentence in words.
Traps
- \(\alpha\) and the p-value are probabilities assuming \(H_0\), never "the probability that \(H_0\) is true" (SoSe25 P1c).
- Not rejecting ≠ accepting \(H_0\); low power can hide real effects.
- \(z_\alpha\) is the upper quantile; two-sided tests need \(z_{\alpha/2}\).
- In power computations standardise the cut-off with the alternative mean.
- Unknown \(\sigma\) → t-quantiles, not normal ones (Sheet 11 Ex 3).
- Choosing the direction or the test after seeing the data, or running many tests, inflates type I errors (\(1-0.95^k\)).
Exam focus
SoSe25 and SoSe26 each ended an estimation problem with an approximate one-sided z-test (P4d: Poisson, \(z=5\); P5d: randomized response, \(z=1.81\)) and SoSe25 had a true/false item on interpreting \(\alpha\). Sheet 11 adds the t-test, the Neyman–Pearson derivation and type II error/power computations. Other question types are possible.
Self-test
Section 3.4 · Lectures 10–12 (the script marks no lecture numbers after Lecture 9, so the exact lecture is not known)
Interval estimation
Intervallschätzung (Konfidenzintervalle)
What this page covers Script §3.4, pp. 110–111
Everything from the section goal and Definition 3.54 to Remark 3.59: the definition of a confidence interval (Definition 3.54), how to interpret it (Remark 3.55), the three standard intervals — normal mean with known variance (Example 3.56), normal mean with unknown variance (Example 3.57), a proportion (Example 3.58, the Wald interval) — and the duality between confidence intervals and tests (Remark 3.59).
The section is short, so this page adds a lot of my own material (marked): every interval is derived step by step from a pivot, the duality is proved, the quantiles \(z_{\alpha/2}\) and \(t_{n-1,\alpha/2}\) get a recomputed table, and there is a sample-size calculation.
Worked in place: no sheet exercise asks for a confidence interval, so Sheet 11 Ex 1 and Ex 3 are redone as confidence intervals and Sheet 11 Ex 4 as a one-sided confidence bound (the tests themselves are solved on §3.3); Sheet 10 Ex 1 (uniform distribution) and Sheet 11 Ex 2 (exponential) get exact confidence intervals from non-normal pivots; and there is a note on the "confidence level" of Sheet 5 Ex 1. The only old-exam part that asks for a confidence interval is WiSe25 P5d, fully solved. The true/false item SoSe25 P1c is about the same interpretation question as Remark 3.55 and is discussed here too. As practice, the estimators of WiSe25 P4 (rainfall), SoSe25 P4 (Poisson defects) and SoSe26 P5 (randomized response) are turned into confidence intervals — those exams did not ask for this; it is my addition. No definitions item of the three exams concerns §3.4.
The big picture
An estimator (§3.2) gives one number as a guess for an unknown quantity: "the average lifetime of the new light bulbs is about 1250 hours". But how sure are we? Would 1240 hours also be believable? 1100? A single number does not say.
A confidence interval [Konfidenzintervall] answers with a range instead: "the mean lifetime is between 1201 and 1299 hours, at 95 % confidence". Its width shows how uncertain the guess is.
The picture to keep in mind: ring toss. The unknown parameter is a peg fixed in the ground. We cannot see it. Each time we collect data and compute an interval, we throw a ring. Some rings land around the peg, some miss. A "95 % confidence interval" is a way of throwing that puts the ring around the peg in 95 % of throws. The peg never moves; the rings are what is random.
Numbers (my example). A scale has measurement noise with standard deviation \(\sigma=2\) g. You weigh an object \(n=4\) times and get the average \(\bar x=50.3\) g. The average of 4 measurements has standard deviation \(\frac{\sigma}{\sqrt n}=\frac22=1\) g. For a normal distribution, 95 % of the probability lies within 1.96 standard deviations of the mean. So the average lands within \(1.96\cdot1=1.96\) g of the true mass \(\mu\) with probability 95 %. Turned around: the interval \(50.3\pm1.96=[48.34,\,52.26]\) is a 95 % confidence interval for \(\mu\). If you measured 16 times instead, the standard deviation of the average would be \(\frac2{\sqrt{16}}=0.5\) g, and the interval half as wide.
In words: a confidence interval is "estimate ± (a quantile) × (the estimate's standard deviation)". The 95 % describes how often the method catches the true value, not a probability for one particular interval.
Primer: what you need from earlier My addition
Cross-references
Rules for inequalities (adding, multiplying by positive and negative numbers): stated and explained in primer box 2 below; the order axioms [Anordnungsaxiome] they come from: Analysis 1.1, ordering (that section lists only the axioms, not these rules). Solving \(F(x)=q\) numerically by bisection: Analysis 4: bisection. The clt: §2.4. Standardising a normal variable and sums of normals: §2.3. Quantiles: §2.1. Student's t distribution: §1.3. Statistical models: §3.1; estimators: §3.2; tests: §3.3.
0. Words and symbols used on this page
- Statistical model (Definition 3.4, §3.1): a family of probability distributions \((\P_\theta)_{\theta\in\Theta}\). \(\theta\) (theta) is the unknown parameter, \(\Theta\) (capital theta) the set of all values it could have (the parameter space). \(\P_\theta\) means "probability computed as if the true parameter were \(\theta\)". Example: data \(\mathcal N(\mu,\sigma^2)\) with unknown \(\mu\); then \(\theta=\mu\) and \(\Theta=\R\).
- Parameter of interest (Definition 3.9): a function \(\gamma:\Theta\to\R\) (gamma) of the parameter — the number we actually want to know. Often simply \(\gamma(\theta)=\theta\). If \(\theta=(\mu,\sigma^2)\), then \(\gamma(\theta)=\mu\) picks out the mean.
- Sample \(X=(X_1,\dots,X_n)\): the data before we look at them, as random variables; usually iid (independent and identically distributed, §1.4). Lower-case \(x=(x_1,\dots,x_n)\) are the observed numbers.
- Sample mean \(\bar X_n=\frac1n\sum_{i=1}^nX_i\) and sample variance \(S_n^2=\frac1{n-1}\sum_{i=1}^n(X_i-\bar X_n)^2\) (Example 3.7). \(S_n=\sqrt{S_n^2}\) is the sample standard deviation. Their observed values are written \(\bar x_n\), \(s_n\).
- Normal distribution \(\mathcal N(\mu,\sigma^2)\): mean \(\mu\), variance \(\sigma^2\), bell-shaped density. \(Z\sim\mathcal N(0,1)\) is the standard normal, with cdf \(\Phi(z)=\P(Z\le z)\). If \(X\sim\mathcal N(\mu,\sigma^2)\), then \(\frac{X-\mu}\sigma\sim\mathcal N(0,1)\) (Example 2.52). If \(X_1,\dots,X_n\) are iid \(\mathcal N(\mu,\sigma^2)\), then \(\bar X_n\sim\mathcal N(\mu,\frac{\sigma^2}n)\) exactly (sums of independent normals are normal, Lemma 2.53, §2.3; the mean and variance follow from linearity and independence).
- Standard error [Standardfehler]: the standard deviation of an estimator, here \(\frac{\sigma}{\sqrt n}\) for \(\bar X_n\) (Theorem 2.64, §2.4).
- Central limit theorem (clt, §2.4): for iid \(X_i\) with mean \(\mu\) and variance \(\sigma^2\in(0,\infty)\), \(\frac{\bar X_n-\mu}{\sigma/\sqrt n}\) is approximately \(\mathcal N(0,1)\) for large \(n\).
- Bernoulli \(\Ber(p)\): the value 1 with probability \(p\), else 0. Mean \(p\), variance \(p(1-p)\). \(\chi_A\) (the script's indicator, also written \(\one_A\)) is 1 on the set \(A\), 0 outside.
- Test (§3.3): a rule that looks at the data and either rejects a null hypothesis \(H_0\) or does not. Level (significance level) \(\alpha\): the probability of rejecting \(H_0\) when \(H_0\) is true is at most \(\alpha\). The z-test (Example 3.44) and t-test (Example 3.45) for \(H_0:\mu=\mu_0\) are the ones used here.
- Other distributions used in the extensions (§1.3): \(\mathrm{Unif}(0,\theta)\) — every value in \([0,\theta]\) equally likely, cdf \(x/\theta\) there; \(\mathrm{Exp}(\lambda)\) — waiting time with cdf \(1-e^{-\lambda x}\) for \(x\ge0\); \(\mathrm{Poi}(\lambda)\) — counts \(k=0,1,2,\dots\) with mean and variance \(\lambda\).
- Maximum likelihood estimator (mle) [Maximum-Likelihood-Schätzer] (§3.2): the parameter value under which the observed data are most probable; written \(\hat\theta_{\text{mle}}\). A hat \(\hat{\ }\) on a symbol always means "estimate of".
- Law of large numbers (lln, §2.4): \(\bar X_n\) gets close to \(\mu\) as \(n\) grows. Chebyshev's inequality (§2.2): for any random variable \(Y\) with finite variance and any \(\varepsilon>0\), \(\P(|Y-\E[Y]|\ge\varepsilon)\le\frac{\Var[Y]}{\varepsilon^2}\) — always true, but often loose.
- Bayes' rule (Theorem 1.70, §1.4): \(\P(A\mid B)=\frac{\P(B\mid A)\P(A)}{\P(B)}\), used once in SoSe25 P1c.
- \(\alpha\in(0,1)\) (alpha) is a small number such as 0.05; \(1-\alpha\) such as 0.95 is the confidence level. "\(100(1-\alpha)\,\%\)" turns it into a percentage: \(\alpha=0.05\) gives 95 %.
1. Critical values: the quantiles \(z_{\alpha/2}\) and \(t_{n-1,\alpha/2}\)
Quantile (§2.1): for a continuous, strictly increasing cdf \(F\), the \(q\)-quantile is the number \(x\) with \(F(x)=q\) — the point with probability \(q\) to its left.
The course's subscript convention (Example 3.46): a subscript gives the probability to the right. So \(z_a\) is the value with \(\P(Z>z_a)=a\), i.e. the \((1-a)\)-quantile of \(\mathcal N(0,1)\): \(\Phi(z_a)=1-a\). In particular \(z_{\alpha/2}\) has probability \(\frac\alpha2\) to its right. By the symmetry of the bell curve, \(-z_{\alpha/2}\) has probability \(\frac\alpha2\) to its left, so exactly \(1-\alpha\) lies between them. Example: \(\alpha=0.05\): \(\Phi(z_{0.025})=0.975\), \(z_{0.025}\approx1.96\).
In the same way, \(t_{\nu,a}\) is the value with probability \(a\) to its right under Student's \(t_\nu\) distribution (§1.3: a symmetric bell-shaped density with heavier tails than the normal; \(\nu\) (nu) is the number of "degrees of freedom" [Freiheitsgrade]).
Values recomputed by me with scipy:
| \(\alpha\) | 0.20 | 0.10 | 0.05 | 0.01 | 0.001 |
|---|---|---|---|---|---|
| confidence \(1-\alpha\) | 80 % | 90 % | 95 % | 99 % | 99.9 % |
| \(z_{\alpha/2}\) | 1.282 | 1.645 | 1.960 | 2.576 | 3.291 |
| \(\nu=n-1\) | 1 | 2 | 3 | 4 | 5 | 9 | 19 | 29 | 99 | \(\infty\) |
|---|---|---|---|---|---|---|---|---|---|---|
| \(t_{\nu,0.05}\) (90 %) | 6.314 | 2.920 | 2.353 | 2.132 | 2.015 | 1.833 | 1.729 | 1.699 | 1.660 | 1.645 |
| \(t_{\nu,0.025}\) (95 %) | 12.706 | 4.303 | 3.182 | 2.776 | 2.571 | 2.262 | 2.093 | 2.045 | 1.984 | 1.960 |
| \(t_{\nu,0.005}\) (99 %) | 63.657 | 9.925 | 5.841 | 4.604 | 4.032 | 3.250 | 2.861 | 2.756 | 2.626 | 2.576 |
Read the table like this: the t values are always larger than the z value in the same row, much larger for small \(\nu\), and they approach it as \(\nu\to\infty\) (last column). Sheet 11 Ex 3 uses \(t_{9,0.025}\approx2.262\). Exams give the value you need or let you leave the symbol in the answer.
2. Moving things around inside a double inequality
All derivations below turn "\(-c\le\text{something with }\mu\le c\)" into "\(\text{lower}\le\mu\le\text{upper}\)". Only three rules are used, and each is applied to both inequalities at once. my addition They follow from the order axioms of the real numbers (Analysis 1.1, ordering, which states the axioms but not these rules); the one-line reasons are given with each rule:
- Adding the same number \(b\) to all three parts keeps the directions: \(a\le y\le c\iff a+b\le y+b\le c+b\).
- Multiplying all three parts by a positive number keeps the directions. (Reason: \(a\le y\) means \(y-a\ge0\); a positive number \(s\) times a non-negative number is non-negative, so \(sy-sa=s(y-a)\ge0\), i.e. \(sa\le sy\).)
- Multiplying by \(-1\) reverses both directions: \(a\le y\le c\iff -c\le -y\le -a\). (Reason: add \(-a-y\) to both sides of \(a\le y\) using rule 1: \(a+(-a-y)\le y+(-a-y)\), i.e. \(-y\le-a\). Example: \(2\le3\) but \(-3\le-2\).)
Each rule is an "if and only if", so the event before and the event after contain exactly the same outcomes. Hence they have the same probability. That is the whole trick behind "rearranging the inequality for \(\mu\)".
Confidence intervals
Section goal Script §3.4
A point estimate gives a single "best guess" for a parameter, but it says nothing about how uncertain that guess is. An interval estimate, such as a confidence interval, gives a range of plausible values for an unknown parameter, together with a level of confidence.
Definition 3.54 confidence interval [Konfidenzintervall] Script 3.54
Let \(\alpha\in(0,1)\). A \(100(1-\alpha)\,\%\) confidence interval (ci) for a parameter of interest \(\gamma(\theta)\in\R\) is an interval with random endpoints \((L(X),U(X))\), computed from the sample \(X=(X_1,\dots,X_n)\), such that
\[ \P_\theta\bigl(L(X)\le\gamma(\theta)\le U(X)\bigr)\ \ge\ 1-\alpha\qquad\text{for all }\theta\in\Theta . \]The value \(1-\alpha\) is the confidence level [Konfidenzniveau]. The key point: the interval is random, while the parameter is treated as a fixed, unknown constant.
Each part explained (mine).
- \(L\) and \(U\) ("lower" and "upper") are statistics: formulas that take the data and return a number, like \(L(X)=\bar X_n-1.96\frac\sigma{\sqrt n}\). They may not contain the unknown \(\theta\) — otherwise we could not compute them from the data.
- Because \(X\) is random, \(L(X)\) and \(U(X)\) are random variables. The event \(\{L(X)\le\gamma(\theta)\le U(X)\}\) means "the random interval covers the fixed number \(\gamma(\theta)\)". Its probability is called the coverage probability [Überdeckungswahrscheinlichkeit].
- "\(\ge1-\alpha\) for all \(\theta\in\Theta\)": we do not know the true \(\theta\), so the guarantee has to hold whichever \(\theta\) is true. The coverage may be bigger than \(1-\alpha\) for some \(\theta\) ("conservative"); in the normal examples below it is exactly \(1-\alpha\).
- After the data are in, we plug in the observed \(x\) and get two numbers \(L(x)\), \(U(x)\). The script uses the word "confidence interval" both for the random interval (the method) and for this computed interval (its result).
- The script writes \((L,U)\) with round brackets but uses \(\le\) in the probability. For the continuous distributions below the endpoints are hit with probability 0, so open or closed makes no difference.
Simple example (mine): the scale from the big picture. \(L(X)=\bar X_4-1.96\), \(U(X)=\bar X_4+1.96\) with \(\bar X_4\sim\mathcal N(\mu,1)\). Coverage \(=\P(|\bar X_4-\mu|\le1.96)=0.95\) for every \(\mu\) (derived in Example 3.56 below). Counterexample: \(L=U=\bar X_4\) (a "zero-width interval") has coverage \(\P(\bar X_4=\mu)=0\): it is a point estimate, not a ci at any level. At the other extreme, \(L=-\infty\), \(U=\infty\) has coverage 1 but is useless. A good ci is as short as possible while keeping the coverage.
In exercises and exams: you are asked to "give a \(100(1-\alpha)\,\%\) ci", and the answer is a formula "estimate \(\pm\) quantile \(\times\) standard error" together with the reason why its coverage is (approximately) \(1-\alpha\) (WiSe25 P5d below).
Remark 3.55 interpretation of confidence intervals Script 3.55
The frequentist interpretation of a 95 % confidence interval: if we repeated our sampling procedure a large number of times, each time constructing a 95 % confidence interval, then about 95 % of these randomly generated intervals would contain the true, fixed parameter value.
It is incorrect to say that for a specific, calculated interval there is a 95 % probability that the true parameter lies within it. Once calculated, the interval is fixed, and the true parameter is either in it or not. The probability statement applies to the procedure, not to a particular outcome.
Remark 3.55 with numbers, and the common misreadings My addition
Before and after the data. Light bulbs (Sheet 11 Ex 1): \(n=36\), \(\sigma=150\), so the standard error is \(\frac{150}{\sqrt{36}}=25\) hours.
- Before sampling: \(\P_\mu\bigl(\bar X_{36}-49\le\mu\le\bar X_{36}+49\bigr)=0.95\) for every \(\mu\) (\(1.96\cdot25=49\)). This is a true probability statement about the random \(\bar X_{36}\).
- After sampling, \(\bar x_{36}=1250\), and the interval is \([1201,1299]\). The statement "\(\P(1201\le\mu\le1299)=0.95\)" is meaningless in the frequentist model: \(1201\), \(1299\) and \(\mu\) are all fixed numbers. The inequality is simply true or false — probability 1 or 0 — and we do not know which.
How many intervals miss? Each of \(100\) independent 95 % intervals misses with probability 0.05, so the number of misses is \(\Bin(100,0.05)\): on average 5, but exactly 5 only with probability 0.18, and anything from 1 to 9 misses happens with probability 0.97. The first widget below shows this.
Common misreadings — all wrong:
- "There is a 95 % probability that \(\mu\) lies in \([1201,1299]\)." (Remark 3.55 — the parameter is not random. A statement of this form is what a Bayesian credible interval gives, §3.5, Definition 3.64 and Remark 3.65.)
- "95 % of the data lie in the interval." No: the interval is about the mean, and it shrinks like \(\frac1{\sqrt n}\); the spread of individual bulbs (\(\sigma=150\)) does not shrink. Here the interval is only 98 hours wide, while single bulbs vary by hundreds of hours.
- "If I repeat the experiment, the new mean will lie in my interval with probability 95 %." No: both the old interval and the new mean are random. The difference of two independent sample means has standard deviation \(\sqrt2\cdot25\), so the probability is \(\P(|Z|\le1.96/\sqrt2)=2\Phi(1.386)-1\approx0.83\).
- "The true value is more likely near the centre of the interval." Not a frequentist statement at all — \(\mu\) has no distribution here.
- "A 99 % interval is better than a 95 % one." It covers more often, but it is wider (\(2.576\) instead of \(1.96\) standard errors). Confidence and precision trade off; only more data (larger \(n\)) buys both.
In words: "95 %" is the hit rate of the ring-throwing method. Any one ring either surrounds the peg or not.
Confidence interval versus credible interval — a preview My addition
The sentence that Remark 3.55 forbids — "given my data, \(\mu\) lies in this interval with probability 95 %" — is exactly what a Bayesian credible interval [Kredibilitätsintervall] says (Definition 3.64). That is possible there because the Bayesian model gives the parameter itself a probability distribution (a prior, updated to a posterior). The script contrasts the two in Remark 3.65 on §3.5:
- confidence interval: the interval is random, the parameter fixed; "95 %" is a property of the method over repeated samples;
- credible interval: the data are fixed (observed), the parameter is random; "95 %" is a probability for this one interval, but it depends on the chosen prior.
With a lot of data the two often give nearly the same numbers, but they still answer different questions.
The mean of a normal distribution: z and t intervals
Example 3.56 ci for a normal mean, known variance Script 3.56
Let \(X_1,\dots,X_n\) be iid \(\mathcal N(\mu,\sigma^2)\) with \(\sigma^2\) known. The quantity
\[ Z=\frac{\bar X_n-\mu}{\sigma/\sqrt n}\ \sim\ \mathcal N(0,1) \]is a pivotal quantity [Pivot], because its distribution does not depend on the unknown parameter \(\mu\). We can find a critical value \(z_{\alpha/2}\) such that \(\P(-z_{\alpha/2}\le Z\le z_{\alpha/2})=1-\alpha\). Rearranging the inequality for \(\mu\) yields
\[ \P\Bigl(\bar X_n-z_{\alpha/2}\frac{\sigma}{\sqrt n}\ \le\ \mu\ \le\ \bar X_n+z_{\alpha/2}\frac{\sigma}{\sqrt n}\Bigr)=1-\alpha . \]Thus the \(100(1-\alpha)\,\%\) ci for \(\mu\) is \(\bar X_n\pm z_{\alpha/2}\frac{\sigma}{\sqrt n}\).
What is a pivot? (mine) A pivot is a formula that involves both the data and the unknown parameter, but whose distribution is completely known. \(\bar X_n\) alone is not a pivot: its distribution \(\mathcal N(\mu,\frac{\sigma^2}n)\) depends on the unknown \(\mu\). Subtracting \(\mu\) and dividing by the standard error removes that dependence. Because we know the pivot's distribution, we can write down an event of probability \(1-\alpha\) for it — and then solve that event for the parameter.
Derivation, every step steps filled in by me
Step 1: \(Z\) really is \(\mathcal N(0,1)\). \(\bar X_n\sim\mathcal N(\mu,\frac{\sigma^2}n)\) exactly (primer box 0: a sum of independent normals is normal; \(\E[\bar X_n]=\mu\) by linearity; \(\Var[\bar X_n]=\frac1{n^2}\cdot n\sigma^2=\frac{\sigma^2}n\) by independence). Standardising a normal variable (subtract its mean, divide by its standard deviation \(\frac\sigma{\sqrt n}\)) gives \(\mathcal N(0,1)\) (Example 2.52).
Step 2: choose the critical value. For a continuous distribution, \(\P(-z\le Z\le z)=\Phi(z)-\Phi(-z)\). By symmetry \(\Phi(-z)=1-\Phi(z)\), so this equals \(2\Phi(z)-1\). Setting \(2\Phi(z)-1=1-\alpha\) and solving: \(2\Phi(z)=2-\alpha\), so \(\Phi(z)=1-\frac\alpha2\). That is the definition of \(z_{\alpha/2}\) (primer box 1).
Step 3: write the event. \(\P\Bigl(-z_{\alpha/2}\le\frac{\bar X_n-\mu}{\sigma/\sqrt n}\le z_{\alpha/2}\Bigr)=1-\alpha\).
Step 4: multiply by the positive number \(\frac\sigma{\sqrt n}\) (primer box 2, rule 2): \(-z_{\alpha/2}\frac\sigma{\sqrt n}\le\bar X_n-\mu\le z_{\alpha/2}\frac\sigma{\sqrt n}\).
Step 5: subtract \(\bar X_n\) from all three parts (rule 1): \(-\bar X_n-z_{\alpha/2}\frac\sigma{\sqrt n}\le-\mu\le-\bar X_n+z_{\alpha/2}\frac\sigma{\sqrt n}\).
Step 6: multiply by \(-1\), which reverses both inequalities (rule 3): \(\bar X_n+z_{\alpha/2}\frac\sigma{\sqrt n}\ge\mu\ge\bar X_n-z_{\alpha/2}\frac\sigma{\sqrt n}\). Read from right to left, this is \(\bar X_n-z_{\alpha/2}\frac\sigma{\sqrt n}\le\mu\le\bar X_n+z_{\alpha/2}\frac\sigma{\sqrt n}\).
Step 7: same event, same probability. Steps 4–6 were "if and only if" transformations, so the event in step 6 contains exactly the same outcomes as the event in step 3. Its probability is \(1-\alpha\), for every \(\mu\). So Definition 3.54 holds with \(L=\bar X_n-z_{\alpha/2}\frac\sigma{\sqrt n}\) and \(U=\bar X_n+z_{\alpha/2}\frac\sigma{\sqrt n}\), with equality instead of \(\ge\). \(L\) and \(U\) contain no \(\mu\), so they are computable. ∎
Numbers (mine): \(n=25\), \(\sigma=3\), observed \(\bar x_{25}=11\), \(\alpha=0.05\). Standard error \(\frac3{\sqrt{25}}=0.6\); half-width \(1.96\cdot0.6=1.176\); interval \([9.824,\,12.176]\).
Three things that control the width \(2z_{\alpha/2}\frac\sigma{\sqrt n}\) (mine): more confidence (smaller \(\alpha\)) → larger \(z_{\alpha/2}\) → wider; noisier data (larger \(\sigma\)) → wider; more data → narrower, but only like \(\frac1{\sqrt n}\): to halve the width you need four times as many observations.
Recipe: a confidence interval from a pivot My addition
- Find a pivot \(Q(X,\gamma)\): a formula in the data and the parameter whose distribution is known and does not depend on any unknown parameter (exactly, or approximately by the clt).
- Take its quantiles: find \(a,b\) with \(\P(a\le Q\le b)=1-\alpha\). For a symmetric pivot, \(a=-b\) and \(b\) is the upper \(\frac\alpha2\) point (\(z_{\alpha/2}\), \(t_{n-1,\alpha/2}\)).
- Solve the double inequality \(a\le Q\le b\) for the parameter, one "if and only if" step at a time (primer box 2).
- Read off \(L\) and \(U\). Check they contain no unknown quantity. Plug in the data.
- State the level, and say "approximate" whenever step 1 used the clt.
Example 3.57 ci for a normal mean, unknown variance Script 3.57
If \(\sigma^2\) is unknown, we use the pivotal quantity
\[ T=\frac{\bar X_n-\mu}{S_n/\sqrt n}, \]which follows a Student's t-distribution with \(n-1\) degrees of freedom (§1.3). The \(100(1-\alpha)\,\%\) ci for \(\mu\) is
\[ \bar X_n\pm t_{n-1,\alpha/2}\frac{S_n}{\sqrt n}, \]where \(t_{n-1,\alpha/2}\) is the critical value from the \(t_{n-1}\) distribution. The t-distribution has heavier tails than the normal, accounting for the extra uncertainty of estimating \(\sigma^2\).
Why a new pivot? (mine) The z interval needs \(\sigma\). If \(\sigma\) is unknown, the endpoints \(\bar X_n\pm z_{\alpha/2}\frac\sigma{\sqrt n}\) cannot be computed. The natural idea is to replace \(\sigma\) by its estimate \(S_n\). But then the denominator is random too: sometimes \(S_n\) comes out too small, and the ratio becomes larger than a standard normal would. So \(T\) is not \(\mathcal N(0,1)\); it is more spread out. William Gosset ("Student", 1908) computed its exact distribution.
Why \(T\sim t_{n-1}\) explained by me — the script states it without proof
For iid \(\mathcal N(\mu,\sigma^2)\) data, two facts hold (Student's theorem; their proofs use linear algebra beyond this course, so I only state them):
- (a) \(\bar X_n\) and \(S_n^2\) are independent;
- (b) \(V:=\frac{(n-1)S_n^2}{\sigma^2}\sim\chi^2_{n-1}\) (the chi-squared distribution with \(n-1\) degrees of freedom, §1.3).
Remark 1.62 says: if \(Z\sim\mathcal N(0,1)\) and \(V\sim\chi^2_\nu\) are independent, then \(\frac{Z}{\sqrt{V/\nu}}\sim t_\nu\). Take \(Z=\frac{\bar X_n-\mu}{\sigma/\sqrt n}\) (standard normal by Example 3.56), \(V\) from (b) and \(\nu=n-1\); by (a) they are independent. Now simplify:
\[ \frac{Z}{\sqrt{V/(n-1)}}=\frac{\dfrac{\bar X_n-\mu}{\sigma/\sqrt n}}{\sqrt{\dfrac{(n-1)S_n^2}{\sigma^2(n-1)}}}=\frac{\dfrac{(\bar X_n-\mu)\sqrt n}{\sigma}}{\dfrac{S_n}{\sigma}}=\frac{(\bar X_n-\mu)\sqrt n}{S_n}=\frac{\bar X_n-\mu}{S_n/\sqrt n}=T . \](Middle steps: \((n-1)\) cancels; \(\sqrt{S_n^2/\sigma^2}=S_n/\sigma\) because both are positive; dividing by \(\frac{S_n}\sigma\) is multiplying by \(\frac\sigma{S_n}\), and \(\sigma\) cancels.) The unknown \(\sigma\) has disappeared — that is why \(T\) is a pivot. Only \(n-1\) (not \(n\)) degrees of freedom remain, because \(S_n^2\) measures spread around \(\bar X_n\), which already "used up" one piece of information.
Derivation of the interval steps filled in by me
Exactly as in Example 3.56, with \(t_{n-1,\alpha/2}\) instead of \(z_{\alpha/2}\) and \(S_n\) instead of \(\sigma\). The \(t_{n-1}\) density is symmetric about 0, so \(\P(-t_{n-1,\alpha/2}\le T\le t_{n-1,\alpha/2})=1-2\cdot\frac\alpha2=1-\alpha\). Multiply by \(\frac{S_n}{\sqrt n}>0\), subtract \(\bar X_n\), multiply by \(-1\): \(\bar X_n-t_{n-1,\alpha/2}\frac{S_n}{\sqrt n}\le\mu\le\bar X_n+t_{n-1,\alpha/2}\frac{S_n}{\sqrt n}\), with probability exactly \(1-\alpha\) for every \(\mu\) and every \(\sigma\). Here \(\theta=(\mu,\sigma^2)\) and \(\gamma(\theta)=\mu\); \(\sigma\) is a "nuisance parameter" the interval does not need to know. ∎
Numbers (mine): five measurements \(9.8,\ 10.4,\ 10.1,\ 9.6,\ 10.6\). Then \(\bar x_5=\frac{50.5}5=10.1\). Deviations from 10.1: \(-0.3,\,0.3,\,0,\,-0.5,\,0.5\); their squares sum to \(0.09+0.09+0+0.25+0.25=0.68\), so \(s_5^2=\frac{0.68}4=0.17\), \(s_5=0.412\), and \(\frac{s_5}{\sqrt5}=0.184\). With \(t_{4,0.025}=2.776\): half-width \(2.776\cdot0.184=0.512\), interval \([9.588,\,10.612]\). Using 1.96 instead would give \([9.739,\,10.461]\) — narrower, but its true coverage for \(n=5\) is only \(\P(|T_4|\le1.96)\approx0.878\), not 0.95 (widget above, method "z with S").
For large \(n\) the difference fades: \(t_{n-1,\alpha/2}\to z_{\alpha/2}\) (last column of the table), and the "z with S" coverage is 0.935 for \(n=20\), 0.947 for \(n=100\). This is also why, for large samples of non-normal data, "estimate \(\pm z_{\alpha/2}\cdot\)estimated standard error" is the standard approximate interval — Example 3.58 is one.
A proportion: the Wald interval
Example 3.58 ci for a proportion Script 3.58
Let \(X_1,\dots,X_n\) be iid \(\Ber(p)\) and \(\hat p=\bar X_n\) (the fraction of ones). For large \(n\), the clt implies that \(\dfrac{\hat p-p}{\sqrt{p(1-p)/n}}\) is approximately distributed like \(\mathcal N(0,1)\). Replacing the unknown \(p\) in the standard error with its estimate \(\hat p\) gives the Wald interval, an approximate \(100(1-\alpha)\,\%\) ci for \(p\):
\[ \hat p\pm z_{\alpha/2}\sqrt{\frac{\hat p(1-\hat p)}n}. \]This approximation performs poorly for small \(n\) or when \(p\) is near 0 or 1. Other methods like the Wilson score interval or the Clopper–Pearson interval have better coverage in those cases.
Derivation, every step steps filled in by me
Step 1 (clt). One \(X_i\sim\Ber(p)\) has mean \(p\) and variance \(p(1-p)\). If \(0<p<1\), the variance is positive and finite, so the clt (Theorem 2.64) applies with \(\mu=p\), \(\sigma=\sqrt{p(1-p)}\): \(\frac{\hat p-p}{\sqrt{p(1-p)/n}}\approx\mathcal N(0,1)\). So \(\P\Bigl(-z_{\alpha/2}\le\frac{\hat p-p}{\sqrt{p(1-p)/n}}\le z_{\alpha/2}\Bigr)\approx1-\alpha\).
Step 2 (the problem). Solving this for \(p\) is awkward, because \(p\) appears in the denominator too.
Step 3 (plug in). Replace \(\sqrt{p(1-p)/n}\) by \(\widehat{\mathrm{se}}=\sqrt{\hat p(1-\hat p)/n}\). By the lln (§2.4) \(\hat p\to p\), so the ratio of the two standard errors tends to 1 and the approximation stays valid for large \(n\). (The theorem that makes "tends to 1 does not spoil a limit in distribution" precise is called Slutsky's lemma; it is not in the script.)
Step 4 (solve). Now \(\widehat{\mathrm{se}}\) is a positive number that does not contain \(p\). Multiply by it, subtract \(\hat p\), multiply by \(-1\) (primer box 2): \(\hat p-z_{\alpha/2}\widehat{\mathrm{se}}\le p\le\hat p+z_{\alpha/2}\widehat{\mathrm{se}}\), with probability \(\approx1-\alpha\). ∎
Numbers (mine): a poll of \(n=400\) people, 220 say yes, so \(\hat p=0.55\). \(\widehat{\mathrm{se}}=\sqrt{0.55\cdot0.45/400}=0.0249\); half-width \(1.96\cdot0.0249=0.049\); 95 % interval \([0.501,\,0.599]\). ("The margin of error is ±4.9 percentage points.")
Why "poorly near 0 or 1" (my examples, exact binomial computations):
- If \(\hat p=0\) (no successes at all), then \(\widehat{\mathrm{se}}=0\) and the Wald interval is the single point \(\{0\}\) — it claims certainty from, say, 20 observations.
- The interval can stick out of \([0,1]\): \(n=50\), \(\hat p=0.02\) gives a lower end of \(-0.019\).
- The real coverage of the nominal 95 % Wald interval is 0.876 for \(n=20,\ p=0.1\); 0.877 for \(n=100,\ p=0.05\); only 0.395 for \(n=50,\ p=0.01\). For \(n=100,\ p=0.3\) it is 0.950 — fine.
Wilson's fix, briefly. Instead of plugging in \(\hat p\) (step 3), solve step 1's inequality \((\hat p-p)^2\le z^2\frac{p(1-p)}n\) for \(p\) exactly; it is a quadratic inequality in \(p\), and its solution set is an interval that always lies inside \([0,1]\) and never has zero width. For \(n=20\), \(\hat p=0\) it gives \([0,\,0.161]\). Clopper–Pearson instead inverts exact binomial tests (the duality of Remark 3.59). Neither is examined; the widget shows Wilson for comparison.
Planning: how large must \(n\) be? My addition
The half-width ("margin of error") of the z interval is \(E=z_{\alpha/2}\frac\sigma{\sqrt n}\). To guarantee a half-width of at most \(E\), solve \(z_{\alpha/2}\frac\sigma{\sqrt n}\le E\) for \(n\): multiply by \(\sqrt n>0\) and divide by \(E>0\) to get \(\sqrt n\ge\frac{z_{\alpha/2}\sigma}E\); both sides are positive, so squaring keeps the direction:
\[ n\ \ge\ \Bigl(\frac{z_{\alpha/2}\,\sigma}{E}\Bigr)^2 , \]rounded up to the next integer.
- Light bulbs, \(\sigma=150\), want \(E=25\) hours at 95 %: \(n\ge(1.96\cdot150/25)^2=11.76^2=138.3\), so \(n=139\). For \(E=10\): \(n\ge864.3\), so \(n=865\). Dividing \(E\) by 2.5 multiplies \(n\) by \(2.5^2=6.25\).
- Proportion: \(\sigma=\sqrt{p(1-p)}\) is unknown before the study, but \(p(1-p)\le\frac14\) (a parabola with its top at \(p=\frac12\)). Worst case \(\sigma=\frac12\): for \(E=0.03\) (±3 points) at 95 %, \(n\ge(1.96\cdot0.5/0.03)^2=1067.1\), so \(n=1068\) — the familiar "about 1000 people" of opinion polls.
This is the interval version of the "power analysis up front" mentioned in Overview 3.53(ii).
Duality between confidence intervals and tests
Remark 3.59 duality between cis and hypothesis tests Script 3.59
There is a direct correspondence between two-sided hypothesis tests and confidence intervals. A \(100(1-\alpha)\,\%\) confidence interval for a parameter \(\theta\) consists of all values \(\theta_0\) for which the null hypothesis \(H_0:\theta=\theta_0\) would not be rejected at significance level \(\alpha\). Conversely, if a test rejects \(H_0:\theta=\theta_0\), then \(\theta_0\) does not lie in the \(100(1-\alpha)\,\%\) ci. This duality gives two perspectives on the same inferential problem.
The concrete case first (mine). The two-sided z-test (Example 3.44) rejects \(H_0:\mu=\mu_0\) when \(|z_{\text{obs}}|>z_{\alpha/2}\), with \(z_{\text{obs}}=\frac{\bar x_n-\mu_0}{\sigma/\sqrt n}\). So
\[ \text{not rejected}\iff\Bigl|\frac{\bar x_n-\mu_0}{\sigma/\sqrt n}\Bigr|\le z_{\alpha/2}\iff|\bar x_n-\mu_0|\le z_{\alpha/2}\frac\sigma{\sqrt n}\iff\mu_0\in\Bigl[\bar x_n-z_{\alpha/2}\frac\sigma{\sqrt n},\ \bar x_n+z_{\alpha/2}\frac\sigma{\sqrt n}\Bigr]. \](First step: multiply by \(\frac\sigma{\sqrt n}>0\). Second step: \(|d|\le c\) means \(-c\le d\le c\), and solving that for \(\mu_0\) is the same computation as steps 4–6 of Example 3.56.) The right-hand set is exactly the z interval of Example 3.56. The same computation with \(t_{n-1,\alpha/2}\) and \(s_n\) links the t-test (Example 3.45) to the t interval (Example 3.57).
Proof of the general duality My proof — the script states the remark without proof
Setup. For each candidate value \(\theta_0\in\Theta\), let \(\varphi_{\theta_0}\) be a test of \(H_0:\theta=\theta_0\) of level \(\alpha\): \(\P_{\theta_0}(\varphi_{\theta_0}\text{ rejects})\le\alpha\). Write \(A(\theta_0)\) for its acceptance region: the set of data \(x\) for which it does not reject. Then the level condition reads \(\P_{\theta_0}(X\in A(\theta_0))\ge1-\alpha\).
Tests → confidence set. Define, for observed data \(x\), \(C(x):=\{\theta_0\in\Theta:\ x\in A(\theta_0)\}\) — all parameter values that the data do not reject. Fix any true parameter \(\theta\). For every outcome, "\(\theta\in C(X)\)" holds exactly when "\(X\in A(\theta)\)" holds (definition of \(C\), with \(\theta_0=\theta\)). Two descriptions of the same event have the same probability, so
\[ \P_\theta\bigl(\theta\in C(X)\bigr)=\P_\theta\bigl(X\in A(\theta)\bigr)\ge1-\alpha . \]This holds for every \(\theta\in\Theta\), which is Definition 3.54 (whenever \(C(x)\) is an interval — true for the z- and t-tests, as computed above).
Confidence interval → tests. Conversely, let \([L(X),U(X)]\) be a \(100(1-\alpha)\,\%\) ci. For each \(\theta_0\) define the test "reject \(H_0:\theta=\theta_0\) if \(\theta_0\notin[L(X),U(X)]\)". If \(H_0\) is true, i.e. \(\theta=\theta_0\), its rejection probability is \(\P_{\theta_0}(\theta_0\notin[L,U])=1-\P_{\theta_0}(\theta_0\in[L,U])\le1-(1-\alpha)=\alpha\). So it has level \(\alpha\). ∎
Two small conditions hide in the remark: (1) the ci and the test must be built from the same pivot and the same \(\alpha\) (a 95 % interval matches a two-sided test at \(\alpha=0.05\)); (2) the boundary conventions must match — the script's z-test rejects on "\(>\)" and the interval is closed, so a \(\mu_0\) exactly on the boundary is "not rejected" and "inside". For continuous data this boundary case has probability 0.
How it is used (mine): a ci answers every two-sided test at once. From one interval you can read off the decision for any \(\mu_0\): reject exactly the values outside. It also shows more than a single test decision — how far from \(\mu_0\) the plausible values are, which is the "practical significance" point of Caveat 3.50.
In words: the confidence interval is the list of all parameter values the data cannot reject. "Rejected at level \(\alpha\)" = "outside the \(100(1-\alpha)\,\%\) interval".
One-sided confidence bounds — the partners of one-sided tests My addition
Remark 3.59 speaks about two-sided tests. A one-sided test (Definition 3.43, e.g. \(H_0:\mu\le\mu_0\) against \(H_1:\mu>\mu_0\)) has a partner too: a one-sided confidence bound [einseitige Konfidenzschranke], an interval of the form \([L(X),\infty)\).
Construction (normal data, \(\sigma\) known). All of the probability \(\alpha\) is put into one tail: \(\P_\mu\bigl(\frac{\bar X_n-\mu}{\sigma/\sqrt n}\le z_\alpha\bigr)=1-\alpha\), where \(z_\alpha\) (not \(z_{\alpha/2}\)) has probability \(\alpha\) to its right. Multiply by \(\frac\sigma{\sqrt n}>0\) and rearrange (primer box 2): \(\bar X_n-\mu\le z_\alpha\frac\sigma{\sqrt n}\iff\mu\ge\bar X_n-z_\alpha\frac\sigma{\sqrt n}\). So
\[ \P_\mu\Bigl(\mu\in\Bigl[\bar X_n-z_\alpha\tfrac{\sigma}{\sqrt n},\ \infty\Bigr)\Bigr)=1-\alpha\quad\text{for every }\mu . \]Duality. The one-sided z-test (Example 3.46(i)) rejects \(H_0:\mu\le\mu_0\) when \(\frac{\bar x_n-\mu_0}{\sigma/\sqrt n}>z_\alpha\), i.e. when \(\mu_0<\bar x_n-z_\alpha\frac\sigma{\sqrt n}\): exactly when \(\mu_0\) lies below the lower bound. (Same algebra as above, with \(\mu_0\) in place of \(\mu\).)
Sheet 11 Ex 4 as a bound Sheet 11 · Ex 4: \(\sigma=3\), \(n=25\), standard error \(0.6\), \(\alpha=0.01\), \(z_{0.01}\approx2.33\). The 99 % lower confidence bound is \(\bar x_{25}-2.33\cdot0.6=\bar x_{25}-1.398\). It lies above \(\mu_0=10\) exactly when \(\bar x_{25}>11.398\) — the sheet's rejection region, found on §3.3.
Trap: a two-sided 95 % interval uses \(z_{0.025}=1.96\); a one-sided 95 % bound uses \(z_{0.05}\approx1.645\). The SoSe26 P5 extension below shows a case where the one-sided test rejects but the two-sided 95 % interval still contains the null value — no contradiction, because they are partners of different tests.
Exercise-sheet tasks
No exercise sheet asks for a confidence interval directly (I checked Sheets 9, 10 and 11 line by line). Sheet 11 is about tests; its tests are solved on §3.3. Below I redo their data as confidence intervals and check that the decisions agree, as Remark 3.59 promises (Ex 4 is done as a one-sided bound in the box above). Sheet 10 is about estimators (solved on §3.2); its Ex 1 gives a nice exact interval that is not of the form "estimate ± quantile × standard error".
Sheet 11, Exercise 1 — light bulbs, as a confidence interval Sheet 11 · Ex 1 my addition
Data. Normal lifetimes, known \(\sigma=150\) hours, \(n=36\), observed \(\bar x_{36}=1250\). The sheet tests \(H_0:\mu=1200\) against \(H_1:\mu\ne1200\) and finds \(z_{\text{obs}}=\frac{1250-1200}{150/6}=\frac{50}{25}=2\): rejected at \(\alpha=0.05\) (\(2>1.96\)), not rejected at \(\alpha=0.001\) (\(2<3.29\)).
The same data as confidence intervals
Which interval? Normal data, \(\sigma\) known → Example 3.56: \(\bar x_n\pm z_{\alpha/2}\frac\sigma{\sqrt n}\), with standard error \(\frac{150}{\sqrt{36}}=\frac{150}6=25\).
95 % (\(\alpha=0.05\)): half-width \(1.96\cdot25=49\). Interval \([1250-49,\ 1250+49]=[1201,\,1299]\). The null value 1200 lies outside (just below 1201). Duality: reject \(H_0\) at 5 % — the same decision as the test.
99.9 % (\(\alpha=0.001\)): \(z_{0.0005}=3.291\), half-width \(3.291\cdot25=82.3\). Interval \([1167.7,\,1332.3]\). Now 1200 lies inside: do not reject at 0.1 % — again the same decision.
Why they must agree: \(1200\notin[1201,1299]\iff|1250-1200|>49\iff\frac{50}{25}>1.96\iff|z_{\text{obs}}|>z_{0.025}\) — the chain in Remark 3.59.
What the interval adds: the test only says "changed". The interval says "the new mean is somewhere between about 1201 and 1299 hours" — an improvement of anywhere from 1 to 99 hours, which a manager can judge for practical relevance.
Part (iii) of the sheet asks what the level means "for the confidence you should have". The official answer (the level is a long-run frequency over repeated datasets under \(H_0\), not a probability about this dataset) is correct and is the testing version of Remark 3.55. One convention difference: the sheet rejects when \(|z_{\text{obs}}|\ge z_{\alpha/2}\), the script (Example 3.44) when \(|z_{\text{obs}}|>z_{\alpha/2}\); for continuous data this changes nothing.
Sheet 11, Exercise 3 — beer bottles, as a confidence interval Sheet 11 · Ex 3 my addition
Data. Normal contents, \(\sigma\) unknown, \(n=10\), \(\bar x_{10}=328.5\) ml, \(s_{10}^2=4\) ml², so \(s_{10}=2\). The sheet tests \(H_0:\mu=330\) against \(H_1:\mu\ne330\) with the t-test, gets \(t_{\text{obs}}\approx-2.37\), and rejects at \(\alpha=0.05\) because \(2.37>t_{9,0.025}\approx2.262\).
The same data as a confidence interval
Which interval? Normal data, \(\sigma\) unknown → Example 3.57: \(\bar x_n\pm t_{n-1,\alpha/2}\frac{s_n}{\sqrt n}\) with \(n-1=9\) degrees of freedom.
Standard error: \(\frac{s_{10}}{\sqrt{10}}=\frac2{3.1623}=0.6325\) ml.
Half-width: \(t_{9,0.025}\cdot0.6325=2.262\cdot0.6325=1.431\) ml.
95 % interval: \([328.5-1.431,\ 328.5+1.431]=[327.07,\,329.93]\) ml.
Duality check: the claimed 330 ml lies outside (above 329.93), so the t-test at 5 % rejects — the sheet's decision. It is a close call: 330 misses the interval by only 0.07 ml, matching \(|t_{\text{obs}}|=2.372\) being only a little above 2.262. (The two-sided p-value is \(0.042\), just under 0.05.)
What the interval adds: the plausible mean contents are 327.1–329.9 ml, i.e. the bottles are short by between 0.07 and 2.9 ml on average.
Checking the official solution: correct. One rounding detail: it gives \(t_{\text{obs}}\approx-2.373\); more precisely \(-1.5/0.63246=-2.3717\approx-2.372\). This does not affect the decision.
Sheet 10, Exercise 1 extended — an exact ci for the uniform \(\theta\) Sheet 10 · Ex 1 my extension
Data from the sheet. \(X_1,\dots,X_n\) iid \(\mathrm{Unif}(0,\theta)\), \(\theta>0\) unknown. The sheet finds the mle \(\hat\theta_{\text{mle}}=X_{\max}=\max\{X_1,\dots,X_n\}\) and, in part (iii), its cdf \(F_{X_{\max}}(t)=(t/\theta)^n\) for \(0\le t\le\theta\) (solved on §3.2). Its bus example: waiting times \(4,1,7,12,5,9,10,2\), so \(n=8\), \(x_{\max}=12\) minutes. The sheet stops there; here is a 95 % confidence interval for \(\theta\).
Solution with a non-normal pivot
Step 1: find a pivot. Put \(Q:=X_{\max}/\theta\). For \(0\le u\le1\): \(\P_\theta(Q\le u)=\P_\theta(X_{\max}\le u\theta)=\bigl(\frac{u\theta}\theta\bigr)^n=u^n\) (the sheet's cdf at \(t=u\theta\)). The \(\theta\) cancels, so the distribution of \(Q\) is the same for every \(\theta\): \(Q\) is a pivot. Also \(Q\le1\) always, because no observation can exceed \(\theta\).
Step 2: an event of probability \(1-\alpha\). Take \(\P(a\le Q\le1)=1-a^n\) (cdf at 1 minus cdf at \(a\)). Setting \(1-a^n=1-\alpha\) gives \(a^n=\alpha\), so \(a=\alpha^{1/n}\).
Step 3: solve for \(\theta\). \(a\le\frac{X_{\max}}\theta\le1\). Multiply by \(\theta>0\) (keeps directions): \(a\theta\le X_{\max}\le\theta\). The right inequality says \(\theta\ge X_{\max}\); dividing the left one by \(a>0\) says \(\theta\le X_{\max}/a\). Hence
\[ \P_\theta\Bigl(X_{\max}\ \le\ \theta\ \le\ X_{\max}\,\alpha^{-1/n}\Bigr)=1-\alpha\quad\text{for every }\theta>0 , \]an exact \(100(1-\alpha)\,\%\) ci in the sense of Definition 3.54 — no clt needed.
Numbers: \(n=8\), \(\alpha=0.05\): \(\alpha^{1/8}=0.05^{0.125}=0.6877\), so \(\alpha^{-1/8}=1.4542\). Interval \([12,\ 12\cdot1.4542]=[12,\,17.45]\) minutes. (A simulation with \(10^5\) samples, \(\theta=5\), gave coverage 0.951.)
What to notice: the interval is not symmetric around the estimate; it starts exactly at the mle. That makes sense: \(\theta\) can never be smaller than the largest observation, so values below 12 are impossible, not just implausible. The recipe (pivot → quantiles → solve) is the same as in Example 3.56; only the pivot's distribution changed.
Sheet 11, Exercise 2 extended — a ci from one exponential observation Sheet 11 · Ex 2 my extension
Setting from the sheet. One observation \(X\sim\mathrm{Exp}(\lambda)\), cdf \(\P_\lambda(X\le x)=1-e^{-\lambda x}\) for \(x\ge0\). The sheet builds the Neyman–Pearson test of \(\lambda_0\) against \(\lambda_1>\lambda_0\), which rejects when \(x<-\frac{\ln(1-\alpha)}{\lambda_0}\) (solved on §3.3).
Solution
Pivot. \(Q:=\lambda X\). For \(u\ge0\): \(\P_\lambda(\lambda X\le u)=\P_\lambda(X\le u/\lambda)=1-e^{-\lambda\cdot u/\lambda}=1-e^{-u}\): an \(\mathrm{Exp}(1)\) distribution, the same for every \(\lambda\).
Two-sided interval. Cut \(\frac\alpha2\) off each tail: \(a=-\ln(1-\frac\alpha2)\) (so that \(1-e^{-a}=\frac\alpha2\)) and \(b=-\ln\frac\alpha2\) (so that \(1-e^{-b}=1-\frac\alpha2\)). Then \(\P(a\le\lambda X\le b)=(1-\frac\alpha2)-\frac\alpha2=1-\alpha\). Divide by \(X>0\) (keeps directions): \(\bigl[\frac aX,\ \frac bX\bigr]\) is an exact \(100(1-\alpha)\,\%\) ci for \(\lambda\). For \(\alpha=0.05\): \(a=0.0253\), \(b=3.689\); with the observation \(x=2\) the interval is \([0.0127,\,1.844]\) — very wide, as it must be with a single data point.
Duality with the sheet's one-sided test. \(\P_\lambda\bigl(\lambda X\ge-\ln(1-\alpha)\bigr)=e^{\ln(1-\alpha)}=1-\alpha\), so \(\bigl[-\frac{\ln(1-\alpha)}X,\ \infty\bigr)\) is a \(100(1-\alpha)\,\%\) lower confidence bound for \(\lambda\). The sheet's test rejects \(\lambda_0\) when \(x<-\frac{\ln(1-\alpha)}{\lambda_0}\), i.e. (multiply by \(\lambda_0/x>0\)) when \(\lambda_0<-\frac{\ln(1-\alpha)}x\): exactly when \(\lambda_0\) lies below the lower bound — the one-sided duality of the box above.
"Confidence level" in Sheet 5 Ex 1 is not a confidence interval Sheet 5 · Ex 1 my note
Sheet 5 Ex 1 (solved on §1.3) defines the "Value at Risk at confidence level \(\alpha\)" as the loss \(L\) with \(\P(R\le-L)=\alpha\) — a quantile of a fully known return distribution. Nothing is estimated and nothing is random about \(L\). In the sense of Definition 3.54, a confidence level belongs to a random interval built from data to catch an unknown parameter. Same words, different concept.
Old-exam tasks
I read all three exams in full (every true/false and definitions item included). Only one part asks for a confidence interval: WiSe25 P5d. One true/false item, SoSe25 P1c, tests exactly the misreading that Remark 3.55 warns about (there for a test instead of an interval). Three further problems — WiSe25 P4, SoSe25 P4, SoSe26 P5 — build an estimator and its clt approximation, which are the ingredients of a confidence interval; the exams did not ask for one, so the intervals below are my practice extensions. Past exams do not predict the next one.
WiSe 25/26, Problem 5d — an approximate ci for a cdf value WiSe25 · P5d · 2 credits
Context (parts a–c are solved on §2.1). \(X_1,\dots,X_n\) are iid real random variables with cdf \(F_{X_1}\). Fix \(t\in\R\). The empirical cdf [empirische Verteilungsfunktion] is \(\hat F_n(t):=\frac1n\sum_{i=1}^n\chi_{(-\infty,t]}(X_i)\) — the fraction of data points \(\le t\). Parts (a)–(c) showed: \(n\hat F_n(t)\sim\Bin(n,F_{X_1}(t))\); \(\hat F_n(t)\) is unbiased; \(\operatorname{mse}[\hat F_n(t)]=\frac{F_{X_1}(t)(1-F_{X_1}(t))}n\). Here \(\operatorname{mse}\) is the mean squared error [mittlerer quadratischer Fehler] of an estimator \(\hat\theta\), \(\operatorname{mse}[\hat\theta]=\E[(\hat\theta-\theta)^2]=\Var[\hat\theta]+(\operatorname{bias}[\hat\theta])^2\) (Definition 3.20(iv), §3.2): the average squared distance between the estimate and the truth. For an unbiased estimator, which \(\hat F_n(t)\) is by part (b), the bias is 0 and the mse is just the variance.
Task. Give an approximate \(100(1-\alpha)\,\%\) confidence interval for \(F_{X_1}(t)\), for \(\alpha\in(0,1)\).
Solution.
- Recognise a proportion. Put \(Y_i:=\chi_{(-\infty,t]}(X_i)\). Each \(Y_i\) is 1 if \(X_i\le t\) and 0 otherwise, so \(Y_i\sim\Ber(p)\) with \(p:=\P(X_i\le t)=F_{X_1}(t)\) (definition of the cdf). The \(Y_i\) are iid, because they are the same function applied to iid \(X_i\). And \(\hat F_n(t)=\bar Y_n=:\hat p\). So we are exactly in Example 3.58 with the unknown proportion \(p=F_{X_1}(t)\).
- Pivot via the clt. Assume \(0<p<1\), so that \(\Var[Y_i]=p(1-p)>0\). The clt gives \(\dfrac{\hat F_n(t)-F_{X_1}(t)}{\sqrt{F_{X_1}(t)(1-F_{X_1}(t))/n}}\approx\mathcal N(0,1)\) for large \(n\). (The denominator is the square root of the mse from part (c) — the standard error.)
- Plug in and solve (Example 3.58, steps 3–4). Replace \(F_{X_1}(t)\) in the standard error by \(\hat F_n(t)\) and solve for \(F_{X_1}(t)\):
where \(z_{\alpha/2}\) is the \((1-\frac\alpha2)\)-quantile of \(\mathcal N(0,1)\), i.e. \(\Phi(z_{\alpha/2})=1-\frac\alpha2\). Its coverage \(\P\bigl(F_{X_1}(t)\in\text{interval}\bigr)\) tends to \(1-\alpha\) as \(n\to\infty\).
Numbers (mine): \(n=100\), 30 data points \(\le t\), \(\alpha=0.05\): \(\hat F_{100}(t)=0.3\), standard error \(\sqrt{0.3\cdot0.7/100}=0.0458\), half-width \(1.96\cdot0.0458=0.090\), interval \([0.210,\,0.390]\).
Checking the official solution: it gives exactly this Wald interval, with the same reduction to \(Y_i\sim\Ber(p)\). Correct. Two small points: the task writes "100(1 − α) confidence interval" without "%", and the official answer does not say what \(z_{\alpha/2}\) is — in an exam, define it (one line) and say "approximate, by the clt", to be safe.
Two alternatives worth knowing (not asked). (1) Without plugging in: since \(p(1-p)\le\frac14\), the interval \(\hat F_n(t)\pm\frac{z_{\alpha/2}}{2\sqrt n}\) is also approximately valid and never too narrow; for the numbers above it is \(0.3\pm0.098\). (2) A guaranteed (non-approximate) interval via Chebyshev (§2.2): by part (c), \(\Var[\hat F_n(t)]\le\frac1{4n}\), so \(\P(|\hat F_n(t)-F_{X_1}(t)|\ge\varepsilon)\le\frac1{4n\varepsilon^2}\). Setting this equal to \(\alpha\) gives \(\varepsilon=\frac1{2\sqrt{n\alpha}}\), and \(\hat F_n(t)\pm\frac1{2\sqrt{n\alpha}}\) is a true \(100(1-\alpha)\,\%\) ci in the sense of Definition 3.54, for every \(n\). Price: for \(n=100\), \(\alpha=0.05\) the half-width is \(0.224\) instead of \(0.090\). This is the "guaranteed but loose versus sharp but approximate" trade-off of WiSe25 P4d (§2.4).
In words: the empirical cdf at \(t\) is just the proportion of data below \(t\), so its confidence interval is the proportion interval of Example 3.58.
SoSe 2025, Problem 1c — "at most 5 % probability that the batch conforms"? SoSe25 · P1c · 3 credits
Statement. From a large batch of switches you test a random subsample at level \(\alpha=0.05\): \(H_0\): "the defect proportion is at most what the manufacturer claimed" against \(H_1\): "it is larger". The test rejects. Claim: "the probability that the entire batch conforms to the claimed proportion is at most 5 %". True or false? (Full test-side discussion on §3.3.)
Answer: false.
- What \(\alpha\) really says. The level is \(\P_\theta(\text{reject})\le0.05\) for every \(\theta\) in \(H_0\): a probability about the procedure, computed assuming \(H_0\) is true (Definition 3.34, §3.3).
- What the claim says. "\(\P(H_0\text{ is true})\le0.05\)" — a probability about the fixed, unknown defect proportion of this batch. In the frequentist model the parameter is not random, so this is either 0 or 1 and the test does not tell us which. This is the same mistake as reading "95 % probability that \(\mu\) lies in [1201, 1299]" into a confidence interval (Remark 3.55).
- Even with a probability for \(H_0\), 5 % is wrong (my illustration). Suppose 90 % of batches conform, the test has level 0.05 and power 0.8 against bad batches. Then by Bayes' rule \(\P(H_0\text{ true}\mid\text{reject})=\frac{0.9\cdot0.05}{0.9\cdot0.05+0.1\cdot0.8}=\frac{0.045}{0.125}=0.36\) — far above 5 %. Such a statement needs a prior, i.e. the Bayesian view of §3.5.
Checking the official solution: "False. The significance level makes claims about the procedure, not probabilities of the true parameter." Correct, but short for 3 credits; in an exam add point 1 (what \(\alpha\) is) explicitly.
Practice: exam estimators turned into confidence intervals my extensions
The next three problems were asked as estimation and testing problems. None of them asked for a confidence interval; I add one to each because every ingredient is already there (an estimator, its variance, a clt approximation). Parts asked in the exams are solved on §3.2, §3.3 and §2.4.
WiSe 25/26, Problem 4 (rainfall) as a confidence interval WiSe25 · P4 my extension
What the exam gives. iid \(X_i\) with density \(p_\theta(x)=\frac1{\theta^2}xe^{-x/\theta}\) (\(x\ge0\)), \(\theta>0\); mle \(\hat\theta=\frac1{2n}\sum_{i=1}^nX_i\) (P4a); \(\E[\hat\theta]=\theta\), \(\Var[\hat\theta]=\frac{\theta^2}{2n}\); Chebyshev \(\P_\theta(|\hat\theta-\theta|\ge\varepsilon)\le\frac{\theta^2}{2n\varepsilon^2}\) (P4b); clt: \(\frac{\hat\theta-\theta}{\theta/\sqrt{2n}}\approx\mathcal N(0,1)\) (P4c).
(i) Approximate ci from the clt. Put \(c:=\frac{z_{\alpha/2}}{\sqrt{2n}}\). Then \(\P_\theta\bigl(|\hat\theta-\theta|\le c\,\theta\bigr)\approx1-\alpha\). Here the standard error \(\theta/\sqrt{2n}\) contains the unknown \(\theta\), but the inequality can still be solved exactly, because \(\theta>0\):
- \(|\hat\theta-\theta|\le c\theta\iff-c\theta\le\hat\theta-\theta\le c\theta\) (definition of the absolute value);
- add \(\theta\) to all three parts: \(\theta(1-c)\le\hat\theta\le\theta(1+c)\);
- right part: divide by \(1+c>0\): \(\theta\ge\frac{\hat\theta}{1+c}\). Left part: if \(c<1\), divide by \(1-c>0\): \(\theta\le\frac{\hat\theta}{1-c}\).
So \(\Bigl[\frac{\hat\theta}{1+c},\ \frac{\hat\theta}{1-c}\Bigr]\) is an approximate \(100(1-\alpha)\,\%\) ci (valid once \(2n>z_{\alpha/2}^2\)). The plug-in (Wald-type) alternative replaces \(\theta\) by \(\hat\theta\) in the standard error: \(\hat\theta\bigl(1\pm c\bigr)\).
Numbers: \(n=50\), observed \(\hat\theta=3\), \(\alpha=0.05\): \(c=\frac{1.96}{10}=0.196\). Solved interval \(\bigl[\frac3{1.196},\frac3{0.804}\bigr]=[2.508,\,3.731]\); plug-in \([2.412,\,3.588]\). (Simulated coverage of the solved interval at \(n=50\): 0.950.)
(ii) Guaranteed ci from Chebyshev. In P4b take \(\varepsilon=k\theta\): the bound becomes \(\frac{\theta^2}{2nk^2\theta^2}=\frac1{2nk^2}\). Setting it equal to \(\alpha\) gives \(k=\frac1{\sqrt{2n\alpha}}\). Then \(\P_\theta(|\hat\theta-\theta|<k\theta)\ge1-\alpha\) for every \(\theta\) and every \(n\), and the same algebra as in (i) gives the guaranteed-level (conservative) ci \(\bigl(\frac{\hat\theta}{1+k},\frac{\hat\theta}{1-k}\bigr)\), provided \(k<1\), i.e. \(n>\frac1{2\alpha}\). "Guaranteed-level" means what Definition 3.54 asks for, coverage \(\ge1-\alpha\), with no clt approximation anywhere — not coverage equal to \(1-\alpha\). Chebyshev's bound is usually far from tight, so the real coverage here is close to 1 (a simulation at \(n=50\), \(\theta=3\) gave 1.000 out of \(2\cdot10^5\) samples), which is exactly why the interval is so wide. Numbers: \(k=\frac1{\sqrt5}=0.447\), interval \((2.073,\,5.427)\) — much wider.
Link to P4d: that part asked for the difference between b) and c): "Chebyshev is a guarantee that may be loose, clt is approximate but typically much sharper". The two intervals show it in one picture: \((2.07,5.43)\) guaranteed versus \([2.51,3.73]\) approximate.
SoSe 2025, Problem 4 (Poisson defects) as a confidence interval SoSe25 · P4 my extension
What the exam gives. iid \(X_i\sim\mathrm{Poi}(\lambda)\) (mean and variance \(\lambda\)); mle \(\hat\lambda=\bar X_n\) (P4a), unbiased (P4b), and \(\bar X_n\approx\mathcal N(\lambda,\lambda/n)\) by the clt (P4c). P4d: \(n=100\), \(\bar x_{100}=5\), one-sided test of \(H_0:\lambda=4\) against \(H_1:\lambda>4\) at 5 %, \(z_{\text{obs}}=\frac{5-4}{\sqrt{4/100}}=5>1.64\): reject.
Two-sided Wald interval (Example 3.58's idea: plug \(\hat\lambda\) into the standard error \(\sqrt{\lambda/n}\)): \(\bar x\pm z_{\alpha/2}\sqrt{\bar x/n}=5\pm1.96\cdot\sqrt{0.05}=5\pm1.96\cdot0.2236=[4.562,\,5.438]\).
One-sided bound, the partner of P4d's test (box one-sided bounds): \(5-z_{0.05}\cdot0.2236=5-1.645\cdot0.2236=4.632\). The null value 4 lies below it, matching the rejection. (The exam's hint rounds \(z_{0.05}\) to 1.64, which gives 4.633 — the same conclusion. I use the four-digit value 1.645 here and below so that the two computations in this box match.)
A subtlety. The exam's test divides by the standard error under \(H_0\), \(\sqrt{4/100}=0.2\); the Wald bound divides by the estimated one, \(\sqrt{5/100}=0.2236\). So the Wald bound is not exactly the set of values the exam's test accepts. Inverting the exam's test exactly means collecting all \(\lambda_0\) with \(\frac{5-\lambda_0}{\sqrt{\lambda_0/100}}\le1.645\); solving numerically gives \(\lambda_0\ge4.645\). Both versions lead to the same decision here.
Trap — do not put the null standard error into a confidence bound. A tempting but wrong answer here is \(5-1.645\cdot0.2=4.671\), taking the \(0.2\) from the exam's test statistic. It is wrong because \(0.2=\sqrt{4/100}\) is the standard error computed at the particular null value \(\lambda_0=4\). Definition 3.54 requires the endpoint \(L(X)\) to be a statistic — a formula in the data alone — and a formula that still contains \(\lambda_0\) is not one; it would give a different "interval" for every value you happened to test. The two honest repairs are the ones above: estimate the standard error from the data (\(\sqrt{5/100}=0.2236\), giving 4.632), or invert the test exactly and let \(\lambda_0\) appear on both sides (giving 4.645).
SoSe 2026, Problem 5 (randomized response) as a confidence interval SoSe26 · P5 my extension
What the exam gives. Answers \(Y_i\) iid \(\Ber(q)\) with \(q=q(p)=rp+\frac{1-r}2\) (P5a); \(\hat p=\frac{\bar Y_n-\frac{1-r}2}r\), unbiased, \(\Var[\hat p]=\frac{q(1-q)}{r^2n}\) (P5c). P5d: \(r=\frac12\), \(n=100\), 64 answers are 1, test of \(H_0:p\le0.6\) against \(H_1:p>0.6\): \(z_{\text{obs}}=\frac{0.64-0.55}{\sqrt{0.55\cdot0.45/100}}\approx1.81>1.64\), reject.
Wald-type interval. By the clt, \(\hat p\) is approximately normal with standard error \(\frac1r\sqrt{q(1-q)/n}\); plug in \(\hat q=\bar y_n\): \(\widehat{\mathrm{se}}=\frac{\sqrt{0.64\cdot0.36/100}}{0.5}=\frac{0.048}{0.5}=0.096\). Estimate \(\hat p=\frac{0.64-0.25}{0.5}=0.78\).
- Two-sided 95 %: \(0.78\pm1.96\cdot0.096=[0.592,\,0.968]\). It contains 0.6.
- One-sided 95 % lower bound: \(0.78-1.645\cdot0.096=0.622\). It lies above 0.6.
Is that a contradiction with the rejection? No. The exam's test is one-sided at 5 %; its partner is the one-sided 95 % bound (0.622 > 0.6: reject — agrees). The two-sided 95 % interval is the partner of the two-sided test at 5 %, which would not reject. The randomization costs precision, for two reasons at once. First, dividing by \(r=\frac12\) multiplies the standard error by \(\frac1r=2\). Second, the coin flip pulls \(q=rp+\frac{1-r}2\) towards \(\frac12\), where \(q(1-q)\) is largest, so the thing being multiplied is bigger too. Together: here \(\widehat{\mathrm{se}}=0.096\), while asking the question directly would give \(\sqrt{0.78\cdot0.22/100}=0.0414\) — a factor \(2.3\), not just 2. (Inverting the exam's own test statistic exactly gives the bound 0.617 instead of 0.622 — the same small null-versus-estimated standard error difference as in SoSe25 P4.)
Summary sheet
Definition
- ci (Def 3.54)
- random \(L(X),U(X)\) with \(\P_\theta(L(X)\le\gamma(\theta)\le U(X))\ge1-\alpha\) for all \(\theta\in\Theta\); \(1-\alpha\) = confidence level
- meaning (Rem 3.55)
- in repeated sampling, about \(100(1-\alpha)\,\%\) of the intervals contain the fixed parameter; a computed interval contains it or not — no 95 % "for this interval"
- pivot
- formula in data and parameter with a known distribution free of unknowns
- \(z_{a}\), \(t_{\nu,a}\)
- upper-\(a\) points: \(\P(Z>z_a)=a\); \(z_{0.05}=1.645\), \(z_{0.025}=1.96\), \(z_{0.005}=2.576\); \(t_{9,0.025}=2.262\)
Standard intervals
- normal, σ known (3.56)
- \(\bar X_n\pm z_{\alpha/2}\frac\sigma{\sqrt n}\) — exact
- normal, σ unknown (3.57)
- \(\bar X_n\pm t_{n-1,\alpha/2}\frac{S_n}{\sqrt n}\) — exact; \(T\sim t_{n-1}\), heavier tails
- proportion (3.58)
- Wald: \(\hat p\pm z_{\alpha/2}\sqrt{\hat p(1-\hat p)/n}\) — approximate (clt); bad for small \(n\) or \(p\) near 0, 1
- cdf value (WiSe25 P5d)
- \(\hat F_n(t)\pm z_{\alpha/2}\sqrt{\hat F_n(t)(1-\hat F_n(t))/n}\)
- sample size
- \(n\ge(z_{\alpha/2}\sigma/E)^2\); width \(\propto1/\sqrt n\) ("\(\propto\)" = "is proportional to": the width is a fixed multiple of \(1/\sqrt n\), so quadrupling \(n\) halves it)
- one-sided bound
- \([\bar X_n-z_\alpha\sigma/\sqrt n,\infty)\) — uses \(z_\alpha\), partner of the one-sided test
- non-normal pivots
- uniform: \(X_{\max}/\theta\) gives \([X_{\max},X_{\max}\alpha^{-1/n}]\); exponential: \(\lambda X\sim\mathrm{Exp}(1)\) gives \([-\ln(1-\frac\alpha2)/X,\,-\ln\frac\alpha2/X]\)
- Chebyshev ci
- guaranteed level for every \(n\), but much wider than the clt interval (WiSe25 P4, P5d)
Duality (Rem 3.59)
ci = all \(\theta_0\) not rejected by the two-sided level-\(\alpha\) test; test rejects \(H_0:\theta=\theta_0\) ⟺ \(\theta_0\notin\) ci. Proof: \(\{\theta\in C(X)\}=\{X\in A(\theta)\}\).
Method
Pivot → \(\P(-c\le Q\le c)=1-\alpha\) → solve for the parameter (multiply by positive, add, multiply by \(-1\) flips) → plug in data.
Traps
- "95 % probability that μ is in [1201, 1299]" — wrong (Remark 3.55).
- Using \(z\) instead of \(t\) when \(\sigma\) is estimated from a small sample: too narrow (coverage 0.88 at \(n=5\)).
- Forgetting "approximate" for clt-based intervals; forgetting to define \(z_{\alpha/2}\).
- A 95 % ci matches a two-sided test at \(\alpha=0.05\), not a one-sided one (SoSe26 P5 extension).
- "Rejected at 5 %, so \(H_0\) has probability at most 5 %" — wrong for the same reason as Remark 3.55 (SoSe25 P1c).
- A confidence bound uses the estimated standard error, a test may use the one under \(H_0\) (SoSe25 P4).
Exam focus
WiSe25 P5d (2 credits): a Wald interval for a probability, at the end of an estimator problem. SoSe25 P1c: the interpretation of a level, same logic as Remark 3.55. Sheet 11 shows the tests whose duals are the z and t intervals and the one-sided bound. Past exams are not a prediction.
Self-test
Section 3.5 · The last section of the script, marked there as a "philosophical interlude" (the script marks no lecture numbers after Lecture 9)
Bayesian vs. frequentist inference
Bayes'sche vs. frequentistische Inferenz
What this page covers Script §3.5, pp. 111–113
This page covers everything from Overview 3.60 to Viewpoint 3.66: the two schools of statistics (3.60), the Bayesian statistical model with its prior (3.61), the posterior obtained with Bayes' rule (3.62), Bayesian point estimators — posterior mean, posterior median and map estimate (3.63), the credible interval (3.64), how it differs from a confidence interval (3.65), and the philosophical divide together with the practical agreement of both schools for large samples (3.66).
The script frames the whole section as a "philosophical interlude" and gives no worked example. No exercise sheet and none of the three old exams asks about this section. (One exam task, WiSe25 P6b, is a discrete Bayes' rule computation; it is solved on §1.4 and read in prior/posterior language below.) So the worked examples on this page are all mine: the Beta–Bernoulli model from start to finish, the Normal–Normal model, what happens for large samples, and a table of "which interval means what".
The big picture
You find a strange coin. Is it fair? You toss it 10 times and see 7 heads. What can you say about its probability \(\theta\) (theta) of heads?
- The frequentist answer (everything in §3.1–§3.4). \(\theta\) is a fixed number that we do not know. It is not random, so we never write "the probability that \(\theta>0.5\)". What is random is the data. We judge methods by how they behave over many imagined repetitions of the experiment: the estimate \(\hat\theta=\frac7{10}\) (the maximum likelihood estimator, §3.2), a test (§3.3), a 95 % confidence interval (§3.4) that "catches the true \(\theta\) in 95 % of repetitions".
- The Bayesian answer (this page). Our knowledge about \(\theta\) is uncertain, and uncertainty is described by a probability distribution. Before the data we write down a prior distribution for \(\theta\) (our belief). After the data we update it with Bayes' rule to a posterior distribution. From the posterior we can read off statements like "given the data, \(\theta\) lies between 0.39 and 0.86 with probability 95 %" or "\(\P(\theta>0.5\mid\text{data})=0.87\)" (both statements use the prior \(\mathrm{Beta}(2,2)\) of the worked example below).
A tiny example with real numbers (my example). Suppose the coin can only be of two kinds: fair (\(\theta=0.5\)) or bent (\(\theta=0.8\)). Before tossing, you think both are equally likely: prior \(\pi(0.5)=\pi(0.8)=\frac12\). (The letter \(\pi\) is used here and throughout this page as the name of the prior function, never as the number 3.14….) You toss 10 times and see a particular sequence with 7 heads and 3 tails. The tosses are independent, so the probability of that exact sequence is a product of 7 factors \(\theta\) and 3 factors \(1-\theta\):
- if fair: \(0.5^{7}\cdot0.5^{3}=0.5^{10}\approx0.000977\);
- if bent: \(0.8^{7}\cdot0.2^{3}\approx0.2097\cdot0.008\approx0.001678\).
Bayes' rule (Theorem 1.70(iii), §1.4) with the two cases "fair" and "bent" as the partition gives
\[ \P(\text{bent}\mid\text{data})=\frac{0.001678\cdot\frac12}{0.000977\cdot\frac12+0.001678\cdot\frac12}=\frac{0.001678}{0.002655}\approx0.632 . \]So the data moved your belief in "bent" from 50 % to 63 %. That is all Bayesian inference is: Bayes' rule applied to the unknown parameter. The only new difficulty on this page is that \(\theta\) usually can be any number in \([0,1]\), not just one of two values, so sums become integrals and probabilities become densities.
In words: frequentists put probability on the data and keep the parameter fixed; Bayesians put probability on the parameter too and update it with the data. With lots of data both usually end up with similar numbers, but the sentences that describe those numbers mean different things.
Primer My addition
Cross-references
Integrals: Analysis 8.1; improper integrals: Analysis 9.1; finding a maximum by setting the derivative to 0: Analysis 7.1; logarithm rules: Analysis 5.2. Densities: §1.3. Gamma and Beta functions: §1.3. Bayes' rule: §1.4. Quantiles and "mean minimises squared error, median minimises absolute error": §2.1. Mean and variance of the Beta distribution: §2.1. Likelihood: §3.1; mle: §3.2; confidence intervals: §3.4.
0. Words and symbols used on this page
- Parameter \(\theta\) and parameter space \(\Theta\) (capital theta): the unknown number (or vector) that picks one distribution out of a family, and the set of all allowed values. Coin: \(\Theta=[0,1]\). (Definition 3.4, §3.1.)
- Data \(x=(x_1,\dots,x_n)\): the observed values of the random sample \(X=(X_1,\dots,X_n)\). Capital \(X\) is random, small \(x\) is the fixed observed outcome.
- pmf, pdf, cdf. A pmf (probability mass function) [Zähldichte] lists \(\P(X=v)\) for each possible value \(v\) of a random variable that takes only separate values — a coin, a count. A pdf (probability density function, "density", see the bullet further down) does the same job for a random variable that can take any value in an interval. A cdf (cumulative distribution function) [Verteilungsfunktion] is \(F(c)=\P(X\le c)\), "how much probability sits at or below \(c\)".
- iid: independent and identically distributed — the \(X_i\) do not influence each other and all follow the same distribution (Definition 1.79, §1.4).
- Likelihood [Likelihood-Funktion] \(p(x\mid\theta)=L(\theta\mid x)\): the pmf or density of the data when the parameter is \(\theta\) (Definition 3.13, §3.1). For iid data it is the product \(\prod_{i=1}^np(x_i\mid\theta)\). Read as a function of \(\theta\) with \(x\) held fixed.
- mle \(\hat\theta_{\text{mle}}\): the \(\theta\) that makes \(L(\theta\mid x)\) largest (Definition 3.27, §3.2). For coin tosses with \(k\) heads in \(n\) tosses, \(\hat\theta_{\text{mle}}=\frac kn\).
- Confidence interval (ci) [Konfidenzintervall]: an interval \((L(X),U(X))\) computed from the random sample such that \(\P_\theta(L(X)\le\theta\le U(X))\ge1-\alpha\) for every \(\theta\) (Definition 3.54, §3.4; the script states it for a general parameter of interest \(\gamma(\theta)\), and this page only ever needs the case \(\gamma(\theta)=\theta\)). \(\alpha\) is a small number such as 0.05, and \(1-\alpha\) the confidence level.
- \(z_{\alpha/2}\): the number with \(\P(-z_{\alpha/2}\le Z\le z_{\alpha/2})=1-\alpha\) for a standard normal \(Z\). For \(\alpha=0.05\): \(z_{0.025}\approx1.96\).
- \(\arg\max_\theta f(\theta)\): the place \(\theta\) where \(f\) is largest (not the largest value itself).
- Density (pdf): a function \(p\ge0\) with \(\int p=1\); probabilities are areas under it: \(\P(a\le Y\le b)=\int_a^bp(y)\,\mathrm dy\) (§1.3).
- Mode: the place where a density (or pmf) is highest.
- \(q\)-quantile: a point \(x_q\) with probability \(q\) at or to its left (Definition 2.20, §2.1). For the continuous distributions on this page (Beta, normal) the cdf is continuous and strictly increasing, so \(x_q\) is the unique solution of \(F(x_q)=q\). The median is the 0.5-quantile.
1. Bayes' rule, from events to densities
Discrete version (Theorem 1.70(iii), §1.4). If the cases \(B_1,B_2,\dots\) split up the whole sample space, then
\[ \P(B_i\mid A)=\frac{\P(A\mid B_i)\,\P(B_i)}{\sum_j\P(A\mid B_j)\,\P(B_j)} . \]Read \(B_i\) as "the parameter has value \(\theta_i\)" and \(A\) as "we observed the data \(x\)". Then \(\P(B_i)\) is the prior, \(\P(A\mid B_i)\) the likelihood, and \(\P(B_i\mid A)\) the posterior.
Density version (my derivation). When \(\theta\) can be any number in an interval, we describe our belief by a density \(\pi(\theta)\). Treat the pair (parameter, data) as a random vector with joint density "prior times likelihood": \(p(x,\theta)=p(x\mid\theta)\,\pi(\theta)\). This is the continuous analogue of \(\P(A\cap B_i)=\P(A\mid B_i)\P(B_i)\) (Definition 1.69). The conditional density of \(\theta\) given the data is the joint density divided by the marginal density of the data (Definition 1.78(ii), §1.4). The marginal density of the data is obtained by integrating the joint density over \(\theta\) (the continuous analogue of the law of total probability):
\[ \pi(\theta\mid x)=\frac{p(x,\theta)}{p(x)}=\frac{p(x\mid\theta)\,\pi(\theta)}{\int_\Theta p(x\mid\vartheta)\,\pi(\vartheta)\,\mathrm d\vartheta}. \](\(\vartheta\) is just another name for the integration variable, so that it is not confused with the \(\theta\) on the left.) Compare the two formulas term by term: sum becomes integral, probabilities become densities. Nothing else changes.
A mixed case, and why it is still fine. In the coin example below the parameter \(\theta\) is continuous but the data \(x\) are discrete, so \(p(x\mid\theta)\) is a pmf in \(x\) and \(\pi(\theta)\) is a density in \(\theta\) — strictly speaking Definition 1.78(ii), which assumes both variables continuous, does not apply word for word. The formula above is still correct, and it is the one the script writes in Definition 3.62: for each fixed \(x\) the function \(\theta\mapsto p(x\mid\theta)\pi(\theta)\) is non-negative and, divided by its own integral \(p(x)\), integrates to 1, so it is a density in \(\theta\). Checking that this density really is "the conditional distribution of \(\theta\) given \(X=x\)" needs measure theory that this course does not develop; the script does not do it either.
2. "Proportional to", the symbol \(\propto\)
\(f(\theta)\propto g(\theta)\) means: there is a number \(c>0\) that does not depend on \(\theta\) with \(f(\theta)=c\cdot g(\theta)\) for all \(\theta\). Example: \(6\theta^2\propto\theta^2\) (here \(c=6\)).
Why this is useful. If \(f\) is a density and \(f\propto g\), then \(c\) is determined by the requirement that \(f\) integrates to 1: \(1=\int f=c\int g\), so \(c=1/\int g\). So you may throw away every factor that does not contain \(\theta\), work with the simpler \(g\) (the kernel [Kern]), and put the constant back at the end. Very often you do not even need to compute \(\int g\): if \(g\) is the kernel of a named density, the constant is that density's constant. Example: if \(f(\theta)\propto\theta^8(1-\theta)^4\) on \([0,1]\), then \(f\) must be the \(\mathrm{Beta}(9,5)\) density (box 3), because that is the only density on \([0,1]\) with this kernel.
Caution. "Does not depend on \(\theta\)" is the only condition. The factor may depend on the data \(x\) — for the posterior it always does.
3. The Beta distribution from scratch
Picture. The Beta distribution is a flexible family of densities on the interval \([0,1]\). It is the natural way to describe uncertainty about an unknown probability or proportion, because its values always lie between 0 and 1.
Definition (the script gives it as Example 1.61(vii), §1.3). For \(\alpha,\beta>0\), the \(\mathrm{Beta}(\alpha,\beta)\) density is
\[ p(\theta)=\frac{\theta^{\alpha-1}(1-\theta)^{\beta-1}}{B(\alpha,\beta)}\quad\text{for }\theta\in[0,1],\qquad p(\theta)=0\text{ otherwise}. \]The Beta function \(B(\alpha,\beta)=\int_0^1t^{\alpha-1}(1-t)^{\beta-1}\,\mathrm dt=\frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}\) (Definition 1.60, §1.3) is exactly the area under the numerator, so dividing by it makes the total area 1. \(\Gamma\) is the Gamma function, with \(\Gamma(n)=(n-1)!\) for whole numbers \(n\ge1\) and \(\Gamma(s+1)=s\,\Gamma(s)\).
Shapes. \(\mathrm{Beta}(1,1)\): \(p(\theta)=1\), the uniform distribution ("every \(\theta\) equally plausible"). \(\mathrm{Beta}(2,2)=6\theta(1-\theta)\): a hump centred at \(\frac12\), zero at the ends. Larger \(\alpha\) pushes mass towards 1, larger \(\beta\) towards 0; larger \(\alpha+\beta\) makes the hump narrower.
Numbers (mine; the mean and variance are also on §2.1). For \(Y\sim\mathrm{Beta}(\alpha,\beta)\):
- Mean \(\E[Y]=\frac{\alpha}{\alpha+\beta}\). Proof: \(\E[Y]=\int_0^1\theta\frac{\theta^{\alpha-1}(1-\theta)^{\beta-1}}{B(\alpha,\beta)}\,\mathrm d\theta=\frac{B(\alpha+1,\beta)}{B(\alpha,\beta)}\), since the integral is the Beta function with \(\alpha+1\) in place of \(\alpha\). Write both with Gamma functions: \(\frac{\Gamma(\alpha+1)\Gamma(\beta)}{\Gamma(\alpha+\beta+1)}\cdot\frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}\). Use \(\Gamma(\alpha+1)=\alpha\Gamma(\alpha)\) and \(\Gamma(\alpha+\beta+1)=(\alpha+\beta)\Gamma(\alpha+\beta)\) and cancel: \(\frac{\alpha}{\alpha+\beta}\).
- Variance \(\Var[Y]=\frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}\) (same trick with \(B(\alpha+2,\beta)\)).
- Mode (for \(\alpha,\beta>1\)) \(\frac{\alpha-1}{\alpha+\beta-2}\). Proof: maximise the logarithm of the density, \((\alpha-1)\ln\theta+(\beta-1)\ln(1-\theta)-\ln B(\alpha,\beta)\) (the logarithm is increasing, so it has its maximum at the same place, Analysis 5.2). Derivative: \(\frac{\alpha-1}\theta-\frac{\beta-1}{1-\theta}=0\). Multiply by \(\theta(1-\theta)\): \((\alpha-1)(1-\theta)=(\beta-1)\theta\), so \(\alpha-1=\theta(\alpha+\beta-2)\). If \(\alpha\le1\) or \(\beta\le1\), this interior formula does not apply and the density is highest at an end point instead: at \(\theta=0\) when \(\alpha\le1\) and \(\beta\ge1\), at \(\theta=1\) when \(\alpha\ge1\) and \(\beta\le1\), at both ends when \(\alpha<1\) and \(\beta<1\). The single exception is \(\alpha=\beta=1\), where the density is flat and every point is a maximum.
- Quantiles and median: there is no closed formula. One computes them numerically (software, or the widgets below). Exams would have to give them to you.
Two schools of thought
Overview 3.60 two schools of thought Script 3.60
The methods discussed so far — mle, hypothesis testing with confidence levels or p-values, and confidence intervals — belong to the frequentist school of statistics [frequentistische Statistik]. This school treats parameters as fixed, unknown constants and defines probability as the long-run frequency of outcomes in (hypothetical) repeated experiments.
Bayesian inference [Bayes'sche Inferenz] offers an alternative perspective. It treats parameters as random variables about which we can have beliefs that are updated with data.
What "long-run frequency" means, concretely: "the probability of heads is 0.5" means "if you toss this coin again and again, the fraction of heads approaches 0.5" — exactly what the law of large numbers (§2.4) guarantees. On that reading a fixed number like \(\theta\) cannot have a probability: it is not the outcome of a repeatable experiment. The Bayesian reading of probability as "degree of belief" allows it. Both readings obey the same axioms of a probability measure (§1.1), so all the mathematics of Chapters 1–2 applies to both. The script already discussed these interpretations in an earlier philosophical interlude, Remark 1.30 (§1.1).
The Bayesian model: prior and posterior
Definition 3.61 Bayesian statistical model Script 3.61
A (parametric) Bayesian statistical model has two constituents.
- A likelihood \(p(x\mid\theta)\), which is the same as in the frequentist model. It describes the data-generating process for a given parameter \(\theta\).
- A prior distribution [Priori-Verteilung, A-priori-Verteilung] \(\pi(\theta)\), which represents our belief about the parameter \(\theta\) before observing the data. It is a probability distribution over the parameter space \(\Theta\).
Each part explained (mine).
- (i) is nothing new: it is the statistical model of Definition 3.4 (a family of distributions \(\P_\theta\)), written through its pmf or density. The frequentist stops here.
- (ii) is the new ingredient. \(\pi\) is a pmf (if \(\Theta\) is finite or countable) or a density (if \(\Theta\) is an interval). The letter \(\pi\) here is a function name, not the number 3.14….
- Together, (i) and (ii) define one joint distribution of the pair (parameter, data): first draw \(\theta\) from \(\pi\), then draw the data from \(p(\cdot\mid\theta)\). That is why Bayes' rule becomes available.
Example (mine). Coin tosses \(X_1,\dots,X_n\) iid \(\Ber(\theta)\), \(\Theta=[0,1]\). (i) \(p(x\mid\theta)=\prod_{i=1}^n\theta^{x_i}(1-\theta)^{1-x_i}\). (ii) Prior \(\pi=\mathrm{Beta}(2,2)\), i.e. \(\pi(\theta)=6\theta(1-\theta)\): "the coin is probably not extremely biased".
Where does a prior come from? (mine) From earlier studies ("similar coins had \(\theta\) between 0.4 and 0.6"), from expert knowledge, or from a deliberate choice to say as little as possible — a non-informative (flat, vague) prior such as \(\mathrm{Beta}(1,1)\), the uniform density. The choice of prior is the most criticised part of Bayesian statistics: two people with different priors get different posteriors from the same data. The widget "prior washes out" below shows how much that matters.
Definition 3.62 posterior distribution Script 3.62
Using Bayes' rule, the prior belief is updated with the observed data \(x\) to form the posterior distribution [Posteriori-Verteilung, A-posteriori-Verteilung] \(\pi(\theta\mid x)\):
\[ \pi(\theta\mid x)=\frac{p(x\mid\theta)\,\pi(\theta)}{p(x)}=\frac{\text{likelihood}\times\text{prior}}{\text{evidence}} . \]The denominator \(p(x)=\int_\Theta p(x\mid\theta)\,\pi(\theta)\,\mathrm d\theta\) is the marginal likelihood (the evidence) of the data and acts as a normalising constant. The posterior \(\pi(\theta\mid x)\) encapsulates all our knowledge about \(\theta\) after seeing the data. We often work with the unnormalised posterior
\[ \pi(\theta\mid x)\propto p(x\mid\theta)\,\pi(\theta). \]Each part explained (mine).
- The formula is Bayes' rule for densities (primer box 1). If \(\Theta\) is discrete, the integral is a sum.
- Evidence \(p(x)\): "how probable were these data, averaged over all parameter values, weighted by the prior". It is one number (for fixed data) and does not contain \(\theta\).
- \(\propto\) (primer box 2): because \(p(x)\) does not contain \(\theta\), the posterior is "likelihood times prior, rescaled to area 1". In practice you compute the product, drop every factor without \(\theta\), recognise the kernel, and read off the posterior.
- "All our knowledge": in the Bayesian view, every answer — an estimate, an interval, the probability of a hypothesis — is computed from the posterior. Definitions 3.63 and 3.64 are two examples.
Note the change of roles compared to Remark 3.14(iii) (§3.1): there the script stresses that the likelihood \(\theta\mapsto L(\theta\mid x)\) is not a density in \(\theta\). Multiplying it by a prior and normalising turns it into one — the posterior.
Worked example: the Beta–Bernoulli model, step by step My example
Setup. Data \(x=(x_1,\dots,x_n)\in\{0,1\}^n\) from iid \(\Ber(\theta)\) tosses (1 = heads). Let \(k=x_1+\dots+x_n\) be the number of heads. Prior \(\theta\sim\mathrm{Beta}(a,b)\) with numbers \(a,b>0\) you choose.
Step 1 — likelihood. One toss has pmf \(p(x_i\mid\theta)=\theta^{x_i}(1-\theta)^{1-x_i}\) (this is \(\theta\) if \(x_i=1\) and \(1-\theta\) if \(x_i=0\)). Independence lets us multiply (§1.4), and the exponents add up (power rule \(\theta^u\theta^v=\theta^{u+v}\)):
\[ p(x\mid\theta)=\prod_{i=1}^n\theta^{x_i}(1-\theta)^{1-x_i}=\theta^{\sum x_i}(1-\theta)^{\sum(1-x_i)}=\theta^{k}(1-\theta)^{n-k}. \]Step 2 — prior. \(\pi(\theta)=\frac{1}{B(a,b)}\theta^{a-1}(1-\theta)^{b-1}\) on \([0,1]\).
Step 3 — multiply. Again by the power rule,
\[ p(x\mid\theta)\,\pi(\theta)=\frac1{B(a,b)}\,\theta^{a+k-1}(1-\theta)^{b+n-k-1}. \]Step 4 — drop constants. \(\frac1{B(a,b)}\) does not contain \(\theta\), so
\[ \pi(\theta\mid x)\propto\theta^{(a+k)-1}(1-\theta)^{(b+n-k)-1}\qquad(\theta\in[0,1]). \]Step 5 — recognise the kernel. This is the kernel of \(\mathrm{Beta}(a+k,\,b+n-k)\) (primer box 3 with \(\alpha=a+k\), \(\beta=b+n-k\)). By primer box 2 the posterior is that density:
\[ \boxed{\;\theta\mid x\ \sim\ \mathrm{Beta}(a+k,\;b+n-k)\;} \]Step 6 (optional) — the evidence. The integral of the product in step 3 is \(p(x)=\frac{1}{B(a,b)}\int_0^1\theta^{a+k-1}(1-\theta)^{b+n-k-1}\,\mathrm d\theta=\frac{B(a+k,\,b+n-k)}{B(a,b)}\). Dividing the product by it gives exactly the \(\mathrm{Beta}(a+k,b+n-k)\) density, as the shortcut predicted.
Numbers. Prior \(\mathrm{Beta}(2,2)\), data \(k=7\) heads in \(n=10\) tosses. Posterior \(\mathrm{Beta}(2+7,\;2+3)=\mathrm{Beta}(9,5)\). Evidence \(p(x)=B(9,5)/B(2,2)\approx0.000932\). A useful by-product: \(\P(\theta>0.5\mid x)=\int_{0.5}^1\pi(\theta\mid x)\,\mathrm d\theta\approx0.867\) (computed numerically) — a sentence that has no meaning in frequentist statistics.
Reading the result. The prior's \(a\) and \(b\) behave like heads and tails you had "already seen" before the experiment: the update just adds the real heads to \(a\) and the real tails to \(b\). \(a+b\) is the prior sample size — how many tosses the prior belief is worth. A prior whose posterior belongs to the same family as the prior is called conjugate [konjugiert]: the Beta family is conjugate for Bernoulli (and binomial) data.
Two more facts. (1) Beta–Binomial. Often only the count is reported: \(K\sim\Bin(n,\theta)\), the number of heads in \(n\) tosses, with pmf \(\P(K=k\mid\theta)=\binom nk\theta^k(1-\theta)^{n-k}\) (\(\binom nk\) = number of ways to choose which \(k\) of the \(n\) tosses are heads). Using this as the likelihood instead of the probability of the exact sequence gives the same posterior \(\mathrm{Beta}(a+k,b+n-k)\): \(\binom nk\) has no \(\theta\) and is dropped in step 4 like \(\frac1{B(a,b)}\). Only the evidence changes, by the factor \(\binom nk\). (That is also why the orange "likelihood" curve in the widget below is the same for both readings: rescaled to area 1, the two differ by nothing.) (2) Updating toss by toss (each posterior becomes the prior for the next toss) gives the same final posterior as updating once with all the data: each toss just adds 1 to \(a\) or to \(b\) — the + heads and + tails buttons of the widget below do exactly this, and you can watch the posterior agree with the one-shot update.
In words: with a Beta prior and coin-toss data, Bayesian updating is counting: add the heads to \(a\), add the tails to \(b\).
Bayesian point estimators
Idea first. The posterior is a whole distribution. Sometimes you must report one number. Which single number summarises a distribution best depends on how you measure the cost of being wrong — exactly the question of Remark 2.22(v) on §2.1, now applied to the posterior.
Definition 3.63 Bayesian point estimators Script 3.63
Point estimates for \(\theta\) can be derived from the posterior distribution in different ways. Common choices:
- Posterior mean [Posteriori-Erwartungswert] \(\hat\theta_{\text{mean}}=\E[\theta\mid x]=\int\theta\,\pi(\theta\mid x)\,\mathrm d\theta\). It minimises the posterior expected squared error.
- Posterior median \(\hat\theta_{\text{med}}\): the value with \(\P(\theta\le\hat\theta_{\text{med}}\mid x)=0.5\). It minimises the posterior expected absolute error.
- Maximum a posteriori (map) estimate \(\hat\theta_{\text{map}}=\arg\max_\theta\pi(\theta\mid x)=\arg\max_\theta p(x\mid\theta)\,\pi(\theta)\), the mode of the posterior. This is perhaps the most common choice of point estimator derived from Bayesian inference, and it is akin to the mle when no prior is considered.
Each part explained (mine).
- \(\E[\theta\mid x]\) is the ordinary expected value (§2.1) of a random variable whose density is the posterior.
- "Posterior expected squared error" of a guess \(c\) means \(\E[(\theta-c)^2\mid x]=\int(\theta-c)^2\pi(\theta\mid x)\,\mathrm d\theta\): how far off \(c\) is on average, measured by the square and averaged with the posterior as weight. Similarly the absolute error \(\E[|\theta-c|\mid x]\).
- Why the two \(\arg\max\) in the map line agree: \(\pi(\theta\mid x)=p(x\mid\theta)\pi(\theta)/p(x)\), and dividing by the positive constant \(p(x)\) does not move the place of the maximum. So the map never needs the evidence.
Why the mean and the median minimise these errors §3.5 states it without proof; the argument is the script's own from Remark 2.22(v), retold
This is Remark 2.22(v) (§2.1) applied to a random variable \(Y\) that has the posterior as its distribution. For the squared error, expand and use linearity of expectation:
\[ \E[(Y-c)^2]=\E\bigl[\bigl((Y-\E Y)+(\E Y-c)\bigr)^2\bigr]=\Var[Y]+2(\E Y-c)\underbrace{\E[Y-\E Y]}_{=0}+(\E Y-c)^2=\Var[Y]+(\E Y-c)^2 . \]The first term does not depend on \(c\); the second is \(\ge0\) and equals 0 exactly for \(c=\E Y\). So \(c=\E[\theta\mid x]\) is the unique minimiser, and the smallest possible value is the posterior variance.
For the absolute error, with posterior cdf \(F\): \(g(c)=\E|Y-c|=\int_{-\infty}^c(c-t)\pi(t\mid x)\,\mathrm dt+\int_c^\infty(t-c)\pi(t\mid x)\,\mathrm dt\). Differentiate in \(c\) with the Leibniz integral rule (the script uses the same rule in Remark 2.22(v)): the derivative of \(\int_{-\infty}^c h(c,t)\,\mathrm dt\) is "integrand at the upper limit, \(h(c,c)\)" plus "\(\int_{-\infty}^c\frac{\partial h}{\partial c}\,\mathrm dt\)". Here \(h(c,t)=(c-t)\pi(t\mid x)\), so \(h(c,c)=0\) and \(\frac{\partial h}{\partial c}=\pi(t\mid x)\): the first integral has derivative \(\int_{-\infty}^c\pi(t\mid x)\,\mathrm dt=F(c)\). In the same way the second has derivative \(-\int_c^\infty\pi(t\mid x)\,\mathrm dt=-(1-F(c))\). Together \(g'(c)=F(c)-(1-F(c))=2F(c)-1\). This is negative while \(F(c)<\frac12\) and positive once \(F(c)>\frac12\), so \(g\) is smallest where \(F(c)=\frac12\): at the median. ∎
Worked example: the three estimators for the Beta–Bernoulli model My example
Posterior \(\mathrm{Beta}(a+k,\,b+n-k)\). Insert \(\alpha=a+k\), \(\beta=b+n-k\) (so \(\alpha+\beta=a+b+n\)) into primer box 3:
- Posterior mean \(\displaystyle\hat\theta_{\text{mean}}=\frac{a+k}{a+b+n}\).
- map (if \(a+k>1\) and \(b+n-k>1\)) \(\displaystyle\hat\theta_{\text{map}}=\frac{a+k-1}{a+b+n-2}\).
- Posterior median: no closed formula; computed numerically.
The posterior mean is a weighted average. Split the fraction into two parts and multiply and divide each by a suitable number:
\[ \frac{a+k}{a+b+n}=\frac{a}{a+b+n}+\frac{k}{a+b+n}=\underbrace{\frac{a+b}{a+b+n}}_{w_{\text{prior}}}\cdot\underbrace{\frac{a}{a+b}}_{\text{prior mean}}+\underbrace{\frac{n}{a+b+n}}_{w_{\text{data}}}\cdot\underbrace{\frac kn}_{\hat\theta_{\text{mle}}} . \](Check: in the first product \(a+b\) cancels and leaves \(\frac a{a+b+n}\); in the second \(n\) cancels and leaves \(\frac k{a+b+n}\).) The weights are positive and add up to \(\frac{a+b+n}{a+b+n}=1\). So the posterior mean lies between the prior mean and the mle, and the data get the weight \(\frac{n}{a+b+n}\): the more data, the closer to the mle. Bayesian estimates are "shrunk" towards the prior mean.
Numbers (prior \(\mathrm{Beta}(2,2)\), 7 heads in 10, posterior \(\mathrm{Beta}(9,5)\)):
| quantity | formula | value |
|---|---|---|
| prior mean | \(\frac{2}{4}\) | 0.5 |
| mle | \(\frac{7}{10}\) | 0.7 |
| weight of the data | \(\frac{10}{14}\) | 0.714 |
| posterior mean | \(\frac{9}{14}=0.286\cdot0.5+0.714\cdot0.7\) | 0.643 |
| posterior median | numerical | 0.650 |
| map | \(\frac{8}{12}\) | 0.667 |
map with a flat prior equals the mle (the connection to §3.2). Take the uniform prior \(\mathrm{Beta}(1,1)\), \(\pi(\theta)=1\) on \([0,1]\). Then \(p(x\mid\theta)\pi(\theta)=p(x\mid\theta)=L(\theta\mid x)\), so \(\arg\max_\theta p(x\mid\theta)\pi(\theta)=\arg\max_\theta L(\theta\mid x)=\hat\theta_{\text{mle}}\). The formula agrees: \(\frac{1+k-1}{2+n-2}=\frac kn\). This holds in general whenever the prior is constant on \(\Theta\): a constant factor does not move the maximum. That is what the script means by "akin to the mle when not considering a prior". With a non-flat prior, the map maximises \(\ln L(\theta\mid x)+\ln\pi(\theta)\) (logarithm rule \(\ln(uv)=\ln u+\ln v\)): the log-likelihood plus a "penalty" that pulls towards values the prior likes.
With the flat prior, the posterior mean is \(\frac{k+1}{n+2}\) (Laplace's "rule of succession"): after 3 heads in 3 tosses the mle says \(\theta=1\) ("tails is impossible"), the posterior mean says \(\frac45\). The prior protects against over-confident estimates from very little data.
Credible intervals
Definition 3.64 credible interval Script 3.64
A \(100(1-\alpha)\%\) credible interval [Glaubwürdigkeitsintervall, Kredibilitätsintervall] for a parameter \(\theta\) is an interval \((l,u)\) such that
\[ \P(l\le\theta\le u\mid x)=\int_l^u\pi(\theta\mid x)\,\mathrm d\theta=1-\alpha . \]Unlike frequentist confidence intervals, the boundaries \(l,u\) are fixed numbers, and we now indeed interpret the credible interval as the range in which the true parameter lies with probability \(1-\alpha\), given the data and the model. A common choice is the equal-tailed interval, whose lower and upper bounds are the \(\frac\alpha2\) and \(1-\frac\alpha2\) quantiles of the posterior distribution. This is in line with the posterior representing our final beliefs about the true parameter value.
Each part explained (mine).
- The probability is computed with the posterior: it is the area under \(\pi(\cdot\mid x)\) between \(l\) and \(u\). The data \(x\) are fixed (already observed); \(\theta\) is the random quantity.
- Many intervals have posterior probability \(1-\alpha\) (slide a window along the density). "Equal-tailed" picks the one that leaves \(\frac\alpha2\) of the posterior on each side: \(l\) is the \(\frac\alpha2\)-quantile, \(u\) the \((1-\frac\alpha2)\)-quantile. (Another common choice, not in the script, is the highest posterior density interval, the shortest one.)
- The script's "ture" is a typo for "true".
Worked example: 95 % credible interval versus the Wald confidence interval My example
Credible interval. Posterior \(\mathrm{Beta}(9,5)\), \(\alpha=0.05\). The 0.025- and 0.975-quantiles of \(\mathrm{Beta}(9,5)\) (computed numerically) are 0.386 and 0.861. So
\[ \P(0.386\le\theta\le0.861\mid x)=0.95 . \]Wald confidence interval (Example 3.58, §3.4) for the same data: \(\hat p=\frac7{10}=0.7\), standard error \(\sqrt{\hat p(1-\hat p)/n}=\sqrt{0.7\cdot0.3/10}=\sqrt{0.021}\approx0.145\), so
\[ \hat p\pm z_{0.025}\sqrt{\tfrac{\hat p(1-\hat p)}n}=0.7\pm1.96\cdot0.145=0.7\pm0.284=(0.416,\;0.984). \]Comparison.
- The credible interval is pulled towards \(\frac12\) by the prior (and by the skewness of the posterior — it is not symmetric: \(\mathrm{Beta}(9,5)\) has a longer tail towards 0 than towards 1, which is why its mean 0.643 sits below its peak 0.667); the Wald interval is symmetric around the mle 0.7 and reaches almost to 1.
- With the flat prior \(\mathrm{Beta}(1,1)\) the posterior is \(\mathrm{Beta}(8,4)\) and the credible interval is \((0.390,\,0.891)\): still not equal to the Wald interval, because \(n=10\) is small and the Wald interval rests on a normal approximation (the central limit theorem [zentraler Grenzwertsatz], §2.4, abbreviated clt) that is poor here. The script warns about this in Example 3.58. In fact, for \(\theta=0.7\) and \(n=10\) the Wald interval covers the true value only with probability about 84 % instead of 95 % (my exact computation by summing binomial probabilities).
- With more data they agree: for 70 heads in 100 tosses, credible (prior \(\mathrm{Beta}(2,2)\)) \((0.601,\,0.777)\), Wald \((0.610,\,0.790)\); for 700 in 1000: \((0.670,\,0.727)\) versus \((0.672,\,0.728)\).
In words: the credible interval is "cut off 2.5 % of the posterior on each side". For small samples it can differ noticeably from the confidence interval; for large samples the numbers nearly coincide — but the sentences that go with them do not (Remark 3.65).
Remark 3.65 confidence vs. credible intervals Script 3.65
The interpretation of a credible interval is direct and intuitive: "Given the data, there is a 95 % probability that the true parameter \(\theta\) lies in this specific interval." This is fundamentally different from the frequentist confidence interval, where the probability statement is about the procedure of generating intervals, not about a specific interval covering the fixed parameter. The confidence interval is a statement about the data, while the credible interval is a statement about the parameter.
The fact that it is a common pitfall to interpret frequentist confidence intervals as if they were Bayesian credible intervals often fuels arguments that we should just always use Bayesian analysis and credible intervals instead of frequentist methods.
Unpacking "a statement about the data". In Definition 3.54 the probability \(\P_\theta(L(X)\le\theta\le U(X))\) is taken over the random sample \(X\), with \(\theta\) held fixed: before the experiment, the random interval will catch \(\theta\) with probability at least 95 %. Once you plug in the observed \(x\), the interval \((L(x),U(x))\) is two fixed numbers and \(\theta\) is a fixed number, so "\(\theta\) is inside" is simply true or false — no probability is left (Remark 3.55). In Definition 3.64 the probability is taken over \(\theta\) (with the posterior), with the data held fixed. So the random object is different in the two definitions: the interval in one, the parameter in the other.
Which interval means what — a comparison table My addition
| 95 % confidence interval (Def. 3.54) | 95 % credible interval (Def. 3.64) | |
|---|---|---|
| What is random | the interval (its end points are functions of the random sample \(X\)) | the parameter \(\theta\) (described by the posterior) |
| What is fixed | the true \(\theta\) | the observed data \(x\), and therefore \(l,u\) |
| The probability statement | \(\P_\theta(L(X)\le\theta\le U(X))\ge0.95\) for every \(\theta\) | \(\P(l\le\theta\le u\mid x)=0.95\) |
| "95 %" refers to | the long-run share of repetitions in which the procedure succeeds | the degree of belief in this one interval |
| Needs a prior? | no | yes — different priors give different intervals |
| Guarantee | coverage in repeated sampling, whatever \(\theta\) is (exact or approximate) | coherence with the stated beliefs; no coverage guarantee in general |
| Coin, 7 heads in 10 | Wald: \((0.416,\,0.984)\) | prior \(\mathrm{Beta}(2,2)\): \((0.386,\,0.861)\); flat prior: \((0.390,\,0.891)\) |
| Correct sentence | "This interval was produced by a method that catches the true \(\theta\) in 95 % of repeated experiments." | "Given the data and the prior, \(\theta\) lies in \((0.386,0.861)\) with probability 95 %." |
| Wrong sentence | "\(\theta\) lies in \((0.416,0.984)\) with probability 95 %." | "95 % of repeated experiments would give an interval containing \(\theta\)." (not guaranteed) |
A second worked model: Normal data, Normal prior
Worked example: the posterior of a normal mean with known \(\sigma\) My example
Setup. \(X_1,\dots,X_n\) iid \(\mathcal N(\mu,\sigma^2)\) with known standard deviation \(\sigma\) and unknown mean \(\mu\) (the parameter, \(\Theta=\R\)). Prior \(\mu\sim\mathcal N(m_0,\tau^2)\): "I think \(\mu\) is about \(m_0\), give or take \(\tau\)". \(\bar x=\frac1n\sum x_i\) is the observed sample mean.
Precision [Präzision] means 1/variance. Big precision = small spread = much information. Write \(\lambda_0=\frac1{\tau^2}\) (precision of the prior) and \(\lambda_n=\frac n{\sigma^2}\) (precision of the data: the sample mean has variance \(\frac{\sigma^2}n\)).
Step 1 — likelihood as a function of \(\mu\). The normal density is \(\frac1{\sqrt{2\pi\sigma^2}}e^{-(x_i-\mu)^2/(2\sigma^2)}\). Multiply over \(i\) (independence) and use \(e^ue^v=e^{u+v}\): \(p(x\mid\mu)\propto\exp\bigl(-\frac1{2\sigma^2}\sum_i(x_i-\mu)^2\bigr)\). Now split each term as \(x_i-\mu=(x_i-\bar x)+(\bar x-\mu)\) and expand the square:
\[ \sum_i(x_i-\mu)^2=\sum_i(x_i-\bar x)^2+2(\bar x-\mu)\underbrace{\sum_i(x_i-\bar x)}_{=\,n\bar x-n\bar x\,=\,0}+n(\bar x-\mu)^2 . \]The first sum does not contain \(\mu\), so its factor \(e^{-\sum(x_i-\bar x)^2/(2\sigma^2)}\) is a constant and can be dropped: \(p(x\mid\mu)\propto\exp\bigl(-\frac{\lambda_n}2(\mu-\bar x)^2\bigr)\).
Step 2 — times the prior. \(\pi(\mu)\propto\exp\bigl(-\frac{\lambda_0}2(\mu-m_0)^2\bigr)\). The product has exponent \(-\frac12\bigl[\lambda_0(\mu-m_0)^2+\lambda_n(\mu-\bar x)^2\bigr]\).
Step 3 — complete the square. Expand: \(\lambda_0(\mu^2-2\mu m_0+m_0^2)+\lambda_n(\mu^2-2\mu\bar x+\bar x^2)=(\lambda_0+\lambda_n)\mu^2-2(\lambda_0m_0+\lambda_n\bar x)\mu+\text{const}\). With \(\lambda_1:=\lambda_0+\lambda_n\) and \(m_1:=\frac{\lambda_0m_0+\lambda_n\bar x}{\lambda_1}\) this equals \(\lambda_1(\mu-m_1)^2+\text{const}\) (expand \(\lambda_1(\mu-m_1)^2=\lambda_1\mu^2-2\lambda_1m_1\mu+\lambda_1m_1^2\) and compare the \(\mu^2\) and \(\mu\) terms). The constants drop out under \(\propto\):
\[ \pi(\mu\mid x)\propto\exp\Bigl(-\frac{\lambda_1}2(\mu-m_1)^2\Bigr),\qquad\text{so}\qquad \boxed{\;\mu\mid x\sim\mathcal N\Bigl(m_1,\ \frac1{\lambda_0+\lambda_n}\Bigr)\;} \]because this is the kernel of the normal density with mean \(m_1\) and variance \(1/\lambda_1\).
Reading the result.
- Posterior mean = precision-weighted average: \(m_1=\frac{\lambda_0}{\lambda_0+\lambda_n}m_0+\frac{\lambda_n}{\lambda_0+\lambda_n}\bar x\). Whoever is more precise gets more weight. It is also the posterior median and the map (a normal density is symmetric with its peak at the mean).
- Precisions add: \(\lambda_1=\lambda_0+\lambda_n\). The posterior is always narrower than both the prior and the data alone.
- 95 % equal-tailed credible interval: \(m_1\pm1.96/\sqrt{\lambda_1}\).
Numbers. Heights in cm, \(\sigma=8\). Prior \(\mathcal N(170,10^2)\), so \(\lambda_0=\frac1{100}=0.01\). Data: \(n=4\) people with \(\bar x=178\), so \(\lambda_4=\frac4{64}=0.0625\).
- Weights: prior \(\frac{0.01}{0.0725}\approx0.138\), data \(\frac{0.0625}{0.0725}\approx0.862\).
- Posterior mean \(0.138\cdot170+0.862\cdot178\approx176.9\); posterior variance \(\frac1{0.0725}\approx13.79\), so the posterior standard deviation (sd, the square root of the variance) is \(\sqrt{13.79}\approx3.71\).
- 95 % credible interval \(176.9\pm1.96\cdot3.71=(169.6,\;184.2)\). Frequentist ci (Example 3.56, §3.4): \(178\pm1.96\cdot\frac8{\sqrt4}=(170.2,\;185.8)\).
- With \(n=16\) (same \(\bar x\)): data weight 0.962, credible \((173.8,181.5)\) vs. ci \((174.1,181.9)\). With \(n=100\): data weight 0.994, credible \((176.4,179.5)\) vs. ci \((176.4,179.6)\).
In words: for normal data and a normal prior, the posterior is normal; its centre is a weighted average of prior guess and sample mean, with weights proportional to how precise each is.
The philosophical divide and the practical convergence
Viewpoint 3.66 the philosophical divide and practical convergence Script 3.66
The core philosophical difference lies in the definition of probability and the nature of parameters.
- Frequentists view parameters as fixed constants and probability as a long-run frequency.
- Bayesians view parameters as random variables representing states of knowledge, and probability as a degree of belief.
In practice, for large sample sizes and under non-informative priors, Bayesian and frequentist results are often numerically similar. For example, the credible interval for a normal mean with a flat prior is identical to the frequentist confidence interval. However, the interpretations remain distinct. The choice between approaches often depends on the specific problem, the prior knowledge available, and the desired interpretation of the results.
Specifically, frequentist inference typically has the goal of building methods with frequency guarantees (in repeated sampling), whereas Bayesian inference aims at analysing degrees of belief. The script points to a stackexchange answer that formulates this divide well, and to a paper on common fallacies around confidence intervals (the links are not visible in the text version of the script; a well-known paper on exactly this topic is Morey et al. 2016, "The fallacy of placing confidence in confidence intervals" — my guess, not confirmed by the script).
Proof of the script's example: flat prior ⟹ credible interval = confidence interval My proof
Normal data with known \(\sigma\), as in the Normal–Normal example above. "Flat prior" means \(\pi(\mu)=\text{const}\) on all of \(\R\). Then the posterior is proportional to the likelihood alone. By step 1 of the example, \(\pi(\mu\mid x)\propto\exp\bigl(-\frac{n}{2\sigma^2}(\mu-\bar x)^2\bigr)\), the kernel of \(\mathcal N(\bar x,\sigma^2/n)\). (Equivalently: let \(\tau\to\infty\) in the example; then \(\lambda_0=1/\tau^2\to0\), \(m_1\to\bar x\) and \(1/\lambda_1\to\sigma^2/n\).)
The equal-tailed \(100(1-\alpha)\%\) credible interval of \(\mathcal N(\bar x,\sigma^2/n)\) is \(\bar x\pm z_{\alpha/2}\frac\sigma{\sqrt n}\) (standardise: the quantiles of \(\mathcal N(m,s^2)\) are \(m\) plus \(s\) times the standard normal quantiles). That is exactly the ci of Example 3.56. ∎
A subtlety the script skips. A constant function on \(\R\) has infinite area, so a "flat prior" on \(\R\) is not a probability distribution — it violates Definition 3.61(ii). Such improper priors are nevertheless used, because the posterior (likelihood times constant, normalised) is a proper density. On a bounded parameter space such as \([0,1]\), the flat prior \(\mathrm{Beta}(1,1)\) is a genuine distribution.
Why the prior "washes out" for large \(n\). In both worked models the weight of the data is \(\frac{n}{a+b+n}\) (Beta–Bernoulli) or \(\frac{n/\sigma^2}{1/\tau^2+n/\sigma^2}\) (Normal–Normal). Both tend to 1 as \(n\to\infty\), for every fixed prior. The posterior variance shrinks like \(\frac1n\) — for the Beta posterior, \(\Var=\frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}\approx\frac{\hat\theta(1-\hat\theta)}{n}\) — which is exactly the squared standard error that the frequentist Wald interval uses. So posterior mean \(\approx\) mle and posterior sd \(\approx\) standard error, and credible and confidence intervals nearly coincide. The general version of this fact is the Bernstein–von Mises theorem (beyond this course). Two caveats: a prior that gives probability 0 to the true value can never recover (the posterior is 0 wherever the prior is 0), and for small \(n\) the prior matters a lot.
In words: the two schools disagree on what probability is, not on arithmetic; with a lot of data and a mild prior they produce nearly the same numbers, which they then describe in different sentences.
Further reading from the script's bibliography Script p. 114
The bibliography lists Georgii (2015, Stochastik, German), Klenke (2013, Probability Theory), Siegel (2017, Counterexamples in Probability and Statistics), Hennig–Osborne–Kersting (2022, Probabilistic Numerics) and Jaynes (2003, Probability Theory: The Logic of Science).
Which of them is relevant here is my own comment, not the script's: Jaynes is the classic book-length argument for the Bayesian view of probability as degree of belief, and Hennig–Osborne–Kersting use Bayesian reasoning for numerical computation.
Exercise-sheet tasks
No exercise sheet has a task on §3.5 (I searched all sheets, in particular the statistics Sheets 10 and 11, for priors, posteriors, Bayesian estimators and credible intervals; there are none). The closest relative is Sheet 7 Ex 4 (trout or salmon), worked on §2.1. There the words "prior probabilities" \(\P(Y=0)=\P(Y=1)=\frac12\) and "likelihood densities" \(p(x\mid Y)\) already appear, with the class label \(Y\) playing the role of the unknown parameter. The probability \(\P(Y=1\mid X=x)=\frac{2x\cdot\frac12}{(2-2x)\frac12+2x\cdot\frac12}=x\) is the posterior of the label (my reading), and "classify as salmon when this posterior exceeds \(\frac12\)", i.e. when \(x>\frac12\), is a map decision.
Old-exam tasks
None of the three old exams (WiSe 25/26, SoSe 2025, SoSe 2026) asks about priors, posteriors, Bayesian estimators or credible intervals — this includes every true/false item and every definitions item, which I checked one by one. (The only interval question, WiSe25 P5d, asks for a frequentist Wald confidence interval and is solved on §3.4.) Do not conclude from this that the topic cannot be examined — the script marks it as an interlude, but it is part of the script. The one related exam task is placed elsewhere:
WiSe 25/26, Problem 6b — Bayes on the schedule, read as a prior-to-posterior update WiSe25 · P6b · 2 credits
Setting (from part a). You beat the strong player S with probability \(p\) and the weak player W with probability \(q\), where \(0<p<q<1\); matches are independent; you win the tournament if you win two consecutive matches out of three. A fair coin decides between the schedules SWS and WSW. You are told only that you won. How probable is it that the schedule was SWS?
The full solution is on §1.4. In the language of this page: the unknown "parameter" is the schedule (SWS or WSW); the fair coin gives the prior \(\pi(\text{SWS})=\pi(\text{WSW})=\frac12\); the likelihood of the observation "won" is \(pq(2-p)\) under SWS and \(pq(2-q)\) under WSW; the posterior is
\[ \pi(\text{SWS}\mid\text{won})=\frac{pq(2-p)\cdot\frac12}{pq(2-p)\cdot\frac12+pq(2-q)\cdot\frac12}=\frac{2-p}{4-p-q}, \]which agrees with the official answer (the evidence is \(\P(\text{won})=\frac12pq(4-p-q)\)). Since \(p<q\), the posterior exceeds \(\frac12\): winning makes the better schedule SWS more believable, so the map "estimate" of the schedule is SWS. (my reading; the official solution is correct)
Summary sheet
The two schools (Overview 3.60, Viewpoint 3.66)
- frequentist
- \(\theta\) fixed unknown constant; probability = long-run frequency; methods judged by guarantees over repeated sampling (mle, tests, cis)
- Bayesian
- \(\theta\) random, describing knowledge; probability = degree of belief; everything is read off the posterior
Definitions
- model (3.61)
- likelihood \(p(x\mid\theta)\) + prior \(\pi(\theta)\) on \(\Theta\)
- posterior (3.62)
- \(\pi(\theta\mid x)=\frac{p(x\mid\theta)\pi(\theta)}{p(x)}\propto p(x\mid\theta)\pi(\theta)\); evidence \(p(x)=\int_\Theta p(x\mid\theta)\pi(\theta)\,\mathrm d\theta\)
- posterior mean (3.63)
- \(\E[\theta\mid x]\); minimises posterior expected squared error
- posterior median
- \(\P(\theta\le\hat\theta_{\text{med}}\mid x)=0.5\); minimises posterior expected absolute error
- map
- \(\arg\max_\theta p(x\mid\theta)\pi(\theta)\), the posterior mode; flat prior ⟹ map = mle
- credible interval (3.64)
- \(\P(l\le\theta\le u\mid x)=1-\alpha\); equal-tailed: \(\frac\alpha2\)- and \((1-\frac\alpha2)\)-quantiles of the posterior
Formulas (my worked models)
- Beta–Bernoulli
- prior \(\mathrm{Beta}(a,b)\), \(k\) heads in \(n\): posterior \(\mathrm{Beta}(a+k,b+n-k)\); mean \(\frac{a+k}{a+b+n}=\frac{a+b}{a+b+n}\cdot\frac a{a+b}+\frac n{a+b+n}\cdot\frac kn\); map \(\frac{a+k-1}{a+b+n-2}\)
- Normal–Normal
- prior \(\mathcal N(m_0,\tau^2)\), \(\sigma\) known: posterior \(\mathcal N\bigl(\frac{\lambda_0m_0+\lambda_n\bar x}{\lambda_0+\lambda_n},\frac1{\lambda_0+\lambda_n}\bigr)\), \(\lambda_0=\frac1{\tau^2}\), \(\lambda_n=\frac n{\sigma^2}\)
- flat prior, normal mean
- credible interval \(=\bar x\pm z_{\alpha/2}\sigma/\sqrt n=\) ci of Example 3.56
Methods
- Posterior: multiply likelihood and prior, drop every factor without \(\theta\), recognise the kernel.
- Large \(n\): data weight \(\to1\), posterior mean \(\to\) mle, credible interval \(\approx\) confidence interval.
Traps
- "The true \(\theta\) lies in this 95 % confidence interval with probability 95 %" is wrong (Remark 3.55, 3.65).
- The likelihood is not a density in \(\theta\); the posterior is.
- The evidence \(p(x)\) does not depend on \(\theta\) — it is never needed for the map.
Exam focus
No old exam or sheet asks about §3.5. If it is examined, the natural questions are the definitions (3.61–3.64), the difference between confidence and credible intervals (3.65), and a conjugate update such as Beta–Bernoulli.
Self-test
Exam preparation · built from the three official solutions
Exam workshop
Klausurvorbereitung
How the exam is built WiSe 25/26 · SoSe 2025 · SoSe 2026 cover pages
The format, from the three cover pages. All three papers are written in 120 minutes. The permitted aids [Hilfsmittel] are printed identically on all three: one single sheet of A4 paper with handwritten notes on both sides, and one analogue dictionary English ↔ native language without notes. Nothing else. No formula sheet is handed out, no calculator is allowed, and no statistical tables (no table of \(\Phi\), no table of quantiles) are supplied. Writing in red or green, or in pencil, is forbidden; electronic devices go into the bag; detaching pages is forbidden.
One more sentence is printed on all three: "Answers are only accepted if the solution approach is documented. Give a reason for each answer unless explicitly stated otherwise in the respective subproblem." In the three papers so far, that exception was used exactly once — SoSe 2026 Problem 1, which says "No justification is required".
| WiSe 25/26 | SoSe 2025 | SoSe 2026 | |
|---|---|---|---|
| kind | retake [Wiederholungsklausur] | endterm | endterm |
| date | Thu 2 Oct 2025 | Fri 1 Aug 2025 | Wed 5 Aug 2026 |
| duration | 120 min | 120 min | 120 min |
| problems | 6 | 5 | 5 |
| credits [Punkte] | 59 | 51 | 44 |
| pages | 16 | 16 | 12 |
| credits per minute | 0.49 | 0.43 | 0.37 |
A word on the naming. The file called "WiSe25" is the retake of the winter-semester 2025/26 run, written on 2 October 2025. Chronologically it is the second of the three, sitting between SoSe 2025 and SoSe 2026. This guide calls it WiSe 25/26 throughout.
Three habits hold in all three papers.
- The paper opens with a true/false block (Problem 1 every time).
- Somewhere on the paper you are asked to state a named result with all its assumptions, worth 3 to 6 credits of pure recall.
- The paper closes with a long applied story problem worth 10 to 13 credits, chaining three to five subchapters of the script.
And here is where the three papers disagree — honestly.
- Position 2. Twice "Definitions" (6 credits, two recall parts); once (SoSe 2026) a second true/false block worth 12 credits, with the recall moved to Problem 3a.
- Position 3. Twice a block literally titled "Density computations" (11 and 9 credits); once (SoSe 2026) Jensen's inequality for 5 credits — and that paper has no density block anywhere. That is a real disagreement, not noise.
- Position 6. Exists once, on the retake only ("Strategic tennis matches", 10 credits). It is also the only place inclusion–exclusion (Theorem 1.22) has ever appeared.
- The true/false format. Twice 4 items × 3 credits with justification; once 5 items × 1 credit with no justification plus a separate justified block.
- The credit total fell 59 → 51 → 44. Two steps down is a direction, not a law.
The standing warning
Three papers is a tiny sample: two endterms and one retake, and the retake looked visibly different from its own endterm — different problem count, different credit total, different topic mix. Everything on this page is "what has been asked", never "what will be asked". Nothing here licenses skipping a topic. A topic that has never appeared in three papers is not a safe topic; it is an untested one.
How to use this page. The page is organised by problem position, because that is the one thing the three papers share. For each position you get: what that slot has actually been, what a full-credit answer contains, and then a drill bank — every past task of that type, solved in full, plus new tasks written in the same style and marked as mine. Work a block, hide the solutions, and answer on paper first; the credits on each drill tell you roughly how much writing the examiner expects. Where a published official solution is wrong, incomplete or sloppy, the drill says so and gives the repair.
Where the credits actually are
Below, every sub-part of every problem in the three papers is assigned to the one technique it is primarily marked on, and the credits are added up. The three papers together carry 154 credits (59 + 51 + 44), so the percentage column is out of 154. "Script §" gives the section of the lecture script the technique lives in.
| # | Topic (script §) | credits | % | where it showed up | in all three? |
|---|---|---|---|---|---|
| 1 | Expectation, variance, covariance (§2.1) — §2.1 page | 38 | 25 % | WiSe25 P1b, P3c, P5a, P5b, P5c (13) · SoSe25 P1b, P3c, P5a, P5b (13) · SoSe26 P1a, P1b, P2c, P2d, P4c, P5c (12) | yes |
| 2 | Convergence, lln, clt (§2.4) — §2.4 page | 25 | 16 % | WiSe25 P1d, P2a, P2b, P4c, P4d (13) · SoSe25 P2a, P2b, P4c (8) · SoSe26 P1d, P2a (4) | yes |
| 3 | Estimators, mle, bias, mse (§3.2) — §3.2 page | 23 | 15 % | WiSe25 P4a, P5b, P5c (8) · SoSe25 P1b, P4a, P4b (9) · SoSe26 P1e, P5b, P5c (6) | yes |
| 4 | Conditional probability, independence, Bayes (§1.4) — §1.4 page | 19 | 12 % | WiSe25 P3b, P6a, P6b (10) · SoSe25 P1a, P1d (6) · SoSe26 P5a (3) | yes |
| 5 | Markov, Chebyshev, Jensen (§2.2) — §2.2 page | 15 | 10 % | WiSe25 P4b (3) · SoSe25 P5c (4) · SoSe26 P3a, P3b, P4d (8) | yes |
| 6 | σ-algebras, measures, inclusion–exclusion (§1.1) — §1.1 page | 13 | 8 % | WiSe25 P1a, P1c, P6c (10) · SoSe26 P2b (3) · SoSe25: none | no (2 of 3) |
| 7 | Hypothesis testing (§3.3) — §3.3 page | 12 | 8 % | SoSe25 P1c, P4d (7) · SoSe26 P5d (5) · WiSe25: none | no (2 of 3) |
| 8 | Densities, cdfs, transformations (§1.3 and Proposition 2.51) — §1.3 page | 11 | 7 % | WiSe25 P3a (4) · SoSe25 P3a, P3b, P3d (7) · SoSe26: none | no (2 of 3) |
| 9 | Characteristic functions (§2.3) — §2.3 page | 5 | 3 % | SoSe26 P1c, P4a, P4b (5) only | no (1 of 3) |
| 10 | Statistical models, likelihood, identifiability (§3.1) — §3.1 page | 3 | 2 % | SoSe26 P5a (3, the identifiability half); elsewhere only as the set-up of an mle part | no (1 of 3 on its own) |
| 11 | Confidence intervals (§3.4) — §3.4 page | 2 | 1 % | WiSe25 P5d (2) only; SoSe25 P1c only reads a level | no (1 of 3) |
| — | Named discrete distributions (§1.2) — §1.2 page | — | — | used inside other problems every time (\(\Bin\) in WiSe25 P5, the Laplace/uniform model in SoSe25 P5, \(\Ber\) in SoSe26 P4 and P5) | used, never asked alone |
The point of rank 1. Expectation, variance and covariance (§2.1) is the heaviest topic by a wide margin — 38 of 154 credits, a quarter of everything — and yet it has never been a problem of its own. There has never been a problem titled "Expectation" or "Variance". It is the engine inside the other problems: it is how you answer a true/false item about covariance (SoSe26 P1a, P1b, P2c, P2d), how you price the mean and variance of an estimator before Chebyshev or the clt can be applied (WiSe25 P4b/c, SoSe26 P4c), and how the long story problem is solved at all (SoSe25 P5a/P5b, the duck hunt). If you can compute \(\E\), \(\Var\) and \(\Cov\) quickly and correctly — linearity, \(\Var[aX+b]=a^2\Var[X]\), bilinearity of covariance, \(\Var[X]=\E[X^2]-\E[X]^2\) — you are touching a quarter of the marks no matter which problems appear.
In words: §2.1 is not a chapter you revise once and tick off. It is the arithmetic the whole exam is written in.
What has never been examined in these three papers — and why that is not permission to skip it
None of the following appeared anywhere in WiSe 25/26, SoSe 2025 or SoSe 2026:
- §1.1–§1.2: urn models (Lemma 1.36) and combinatorial counting; the Poisson limit theorem (Theorem 1.42); Vitali sets (Theorems 1.27, 1.28).
- §1.3: Radon–Nikodym (Theorem 1.48); the hypergeometric, geometric, negative-binomial, Beta, \(\chi^2\) and Student-\(t\) distributions.
- §2.1–§2.3: the quantile transformation (Proposition 2.23); partial correlation (Definition 2.16); moment generating functions (Remark 2.49); the computation rules for multivariate Gaussians (Lemma 2.53).
- §2.4: the weak law of large numbers stated as such (Theorem 2.61) — although its assumption list is exactly the point of WiSe25 P1d, so the theorem is examined through the back door.
- §3.3–§3.4: uniformly most powerful and unbiased tests (Definitions 3.38, 3.39); the Neyman–Pearson lemma (Theorem 3.40); \(p\)-values computed numerically (Definition 3.48); \(t\)-tests and \(t\)-intervals (Examples 3.45, 3.46(iii), 3.57).
- Whole units: §3.5 in its entirety (Bayesian models, posteriors, credible intervals); the whole of Chapter 0; Appendix A.1.
Read that list as "untested", not as "safe". Three papers cannot cover a two-chapter-plus script, and an examiner who notices that a topic has been quiet for three rounds has a reason to use it. The Neyman–Pearson lemma is a numbered theorem with a proof in the script and a full exercise sheet behind it; nothing about its absence from three papers makes it unexaminable. Use the ranking to decide what to drill hardest, never to decide what to not read.
Problem 1 — the true/false block
This is the one stable fixture of the three papers: all three open with a problem titled True or false. Counting SoSe 2026's second block (its Problem 2, which is also true/false), the true/false material is worth 12 + 12 + 17 = 41 credits across the three papers — the largest single task type on any of them.
| WiSe 25/26 | SoSe 2025 | SoSe 2026 | |
|---|---|---|---|
| title | True or false | True or false | True or false (P1) and True or false with justification (P2) |
| credits | 12 | 12 | 5 + 12 = 17 |
| items | 4 × 3 | 4 × 3 | 5 × 1 (P1) and 4 × 3 (P2) |
| justification | required | required | P1: not required · P2: required |
The two variants, and what a justification must contain
Variant A — with justification (WiSe25 P1, SoSe25 P1, SoSe26 P2). The printed instruction asks you to decide whether each statement is true or false, to mark your answer unambiguously, and to provide a justification — which it says may be a proof, a counterexample, or an explanation via known results. Three credits per item.
Variant B — mark only (SoSe 2026 Problem 1). The instruction printed is "For the following statements, mark exactly one answer. No justification is required." Five items, one credit each, two boxes (True / False) to tick. This is the highest credits-per-minute block on any of the three papers: five credits with no writing at all. It is also the only place on any of the three papers where the standing "give a reason for each answer" instruction is switched off.
What a justification must contain to score. SoSe 2026 is the only one of the three whose official solution prints its marking scheme, and it is worth reading literally:
- P2a: "1 point for false; 2 points for a valid sequence for the counterexample."
- P2b: "1 point for false; 2 points for a valid counterexample and identification of a failed σ-algebra property."
- P2c: "1 point for false; 1 point for a valid example satisfying the conditional-expectation identity; 1 point for demonstrating dependence."
- P2d: "1 point for true; 1 point for using independence to obtain zero covariance; 1 point for expanding the covariance and concluding equality of the variances."
Three things follow, and they are worth more than any single fact on this page.
- The bare verdict is worth 1 credit. In every one of the four SoSe26 items, the word "true" or "false" alone earns one of the three credits. Never leave a true/false item blank, and write the verdict word first, on its own, before you start justifying. Even a guess is worth a third of the item.
- A counterexample scores only if it is checked in both directions. P2c splits its remaining two credits into "an example satisfying the hypothesis" and "demonstrating that the conclusion fails". So a counterexample has to do two jobs out loud: show the hypothesis holds for your example, and show the conclusion fails for it — both with actual numbers.
- Naming the broken property is part of the credit. P2b does not pay for "this is not a σ-algebra"; it pays for "this is not a σ-algebra because it contains \(\{a\}\) but not its complement \(\{b\}\)", which is axiom (ii) of Definition 1.6. Whenever a definition has numbered clauses, say which clause breaks.
The method for any true/false item, in four moves my distillation from the three official solutions
- Read the quantifier. Words like "for any", "for all", "then it already holds" mean the claim is universal, and one witness kills it. Words like "there exists" would need a proof of existence — no item on the three papers has been of that shape so far.
- Compare the hypotheses printed with the hypotheses the result needs. Write the named result from the script next to the statement and look for the gap. Missing independence, missing finiteness, missing non-degeneracy — the counterexample almost always lives exactly in that gap. WiSe25 P1d omits "independent"; SoSe26 P2a omits any control on the tails.
- If true: name the script item (Theorem 2.35, Proposition 2.12(iii)(v), Remark 2.57, …) and write the one or two lines it needs. Naming is not decoration — it is what "explanation via known results" means in the printed instruction.
- If false: build the smallest counterexample and verify both halves with numbers.
The counterexample habit. The three papers keep reusing a very small toolbox. Learn these five machines and most false items become mechanical:
- A finite \(\Omega\) with 2 to 4 points and an explicit pmf (probability mass function — the list of probabilities of the individual outcomes, Definition 1.34). Used by SoSe25 P1a (\(\Omega\) with 2 points), WiSe25 P1c (4 points), SoSe26 P2b (3 points).
- \(X_i := X_1\) for every \(i\) — keeps the marginal distribution exactly as stated and destroys independence. This is WiSe25 P1d's official counterexample.
- \(X_n := n\cdot\one_{\{U\le 1/n\}}\) with \(U\sim\Unif(0,1)\) — a spike that gets taller and rarer. It converges to \(0\) in every mode, yet \(\E[X_n]=1\) for every \(n\). This is SoSe26 P2a.
- \(X\) uniform on \(\{-1,0,1\}\) with \(Y:=X^2\) — uncorrelated, satisfies \(\E[X\mid Y]=\E[X]\), and is very much not independent. This is SoSe26 P2c.
- A count that is not a power of two. A σ-algebra on a finite \(\Omega\) always has \(2^k\) elements for some \(k\) (its atoms partition \(\Omega\), and every union of atoms is in it). So a listed collection of size 5, 6 or 7 cannot be one — a five-second check before you hunt for the missing complement. WiSe25 P1a's collection has 5 elements.
The drills below are grouped by topic so you can attack one area at a time. Every past item from the three papers is here, with its exam, part and credits, and every one I wrote myself is chipped my addition. Hide the solution, write your verdict word and your justification on paper, then open it.
Drills — σ-algebras and measures (§1.1)
Is this collection a σ-algebra? WiSe25 · P1a · 3 credits
Statement. On \(\Omega=\{\circ,\triangle,\star\}\), the set \(\{\emptyset,\{\circ\},\{\star\},\{\circ,\star\},\Omega\}\) is a σ-algebra. True or false?
Solution
Verdict: False.
The definition being tested. Definition 1.6: a collection \(\Aa\subseteq\pow(\Omega)\) (a set of subsets of \(\Omega\); \(\pow(\Omega)\) is the power set, the collection of all subsets) is a σ-algebra [σ-Algebra] on \(\Omega\) if (i) \(\Omega\in\Aa\); (ii) for every \(A\in\Aa\) also the complement \(A^c=\Omega\setminus A\) is in \(\Aa\); (iii) for every sequence \((A_i)_{i\in\N}\) in \(\Aa\), the union \(\bigcup_{i\in\N}A_i\) is in \(\Aa\).
Which clause breaks. Clause (ii). The set \(\{\circ\}\) is in the collection, but its complement is \[ \Omega\setminus\{\circ\}=\{\triangle,\star\}, \] and \(\{\triangle,\star\}\) is not one of the five listed sets. So the collection is not closed under complements and is not a σ-algebra.
The five-second check. The collection has \(5\) elements. A σ-algebra on a finite \(\Omega\) always has \(2^k\) elements for some \(k\in\N\), and \(5\) is not a power of \(2\), so it cannot be one. This is a good alarm bell, but write the concrete missing complement as well: the marking scheme of the comparable SoSe26 P2b pays explicitly for "identification of a failed σ-algebra property".
What earns the 3 credits: the word "false" (1), a concrete set whose complement is missing (1), and naming the axiom — closure under complements, Definition 1.6(ii) (1).
Do two measures agreeing on a generator agree everywhere? WiSe25 · P1c · 3 credits
Statement. Let \(\Omega\) be a set, \(L\subseteq\pow(\Omega)\), and let \(S\) be the σ-algebra \[ S=\bigcap\{A \mid A\text{ is a σ-algebra on }\Omega\text{ and }L\subseteq A\} \] (the intersection of all σ-algebras on \(\Omega\) that contain \(L\); this is a σ-algebra by Proposition 1.7, and it is written \(\sigma(L)\) in Lemma 1.8). Then for any two probability measures \(\P_1,\P_2\) on \((\Omega,S)\) with \(\P_1(L)=\P_2(L)\) for all \(L\in L\), it already holds that \(\P_1=\P_2\). True or false?
Solution
Verdict: False.
Words first. A probability measure [Wahrscheinlichkeitsmaß] \(\P\) on \((\Omega,S)\) assigns to each set in \(S\) a number in \([0,1]\), with \(\P(\Omega)=1\) and countable additivity (Definition 1.20). A generator \(L\) of \(S\) is any collection with \(\sigma(L)=S\) (Lemma 1.8). The claim is that knowing a measure on a generator pins it down on the whole σ-algebra.
The official counterexample. Take \(\Omega=\{1,2,3,4\}\) and \(L=\{\{1,2\},\{2,3\}\}\). Then \(\sigma(L)=\pow(\Omega)\) (all \(16\) subsets), so \(S=\pow(\Omega)\) and every single outcome is measurable. Define two measures through their pmfs: \[ p_1(1)=\tfrac13,\quad p_1(2)=\tfrac13,\quad p_1(3)=\tfrac13,\quad p_1(4)=0, \] \[ p_2(1)=\tfrac16,\quad p_2(2)=\tfrac12,\quad p_2(3)=\tfrac16,\quad p_2(4)=\tfrac16. \] Both are pmfs: each is non-negative and \(\tfrac13+\tfrac13+\tfrac13+0=1\) and \(\tfrac16+\tfrac12+\tfrac16+\tfrac16=1\). By Lemma 1.35 each pmf defines a probability measure on \(\pow(\Omega)\) through \(\P(A)=\sum_{\omega\in A}p(\omega)\).
Both halves checked with numbers. On the generator: \[ \P_1(\{1,2\})=\tfrac13+\tfrac13=\tfrac23,\qquad \P_2(\{1,2\})=\tfrac16+\tfrac12=\tfrac16+\tfrac36=\tfrac46=\tfrac23, \] \[ \P_1(\{2,3\})=\tfrac13+\tfrac13=\tfrac23,\qquad \P_2(\{2,3\})=\tfrac12+\tfrac16=\tfrac36+\tfrac16=\tfrac46=\tfrac23. \] So the hypothesis holds. But \(\P_1(\{4\})=0\neq\tfrac16=\P_2(\{4\})\), so \(\P_1\neq\P_2\) and the conclusion fails.
Why it fails — the idea worth carrying. Uniqueness does hold if the generator is closed under finite intersections (a π-system). Here \(\{1,2\}\cap\{2,3\}=\{2\}\), which is not in \(L\) — and \(\{2\}\) is exactly the set the two measures disagree on (\(p_1(2)=\tfrac13\), \(p_2(2)=\tfrac12\)). The gap in the hypothesis is the counterexample.
Note on the published solution. The PDF renders the shared value \(\tfrac23\) as "32". That is a typesetting slip in the rendering, not a mathematical error; the value is \(2/3\), as the arithmetic above shows.
Is the forward image of a σ-algebra a σ-algebra? SoSe26 · P2b · 3 credits
Statement. Let \(\Omega,\Omega'\) be sets, \(\Aa\) a σ-algebra on \(\Omega\), and \(f:\Omega\to\Omega'\) an arbitrary function. Then \(f(\Aa):=\{f(A)\mid A\in\Aa\}\) is a σ-algebra on \(\Omega'\). True or false?
Solution
Verdict: False.
Notation. \(f(A)=\{f(\omega)\mid\omega\in A\}\) is the forward image [Bild] of \(A\): everything \(f\) actually hits when it is fed the points of \(A\). Contrast this with the pre-image [Urbild] \(f^{-1}(A')=\{\omega\in\Omega\mid f(\omega)\in A'\}\), which is what Definition 1.50 uses to define measurable maps. Pre-images of a σ-algebra always form a σ-algebra; forward images need not. That asymmetry is the whole item.
The official counterexample. \(\Omega=\{1,2,3\}\), \(\Omega'=\{a,b\}\), with \(f(1)=f(2)=a\) and \(f(3)=b\), and \[ \Aa=\{\emptyset,\{1,3\},\{2\},\Omega\}. \] Check the hypothesis: \(\Aa\) really is a σ-algebra on \(\Omega\). (i) \(\Omega\in\Aa\). (ii) complements: \(\emptyset^c=\Omega\in\Aa\), \(\{1,3\}^c=\{2\}\in\Aa\), \(\{2\}^c=\{1,3\}\in\Aa\), \(\Omega^c=\emptyset\in\Aa\). (iii) unions: \(\{1,3\}\cup\{2\}=\Omega\in\Aa\), and every other union is one of the four sets again. So \(\Aa\) is a σ-algebra with \(4=2^2\) elements.
Compute the forward images: \[ f(\emptyset)=\emptyset,\quad f(\{1,3\})=\{a,b\},\quad f(\{2\})=\{a\},\quad f(\Omega)=\{a,b\}, \] so \(f(\Aa)=\{\emptyset,\{a\},\{a,b\}\}\).
Check the conclusion fails, naming the axiom: \(\{a\}\in f(\Aa)\), but its complement in \(\Omega'\) is \(\{a\}^c=\{b\}\), and \(\{b\}\notin f(\Aa)\). Closure under complements, Definition 1.6(ii), fails. (The alarm bell again: \(|f(\Aa)|=3\), not a power of \(2\).)
Why \(f\) is chosen surjective. \(f\) hits both \(a\) and \(b\), so \(f(\Omega)=\Omega'\) and the objection "but the image is too small" is closed off. The failure is not about missing the top set; it is about complements.
The printed marking scheme: "1 point for false; 2 points for a valid counterexample and identification of a failed σ-algebra property." Writing the counterexample without the sentence "\(\{b\}\) is missing, so axiom (ii) fails" does not get the two points.
Is the union of two σ-algebras a σ-algebra? my addition · 3 credits
Statement. Let \(\Aa_1\) and \(\Aa_2\) be σ-algebras on the same set \(\Omega\). Then \(\Aa_1\cup\Aa_2\) is a σ-algebra on \(\Omega\). True or false?
Solution
Verdict: False.
Where the trap is. Proposition 1.7 says the intersection of any family of σ-algebras on \(\Omega\) is again a σ-algebra — that is exactly what makes Lemma 1.8's \(\sigma(E)\) well defined. It is tempting to assume the union behaves the same way. It does not.
Counterexample. Take \(\Omega=\{1,2,3\}\) and, using Example 1.9(iii) (\(\sigma(\{A\})=\{\emptyset,\Omega,A,A^c\}\)), \[ \Aa_1=\{\emptyset,\{1\},\{2,3\},\Omega\},\qquad \Aa_2=\{\emptyset,\{2\},\{1,3\},\Omega\}. \] Hypothesis holds: both are σ-algebras — each contains \(\Omega\), each is closed under complements by construction (\(\{1\}^c=\{2,3\}\), \(\{2\}^c=\{1,3\}\)), and every union of their members is again a member (for instance \(\{1\}\cup\{2,3\}=\Omega\)). Each has \(4=2^2\) elements.
Conclusion fails: the union is \[ \Aa_1\cup\Aa_2=\{\emptyset,\{1\},\{2\},\{1,3\},\{2,3\},\Omega\}, \] which has \(6\) elements — not a power of \(2\), so it cannot be a σ-algebra. Concretely, the axiom that breaks is (iii), closure under unions: \(\{1\}\in\Aa_1\cup\Aa_2\) and \(\{2\}\in\Aa_1\cup\Aa_2\), but \[ \{1\}\cup\{2\}=\{1,2\}\notin\Aa_1\cup\Aa_2 . \] (Equivalently, by (ii): \(\{1,2\}=\{3\}^c\) and \(\{3\}\) is not in the union either.)
In words: intersecting σ-algebras keeps only sets that both systems can measure, and that is safe. Taking the union throws two incompatible systems into one bag, and the bag is no longer closed under combining its sets.
What earns the 3 credits: "false" (1); two explicit σ-algebras with the hypothesis verified (1); a concrete pair of sets whose union is missing, with the axiom named (1).
Drills — conditional probability, independence, Bayes (§1.4)
Is \(\P(A\mid B)=\P(B\mid A)\)? SoSe25 · P1a · 3 credits
Statement. Let \((\Omega,\Aa,\P)\) be a probability space and \(A,B\in\Aa\) with \(\P(A)>0\) and \(\P(B)>0\). Then \(\P(A\mid B)=\P(B\mid A)\). True or false?
Solution
Verdict: False.
The definition. Definition 1.69: for events \(A,B\) with \(\P(B)>0\), \(\P(A\mid B)=\dfrac{\P(A\cap B)}{\P(B)}\). The two conditional probabilities share the numerator \(\P(A\cap B)\) but divide by different numbers, so they agree only when \(\P(A)=\P(B)\).
The official counterexample. \(\Omega=\{0,1\}\), \(\Aa=\pow(\Omega)\), \(\P\) the Laplace (uniform) distribution, so \(\P(\{0\})=\P(\{1\})=\tfrac12\). Take \(A=\{0,1\}=\Omega\) and \(B=\{0\}\). Then \(\P(A)=1>0\) and \(\P(B)=\tfrac12>0\), so the hypothesis holds. Also \(A\cap B=\{0\}\), so \(\P(A\cap B)=\tfrac12\), and \[ \P(A\mid B)=\frac{1/2}{1/2}=1,\qquad \P(B\mid A)=\frac{1/2}{1}=\frac12 . \] Since \(1\neq\tfrac12\), the conclusion fails.
The right relation. What is true is Bayes' rule (Theorem 1.70(iii)), which in its two-event form reads \[ \P(A\mid B)=\frac{\P(B\mid A)\,\P(A)}{\P(B)} . \] The two conditionals differ by the factor \(\P(A)/\P(B)\); they coincide exactly when \(\P(A)=\P(B)\). Confusing the two directions is the "prosecutor's fallacy" and it is the same error as SoSe25 P1c's misreading of a significance level.
What earns the 3 credits: "false" (1); a concrete space with both probabilities positive (1); the two numbers computed and compared (1).
The cdf of a ratio of two exponentials SoSe25 · P1d · 3 credits
Statement. Let \(X,Y\) be iid (independent and identically distributed, Definition 1.79) following \(\Exp(\lambda)\) for \(\lambda>0\). Then the cdf of the ratio \(X/Y\) is \[ F_{X/Y}(t)=\begin{cases}\dfrac{t}{1+t} & t>0,\\[2pt] 0 & \text{otherwise.}\end{cases} \] True or false? Hint printed on the exam: the pdf of the exponential distribution is \(p_{\Exp(\lambda)}(x)=\lambda e^{-\lambda x}\) for \(x\ge0\) (and \(0\) otherwise); note that \(F_{X/Y}(t)=\P(X<t\cdot Y)\).
Solution
Verdict: True.
Words first. The cdf [Verteilungsfunktion] of a random variable \(Z\) is \(F_Z(t)=\P(Z\le t)\) (Definition 1.56). Since \(X\) and \(Y\) are exponential they are almost surely positive, so \(X/Y>0\) almost surely; therefore \(\P(X/Y\le t)=0\) for \(t\le0\), which settles the second branch immediately.
The joint density. \(X\perp\!\!\!\perp Y\) means the joint pdf factorises (Definition 1.77(iii)): for \(x,y\ge0\), \[ p_{X,Y}(x,y)=p_X(x)\,p_Y(y)=\lambda e^{-\lambda x}\cdot\lambda e^{-\lambda y}, \] and \(0\) elsewhere. This is the only place independence is used.
The computation, for \(t>0\). Using the hint's rewriting \(\{X/Y\le t\}=\{X<tY\}\) up to a null set (dividing by the positive \(Y\)), we integrate the joint density over the region \(\{0\le x<ty,\ y\ge0\}\), doing the inner integral in \(x\) first: \[ F_{X/Y}(t)=\int_0^\infty\Bigl(\int_0^{ty}\lambda e^{-\lambda x}\,dx\Bigr)\lambda e^{-\lambda y}\,dy . \] The inner integral is a standard antiderivative: \(\int_0^{c}\lambda e^{-\lambda x}dx= \bigl[-e^{-\lambda x}\bigr]_0^{c}=1-e^{-\lambda c}\) with \(c=ty\). So \[ F_{X/Y}(t)=\int_0^\infty\bigl(1-e^{-\lambda ty}\bigr)\lambda e^{-\lambda y}\,dy =\int_0^\infty\lambda e^{-\lambda y}dy-\lambda\int_0^\infty e^{-\lambda(t+1)y}\,dy . \] The first integral is \(1\) (the exponential density integrates to \(1\)). For the second, with \(\lambda(t+1)>0\), \[ \int_0^\infty e^{-\lambda(t+1)y}\,dy=\Bigl[\frac{-1}{\lambda(t+1)}e^{-\lambda(t+1)y}\Bigr]_0^\infty =\frac{1}{\lambda(t+1)} . \] Hence \[ F_{X/Y}(t)=1-\lambda\cdot\frac{1}{\lambda(t+1)}=1-\frac1{t+1}=\frac{t+1-1}{t+1}=\frac{t}{t+1}, \] which is the claimed formula. The \(\lambda\) cancels — the distribution of the ratio does not depend on the rate, which makes sense because scaling both \(X\) and \(Y\) by the same factor leaves \(X/Y\) unchanged.
Sanity checks. \(F(t)\to0\) as \(t\downarrow0\) and \(F(t)\to1\) as \(t\to\infty\), and \(F\) is increasing since \(F'(t)=\frac{1}{(1+t)^2}>0\) — the three properties a cdf must have (Lemma 1.24).
What earns the 3 credits: "true" (1); setting up the correct double integral from the factorised joint density (1); carrying the integration through to \(t/(1+t)\) and handling \(t\le0\) (1).
Are disjoint events independent? my addition · 2 credits
Statement. Let \(A,B\in\Aa\) be disjoint events (\(A\cap B=\emptyset\)) with \(\P(A)>0\) and \(\P(B)>0\). Then \(A\) and \(B\) are independent. True or false?
Solution
Verdict: False. In fact the hypothesis makes independence impossible.
The definition. Definition 1.74: events \(A,B\) are independent [unabhängig] if \(\P(A\cap B)=\P(A)\P(B)\).
The argument. Disjointness gives \(A\cap B=\emptyset\), so \(\P(A\cap B)=\P(\emptyset)=0\). But \(\P(A)>0\) and \(\P(B)>0\) give \(\P(A)\P(B)>0\), because a product of two strictly positive numbers is strictly positive. So \[ \P(A\cap B)=0\ \neq\ \P(A)\P(B)>0, \] and the defining equation fails. No example is even needed — the hypothesis contradicts the conclusion in general. If you want one anyway: a fair coin, \(A=\{\text{heads}\}\), \(B=\{\text{tails}\}\), then \(\P(A\cap B)=0\) while \(\P(A)\P(B)=\tfrac14\).
In words: "disjoint" and "independent" are near-opposites. Disjoint means knowing \(A\) happened tells you \(B\) definitely did not — the strongest possible dependence. Independent means knowing \(A\) happened tells you nothing about \(B\).
What earns the 2 credits: "false" (1); the comparison \(0\neq\P(A)\P(B)>0\) with Definition 1.74 named (1).
Does positive relevance run both ways? my addition · 3 credits
Statement. Let \(A,B\in\Aa\) with \(\P(A)>0\) and \(\P(B)>0\). If \(\P(A\mid B)>\P(A)\), then \(\P(B\mid A)>\P(B)\). True or false?
Solution
Verdict: True. (This one is a deliberate companion to SoSe25 P1a above: the values of the two conditionals need not agree, but the direction of the effect always does.)
Proof, one equivalence at a time. By Definition 1.69, \(\P(A\mid B)=\frac{\P(A\cap B)}{\P(B)}\). Since \(\P(B)>0\), multiplying the assumed inequality \(\frac{\P(A\cap B)}{\P(B)}>\P(A)\) by the positive number \(\P(B)\) preserves the direction and gives \[ \P(A\cap B)>\P(A)\,\P(B). \tag{$\ast$} \] Now run the same step backwards on the other side. Since \(\P(A)>0\), dividing \((\ast)\) by the positive number \(\P(A)\) preserves the direction: \[ \frac{\P(A\cap B)}{\P(A)}>\P(B), \] and the left-hand side is exactly \(\P(B\mid A)\) by Definition 1.69. So \(\P(B\mid A)>\P(B)\).
Where the symmetry comes from. Both statements are disguised versions of the single symmetric inequality \((\ast)\), \(\P(A\cap B)>\P(A)\P(B)\) — "\(A\) and \(B\) co-occur more often than independence would predict". Swapping \(A\) and \(B\) changes nothing in \((\ast)\).
In words: if \(B\) is evidence for \(A\), then \(A\) is evidence for \(B\) — always, and by the same "excess" \(\P(A\cap B)-\P(A)\P(B)\). What does not transfer is the size of the two conditional probabilities.
What earns the 3 credits: "true" (1); reducing the hypothesis to \((\ast)\) using \(\P(B)>0\) (1); reading \((\ast)\) back as \(\P(B\mid A)>\P(B)\) using \(\P(A)>0\) (1). Both positivity assumptions must be used out loud — they are what make the multiplications legal.
Drills — expectation, variance, covariance, conditional expectation (§2.1)
The ladder these items live on
Almost every §2.1 true/false item is a question about one chain of implications, and it is worth memorising the chain with the information that no arrow reverses:
\[ X\perp\!\!\!\perp Y \;\Longrightarrow\; \E[X\mid Y]=\E[X] \;\Longrightarrow\; \Cov[X,Y]=0 . \]Left to right: independence gives \(\E[XY]=\E[X]\E[Y]\) (Proposition 2.4(v)) and hence zero covariance (Proposition 2.12(v)); conditioning on \(Y\) tells you nothing, so \(\E[X\mid Y]=\E[X]\). Right to left: neither arrow reverses in general — Proposition 2.12(v) says so explicitly for the second one, and SoSe26 P2c is the exam item for the first one. The single exception the exams have used: for a pair of Bernoulli variables, zero covariance does give independence (SoSe26 P1b). Two items on the same page test the rule and its exception, on purpose; answering "false" to both from reflex costs a credit.
\(\Var[Y]\ge\E[\Var[Y\mid X]]\)? WiSe25 · P1b · 3 credits
Statement. Let \(X\) and \(Y\) be two random variables on a shared probability space such that all required expectations and variances exist. Then \(\Var[Y]\ge\E[\Var[Y\mid X]]\). True or false?
Solution
Verdict: True.
The objects. \(\Var[Y\mid X]\) is the conditional variance (Definition 2.34): for each value \(x\), \(\Var[Y\mid X=x]\) is the variance of \(Y\) computed inside the conditional distribution of \(Y\) given \(X=x\); as \(x\) ranges over the values of \(X\) this becomes a random variable \(\Var[Y\mid X]\), exactly as \(\E[Y\mid X]\) does in Definition 2.30. So \(\E[\Var[Y\mid X]]\) is "the average leftover spread of \(Y\) once \(X\) is known".
The named result. Theorem 2.35, the law of total variance [Varianzzerlegung]: \[ \Var[Y]=\E\bigl[\Var[Y\mid X]\bigr]+\Var\bigl[\E[Y\mid X]\bigr] . \] One line finishes it. The second summand is a variance, and by Proposition 2.8(i) every variance is non-negative: \(\Var[\E[Y\mid X]]\ge0\). Subtracting a non-negative number from \(\Var[Y]\) cannot increase it, so \[ \Var[Y]=\E[\Var[Y\mid X]]+\underbrace{\Var[\E[Y\mid X]]}_{\ge0}\ \ge\ \E[\Var[Y\mid X]] . \]
When is it an equality? Exactly when \(\Var[\E[Y\mid X]]=0\), which by Proposition 2.8(i) means \(\E[Y\mid X]\) is almost surely constant — that is, knowing \(X\) never shifts the mean of \(Y\).
In words: conditioning on more information can only shrink the average remaining variance. Total spread = average leftover spread + spread of the conditional means, and the second term cannot be negative.
What earns the 3 credits: "true" (1); quoting Theorem 2.35 correctly (1); the sentence that the second summand is non-negative because variances are (1). This is a "cite and do one line" item — no example is wanted.
Are \(X\) and \(1-X\) uncorrelated? SoSe26 · P1a · 1 credit (mark only)
Statement. Let \(X\sim\Ber(p)\) and set \(Y:=1-X\). If \(p=1/2\), then \(X\) and \(Y\) are uncorrelated. True or false? (No justification was required on the exam.)
Solution
Verdict: False.
What "uncorrelated" means. \(X\) and \(Y\) are uncorrelated [unkorreliert] if \(\Cov[X,Y]=0\), where \(\Cov[X,Y]=\E[(X-\E[X])(Y-\E[Y])]\) (Definition 2.9); equivalently the correlation coefficient \(\rho[X,Y]=\frac{\Cov[X,Y]}{\sigma_X\sigma_Y}\) of Definition 2.13 is \(0\), which needs \(\sigma_X,\sigma_Y>0\).
The computation, in two steps. By bilinearity of covariance (Proposition 2.12(iii)) and covariance with a constant being \(0\) (Proposition 2.12(iv)), \[ \Cov[X,\,1-X]=\Cov[X,1]-\Cov[X,X]=0-\Var[X]=-\Var[X], \] where \(\Cov[X,X]=\Var[X]\) is Proposition 2.12(ii). For \(X\sim\Ber(p)\), Lemma 2.26(iii) gives \(\Var[X]=p(1-p)\), so at \(p=\tfrac12\) \[ \Cov[X,Y]=-\tfrac12\cdot\tfrac12=-\tfrac14\ \neq\ 0 . \] They are not uncorrelated; in fact \(\rho[X,Y]=\frac{-1/4}{(1/2)(1/2)}=-1\), perfect negative correlation.
In words: \(Y\) is \(X\) flipped. Knowing one gives the other exactly, so they are as correlated as two variables can be. The value \(p=\tfrac12\) is a red herring: it maximises \(\Var[X]\) and so makes the covariance as far from \(0\) as it can be, but for any \(p\in(0,1)\) the answer is still "false".
Why this is placed next to P1b. The pair is designed so that a student who answers "false" by reflex to anything mentioning Bernoulli and covariance gets P1a right and P1b wrong. Compute, do not pattern-match.
For Bernoulli variables, does zero covariance give independence? SoSe26 · P1b · 1 credit (mark only)
Statement. For any two Bernoulli random variables \(X\) and \(Y\), \(\Cov[X,Y]=0\) implies \(X\perp\!\!\!\perp Y\). True or false? (No justification was required on the exam.)
Solution
Verdict: True. This is the one place where the arrow in Proposition 2.12(v) does turn around — and the reason is that a Bernoulli pair has so few joint probabilities that one equation pins them all down.
Proof supplied by me; the exam required no justification, and the script states only the general "converse fails" warning. Let \(X\sim\Ber(p)\) and \(Y\sim\Ber(q)\), so both take only the values \(0\) and \(1\), with \(\P(X=1)=p\), \(\P(Y=1)=q\). Write \(r:=\P(X=1,Y=1)\).
Step 1 — turn the covariance into \(r\). Since \(XY\) takes the value \(1\) exactly on the event \(\{X=1,Y=1\}\) and \(0\) elsewhere, \(\E[XY]=1\cdot r+0=r\). Also \(\E[X]=p\) and \(\E[Y]=q\) (Lemma 2.26(iii)). The computational formula for covariance (Remark 2.10) gives \[ \Cov[X,Y]=\E[XY]-\E[X]\E[Y]=r-pq . \] So the hypothesis \(\Cov[X,Y]=0\) says exactly \(r=pq\).
Step 2 — the other three joint probabilities follow. The events \(\{Y=1\}\) and \(\{Y=0\}\) partition the space, so by additivity (Proposition 1.19) \[ \P(X=1,Y=0)=\P(X=1)-\P(X=1,Y=1)=p-pq=p(1-q), \] \[ \P(X=0,Y=1)=\P(Y=1)-\P(X=1,Y=1)=q-pq=(1-p)q, \] \[ \P(X=0,Y=0)=1-\bigl[pq+p(1-q)+(1-p)q\bigr]=1-p-q+pq=(1-p)(1-q), \] where the last line multiplies out: \((1-p)(1-q)=1-p-q+pq\).
Step 3 — read off independence. All four joint probabilities factorise as \(\P(X=x,Y=y)=\P(X=x)\P(Y=y)\), which is exactly Definition 1.77(ii), the factorisation of the pmf for discrete variables. Hence \(X\perp\!\!\!\perp Y\).
Why the general converse still fails. The proof used that each variable has only two values, so that one number \(r\) determines the whole joint pmf. With three values the joint pmf has more free parameters than the covariance can control — which is exactly what SoSe26 P2c exploits with \(X\) uniform on \(\{-1,0,1\}\).
Does \(\E[X\mid Y]=\E[X]\) imply independence? SoSe26 · P2c · 3 credits
Statement. Let \(X\) and \(Y\) be integrable random variables. If \(\E[X\mid Y]=\E[X]\) then \(X\) and \(Y\) are independent. True or false?
Solution
Verdict: False.
Reading the statement. "Integrable" means the expectations exist and are finite (Definition 2.1). \(\E[X\mid Y]\) is the random variable of Definition 2.30: it takes the value \(\E[X\mid Y=y]\) when \(Y=y\). The claim "\(\E[X\mid Y]=\E[X]\)" says this random variable is the constant \(\E[X]\) — learning \(Y\) never moves the mean of \(X\).
The official counterexample. Let \(X\) be uniform on \(\{-1,0,1\}\), so \(\P(X=-1)=\P(X=0)=\P(X=1)=\tfrac13\), and set \(Y:=X^2\).
First half — the hypothesis holds. By Definition 2.1(i), \(\E[X]=(-1)\tfrac13+0\cdot\tfrac13+1\cdot\tfrac13=0\). The variable \(Y=X^2\) takes the value \(0\) (when \(X=0\), probability \(\tfrac13\)) and \(1\) (when \(X=\pm1\), probability \(\tfrac23\)). Condition on each (Definition 2.28):
- Given \(Y=0\): then \(X^2=0\), so \(X=0\) with conditional probability \(1\), hence \(\E[X\mid Y=0]=0\).
- Given \(Y=1\): then \(X\in\{-1,1\}\), and by symmetry each has conditional probability \(\frac{1/3}{2/3}=\tfrac12\), hence \(\E[X\mid Y=1]=(-1)\tfrac12+1\cdot\tfrac12=0\).
So \(\E[X\mid Y]\) equals \(0\) whatever \(Y\) is, i.e. \(\E[X\mid Y]=0=\E[X]\). The hypothesis holds.
Second half — the conclusion fails. Independence would require the joint pmf to factorise (Definition 1.77(ii)). Test one cell: \[ \P(X=0,\,Y=0)=\P(X=0)=\tfrac13,\qquad \P(X=0)\,\P(Y=0)=\tfrac13\cdot\tfrac13=\tfrac19, \] and \(\tfrac13\neq\tfrac19\). So \(X\) and \(Y\) are dependent. (They are also uncorrelated: \(\E[XY]=\E[X^3]=(-1)\tfrac13+0+1\cdot\tfrac13=0=\E[X]\E[Y]\) — the same example sits at the bottom of the ladder too.)
In words: \(Y=X^2\) tells you the size of \(X\) but nothing about its sign, so the conditional mean never budges from \(0\) even though \(Y\) reveals a great deal about \(X\). Constant conditional mean is far weaker than "no information".
The printed marking scheme: "1 point for false; 1 point for a valid example satisfying the conditional-expectation identity; 1 point for demonstrating dependence." All three jobs must appear separately on the page.
Does \(X+Y\perp\!\!\!\perp X-Y\) force equal variances? SoSe26 · P2d · 3 credits
Statement. Let \(X\) and \(Y\) be random variables with finite variance. If \(X+Y\) and \(X-Y\) are independent, then \(\Var[X]=\Var[Y]\). True or false?
Solution
Verdict: True.
Step 1 — independence gives zero covariance. By Proposition 2.12(v), if \(U\perp\!\!\!\perp V\) then \(\Cov[U,V]=0\). With \(U=X+Y\) and \(V=X-Y\) (both have finite variance because \(X,Y\) do, so the covariance exists), \[ \Cov[X+Y,\;X-Y]=0 . \]
Step 2 — expand by bilinearity. Proposition 2.12(iii) says covariance is linear in each slot separately, and \(X-Y=1\cdot X+(-1)\cdot Y\). Expanding both slots: \[ \Cov[X+Y,\,X-Y]=\Cov[X,X]-\Cov[X,Y]+\Cov[Y,X]-\Cov[Y,Y] . \] By symmetry (Proposition 2.12(i)) \(\Cov[X,Y]=\Cov[Y,X]\), so those two middle terms cancel. By Proposition 2.12(ii), \(\Cov[X,X]=\Var[X]\) and \(\Cov[Y,Y]=\Var[Y]\). Therefore \[ \Cov[X+Y,\,X-Y]=\Var[X]-\Var[Y] . \]
Step 3 — combine. Steps 1 and 2 give \(\Var[X]-\Var[Y]=0\), i.e. \(\Var[X]=\Var[Y]\).
In words: the sum and the difference are uncorrelated exactly when the two variables have the same spread. Independence is a stronger assumption than needed here — plain uncorrelatedness of \(X+Y\) and \(X-Y\) already forces equal variances, which is worth saying in the answer.
The printed marking scheme: "1 point for true; 1 point for using independence to obtain zero covariance; 1 point for expanding the covariance and concluding equality of the variances." Note that the middle credit is for the sentence "independent \(\Rightarrow\) covariance \(0\), by Proposition 2.12(v)" — jumping straight to the expansion loses it.
Is \(\Var[X-Y]=\Var[X]-\Var[Y]\)? my addition · 3 credits
Statement. For any two random variables \(X,Y\) with finite variance, \(\Var[X-Y]=\Var[X]-\Var[Y]\). True or false?
Solution
Verdict: False.
What is actually true. Proposition 2.12(vi) gives the general formula \(\Var[X+Y]=\Var[X]+\Var[Y]+2\Cov[X,Y]\). Applying it to \(X+(-Y)\), and using \(\Var[-Y]=(-1)^2\Var[Y]=\Var[Y]\) (Proposition 2.8(iii)) together with \(\Cov[X,-Y]=-\Cov[X,Y]\) (Proposition 2.12(iii)): \[ \Var[X-Y]=\Var[X]+\Var[Y]-2\Cov[X,Y] . \] Variances add, never subtract; only the covariance term changes sign.
Counterexample with numbers. Let \(X\sim\Ber(\tfrac12)\) and set \(Y:=-X\). Both have finite variance, so the hypothesis holds. By Lemma 2.26(iii), \(\Var[X]=\tfrac12\cdot\tfrac12=\tfrac14\), and by Proposition 2.8(iii), \(\Var[Y]=\Var[-X]=(-1)^2\Var[X]=\tfrac14\). Now \[ X-Y=X-(-X)=2X,\qquad \Var[X-Y]=\Var[2X]=2^2\Var[X]=4\cdot\tfrac14=1, \] again by Proposition 2.8(iii). But the claimed right-hand side is \(\Var[X]-\Var[Y]=\tfrac14-\tfrac14=0\). Since \(1\neq0\), the conclusion fails.
A second reason the claim cannot hold in general: its right-hand side can be negative (take any \(X,Y\) with \(\Var[Y]>\Var[X]\)), while the left-hand side is a variance and so is \(\ge0\) by Proposition 2.8(i). A formula that can produce a negative variance is wrong on sight.
What earns the 3 credits: "false" (1); the correct identity with the \(-2\Cov\) term, named from Proposition 2.12(vi) (1); a concrete pair with both sides computed (1).
Is \(\E[\E[X\mid Y]]=\E[X]\)? my addition · 2 credits
Statement. For any two random variables \(X,Y\) for which the relevant expectations exist, \(\E\bigl[\E[X\mid Y]\bigr]=\E[X]\). True or false?
Solution
Verdict: True. This is Theorem 2.32 verbatim — the law of total expectation, also called the tower property [Turmregel] or iterated expectation: \(\E[Y]=\E[\E[Y\mid X]]\), with the roles of the two letters swapped relative to the script's phrasing.
Why it is not circular. The two \(\E\) signs are expectations over different things. The inner \(\E[X\mid Y]\) averages \(X\) within each value of \(Y\); by Definition 2.30 the result is a random variable \(h(Y)\), where \(h(y)=\E[X\mid Y=y]\). The outer \(\E\) then averages \(h(Y)\) over the distribution of \(Y\). Splitting the average into groups and then averaging the group averages — weighted by how likely each group is — returns the overall average.
A concrete check with numbers my example. Let \(Y\) be the result of a fair coin, \(\P(Y=0)=\P(Y=1)=\tfrac12\), and let \(X\) be \(0\) or \(10\) with \(\P(X=10\mid Y=0)=0.2\) and \(\P(X=10\mid Y=1)=0.8\). Then \(\E[X\mid Y=0]=10\cdot0.2=2\) and \(\E[X\mid Y=1]=10\cdot0.8=8\), so \(\E[X\mid Y]\) is the random variable taking values \(2\) and \(8\), each with probability \(\tfrac12\), and \[ \E[\E[X\mid Y]]=\tfrac12\cdot2+\tfrac12\cdot8=5 . \] Directly: \(\P(X=10)=\tfrac12\cdot0.2+\tfrac12\cdot0.8=0.5\) by the law of total probability (Theorem 1.70(ii)), so \(\E[X]=10\cdot0.5=5\). The two agree.
What earns the 2 credits: "true" (1); naming Theorem 2.32 and saying which average is taken over what (1). No example is needed for a "true" item that is a named theorem, but the numbers above are how you check yourself under time pressure.
Uncorrelated and the product rule my addition · 2 credits
Statement. If \(X\) and \(Y\) are uncorrelated (and all relevant expectations exist), then \(\E[XY]=\E[X]\E[Y]\). True or false?
Solution
Verdict: True — and this is the item that catches people who have learned "uncorrelated is weaker than independent" as a slogan and then refuse to grant anything at all to uncorrelatedness.
One line. "Uncorrelated" means \(\Cov[X,Y]=0\) (Definition 2.9 together with Definition 2.13). The computational formula for covariance (Remark 2.10) says \[ \Cov[X,Y]=\E[XY]-\E[X]\E[Y] . \] Setting the left-hand side to \(0\) and adding \(\E[X]\E[Y]\) to both sides gives \(\E[XY]=\E[X]\E[Y]\).
What is not implied. Independence would give much more: \(\E[g(X)h(Y)]=\E[g(X)]\E[h(Y)]\) for all well-behaved functions \(g,h\), not just for \(g(x)=x\), \(h(y)=y\). That is precisely where the counterexample of SoSe26 P2c lives: with \(X\) uniform on \(\{-1,0,1\}\) and \(Y=X^2\) we have \(\E[XY]=\E[X]\E[Y]\), but taking \(g(x)=x^2\) breaks the product rule, since \(\E[X^2Y]=\E[X^4]=\tfrac23\) while \(\E[X^2]\E[Y]=\tfrac23\cdot\tfrac23=\tfrac49\).
In words: uncorrelated is exactly "the product rule holds for the variables themselves". Independent is "the product rule holds for every function of them".
What earns the 2 credits: "true" (1); the one-line rearrangement of Remark 2.10 (1).
Drills — Markov, Chebyshev, Jensen (§2.2)
No true/false item on the three papers has been about an inequality from §2.2 — the inequalities appear as computation tasks instead (WiSe25 P4b, SoSe25 P5c, SoSe26 P3b and P4d). Since §2.2 is rank 5 by credits and appears in all three papers, the two items below are mine, written to test the hypotheses rather than the algebra.
Markov without non-negativity my addition · 3 credits
Statement. For every random variable \(X\) with finite mean and every \(\epsilon>0\), \[ \P(X\ge\epsilon)\le\frac{\E[X]}{\epsilon} . \] True or false?
Solution
Verdict: False. The inequality as printed drops the hypothesis that makes it work.
What the script actually says. Theorem 2.38 (Markov's inequality [Markow-Ungleichung]) is stated for a monotonically increasing \(f:S_X\to\R_{\ge0}\) in the form \(\P(X\ge\epsilon)\le\frac{1}{f(\epsilon)}\E[f(X)]\), and then records the familiar special case: let \(X\) be a non-negative random variable (that is, \(\P(X\ge0)=1\)); then for any constant \(\epsilon>0\), \(\P(X\ge\epsilon)\le\frac{\E[X]}{\epsilon}\). Non-negativity is not decoration.
Counterexample with numbers. Let \(X\) be the constant \(-1\) — that is, \(\P(X=-1)=1\). Its mean is finite: \(\E[X]=-1\) by Definition 2.1(i). Take \(\epsilon=1>0\). Then \[ \P(X\ge1)=0,\qquad \frac{\E[X]}{\epsilon}=\frac{-1}{1}=-1 , \] and the claimed inequality reads \(0\le-1\), which is plainly false.
A non-degenerate counterexample, in case a constant feels like cheating: let \(X\) take the value \(-10\) with probability \(\tfrac12\) and the value \(2\) with probability \(\tfrac12\). Then \(\E[X]=\tfrac12(-10)+\tfrac12(2)=-4\). With \(\epsilon=2\): \(\P(X\ge2)=\tfrac12\) while \(\frac{\E[X]}{\epsilon}=\frac{-4}{2}=-2\), and \(\tfrac12\le-2\) is false.
The structural reason. A probability is always in \([0,1]\); the right-hand side \(\E[X]/\epsilon\) is negative as soon as \(\E[X]<0\). So the claim cannot survive any variable with a negative mean. Non-negativity of \(X\) is exactly what forces \(\E[X]\ge0\) (Proposition 2.4(iii)) and makes the bound meaningful.
The repair used on the exams. When you need to bound \(\P(|Z|\ge a)\) — an event about a variable that can be negative — you first square it: \(|Z|\ge a\iff Z^2\ge a^2\), and \(Z^2\) is non-negative, so Markov applies and gives \(\P(|Z|\ge a)\le\E[Z^2]/a^2\). That is exactly the move in SoSe26 P4d, and it is also how Theorem 2.40 (Chebyshev) is derived from Theorem 2.38.
What earns the 3 credits: "false" (1); naming the missing non-negativity hypothesis from Theorem 2.38 (1); a concrete variable with both sides evaluated (1).
\(\E[X^2]\ge(\E[X])^2\) my addition · 2 credits
Statement. For every random variable \(X\) whose mean and second moment are finite, \(\E[X^2]\ge(\E[X])^2\). True or false?
Solution
Verdict: True, and there are two one-line proofs. Give either.
Route 1 — Jensen (Theorem 2.42). Jensen's inequality says: if \(\E[X]\) is finite and \(g:\R\to\R\) is convex [konvex] — meaning \(g(tx_1+(1-t)x_2)\le tg(x_1)+(1-t)g(x_2)\) for all \(x_1,x_2\in\R\) and \(t\in[0,1]\), i.e. the chord never dips below the graph — then \(\E[g(X)]\ge g(\E[X])\). Take \(g(x)=x^2\), which is convex because \(g''(x)=2>0\) everywhere. Then \(\E[X^2]\ge(\E[X])^2\) immediately.
Route 2 — the variance is non-negative. Remark 2.6 gives the computational formula \(\Var[X]=\E[X^2]-(\E[X])^2\), and Proposition 2.8(i) says \(\Var[X]\ge0\). Adding \((\E[X])^2\) to both sides of \(\E[X^2]-(\E[X])^2\ge0\) gives the claim.
When is it an equality? By Proposition 2.8(i), \(\Var[X]=0\) exactly when \(\P(X=\E[X])=1\), i.e. \(X\) is almost surely constant. Theorem 2.42's equality clause says the same thing from the Jensen side, because \(x\mapsto x^2\) is strictly convex.
In words: squaring and averaging gives at least as much as averaging and squaring, and the gap between the two is exactly the variance.
What earns the 2 credits: "true" (1); either named route written out (1). Route 2 is safer under time pressure because it needs no convexity check.
Drills — characteristic functions (§2.3)
The cf of \(2X+Y\) SoSe26 · P1c · 1 credit (mark only)
Statement. Let \(X\) and \(Y\) be independent random variables with \(\phi_X(t)=\phi_Y(t)=\cos(t)\) for all \(t\in\R\). Then \[ \phi_{2X+Y}(t)=\cos(2t)\cos(t) \] for all \(t\in\R\). True or false? (No justification was required on the exam.)
Solution
Verdict: True.
What a cf is. The characteristic function [charakteristische Funktion] of a random variable \(X\) is \(\phi_X(t)=\E[e^{itX}]\) (Definition 2.46), where \(i=\sqrt{-1}\) and, by Euler's formula, \(e^{iu}=\cos u+i\sin u\). It always exists, because \(|e^{itX}|=1\). A cf of \(\cos t\) is the cf of the symmetric sign variable \(\P(X=1)=\P(X=-1)=\tfrac12\), since \(\tfrac12e^{it}+\tfrac12e^{-it}=\cos t\) — this is exactly the variable of SoSe26 P4a.
Two rules, applied in order (both from Remark 2.47).
- Independence turns a sum into a product (Remark 2.47(iv)): if \(U\perp\!\!\!\perp V\) then \(\phi_{U+V}(t)=\phi_U(t)\phi_V(t)\). Here \(2X\) is a function of \(X\) alone and \(Y\) is independent of \(X\), so \(2X\perp\!\!\!\perp Y\) and \[ \phi_{2X+Y}(t)=\phi_{2X}(t)\,\phi_Y(t). \]
- Affine scaling (Remark 2.47(ii)): \(\phi_{aX+b}(t)=e^{itb}\phi_X(at)\). With \(a=2\), \(b=0\): \(\phi_{2X}(t)=\phi_X(2t)=\cos(2t)\).
Putting the two together: \(\phi_{2X+Y}(t)=\cos(2t)\cdot\cos(t)\), which is the claim.
The classic wrong turn is \(\phi_{2X}(t)=\phi_X(t)^2=\cos^2 t\), which confuses \(2X\) (one variable doubled) with \(X_1+X_2\) (two independent copies added). Those are different random variables: \(2X\) takes values in \(\{-2,2\}\), while \(X_1+X_2\) takes values in \(\{-2,0,2\}\). The scaling rule is Remark 2.47(ii); the power rule is Remark 2.47(iv).
Drills — convergence, lln and clt (§2.4)
The second ladder, and the one place it turns around
Remark 2.57: \(X_n\xrightarrow{a.s.}X\Rightarrow X_n\xrightarrow{\P}X\Rightarrow X_n\xrightarrow{d}X\). In words: almost sure convergence implies convergence in probability implies convergence in distribution. The reverse implications fail in general (Examples 2.58 and 2.59). Remark 2.57 records one reversal: if \(X_n\xrightarrow{d}c\) for a constant \(c\in\R\), then also \(X_n\xrightarrow{\P}c\). So for a constant limit, "in distribution" and "in probability" are the same thing.
Poisson sample mean without independence WiSe25 · P1d · 3 credits
Statement. For \(X_1,X_2,\dots\sim\Poi(2)\) we have for the sample mean \(\bar X_n:=\frac1n\sum_{i=1}^nX_i\) that \(\bar X_n\xrightarrow{\P}2\). True or false?
Note on the printed statement. The exam prints it as "\(\lim_{n\to\infty}\bar X_n\xrightarrow{\P}2\)". The "\(\lim\)" is redundant notation — the arrow \(\xrightarrow{\P}\) already contains the limit. Read the statement as \(\bar X_n\xrightarrow{\P}2\).
Solution
Verdict: False.
Where the gap is. The notation "\(X_1,X_2,\dots\sim\Poi(2)\)" says the \(X_i\) are identically distributed (Definition 1.54) — each one is Poisson with parameter \(2\) — and nothing more. It does not say iid (Definition 1.79), which additionally demands independence. Both laws of large numbers need something beyond identical distribution: Theorem 2.61 (wlln) needs the \(X_i\) to be pairwise uncorrelated; Theorem 2.62 (slln) needs them iid. Reading "iid" into a statement that does not say it is the single most examined reflex error on these papers.
The official counterexample. Set \(X_i:=X_1\) for every \(i\in\N_{>0}\) — one Poisson draw, repeated forever.
- Hypothesis holds: every \(X_i\) has exactly the \(\Poi(2)\) distribution, since it is \(X_1\).
- Conclusion fails: \(\bar X_n=\frac1n\sum_{i=1}^nX_1=\frac1n\cdot nX_1=X_1\) for every \(n\). So the sequence \(\bar X_n\) does not move at all, and for any \(\epsilon>0\), \[ \P(|\bar X_n-2|\ge\epsilon)=\P(|X_1-2|\ge\epsilon), \] a number that does not depend on \(n\) and therefore cannot tend to \(0\) unless it is already \(0\). It is not \(0\): the \(\Poi(2)\) pmf is \(\P(X_1=k)=e^{-2}2^k/k!>0\) for every \(k\in\N\), so for example \(\P(X_1=0)=e^{-2}\approx0.1353>0\), and the value \(0\) is at distance \(2\ge\epsilon\) from \(2\) whenever \(\epsilon\le2\). Hence \(\P(|\bar X_n-2|\ge\epsilon)\ge e^{-2}>0\) for all \(n\), and Definition 2.56(i) fails.
The repair. Add one word. With \(X_1,X_2,\dots\) iid \(\Poi(2)\), the mean is \(\E[X_i]=2<\infty\) (Lemma 2.26(vii)), Theorem 2.62 gives \(\bar X_n\xrightarrow{a.s.}2\), and Remark 2.57 then gives \(\bar X_n\xrightarrow{\P}2\). The statement becomes true.
What earns the 3 credits: "false" (1); naming the missing independence assumption (1); the explicit counterexample \(X_i:=X_1\) with the probability shown not to vanish (1).
In probability to a constant, hence in distribution SoSe26 · P1d · 1 credit (mark only)
Statement. Let \(X_1,X_2,\dots\) be a sequence of random variables on a common probability space and let \(c\in\R\). If \(X_n\xrightarrow{\P}c\), then \(X_n\xrightarrow{d}c\). True or false? (No justification was required on the exam.)
Solution
Verdict: True.
Why. This is the second arrow of Remark 2.57, which holds for any limit variable \(X\), constant or not: \(X_n\xrightarrow{\P}X\Rightarrow X_n\xrightarrow{d}X\). Nothing special about the constant is needed for this direction.
The two definitions, so the statement is readable (Definition 2.56). \(X_n\xrightarrow{\P}X\) ("in probability" [in Wahrscheinlichkeit]) means: for every \(\epsilon>0\), \(\lim_{n\to\infty}\P(|X_n-X|\ge\epsilon)=0\). \(X_n\xrightarrow{d}X\) ("in distribution" [in Verteilung]) means: \(\lim_{n\to\infty}F_{X_n}(x)=F_X(x)\) for every \(x\in\R\) at which \(F_X\) is continuous.
What makes the constant case special is the converse, which Remark 2.57 also records: if \(X_n\xrightarrow{d}c\) for a constant \(c\), then \(X_n\xrightarrow{\P}c\) as well. So for a constant limit the two modes are equivalent — whereas for a genuinely random limit the converse fails (Example 2.59: \(U\sim\Ber(0.5)\), \(X_n:=U\), \(X:=1-U\); then \(X_n\xrightarrow{d}X\) because both are \(\Ber(0.5)\), but \(|X_n-X|=1\) always, so there is no convergence in probability).
A small correction to how this item is sometimes summarised. The statement as printed on the exam is the forward direction \(\xrightarrow{\P}\Rightarrow\xrightarrow{d}\), which is the general ladder and needs no constant. The constant only matters for the converse. Both directions are true here, so the answer is "true" either way — but be clear which one you are citing.
Does convergence in distribution carry the expectations along? SoSe26 · P2a · 3 credits
Statement. Let \(X_1,X_2,\dots\) and \(X\) be random variables on a common probability space such that \(X_n\xrightarrow{d}X\). If all expectations \(\E[X_n]\) and \(\E[X]\) exist and are finite, then \(\lim_{n\to\infty}\E[X_n]=\E[X]\). True or false?
Solution
Verdict: False.
The official counterexample. Let \(U\sim\Unif(0,1)\) — the uniform distribution on the interval \((0,1)\), so \(\P(U\le u)=u\) for \(u\in[0,1]\) — and define \[ X_n:=n\cdot\one_{\{U\le1/n\}},\qquad X:=0 , \] where \(\one_A\) is the indicator [Indikatorfunktion] of the event \(A\): it equals \(1\) if \(A\) occurs and \(0\) otherwise. All of these live on the one probability space carrying \(U\), as the statement requires.
The distribution of \(X_n\). The event \(\{U\le1/n\}\) has probability \(1/n\), so \[ \P(X_n=n)=\frac1n,\qquad \P(X_n=0)=1-\frac1n . \] A tall, rare spike: height \(n\), probability \(1/n\).
First half — the hypothesis holds. For every \(\epsilon>0\) and all \(n\) large enough that \(n>\epsilon\), the only way \(|X_n|\ge\epsilon\) is \(X_n=n\), so \[ \P(|X_n|\ge\epsilon)=\frac1n\xrightarrow[n\to\infty]{}0 , \] which is Definition 2.56(i): \(X_n\xrightarrow{\P}0\). By Remark 2.57, convergence in probability implies convergence in distribution, so \(X_n\xrightarrow{d}0=X\). All the expectations exist and are finite, as we now compute.
Second half — the conclusion fails. By Definition 2.1(i), \[ \E[X_n]=n\cdot\frac1n+0\cdot\Bigl(1-\frac1n\Bigr)=1 \quad\text{for every }n , \] so \(\lim_{n\to\infty}\E[X_n]=1\). But \(\E[X]=\E[0]=0\). Since \(1\neq0\), the claim is false.
In words: convergence in distribution is about where the bulk of the probability sits, and the bulk of \(X_n\) does go to \(0\). The mean, however, is a weighted average in which a vanishing probability \(1/n\) is multiplied by an exploding value \(n\); the product stays at \(1\) and the mass that escapes to infinity carries the whole expectation with it. A mode of convergence that ignores tails cannot control a quantity that is all about tails.
The printed marking scheme: "1 point for false; 2 points for a valid sequence for the counterexample." Note that the two points are for the sequence, so the definition of \(X_n\) plus the two computations (\(\P(|X_n|\ge\epsilon)\to0\) and \(\E[X_n]=1\)) is what must be on the page.
Keep this machine. \(X_n=n\cdot\one_{\{U\le1/n\}}\) is the standard device for "convergence without convergence of means". Memorise it; it costs two lines and answers a whole family of items.
Is the limit in distribution unique? my addition · 3 credits
Statement. Let \((X_n)_{n\in\N}\), \(X\) and \(Y\) be random variables on a common probability space with \(X_n\xrightarrow{d}X\) and \(X_n\xrightarrow{d}Y\). Then \(X=Y\) almost surely, i.e. \(\P(X=Y)=1\). True or false?
Solution
Verdict: False.
Where the gap is. Definition 2.56(iii) only constrains the cdfs: \(X_n\xrightarrow{d}X\) means \(F_{X_n}(x)\to F_X(x)\) at every continuity point of \(F_X\). So the two hypotheses together force \(F_X=F_Y\) — the limits have the same distribution. They say nothing about the two variables agreeing outcome by outcome, and "almost surely equal" is a statement about outcomes.
Counterexample with numbers. Let \(X\sim\Ber(\tfrac12)\), so \(\P(X=0)=\P(X=1)=\tfrac12\), and set \(Y:=1-X\). Then \(Y\) is also \(\Ber(\tfrac12)\): \(\P(Y=1)=\P(X=0)=\tfrac12\). Define the constant sequence \(X_n:=X\) for all \(n\).
- Hypotheses hold: \(F_{X_n}=F_X\) for every \(n\), so trivially \(F_{X_n}(x)\to F_X(x)\) everywhere, giving \(X_n\xrightarrow{d}X\). And since \(X\) and \(Y\) have the same distribution, \(F_{X_n}=F_X=F_Y\), so \(F_{X_n}(x)\to F_Y(x)\) as well, giving \(X_n\xrightarrow{d}Y\).
- Conclusion fails: \(X=Y\) would mean \(X=1-X\), i.e. \(X=\tfrac12\), which \(X\) never is. So \(\P(X=Y)=0\), not \(1\) — as far from almost-sure equality as possible.
The correct statement. The limit in distribution is unique as a distribution: if \(X_n\xrightarrow{d}X\) and \(X_n\xrightarrow{d}Y\) then \(F_X=F_Y\), so \(X\) and \(Y\) are identically distributed (Corollary 1.57). For convergence in probability the stronger conclusion does hold — if \(X_n\xrightarrow{\P}X\) and \(X_n\xrightarrow{\P}Y\), then \(\P(X=Y)=1\) — which is a clean way to see that the three modes really are different.
In words: convergence in distribution only sees the shape of the distribution, never which outcome goes with which. Two variables can have identical shapes and still disagree on every single outcome.
What earns the 3 credits: "false" (1); a pair \(X,Y\) with the same cdf and an explicit sequence satisfying both hypotheses (1); showing \(\P(X=Y)\ne1\) with numbers, plus the sentence that what is unique is the distribution (1).
iid with finite mean, no variance assumed my addition · 3 credits
Statement. Let \(X_1,X_2,\dots\) be iid random variables with finite mean \(\E[X_i]=\mu<\infty\), and let \(\bar X_n=\frac1n\sum_{i=1}^nX_i\). Then \(\bar X_n\xrightarrow{\P}\mu\), even if the variance of the \(X_i\) is infinite. True or false?
Solution
Verdict: True. (This is deliberately the mirror image of WiSe25 P1d: there the independence was missing and the answer was "false"; here everything the theorem needs is present, and the extra clause about the variance is a distractor.)
Route 1 — the strong law plus the ladder. Theorem 2.62 (slln) assumes exactly: a sequence of iid random variables with finite mean \(\E[X_i]=\mu<\infty\). No variance assumption appears in it. Its conclusion is \(\bar X_n\xrightarrow{a.s.}\mu\). Remark 2.57 then gives \(\bar X_n\xrightarrow{\P}\mu\), because almost sure convergence implies convergence in probability.
Route 2 — the weak law directly. Theorem 2.61 (wlln) assumes: identically distributed, finite mean, and pairwise uncorrelated. Our \(X_i\) are iid, hence in particular pairwise independent, hence pairwise uncorrelated by Proposition 2.12(v). So Theorem 2.61 applies directly and gives \(\bar X_n\xrightarrow{\P}\mu\) with no variance assumption either.
Where the confusion usually comes from. The script's proof sketch of Theorem 2.61 adds "if we additionally assume that the \(X_i\) have finite variance \(\sigma^2<\infty\)", because that makes the Chebyshev argument work in two lines. A hypothesis used in one convenient proof is not a hypothesis of the theorem. Read the theorem statement, not the proof sketch. (Contrast the clt, Theorem 2.64, which genuinely does require finite and non-zero variance — there the variance is in the statement, because the standardisation divides by \(\sigma\).)
In words: to make the sample mean settle down you need independence and a mean to settle down to. You need a finite variance only to say how fast (Chebyshev) or in what shape (the clt).
What earns the 3 credits: "true" (1); naming Theorem 2.62 or 2.61 with its exact assumption list (1); the sentence that no variance assumption is part of that list, plus the Remark 2.57 step if you went through the strong law (1).
Drills — estimators, mle, and what a level means (§3.1–§3.3)
A weighted average of two unbiased estimators SoSe25 · P1b · 3 credits
Statement. Let \((\Omega,\Aa,\P_\Theta)\) be a statistical model and let \(\hat\theta_1,\hat\theta_2\) be unbiased estimators of \(\theta\) in \(\P_\Theta\). Then \(\tfrac13\hat\theta_1+\tfrac23\hat\theta_2\) is an unbiased estimator of \(\theta\) as well. True or false?
Solution
Verdict: True.
The definition. An estimator [Schätzer] \(\hat\theta\) is a statistic used as a guess for \(\theta\) (Definition 3.18). It is unbiased [erwartungstreu] if \(\operatorname{bias}[\hat\theta]=\E[\hat\theta]-\theta=0\), i.e. \(\E[\hat\theta]=\theta\) for all \(\theta\in\Theta\) (Definition 3.20(i)). The expectation is taken under \(\P_\theta\), the distribution that the parameter value \(\theta\) says the data have.
One line of linearity. By Proposition 2.4(i), \(\E[aX+bY]=a\E[X]+b\E[Y]\). With \(a=\tfrac13\), \(b=\tfrac23\): \[ \E\Bigl[\tfrac13\hat\theta_1+\tfrac23\hat\theta_2\Bigr] =\tfrac13\E[\hat\theta_1]+\tfrac23\E[\hat\theta_2] =\tfrac13\theta+\tfrac23\theta =\Bigl(\tfrac13+\tfrac23\Bigr)\theta=\theta . \] So the combination is unbiased.
What makes it work — and what is not needed. The only facts used are linearity of expectation and that the two weights sum to \(1\). No independence between \(\hat\theta_1\) and \(\hat\theta_2\) is required, because linearity of expectation never requires it (Proposition 2.4(i) holds for any two variables on the same space). This matters: the same statement about the variance of the combination would be false without independence.
The general rule to carry away. Any convex combination — weights \(w_1,\dots,w_k\ge0\) with \(\sum_i w_i=1\) — of unbiased estimators is unbiased, by the same computation. Weights that do not sum to \(1\) break it: \(\tfrac13\hat\theta_1+\tfrac13\hat\theta_2\) has expectation \(\tfrac23\theta\) and bias \(-\tfrac13\theta\).
What earns the 3 credits: "true" (1); the linearity computation written out (1); the sentence that the weights sum to \(1\), and that Definition 3.20(i) is the definition being verified (1).
What does a rejection at level 5 % say? SoSe25 · P1c · 3 credits
Statement. Upon receiving a large batch of switches, you take a subsample (uniformly at random) of size \(n\). You run a suitable hypothesis test at significance level \(\alpha=0.05\) of \(H_0\): "the proportion of defective switches in the batch is at most what the manufacturer claimed" versus \(H_1\): "the proportion of defective switches is larger". The test rejects \(H_0\) at level \(\alpha=0.05\). You can therefore conclude that the probability that the entire batch conforms to the claimed proportion is at most 5 %. True or false?
Solution
Verdict: False.
What \(\alpha\) actually is. Definition 3.34(v): the significance level [Signifikanzniveau] of a test \(\varphi\) is \[ \alpha\ \ge\ \sup_{\theta\in\Theta_0}\E_\theta[\varphi] , \] where \(\Theta_0\) is the set of parameter values making \(H_0\) true and \(\E_\theta[\varphi]\) is the probability of rejecting when \(\theta\) is the true parameter. So \(\alpha\) bounds \[ \P(\text{reject}\mid H_0\text{ true}) . \] It is a property of the procedure: "if the batch conforms, this procedure raises a false alarm in at most 5 % of repeated samples".
What the statement claims instead. It claims \[ \P(H_0\text{ true}\mid\text{we rejected})\le0.05 , \] which is the reverse conditional. As SoSe25 P1a showed with numbers, \(\P(A\mid B)\) and \(\P(B\mid A)\) are different quantities, related by Bayes' rule (Theorem 1.70(iii)) through the factor \(\P(A)/\P(B)\).
Worse: in this framework the claimed quantity is not even defined. In the frequentist model of §3.3 the true parameter \(\theta\) is a fixed unknown constant, not a random variable. So "the probability that the batch conforms" has no meaning here: the batch either conforms or it does not. Attaching a probability to a hypothesis requires a prior distribution over \(\theta\) — that is the Bayesian machinery of §3.5 (Definition 3.61, Definition 3.62), which this model does not have.
The same error in another costume. Remark 3.55 warns against reading a 95 % confidence interval as "\(\mu\) lies in this interval with probability 95 %". Identical mistake: the randomness is in the interval (or in the decision), never in the parameter.
In words: the 5 % is a promise about how often the method cries wolf when there is no wolf. It is not a probability that there is no wolf.
What earns the 3 credits: "false" (1); stating what \(\alpha\) bounds, with Definition 3.34(v) (1); saying that the statement is the reverse conditional, and that \(\theta\) is not random in this model (1).
Is the mle optimal at finite \(n\)? SoSe26 · P1e · 1 credit (mark only)
Statement. Let \((\R,\mathcal B,\P_\Theta)\) be a statistical model. Let \(\hat\theta_n^{(\mathrm{mle})}\) be the maximum likelihood estimator for \(\theta\) and let \(\hat\theta_n\) be any other estimator for \(\theta\). Then, for every finite \(n\) and every \(\theta\in\Theta\), \[ \operatorname{mse}\bigl[\hat\theta_n^{(\mathrm{mle})}\bigr]\le\operatorname{mse}[\hat\theta_n] . \] True or false? (No justification was required on the exam.)
Solution
Verdict: False.
The words. The mean squared error [mittlerer quadratischer Fehler] of an estimator is \(\operatorname{mse}[\hat\theta]=\E[(\hat\theta-\theta)^2] =\Var[\hat\theta]+(\operatorname{bias}[\hat\theta])^2\) (Definition 3.20(iv), the bias–variance decomposition). The mle \(\hat\theta_{\mathrm{mle}}\) is the value of \(\theta\) maximising the likelihood \(L(\theta\mid x)\) (Definition 3.27).
Why the claim fails. Remark 3.30 lists what the mle is good at — consistency, asymptotic normality, asymptotic efficiency, invariance — and every one of these is a statement about \(n\to\infty\). The script says so directly: "in general, we cannot give many guarantees for mle for finite \(n\)", pointing at Example 3.24. There is no finite-sample optimality claim anywhere.
A concrete counterexample supplied by me; the exam needed none. Let \(X_1,\dots,X_n\) be iid \(\mathcal N(\theta,1)\). The mle is \(\hat\theta^{(\mathrm{mle})}_n=\bar X_n\) (Example 3.28), which is unbiased with variance \(\frac1n\), so \[ \operatorname{mse}[\bar X_n]=\Var[\bar X_n]+0^2=\frac1n . \] Now take the shrunken competitor \(\hat\theta_n:=\tfrac12\bar X_n\). By Proposition 2.4(i), \(\E[\hat\theta_n]=\tfrac12\theta\), so \(\operatorname{bias}=\tfrac12\theta-\theta=-\tfrac\theta2\); by Proposition 2.8(iii), \(\Var[\hat\theta_n]=\bigl(\tfrac12\bigr)^2\cdot\frac1n=\frac1{4n}\). Hence \[ \operatorname{mse}[\hat\theta_n]=\frac1{4n}+\frac{\theta^2}{4} . \] At \(\theta=0\) this is \(\frac1{4n}\), which is a quarter of the mle's \(\frac1n\). So the claim "for every finite \(n\) and every \(\theta\in\Theta\)" is refuted by a single parameter value.
Reading the quantifier. The statement is universal in three things at once — every competing estimator, every finite \(n\), every \(\theta\). One competitor at one \(\theta\) destroys it. This is also why the shrunken estimator is not a "better estimator" in any useful sense: it wins only near \(\theta=0\) and loses badly for large \(|\theta|\). The honest summary is that no estimator dominates everywhere, which is the point Example 3.24 and Example 3.25 (James–Stein) make in the script.
Does unbiased beat biased? my addition · 3 credits
Statement. If \(\hat\theta_1\) is an unbiased estimator of \(\theta\) and \(\hat\theta_2\) is a biased one, then \(\operatorname{mse}[\hat\theta_1]\le\operatorname{mse}[\hat\theta_2]\) for every \(\theta\in\Theta\). True or false?
Solution
Verdict: False.
The decomposition that settles it. Definition 3.20(iv): \[ \operatorname{mse}[\hat\theta]=\Var[\hat\theta]+\bigl(\operatorname{bias}[\hat\theta]\bigr)^2 . \] Being unbiased zeroes the second term only. It says nothing at all about the first, so a biased estimator with a much smaller variance can have the smaller mse.
Counterexample with numbers. Let \(X_1,\dots,X_n\) be iid \(\mathcal N(\theta,1)\) with \(\Theta=\R\), and take \[ \hat\theta_1=\bar X_n \quad\text{(unbiased)},\qquad \hat\theta_2=\tfrac12\bar X_n\quad\text{(biased)} . \] Hypothesis holds: \(\E[\bar X_n]=\theta\) by Proposition 2.4(i), so \(\hat\theta_1\) is unbiased; \(\E[\hat\theta_2]=\tfrac\theta2\ne\theta\) for \(\theta\ne0\), so \(\hat\theta_2\) is biased. Now the two mse's. \(\Var[\bar X_n]=\frac1n\) (constants come out squared, Proposition 2.8(iii), and independent variances add, Proposition 2.8(iv): \(\frac1{n^2}\cdot n\cdot1=\frac1n\)). So \[ \operatorname{mse}[\hat\theta_1]=\frac1n+0=\frac1n,\qquad \operatorname{mse}[\hat\theta_2]=\frac{1}{4n}+\frac{\theta^2}{4} . \] Conclusion fails whenever \(\frac1{4n}+\frac{\theta^2}4<\frac1n\), i.e. \(\frac{\theta^2}{4}<\frac{3}{4n}\), i.e. \(\theta^2<\frac3n\). For instance at \(\theta=0\): \(\operatorname{mse}[\hat\theta_2]=\frac1{4n}<\frac1n=\operatorname{mse}[\hat\theta_1]\).
Reading the quantifier. The claim says "for every \(\theta\)", so one parameter value is enough to refute it. And that is the honest picture: for \(|\theta|>\sqrt{3/n}\) the unbiased estimator wins again. Neither dominates.
In words: unbiasedness is one of two ingredients of the mse, not a guarantee about the mse. Trading a little bias for a lot less variance can be a good deal — this is the whole content of the bias–variance decomposition, and it is why Definition 3.20(iv) is stated as a sum of two terms.
What earns the 3 credits: "false" (1); the bias–variance decomposition quoted as the reason a biased estimator can win (1); an explicit pair with both mse's computed and a \(\theta\) where the inequality reverses (1).
The mle of a transformed parameter my addition · 2 credits
Statement. Let \(\hat\theta_{\mathrm{mle}}\) be the maximum likelihood estimator of \(\theta\) and let \(g\) be a function that does not reduce the dimension of the parameter space. Then \(g(\hat\theta_{\mathrm{mle}})\) is the maximum likelihood estimator of \(g(\theta)\). True or false?
Solution
Verdict: True. This is the invariance [Invarianz] property of the mle, Remark 3.30(iv), stated in the script in exactly this form, with the example that for a normal distribution the mle of the standard deviation \(\sigma\) is \(\sqrt{\hat\sigma^2_{\mathrm{mle}}}\).
Why it is plausible, in one sentence. For an invertible \(g\), maximising the likelihood over \(\theta\) and then applying \(g\), or re-parametrising by \(\eta=g(\theta)\) and maximising over \(\eta\), search the same set of candidate distributions in a different labelling — and a maximum does not care what you call the point where it sits. Formally: if \(L(\theta\mid x)\le L(\hat\theta\mid x)\) for all \(\theta\), then writing \(\tilde L(\eta\mid x):=L(g^{-1}(\eta)\mid x)\) gives \(\tilde L(\eta\mid x)\le\tilde L(g(\hat\theta)\mid x)\) for all \(\eta\), so \(g(\hat\theta)\) maximises the re-parametrised likelihood.
Why the proviso is there. If \(g\) is not injective — say \(\Theta=\R\) and \(g(\theta)=\theta^2\), which sends \(\pm2\) to the same value — several \(\theta\) share one \(g(\theta)\) and the re-parametrisation is no longer a relabelling. The script covers this by the parenthetical "provided \(g\) does not reduce the dimensionality of \(\Theta\)"; the standard fix in the literature is to define the likelihood of \(\eta\) as the largest likelihood over all \(\theta\) with \(g(\theta)=\eta\), under which invariance holds in general. On an exam, quote Remark 3.30(iv) as printed and note the proviso.
Where you would use it. SoSe26 P5b is invariance in action, run backwards: the mle of the Bernoulli parameter \(q\) is \(\hat q=\bar Y_n\), and since \(q(p)=rp+\frac{1-r}2\) is an invertible affine map for \(r\ne0\), the mle of \(p\) is obtained by inverting it, \(\hat p=\frac{\bar Y_n-(1-r)/2}{r}\), rather than by differentiating a likelihood in \(p\).
What earns the 2 credits: "true" (1); naming Remark 3.30(iv) and stating the proviso on \(g\) (1).
Drill bank summary — 29 items
Past exam items, all of them: WiSe25 P1a–d (4 × 3 cr); SoSe25 P1a–d (4 × 3 cr); SoSe26 P1a–e (5 × 1 cr, mark only); SoSe26 P2a–d (4 × 3 cr). That is 17 items, 41 credits — every true/false credit ever set on the three papers. My additions: 12 more, chipped my addition, weighted towards the heavy topics of the ranking (§2.1 three items, §2.4 two, §3.2 two, §2.2 two, §1.4 two, §1.1 one).
A timing target. On the justified format you have roughly two minutes per item (12 credits out of 59 in 120 minutes is about 24 minutes for four items). Practise to that clock: verdict word in ten seconds, named result or counterexample in the next ninety, both halves checked in the last twenty.
Problem 2 — state a definition or theorem exactly
Somewhere on every one of the three papers there is a block of pure recall: write down a named result, with all its assumptions, in the script's own notation. No computation, no example, no application — the credits are for reproducing a statement correctly. It is the cheapest block on the paper if you have prepared it and the most annoying if you have not, because there is nothing to derive your way out of.
| WiSe 25/26 | SoSe 2025 | SoSe 2026 | |
|---|---|---|---|
| where | Problem 2, titled "Definitions" | Problem 2, titled "Definitions" | Problem 3a, inside the problem titled "Jensen's inequality" |
| credits | 6 (3 + 3) | 6 (3 + 3) | 3 (of the problem's 5) |
| (a) | state the strong law of large numbers with all required assumptions (Theorem 2.62) | state the central limit theorem with all required assumptions (Theorem 2.64) | state Jensen's inequality with all required assumptions (Theorem 2.42) |
| (b) | the full definition, including the set-up, of the type of convergence in the slln — almost sure convergence (Definition 2.56(ii)) | the full general definition of the type of convergence in the clt — convergence in distribution (Definition 2.56(iii)) | — (P3b is an application, not recall) |
In the two papers where this block is a problem of its own it has exactly the same shape: (a) a limit theorem, (b) the mode of convergence that theorem uses. SoSe 2026 kept the recall but moved it inside a topic problem and dropped the paired convergence definition. Across all three papers, recall is worth 15 credits.
What "with all assumptions" means, and how assumptions are marked
SoSe 2026 P3a is the only recall item on the three papers whose marking scheme is printed, and it is itemised per assumption:
The printed scheme for SoSe26 P3a SoSe26 · P3a · 3 credits
"1 point for \(X\) with finite expectation; 1 point for \(g:\R\to\R\) convex; 1 point for the correct inequality. The parenthetical additions are not graded."
Read that literally. Two of the three credits are for the two hypotheses. Only one is for the conclusion. A student who writes "\(\E[g(X)]\ge g(\E[X])\)" and nothing else collects one credit out of three, even though the formula is right.
So a full-credit recall answer has four parts, in this order.
- Set the stage. Say what objects exist and where they live. "Let \(X_1,X_2,\dots\) be a sequence of iid real random variables"; "Let \((X_n)_{n\in\N}\) be a sequence of random variables and let \(X\) be another random variable, all defined on the same probability space \((\Omega,\Aa,\P)\)". The official solutions to WiSe25 P2b and SoSe25 P2b both open with that sentence, and the question asks for "the full definition including the set-up/assumptions".
- List every finiteness and regularity assumption separately, on its own line. Finite mean. Finite and non-zero variance. \(g\) convex, from \(\R\) to \(\R\). Independence, and whether it is full independence or only pairwise uncorrelatedness. One line per assumption, because that is how they are counted.
- State the conclusion in the script's own notation, and name the mode of convergence on the arrow: \(\xrightarrow{a.s.}\), \(\xrightarrow{\P}\), \(\xrightarrow{d}\).
- For a mode of convergence, include the exceptional-set clause. It is the part people drop and it is exactly what is being tested: "\(\P(\{\omega\in\Omega\mid\lim_{n\to\infty}X_n(\omega)=X(\omega)\})=1\)" for almost sure convergence (Definition 2.56(ii)), and "for every \(x\in\R\) at which \(F_X\) is continuous" for convergence in distribution (Definition 2.56(iii)).
Two traps this block has actually set
1. Do not add unasked extras. SoSe26 P3a's scheme says "the parenthetical additions are not graded" — the equality case and the concave version earned nothing. They cost nothing either, unless you get one of them wrong, in which case you have handed the corrector a mistake for free. Write what was asked.
2. Do not rely on the SoSe25 leniency. The official solution to SoSe25 P2a accepts four versions of the clt and then admits in a printed bracket: "[We'll count all of these as correct even though the ones for \(S_n\) and \(\bar X_n\) are mathematically incorrect.]" The two wrong ones are \(S_n\xrightarrow{d}\mathcal N(n\mu,n\sigma^2)\) and \(\bar X_n\xrightarrow{d}\mathcal N(\mu,\frac{\sigma^2}{n})\): a limit law cannot depend on \(n\), because the limit is what is left after \(n\) has gone to infinity. That was leniency by one corrector on one paper. Write the standardised version, \(Z_n=\frac{S_n-n\mu}{\sigma\sqrt n}\xrightarrow{d}\mathcal N(0,1)\), which is correct and is what Theorem 2.64 says.
The drills below are prompts. Cover the solution, write the full statement on paper as you would in the exam, then compare word by word with the model answer — which uses the script's numbering and wording. Three of them have been asked; the rest are results of the same kind and weight that a paper could ask for in the same slot.
State it — the limit theorems (§2.4)
State the strong law of large numbers with all required assumptions WiSe25 · P2a · 3 credits
Model answer
Assumptions (Theorem 2.62):
- \(X_1,X_2,\dots\) is a sequence of iid random variables (independent and identically distributed, Definition 1.79);
- with finite mean \(\E[X_i]=\mu<\infty\).
Notation. \(\bar X_n:=\frac1n\sum_{i=1}^nX_i\) is the sample mean.
Conclusion. \[ \bar X_n\xrightarrow{a.s.}\mu . \]
In words: for iid observations with a finite mean, the sample average converges to the true mean for almost every possible infinite sequence of outcomes.
Marking anatomy (by analogy with the SoSe26 P3a scheme): one credit for "iid", one for "finite mean", one for the conclusion with the \(a.s.\) arrow named. Writing \(\xrightarrow{\P}\) instead of \(\xrightarrow{a.s.}\) turns the strong law into the weak law and loses the third credit. There is no variance assumption — adding "finite variance" is an unasked extra that is also wrong as a description of the theorem.
State the weak law of large numbers with all required assumptions my addition · 3 credits
Model answer
Assumptions (Theorem 2.61):
- \(X_1,X_2,\dots\) is a sequence of identically distributed random variables (Definition 1.54) — note: not "iid";
- with finite mean \(\E[X_i]=\mu<\infty\);
- that are pairwise uncorrelated, i.e. \(\Cov[X_i,X_j]=0\) for all \(i\ne j\).
Conclusion. With \(\bar X_n:=\frac1n\sum_{i=1}^nX_i\), \[ \bar X_n\xrightarrow{\P}\mu . \]
In words: for identically distributed, pairwise uncorrelated observations with a finite mean, the probability that the sample average is further than any fixed \(\epsilon\) from the true mean tends to \(0\).
Why this one is worth preparing even though it has never been asked directly: its assumption list is precisely the content of WiSe25 P1d (3 credits), and Remark 2.63 compares it with the slln. The differences to memorise: the slln needs full iid and delivers the stronger \(a.s.\) mode; the wlln needs only pairwise uncorrelated and delivers the weaker \(\P\) mode. Neither needs a finite variance — that assumption appears only in the script's proof sketch of Theorem 2.61, not in its statement.
State the central limit theorem with all required assumptions SoSe25 · P2a · 3 credits
Model answer
Assumptions (Theorem 2.64):
- \(X_1,X_2,\dots\) is a sequence of iid random variables;
- with finite mean \(\E[X_i]=\mu\);
- and finite, non-zero variance \(\Var[X_i]=\sigma^2\in\R_{>0}\).
Notation. \(S_n:=\sum_{i=1}^nX_i\) is the sum and \(\bar X_n=S_n/n\) the sample mean. Consider the standardised sum \[ Z_n=\frac{S_n-\E[S_n]}{\sqrt{\Var[S_n]}}=\frac{S_n-n\mu}{\sigma\sqrt n}=\frac{\bar X_n-\mu}{\sigma/\sqrt n} . \] (The three expressions are the same number: \(\E[S_n]=n\mu\) by linearity, Proposition 2.4(i), and \(\Var[S_n]=n\sigma^2\) by independence, Proposition 2.8(iv), so \(\sqrt{\Var[S_n]}=\sigma\sqrt n\); dividing numerator and denominator of the middle expression by \(n\) gives the right-hand one.)
Conclusion. \[ Z_n\xrightarrow{d}\mathcal N(0,1) . \]
In words: however the individual \(X_i\) are distributed, once you centre the sum at its mean and divide by its standard deviation, the resulting quantity looks more and more like a standard normal.
The non-zero variance matters because the standardisation divides by \(\sigma\): with \(\sigma=0\) every \(X_i\) is the constant \(\mu\) (Proposition 2.8(i)) and \(Z_n\) is not defined. That is why the script writes \(\sigma^2\in\R_{>0}\) and not merely \(\sigma^2<\infty\).
Write the standardised version. See the warning box above: the official SoSe25 solution also accepted \(S_n\xrightarrow{d}\mathcal N(n\mu,n\sigma^2)\) and \(\bar X_n\xrightarrow{d}\mathcal N(\mu,\sigma^2/n)\) while admitting in print that both are mathematically incorrect, because a limit cannot depend on \(n\). A fourth accepted version is correct: \(\sqrt n(\bar X_n-\mu)\xrightarrow{d}\mathcal N(0,\sigma^2)\).
State it — the modes of convergence (§2.4)
Give the full definition, including the set-up, of almost sure convergence WiSe25 · P2b · 3 credits
Model answer
Set-up (Definition 2.56): let \((X_n)_{n\in\N}\) be a sequence of random variables and let \(X\) be another random variable (which may also be a constant), all defined on the same probability space \((\Omega,\Aa,\P)\).
Definition (ii). The sequence \((X_n)_{n\in\N}\) converges almost surely [fast sicher] to \(X\), written \(X_n\xrightarrow{a.s.}X\) or \(X_n\to X\) a.s., if \[ \P\Bigl(\bigl\{\omega\in\Omega \;\bigm|\; \lim_{n\to\infty}X_n(\omega)=X(\omega)\bigr\}\Bigr)=1 . \]
In words: collect all the outcomes \(\omega\) for which the ordinary sequence of numbers \(X_1(\omega),X_2(\omega),\dots\) converges to the number \(X(\omega)\). Almost sure convergence says that this set of outcomes has probability \(1\) — the sequence converges pointwise except possibly on a set we never see.
The two things that are marked and are easy to drop. (1) The common probability space: the definition compares \(X_n(\omega)\) with \(X(\omega)\) at the same \(\omega\), so both must be functions on the same \(\Omega\). (2) The exceptional-set clause, i.e. the probability of the convergence set being \(1\) rather than the convergence happening for every \(\omega\). Writing "\(\lim_{n\to\infty}X_n=X\)" without the \(\P(\cdot)=1\) wrapper is not this definition.
Give the full general definition of convergence in distribution SoSe25 · P2b · 3 credits
Model answer
Set-up (Definition 2.56): let \((X_n)_{n\in\N}\) be a sequence of random variables and let \(X\) be another random variable.
Definition (iii). \((X_n)_{n\in\N}\) converges in distribution (or converges weakly) [in Verteilung] to \(X\), written \(X_n\xrightarrow{d}X\) or \(X_n\Rightarrow X\), if \[ \lim_{n\to\infty}F_{X_n}(x)=F_X(x) \] for every \(x\in\R\) at which \(F_X\) is continuous. Here \(F_Z(x)=\P(Z\le x)\) is the cdf of \(Z\) (Definition 1.56). Equivalently (also Definition 2.56(iii)): \(\lim_{n\to\infty}\phi_{X_n}(t)=\phi_X(t)\) for all \(t\in\R\), where \(\phi\) is the characteristic function of Definition 2.46.
In words: the shape of the distribution of \(X_n\) settles down to the shape of the distribution of \(X\). Nothing is claimed about the individual outcomes.
The continuity clause is the marked part. Without it the definition would be wrong. Example: \(X_n:=\frac1n\) (a constant) and \(X:=0\). Then \(F_{X_n}(0)=\P(\frac1n\le0)=0\) for every \(n\), while \(F_X(0)=\P(0\le0)=1\), so the cdfs do not converge at \(x=0\) — and \(x=0\) is exactly where \(F_X\) jumps, hence is not a continuity point. Everywhere else they do converge, so \(X_n\xrightarrow{d}0\) as it should.
Where the official solution goes slightly beyond the question. The published SoSe25 P2b answer demands that \((X_n)\) and \(X\) live on the same probability space. Convergence in distribution does not need that — it is a statement about cdfs only, and the variables may be defined on completely different spaces. The script's Definition 2.56 does set up all three modes on a common space at once, so quoting it that way is safe; it is just not a requirement of this particular mode, and the question asked for the "full general definition". Say the clause if you are quoting Definition 2.56's set-up, but know that it is not what makes this mode work.
Give the full definition of convergence in probability my addition · 3 credits
Model answer
Set-up (Definition 2.56): let \((X_n)_{n\in\N}\) be a sequence of random variables and let \(X\) be another random variable (possibly a constant), all defined on the same probability space \((\Omega,\Aa,\P)\).
Definition (i). \((X_n)_{n\in\N}\) converges in probability [in Wahrscheinlichkeit] to \(X\), written \(X_n\xrightarrow{\P}X\), if for every \(\epsilon>0\) \[ \lim_{n\to\infty}\P\bigl(|X_n-X|\ge\epsilon\bigr)=0 . \]
In words: for large \(n\) it is very unlikely that \(X_n\) is far from \(X\). "Far" is measured by a tolerance \(\epsilon\) that you are allowed to choose as small as you like, and the probability of exceeding it must vanish for each such choice.
The two marked details. (1) The quantifier "for every \(\epsilon>0\)" comes before the limit — a single \(\epsilon\) is not enough. (2) The probability is of the event \(\{|X_n-X|\ge\epsilon\}\), which requires \(X_n\) and \(X\) on a common space so that the difference is a random variable at all. This is the mode that appears in the wlln (Theorem 2.61) and in the definition of a consistent estimator (Definition 3.20(ii)).
State the relations between the three modes of convergence my addition · 3 credits
Model answer
Remark 2.57. For random variables \((X_n)_{n\in\N}\) and \(X\) on a common probability space, \[ X_n\xrightarrow{a.s.}X \;\Longrightarrow\; X_n\xrightarrow{\P}X \;\Longrightarrow\; X_n\xrightarrow{d}X . \] In words: almost sure convergence implies convergence in probability implies convergence in distribution.
The three things Remark 2.57 adds, which are the examinable part.
- The opposite implications generally do not hold. Example 2.58 (the "travelling bump" on \([0,1]\)) converges in probability but not almost surely; Example 2.59 (\(U\sim\Ber(0.5)\), \(X_n:=U\), \(X:=1-U\)) converges in distribution but not in probability.
- A subsequence survives: whenever \(X_n\xrightarrow{\P}X\), there exists a subsequence of \((X_n)\) that converges to \(X\) almost surely.
- Constant limits are special: if \(X_n\xrightarrow{d}c\) for some \(c\in\R\), then also \(X_n\xrightarrow{\P}c\). So for a constant limit the two modes coincide. This is the fact behind SoSe26 P1d.
Why this is worth having on the A4 sheet: a convergence-mode question appears in all three papers (WiSe25 P1d and P2b; SoSe25 P2b; SoSe26 P1d and P2a), and the ladder plus its two exceptions answers most of them in one line.
State it — the three inequalities (§2.2)
State Jensen's inequality with all required assumptions SoSe26 · P3a · 3 credits
Model answer
Assumptions (Theorem 2.42):
- Let \(X\) be a random variable such that \(\E[X]\) is finite.
- Let \(g:\R\to\R\) be a convex function — that is, for all \(x_1,x_2\in\R\) and \(t\in[0,1]\), \(g(tx_1+(1-t)x_2)\le t\,g(x_1)+(1-t)\,g(x_2)\).
Conclusion. \[ \E[g(X)]\ge g(\E[X]) . \]
In words: for a convex function, applying the function and then averaging gives at least as much as averaging and then applying the function.
The printed marking scheme: "1 point for \(X\) with finite expectation; 1 point for \(g:\R\to\R\) convex; 1 point for the correct inequality." Two credits out of three are for the two hypotheses — write them as two separate lines.
What the script adds and the scheme explicitly does not grade: if \(g\) is strictly convex, equality holds if and only if \(X=\E[X]\) with probability \(1\) (i.e. \(X\) is constant); if \(g\) is concave, the inequality reverses to \(\E[g(X)]\le g(\E[X])\). The published scheme says "the parenthetical additions are not graded", so these earn nothing — include them only if you are certain of them.
Getting the direction right under pressure. Test with \(g(x)=x^2\), which is convex: Jensen gives \(\E[X^2]\ge(\E[X])^2\), which is true because the difference is \(\Var[X]\ge0\) (Remark 2.6 and Proposition 2.8(i)). If your version of the inequality contradicts that, you have written it backwards.
State Markov's inequality with all required assumptions my addition · 3 credits
Model answer
The script's general form (Theorem 2.38). Let \((\Omega,\Aa,\P)\) be a probability space, let \(X:\Omega\to\R\) be a random variable, and let \(f:S_X\to\R_{\ge0}\) be monotonically increasing, where \(S_X=\operatorname{im}(X)=X(\Omega)\subseteq\R\) is the set of values \(X\) can take. Then for each \(\epsilon\in\R\) with \(f(\epsilon)>0\), \[ \P(X\ge\epsilon)\le\frac{1}{f(\epsilon)}\,\E[f(X)] . \]
The special case everyone uses, which the script states immediately after: let \(X\) be a non-negative random variable, i.e. \(\P(X\ge0)=1\). Then for any constant \(\epsilon>0\), \[ \P(X\ge\epsilon)\le\frac{\E[X]}{\epsilon} . \]
In words: a non-negative quantity cannot be far above its mean very often, because the rare large values already have to be paid for inside the average.
Assumptions worth one credit each: \(X\) non-negative (or, in the general form, \(f\) monotonically increasing into \(\R_{\ge0}\)); \(\epsilon>0\) (or \(f(\epsilon)>0\)); the expectation exists. Dropping non-negativity makes the statement false — see the drill "Markov without non-negativity" above, where the bound goes negative.
Where it has been used: SoSe26 P4d (3 credits), where the event \(\{|Z_n|\ge a\}\) is first rewritten as \(\{Z_n^2\ge a^2\}\) so that a non-negative variable is being bounded, giving \(\P(|Z_n|\ge a)\le\E[Z_n^2]/a^2\).
State Chebyshev's inequality with all required assumptions my addition · 3 credits
Model answer
Assumptions (Theorem 2.40): let \(X\) be a random variable with finite mean \(\E[X]\) and finite variance \(\Var[X]>0\). Let \(\epsilon>0\).
Conclusion. \[ \P\bigl(|X-\E[X]|\ge\epsilon\bigr)\le\frac{\Var[X]}{\epsilon^2} . \]
In words: the probability of being at least \(\epsilon\) away from the mean is at most the variance divided by \(\epsilon^2\). Doubling the tolerance quarters the bound.
How it follows from Markov (the script's proof, worth knowing because it shows what the assumptions are for): put \(f(x)=x^2\) in Theorem 2.38 to get \(\P(|X|\ge\epsilon)\le\epsilon^{-2}\E[X^2]\), then substitute \(Y:=X-\E[X]\), so that \(\P(|X-\E[X]|\ge\epsilon)\le\epsilon^{-2}\E[(X-\E[X])^2]=\epsilon^{-2}\Var[X]\), the last equality being Definition 2.5.
Compared with Markov: Chebyshev needs more information (both mean and variance) and in exchange gives a bound that decays like \(1/\epsilon^2\) rather than \(1/\epsilon\), so it is usually tighter. This comparison is itself a credit — WiSe25 P4d is one whole credit for saying that Chebyshev is a valid but loose guarantee while the clt is only approximate but far sharper.
Where it has been used: WiSe25 P4b (3 credits) and SoSe25 P5c (4 credits). The second one shows the standard rearrangement: "\(X\) lies in \([\E[X]\pm k]\) with probability at least 90 %" becomes \(\P(|X-\E[X]|>k)\le0.1\), and then \(\Var[X]/k^2=0.1\) is solved for \(k\).
State it — definitions from Chapters 1 and 2
Define a σ-algebra my addition · 3 credits
Model answer
Definition 1.6. Let \(\Omega\) be a set and \(\pow(\Omega)\) its power set (the collection of all subsets of \(\Omega\)). We call \(\Aa\subseteq\pow(\Omega)\) a σ-algebra on \(\Omega\) if
- \(\Omega\in\Aa\);
- for each \(A\in\Aa\) we have \(A^c\in\Aa\) (closure under complements, where \(A^c=\Omega\setminus A\));
- for each sequence \((A_i)_{i\in\N}\) in \(\Aa\) we have \(\bigcup_{i\in\N}A_i\in\Aa\) (closure under countable unions).
In words: a σ-algebra is a list of the subsets we are allowed to assign a probability to, and the list must be closed under the operations "not" and "at least one of countably many".
Immediate consequences worth one line (Corollary 1.10): \(\emptyset=\Omega^c\in\Aa\), and \(\Aa\) is also closed under countable intersections, differences and symmetric differences — these follow from (i)–(iii) via de Morgan's laws (Lemma 1.3).
Why this one is on the list: σ-algebra axioms have carried 6 credits of true/false material (WiSe25 P1a, SoSe26 P2b), and both marking notes reward naming the failing axiom by number. You cannot name a numbered axiom you have not memorised in numbered form.
State the law of total probability and Bayes' rule my addition · 3 credits
Model answer
Prerequisite definition (Definition 1.69): for events \(A,B\in\Aa\) with \(\P(B)>0\), the conditional probability [bedingte Wahrscheinlichkeit] of \(A\) given \(B\) is \(\P(A\mid B)=\frac{\P(A\cap B)}{\P(B)}\).
Theorem 1.70(ii) — law of total probability. Let \(B\in\Aa\) with \(\P(B)>0\), let \(I\) be a countable index set, and let \(\{B_i\mid i\in I\}\subseteq\Aa\) be a measurable partition of \(B\), i.e. \(\bigcup_{i\in I}B_i=B\) and \(B_i\cap B_j=\emptyset\) for all \(i\ne j\). Then for all \(A\in\Aa\), \[ \P(A\cap B)=\sum_{i\in I}\P(A\mid B_i)\,\P(B_i) . \] (Taking \(B=\Omega\) gives the familiar form \(\P(A)=\sum_i\P(A\mid B_i)\P(B_i)\).)
Theorem 1.70(iii) — Bayes' rule. For each \(A\in\Aa\) with \(\P(A)>0\) and every measurable partition \(\{B_i\mid i\in I\}\) of \(\Omega\) with \(\P(B_i)>0\) for all \(i\), \[ \P(B_i\mid A)=\frac{\P(A\mid B_i)\,\P(B_i)}{\sum_{j\in I}\P(A\mid B_j)\,\P(B_j)}\qquad\text{for all }i\in I . \]
In words: total probability says "split the world into cases, price the event inside each case, and weight by how likely each case is". Bayes says "to reverse a conditional, multiply by the prior and divide by the total probability you just computed".
The assumptions that are marked: the \(B_i\) must be disjoint and must cover; every conditioning event must have strictly positive probability, otherwise Definition 1.69 does not apply.
Where it has been used: WiSe25 P6a and P6b (6 credits), SoSe26 P5a (3 credits).
State the inclusion–exclusion principle my addition · 3 credits
Model answer
Theorem 1.22. Let \((\Omega,\Aa,\P)\) be a probability space and let \(A_1,\dots,A_n\in\Aa\) be any finite collection of events, \(n\in\N_{>0}\). Then \[ \P\Bigl(\bigcup_{i=1}^nA_i\Bigr)=\sum_{k=1}^n(-1)^{k-1}\!\!\sum_{1\le i_1<\dots<i_k\le n}\!\! \P\bigl(A_{i_1}\cap\dots\cap A_{i_k}\bigr) . \]
Unpacking the double sum. The outer sum runs over the size \(k\) of the intersections; the inner sum runs over all choices of \(k\) distinct indices in increasing order. The sign \((-1)^{k-1}\) is \(+\) for odd \(k\) and \(-\) for even \(k\). For \(n=3\) it reads \[ \P(A_1\cup A_2\cup A_3)=\P(A_1)+\P(A_2)+\P(A_3)-\P(A_1\cap A_2)-\P(A_1\cap A_3)-\P(A_2\cap A_3)+\P(A_1\cap A_2\cap A_3). \]
In words: add the single probabilities, subtract the overlaps you double-counted, add back the triple overlaps you over-subtracted, and so on with alternating signs.
No assumptions beyond measurability. There is no independence assumption — that is exactly why the formula is needed when the events overlap in a structured way.
Where it has been used: WiSe25 P6c (4 credits), the only appearance in the three papers.
Two typesetting slips in that official solution. It writes "\(\P(E_{13}\cup E_{14}\cup E_{14})\)", where the last term should be \(E_{24}\); and the bracket opened after the minus sign closes only after the triple-intersection term, so as printed the triple term is subtracted instead of added. The following line has the signs right and the final answer \(p(2q+p-2pq)\) is correct, but do not copy the typeset line.
Define independence of random variables my addition · 3 credits
Model answer
Definition 1.77. There are three equivalent-in-practice formulations; give the one matching the kind of variables in the question.
- General (via cdfs). A family \((X_i)_{i\in I}\) of real-valued random variables is independent if for each finite subset \(J\subseteq I\) and all \(x_j\in\R\) (\(j\in J\)), \[ \P\Bigl(\bigcap_{j\in J}\{X_j\le x_j\}\Bigr)=\prod_{j\in J}\P(X_j\le x_j) . \] For \(I=[n]\) this is equivalent to the cdf factorising: \(F_{(X_1,\dots,X_n)}(x_1,\dots,x_n)=\prod_{i\in[n]}F_{X_i}(x_i)\) for all \(x\in\R^n\).
- Discrete (via pmfs). \(X_1,\dots,X_n\) taking values in discrete sets are independent if the pmf factorises: \(p_{(X_1,\dots,X_n)}(s)=\prod_{i\in[n]}p_{X_i}(s_i)\) for all \(s\in\prod_{i\in[n]}\Omega_i\).
- Continuous (via pdfs). For a continuous random vector, \(X_1,\dots,X_n\) are independent if the pdf factorises: \(p_X(x)=\prod_{i\in[n]}p_{X_i}(x_i)\) for Lebesgue-almost all \(x\in\R^n\) (i.e. everywhere except on a set of Lebesgue measure zero).
The clause that is easy to drop: "for each finite subset \(J\)". Independence of an infinite family is defined through its finite sub-families, never through an infinite product.
And the related definition (Definition 1.79): a sequence or collection of random variables is iid [uiv, unabhängig und identisch verteilt] if it is independent and all members have the same distribution. Both halves are needed, and forgetting that "\(X_1,X_2,\dots\sim\Poi(2)\)" gives only the second half is exactly the trap of WiSe25 P1d.
State the law of total expectation and the law of total variance my addition · 3 credits
Model answer
Prerequisite (Definition 2.30): \(\E[Y\mid X]\) is the random variable \(h(X)\), where \(h(x)=\E[Y\mid X=x]\) is the conditional expectation of Definition 2.28. Similarly \(\Var[Y\mid X]\) is the random variable built from \(\Var[Y\mid X=x]\) (Definition 2.34).
Theorem 2.32 — law of total expectation (also: tower property, iterated expectation). For any two random variables \(X\) and \(Y\), assuming the relevant expectations exist, \[ \E[Y]=\E\bigl[\E[Y\mid X]\bigr] . \]
Theorem 2.35 — law of total variance. For any two random variables \(X\) and \(Y\), assuming the relevant expectations and variances exist, \[ \Var[Y]=\E\bigl[\Var[Y\mid X]\bigr]+\Var\bigl[\E[Y\mid X]\bigr] . \] The script's own restatement: "the total variance is the expected conditional variance plus the variance of the conditional expectation".
In words: to get the overall mean, average the group means. To get the overall spread, add the average within-group spread to the spread between the group means.
The assumption to state: existence of the relevant expectations and variances — that is all the script asks for. No independence, no finiteness of anything else.
Where it has been used: WiSe25 P1b (3 credits) is Theorem 2.35 plus the single observation that a variance is non-negative.
Define the characteristic function and state its main properties my addition · 3 credits
Model answer
Definition 2.46. Let \(X\) be a random variable. Its characteristic function (cf), denoted \(\phi_X(t)\), is \[ \phi_X(t)=\E\bigl[e^{itX}\bigr]=\E\bigl[\cos(tX)+i\sin(tX)\bigr],\qquad t\in\R, \] where \(i=\sqrt{-1}\). For discrete \(X\) with pmf \(p_X\): \(\phi_X(t)=\sum_xe^{itx}p_X(x)\); for continuous \(X\) with pdf \(p_X\): \(\phi_X(t)=\int_{-\infty}^{\infty}e^{itx}p_X(x)\,dx\).
No assumptions are needed. The script notes that the cf always exists, for every random variable and every \(t\), because \(|e^{itX}|=\sqrt{\cos^2(tX)+\sin^2(tX)}=1\), so the expectation is of a bounded function. That is worth saying: it is the one place in the course where a transform needs no integrability hypothesis at all.
Properties (Remark 2.47), the examinable ones:
- \(\phi_X(0)=1\) and \(|\phi_X(t)|\le1\);
- affine scaling: \(\phi_{aX+b}(t)=e^{itb}\phi_X(at)\);
- moments from derivatives: \(\E[X^n]=i^{-n}\phi_X^{(n)}(0)\), if the moments exist;
- independence: if \(X\perp\!\!\!\perp Y\), then \(\phi_{X+Y}(t)=\phi_X(t)\phi_Y(t)\);
- uniqueness: the cf determines the distribution;
- Lévy's continuity theorem: \(X_n\xrightarrow{d}X\) if and only if \(\phi_{X_n}(t)\to\phi_X(t)\) pointwise for all \(t\) and \(\phi_X\) is continuous at \(t=0\).
Where they have been used: SoSe26 P1c (1 credit, properties (ii) and (iv)), P4a (1 credit, the definition plus Euler's formula), P4b (3 credits, (ii) and (iv) combined into \(\phi_{Z_n}(t)=\phi_{X_1}(t/\sqrt n)^n\)), P4c (2 credits, property (iii) as an accepted alternative route to mean and variance).
State the change-of-variables formula for densities my addition · 3 credits
Model answer
Proposition 2.51. Assumptions:
- \(X\) is a continuous random variable with density \(p_X\);
- \(g:\R\to\R\) is continuously differentiable and strictly monotonic on the support \(S_X:=\{x\in\R\mid p_X(x)>0\}\) of \(X\);
- \(Y:=g(X)\).
Conclusion. The pdf of \(Y\) is \[ p_Y(y)=p_X\bigl(g^{-1}(y)\bigr)\,\Bigl|\tfrac{d}{dy}g^{-1}(y)\Bigr|\qquad\text{for }y\in g(S_X), \] and \(p_Y(y)=0\) for \(y\notin g(S_X)\).
In words: to find the density of a transformed variable, evaluate the old density at the point that \(g\) came from, and multiply by how much \(g^{-1}\) stretches or compresses the axis there. The absolute value is there because a density can never be negative, even when \(g\) is decreasing.
The two assumptions that are the whole content: strict monotonicity (so that \(g^{-1}\) exists on the relevant range) and continuous differentiability (so that the derivative of \(g^{-1}\) exists and is continuous). Without monotonicity the formula needs a sum over all pre-images.
The support clause is separately worth credit. WiSe25 P3a prints "Be sure to correctly specify the support of \(X\)", and the statement "\(p_Y(y)=0\) off \(g(S_X)\)" is part of the answer, not an afterthought.
Where it has been used: SoSe25 P3d (3 credits) — where the exam supplied the formula as a hint, which tells you the examiner does not regard it as recall — and WiSe25 P3a (4 credits), where the cdf route was used instead.
State it — definitions from Chapter 3
Define bias, variance and mean squared error of an estimator my addition · 3 credits
Model answer
Set-up (Definition 3.18): an estimator \(\hat\theta\) for a parameter \(\theta\) is a statistic — a function of the sample \(X=(X_1,\dots,X_n)\) alone — used as a guess for \(\theta\). All expectations below are under \(\P_\theta\).
Definition 3.20.
- (i) Bias. \(\operatorname{bias}[\hat\theta]=\E[\hat\theta]-\theta\). The estimator is unbiased if \(\operatorname{bias}[\hat\theta]=0\), i.e. \(\E[\hat\theta]=\theta\) for all \(\theta\in\Theta\).
- (ii) Consistency. \(\hat\theta_n\) is consistent if \(\hat\theta_n\xrightarrow{\P}\theta\), and strongly consistent if \(\hat\theta_n\xrightarrow{a.s.}\theta\).
- (iii) Variance. \(\Var[\hat\theta]=\E[(\hat\theta-\E[\hat\theta])^2]\).
- (iv) Mean squared error. \[ \operatorname{mse}[\hat\theta]=\E\bigl[(\hat\theta-\theta)^2\bigr] =\Var[\hat\theta]+\bigl(\operatorname{bias}[\hat\theta]\bigr)^2 , \] the bias–variance decomposition.
The distinction that is marked: \(\Var[\hat\theta]\) measures spread around \(\E[\hat\theta]\) (wherever that is), while \(\operatorname{mse}[\hat\theta]\) measures spread around the true \(\theta\). They agree exactly when the estimator is unbiased — the sentence "since the estimator is unbiased, \(\operatorname{mse}=\Var\)" is what WiSe25 P5c and SoSe25 P4b turn on.
The quantifier in (i) is part of the definition: unbiasedness must hold for every \(\theta\in\Theta\), not just for the true one — an estimator that happens to be right on average at one parameter value is not unbiased.
Define the likelihood function and the maximum likelihood estimator my addition · 3 credits
Model answer
Definition 3.13 — likelihood. Let \((X_1,\dots,X_n)\) be a random sample from a statistical model \((\Omega,\Aa,\P_\Theta)\) in which every \(\P_\theta\) has a pmf or density \(p_\theta(\cdot)=p(\cdot\mid\theta)\). Given observed data \(x=(x_1,\dots,x_n)\), the likelihood function [Likelihood-Funktion] is \[ L(\cdot\mid x):\Theta\to\R_{\ge0},\qquad \theta\mapsto L(\theta\mid x):=p_\theta(x)=p(x_1,\dots,x_n\mid\theta) . \] If \(X_1,\dots,X_n\) are iid, then \(L(\theta\mid x)=\prod_{i=1}^np(x_i\mid\theta)\). The log-likelihood is \(\ell(\theta\mid x):=\ln\bigl(L(\theta\mid x)\bigr)\).
Definition 3.27 — mle. The maximum likelihood estimator \(\hat\theta_{\mathrm{mle}}\) is the value of \(\theta\in\Theta\) maximising the likelihood: \[ \hat\theta_{\mathrm{mle}}(x)\in\arg\max_{\theta\in\Theta}L(\theta\mid x)=\arg\max_{\theta\in\Theta}\ell(\theta\mid x) . \] If \(\ell\) is differentiable and the maximum lies in the interior of \(\Theta\), it can often be found by solving the likelihood equation \(\nabla_\theta\ell(\theta\mid x)=0\).
The two details that are marked. (1) The likelihood is a function of \(\theta\), for fixed observed data — Remark 3.14 stresses this, and it is why \(L\) does not exist without data. (2) The product form needs the iid assumption; without it the joint density does not factorise. (3) Maximising \(\ell\) and maximising \(L\) give the same argmax because \(\ln\) is strictly increasing on \((0,\infty)\) — that sentence is itself worth a credit in SoSe26 P3b's marking scheme, in a different context.
Where it has been used: WiSe25 P4a (4 credits), SoSe25 P4a (4 credits), SoSe26 P5b (3 credits) — an mle derivation appears in all three papers.
Define the significance level of a test, and the two error types my addition · 3 credits
Model answer
Set-up (Definition 3.34): let \((\Omega,\Aa,\P_\Theta)\) be a statistical model and let \(\Theta=\Theta_0\,\dot\cup\,\Theta_1\) be a partition of the parameter space into disjoint pieces whose union is \(\Theta\). A statistical test is a measurable map \(\varphi:\Omega^n\to[0,1]\); for a non-randomized test, \(\varphi(x)=1\) is read as rejecting the null hypothesis, and \(\varphi^{-1}(\{1\})\) is the rejection region.
The two errors (Definition 3.34(iv)). A type I error is rejecting \(H_0\) when it is true. A type II error is failing to reject \(H_0\) when it is false.
Definition 3.34(v) — significance level. The significance level (or size) of a test \(\varphi\) is the maximum probability of a type I error, \[ \alpha:=\sup_{\theta\in\Theta_0}\E_\theta[\varphi] , \] and \(\varphi\) is called a test at level \(\alpha\) if \(\sup_{\theta\in\Theta_0}\E_\theta[\varphi]\le\alpha\).
Definition 3.34(vi) — power. The power function is \(G_\varphi:\Theta\to[0,1]\), \(\theta\mapsto\E_\theta[\varphi]\). For \(\theta\in\Theta_1\), \(G_\varphi(\theta)\) is the power against \(\theta\), and the probability of a type II error at \(\theta\) is \(\beta(\theta)=1-G_\varphi(\theta)\).
The three words that carry the credits: the supremum is over \(\Theta_0\) (the null set, not the whole parameter space); \(\E_\theta\) is computed as if \(\theta\) were true; and the whole quantity is a property of the procedure, not of the data. SoSe25 P1c is 3 credits for exactly that last point.
Related: Definition 3.43 distinguishes a one-sided test (directional alternative, \(H_1:\theta>\theta_0\) or \(H_1:\theta<\theta_0\), rejection region in one tail) from a two-sided test (\(H_1:\theta\ne\theta_0\), region split between both tails). Both tests ever set on these papers were one-sided.
Define a confidence interval, and say what it does not mean my addition · 3 credits
Model answer
Definition 3.54. A \(100(1-\alpha)\,\%\) confidence interval [Konfidenzintervall] for a parameter of interest \(\gamma(\theta)\in\R\) is an interval with random endpoints \((L(X),U(X))\), computed from the sample \(X=(X_1,\dots,X_n)\), such that \[ \P_\theta\bigl(L(X)\le\gamma(\theta)\le U(X)\bigr)\ge1-\alpha\qquad\text{for all }\theta\in\Theta . \] The value \(1-\alpha\) is the confidence level.
The sentence the script itself stresses: "the interval is random, while the parameter is treated as a fixed, unknown constant". The "\(\ge\)" and the "for all \(\theta\)" are both part of the definition and both are markable.
What it does not mean (Remark 3.55). It is not "the probability that \(\theta\) lies in this interval is \(95\,\%\)". Once the data are observed, \(L(x)\) and \(U(x)\) are numbers and \(\theta\) is a number; either \(\theta\) is between them or it is not, and no probability is involved. The correct reading is frequentist: if the whole sampling procedure were repeated many times, about \(95\,\%\) of the intervals produced would contain the true fixed \(\theta\). Misreading this is the same error as SoSe25 P1c's misreading of \(\alpha\).
Where it has been used: WiSe25 P5d (2 credits), the Wald interval of Example 3.58, \(\hat p\pm z_{\alpha/2}\sqrt{\hat p(1-\hat p)/n}\), with \(z_{\alpha/2}\) left symbolic.
Recall bank summary — 21 statements
Asked so far: the slln (WiSe25 P2a), almost sure convergence (WiSe25 P2b), the clt (SoSe25 P2a), convergence in distribution (SoSe25 P2b), Jensen (SoSe26 P3a) — 15 credits across the three papers. Written by me in the same slot's style: the wlln, convergence in probability, the relations between the modes, Markov, Chebyshev, the σ-algebra axioms, total probability and Bayes, inclusion–exclusion, independence of random variables, the laws of total expectation and total variance, characteristic functions, the change-of-variables formula, bias/variance/mse, likelihood and mle, the significance level, and the confidence interval.
How to drill this bank. Recall is the only part of the exam where repetition beats understanding: write each statement out by hand, close the page, write it again, and compare. Since no formula sheet is handed out and the only aid is your own A4 sheet, everything in this bank either lives on that sheet or lives in your memory. Three of these twenty-one have been asked; which three come next is not knowable, so prepare the shape — set-up, assumptions one per line, conclusion with the mode named — rather than betting on a particular theorem.
The density problem
Two of the three papers put a block literally titled "Density computations" in position 3. It is the most mechanical block on the paper: there is one chain of steps, the chain is always the same, and every link of it is worth credits on its own. If you can run the chain without hesitating you collect nine to eleven credits in about fifteen minutes.
What this slot has been WiSe25 · P3 (11 cr) · SoSe25 · P3 (9 cr) · SoSe26: none
| Paper | Title as printed | Credits | What the parts asked |
|---|---|---|---|
| WiSe 25/26 (retake) | Density computations | 11 | (a) 4 — density of \(X=-\frac1\lambda\ln U\) with its support; (b) 4 — a conditional probability \(\P(X\ge10\mid X\ge5)\); (c) 3 — evaluate \(\int_0^1\ln u\,du\) backwards from \(\E[X]\) |
| SoSe 2025 | Density computations | 9 | (a) 2 — normalising constant; (b) 2 — cdf; (c) 2 — mean and median; (d) 3 — density of \(Y=\ln X\) |
| SoSe 2026 | — (no density block anywhere on the paper) | 0 | Position 3 was "Jensen's inequality", 5 credits. Densities did not appear in any other problem either. |
Say this honestly to yourself. The newest of the three papers, SoSe 2026, contains no density computation at all. That is a real disagreement between the papers, not noise. So this block is "asked in 2 of 3 papers so far", and — as everywhere on this page — three papers do not predict the fourth. What makes the chain worth drilling anyway is that its individual steps (normalise, integrate to a cdf, differentiate back, transform) are the same steps used inside the estimation problems, which did appear on all three.
Words and symbols used in this block My addition
- Probability density function [Wahrscheinlichkeitsdichte], abbreviated pdf, written \(p_X\) (Definition 1.45, §1.3): a function \(p_X:\R\to\R_{\ge0}\) with \(\int_{-\infty}^{\infty}p_X(x)\,dx=1\), whose integral over a set gives the probability of landing in that set: \(\P(X\in[a,b])=\int_a^b p_X(x)\,dx\). A density is not a probability: \(p_X(x)\) may be larger than 1, and \(\P(X=x)=0\) for every single point \(x\).
- Support [Träger] \(S_X:=\{x\in\R\mid p_X(x)>0\}\) (the notation of Proposition 2.51): the set where the density is not zero — where the random variable can actually land. Outside it you must write "\(p_X(x)=0\) otherwise"; both density problems marked this separately.
- Cumulative distribution function [Verteilungsfunktion], abbreviated cdf, written \(F_X\) (Definition 1.56): \(F_X(x):=\P(X\le x)\). Lemma 1.49 says the two are linked by \(F_X(x)=\int_{-\infty}^{x}p_X(t)\,dt\) and \(p_X=F_X'\) — in words, the cdf is the integral of the density and the density is the derivative of the cdf.
- Expectation [Erwartungswert] \(\E[X]=\int_{-\infty}^{\infty}x\,p_X(x)\,dx\) (Definition 2.1(ii), §2.1): the average value of \(X\), weighted by the density.
- Median [Median] and \(q\)-quantile [Quantil] (Definition 2.20, §2.1): a number \(x_q\) with \(\P(X\le x_q)\ge q\) and \(\P(X\ge x_q)\ge 1-q\). When \(F_X\) is continuous and strictly increasing on the support, \(x_q\) is the unique solution of \(F_X(x_q)=q\). The median is \(x_{1/2}\).
- Law of the unconscious statistician, abbreviated lotus (Lemma 2.2): for a function \(g\), \(\E[g(X)]=\int g(x)p_X(x)\,dx\). You may compute the expectation of \(g(X)\) with the density of \(X\); you never need the density of \(g(X)\) for this.
- \(\Unif(0,1)\): the uniform distribution [Gleichverteilung] on \((0,1)\), density \(p_U(u)=1\) for \(u\in(0,1)\) and 0 otherwise. \(\Exp(\lambda)\): the exponential distribution, density \(\lambda e^{-\lambda x}\) for \(x\ge0\), mean \(1/\lambda\), variance \(1/\lambda^2\) (Lemma 2.27, §1.3).
The standard chain, step by step
Every density problem the course has set is a walk along the same six links. Some papers ask for links 1–3, some for links 1, 2 and 5. Learn the whole chain; then each part is one link.
Method — the density chain My addition, distilled from the two official solutions
- Normalise. A density must integrate to 1 over its stated support only: \(\int_{S}p(x)\,dx=1\). Solve that single equation for the unknown constant. Then check \(p\ge0\) on the support with the constant you found — SoSe25's official solution writes this check out, so it is worth saying. Script Def 1.45
- Integrate to the cdf. \(F(x)=\int_{-\infty}^{x}p(t)\,dt\). Write all three branches: \(0\) below the support, the formula on the support, \(1\) above it. Full credit in SoSe25 P3b needs all three. Two sanity checks that cost one second each: \(F\) at the left end of the support must be 0, and at the right end must be 1. Script Lem 1.49(i), Def 1.56
- Median and quantiles. Solve \(F(x_q)=q\) on the support and throw away roots outside it. A quadratic will often produce a second, negative root; discarding it with one word ("outside the support") is part of the answer. Script Def 2.20
- Mean (and, if asked, variance). \(\E[X]=\int_S x\,p(x)\,dx\), and \(\Var[X]=\E[X^2]-\E[X]^2\) with \(\E[X^2]=\int_S x^2p(x)\,dx\) (Proposition 2.8(i), §2.1). The mean and the median are different numbers unless the density is symmetric — an examiner can ask for both precisely to see whether you know that. Script Def 2.1(ii), Prop 2.8(i)
- Transform: the density of \(Y=g(X)\). Two routes, both accepted for full marks:
- Change of variables (Proposition 2.51): if \(g\) is continuously differentiable and strictly monotonic on the support \(S_X\), then \[p_Y(y)=p_X\bigl(g^{-1}(y)\bigr)\Bigl|\tfrac{d}{dy}g^{-1}(y)\Bigr|\quad\text{for }y\in g(S_X), \qquad p_Y(y)=0\text{ otherwise.}\] The absolute value is what makes a decreasing \(g\) come out with a positive density.
- cdf route: \(F_Y(y)=\P(g(X)\le y)\); rearrange the inequality into one about \(X\) (flipping it if \(g\) is decreasing), read off \(F_X\), then differentiate. This route is the only one available when \(g\) is not strictly monotonic, for instance \(g(x)=|x-1|\) or \(g(x)=x^2\) on a support straddling 0.
- Push the support through \(g\) first, and say so. WiSe25 P3a prints "Be sure to correctly specify the support of \(X\)" and marks it. Do step 6 before step 5: knowing that \(y\) ranges over \(g(S_X)\) tells you which branch of an inverse to take and stops sign errors. Finish with the free check \(\int p_Y(y)\,dy=1\).
In words: fix the constant by making the area 1; sweep the area from the left to get the cdf; cut the cdf at height \(q\) to get quantiles; weight by \(x\) to get the mean; and to move to \(g(X)\), first move the support, then either divide by \(|g'|\) (via the inverse) or chase the inequality through the cdf.
Four traps this block sets My addition
- Integrating over all of \(\R\) instead of the support. \(\int_0^2 \frac{x}{c}dx=1\) gives \(c=2\); \(\int_{-\infty}^{\infty}\) gives nonsense. The support is in the problem statement — copy it into the integral limits before anything else.
- Forgetting the absolute value in Proposition 2.51. For \(x=-\frac1\lambda\ln u\) the inverse is \(u=e^{-\lambda x}\) with \(\frac{d}{dx}e^{-\lambda x}=-\lambda e^{-\lambda x}\), which is negative. Its absolute value \(\lambda e^{-\lambda x}\) is the density. Without the bars you produce a negative "density".
- Using Proposition 2.51 when \(g\) is not strictly monotonic on the support. The proposition's hypothesis is not decoration: \(g^{-1}\) has to exist. Check monotonicity out loud, and switch to the cdf route when it fails.
- Answering with a formula but no support. "\(p_Y(y)=\frac{e^{2y}}{2}\)" is only half the answer; the other half is "for \(y\le\ln 2\), and \(0\) otherwise".
Drill bank — eleven density problems
Drills D1–D7 are the seven sub-parts that have actually been set, each with the credits printed on the paper. Drills D8–D11 are four I wrote in the same style, on four different kinds of density: piecewise linear, triangular, power law, and exponential-type. Work each one with paper only — no calculator is allowed in the exam — then open the solution.
Drill D1 — density of a transformed uniform WiSe25 · P3a · 4 credits
Let \(U\sim\Unif(0,1)\) and fix \(\lambda>0\). Set \(X=g(U)=-\frac1\lambda\ln(U)\). Derive the pdf \(p_X\) of \(X\). Be sure to specify the support of \(X\) correctly.
Solution (4 credits: inverse and its derivative, absolute value, support, final formula)
Step 1 — the density we start from. \(U\sim\Unif(0,1)\) means \(p_U(u)=1\) for \(u\in(0,1)\) and \(p_U(u)=0\) otherwise. So the support is \(S_U=(0,1)\).
Step 2 — push the support through \(g\) (method step 6, done first). The natural logarithm \(\ln\) maps \((0,1)\) onto \((-\infty,0)\): \(\ln u\) is negative for \(0<u<1\), it tends to \(-\infty\) as \(u\downarrow0\) and to \(0\) as \(u\uparrow1\) (Analysis 5.2). Multiplying by \(-\frac1\lambda<0\) flips that interval to \((0,\infty)\). Therefore \[S_X=g(S_U)=(0,\infty).\] The official solution writes \(x\in\R_{\ge0}\); the endpoint 0 has probability 0 either way, so both are accepted.
Step 3 — is \(g\) strictly monotonic there? \(g(u)=-\frac1\lambda\ln u\) has derivative \(g'(u)=-\frac{1}{\lambda u}\), which is strictly negative for \(u\in(0,1)\). So \(g\) is strictly decreasing and continuously differentiable on \(S_U\). Proposition 2.51 applies.
Step 4 — invert. From \(x=-\frac1\lambda\ln u\) multiply both sides by \(-\lambda\): \(-\lambda x=\ln u\). Apply \(\exp\) to both sides (the inverse of \(\ln\)): \(u=e^{-\lambda x}\). So \(g^{-1}(x)=e^{-\lambda x}\).
Step 5 — differentiate the inverse and take the absolute value. By the chain rule, \(\frac{d}{dx}e^{-\lambda x}=-\lambda e^{-\lambda x}\). This is negative, so \(\bigl|\frac{d}{dx}g^{-1}(x)\bigr|=\lambda e^{-\lambda x}\).
Step 6 — assemble. Proposition 2.51 gives, for \(x>0\), \[p_X(x)=p_U\bigl(g^{-1}(x)\bigr)\cdot\Bigl|\tfrac{d}{dx}g^{-1}(x)\Bigr| =\underbrace{1}_{\text{because }e^{-\lambda x}\in(0,1)}\cdot\;\lambda e^{-\lambda x}=\lambda e^{-\lambda x},\] and \(p_X(x)=0\) for \(x\le0\). The factor \(p_U(e^{-\lambda x})\) equals 1 exactly because \(x>0\) forces \(e^{-\lambda x}\in(0,1)\), which is where \(p_U\) is 1 — this is the place where the support work pays off.
Answer. \(X\sim\Exp(\lambda)\): \(p_X(x)=\lambda e^{-\lambda x}\) for \(x\ge0\), and \(0\) otherwise.
Free check. \(\int_0^\infty\lambda e^{-\lambda x}dx=\bigl[-e^{-\lambda x}\bigr]_0^\infty=0-(-1)=1\).
What this drill is really teaching. This is the inverse transform construction: feeding a uniform random number through \(F^{-1}\) produces a variable with cdf \(F\). It is how a computer simulates an exponential variable. The guide works the same task from the \(\Exp\) side at §1.3.
Drill D2 — a conditional probability on the exponential WiSe25 · P3b · 4 credits
Use \(X\) from Drill D1 to model the response time (in hours) of your professor to Moodle posts. The probability that you wait at least 5 hours is \(p\in(0,1)\). Given that you have already waited 5 hours, what is the probability that you will wait at least 5 more? The exam's hint: if you could not solve (a), you may assume \(F_X(x)=1-e^{-\lambda x}\) for \(x>0\) and 0 otherwise.
Solution (4 credits: tail formula, definition of conditional probability, the intersection step, the answer)
Step 1 — the tail probability. \(\P(X\ge x)=1-\P(X<x)=1-F_X(x)=1-(1-e^{-\lambda x})=e^{-\lambda x}\) for \(x\ge0\). (For a continuous variable \(\P(X<x)=\P(X\le x)\), because a single point has probability 0.) In particular \(p=\P(X\ge5)=e^{-5\lambda}\).
Step 2 — the conditional probability. Definition 1.69 (§1.4): for events \(A,B\) with \(\P(B)>0\), \(\P(A\mid B)=\frac{\P(A\cap B)}{\P(B)}\). Here \(A=\{X\ge10\}\) and \(B=\{X\ge5\}\).
Step 3 — the intersection. If \(X\ge10\) then automatically \(X\ge5\), so \(\{X\ge10\}\subseteq\{X\ge5\}\) and therefore \(\{X\ge10\}\cap\{X\ge5\}=\{X\ge10\}\). This is the step that is worth a credit and that people skip.
Step 4 — divide. \[\P(X\ge10\mid X\ge5)=\frac{\P(X\ge10)}{\P(X\ge5)}=\frac{e^{-10\lambda}}{e^{-5\lambda}}=e^{-10\lambda+5\lambda} =e^{-5\lambda}=\P(X\ge5)=p.\] The middle equality is the exponent rule \(\frac{e^{a}}{e^{b}}=e^{a-b}\).
Answer. \(p\). Having waited 5 hours tells you nothing: the remaining wait has the same distribution as a fresh wait.
The official solution's primary route is not supported by the script
The printed solution's first argument is "the exponential distribution is memoryless". The word memoryless does not occur anywhere in the lecture script — the property is never defined or proved there. The official "Alternative", which is exactly Steps 1–4 above, uses nothing but Definition 1.69 and the cdf. Write the alternative. It is four lines and it stands on material the course actually gives you. The guide proves the memorylessness property itself, so you can cite it if you want, at §1.4.
Why 4 credits for four lines. Note the hint: "if you could not solve (a), you may assume the cdf". This part was designed to be reachable even if you failed the harder part (a). Items like this are the best credits-per-minute on the whole paper — never leave one blank.
Drill D3 — evaluate an integral backwards WiSe25 · P3c · 3 credits
With \(X=-\frac1\lambda\ln U\), \(U\sim\Unif(0,1)\), you are given \(\E[X]=\frac1\lambda\). Use these facts to compute \(\int_0^1\ln(u)\,du\) without integrating directly (in particular without integration by parts).
Solution (3 credits: naming lotus, setting up the integral, solving for the unknown integral)
Step 1 — name the tool. The law of the unconscious statistician, lotus (Lemma 2.2, §2.1), says that for a function \(g\) and a continuous variable \(U\) with density \(p_U\), \[\E[g(U)]=\int_{-\infty}^{\infty}g(u)\,p_U(u)\,du .\] In words: to average \(g(U)\) you weight \(g\) by the density of \(U\); you do not need the density of \(g(U)\).
Step 2 — apply it with \(g(u)=-\frac1\lambda\ln u\) and \(p_U=1\) on \((0,1)\). \[\frac1\lambda=\E[X]=\E[g(U)]=\int_0^1\Bigl(-\frac1\lambda\ln u\Bigr)\cdot 1\,du =-\frac1\lambda\int_0^1\ln(u)\,du,\] where the constant \(-\frac1\lambda\) comes out of the integral by linearity of the integral.
Step 3 — solve for the unknown integral. Multiply both sides by \(-\lambda\): \[-1=\int_0^1\ln(u)\,du .\]
Answer. \(\int_0^1\ln(u)\,du=-1\).
Sanity check (not required, but free). \(\ln u\) is negative on \((0,1)\), so the integral must be negative. It is. And the direct antiderivative \(u\ln u-u\) gives \([u\ln u-u]_0^1=(0-1)-0=-1\) (using \(u\ln u\to0\) as \(u\downarrow0\)) — the same number, obtained the forbidden way.
The general move. An expectation you know + lotus = an integral you did not want to do. The guide works this one in §2.1 at §2.1. It is worth practising in the other direction too: any time an exam hands you \(\E[X]\) "for free", ask what integral that fact evaluates.
Drill D4 — the normalising constant SoSe25 · P3a · 2 credits
Let \(X\) be a continuous random variable with \(p_X(x)=\frac{x}{c}\) for \(x\in[0,2]\) and \(p_X(x)=0\) otherwise, for some \(c\in\R\). Find \(c\) so that \(p_X\) is a valid pdf.
Solution (2 credits: the equation \(\int p=1\) on the support; solving it, plus the non-negativity check)
Step 1 — write the defining equation. Definition 1.45: a pdf integrates to 1. The density is 0 outside \([0,2]\), so the integral over \(\R\) is the integral over \([0,2]\): \[\int_{-\infty}^{\infty}p_X(x)\,dx=\int_0^2\frac{x}{c}\,dx\stackrel{!}{=}1 .\] (The symbol \(\stackrel{!}{=}\) means "we demand that this equals".)
Step 2 — integrate. The antiderivative of \(x\) is \(\frac{x^2}{2}\), and \(\frac1c\) is a constant that comes out: \[\frac1c\Bigl[\frac{x^2}{2}\Bigr]_0^2=\frac1c\Bigl(\frac{4}{2}-\frac{0}{2}\Bigr)=\frac{2}{c}.\]
Step 3 — solve. \(\frac2c=1\Rightarrow c=2\). So \(p_X(x)=\frac{x}{2}\) on \([0,2]\).
Step 4 — the check the official solution writes out. A pdf must also be non-negative. On \([0,2]\) we have \(x\ge0\) and \(c=2>0\), so \(p_X(x)=\frac x2\ge0\). Both conditions hold, so \(p_X\) is a valid pdf.
Answer. \(c=2\).
Why the sign check matters. The equation \(\int_0^2\frac xc dx=1\) has exactly one solution here, but for a density like \(p(x)=c(1-x^2)\) on \([-2,2]\) the normalising equation can be solved by a \(c\) that makes the density negative somewhere. Then no valid pdf of that shape exists. One sentence buys the credit.
Drill D5 — the cdf, all three branches SoSe25 · P3b · 2 credits
For the \(X\) of Drill D4 (density \(\frac x2\) on \([0,2]\)), determine the cdf \(F_X\).
Solution (2 credits: the middle branch; the two outer branches)
Step 1 — the definition. Lemma 1.49(i): \(F_X(x)=\P(X\le x)=\int_{-\infty}^{x}p_X(t)\,dt\).
Branch 1: \(x<0\). On \((-\infty,x]\) the density is identically 0, so \(F_X(x)=\int_{-\infty}^{x}0\,dt=0\).
Branch 2: \(0\le x\le2\). The density is 0 on \((-\infty,0)\) and \(\frac t2\) on \([0,x]\), so \[F_X(x)=\int_0^{x}\frac{t}{2}\,dt=\Bigl[\frac{t^2}{4}\Bigr]_0^{x}=\frac{x^2}{4}.\]
Branch 3: \(x>2\). Beyond 2 the density is 0 again, so nothing is added: \(F_X(x)=\int_0^{2}\frac t2dt=\frac{2^2}{4}=1\).
Answer. \[F_X(x)=\begin{cases}0,&x<0,\\[2pt]\dfrac{x^2}{4},&0\le x\le2,\\[4pt]1,&x>2.\end{cases}\]
Two free checks. Continuity at the joins: \(\frac{0^2}{4}=0\) matches branch 1, and \(\frac{2^2}{4}=1\) matches branch 3. Differentiating the middle branch gives \(\frac{d}{dx}\frac{x^2}{4}=\frac{2x}{4}=\frac x2=p_X(x)\), which is Lemma 1.49(ii) run backwards.
Full credit needs all three branches. Answering only "\(F_X(x)=x^2/4\)" describes a function that is negative before 0 and larger than 1 after 2 — impossible for a cdf, which is always in \([0,1]\).
Drill D6 — mean and median SoSe25 · P3c · 2 credits
For the same \(X\), calculate the mean and the median.
Solution (2 credits: the mean; the median)
Mean. Definition 2.1(ii): \[\E[X]=\int_{-\infty}^{\infty}x\,p_X(x)\,dx=\int_0^2 x\cdot\frac{x}{2}\,dx=\int_0^2\frac{x^2}{2}\,dx =\Bigl[\frac{x^3}{6}\Bigr]_0^2=\frac{8}{6}=\frac43\approx 1.333 .\] (Antiderivative of \(x^2\) is \(\frac{x^3}{3}\); dividing by the 2 gives \(\frac{x^3}{6}\).)
Median. Definition 2.20: solve \(F_X(m)=\frac12\). Here \(F_X\) is continuous and strictly increasing on \([0,2]\), so the solution is unique: \[\frac{m^2}{4}=\frac12\;\Longrightarrow\;m^2=2\;\Longrightarrow\;m=\pm\sqrt2 .\] The root \(-\sqrt2\) lies outside the support \([0,2]\) and is discarded. So \(m=\sqrt2\approx1.414\).
Answer. \(\E[X]=\frac43\approx1.333\), median \(=\sqrt2\approx1.414\).
In words: the median (1.414) sits to the right of the mean (1.333). The density \(\frac x2\) grows towards 2, so the mass is packed on the right; the long empty stretch near 0 pulls the mean down more than it pulls the median, because the mean weights how far a point is, while the median only counts how many points lie on each side.
The reusable point. Mean and median coincide only for a symmetric density. Whenever an exam asks for both in one breath, it is checking that you do not compute one and write it twice.
Drill D7 — the density of \(Y=\ln X\) SoSe25 · P3d · 3 credits
For the same \(X\) (density \(\frac x2\) on \([0,2]\)), let \(Y=\ln(X)\). Determine the pdf of \(Y\). The exam's hint: you may use the change of variables formula \(p_Y(y)=p_X(g^{-1}(y))\bigl|\frac{d}{dy}g^{-1}(y)\bigr|\).
Solution (3 credits: the support; the inverse and its derivative; the assembled density)
Step 1 — the support, first. \(X\) lives on \([0,2]\) (more precisely on \((0,2]\), since \(x=0\) has density 0 and probability 0). \(\ln\) is strictly increasing and maps \((0,2]\) onto \((-\infty,\ln 2]\). So \[S_Y=(-\infty,\ln 2],\qquad \ln 2\approx 0.6931 .\]
Step 2 — monotonicity. \(g(x)=\ln x\) has \(g'(x)=\frac1x>0\) on \((0,2]\): strictly increasing and continuously differentiable. Proposition 2.51 applies.
Step 3 — invert. \(y=\ln x\iff x=e^{y}\), so \(g^{-1}(y)=e^{y}\), and \(\frac{d}{dy}e^{y}=e^{y}\), which is positive, so the absolute value changes nothing: \(\bigl|\frac{d}{dy}g^{-1}(y)\bigr|=e^{y}\).
Step 4 — assemble. For \(y\le\ln2\), \(g^{-1}(y)=e^y\in(0,2]\) lies in the support of \(X\), so \(p_X(e^y)=\frac{e^y}{2}\) and \[p_Y(y)=p_X(e^{y})\cdot e^{y}=\frac{e^{y}}{2}\cdot e^{y}=\frac{e^{2y}}{2},\] using \(e^y\cdot e^y=e^{2y}\).
Answer. \(p_Y(y)=\frac{e^{2y}}{2}\) for \(y\le\ln 2\), and \(p_Y(y)=0\) otherwise.
Free check. \(\int_{-\infty}^{\ln2}\frac{e^{2y}}{2}dy=\Bigl[\frac{e^{2y}}{4}\Bigr]_{-\infty}^{\ln2} =\frac{e^{2\ln2}}{4}-0=\frac{4}{4}=1\), using \(e^{2\ln 2}=(e^{\ln2})^2=2^2=4\).
A wording slip in the official solution
It writes "the support of \(X\) is \([0,2]\), so the support of \(Y\) is \((-\infty,\ln2]\)". Strictly, \(\ln 0\) is not defined, so the map is only defined on \((0,2]\). The conclusion is unaffected because \(\P(X=0)=0\) for a continuous variable, but if you write \((0,2]\) you are being more careful than the model answer, not less.
Drill D8 — a piecewise-linear (trapezoidal) density, full chain My problem, written in the style of SoSe25 P3 · 10 credits
Let \(X\) have density \(p_X(x)=c\,(1+x)\) for \(x\in[0,2]\) and \(p_X(x)=0\) otherwise.
- (2 cr) Find \(c\).
- (2 cr) Determine the cdf \(F_X\), all branches.
- (2 cr) Compute the median and the \(0.9\)-quantile.
- (2 cr) Compute \(\E[X]\) and \(\Var[X]\).
- (2 cr) Determine the density of \(Y=X^2\), with its support.
Solution
(i) Normalising constant. \[\int_0^2 c(1+x)\,dx=c\Bigl[x+\frac{x^2}{2}\Bigr]_0^2=c\Bigl(2+\frac42\Bigr)=c\,(2+2)=4c\stackrel{!}{=}1 \;\Longrightarrow\;c=\frac14 .\] Non-negativity: on \([0,2]\), \(1+x\ge1>0\) and \(c=\frac14>0\), so \(p_X\ge0\). Valid pdf.
(ii) cdf. For \(0\le x\le2\), \[F_X(x)=\int_0^{x}\frac{1+t}{4}\,dt=\frac14\Bigl[t+\frac{t^2}{2}\Bigr]_0^{x}=\frac{x+\frac{x^2}{2}}{4} =\frac{2x+x^2}{8}.\] (The last step multiplies numerator and denominator by 2.) Hence \[F_X(x)=\begin{cases}0,&x<0,\\[2pt]\dfrac{2x+x^2}{8},&0\le x\le 2,\\[4pt]1,&x>2.\end{cases}\] Check: \(F_X(0)=0\) and \(F_X(2)=\frac{4+4}{8}=1\).
(iii) Quantiles. Solve \(\frac{2m+m^2}{8}=q\), i.e. \(m^2+2m-8q=0\). The quadratic formula \(m=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\) with \(a=1,b=2,c=-8q\) gives \[m=\frac{-2\pm\sqrt{4+32q}}{2}=-1\pm\sqrt{1+8q}.\] The minus sign gives a negative number, outside \([0,2]\); discard it. So \(x_q=-1+\sqrt{1+8q}\).
- Median \(q=\frac12\): \(x_{1/2}=-1+\sqrt{5}=1.236\) (4 significant digits: \(1.236\)).
- \(q=0.9\): \(x_{0.9}=-1+\sqrt{1+7.2}=-1+\sqrt{8.2}=1.864\).
Both lie in \([0,2]\), as they must.
(iv) Mean and variance. \[\E[X]=\int_0^2 x\cdot\frac{1+x}{4}dx=\frac14\int_0^2(x+x^2)dx=\frac14\Bigl[\frac{x^2}{2}+\frac{x^3}{3}\Bigr]_0^2 =\frac14\Bigl(2+\frac83\Bigr)=\frac14\cdot\frac{14}{3}=\frac{7}{6}\approx1.167 .\] \[\E[X^2]=\frac14\int_0^2(x^2+x^3)dx=\frac14\Bigl[\frac{x^3}{3}+\frac{x^4}{4}\Bigr]_0^2 =\frac14\Bigl(\frac83+4\Bigr)=\frac14\cdot\frac{20}{3}=\frac{5}{3}\approx1.667 .\] By Proposition 2.8(i), \(\Var[X]=\E[X^2]-\E[X]^2=\frac53-\frac{49}{36}=\frac{60-49}{36}=\frac{11}{36}\approx0.3056\).
The median \(1.236\) is again to the right of the mean \(1.167\), for the same reason as in Drill D6: the density rises towards 2.
(v) The density of \(Y=X^2\).
Support first. \(g(x)=x^2\) maps \([0,2]\) onto \([0,4]\), so \(S_Y=[0,4]\).
Monotonicity. \(g'(x)=2x>0\) for \(x\in(0,2]\): strictly increasing on the support. (Note that \(x\mapsto x^2\) would not be monotonic on a support like \([-1,2]\); here it is, because the support sits entirely on the non-negative half-line. Checking this is exactly the hypothesis of Proposition 2.51.)
Invert. \(y=x^2\) with \(x\ge0\) gives \(g^{-1}(y)=\sqrt y\), and \(\frac{d}{dy}\sqrt y=\frac{1}{2\sqrt y}>0\).
Assemble. For \(y\in(0,4]\), \[p_Y(y)=p_X(\sqrt y)\cdot\frac{1}{2\sqrt y}=\frac{1+\sqrt y}{4}\cdot\frac{1}{2\sqrt y} =\frac{1+\sqrt y}{8\sqrt y},\] and \(p_Y(y)=0\) otherwise.
Check. \(\int_0^4\frac{1+\sqrt y}{8\sqrt y}dy=\frac18\int_0^4\bigl(y^{-1/2}+1\bigr)dy =\frac18\bigl[2\sqrt y+y\bigr]_0^4=\frac18(4+4)=1\).
A second, independent check: by lotus, \(\E[Y]=\E[X^2]=\frac53\), and integrating \(\int_0^4 y\,p_Y(y)\,dy\) gives \(\frac53\) as well.
What earns the credits. (i) the equation \(\int_S p=1\) plus the sign check; (ii) all three branches; (iii) discarding the negative root in one named sentence; (iv) using \(\Var=\E[X^2]-\E[X]^2\) rather than \(\int(x-\E X)^2p\,dx\), which is longer; (v) the support \([0,4]\) written down before anything else, and the absolute value of the derivative written even though it is positive here.
Drill D9 — a triangular density and a non-monotone transform My problem · 10 credits
Let \(X\) have the "tent" density \[p_X(x)=\begin{cases}c\,x,&0\le x\le1,\\ c\,(2-x),&1<x\le2,\\ 0,&\text{otherwise.}\end{cases}\]
- (2 cr) Find \(c\).
- (3 cr) Determine \(F_X\) on all branches, and the \(0.25\)-quantile.
- (2 cr) Give \(\E[X]\) and the median with a one-line reason, then compute \(\Var[X]\).
- (3 cr) Let \(Y=|X-1|\) (the distance from the peak). Determine \(p_Y\). Explain first why Proposition 2.51 cannot be used.
Solution
(i) The two pieces are triangles. Integrate each: \[\int_0^1 cx\,dx=c\Bigl[\frac{x^2}{2}\Bigr]_0^1=\frac c2,\qquad \int_1^2 c(2-x)\,dx=c\Bigl[2x-\frac{x^2}{2}\Bigr]_1^2=c\Bigl((4-2)-\bigl(2-\tfrac12\bigr)\Bigr)=\frac c2 .\] Total \(\frac c2+\frac c2=c\stackrel{!}{=}1\), so \(c=1\). Non-negativity: \(x\ge0\) on \([0,1]\) and \(2-x\ge0\) on \([1,2]\). Valid pdf.
(ii) cdf. For \(0\le x\le1\): \(F_X(x)=\int_0^x t\,dt=\frac{x^2}{2}\). At \(x=1\) this is
\(\frac12\).
For \(1<x\le2\): start from the value already accumulated and add the second piece,
\[F_X(x)=\frac12+\int_1^{x}(2-t)\,dt=\frac12+\Bigl[2t-\frac{t^2}{2}\Bigr]_1^{x}
=\frac12+\Bigl(2x-\frac{x^2}{2}\Bigr)-\Bigl(2-\frac12\Bigr)=2x-\frac{x^2}{2}-1 .\]
Check: at \(x=1\) this gives \(2-\frac12-1=\frac12\) (matches), at \(x=2\) it gives \(4-2-1=1\) (matches).
\[F_X(x)=\begin{cases}0,&x<0,\\[2pt]\dfrac{x^2}{2},&0\le x\le1,\\[4pt]2x-\dfrac{x^2}{2}-1,&1<x\le2,\\[4pt]1,&x>2.\end{cases}\]
\(0.25\)-quantile: since \(F_X(1)=\frac12>0.25\), the answer lies in the first branch. Solve
\(\frac{x^2}{2}=0.25\Rightarrow x^2=0.5\Rightarrow x=\sqrt{0.5}=0.7071\) (the negative root is outside the
support).
(iii) Mean, median, variance. The density is symmetric about \(x=1\): substituting \(x\mapsto 2-x\) turns \(x\) into \(2-x\) and \(2-x\) into \(x\), which swaps the two pieces. For a density symmetric about a point \(a\), both the mean and the median equal \(a\). So \(\E[X]=1\) and the median is \(1\). (The median also follows directly: \(F_X(1)=\frac12\).)
For the variance, use symmetry again: \(\Var[X]=\E[(X-1)^2]\) because \(\E[X]=1\), and by lotus \[\E[(X-1)^2]=\int_0^1(x-1)^2x\,dx+\int_1^2(x-1)^2(2-x)\,dx=2\int_0^1(x-1)^2x\,dx,\] the two integrals being equal by the symmetry. Now \(\int_0^1(x^2-2x+1)x\,dx=\int_0^1(x^3-2x^2+x)dx=\frac14-\frac23+\frac12=\frac{3-8+6}{12}=\frac1{12}\). Hence \(\Var[X]=2\cdot\frac1{12}=\frac16\approx0.1667\).
(iv) The density of \(Y=|X-1|\).
Why Proposition 2.51 does not apply. Its hypothesis is that \(g\) be strictly monotonic on the support. Here \(g(x)=|x-1|\) is strictly decreasing on \([0,1]\) and strictly increasing on \([1,2]\); it takes the same value at \(x=1-y\) and \(x=1+y\). So \(g^{-1}\) does not exist as a function and the formula is unusable. Use the cdf route.
Support. \(|x-1|\) ranges over \([0,1]\) as \(x\) ranges over \([0,2]\), so \(S_Y=[0,1]\).
cdf route. For \(0\le y\le1\), \[F_Y(y)=\P(|X-1|\le y)=\P(1-y\le X\le 1+y)=F_X(1+y)-F_X(1-y),\] the last equality because \(\P(a\le X\le b)=F_X(b)-F_X(a)\) for a continuous variable (single points have probability 0). Now \(1+y\in[1,2]\) uses the third branch and \(1-y\in[0,1]\) the second: \[F_X(1+y)=2(1+y)-\frac{(1+y)^2}{2}-1,\qquad F_X(1-y)=\frac{(1-y)^2}{2}.\] Subtract, expanding \((1\pm y)^2=1\pm2y+y^2\): \[F_Y(y)=2+2y-\frac{1+2y+y^2}{2}-1-\frac{1-2y+y^2}{2} =1+2y-\frac{(1+2y+y^2)+(1-2y+y^2)}{2}=1+2y-\frac{2+2y^2}{2}=2y-y^2 .\] Check: \(F_Y(0)=0\), \(F_Y(1)=2-1=1\).
Differentiate (Lemma 1.49(ii)): \(p_Y(y)=\frac{d}{dy}(2y-y^2)=2-2y\) for \(y\in[0,1]\), and 0 otherwise.
Check. \(\int_0^1(2-2y)dy=[2y-y^2]_0^1=1\). And \(\E[Y]=\int_0^1y(2-2y)dy=[y^2-\frac23y^3]_0^1=\frac13\approx0.3333\).
In words: folding a symmetric tent in half at its peak gives a right triangle that is highest at 0 — the distance from the peak is most likely to be small.
Why this drill exists. Both past transformation tasks had a monotone \(g\) and handed you the change-of-variables formula. The hypothesis "strictly monotonic" was therefore never tested. A single absolute value or square is all it takes to break it, and the cdf route is the fix. Say the sentence "\(g\) is not injective on the support, so Proposition 2.51 does not apply" out loud — it is a marked step in any reasonable scheme.
Drill D10 — a power-law density with an infinite variance My problem · 10 credits
Let \(X\) have density \(p_X(x)=\dfrac{c}{x^{3}}\) for \(x\ge1\) and \(0\) otherwise.
- (2 cr) Find \(c\).
- (2 cr) Determine \(F_X\); compute the median and the \(0.9\)-quantile.
- (3 cr) Compute \(\E[X]\). Then decide whether \(\Var[X]\) is finite, with a reason.
- (3 cr) Determine the density of \(Y=\ln X\) and name the resulting distribution.
Solution
(i) The support is unbounded, so the integral is improper — it is a limit: \[\int_1^{\infty}\frac{c}{x^3}dx=c\lim_{b\to\infty}\Bigl[-\frac{1}{2x^{2}}\Bigr]_1^{b} =c\lim_{b\to\infty}\Bigl(\frac12-\frac{1}{2b^{2}}\Bigr)=\frac c2\stackrel{!}{=}1\;\Longrightarrow\;c=2 .\] (The antiderivative of \(x^{-3}\) is \(\frac{x^{-2}}{-2}=-\frac{1}{2x^2}\), and \(\frac1{2b^2}\to0\).) Non-negativity: \(2/x^3>0\) for \(x\ge1\). Valid pdf.
(ii) For \(x\ge1\): \(F_X(x)=\int_1^{x}\frac{2}{t^{3}}dt=\Bigl[-\frac{1}{t^{2}}\Bigr]_1^{x}=1-\frac{1}{x^{2}}\), and \(F_X(x)=0\) for \(x<1\). (There is no third branch: the support is unbounded, and \(F_X(x)\to1\) as \(x\to\infty\).)
Quantiles: \(1-\frac1{x_q^2}=q\iff x_q^{2}=\frac{1}{1-q}\iff x_q=\frac{1}{\sqrt{1-q}}\).
- Median: \(x_{1/2}=\frac1{\sqrt{0.5}}=\sqrt2=1.414\).
- \(0.9\)-quantile: \(x_{0.9}=\frac1{\sqrt{0.1}}=\sqrt{10}=3.162\).
(iii) Mean, and the variance question. \[\E[X]=\int_1^{\infty}x\cdot\frac{2}{x^{3}}dx=\int_1^{\infty}\frac{2}{x^{2}}dx =2\lim_{b\to\infty}\Bigl[-\frac1x\Bigr]_1^{b}=2\,(0+1)=2 .\] For the second moment, \[\E[X^{2}]=\int_1^{\infty}x^{2}\cdot\frac{2}{x^{3}}dx=\int_1^{\infty}\frac{2}{x}dx =2\lim_{b\to\infty}\bigl[\ln x\bigr]_1^{b}=2\lim_{b\to\infty}\ln b=+\infty .\] The integral \(\int_1^\infty\frac{dx}{x}\) diverges (Analysis 8.3). So \(\E[X^{2}]\) is infinite and therefore \(\Var[X]=\E[X^2]-\E[X]^2\) is not finite.
Why this matters beyond this drill
Every limit theorem of §2.4 and every inequality of §2.2 that uses a variance has "finite variance" in its hypothesis list. This \(X\) has a perfectly finite mean but no variance, so Chebyshev's inequality and the central limit theorem cannot be applied to it, while the strong law of large numbers (Theorem 2.62, which only needs a finite mean) still can. That distinction is exactly what Problem 1-style true/false items probe. See §2.2 and §2.4.
(iv) The density of \(Y=\ln X\).
Support. \(\ln\) maps \([1,\infty)\) onto \([0,\infty)\), so \(S_Y=[0,\infty)\).
Monotonicity. \(\frac{d}{dx}\ln x=\frac1x>0\) on \([1,\infty)\): strictly increasing. Proposition 2.51 applies.
Invert and differentiate. \(g^{-1}(y)=e^{y}\), \(\bigl|\frac{d}{dy}e^{y}\bigr|=e^{y}\).
Assemble. For \(y\ge0\), \[p_Y(y)=p_X(e^{y})\cdot e^{y}=\frac{2}{(e^{y})^{3}}\cdot e^{y}=2e^{-3y}e^{y}=2e^{-2y},\] using \((e^y)^3=e^{3y}\) and \(e^{-3y}e^{y}=e^{-2y}\). And \(p_Y(y)=0\) for \(y<0\).
Answer. \(Y=\ln X\sim\Exp(2)\): the exponential distribution with rate \(\lambda=2\). Its mean is \(\frac1\lambda=\frac12\) and its variance \(\frac1{\lambda^{2}}=\frac14\) (Lemma 2.27).
Check. \(\int_0^{\infty}2e^{-2y}dy=[-e^{-2y}]_0^{\infty}=1\).
Two things to take away. First, a transform can turn a variable with no variance into one with every moment finite — taking a logarithm tames a heavy tail. Second, this is Drill D1 run in reverse: there a uniform became exponential, here a power law becomes exponential. Exponentiating an \(\Exp(2)\) variable gives this \(X\) back.
Drill D11 — a shifted exponential, and the transform back to uniform My problem · 11 credits
A machine needs a fixed 2 minutes of set-up and then a random amount of extra time. Model the total time by \(X\) with density \(p_X(x)=c\,e^{-x/3}\) for \(x\ge2\) and \(0\) otherwise.
- (2 cr) Find \(c\) and write \(p_X\) in the tidiest form you can.
- (2 cr) Determine \(F_X\) and the median.
- (2 cr) Compute \(\E[X]\) and \(\Var[X]\).
- (2 cr) Compute \(\P(X\ge8\mid X\ge5)\).
- (3 cr) Determine the density of \(Y=e^{-(X-2)/3}\), with its support, and name the distribution.
Solution
(i) \[\int_2^{\infty}c\,e^{-x/3}dx=c\lim_{b\to\infty}\bigl[-3e^{-x/3}\bigr]_2^{b}=c\,\bigl(0+3e^{-2/3}\bigr) =3c\,e^{-2/3}\stackrel{!}{=}1\;\Longrightarrow\;c=\frac{e^{2/3}}{3}\approx 0.6494 .\] (The antiderivative of \(e^{-x/3}\) is \(-3e^{-x/3}\), because differentiating it gives \(-3\cdot(-\frac13)e^{-x/3}=e^{-x/3}\).) Substituting back, \[p_X(x)=\frac{e^{2/3}}{3}e^{-x/3}=\frac13\,e^{-(x-2)/3}\quad (x\ge2),\] using \(e^{2/3}e^{-x/3}=e^{-(x-2)/3}\). So \(X\) is an \(\Exp(\frac13)\) variable shifted right by 2.
(ii) For \(x\ge2\), \(F_X(x)=\int_2^{x}\frac13e^{-(t-2)/3}dt=\bigl[-e^{-(t-2)/3}\bigr]_2^{x}=1-e^{-(x-2)/3}\); and \(F_X(x)=0\) for \(x<2\).
Median: \(1-e^{-(m-2)/3}=\frac12\iff e^{-(m-2)/3}=\frac12\). Take \(\ln\) of both sides: \(-\frac{m-2}{3}=\ln\frac12=-\ln2\), so \(m=2+3\ln2\approx 4.079\).
(iii) Write \(X=2+W\) with \(W\sim\Exp(\frac13)\) (the shift). By linearity (Proposition 2.4(i)) and Lemma 2.27, \(\E[W]=\frac{1}{1/3}=3\) and \(\Var[W]=\frac{1}{(1/3)^{2}}=9\). Hence \[\E[X]=2+\E[W]=5,\qquad \Var[X]=\Var[2+W]=\Var[W]=9,\] the last step by Proposition 2.8(iii): adding a constant shifts a variable without spreading it, \(\Var[aX+b]=a^{2}\Var[X]\) with \(a=1\). The standard deviation is \(\sqrt9=3\).
If you prefer the direct route: \(\E[X]=\int_2^\infty x\cdot\frac13e^{-(x-2)/3}dx=5\) by substitution \(w=x-2\), and the same substitution gives \(\Var[X]=9\).
(iv) Tail: \(\P(X\ge x)=1-F_X(x)=e^{-(x-2)/3}\) for \(x\ge2\). Since \(\{X\ge8\}\subseteq\{X\ge5\}\), \[\P(X\ge8\mid X\ge5)=\frac{\P(X\ge8)}{\P(X\ge5)}=\frac{e^{-6/3}}{e^{-3/3}}=\frac{e^{-2}}{e^{-1}}=e^{-1} \approx 0.3679 .\] That is the same as \(\P(X\ge5)\) computed from the shifted start: \(\P(X\ge2+3)=e^{-1}\). The shift does not spoil the "no memory" behaviour once you are past the 2-minute set-up.
(v) The density of \(Y=e^{-(X-2)/3}\).
Support first. As \(x\) runs from 2 to \(\infty\), \(-(x-2)/3\) runs from 0 down to \(-\infty\), so \(e^{-(x-2)/3}\) runs from 1 down to 0. Hence \(S_Y=(0,1]\).
Monotonicity. \(g(x)=e^{-(x-2)/3}\) has \(g'(x)=-\frac13e^{-(x-2)/3}<0\): strictly decreasing and continuously differentiable on \([2,\infty)\). Proposition 2.51 applies — and the absolute value will do real work.
Invert. \(y=e^{-(x-2)/3}\Rightarrow \ln y=-\frac{x-2}{3}\Rightarrow x=2-3\ln y\). So \(g^{-1}(y)=2-3\ln y\), and \(\frac{d}{dy}g^{-1}(y)=-\frac3y\), whose absolute value is \(\frac3y\) (positive, since \(y>0\)).
Assemble. For \(y\in(0,1]\), \[p_Y(y)=p_X(2-3\ln y)\cdot\frac3y=\frac13e^{-\frac{(2-3\ln y)-2}{3}}\cdot\frac3y =\frac13e^{\ln y}\cdot\frac3y=\frac13\cdot y\cdot\frac3y=1 .\] Step by step: the exponent is \(-\frac{-3\ln y}{3}=\ln y\); then \(e^{\ln y}=y\); then the \(y\) cancels the \(\frac1y\) and the 3 cancels the \(\frac13\).
Answer. \(p_Y(y)=1\) for \(y\in(0,1]\) and 0 otherwise, that is \(Y\sim\Unif(0,1)\).
This is Drill D1 read backwards. Drill D1 fed a uniform through \(-\frac1\lambda\ln u\) to manufacture an exponential; here an exponential is fed through its own survival function \(x\mapsto\P(X\ge x)\) and a uniform comes out. That is a general fact (the "probability integral transform"): if \(F\) is a continuous cdf then \(F(X)\sim\Unif(0,1)\), and here \(Y=1-F_X(X)\), which is uniform for the same reason. The script's Proposition 2.23 is the statement in the other direction; the exams have never asked for it, but the computation above is exactly the kind they have asked for, with a decreasing \(g\) so that the absolute-value bars matter.
What to have automatic before the exam My addition
- \(\int_S p=1\) with the limits copied from the support, plus the sentence "and \(p\ge0\) there".
- The three-branch cdf template, and the two free checks \(F(\text{left end})=0\), \(F(\text{right end})=1\).
- \(F(x_q)=q\), and one word for why the second root is discarded.
- \(\E[X]=\int xp\), \(\E[X^2]=\int x^2p\), \(\Var=\E[X^2]-\E[X]^2\).
- Proposition 2.51 with the monotonicity check and with the absolute value; the cdf route as the fallback when monotonicity fails.
- The support of the transform, written before the formula.
- The four standard antiderivatives that have actually been needed: \(x\mapsto\frac{x^{2}}2\), \(x^{2}\mapsto\frac{x^{3}}3\), \(e^{ax}\mapsto\frac{e^{ax}}{a}\), \(x^{-1}\mapsto\ln x\).
The estimation, inequality and limit-theorem chain
This is the part of the paper where §3.1–§3.2 (models and estimators), §2.2 (the inequalities) and §2.4 (the limit theorems) are used together on one model. All three papers so far contain such a chain, each worth 9 to 12 credits, and each ends with a statement about a tail — a probability of being far from the target — which is either bounded (Markov, Chebyshev) or approximated (central limit theorem, abbreviated clt). The content differed every time; the shape did not.
What this slot has been WiSe25 · P4 (11 cr) · SoSe25 · P4 (12 cr) · SoSe26 · P4 (9 cr) + P3 (5 cr)
| Paper | Title as printed | Cr | The chain |
|---|---|---|---|
| WiSe 25/26 | Rainfall | 11 | (a) 4 derive the mle for \(p_\theta(x)=\theta^{-2}xe^{-x/\theta}\) → (b) 3 Chebyshev bound on \(\P(|\hat\theta-\theta|\ge\epsilon)\) → (c) 3 the same probability by the clt, in terms of \(\Phi\) → (d) 1 compare (b) and (c) in words |
| SoSe 2025 | Estimating and testing | 12 | (a) 4 derive the mle for \(\Poi(\lambda)\) → (b) 2 is it unbiased → (c) 2 its approximate law by the clt → (d) 4 a one-sided approximate z-test at \(\alpha=0.05\) |
| SoSe 2026 | Characteristic functions and tail bounds | 9 | (a) 1 the characteristic function of \(\P(X=\pm1)=\frac12\) → (b) 3 the characteristic function of \(Z_n=n^{-1/2}\sum X_j\) → (c) 2 \(\E[Z_n]\), \(\Var[Z_n]\) → (d) 3 a Markov bound for \(\P(|Z_n|\ge a)\) plus the clt approximation of the same |
| SoSe 2026 | Jensen's inequality (in position 3) | 5 | (a) 3 state Jensen with all assumptions → (b) 2 deduce \(\E[X]\le\log\E[e^{X}]\) |
How to read this table. Two of the three papers put a maximum-likelihood derivation here; the third put it in the last problem instead. All three finish with a tail bound or a tail approximation. That is what "has been asked" — and three papers, one of which is a retake with a visibly different shape, do not tell you what the fourth will contain.
Words and symbols used in this block My addition
- Sample: random variables \(X_1,\dots,X_n\), usually iid [unabhängig und identisch verteilt] — independent and identically distributed. Capital letters are random; the observed numbers are \(x_1,\dots,x_n\). \(\bar X_n:=\frac1n\sum_{i=1}^{n}X_i\) is the sample mean.
- Likelihood [Likelihood] (Definition 3.13, §3.1): for iid data, \(L(\theta\mid x)=\prod_{i=1}^{n}p_\theta(x_i)\) — the density or probability of the data you actually saw, read as a function of the unknown parameter \(\theta\). Log-likelihood \(\ell(\theta\mid x)=\ln L(\theta\mid x)\).
- Maximum likelihood estimator [Maximum-Likelihood-Schätzer], abbreviated mle (Definition 3.27, §3.2): \(\hat\theta_{\text{mle}}=\arg\max_{\theta\in\Theta}L(\theta\mid x)\) — the parameter value under which the observed data were most likely. \(\arg\max\) means "the argument at which the maximum is attained".
- Estimator [Schätzer] \(\hat\theta\): any function of the data used as a guess for \(\theta\). Bias [Verzerrung] \(\operatorname{bias}[\hat\theta]=\E_\theta[\hat\theta]-\theta\); unbiased means bias \(=0\); mean squared error \(\operatorname{mse}[\hat\theta]=\E_\theta[(\hat\theta-\theta)^2]\) (Definition 3.20, §3.2). The decomposition \(\operatorname{mse}=\Var[\hat\theta]+\operatorname{bias}[\hat\theta]^2\) is the single most-used identity in this block.
- Consistent [konsistent]: \(\hat\theta_n\xrightarrow{\ \P\ }\theta\), the estimator gets arbitrarily close to the truth in probability as \(n\) grows.
- Convergence in probability \(\xrightarrow{\P}\) (Definition 2.56(i)): \(\P(|X_n-X|>\epsilon)\to0\) for every \(\epsilon>0\). Almost surely \(\xrightarrow{\text{a.s.}}\) (2.56(ii)): \(\P(\{\omega:\lim_nX_n(\omega)=X(\omega)\})=1\). In distribution \(\xrightarrow{d}\) (2.56(iii)): \(F_{X_n}(x)\to F_X(x)\) at every \(x\) where \(F_X\) is continuous. See §2.4.
- Markov (Theorem 2.38): for \(X\ge0\) and \(\epsilon>0\), \(\P(X\ge\epsilon)\le\frac{\E[X]}{\epsilon}\). Chebyshev (Theorem 2.40): \(\P(|X-\E[X]|\ge\epsilon)\le\frac{\Var[X]}{\epsilon^{2}}\). Jensen (Theorem 2.42): for \(g:\R\to\R\) convex and \(\E[X]\) finite, \(\E[g(X)]\ge g(\E[X])\). See §2.2.
- Characteristic function [charakteristische Funktion], abbreviated cf (Definition 2.46): \(\varphi_X(t)=\E[e^{itX}]\), where \(i\) is the imaginary unit with \(i^{2}=-1\). Euler's formula \(e^{iu}=\cos u+i\sin u\) turns it into ordinary trigonometry for discrete variables. See §2.3.
- clt (Theorem 2.64): for \(X_1,X_2,\dots\) iid with finite mean \(\mu\) and finite, non-zero variance \(\sigma^{2}\), \(\frac{\sum_{i=1}^{n}X_i-n\mu}{\sigma\sqrt n}\xrightarrow{d}\mathcal N(0,1)\). \(\Phi\) is the cdf of \(\mathcal N(0,1)\), and \(\Phi(-z)=1-\Phi(z)\) by symmetry. See §2.4.
- \(\operatorname{mse}\), \(\operatorname{bias}\): written in upright letters, as in the script.
The five recipes this block runs on
Recipe A — derive a maximum likelihood estimator Script Def 3.13, Def 3.27
- Write the likelihood as a product: \(L(\theta\mid x)=\prod_{i=1}^{n}p_\theta(x_i)\). Collect the powers of \(\theta\) and merge the exponentials: \(\prod e^{-x_i/\theta}=e^{-\frac1\theta\sum x_i}\).
- Take logs: \(\ell=\ln L\). Logs turn products into sums, and \(\ln\) is strictly increasing, so the maximiser is unchanged — say that sentence, it is the justification for the whole step. Drop additive terms that contain no \(\theta\) (such as \(\sum\ln x_i\) or \(-\ln\prod x_i!\)) and say you are dropping them and why.
- Differentiate and set to zero: solve \(\frac{d\ell}{d\theta}=0\) for \(\theta\). Call the solution \(\hat\theta\).
- Prove it is a maximum, and a global one. Both official solutions do a second-derivative check. The cleanest complete argument is the sign of \(\ell'\): if \(\ell'>0\) to the left of \(\hat\theta\) and \(\ell'<0\) to the right, then \(\ell\) rises then falls, so \(\hat\theta\) is the global maximum on the parameter set.
- If the derivative route cannot work, say so and argue directly. When the parameter appears in the support (as in \(\Unif(0,\theta)\)), \(L\) is discontinuous and \(\frac{d\ell}{d\theta}=0\) has no useful solution; you must read the maximum off the shape of \(L\). This has not been examined yet, and it is the one gap in the two examined mle tasks — Drill E5 below covers it.
- If the model is a reparametrisation, find the mle of the easy parameter and then invert the known map (the mle is invariant under a bijective reparametrisation). Check that the result lies in the parameter set.
Recipe B — bias, variance, mse, consistency Script Def 3.20, Prop 2.4(i), Prop 2.8(iii)(iv)
- Write the estimator as \(c\sum_iX_i\) or as \(\bar Y_n\) after a linear map.
- Mean: constants come out, then linearity (Proposition 2.4(i)): \(\E[\sum X_i]=\sum\E[X_i]\). No independence is needed here — say so, because it is often the difference between a correct and a hand-waving answer.
- Variance: constants come out squared (Proposition 2.8(iii), \(\Var[aX]=a^{2}\Var[X]\)), then variances of independent summands add (Proposition 2.8(iv)). Independence is needed here and only here — name it.
- mse: \(\operatorname{mse}=\Var+\operatorname{bias}^{2}\). If the bias is 0, then \(\operatorname{mse}=\Var\), one line.
- Consistency, the cheap route: if \(\operatorname{mse}[\hat\theta_n]\to0\) then \(\hat\theta_n\xrightarrow{\P}\theta\). Reason: Markov applied to the non-negative variable \((\hat\theta_n-\theta)^{2}\) gives \(\P(|\hat\theta_n-\theta|\ge\epsilon)=\P((\hat\theta_n-\theta)^{2}\ge\epsilon^{2}) \le\frac{\operatorname{mse}[\hat\theta_n]}{\epsilon^{2}}\to0\). Three lines, and it works for biased estimators too.
- If the estimator is a count divided by \(n\), recognise the \(\Bin(n,p)\) behind it and reuse \(\E=np\), \(\Var=np(1-p)\) (Lemma 2.26(iv)) instead of re-deriving.
Recipe C — bound a tail with Markov or Chebyshev Script Thm 2.38, Thm 2.40
- Reshape the event. Chebyshev wants \(\{|Y-\E[Y]|\ge\epsilon\}\); Markov wants a non-negative variable over a threshold. For \(\P(|Z|\ge a)\) with \(\E[Z]=0\) the official move is \(\{|Z|\ge a\}=\{Z^{2}\ge a^{2}\}\) followed by Markov on \(Z^{2}\). For "\(X\) lies in \([\E[X]\pm k]\) with probability at least \(90\%\)" the move is \(\P(X\notin[\E X\pm k])\le0.1\iff\P(|X-\E X|>k)\le0.1\).
- Compute \(\E[Y]\) and \(\Var[Y]\) (or \(\E[Z^{2}]=\Var[Z]+\E[Z]^{2}\)) as a separate labelled step.
- Apply the theorem by name and number.
- If a value is wanted, set the bound equal to the allowed failure probability and solve; round in the direction that keeps the inequality true, and say which direction that is and why.
Recipe D — approximate the same tail with the clt Script Thm 2.64
- Check the hypotheses out loud: iid, finite mean, finite and non-zero variance.
- Standardise: \(\frac{\hat\theta-\E[\hat\theta]}{\sqrt{\Var[\hat\theta]}}\xrightarrow{d}\mathcal N(0,1)\), so for large \(n\), \(\hat\theta\) is approximately \(\mathcal N(\theta,\Var[\hat\theta])\).
- Two-sided tail: \(\P(|\hat\theta-\theta|\ge\epsilon)\approx2\Phi\!\left(-\frac{\epsilon}{\text{sd}}\right) =2\Bigl(1-\Phi\bigl(\tfrac{\epsilon}{\text{sd}}\bigr)\Bigr)\), where sd \(=\sqrt{\Var[\hat\theta]}\). Leave \(\Phi\) symbolic. No table has ever been supplied and none is needed.
- Use the word approximation. A whole credit (WiSe25 P4d) was for saying that Chebyshev is a valid but loose guarantee decaying like \(1/n\), whereas the clt is only approximate but far sharper.
Recipe E — compute a characteristic function Script Def 2.46, Rem 2.47
- Definition: \(\varphi_X(t)=\E[e^{itX}]\). For a finite discrete \(X\), this is the finite sum \(\sum_x e^{itx}\P(X=x)\); Euler's formula \(e^{iu}=\cos u+i\sin u\) then tidies it. (Simplifying to a cosine was explicitly not required for the credit in SoSe26 P4a.)
- Affine maps (Remark 2.47(ii)): \(\varphi_{aX+b}(t)=e^{itb}\varphi_X(at)\).
- Independence turns sums into products (Remark 2.47(iv)): \(\varphi_{X+Y}=\varphi_X\varphi_Y\); for an iid sum, \(\varphi_{S_n}(t)=\varphi_{X_1}(t)^{n}\).
- Combine for a scaled sum: \(\varphi_{Z_n}(t)=\varphi_{X_1}\!\bigl(\tfrac{t}{\sqrt n}\bigr)^{n}\).
- Moments from derivatives at 0 (Remark 2.47(iii)): \(\E[X^{k}]=i^{-k}\varphi_X^{(k)}(0)\).
Drill bank — ten chains
Drills E1–E4 are the four past chains, part by part, with the credits printed on the papers. Drills E5–E10 are six I wrote to cover what the past four leave untested: an mle where differentiating fails, a case where the mle is beaten at finite \(n\), Chebyshev against the clt on the same numbers, a different characteristic function, a Jensen argument that is not the exam's, and a convergence-ladder decision.
Drill E1 — Rainfall: mle → Chebyshev → clt → compare WiSe25 · P4a–d · 11 credits
Rainfall in a fixed timespan is modelled by \(p_\theta:\R_{\ge0}\to\R\), \(p_\theta(x)=\frac{1}{\theta^{2}}x\,e^{-x/\theta}\), with \(\theta>0\) unknown. Let \(X_1,\dots,X_n\) be iid with this density.
- (4 cr) Show by a full derivation that \(\hat\theta_{\text{mle}}=\frac{1}{2n}\sum_{i=1}^{n}X_i\).
- (3 cr) Use Chebyshev to bound \(\P_\theta(|\hat\theta_{\text{mle}}-\theta|\ge\epsilon)\). Hint given on the exam: \(\E[X_i]=2\theta\), \(\Var[X_i]=2\theta^{2}\).
- (3 cr) Use the clt to approximate the same probability in terms of \(\Phi\).
- (1 cr) Comment on the key differences between (b) and (c).
Solution
(a) The mle. For \(x\in\R_{\ge0}^{n}\), \[L(\theta\mid x)=\prod_{i=1}^{n}\frac{1}{\theta^{2}}x_ie^{-x_i/\theta} =\theta^{-2n}\Bigl(\prod_{i=1}^{n}x_i\Bigr)\exp\Bigl(-\frac1\theta\sum_{i=1}^{n}x_i\Bigr).\] Three separate algebra facts were used: \(\prod\frac1{\theta^2}=\theta^{-2n}\) (\(n\) equal factors); the \(x_i\) collect into one product; and \(\prod e^{-x_i/\theta}=e^{-\sum x_i/\theta}\) (multiplying powers of \(e\) adds exponents).
Take the logarithm. \(\ln\) is strictly increasing on \((0,\infty)\), so it does not move the maximiser. Writing \(s:=\sum_{i=1}^{n}x_i\), \[\ell(\theta\mid x)=-2n\ln\theta-\frac{s}{\theta}+\underbrace{\sum_{i=1}^{n}\ln x_i}_{\text{no }\theta\text{ in it}} .\] The last term does not depend on \(\theta\), so it shifts \(\ell\) up or down by a constant and cannot move the maximiser; drop it.
Differentiate with respect to \(\theta\), using \(\frac{d}{d\theta}\ln\theta=\frac1\theta\) and \(\frac{d}{d\theta}\theta^{-1}=-\theta^{-2}\): \[\frac{d\ell}{d\theta}=-\frac{2n}{\theta}+\frac{s}{\theta^{2}}=\frac{-2n\theta+s}{\theta^{2}} \stackrel{!}{=}0\;\Longrightarrow\;s=2n\theta\;\Longrightarrow\;\hat\theta=\frac{s}{2n}=\frac1{2n}\sum_{i=1}^{n}x_i .\] (The denominator \(\theta^{2}\) is never zero for \(\theta>0\), so only the numerator matters.)
The official maximum check is incomplete — add one line
The printed solution computes \(\ell''(\theta)=\frac{2n}{\theta^{2}}-\frac{2s}{\theta^{3}} =\frac{2}{\theta^{3}}(n\theta-s)\) and evaluates it at \(\hat\theta\): \(n\hat\theta-s=\frac s2-s=-\frac s2<0\), so \(\ell''(\hat\theta)<0\). That proves a local maximum only — indeed \(\ell''(\theta)>0\) for \(\theta>s/n\), so \(\ell\) is convex far out to the right. The complete argument is the sign of the first derivative: from \(\ell'=\frac{s-2n\theta}{\theta^{2}}\), the numerator is positive exactly for \(\theta<\hat\theta\) and negative exactly for \(\theta>\hat\theta\), while \(\theta^{2}>0\) always. So \(\ell\) strictly increases up to \(\hat\theta\) and strictly decreases after it: \(\hat\theta\) is the global maximum on \((0,\infty)\). One extra line. Write it.
(b) Chebyshev. First the two moments of the estimator, using the hint \(\E[X_i]=2\theta\), \(\Var[X_i]=2\theta^{2}\): \[\E[\hat\theta_{\text{mle}}]=\frac1{2n}\sum_{i=1}^{n}\E[X_i]=\frac{1}{2n}\cdot n\cdot2\theta=\theta \quad\text{(linearity, Prop 2.4(i); no independence needed),}\] \[\Var[\hat\theta_{\text{mle}}]=\frac{1}{(2n)^{2}}\sum_{i=1}^{n}\Var[X_i]=\frac{1}{4n^{2}}\cdot n\cdot2\theta^{2} =\frac{\theta^{2}}{2n}\quad\text{(Prop 2.8(iii) for the square, Prop 2.8(iv) for the sum — here independence is used).}\] So the estimator is unbiased. Chebyshev (Theorem 2.40) with \(Y=\hat\theta_{\text{mle}}\) and \(\E[Y]=\theta\): \[\P_\theta\bigl(|\hat\theta_{\text{mle}}-\theta|\ge\epsilon\bigr)\le\frac{\Var[\hat\theta_{\text{mle}}]}{\epsilon^{2}} =\frac{\theta^{2}}{2n\epsilon^{2}} .\]
(c) clt. Hypotheses of Theorem 2.64: the \(X_i\) are iid, \(\E[X_i]=2\theta\) is finite, and \(\Var[X_i]=2\theta^{2}\) is finite and non-zero (because \(\theta>0\)). Therefore \[\frac{\hat\theta_{\text{mle}}-\theta}{\sqrt{\Var[\hat\theta_{\text{mle}}]}} =\frac{\hat\theta_{\text{mle}}-\theta}{\theta/\sqrt{2n}}\xrightarrow{d}\mathcal N(0,1),\] i.e. \(\hat\theta_{\text{mle}}\) is approximately \(\mathcal N\bigl(\theta,\frac{\theta^{2}}{2n}\bigr)\). Hence \[\P_\theta\bigl(|\hat\theta_{\text{mle}}-\theta|\ge\epsilon\bigr) =\P\Bigl(\Bigl|\tfrac{\hat\theta-\theta}{\theta/\sqrt{2n}}\Bigr|\ge\tfrac{\epsilon\sqrt{2n}}{\theta}\Bigr) \approx 2\Phi\Bigl(-\frac{\sqrt{2n}\,\epsilon}{\theta}\Bigr),\] using \(\P(|Z|\ge a)=2\P(Z\le-a)=2\Phi(-a)\) for a standard normal \(Z\), by symmetry of the bell curve.
(d) The comparison (1 credit, purely verbal). Chebyshev is an exact guarantee valid for every \(n\) and every distribution with a finite variance, but it decays only like \(\frac1n\) and is usually loose. The clt expression is only an approximation, valid for large \(n\), but it decays far faster (the normal tail falls off like \(e^{-z^{2}/2}\)), so it is much sharper. A numerical illustration is Drill E7 below.
Note on the form of the answer. \(2\Phi(-\sqrt{2n}\,\epsilon/\theta)\) still contains the unknown \(\theta\). That is what was asked, and it is not a number. Do not "improve" the answer by substituting \(\hat\theta\) for \(\theta\) unless the question asks for that. The guide works this chain on the chapter pages: the mle and the moments at §3.2, the Chebyshev step at §2.2, the clt step at §2.4.
Drill E2 — Poisson: mle → unbiased → clt → z-test SoSe25 · P4a–d · 12 credits
Let \(X_1,\dots,X_n\) be iid \(\Poi(\lambda)\), \(\lambda>0\) unknown. Hints given on the exam: the pmf is \(p(x)=\frac{e^{-\lambda}\lambda^{x}}{x!}\) with mean and variance \(\lambda\); the derivative of \(\ln t\) is \(1/t\); and \(z_{0.05}\approx1.64\).
- (4 cr) Explicitly derive \(\hat\lambda_{\text{mle}}\).
- (2 cr) Is \(\hat\lambda_{\text{mle}}\) unbiased?
- (2 cr) Give its approximate distribution for large \(n\) by the clt.
- (4 cr) With \(\lambda_0=4\), \(n=100\), \(\bar x=5\), \(\alpha=0.05\): construct an approximate test and decide.
Solution
(a) With \(s:=\sum_{i=1}^{n}x_i\), \[L(\lambda\mid x)=\prod_{i=1}^{n}\frac{e^{-\lambda}\lambda^{x_i}}{x_i!} =\frac{e^{-n\lambda}\lambda^{s}}{\prod_{i=1}^{n}x_i!},\] because \(n\) factors \(e^{-\lambda}\) multiply to \(e^{-n\lambda}\) and \(\prod\lambda^{x_i}=\lambda^{\sum x_i}\).
Log-likelihood (dropping \(-\ln\prod x_i!\), which contains no \(\lambda\)): \(\ell(\lambda)=-n\lambda+s\ln\lambda\). Differentiate: \[\frac{d\ell}{d\lambda}=-n+\frac{s}{\lambda}\stackrel{!}{=}0\;\Longrightarrow\;\lambda=\frac{s}{n}=\bar x_n .\] Maximum check: \(\frac{d^{2}\ell}{d\lambda^{2}}=-\frac{s}{\lambda^{2}}<0\) whenever \(s>0\), so \(\ell\) is strictly concave and \(\hat\lambda_{\text{mle}}=\bar X_n\) is the global maximum.
A hidden condition in the official maximum check
"\(\frac{d^{2}\ell}{d\lambda^{2}}=-\frac{\sum x_i}{\lambda^{2}}<0\)" silently assumes \(\sum x_i>0\). If every observation is 0 then \(\ell(\lambda)=-n\lambda\), which is strictly decreasing on \((0,\infty)\) and has no interior maximum: the likelihood is maximised at the boundary \(\lambda\downarrow0\), which is outside the parameter set \((0,\infty)\). The event has probability \(e^{-n\lambda}\), tiny but positive. Writing "for \(\sum x_i>0\)" costs one clause.
(b) Unbiasedness. \(\E[\hat\lambda_{\text{mle}}]=\E[\bar X_n]=\frac1n\sum_{i=1}^{n}\E[X_i] =\frac1n\cdot n\lambda=\lambda\) by linearity (Proposition 2.4(i)) and \(\E[X_i]=\lambda\) (Lemma 2.26(vii)). The bias is \(\lambda-\lambda=0\): unbiased.
(c) clt. The \(X_i\) are iid with finite mean \(\lambda\) and finite non-zero variance \(\lambda\), so Theorem 2.64 applies. \(\Var[\bar X_n]=\frac{1}{n^{2}}\cdot n\lambda=\frac\lambda n\), hence \[\frac{\bar X_n-\lambda}{\sqrt{\lambda/n}}\xrightarrow{d}\mathcal N(0,1), \qquad\text{i.e. }\;\hat\lambda_{\text{mle}}\ \text{is approximately}\ \mathcal N\Bigl(\lambda,\frac{\lambda}{n}\Bigr).\]
What the official solution admitted about the neighbouring Problem 2a
On the same paper, the model answer to P2a (state the clt) printed the note: "We'll count all of these as correct even though the ones for \(S_n\) and \(\bar X_n\) are mathematically incorrect." Writing "\(\bar X_n\xrightarrow{d}\mathcal N(\lambda,\lambda/n)\)" is wrong as a convergence statement, because a limit law cannot depend on \(n\). The correct sentence is either the standardised limit above, or the word approximately for finite \(n\), as written here. Do not rely on the leniency.
(d) The test. The question is whether the rate has increased above 4 — directional wording, so the test is one-sided (Definition 3.43): \[H_0:\lambda\le4\qquad\text{against}\qquad H_1:\lambda>4 .\] At the null boundary \(\lambda_0=4\): \(\E[\bar X_{100}]=4\) and \(\Var[\bar X_{100}]=\frac{4}{100}=0.04\), so the standard deviation is \(\sqrt{0.04}=0.2\). By the clt the statistic \[Z=\frac{\bar X_n-\lambda_0}{\sqrt{\lambda_0/n}}=\frac{\bar X_{100}-4}{0.2}\] is approximately \(\mathcal N(0,1)\) under the null boundary. Rejection rule for a one-sided test at level \(\alpha=0.05\): reject \(H_0\) if \(z_{\text{obs}}>z_{0.05}\approx1.64\). Observed value: \[z_{\text{obs}}=\frac{5-4}{0.2}=5 .\] Since \(5>1.64\) we reject \(H_0\) at the approximate level 0.05: the data give evidence that \(\lambda>4\).
Two traps in one part. First, the variance is evaluated at the null boundary \(\lambda_0=4\), not at the observed \(\bar x=5\). Second, the cut-off is \(z_{0.05}=1.64\) and not \(z_{0.025}=1.96\), because the alternative is one-sided. Both tests ever set on these papers were one-sided. The test itself is worked in full at §3.3.
Drill E3 — Characteristic functions and tail bounds SoSe26 · P4a–d · 9 credits
Let \(X_1,X_2,\dots\) be iid with \(\P(X_j=1)=\P(X_j=-1)=\frac12\), and set \(Z_n:=\frac{1}{\sqrt n}\sum_{j=1}^{n}X_j\). Hints on the exam: Euler's formula \(e^{iu}=\cos u+i\sin u\); and "if you could not solve (c), you may use \(\E[Z_n^{2}]=1\)".
- (1 cr) Compute \(\varphi_{X_1}(t)\).
- (3 cr) Compute \(\varphi_{Z_n}(t)\).
- (2 cr) Compute \(\E[Z_n]\) and \(\Var[Z_n]\).
- (3 cr) For \(a>0\), bound \(\P(|Z_n|\ge a)\) with Markov, and approximate it with the clt.
Solution
(a) By Definition 2.46, and because \(X_1\) takes only the two values \(\pm1\), \[\varphi_{X_1}(t)=\E[e^{itX_1}]=e^{it\cdot1}\cdot\tfrac12+e^{it\cdot(-1)}\cdot\tfrac12 =\tfrac12e^{it}+\tfrac12e^{-it}=\cos t,\] the last step by Euler: \(e^{it}=\cos t+i\sin t\) and \(e^{-it}=\cos t-i\sin t\); adding them the sine terms cancel and the cosines double, so the half-sum is \(\cos t\). (The official note says that simplifying to \(\cos t\) was not required for the credit.)
(b) Write \(Z_n=\frac{1}{\sqrt n}\sum_jX_j\). Then \[\varphi_{Z_n}(t)=\E\Bigl[\exp\Bigl(it\tfrac1{\sqrt n}\sum_{j=1}^{n}X_j\Bigr)\Bigr] =\E\Bigl[\prod_{j=1}^{n}\exp\Bigl(i\tfrac{t}{\sqrt n}X_j\Bigr)\Bigr] =\prod_{j=1}^{n}\E\Bigl[\exp\Bigl(i\tfrac{t}{\sqrt n}X_j\Bigr)\Bigr] =\varphi_{X_1}\!\Bigl(\tfrac{t}{\sqrt n}\Bigr)^{n}=\cos^{n}\!\Bigl(\tfrac{t}{\sqrt n}\Bigr).\] The first equality turns a sum in the exponent into a product (\(e^{a+b}=e^ae^b\)); the second pulls the expectation inside the product, which is legitimate because the \(X_j\) are independent (Remark 2.47(iv)) — name that; the third uses that they are identically distributed, so every factor is the same function evaluated at \(t/\sqrt n\).
The marking split this into 1 credit for the \(t/\sqrt n\) scaling, 1 for using independence to get a product, 1 for the final expression — and it grants follow-through credit: a wrong (a) carried forward correctly here loses nothing.
(c) Directly: \(\E[X_j]=1\cdot\frac12+(-1)\cdot\frac12=0\), and since \(X_j^{2}=1\) always, \(\E[X_j^{2}]=1\), so \(\Var[X_j]=\E[X_j^{2}]-\E[X_j]^{2}=1-0=1\). Then \[\E[Z_n]=\frac{1}{\sqrt n}\sum_{j=1}^{n}\E[X_j]=0,\qquad \Var[Z_n]=\frac{1}{(\sqrt n)^{2}}\sum_{j=1}^{n}\Var[X_j]=\frac1n\cdot n=1 .\] (Variance: constants come out squared, Proposition 2.8(iii); independent variances add, 2.8(iv).)
The official alternative route is stated without its computation
The model answer offers "\(\varphi'_{Z_n}(0)=0\), \(\varphi''_{Z_n}(0)=-1\)" and then Remark 2.47(iii). It does not show the differentiation. If you take that route you should: with \(f(t)=\cos^{n}(t/\sqrt n)\), \(f'(t)=-\sqrt n\cos^{n-1}(t/\sqrt n)\sin(t/\sqrt n)\), which is 0 at \(t=0\) because \(\sin 0=0\); and differentiating once more and setting \(t=0\) (where \(\cos0=1\), \(\sin0=0\)) leaves \(f''(0)=-\cos^{n-1}(0)=-1\). Then \(\E[Z_n]=i^{-1}f'(0)=0\) and \(\E[Z_n^{2}]=i^{-2}f''(0)=-(-1)=1\). The direct route in (c) above is shorter and scores the same — the official note says so.
(d) Markov. \(Z_n\) itself can be negative, so Markov cannot be applied to it. But \(Z_n^{2}\ge0\) always, and squaring is order-preserving on non-negative numbers, so \(\{|Z_n|\ge a\}=\{Z_n^{2}\ge a^{2}\}\). Theorem 2.38 gives \[\P(|Z_n|\ge a)=\P(Z_n^{2}\ge a^{2})\le\frac{\E[Z_n^{2}]}{a^{2}}=\frac{1}{a^{2}},\] where \(\E[Z_n^{2}]=\Var[Z_n]+\E[Z_n]^{2}=1+0=1\).
clt. The \(X_j\) are iid with mean 0 and variance 1 (both finite, the variance non-zero), so Theorem 2.64 gives \(Z_n\xrightarrow{d}\mathcal N(0,1)\). Hence for large \(n\) \[\P(|Z_n|\ge a)\approx\P(|Z|\ge a)=2\bigl(1-\Phi(a)\bigr)=2\Phi(-a).\]
Two bounds, one picture. The Markov bound \(1/a^{2}\) is valid for every \(n\) and needs only the second moment. The clt value \(2\Phi(-a)\) needs \(n\) large but is dramatically smaller: at \(a=3\), \(1/a^{2}=0.1111\) while \(2\Phi(-3)=0.002700\) — a factor of about 41. At \(a=4\): \(0.0625\) against \(2\Phi(-4)=6.334\cdot10^{-5}\), a factor of about 987. Applying Markov to \(Z_n^2\) here is exactly Chebyshev in disguise, since \(\E[Z_n]=0\). The guide works this problem at §2.3 and §2.2.
Drill E4 — Jensen stated and applied SoSe26 · P3a–b · 5 credits
- (3 cr) State Jensen's inequality with all required assumptions.
- (2 cr) Let \(X\) be such that \(\E[X]\) and \(\E[e^{X}]\) exist and are finite. Show \(\E[X]\le\log\bigl(\E[e^{X}]\bigr)\).
Solution, with the official credit split
(a) Theorem 2.42 (Jensen's inequality). Let \(X\) be a real random variable such that \(\E[X]\) is finite. Let \(g:\R\to\R\) be a convex function. Then \[\E[g(X)]\ge g(\E[X]).\]
The official credit split was: 1 credit for "\(X\) with finite expectation", 1 for "\(g:\R\to\R\) convex", 1 for the correct inequality direction. Three assumptions, three credits — this is a pure recall item and the marking is per clause. The parenthetical extras in the model answer (the equality case for strictly convex \(g\), and the reversed inequality for concave \(g\)) were explicitly not graded.
What "convex" means [konvex]: for all \(x,y\in\R\) and \(t\in[0,1]\), \(g(tx+(1-t)y)\le t\,g(x)+(1-t)g(y)\) — the chord between two points of the graph lies on or above the graph. For twice differentiable \(g\) this is the same as \(g''\ge0\).
(b) The function \(g(x)=e^{x}\) is convex on \(\R\), because \(g''(x)=e^{x}>0\) everywhere. So Jensen with this \(g\) gives \[e^{\E[X]}=g(\E[X])\le\E[g(X)]=\E[e^{X}].\] Now apply \(\log\) to both sides. Two facts are needed, and the official scheme marks them separately:
- \(\log\) is strictly increasing on \((0,\infty)\), so applying it to both sides of an inequality preserves the direction;
- \(e^{X}>0\) pointwise, hence \(\E[e^{X}]>0\), so the logarithm of the right-hand side is defined. (The left-hand side \(e^{\E[X]}\) is positive for the same reason.)
Therefore \(\log\bigl(e^{\E[X]}\bigr)\le\log\bigl(\E[e^{X}]\bigr)\), and since \(\log(e^{a})=a\), this reads \(\E[X]\le\log\bigl(\E[e^{X}]\bigr)\), as required.
What the marking scheme reveals. "Marks were given separately for '\(\log\) is increasing on \((0,\infty)\)' and '\(\E[e^{X}]>0\)'." Steps that feel too small to mention are exactly the ones being counted. Say them. Worked also at §2.2.
Drill E5 — an mle where differentiating fails: \(\Unif(0,\theta)\) My problem · 12 credits
Let \(X_1,\dots,X_n\) be iid \(\Unif(0,\theta)\), that is with density \(p_\theta(x)=\frac1\theta\) for \(x\in[0,\theta]\) and 0 otherwise, with \(\theta>0\) unknown.
- (3 cr) Show that the likelihood cannot be maximised by setting a derivative to zero, and derive \(\hat\theta_{\text{mle}}=\max\{X_1,\dots,X_n\}\).
- (3 cr) Given that \(M_n:=\max_iX_i\) has cdf \(F_{M_n}(m)=(m/\theta)^{n}\) on \([0,\theta]\), compute \(\E[M_n]\) and \(\Var[M_n]\), and give the bias and the mse of \(\hat\theta_{\text{mle}}\).
- (2 cr) Construct an unbiased estimator from \(M_n\) and compute its mse.
- (2 cr) Compare all of this with the "moment" estimator \(\tilde\theta_n=2\bar X_n\) at \(n=10\).
- (2 cr) Show directly that \(M_n\xrightarrow{\P}\theta\), i.e. that the mle is consistent.
Solution
(a) Why the derivative route breaks, and what to do instead. The likelihood is \[L(\theta\mid x)=\prod_{i=1}^{n}p_\theta(x_i) =\begin{cases}\dfrac{1}{\theta^{n}},&\text{if }x_i\in[0,\theta]\text{ for every }i,\\[6pt] 0,&\text{otherwise.}\end{cases}\] The condition "\(x_i\le\theta\) for every \(i\)" is the same as "\(\max_ix_i\le\theta\)". So, as a function of \(\theta\), \(L\) is zero for \(\theta<\max_ix_i\), then jumps to \(\frac{1}{\theta^{n}}\) at \(\theta=\max_ix_i\), and then decreases (because \(\theta^{-n}\) is decreasing in \(\theta\) for \(\theta>0\)).
A function with a jump is not differentiable there, and where it is differentiable its derivative \(\frac{d}{d\theta}\theta^{-n}=-n\theta^{-n-1}\) is never zero. So the equation \(\frac{d\ell}{d\theta}=0\) has no solution and Recipe A step 3 is unusable. This is the case flagged in Recipe A step 5.
Read the maximum off the shape instead: \(L\) is 0 below \(\max_ix_i\) and strictly decreasing above it, so the largest value of \(L\) is attained exactly at \[\hat\theta_{\text{mle}}=\max\{x_1,\dots,x_n\}=:m_n .\] Note what this says: the mle can never exceed the largest observation, so it always underestimates \(\theta\) — a bias is built in.
(b) Moments of the maximum. Differentiating the given cdf (Lemma 1.49(ii)) gives the density of \(M_n\) on \([0,\theta]\): \(p_{M_n}(m)=\frac{d}{dm}\frac{m^{n}}{\theta^{n}}=\frac{n\,m^{n-1}}{\theta^{n}}\). (Where the cdf comes from, in one line: \(\{M_n\le m\}\) means every \(X_i\le m\), and by independence that has probability \(\prod_i\P(X_i\le m)=(m/\theta)^{n}\).) Then \[\E[M_n]=\int_0^{\theta}m\cdot\frac{nm^{n-1}}{\theta^{n}}dm=\frac{n}{\theta^{n}}\Bigl[\frac{m^{n+1}}{n+1}\Bigr]_0^{\theta} =\frac{n}{n+1}\theta,\] \[\E[M_n^{2}]=\frac{n}{\theta^{n}}\Bigl[\frac{m^{n+2}}{n+2}\Bigr]_0^{\theta}=\frac{n}{n+2}\theta^{2},\qquad \Var[M_n]=\frac{n}{n+2}\theta^{2}-\frac{n^{2}}{(n+1)^{2}}\theta^{2} =\frac{n\,\theta^{2}}{(n+1)^{2}(n+2)} .\] (The last simplification: put over the common denominator \((n+1)^2(n+2)\); the numerator is \(n(n+1)^{2}-n^{2}(n+2)=n\bigl[(n^{2}+2n+1)-(n^{2}+2n)\bigr]=n\).)
Bias: \(\operatorname{bias}[M_n]=\frac{n}{n+1}\theta-\theta=-\frac{\theta}{n+1}<0\) — negative, as predicted. mse: \[\operatorname{mse}[M_n]=\Var[M_n]+\operatorname{bias}^{2} =\frac{n\theta^{2}}{(n+1)^{2}(n+2)}+\frac{\theta^{2}}{(n+1)^{2}} =\frac{\theta^{2}\bigl(n+(n+2)\bigr)}{(n+1)^{2}(n+2)}=\frac{2\theta^{2}}{(n+1)(n+2)},\] where the last step cancels one factor \((n+1)\) from \(2n+2=2(n+1)\).
(c) An unbiased version. Since \(\E[M_n]=\frac{n}{n+1}\theta\), multiplying by the reciprocal constant fixes the mean: put \(\hat\theta^{\,*}:=\frac{n+1}{n}M_n\). Then \(\E[\hat\theta^{\,*}]=\frac{n+1}{n}\cdot\frac{n}{n+1}\theta=\theta\): unbiased. Its variance, by Proposition 2.8(iii) (constants come out squared), \[\Var[\hat\theta^{\,*}]=\Bigl(\frac{n+1}{n}\Bigr)^{2}\frac{n\theta^{2}}{(n+1)^{2}(n+2)} =\frac{\theta^{2}}{n(n+2)},\] and since the bias is 0, \(\operatorname{mse}[\hat\theta^{\,*}]=\frac{\theta^{2}}{n(n+2)}\).
(d) Numbers at \(n=10\) (all in units of \(\theta^{2}\)):
| estimator | bias | variance | mse at \(n=10\) |
|---|---|---|---|
| \(M_n\) (the mle) | \(-\theta/(n+1)\) | \(\theta^{2}n/((n+1)^{2}(n+2))\) | \(2\theta^{2}/132=0.01515\,\theta^{2}\) |
| \(\frac{n+1}{n}M_n\) | 0 | \(\theta^{2}/(n(n+2))\) | \(\theta^{2}/120=0.008333\,\theta^{2}\) |
| \(2\bar X_n\) | 0 | \(\theta^{2}/(3n)\) | \(\theta^{2}/30=0.03333\,\theta^{2}\) |
For \(2\bar X_n\): \(\E[X_i]=\frac\theta2\) so \(\E[2\bar X_n]=\theta\) (unbiased), and \(\Var[X_i]=\frac{\theta^{2}}{12}\) (Lemma 2.27), so \(\Var[2\bar X_n]=4\cdot\frac{1}{n^{2}}\cdot n\cdot\frac{\theta^{2}}{12}=\frac{\theta^{2}}{3n}\).
In words: the corrected maximum is about four times more accurate than the sample-mean estimator here, and about 1.8 times more accurate than the raw mle. Its mse shrinks like \(1/n^{2}\), while the sample-mean estimator's shrinks only like \(1/n\).
(e) Consistency. Definition 2.56(i) asks for \(\P(|M_n-\theta|>\epsilon)\to0\) for every \(\epsilon>0\). Fix \(0<\epsilon<\theta\). Since \(M_n\le\theta\) always, the event \(\{|M_n-\theta|>\epsilon\}\) is exactly \(\{M_n<\theta-\epsilon\}\). So \[\P(|M_n-\theta|>\epsilon)=\P(M_n<\theta-\epsilon)\le F_{M_n}(\theta-\epsilon) =\Bigl(\frac{\theta-\epsilon}{\theta}\Bigr)^{n}=\Bigl(1-\frac{\epsilon}{\theta}\Bigr)^{n}\xrightarrow[n\to\infty]{}0,\] because \(0\le1-\frac\epsilon\theta<1\) and \(q^{n}\to0\) for \(|q|<1\) (Analysis 2.1). For \(\epsilon\ge\theta\) the probability is 0 outright. Hence \(M_n\xrightarrow{\P}\theta\): the mle is consistent.
Numerically, with \(\epsilon=0.1\theta\) and \(n=10\): \(0.9^{10}=0.3487\); at \(n=50\): \(0.9^{50}=0.005154\). The convergence is geometric, far faster than the \(1/n\) that Chebyshev would give for a sample mean.
Why this drill matters. Both examined mle tasks had a smooth interior maximum, so they never tested whether you know why the derivative trick works. If a parameter sits in the support of the density, it does not. And note part (d): the maximum likelihood estimator \(M_n\) is beaten at every finite \(n\) by \(\frac{n+1}{n}M_n\). That is exactly the content of the true/false item SoSe26 P1e, whose answer is "false" — the mle has no finite-sample optimality guarantee (Remark 3.30, §3.2).
Drill E6 — bias, variance, mse and when a biased estimator wins My problem · 10 credits
Let \(X_1,\dots,X_n\) be iid \(\Ber(p)\), \(p\in[0,1]\) unknown, and write \(S=\sum_{i=1}^{n}X_i\). Consider \[\hat p=\bar X_n=\frac{S}{n}\qquad\text{and}\qquad \tilde p=\frac{S+1}{n+2}.\]
- (2 cr) Compute \(\E[\hat p]\), \(\Var[\hat p]\), \(\operatorname{mse}[\hat p]\).
- (3 cr) Compute \(\E[\tilde p]\), its bias, \(\Var[\tilde p]\) and \(\operatorname{mse}[\tilde p]\).
- (3 cr) At \(n=10\), decide which estimator has the smaller mse at \(p=0.5\), at \(p=0.2\) and at \(p=0.9\). What do you conclude?
- (2 cr) Show that both estimators are consistent.
Solution
(a) \(S\sim\Bin(n,p)\) (a sum of \(n\) independent \(\Ber(p)\) variables), so \(\E[S]=np\) and \(\Var[S]=np(1-p)\) (Lemma 2.26(iv)). Hence \[\E[\hat p]=\frac{np}{n}=p\ \ (\text{unbiased}),\qquad \Var[\hat p]=\frac{1}{n^{2}}np(1-p)=\frac{p(1-p)}{n},\qquad \operatorname{mse}[\hat p]=\Var[\hat p]=\frac{p(1-p)}{n},\] the last equality because the bias is 0 (Definition 3.20(iv)).
(b) \(\tilde p=\frac{S+1}{n+2}\) is an affine function of \(S\): \(\tilde p=aS+b\) with \(a=\frac{1}{n+2}\), \(b=\frac{1}{n+2}\). So by linearity and Proposition 2.8(iii), \[\E[\tilde p]=\frac{np+1}{n+2},\qquad \operatorname{bias}[\tilde p]=\frac{np+1}{n+2}-p=\frac{np+1-p(n+2)}{n+2}=\frac{1-2p}{n+2},\] \[\Var[\tilde p]=\frac{1}{(n+2)^{2}}\Var[S]=\frac{np(1-p)}{(n+2)^{2}},\qquad \operatorname{mse}[\tilde p]=\frac{np(1-p)}{(n+2)^{2}}+\frac{(1-2p)^{2}}{(n+2)^{2}} .\] (Adding the constant \(b\) does not change the variance.) The bias vanishes exactly at \(p=\frac12\).
(c) Numbers at \(n=10\), so \((n+2)^{2}=144\):
| \(p\) | \(\operatorname{mse}[\hat p]=\frac{p(1-p)}{10}\) | bias\([\tilde p]\) | \(\Var[\tilde p]\) | \(\operatorname{mse}[\tilde p]\) | winner |
|---|---|---|---|---|---|
| 0.5 | 0.02500 | 0 | 0.01736 | 0.01736 | \(\tilde p\) |
| 0.2 | 0.01600 | \(+0.05000\) | 0.01111 | 0.01361 | \(\tilde p\) |
| 0.9 | 0.009000 | \(-0.06667\) | 0.006250 | 0.01069 | \(\hat p\) |
Sample computation for \(p=0.9\): \(\Var[\tilde p]=\frac{10\cdot0.9\cdot0.1}{144}=\frac{0.9}{144}=0.006250\); bias \(=\frac{1-1.8}{12}=-\frac{0.8}{12}=-0.06667\), squared \(=0.004444\); sum \(=0.01069\), against \(\frac{0.09}{10}=0.009000\) for \(\hat p\).
Conclusion. Neither estimator is uniformly better. The biased \(\tilde p\) wins in the middle of the range, where its smaller variance more than pays for its small bias; the unbiased \(\hat p\) wins near the ends, where \(\tilde p\)'s bias is largest. Unbiasedness is not a guarantee of accuracy: the mse is the quantity that measures accuracy, and it trades bias against variance.
(d) Consistency. Use Recipe B step 5. For \(\hat p\): \(\operatorname{mse}[\hat p]=\frac{p(1-p)}{n}\le\frac{1}{4n}\to0\) (the maximum of \(p(1-p)\) on \([0,1]\) is \(\frac14\), attained at \(p=\frac12\)), so by Markov applied to \((\hat p-p)^{2}\), \[\P(|\hat p-p|\ge\epsilon)\le\frac{\operatorname{mse}[\hat p]}{\epsilon^{2}}\le\frac{1}{4n\epsilon^{2}}\to0 .\] For \(\tilde p\): \(\Var[\tilde p]\le\frac{n/4}{(n+2)^{2}}\to0\) and \(\operatorname{bias}[\tilde p]=\frac{1-2p}{n+2}\to0\), so \(\operatorname{mse}[\tilde p]\to0\) and the same Markov argument applies. Both are consistent.
Where you have seen this before. SoSe25 P1b asked whether \(\frac13\hat\theta_1 +\frac23\hat\theta_2\) is unbiased when both parts are (answer: true, by linearity); SoSe26 P1e asked whether the mle always has the smallest mse (answer: false). This drill is the computation behind both. The \(\frac{S+1}{n+2}\) estimator is the Laplace rule-of-succession estimator and also the posterior mean under a uniform prior — the Bayesian view of §3.5, which no exam has ever touched.
Drill E7 — Chebyshev against the clt on the same number My problem · 9 credits
Let \(X_1,\dots,X_n\) be iid \(\Ber(\frac12)\) (fair coin tosses coded 0/1) and \(\bar X_n\) the sample mean. Consider \(\P\bigl(|\bar X_n-\tfrac12|\ge0.1\bigr)\).
- (2 cr) Bound it with Chebyshev for general \(n\), then evaluate at \(n=100\) and \(n=400\).
- (3 cr) Approximate it with the clt, first symbolically in terms of \(\Phi\), then at \(n=100\) and \(n=400\) using \(\Phi(2)=0.9772\), \(\Phi(4)=0.99997\).
- (2 cr) The exact values are \(0.05689\) at \(n=100\) and \(7.427\cdot10^{-5}\) at \(n=400\). Comment.
- (2 cr) How large must \(n\) be for the Chebyshev bound alone to guarantee \(\P(|\bar X_n-\frac12|\ge0.1)\le0.05\)?
Solution
Preliminaries. \(\E[X_i]=\frac12\) and \(\Var[X_i]=\frac12\bigl(1-\frac12\bigr)=\frac14\) (Lemma 2.26(iii) for \(\Ber(p)\)). Hence \(\E[\bar X_n]=\frac12\) and \(\Var[\bar X_n]=\frac{1}{n^{2}}\cdot n\cdot\frac14=\frac{1}{4n}\).
(a) Chebyshev (Theorem 2.40) with \(\epsilon=0.1\): \[\P\Bigl(\bigl|\bar X_n-\tfrac12\bigr|\ge0.1\Bigr)\le\frac{\Var[\bar X_n]}{0.1^{2}} =\frac{1/(4n)}{0.01}=\frac{25}{n}.\] At \(n=100\): \(\frac{25}{100}=0.2500\). At \(n=400\): \(\frac{25}{400}=0.06250\).
(b) clt (Theorem 2.64; the \(X_i\) are iid, mean \(\frac12\) finite, variance \(\frac14\) finite and non-zero). The standard deviation of \(\bar X_n\) is \(\sqrt{\frac{1}{4n}}=\frac{1}{2\sqrt n}\), so \[\P\Bigl(\bigl|\bar X_n-\tfrac12\bigr|\ge0.1\Bigr) =\P\Bigl(\Bigl|\frac{\bar X_n-\frac12}{1/(2\sqrt n)}\Bigr|\ge\frac{0.1}{1/(2\sqrt n)}\Bigr) \approx2\Phi\bigl(-0.2\sqrt n\bigr),\] because \(\frac{0.1}{1/(2\sqrt n)}=0.1\cdot2\sqrt n=0.2\sqrt n\).
At \(n=100\): \(0.2\sqrt{100}=2\), so the approximation is \(2\Phi(-2)=2(1-\Phi(2))=2(1-0.9772)=0.04550\). At \(n=400\): \(0.2\sqrt{400}=4\), giving \(2\Phi(-4)=2(1-0.99997)=6.334\cdot10^{-5}\).
(c) The comparison.
| \(n\) | Chebyshev bound | clt approximation | exact | Chebyshev / exact |
|---|---|---|---|---|
| 100 | 0.2500 | 0.04550 | 0.05689 | 4.4 |
| 400 | 0.06250 | \(6.334\cdot10^{-5}\) | \(7.427\cdot10^{-5}\) | 842 |
Three observations, and they are the whole point of WiSe25 P4d:
- Chebyshev is always a valid upper bound — the exact value never exceeds it — but it is loose, and it gets relatively worse as \(n\) grows: it decays like \(\frac{1}{n}\), while the true probability decays roughly like \(e^{-2n\epsilon^{2}}\).
- The clt figure is not a bound. At \(n=100\) it is 0.04550 against a true 0.05689 — it understates the truth by about 20 %. If you need a guarantee, Chebyshev is the honest tool; if you need a realistic number, the clt is.
- The clt approximation improves as \(n\) grows: at \(n=400\) the relative error is down to about 15 %, and it keeps shrinking. (The remaining gap here is mostly the "lattice" effect of a discrete count being approximated by a continuous curve.)
(d) Solve \(\frac{25}{n}\le0.05\): \(n\ge\frac{25}{0.05}=500\). So Chebyshev alone needs \(n\ge500\). The clt approximation, by contrast, crosses 0.05 when \(2\Phi(-0.2\sqrt n)\le0.05\), i.e. \(0.2\sqrt n\ge z_{0.025}=1.96\), i.e. \(n\ge\bigl(\frac{1.96}{0.2}\bigr)^{2}=96.04\), so \(n\ge97\). The exact probability first falls below 0.05 at \(n=92\) and then oscillates around the threshold for a while (it is a sum of binomial point masses, so it jumps as the cut-off \(0.4n\) crosses an integer: \(0.05044\) at \(n=105\), \(0.04087\) at \(n=106\)), settling below it for good from \(n=106\) on. Chebyshev therefore asks for roughly five times more data than is really needed. That is the price of a bound that has to hold for every distribution with that variance.
Exam form. On the exam you would leave the answers as \(\frac{25}{n}\) and \(2\Phi(-0.2\sqrt n)\); no \(\Phi\) table has ever been supplied. The numerical columns here exist only so you can see the sizes once, in advance.
Drill E8 — a characteristic function you have not seen My problem · 9 credits
Let \(X_1,X_2,\dots\) be iid with \(\P(X_j=-1)=\P(X_j=0)=\P(X_j=1)=\frac13\).
- (2 cr) Compute \(\varphi_{X_1}(t)\) and simplify it with Euler's formula.
- (2 cr) Compute \(\E[X_1]\) and \(\Var[X_1]\) from \(\varphi_{X_1}\), using \(\E[X^{k}]=i^{-k}\varphi^{(k)}(0)\).
- (2 cr) Let \(Y=2X_1+1\). Compute \(\varphi_Y(t)\).
- (3 cr) Let \(S_n=\sum_{j=1}^{n}X_j\) and \(Z_n=\frac{S_n}{\sqrt{2n/3}}\). Compute \(\varphi_{Z_n}\) and state what the clt says about \(Z_n\).
Solution
(a) By Definition 2.46, \[\varphi_{X_1}(t)=\E[e^{itX_1}]=\tfrac13e^{-it}+\tfrac13e^{i\cdot0}+\tfrac13e^{it} =\tfrac13\bigl(1+e^{it}+e^{-it}\bigr)=\frac{1+2\cos t}{3},\] using \(e^{0}=1\) and, as in Drill E3, \(e^{it}+e^{-it}=2\cos t\) from Euler's formula.
(b) Differentiate \(\varphi(t)=\frac{1+2\cos t}{3}\): \(\varphi'(t)=-\frac{2\sin t}{3}\) and \(\varphi''(t)=-\frac{2\cos t}{3}\). At \(t=0\), with \(\sin0=0\) and \(\cos0=1\): \(\varphi'(0)=0\), \(\varphi''(0)=-\frac23\). By Remark 2.47(iii), \[\E[X_1]=i^{-1}\varphi'(0)=0,\qquad \E[X_1^{2}]=i^{-2}\varphi''(0)=(-1)\cdot\Bigl(-\frac23\Bigr)=\frac23,\] using \(i^{-2}=\frac{1}{i^{2}}=\frac{1}{-1}=-1\). Hence \(\Var[X_1]=\frac23-0^{2}=\frac23\).
Cross-check directly, which is always worth ten seconds: \(\E[X_1]=\frac13(-1+0+1)=0\) and \(\E[X_1^{2}]=\frac13(1+0+1)=\frac23\). Same answers.
(c) Remark 2.47(ii) says \(\varphi_{aX+b}(t)=e^{itb}\varphi_X(at)\). With \(a=2\), \(b=1\), \[\varphi_{Y}(t)=e^{it}\,\varphi_{X_1}(2t)=e^{it}\cdot\frac{1+2\cos(2t)}{3}.\] (Sanity check at \(t=0\): every characteristic function must satisfy \(\varphi(0)=\E[e^{0}]=1\). Here \(e^{0}\cdot\frac{1+2}{3}=1\). )
(d) First the scaling constant: \(\Var[S_n]=n\Var[X_1]=\frac{2n}{3}\) by independence, and \(\E[S_n]=0\), so \(Z_n=\frac{S_n}{\sqrt{2n/3}}\) is exactly the standardised sum. Writing \(\sigma_n:=\sqrt{2n/3}\) and using Remark 2.47(ii) then (iv), \[\varphi_{Z_n}(t)=\varphi_{S_n}\!\Bigl(\frac{t}{\sigma_n}\Bigr) =\varphi_{X_1}\!\Bigl(\frac{t}{\sigma_n}\Bigr)^{n} =\left(\frac{1+2\cos\bigl(t\sqrt{3/(2n)}\bigr)}{3}\right)^{\!n},\] where the middle equality uses that the \(X_j\) are independent and identically distributed, so the characteristic function of the sum is the product of \(n\) identical factors.
What the clt says. The \(X_j\) are iid with finite mean 0 and finite non-zero variance \(\frac23\), so Theorem 2.64 gives \(Z_n\xrightarrow{d}\mathcal N(0,1)\). Since the characteristic function of \(\mathcal N(0,1)\) is \(e^{-t^{2}/2}\), this says \(\varphi_{Z_n}(t)\to e^{-t^{2}/2}\) for every \(t\). A numerical check at \(t=1\): \(n=5\) gives \(0.5987\), \(n=50\) gives \(0.6058\), \(n=500\) gives \(0.6065\), against \(e^{-1/2}=0.6065\).
What is genuinely new here compared with SoSe26 P4. That problem had a symmetric two-point variable with \(\Var=1\), so the scaling was the plain \(\sqrt n\) and the characteristic function came out as \(\cos^{n}(t/\sqrt n)\). Here the variance is \(\frac23\ne1\), so you must divide by \(\sigma\sqrt n\) and not by \(\sqrt n\) — the step where the standardisation actually bites. Part (c) adds the affine rule, which was tested separately in SoSe26 P1c. See §2.3.
Drill E9 — three Jensen arguments, and one place where the script's version is too narrow My problem · 9 credits
- (2 cr) Use Jensen with \(g(x)=x^{2}\) to prove \(\Var[X]\ge0\).
- (2 cr) Use Jensen to prove \(|\E[X]|\le\E[|X|]\).
- (2 cr) Show \(\E[e^{-X}]\ge e^{-\E[X]}\), and say what this means for the average of \(e^{-X}\) over a population.
- (3 cr) Show \(\E\bigl[\frac1X\bigr]\ge\frac{1}{\E[X]}\) for a strictly positive \(X\), and explain exactly which hypothesis of Theorem 2.42 this argument stretches.
Solution
(a) \(g(x)=x^{2}\) is convex on \(\R\) (\(g''(x)=2>0\)) and maps \(\R\) into \(\R\), so Theorem 2.42 applies whenever \(\E[X]\) is finite: \[\E[X^{2}]=\E[g(X)]\ge g(\E[X])=(\E[X])^{2}.\] Subtracting \((\E[X])^{2}\) from both sides and using \(\Var[X]=\E[X^{2}]-(\E[X])^{2}\) (Proposition 2.8(i)) gives \(\Var[X]\ge0\).
(b) \(g(x)=|x|\) is convex on \(\R\): its graph is a V, and the chord between any two points lies on or above it. (It is not differentiable at 0, but convexity does not require differentiability.) Jensen gives \(\E[|X|]\ge|\E[X]|\), which is the statement, read right to left.
(c) \(g(x)=e^{-x}\) has \(g''(x)=e^{-x}>0\), so it is convex on \(\R\). Jensen: \(\E[e^{-X}]\ge e^{-\E[X]}\).
In words: if \(X\) is the time until an event and you are interested in the average of the decaying quantity \(e^{-X}\), that average is always at least as large as the value you would get by plugging in the average time. Averaging the outputs of a convex function gives more than the function of the average input — the spread of \(X\) can only push the average up.
(d) Let \(X>0\) with \(\E[X]\) finite and \(\E[\frac1X]\) finite. On \((0,\infty)\) the function \(g(x)=\frac1x\) has \(g'(x)=-\frac1{x^{2}}\) and \(g''(x)=\frac{2}{x^{3}}>0\), so it is convex there. Jensen then reads \[\E\Bigl[\frac1X\Bigr]\ge\frac{1}{\E[X]}.\] In words: the average of reciprocals is at least the reciprocal of the average — the harmonic mean never exceeds the arithmetic mean.
Numerical check. Let \(X\) take the values 1 and 2 with probability \(\frac12\) each. Then \(\E[X]=1.5\) and \(\E[\frac1X]=\frac12(1+\frac12)=0.7500\), while \(\frac1{\E[X]}=\frac{1}{1.5}=0.6667\). Indeed \(0.7500\ge0.6667\). With three values \(1,2,3\) each of probability \(\frac13\): \(\E[\frac1X]=\frac13(1+0.5+0.3333)=0.6111\ge\frac12=0.5000\).
Which hypothesis this stretches, and how to be safe
Theorem 2.42 as the script states it requires \(g:\R\to\R\) — a convex function defined on all of \(\R\). The map \(x\mapsto\frac1x\) is not defined at 0 and is not convex on \(\R\setminus\{0\}\) taken as a whole (on the negative half-line it is concave). So the theorem as printed does not literally cover part (d).
The honest way to write it in an exam: say "\(X>0\) almost surely, so the distribution of \(X\) lives in the interval \((0,\infty)\), on which \(g(x)=1/x\) is convex; Jensen's inequality holds in this form for a convex function on an interval containing the support of \(X\)." That sentence names the gap and closes it. The same caveat applies to \(g=\ln\) (concave on \((0,\infty)\), giving \(\E[\ln X]\le\ln\E[X]\)), which is the version people use most often.
Parts (a)–(c) need no such caveat: \(x^{2}\), \(|x|\) and \(e^{-x}\) are convex on all of \(\R\), so they fit Theorem 2.42 exactly as printed. In an exam, prefer those.
How Jensen is examined. Once, so far: SoSe26 P3, 5 credits, 3 of them for the bare statement. The pattern of the application half is always the same — name the function, show it is convex (usually by \(g''\ge0\)), apply the inequality, then do one monotone operation to both sides. Do not skip the "\(g''>0\)" line: the marking scheme counted it.
Drill E10 — placing five claims on the convergence ladder My problem · 10 credits
For each of the following, decide in which of the three modes of Definition 2.56 the sequence converges, and to what. Justify each answer. (2 credits each.)
- \(U\sim\Unif(0,1)\) is one fixed random variable, and \(X_n:=\one_{\{U\le1/n\}}\) (the indicator that is 1 when \(U\le\frac1n\) and 0 otherwise).
- \(Y_n:=n\cdot\one_{\{U\le1/n\}}\), with the same \(U\).
- \(W_n\sim\mathcal N\bigl(0,\frac1n\bigr)\), independent of each other.
- \(V_1,V_2,\dots\) iid \(\Unif(0,1)\). Does \(V_n\) converge in distribution? In probability?
- \(T_n\xrightarrow{d}5\) (the constant 5). Does \(T_n\xrightarrow{\P}5\) follow?
Solution
The ladder first (Remark 2.57): \(\xrightarrow{\text{a.s.}}\Rightarrow\xrightarrow{\P} \Rightarrow\xrightarrow{d}\), and no arrow reverses in general. The one exception, which is exactly item (v), is that convergence in distribution to a constant does imply convergence in probability to that constant.
(i) Fix an outcome \(\omega\) with \(U(\omega)>0\). Since \(\frac1n\to0\), there is an \(N\) with \(\frac1N<U(\omega)\), and from then on \(X_n(\omega)=0\). So \(X_n(\omega)\to0\) for every \(\omega\) in the set \(\{U>0\}\), which has probability \(\P(U>0)=1\) (a single point has probability 0 for a continuous variable). By Definition 2.56(ii), \(X_n\xrightarrow{\text{a.s.}}0\), and therefore also in probability and in distribution.
(ii) The same argument applies pointwise: for \(\omega\) with \(U(\omega)>0\) we eventually have \(Y_n(\omega)=n\cdot0=0\). So \(Y_n\xrightarrow{\text{a.s.}}0\), hence in probability and in distribution. But \(\E[Y_n]=n\cdot\P(U\le\frac1n)=n\cdot\frac1n=1\) for every \(n\), so \(\E[Y_n]\to1\ne0=\E[0]\). Convergence in any of the three modes does not carry expectations along. This is precisely the counterexample of SoSe26 P2a, worth 3 credits there.
(iii) In probability: for any \(\epsilon>0\), by Chebyshev (Theorem 2.40; \(\E[W_n]=0\)) \[\P(|W_n|\ge\epsilon)\le\frac{\Var[W_n]}{\epsilon^{2}}=\frac{1}{n\epsilon^{2}}\xrightarrow[n\to\infty]{}0,\] so \(W_n\xrightarrow{\P}0\), and hence \(W_n\xrightarrow{d}0\) by the ladder. Almost-sure convergence does not follow from this argument, and since the \(W_n\) are independent one can show it fails; but the question only asks which modes you can establish, and the honest answer is "in probability (and therefore in distribution); almost-sure convergence does not follow from Chebyshev". (The exact statement \(2\Phi(-\epsilon\sqrt n)\) is available too: at \(\epsilon=0.1\), \(n=100\), it equals \(0.3173\), which is much smaller than the Chebyshev bound \(\frac{1}{100\cdot0.01}=1\) — a bound of 1 is vacuous, which shows how loose Chebyshev can be.)
(iv) Every \(V_n\) has the same cdf \(F(x)=x\) on \([0,1]\), so trivially \(F_{V_n}(x)=F(x)\to F(x)\) at every \(x\): \(V_n\xrightarrow{d}V\) for any \(V\sim\Unif(0,1)\). But convergence in probability to such a \(V\) fails: \(V_n\) and \(V\) would have to be independent \(\Unif(0,1)\) variables, and \(V_n-V\) is then a fixed non-degenerate random variable, so \(\P(|V_n-V|>\frac12)\) is a positive number that does not depend on \(n\) and cannot tend to 0. This is the standard illustration that \(\xrightarrow{d}\) is a statement about distributions only and says nothing about the variables being close to each other.
(v) Yes. This is the one place where the ladder can be climbed backwards, because the limit is a constant. Reason, in the script's terms: the cdf of the constant 5 is \(F(x)=0\) for \(x<5\) and \(1\) for \(x\ge5\), continuous everywhere except at 5. For \(\epsilon>0\), \[\P(|T_n-5|>\epsilon)=\P(T_n>5+\epsilon)+\P(T_n<5-\epsilon) \le\bigl(1-F_{T_n}(5+\epsilon)\bigr)+F_{T_n}(5-\tfrac{\epsilon}{2}),\] and both \(5+\epsilon\) and \(5-\frac\epsilon2\) are continuity points of \(F\), so \(F_{T_n}(5+\epsilon)\to1\) and \(F_{T_n}(5-\frac\epsilon2)\to0\). The right-hand side therefore tends to 0. This is exactly the true/false item SoSe26 P1d, whose answer is "true".
In words, the whole ladder: almost-sure convergence is about the paths settling down; convergence in probability is about the chance of being far off shrinking; convergence in distribution is only about the shapes of the histograms lining up. Each is weaker than the one before, and none of them says anything about expectations.
Where this is examined. WiSe25 P1d and P2b, SoSe25 P2b, SoSe26 P1d and P2a — a convergence-mode question has appeared on every paper so far. The guide's full treatment, with counterexamples and a picture of the ladder, is at §2.4.
The long applied problem
Every one of the three papers closes with a long word problem built on a story: tennis schedules, a duck hunt, a randomized survey. Each is worth 10 to 13 credits, and each chains three to five different subchapters in four sub-parts of rising difficulty. This is the one structural habit that survives all three papers unchanged — and it is still only three papers, so it is "what has been asked", not a forecast.
The three closing problems WiSe25 · P6 (10 cr) · SoSe25 · P5 (12 cr) · SoSe26 · P5 (13 cr)
| Paper | Story | Cr | Subchapters chained | Sub-parts |
|---|---|---|---|---|
| WiSe 25/26 · P6 | Strategic tennis matches | 10 | §1.1 (inclusion–exclusion) → §1.4 (independence, total probability, Bayes) | a 4 · b 2 · c 4 |
| SoSe 2025 · P5 | Duck hunt | 12 | §1.2 (Laplace) → §1.4 (independence) → §2.1 (indicators, expectation, variance) → §2.2 (Chebyshev) | a 4 · b 4 · c 4 |
| SoSe 2026 · P5 | Randomized response | 13 | §1.4 (total probability) → §3.1 (identifiability) → §3.2 (mle, bias, variance) → §3.3 (z-test), with §2.4 (clt) underneath | a 3 · b 3 · c 2 · d 5 |
The common skeleton. Part (a) translates the story into a distribution or a probability. Part (b) computes a first quantity from it — an expectation, or an estimator. Part (c) computes a second-order quantity — a variance, or an unbiasedness check. Part (d), where there is one, runs a test or a bound with numbers. Later parts are always made reachable if an earlier one failed: two of the three papers print an explicit "you may use…" for exactly this reason. Never leave a later part blank because an earlier one went wrong.
Method — how to attack a story problem My addition, distilled from the three official solutions
- Name everything before computing anything. Write down the events (\(W_i\) = "win match \(i\)", \(A_i\) = "duck \(i\) survives", \(T\) = "answers truthfully") and the random variables with their index ranges. Every official solution starts with a naming paragraph.
- Decide what is independent and say it once, explicitly. Almost every later step either uses independence (to multiply probabilities, to add variances) or must avoid using it (linearity of expectation never needs it). Getting this wrong is the single most expensive error in this problem.
- Count with indicators. If the question says "the number of …", set \(X_i=\one_{A_i}\) and \(X=\sum_iX_i\). Then \(\E[X_i]=\P(A_i)\) and linearity gives \(\E[X]=\sum_i\P(A_i)\) even when the \(X_i\) are dependent. SoSe25 P5a printed this as a hint, which shows the examiner expects the move to be known.
- For a variance of a sum of indicators, expand \(\E[X^{2}]=\sum_{i,k}\E[X_iX_k]\), note \(\E[X_iX_k]=\P(A_i\cap A_k)\), and split the diagonal \(i=k\) (where \(X_i^{2}=X_i\), since \(0^2=0\) and \(1^2=1\)) from the off-diagonal.
- Split events into disjoint pieces before adding probabilities; if the pieces overlap, use inclusion–exclusion (Theorem 1.22) instead.
- Sanity-check at extreme parameter values. \(n=0\), \(p=0\), \(q=1\), \(m=2\). Every one of the three problems has an extreme case you can check in ten seconds.
- If the last part asks for a decision, give it in a sentence of plain English, not only as an inequality between numbers. A credit was awarded for exactly that in SoSe26 P5d.
Walkthrough 1 — Strategic tennis matches WiSe25 · P6 · 10 credits
The setting. You play a strong opponent (S) and a weak opponent (W). You beat the strong one with probability \(p\) and the weak one with probability \(q\), where \(0<p<q<1\). Matches are independent.
(a) Which schedule? WiSe25 · P6a · 4 credits
You play three matches and win the tournament if you win two consecutive matches. Schedule A is strong–weak–strong (SWS), schedule B is weak–strong–weak (WSW). Compute both winning probabilities in terms of \(p\) and \(q\), say which you prefer, and give a brief intuitive explanation without restating the computation.
Solution
Step 1 — name the events. Let \(W_i\) be the event "you win match \(i\)" and \(L_i=W_i^{c}\) the event "you lose match \(i\)", for \(i\in\{1,2,3\}\).
Step 2 — split the target event into disjoint pieces. "Two consecutive wins in three matches" happens in exactly two ways:
- you win matches 1 and 2 — the event \(W_1\cap W_2\), whatever happens in match 3;
- you lose match 1 but win matches 2 and 3 — the event \(L_1\cap W_2\cap W_3\).
These two are disjoint: the first requires \(W_1\), the second requires \(L_1\), and an event and its complement cannot both occur. They also exhaust the possibilities: any run of two consecutive wins must start at match 1 or at match 2. So by additivity of a probability measure on disjoint sets (Proposition 1.19, §1.1), \[\P(\text{win})=\P(W_1\cap W_2)+\P(L_1\cap W_2\cap W_3).\] Skipping the word "disjoint" here is the standard way to lose a credit: if the pieces overlapped you would be double-counting.
Step 3 — price each piece by independence. Independent events multiply: \(\P(A\cap B)=\P(A)\P(B)\) (Definition 1.74, §1.4).
Schedule A = SWS, so match 1 is strong (\(\P(W_1)=p\)), match 2 weak (\(q\)), match 3 strong (\(p\)): \[\P(\text{win}\mid\text{SWS})=pq+(1-p)\,q\,p=pq+pq-p^{2}q=2pq-p^{2}q=pq(2-p).\] Schedule B = WSW: match 1 weak (\(q\)), match 2 strong (\(p\)), match 3 weak (\(q\)): \[\P(\text{win}\mid\text{WSW})=qp+(1-q)\,p\,q=pq+pq-pq^{2}=2pq-pq^{2}=pq(2-q).\]
Step 4 — compare. Both expressions are \(pq\) times something. Since \(p<q\), we get \(2-p>2-q\), and \(pq>0\), so multiplying an inequality by a positive number preserves it: \[pq(2-p)>pq(2-q)\quad\Longrightarrow\quad \textbf{schedule A (SWS) is better.}\]
Step 5 — the intuition, which is separately worth credits. Whatever else happens, you must win match 2: every run of two consecutive matches in a three-match schedule contains the middle one. So the middle slot is the one match you cannot avoid winning, and you should put your weak opponent there. SWS does that; WSW wastes the weak opponent on the two optional slots.
Numbers, as a check. With \(p=0.3\), \(q=0.8\): SWS gives \(0.3\cdot0.8\cdot1.7=0.4080\), WSW gives \(0.3\cdot0.8\cdot1.2=0.2880\). SWS wins by a wide margin.
The guide's full version of this part, with the event diagram, is at §1.4.
(b) Bayes on the schedule WiSe25 · P6b · 2 credits
The organisers pick the schedule by a fair coin flip. Someone is told only that you won. What is the probability that the schedule was SWS?
Solution
Step 1 — the law of total probability (Theorem 1.70(ii), §1.4). The two schedules partition the sample space and each has probability \(\frac12\) (fair coin), so \[\P(\text{win})=\P(\text{SWS})\P(\text{win}\mid\text{SWS})+\P(\text{WSW})\P(\text{win}\mid\text{WSW}) =\tfrac12 pq(2-p)+\tfrac12 pq(2-q)=\tfrac12 pq\,(4-p-q),\] the last step factoring out \(\frac12pq\) and adding \((2-p)+(2-q)=4-p-q\).
Step 2 — Bayes' rule (Theorem 1.70(iii)): \(\P(A\mid B)=\frac{\P(B\mid A)\P(A)}{\P(B)}\), with \(A=\{\text{SWS}\}\) and \(B=\{\text{win}\}\): \[\P(\text{SWS}\mid\text{win})=\frac{\P(\text{win}\mid\text{SWS})\,\P(\text{SWS})}{\P(\text{win})} =\frac{pq(2-p)\cdot\frac12}{\frac12pq(4-p-q)}=\frac{2-p}{4-p-q}.\] The factors \(\frac12\) and \(pq\) cancel top and bottom.
Check. The answer must lie in \((0,1)\) and must be larger than \(\frac12\), because SWS is the more likely winner and so winning is evidence for SWS. Indeed \(2-p>\frac{4-p-q}{2}\iff 4-2p>4-p-q\iff q>p\), which is given. With \(p=0.3,q=0.8\): \(\frac{1.7}{2.9}=0.5862\). More than a half, as expected.
Worked in full at §1.4, and the Bayes machinery itself at §1.4.
(c) Four matches, inclusion–exclusion WiSe25 · P6c · 4 credits
You now play SWWS (four matches). You win if you win at least two non-consecutive matches. Compute the probability of winning.
Solution
Step 1 — enumerate. Let \(A_i\) be "win match \(i\)". Non-consecutive index pairs from \(\{1,2,3,4\}\) are \((1,3)\), \((1,4)\) and \((2,4)\) — the pairs \((1,2)\), \((2,3)\), \((3,4)\) are consecutive. Set \(E_{13}:=A_1\cap A_3\), \(E_{14}:=A_1\cap A_4\), \(E_{24}:=A_2\cap A_4\). The target event is \(E_{13}\cup E_{14}\cup E_{24}\).
Step 2 — why a plain sum is wrong. These three events overlap: winning matches 1, 3 and 4 puts you in both \(E_{13}\) and \(E_{14}\). Adding \(\P(E_{13})+\P(E_{14})+\P(E_{24})\) would count such outcomes more than once. And they are not independent either, even though the \(A_i\) are, because \(E_{13}\) and \(E_{14}\) share the factor \(A_1\). So neither addition nor multiplication works: this is why inclusion–exclusion is needed, and recognising that is the heart of the problem.
Step 3 — price every intersection. The schedule SWWS means \(\P(A_1)=p\), \(\P(A_2)=q\), \(\P(A_3)=q\), \(\P(A_4)=p\). Intersections of the \(E\)'s are intersections of \(A\)'s over the union of the index sets, and independence lets us multiply:
| event | as an intersection of \(A_i\) | probability |
|---|---|---|
| \(E_{13}\) | \(A_1\cap A_3\) | \(pq\) |
| \(E_{14}\) | \(A_1\cap A_4\) | \(p\cdot p=p^{2}\) |
| \(E_{24}\) | \(A_2\cap A_4\) | \(qp\) |
| \(E_{13}\cap E_{14}\) | \(A_1\cap A_3\cap A_4\) | \(p\,q\,p=p^{2}q\) |
| \(E_{13}\cap E_{24}\) | \(A_1\cap A_2\cap A_3\cap A_4\) | \(p\,q\,q\,p=p^{2}q^{2}\) |
| \(E_{14}\cap E_{24}\) | \(A_1\cap A_2\cap A_4\) | \(p\,q\,p=p^{2}q\) |
| \(E_{13}\cap E_{14}\cap E_{24}\) | \(A_1\cap A_2\cap A_3\cap A_4\) | \(p^{2}q^{2}\) |
Step 4 — inclusion–exclusion for three events (Theorem 1.22, §1.1): singles minus pairs plus the triple. \[\P(\text{win})=\bigl(pq+p^{2}+pq\bigr)-\bigl(p^{2}q+p^{2}q^{2}+p^{2}q\bigr)+p^{2}q^{2} =2pq+p^{2}-2p^{2}q-p^{2}q^{2}+p^{2}q^{2}=2pq+p^{2}-2p^{2}q .\] Factor out \(p\): \(\P(\text{win})=p\,(2q+p-2pq)\).
Checks. With \(q=1\) (you always beat the weak opponent, so \(A_2\) and \(A_3\) are certain) the formula gives \(p(2+p-2p)=p(2-p)=2p-p^{2}\), which is \(\P(A_1\cup A_4)\) — correct, since with \(A_3\) certain, winning match 1 alone already gives the non-consecutive pair \((1,3)\), and likewise match 4 gives \((2,4)\). With \(p=0\) the formula gives 0 — correct, since every non-consecutive pair contains match 1 or match 4, both of which are against the strong opponent. Numerically at \(p=0.3\), \(q=0.8\): \(0.3\,(1.6+0.3-0.48)=0.3\cdot1.42=0.4260\), which a direct enumeration of all 16 outcomes confirms.
Two typesetting slips in the official solution
(1) It writes \(\P(E_{13}\cup E_{14}\cup E_{14})\) — the last term should be \(E_{24}\). (2) The bracket opened after the minus sign closes only after the triple-intersection term, so as printed the triple term is subtracted rather than added. The very next line has the signs right and the final answer \(p(2q+p-2pq)\) is correct, so this is a typographical problem, not a mathematical one — but if you are checking your own work against the model answer, do not be confused by it. The guide documents this at §1.1.
Walkthrough 2 — Duck hunt SoSe25 · P5 · 12 credits
The setting. \(n\) hunters with perfect aim shoot simultaneously at \(m\) ducks. Each hunter picks its target uniformly at random and independently of the others, so two hunters may pick the same duck. \(X\) is the number of surviving ducks.
(a) \(\E[X]\) by the counting trick SoSe25 · P5a · 4 credits
Solution
Step 1 — name. Index ducks by \(i\in\{1,\dots,m\}\) and hunters by \(j\in\{1,\dots,n\}\). Let \(S_j\) be the (random) index of the duck that hunter \(j\) aims at. "Uniformly at random" means \(S_j\sim\Lap[m]\), the Laplace or uniform distribution on \(\{1,\dots,m\}\) (§1.2, §1.2): \(\P(S_j=i)=\frac1m\) for every \(i\). "Independently of the others" means \(S_1,\dots,S_n\) are independent. Let \(A_i\) be the event "duck \(i\) survives".
Step 2 — the probability that one duck survives. Duck \(i\) survives exactly when no hunter aims at it: \[\P(A_i)=\P(S_1\ne i,\ S_2\ne i,\ \dots,\ S_n\ne i) =\prod_{j=1}^{n}\P(S_j\ne i)=\Bigl(\frac{m-1}{m}\Bigr)^{\!n},\] where the middle equality is independence and \(\P(S_j\ne i)=1-\frac1m=\frac{m-1}{m}\) counts the \(m-1\) other ducks out of \(m\) equally likely choices.
Step 3 — indicators. Set \(X_i:=\one_{A_i}\), the indicator of \(A_i\): it is 1 if duck \(i\) survives and 0 otherwise. Then \(X=\sum_{i=1}^{m}X_i\) counts the survivors, since each surviving duck contributes exactly one 1.
Step 4 — linearity. An indicator's expectation is the probability of its event: \(\E[X_i]=1\cdot\P(A_i)+0\cdot\P(A_i^{c})=\P(A_i)\). By linearity (Proposition 2.4(i)), \[\E[X]=\E\Bigl[\sum_{i=1}^{m}X_i\Bigr]=\sum_{i=1}^{m}\E[X_i]=m\Bigl(\frac{m-1}{m}\Bigr)^{\!n}.\]
The crucial remark. The indicators \(X_1,\dots,X_m\) are not independent — if many ducks survive, few hunters were spread out, which makes the remaining ducks more likely to have been hit. Linearity of expectation does not care: it holds for any random variables whose expectations exist. Say this out loud; it is what makes the four-line computation legitimate.
Checks. \(n=0\) (no hunters): \(\E[X]=m\cdot1=m\), all ducks survive. \(n=1\): \(\E[X]=m\cdot\frac{m-1}{m}=m-1\), exactly one duck dies. With \(m=10\), \(n=2\): \(10\cdot0.9^{2}=8.100\).
Worked in full, with the general indicator recipe, at §2.1.
(b) \(\Var[X]\) with dependent indicators SoSe25 · P5b · 4 credits
Solution
Step 1 — the right formula. Because the \(X_i\) are dependent, variances do not add. Use \(\Var[X]=\E[X^{2}]-\E[X]^{2}\) (Proposition 2.8(i)) and expand the square of a sum: \[\E[X^{2}]=\E\Bigl[\Bigl(\sum_{i=1}^{m}X_i\Bigr)^{2}\Bigr]=\E\Bigl[\sum_{i=1}^{m}\sum_{k=1}^{m}X_iX_k\Bigr] =\sum_{i,k=1}^{m}\E[X_iX_k].\] There are \(m^{2}\) terms: \(m\) diagonal ones (\(i=k\)) and \(m(m-1)\) off-diagonal ones.
Step 2 — the product of two indicators is the indicator of the intersection. \(X_iX_k=\one_{A_i}\one_{A_k}=\one_{A_i\cap A_k}\) (the product is 1 exactly when both are 1), so \(\E[X_iX_k]=\P(A_i\cap A_k)\).
Step 3 — the diagonal. For \(i=k\): \(X_i^{2}=X_i\), because \(0^{2}=0\) and \(1^{2}=1\). So \(\E[X_i^{2}]=\E[X_i]=\bigl(\frac{m-1}{m}\bigr)^{n}\), and the \(m\) diagonal terms contribute \(m\bigl(\frac{m-1}{m}\bigr)^{n}\).
Step 4 — the off-diagonal. For \(i\ne k\), both ducks survive exactly when no hunter picks either of them. Each hunter must avoid two specific ducks, which happens with probability \(\frac{m-2}{m}\), and the hunters are independent: \[\P(A_i\cap A_k)=\prod_{j=1}^{n}\P(S_j\ne i,\ S_j\ne k)=\Bigl(\frac{m-2}{m}\Bigr)^{\!n}.\] There are \(m(m-1)\) ordered pairs with \(i\ne k\), contributing \(m(m-1)\bigl(\frac{m-2}{m}\bigr)^{n}\).
Step 5 — assemble. \[\Var[X]=\underbrace{m\Bigl(\frac{m-1}{m}\Bigr)^{n}+m(m-1)\Bigl(\frac{m-2}{m}\Bigr)^{n}}_{\E[X^{2}]} -\underbrace{m^{2}\Bigl(\frac{m-1}{m}\Bigr)^{2n}}_{\E[X]^{2}} .\]
Checks. \(n=1\): exactly \(m-1\) ducks survive with certainty, so the variance must be 0. The formula gives \(m\frac{m-1}{m}+m(m-1)\frac{m-2}{m}-m^{2}\frac{(m-1)^{2}}{m^{2}} =(m-1)+(m-1)(m-2)-(m-1)^{2}=(m-1)\bigl[1+(m-2)-(m-1)\bigr]=0\). ✓ With \(m=10\), \(n=2\): the formula gives \(0.09000\); a direct simulation of the experiment gives \(0.0868\pm0.002\). ✓
(c) A Chebyshev window SoSe25 · P5c · 4 credits
With \(n=2\) hunters, find \(k\in\N\) as a function of \(m\) such that the number of survivors lies in \([\E[X]-k,\ \E[X]+k]\) with probability at least 90 %. Hint on the exam: rewrite the condition so that Chebyshev can be used.
Solution
Step 1 — reshape the condition. \[\P\bigl(X\in[\E X-k,\ \E X+k]\bigr)\ge0.9 \iff\P\bigl(X\notin[\E X-k,\ \E X+k]\bigr)\le0.1 \iff\P\bigl(|X-\E X|>k\bigr)\le0.1 ,\] using \(\P(A^{c})=1-\P(A)\) and the fact that being outside the interval means being further than \(k\) from the centre. Chebyshev bounds \(\P(|X-\E X|\ge k)\), and \(\{|X-\E X|>k\}\subseteq\{|X-\E X|\ge k\}\), so a bound on the latter bounds the former.
Step 2 — the variance at \(n=2\). Put \(n=2\) in the formula of part (b): \[\Var[X]=m\Bigl(\frac{m-1}{m}\Bigr)^{2}+m(m-1)\Bigl(\frac{m-2}{m}\Bigr)^{2}-m^{2}\Bigl(\frac{m-1}{m}\Bigr)^{4}.\] Simplify each term by cancelling powers of \(m\): \[m\cdot\frac{(m-1)^{2}}{m^{2}}=\frac{(m-1)^{2}}{m},\qquad m(m-1)\cdot\frac{(m-2)^{2}}{m^{2}}=\frac{(m-1)(m-2)^{2}}{m},\qquad m^{2}\cdot\frac{(m-1)^{4}}{m^{4}}=\frac{(m-1)^{4}}{m^{2}} .\] Put all three over the common denominator \(m^{2}\) and factor the common \((m-1)\) out of the numerator: \[\Var[X]=\frac{m(m-1)^{2}+m(m-1)(m-2)^{2}-(m-1)^{4}}{m^{2}} =\frac{(m-1)\bigl[m(m-1)+m(m-2)^{2}-(m-1)^{3}\bigr]}{m^{2}} .\] Now expand the bracket term by term: \[m(m-1)=m^{2}-m,\qquad m(m-2)^{2}=m(m^{2}-4m+4)=m^{3}-4m^{2}+4m,\] \[(m-1)^{3}=m^{3}-3m^{2}+3m-1 .\] Adding the first two and subtracting the third: \[(m^{2}-m)+(m^{3}-4m^{2}+4m)-(m^{3}-3m^{2}+3m-1) =m^{3}-m^{3}+(1-4+3)m^{2}+(-1+4-3)m+1=1 .\] Every power cancels and only the constant 1 survives. Therefore \[\Var[X]=\frac{m-1}{m^{2}}\qquad(n=2).\] Check: \(m=10\) gives \(\frac{9}{100}=0.09000\), matching part (b). ✓
Step 3 — apply Chebyshev and solve. Theorem 2.40: \(\P(|X-\E X|\ge k)\le\frac{\Var[X]}{k^{2}}\). Demand that this be at most \(0.1\): \[\frac{\Var[X]}{k^{2}}\le0.1\iff k^{2}\ge10\,\Var[X]=\frac{10(m-1)}{m^{2}} \iff k\ge\frac{\sqrt{10(m-1)}}{m}.\] Since \(k\) must be a natural number, take \[k=\Bigl\lceil\frac{\sqrt{10(m-1)}}{m}\Bigr\rceil,\] rounding up, because rounding down would make \(k\) smaller and the bound \(\Var/k^{2}\) larger, which could break the 10 % requirement.
Numbers. \(m=2\): \(\frac{\sqrt{10}}{2}=1.581\to k=2\). \(m=5\): \(\frac{\sqrt{40}}{5}=1.265\to k=2\). \(m=10\): \(\frac{\sqrt{90}}{10}=0.9487\to k=1\). \(m=100\): \(\frac{\sqrt{990}}{100}=0.3146\to k=1\).
Two things about the official solution
(1) An inequality sign slips. "At least 90 %" translates to \(\P(\text{outside})\le0.1\), but the printed solution writes \(<0.1\) and then sets \(\Var[X]/k^{2}=0.1\) — which is consistent only with \(\le\). The final \(k\) is unchanged; the consistent version uses \(\le\) throughout, as above.
(2) The answer is correct but far from sharp. With \(n=2\) hunters, at most 2 ducks can die, so \(X\in\{m-2,m-1\}\) whenever \(m\ge2\), and \(\E[X]=\frac{(m-1)^{2}}{m}=m-2+\frac1m\). Both possible values are therefore within distance 1 of \(\E[X]\): \(|m-1-\E X|=1-\frac1m<1\) and \(|m-2-\E X|=\frac1m\le1\). So \(k=1\) works with probability 1 for every \(m\ge2\), while the Chebyshev answer demands \(k=2\) for small \(m\). The question only asked to "find a \(k\)", so the official answer earns full marks — but it is a clean illustration of how loose a Chebyshev bound can be when you know the support of the variable.
Worked at §2.2.
Walkthrough 3 — Randomized response SoSe26 · P5 · 13 credits
The setting. Each survey participant has a sensitive binary attribute \(A\sim\Ber(p)\) with \(p\in[0,1]\) unknown. We never see \(A\). Instead we see a privacy-protected answer \(Y\): with probability \(r\in(0,1]\) the participant answers truthfully, and with probability \(1-r\) answers by flipping a fair coin, independently of \(A\). We observe iid answers \(Y_1,\dots,Y_n\) with \(r\) known, and write \(\bar Y_n=\frac1n\sum_{i=1}^{n}Y_i\).
Why anyone would do this: a participant who answers "yes" can always say the coin made them, so nothing about any individual can be inferred with certainty. The randomness is deliberately injected to buy privacy, and the statistician's job is to subtract it out again. This is the longest and most recent of the three closing problems and it spans four subchapters.
(a) \(\P(Y=1)\) and identifiability SoSe26 · P5a · 3 credits
Solution
Step 1 — total probability over the mechanism. Let \(T\) be the event "the participant answers truthfully", with \(\P(T)=r\) and \(\P(T^{c})=1-r\). These two partition the sample space, so by Theorem 1.70(ii), \[\P(Y=1)=\P(Y=1\mid T)\P(T)+\P(Y=1\mid T^{c})\P(T^{c}).\] Given \(T\), the answer equals the attribute, so \(\P(Y=1\mid T)=\P(A=1)=p\). Given \(T^{c}\), the answer is a fair coin, so \(\P(Y=1\mid T^{c})=\frac12\). Hence \[\P(Y=1)=r\,p+(1-r)\cdot\tfrac12=rp+\frac{1-r}{2}=:q(p).\] (Credit split printed on the paper: 1.5 for this expression.)
Step 2 — identifiability (Definition 3.11, §3.1). A parameter is identifiable if different parameter values give different distributions of the data — equivalently here, if the map \(p\mapsto q(p)\) is injective (one-to-one). Suppose \(q(p_1)=q(p_2)\). Then \(rp_1+\frac{1-r}{2}=rp_2+\frac{1-r}{2}\), so \(rp_1=rp_2\), and since \(r>0\) we may divide by \(r\) to get \(p_1=p_2\). So \(q\) is injective on \([0,1]\) and \(p\) is identifiable from the distribution of \(Y\). (1 credit for injectivity, 0.5 for the conclusion.)
Why \(r>0\) matters. If \(r=0\) every participant just flips a coin, \(q(p)=\frac12\) for every \(p\), and the data carry no information about \(p\): not identifiable. The problem excludes this by writing \(r\in(0,1]\).
An unstated assumption in the official solution
The step \(\P(Y=1\mid T^{c})=\frac12\) uses that the coin is flipped independently of the attribute \(A\), and that the choice of mechanism itself is independent of \(A\). The problem statement does say the coin is flipped "independently of \(A\)", but the model answer never names the assumption where it is used. Naming it costs one clause and makes the derivation airtight.
Worked at §1.4 (the probability half) and §3.1 (the identifiability half).
(b) The mle for \(p\) by reparametrisation SoSe26 · P5b · 3 credits
Assume the observed \(\bar y_n\) lies in \(\bigl[\frac{1-r}{2},\frac{1+r}{2}\bigr]\). Derive the maximum likelihood estimator for \(p\). Hint on the exam: the mle in a Bernoulli model is the sample mean.
Solution
Step 1 — what the data are. By part (a), each \(Y_i\) is Bernoulli with success probability \(q=q(p)=rp+\frac{1-r}{2}\), and the \(Y_i\) are iid. So the likelihood, as a function of \(q\), is \[L(q\mid y)=\prod_{i=1}^{n}q^{y_i}(1-q)^{1-y_i}=q^{\sum_iy_i}(1-q)^{\,n-\sum_iy_i}.\] (The formula \(q^{y}(1-q)^{1-y}\) is the compact way of writing "\(q\) if \(y=1\), \(1-q\) if \(y=0\)": each exponent switches one factor off.) That is 1 credit.
Step 2 — the mle of \(q\). By the hint, \(\hat q_{\text{mle}}=\bar Y_n\). (Deriving it takes three lines: \(\ell(q)=s\ln q+(n-s)\ln(1-q)\) with \(s=\sum y_i\), \(\ell'(q)=\frac sq-\frac{n-s}{1-q}=0\) gives \(s(1-q)=(n-s)q\), i.e. \(s=nq\), so \(q=\frac sn=\bar y_n\).) That is the second credit.
Step 3 — transform back. The map \(p\mapsto q(p)\) is bijective from \([0,1]\) onto \(\bigl[\frac{1-r}{2},\frac{1+r}{2}\bigr]\) (it is affine with slope \(r>0\)). The maximum likelihood estimator is invariant under such a reparametrisation: maximising over \(p\) is the same as maximising over \(q\) and then reading back the \(p\) that produced it. Solving \(\bar y_n=rp+\frac{1-r}{2}\) for \(p\): subtract \(\frac{1-r}{2}\), then divide by \(r\), \[\hat p_{\text{mle}}=\frac{\bar Y_n-\frac{1-r}{2}}{r}.\] That is the third credit.
What the printed assumption on \(\bar y_n\) is really doing
The official line "the Bernoulli likelihood is maximised at \(\hat q=\bar y_n\)" silently needs \(\bar y_n\) to be a reachable value of \(q\), that is \(\bar y_n\in[\frac{1-r}{2},\frac{1+r}{2}\bigr]\) — which is exactly what the problem assumes. If it failed, the unrestricted formula could return a negative number or one above 1, which cannot be a probability; the true mle would then be the nearest boundary, \(\hat p=0\) or \(\hat p=1\). Say this in one sentence; it shows you know why the assumption is printed.
Worked at §3.2.
(c) Unbiasedness and variance SoSe26 · P5c · 2 credits
Show \(\hat p:=\frac{\bar Y_n-\frac{1-r}{2}}{r}\) is unbiased for \(p\) and compute \(\Var[\hat p]\).
Solution
Unbiasedness (1 credit). \(\E[\bar Y_n]=\frac1n\sum_{i=1}^{n}\E[Y_i]=q(p)\), because each \(Y_i\sim\Ber(q(p))\) has mean \(q(p)\) (Lemma 2.26(iii)) — linearity only, no independence needed. Then, since \(\hat p\) is an affine function of \(\bar Y_n\) and expectation is linear (Proposition 2.4(i)), \[\E[\hat p]=\frac{\E[\bar Y_n]-\frac{1-r}{2}}{r}=\frac{q(p)-\frac{1-r}{2}}{r} =\frac{rp+\frac{1-r}{2}-\frac{1-r}{2}}{r}=\frac{rp}{r}=p .\] The bias is \(p-p=0\): unbiased (Definition 3.20(i)).
Variance (1 credit). Adding the constant \(-\frac{1-r}{2}\) does not change a variance, and dividing by \(r\) divides it by \(r^{2}\) (Proposition 2.8(iii), \(\Var[aX+b]=a^{2}\Var[X]\) with \(a=\frac1r\)): \[\Var[\hat p]=\frac{1}{r^{2}}\Var[\bar Y_n]=\frac{1}{r^{2}}\cdot\frac{q(p)\bigl(1-q(p)\bigr)}{n},\] where \(\Var[\bar Y_n]=\frac{1}{n^{2}}\sum_i\Var[Y_i]=\frac{1}{n^{2}}\cdot n\,q(1-q)=\frac{q(1-q)}{n}\), using \(\Var[\Ber(q)]=q(1-q)\) and, here, the independence of the \(Y_i\) (Proposition 2.8(iv)).
Since \(\hat p\) is unbiased, \(\operatorname{mse}[\hat p]=\Var[\hat p]\).
In words: the \(\frac{1}{r^{2}}\) is the price of privacy. With \(r=\frac12\) the variance is four times what it would be if everyone answered truthfully — you need roughly four times as many participants to reach the same accuracy.
Numbers. With \(r=\frac12\), \(n=100\) and \(q=0.55\): \(\Var[\hat p]=\frac{0.55\cdot0.45}{0.25\cdot100}=\frac{0.2475}{25}=0.009900\), standard deviation \(0.09950\). Worked at §3.2.
(d) A one-sided approximate test SoSe26 · P5d · 5 credits
The organisers want to know whether more than 60 % of the population have the attribute. Take \(r=\frac12\); among \(n=100\) answers, 64 equal 1; \(\alpha=0.05\). Formulate the hypotheses and perform an approximate test: state the statistic, its approximate distribution at the null boundary, the rejection rule, the observed value, and the conclusion. Hints on the exam: \(q(p)=rp+\frac{1-r}{2}\) and \(z_{0.05}\approx1.64\).
Solution, with the official credit split
(1 cr) Hypotheses. The claim we want evidence for goes into \(H_1\), and "more than 60 %" is directional, so the test is one-sided (Definition 3.43): \[H_0:\ p\le0.6\qquad\text{against}\qquad H_1:\ p>0.6 .\]
(1 cr) The null boundary and its numbers. With \(r=\frac12\), \(q(p)=\frac12p+\frac{1-\frac12}{2}=\frac p2+\frac14\), which is strictly increasing in \(p\). So among all \(p\) allowed by \(H_0\), the one that makes the data look most like \(H_1\) is the boundary \(p_0=0.6\), and \[q_0=q(0.6)=\tfrac12\cdot0.6+\tfrac14=0.3+0.25=0.55 .\] At this boundary, \(\E[\bar Y_{100}]=q_0=0.55\) and \(\Var[\bar Y_{100}]=\frac{q_0(1-q_0)}{100}=\frac{0.55\cdot0.45}{100}=\frac{0.2475}{100}=0.002475\), so the standard deviation is \(\sqrt{0.002475}=0.04975\).
(1 cr) The statistic and its law. By the clt (Theorem 2.64 — the \(Y_i\) are iid Bernoulli with finite mean and finite non-zero variance), \[Z:=\frac{\bar Y_{100}-0.55}{\sqrt{0.55\cdot0.45/100}}\ \text{is approximately}\ \mathcal N(0,1) \ \text{under the null boundary.}\]
(1 cr) The rule and the observed value. One-sided rejection rule at level \(\alpha=0.05\): reject \(H_0\) if \(z_{\text{obs}}>z_{0.05}\approx1.64\). The observed sample mean is \(\bar y_{100}=\frac{64}{100}=0.64\), so \[z_{\text{obs}}=\frac{0.64-0.55}{0.04975}=\frac{0.09}{0.04975}=1.809\approx1.81 .\]
(1 cr) The decision, in words. Since \(1.81>1.64\), we reject \(H_0\) at the approximate significance level 0.05. The data provide evidence that more than 60 % of the population have the attribute.
How to get \(0.09/0.04975\) without a calculator. \(0.55\cdot0.45=0.2475\), so the variance is \(0.002475\) and the standard deviation is \(\sqrt{0.002475}\). Since \(0.05^{2}=0.0025\), the standard deviation is just under \(0.05\); take it as \(0.0498\). Then \(0.09/0.05=1.8\), and the slightly smaller denominator pushes the answer a little above 1.8. That is enough to see \(1.81>1.64\).
The two traps in this part
Trap 1 — the variance is evaluated at the null boundary, not at the observation. Using \(\hat q=0.64\) would give \(\sqrt{0.64\cdot0.36/100}=0.04800\) and \(z=1.875\); the decision happens to be the same here, but it is not what is marked.
Trap 2 — one-sided means \(z_{0.05}=1.64\), not \(z_{0.025}=1.96\). With 1.96 the observed 1.81 would fail to reject and you would lose the rule credit and the decision credit. Both tests ever set on these three papers were one-sided, and both official solutions flag that explicitly.
A footnote on the estimate itself. Part (b)'s estimator gives \(\hat p=\frac{0.64-0.25}{0.5}=0.7800\) — a point estimate of 78 %. Its standard deviation from part (c) is about \(0.0995\), so a rough 95 % Wald interval would be \(0.78\pm1.96\cdot0.0995\), which is very wide. The test's verdict "more than 60 %" is therefore not a strong statement, only a statistically significant one at the 5 % level. No exam has asked for this interval, but Example 3.58 (§3.4) is the recipe.
Worked in full, with the p-value widget, at §3.3.
Two new long problems in the same style
Each has five parts of rising difficulty, a realistic credit total of 13, and chains several subchapters, in the manner of the three above. Work them under time pressure — about 25 minutes each — with paper only.
Long problem A — The flaky test suite My problem · 13 credits · chains §1.4 → §3.1 → §2.2 (Jensen) → §3.2 → §3.3 with §2.4 underneath
A continuous-integration pipeline runs a suite of \(n=5\) test cases. Each test fails independently of the others with the same unknown probability \(\theta\in[0,1)\). The dashboard does not show individual tests: it only records whether the whole run failed, meaning at least one of the five tests failed. We observe \(m\) independent runs and record \(R_1,\dots,R_m\), where \(R_j=1\) if run \(j\) failed and \(R_j=0\) otherwise. Write \(\bar R_m=\frac1m\sum_{j=1}^{m}R_j\).
- (3 cr) Compute \(\P(R=1)\) in terms of \(\theta\) and \(n\). Is \(\theta\) identifiable from the distribution of \(R\)?
- (3 cr) Derive the maximum likelihood estimator \(\hat\theta_{\text{mle}}\) for \(\theta\).
- (2 cr) Decide, with a proof, whether \(\hat\theta_{\text{mle}}\) is unbiased. State the direction of any bias.
- (2 cr) For \(\hat q:=\bar R_m\), give \(\E[\hat q]\), \(\Var[\hat q]\), and a Chebyshev bound on \(\P(|\hat q-q|\ge\epsilon)\) that does not involve the unknown \(q\). Evaluate it at \(m=100\), \(\epsilon=0.1\), and compare with the clt value at \(q=\frac12\).
- (3 cr) Among \(m=200\) runs, 150 failed. Test \(H_0:\theta\le0.2\) against \(H_1:\theta>0.2\) at \(\alpha=0.05\), using \(z_{0.05}\approx1.64\).
Solution
(i) The distribution of one run. A run passes exactly when all \(n\) tests pass. The tests are independent, and each passes with probability \(1-\theta\), so \[\P(R=0)=(1-\theta)^{n},\qquad\text{hence}\qquad q(\theta):=\P(R=1)=1-(1-\theta)^{n}.\] With \(n=5\): \(q(\theta)=1-(1-\theta)^{5}\).
Identifiability (Definition 3.11). \(q\) is injective on \([0,1)\): the map \(\theta\mapsto1-\theta\) is strictly decreasing, raising a number in \((0,1]\) to the fifth power is strictly increasing on positive numbers, and subtracting from 1 flips the direction once more — so \(q\) is strictly increasing in \(\theta\). A strictly increasing function is injective, so different \(\theta\) give different distributions of \(R\), and \(\theta\) is identifiable.
What earns the credits: the complement step \(\{R=0\}=\{\text{all tests pass}\}\) (1), independence to get the product \((1-\theta)^n\) (1), the injectivity argument and the conclusion (1).
(ii) The mle. The \(R_j\) are iid \(\Ber(q)\) with \(q=q(\theta)\), so exactly as in the randomized response problem, \[L(q\mid r)=q^{\sum_jr_j}(1-q)^{\,m-\sum_jr_j},\qquad \hat q_{\text{mle}}=\bar R_m .\] (The three-line derivation: \(\ell(q)=s\ln q+(m-s)\ln(1-q)\) with \(s=\sum_jr_j\); \(\ell'(q)=\frac sq-\frac{m-s}{1-q}=0\Rightarrow s(1-q)=(m-s)q\Rightarrow s=mq\Rightarrow q=\bar r_m\); \(\ell''(q)=-\frac{s}{q^{2}}-\frac{m-s}{(1-q)^{2}}<0\) for \(0<s<m\), so it is the global maximum.)
Now invert \(q(\theta)=1-(1-\theta)^{5}\). Solve for \(\theta\): \[q=1-(1-\theta)^{5}\iff(1-\theta)^{5}=1-q\iff1-\theta=(1-q)^{1/5}\iff\theta=1-(1-q)^{1/5}.\] (Taking a fifth root is legitimate because \(1-q\in(0,1]\).) The map is bijective, so the mle transforms with it: \[\hat\theta_{\text{mle}}=1-\bigl(1-\bar R_m\bigr)^{1/5}.\] Guard clause: if \(\bar R_m=1\) (every run failed) this returns \(\hat\theta=1\), which is outside the stated parameter set \([0,1)\); the mle then sits on the boundary, exactly as in SoSe26 P5b. Say so.
(iii) Unbiasedness — and this is where Jensen enters. Write \(h(u):=1-(1-u)^{1/5}\), so \(\hat\theta_{\text{mle}}=h(\bar R_m)\) and \(\theta=h(q)\).
Is \(h\) convex? Let \(f(u)=(1-u)^{1/5}\). Then, by the chain rule, \[f'(u)=\tfrac15(1-u)^{1/5-1}\cdot(-1)=-\tfrac15(1-u)^{-4/5},\qquad f''(u)=-\tfrac15\cdot\bigl(-\tfrac45\bigr)(1-u)^{-9/5}\cdot(-1)=-\tfrac{4}{25}(1-u)^{-9/5}<0\] for \(u<1\). So \(f\) is strictly concave, hence \(h=1-f\) is strictly convex on \([0,1)\).
Jensen's inequality (Theorem 2.42) applied to the convex \(h\) and the random variable \(\bar R_m\) gives \[\E[\hat\theta_{\text{mle}}]=\E\bigl[h(\bar R_m)\bigr]\ \ge\ h\bigl(\E[\bar R_m]\bigr)=h(q)=\theta .\] So \(\hat\theta_{\text{mle}}\) is biased, and the bias is \(\ge0\): it systematically overestimates \(\theta\). The inequality is strict as soon as \(\bar R_m\) is not degenerate, which it is not for \(0<q<1\) and \(m\ge1\), because \(h\) is strictly convex.
Numbers (by simulation, \(\theta=0.2\), \(n=5\) so \(q=0.6723\)): at \(m=5\) the mean of \(\hat\theta_{\text{mle}}\) is \(0.3014\) (bias \(+0.101\)); at \(m=20\) it is \(0.2077\) (bias \(+0.0077\)); at \(m=200\) it is \(0.2007\) (bias \(+0.0007\)). The bias is real but vanishes as \(m\) grows — the mle is asymptotically unbiased, which is all Remark 3.30 promises.
The general lesson: applying a non-linear function to an unbiased estimator destroys unbiasedness, and Jensen tells you in which direction. Only affine maps preserve it — which is why the randomized-response estimator, built from an affine inverse, stayed unbiased.
(iv) \(\hat q=\bar R_m\). Unbiased: \(\E[\hat q]=q\) by linearity. Variance: \(\Var[\hat q]=\frac{q(1-q)}{m}\), using independence (Proposition 2.8(iii)(iv)) and \(\Var[\Ber(q)]=q(1-q)\). Chebyshev (Theorem 2.40): \[\P(|\hat q-q|\ge\epsilon)\le\frac{q(1-q)}{m\epsilon^{2}}\le\frac{1}{4m\epsilon^{2}},\] the last step because \(q(1-q)\le\frac14\) for every \(q\in[0,1]\): the parabola \(q-q^{2}\) has its maximum at \(q=\frac12\), where it equals \(\frac14\). This version contains no unknown, which is what makes it usable.
At \(m=100\), \(\epsilon=0.1\): the bound is \(\frac{1}{4\cdot100\cdot0.01}=0.2500\). The clt value at \(q=\frac12\), where the standard deviation of \(\hat q\) is \(\sqrt{\frac{0.25}{100}}=0.05\), is \(2\Phi\bigl(-\frac{0.1}{0.05}\bigr)=2\Phi(-2)=0.04550\). The guarantee is about 5.5 times larger than the realistic value — the same picture as Drill E7 of the previous block.
(v) The test. "More than 0.2" is directional, so the test is one-sided: \[H_0:\ \theta\le0.2\qquad\text{against}\qquad H_1:\ \theta>0.2 .\] Since \(q(\theta)\) is strictly increasing, the hypothesis \(\theta\le0.2\) is the same as \(q\le q(0.2)\), and the null boundary is \[q_0=q(0.2)=1-0.8^{5}=1-0.32768=0.67232 .\] (\(0.8^{2}=0.64\), \(0.8^{4}=0.64^{2}=0.4096\), \(0.8^{5}=0.4096\cdot0.8=0.32768\).)
At the boundary, \(\E[\bar R_{200}]=0.67232\) and \(\Var[\bar R_{200}]=\frac{0.67232\cdot0.32768}{200}=\frac{0.22028}{200}=0.0011014\), so the standard deviation is \(\sqrt{0.0011014}=0.033189\). By the clt, under the null boundary \[Z=\frac{\bar R_{200}-0.67232}{0.033189}\ \text{is approximately}\ \mathcal N(0,1).\] Rejection rule: reject \(H_0\) if \(z_{\text{obs}}>z_{0.05}\approx1.64\). Observed: \(\bar r_{200}=\frac{150}{200}=0.75\), so \[z_{\text{obs}}=\frac{0.75-0.67232}{0.033189}=\frac{0.07768}{0.033189}=2.341 .\] Since \(2.341>1.64\), we reject \(H_0\) at the approximate level 0.05: the data give evidence that the per-test failure probability exceeds 0.2.
Point estimate, for context: \(\hat\theta_{\text{mle}}=1-(1-0.75)^{1/5}=1-0.25^{0.2}=0.2421\).
What this problem drills that the past three do not. The randomized-response problem had an affine link \(q(p)\), so inverting it kept unbiasedness and everything stayed linear. Here the link \(q(\theta)=1-(1-\theta)^{5}\) is non-linear, which (a) makes the null boundary a genuine computation rather than a substitution, and (b) forces the bias question to be answered with Jensen rather than with linearity. Both moves are inside the course: Theorem 2.42 and Definition 3.20.
Long problem B — Handing back the exam sheets My problem · 13 credits · chains §1.2 → §2.1 (indicators, covariance, conditional expectation) → §2.2 → §2.4 → §3.3
At the end of a tutorial, \(n\ge2\) students hand in one exam sheet each. The tutor shuffles the pile uniformly at random — every one of the \(n!\) orderings is equally likely — and hands back one sheet to each student in that order. Let \(X\) be the number of students who receive their own sheet.
- (3 cr) Compute \(\E[X]\).
- (3 cr) Compute \(\Var[X]\). Are the indicators independent?
- (2 cr) Bound \(\P(X\ge4)\) with Markov and with Chebyshev. Which is better, and why?
- (2 cr) Given that student 1 received their own sheet, what is the expected number of students who receive their own sheet?
- (3 cr) A tutor is suspected of not shuffling properly. Over \(m=400\) independent tutorials the average number of own-sheet matches was \(\bar x=1.12\). Test, at \(\alpha=0.05\) with \(z_{0.05}\approx1.64\), whether the shuffling produces more matches than a uniform shuffle would.
Solution
(i) \(\E[X]\). Let \(A_i\) be the event "student \(i\) receives their own sheet", \(i\in\{1,\dots,n\}\), and \(X_i:=\one_{A_i}\), so that \(X=\sum_{i=1}^{n}X_i\).
By symmetry, student \(i\)'s sheet is equally likely to end up in any of the \(n\) positions, so \(\P(A_i)=\frac1n\). (Counting version: the orderings in which position \(i\) holds sheet \(i\) number \((n-1)!\), out of \(n!\) in total, and \(\frac{(n-1)!}{n!}=\frac1n\) — a Laplace probability, §1.2, §1.2.)
Then \(\E[X_i]=\P(A_i)=\frac1n\), and by linearity (Proposition 2.4(i)), \[\E[X]=\sum_{i=1}^{n}\E[X_i]=n\cdot\frac1n=1 .\] Whatever the class size, on average exactly one student gets their own sheet.
(ii) \(\Var[X]\). Use \(\Var[X]=\E[X^{2}]-\E[X]^{2}\) and expand as in the duck hunt: \(\E[X^{2}]=\sum_{i,k=1}^{n}\E[X_iX_k]=\sum_{i,k}\P(A_i\cap A_k)\).
Diagonal (\(i=k\)): \(X_i^{2}=X_i\), so each of the \(n\) terms is \(\frac1n\); total \(1\).
Off-diagonal (\(i\ne k\)): both students get their own sheet when two specified positions are fixed. The number of such orderings is \((n-2)!\), so \[\P(A_i\cap A_k)=\frac{(n-2)!}{n!}=\frac{1}{n(n-1)} .\] There are \(n(n-1)\) ordered pairs with \(i\ne k\), so the off-diagonal total is \(n(n-1)\cdot\frac{1}{n(n-1)}=1\).
Hence \(\E[X^{2}]=1+1=2\) and \[\Var[X]=2-1^{2}=1 .\] Again independent of \(n\).
Are the indicators independent? No. Compare: \[\P(A_i\cap A_k)=\frac{1}{n(n-1)}\qquad\text{against}\qquad\P(A_i)\P(A_k)=\frac{1}{n^{2}} .\] Since \(n(n-1)<n^{2}\), the joint probability is strictly larger than the product, so the events are not independent. The covariance (Definition 2.9, §2.1) is \[\Cov[X_i,X_k]=\E[X_iX_k]-\E[X_i]\E[X_k]=\frac{1}{n(n-1)}-\frac{1}{n^{2}} =\frac{n-(n-1)}{n^{2}(n-1)}=\frac{1}{n^{2}(n-1)}>0 .\] Positively correlated: knowing that one student got their own sheet makes it slightly more likely for another. At \(n=10\) the covariance is \(\frac{1}{900}=0.001111\), small but not zero.
The reason the variance still comes out as 1: the \(n(n-1)\) small positive covariances add up to \(n(n-1)\cdot\frac{1}{n^{2}(n-1)}=\frac1n\), which exactly cancels the shortfall \(\sum_i\Var[X_i]=n\cdot\frac1n(1-\frac1n)=1-\frac1n\) relative to 1.
(iii) Bounding \(\P(X\ge4)\).
Markov (Theorem 2.38; \(X\ge0\)): \(\P(X\ge4)\le\frac{\E[X]}{4}=\frac14=0.2500\).
Chebyshev (Theorem 2.40): first put the event into the required shape. Since \(\E[X]=1\), \(\{X\ge4\}=\{X-1\ge3\}\subseteq\{|X-1|\ge3\}\), and probabilities respect inclusion, so \[\P(X\ge4)\le\P(|X-1|\ge3)\le\frac{\Var[X]}{3^{2}}=\frac19=0.1111 .\]
Chebyshev is better here (0.1111 against 0.2500), and that is the usual situation when the variable is concentrated around its mean: Markov uses only the mean and therefore cannot know that \(X\) rarely strays, while Chebyshev also uses the variance. The price is that Chebyshev needs a finite variance, which Markov does not.
How good are they? For large \(n\) the true value is about \(0.01899\) (the distribution of \(X\) approaches \(\Poi(1)\), for which \(\P(X\ge4)=1-e^{-1}(1+1+\frac12+\frac16)=1-\frac{8}{3e}=0.01899\)). The exact value at \(n=10\) is \(0.01899\) as well, to four digits. So Chebyshev overshoots the truth by a factor of about 6, and Markov by about 13. Both are valid; neither is sharp.
One caution: for \(n=5\) the exact value is \(0.008333=\frac1{120}\), because with five sheets it is impossible for exactly 4 students to be matched — if four are right the fifth must be too — so \(\P(X\ge4)=\P(X=5)=\frac{1}{5!}\). Small \(n\) has its own combinatorics.
(iv) \(\E[X\mid A_1]\). Given \(A_1\), student 1's sheet is fixed in place and the remaining \(n-1\) sheets form a uniformly random ordering of the remaining \(n-1\) students. So, for \(k\ne1\), \[\P(A_k\mid A_1)=\frac{\P(A_k\cap A_1)}{\P(A_1)}=\frac{1/(n(n-1))}{1/n}=\frac{1}{n-1},\] which is the same formula as before with \(n\) replaced by \(n-1\) — exactly what "a uniform shuffle of \(n-1\) sheets" predicts. Therefore, writing \(X=X_1+\sum_{k=2}^{n}X_k\) and using linearity of conditional expectation, \[\E[X\mid A_1]=\underbrace{\E[X_1\mid A_1]}_{=1,\ \text{since }X_1=1\text{ on }A_1} +\sum_{k=2}^{n}\P(A_k\mid A_1)=1+(n-1)\cdot\frac{1}{n-1}=2 .\] Two, for every \(n\ge2\) — one guaranteed match plus one expected match among the rest.
In words: the "expected one match" is remarkably robust. Take one match as given and the rest of the class still produces one on average, so the total is two.
(v) The test. Model the \(m=400\) tutorials as iid copies \(X^{(1)},\dots,X^{(400)}\) of \(X\). Under a uniform shuffle, \(\E[X]=1\) and \(\Var[X]=1\) from parts (i) and (ii).
"More matches than a uniform shuffle would produce" is directional, so the test is one-sided. Writing \(\mu\) for the true mean number of matches per tutorial: \[H_0:\ \mu\le1\qquad\text{against}\qquad H_1:\ \mu>1 .\] At the null boundary \(\mu_0=1\), and with variance 1 per tutorial, \[\E[\bar X_{400}]=1,\qquad\Var[\bar X_{400}]=\frac{1}{400},\qquad\text{sd}=\frac{1}{20}=0.05 .\] By the clt (Theorem 2.64 — iid, finite mean, finite non-zero variance), the statistic \[Z=\frac{\bar X_{400}-1}{1/20}\ \text{is approximately}\ \mathcal N(0,1)\ \text{under the null boundary.}\] Rejection rule: reject if \(z_{\text{obs}}>z_{0.05}\approx1.64\). Observed: \[z_{\text{obs}}=\frac{1.12-1}{0.05}=\frac{0.12}{0.05}=2.400 .\] Since \(2.400>1.64\) we reject \(H_0\) at the approximate level 0.05: there is evidence that this tutor's shuffling produces more own-sheet matches than a uniform shuffle.
One honest caveat to state: the variance 1 used in the denominator is the variance under the null hypothesis of a uniform shuffle. That is the correct choice for a test (Trap 1 of SoSe26 P5d), and it is also the only variance we can compute without knowing the tutor's actual shuffling mechanism.
What this problem drills that the past three do not. The duck hunt's indicators were also dependent, but there the dependence came from independent hunters colliding; here it comes from a permutation, where a sheet placed in one spot is removed from all the others. Part (iv) brings in conditional expectation, which appeared on the exams only as the true/false item SoSe26 P2c and never as a computation. Part (v) turns a combinatorial quantity into a test, which is the move all three closing problems make in their last part. Everything used is in the course: Laplace probabilities (§1.2), indicators and covariance (§2.1), Markov and Chebyshev (§2.2), the clt (§2.4), the one-sided z-test (§3.3).
The standing warning, once more My addition
Three papers — two endterms and one retake — are a tiny sample, and they disagree with each other on problem count, credit total and topic mix. The closing story problem is the one habit all three share, and even that tells you only what a full-credit answer has looked like, never what the next paper will contain. Drill these chains because the moves inside them (indicators, linearity, covariance, a bound, a test) are the moves the whole course is built from — not because the next problem will be about ducks.
Recipes for the recurring task types
The three official Musterlösungen keep re-using the same fifteen moves. Below, each one is written as a method box: how you recognise the task, the numbered steps, the place where credits are usually lost, and chips saying in which paper (and for how many credits) it has appeared. The chips are evidence of what has been asked, nothing more.
The standing warning
Three papers is a tiny sample: two endterms [Endklausur] and one retake [Wiederholungsklausur], and the retake had a visibly different shape from its own endterm. Nothing on this page predicts the next exam. Use the recipes to know what a full-credit answer looks like, never to decide what to skip.
TT1 · Decide a true/false statement and justify it WiSe25 · P1a–d · 12 cr SoSe25 · P1a–d · 12 cr SoSe26 · P1a–e · 5 cr SoSe26 · P2a–d · 12 cr
Trigger. A short sentence with a tick box, or the words "decide whether the following statement is true or false". 41 credits across the three papers — the largest single task type.
- Read the quantifier. "For any", "for all", "then it already holds" means one single witness refutes it. If the sentence is a named theorem in disguise, the answer is the theorem plus its one line.
- Compare the hypotheses printed with the hypotheses the result needs. Missing independence [Unabhängigkeit], missing finiteness, missing non-degeneracy — the counterexample lives exactly in that gap.
- True: name the script item (Thm 2.35, Prop 2.12(iii)(v), Rem 2.57, …) and write the one or two lines it needs.
- False: build the smallest counterexample — a sample space \(\Omega\) with 2 to 4 points and an explicit probability mass function [Wahrscheinlichkeitsfunktion], or \(\Ber(\tfrac12)\), or \(\Unif(0,1)\). Then verify both halves with numbers: the hypothesis holds, and the conclusion fails.
- Write the verdict word first. SoSe26's printed marking scheme gives 1 credit for the bare verdict, before any justification.
Pitfall. Reading "iid" into a statement that only says "identically distributed". That single reflex is worth 3 credits on WiSe25 P1d and it is the most examined error on these papers.
Counterexample kit: \(X_i := X_1\) for all \(i\) (destroys independence, keeps the marginal law); \(X_n := n\cdot\one_{\{U\le 1/n\}}\) with \(U\sim\Unif(0,1)\) (converges to 0 in every mode, yet \(\E[X_n]=1\)); \(X\) uniform on \(\{-1,0,1\}\) with \(Y=X^2\) (uncorrelated, \(\E[X\mid Y]=\E[X]\), still dependent); a finite collection whose size is not a power of 2 (cannot be a \(\sigma\)-algebra).
Taught on: \(\sigma\)-algebras · covariance · modes of convergence · what a level means. Drill: the true/false bank.
TT2 · State a named theorem or definition with all assumptions WiSe25 · P2a, P2b · 3+3 cr SoSe25 · P2a, P2b · 3+3 cr SoSe26 · P3a · 3 cr
Trigger. "State the … with all required assumptions", or "Give the full definition of …". 15 credits of pure recall [Reproduktion], present in all three papers.
- Set the stage: what objects exist and where they live. "Let \(X_1,X_2,\dots\) be a sequence of iid real random variables on a common probability space \((\Omega,\Aa,\P)\)."
- List every finiteness and regularity assumption separately, one clause each: finite mean; finite and non-zero variance; \(g\) convex. The marking is per assumption.
- State the conclusion in the script's own notation and name the mode of convergence.
- For a mode of convergence, include the exceptional-set clause — "for every \(x\in\R\) at which \(F_X\) is continuous" (Def 2.56(iii)), "\(\P(\{\omega:\lim_n X_n(\omega)=X(\omega)\})=1\)" (Def 2.56(ii)). That clause is the part people drop and the part that is marked.
- Do not add unasked extras. SoSe26 P3a states that the parenthetical additions were not graded — and a wrong extra can still cost you.
Pitfall. Writing the central limit theorem as \(\bar X_n \xrightarrow{d} \mathcal N(\mu,\sigma^2/n)\). A limit law cannot depend on \(n\). Write the standardised version, \(Z_n=(\bar X_n-\mu)/(\sigma/\sqrt n)\xrightarrow{d}\mathcal N(0,1)\).
Taught on: the laws of large numbers · the central limit theorem · modes of convergence · Jensen. Drill: the state-it bank.
TT3 · A density with an unknown constant: find it, then cdf / mean / median SoSe25 · P3a, P3b, P3c · 2+2+2 cr
Trigger. "Determine \(c\) such that \(p_X(x)=x/c\) on \([0,2]\) is a valid probability density function." A probability density function [Dichte] is a function \(p\ge 0\) whose total integral is 1 (Def 1.45).
- Write \(\int p(x)\,\mathrm dx = 1\), integrating only over the stated support — the set where \(p\) is allowed to be non-zero.
- Solve for the constant, then check \(p\ge 0\) there. SoSe25's own solution says this out loud.
- cdf: \(F(x)=\int_{-\infty}^{x}p(y)\,\mathrm dy\) (Lem 1.49(i)); write all three branches — 0 below the support, the formula on it, 1 above. Full credit needed all three.
- Mean: \(\E[X]=\int x\,p(x)\,\mathrm dx\) over the support (Def 2.1(ii)).
- Median: solve \(F(m)=\tfrac12\) (Def 2.20) and discard roots outside the support — \(m=\sqrt 2\), not \(-\sqrt2\).
Pitfall. Integrating over all of \(\R\) instead of the support, and forgetting the two constant branches of the cdf.
Taught on: densities · quantiles and the median. Drill: the density drills.
TT4 · Transform a random variable: the density of \(g(X)\) WiSe25 · P3a · 4 cr SoSe25 · P3d · 3 cr SoSe25 · P1d · 3 cr SoSe26 · P4b · 3 cr
Trigger. "\(U\sim\Unif(0,1)\) and \(X=-\tfrac1\lambda\ln U\): derive the density of \(X\)", or "determine the pdf of \(Y=\ln X\)". 13 credits, present in all three papers in some form.
- Push the support of \(X\) through \(g\) first. WiSe25 P3a prints "Be sure to correctly specify the support" — the support is separately worth credit.
- Decide whether \(g\) is increasing or decreasing there. \(-\tfrac1\lambda\ln u\) is decreasing, so the inequality flips when you invert it.
- Then either route — both scored full marks:
- cdf route: \(F_Y(y)=\P(g(X)\le y)\), invert the inequality (flip if \(g\) is decreasing), differentiate.
- Prop 2.51: \(p_Y(y)=p_X\bigl(g^{-1}(y)\bigr)\cdot\bigl|\tfrac{\mathrm d}{\mathrm dy}g^{-1}(y)\bigr|\) — the change-of-variables formula [Transformationsformel], which the exam supplies as a hint when it wants this route.
- State \(p_Y(y)=0\) off the support, explicitly.
- Check \(\int p_Y = 1\).
Pitfall. A ratio \(X/Y\) is a different task: build the joint density as the product of the marginals (independence, Def 1.77), then integrate over \(\{x < t\,y\}\) as an iterated integral. The change-of-variables formula for one variable does not apply.
Taught on: transformation of densities · the cdf method. Drill: the density drills.
TT5 · Compute a maximum likelihood estimator WiSe25 · P4a · 4 cr SoSe25 · P4a · 4 cr SoSe26 · P5b · 3 cr
Trigger. "Derive the maximum likelihood estimator [Maximum-Likelihood-Schätzer] for \(\theta\)". 11 credits, in all three papers.
- \(L(\theta\mid x)=\prod_{i=1}^{n}p_\theta(x_i)\) (Def 3.13, iid case). Collect the powers of \(\theta\) and merge the exponentials.
- \(\ell=\ln L\). Drop additive terms with no \(\theta\) in them (\(\sum\ln x_i\), \(-\ln\prod x_i!\)) — and say that you are dropping them and why (they do not move the maximiser).
- \(\mathrm d\ell/\mathrm d\theta = 0\), solve for \(\theta\).
- Verify it is a maximum. A second derivative gives only a local statement; the sign of \(\ell'\) on both sides of the candidate gives a global one. Write the extra line.
- If the model is a reparametrisation: find the mle of the easy parameter (\(\hat q=\bar y_n\) for a Bernoulli), then invert the known map — from \(q(p)=rp+\tfrac{1-r}{2}\) you get \(\hat p = (\bar y_n-\tfrac{1-r}{2})/r\) — and check that the result lies inside the parameter set.
Pitfall. WiSe25 P4a's official solution stops at \(\ell''(\hat\theta)<0\); since \(\ell''(\theta) = \tfrac{2}{\theta^3}(n\theta-s)\) is positive for \(\theta > s/n\), that argument alone proves only a local maximum. This guide adds the missing line on the mle page.
Taught on: the likelihood function · maximum likelihood estimation. Drill: the estimation drills.
TT6 · Bias, variance and mean squared error of an estimator WiSe25 · P5b, P5c · 2+2 cr SoSe25 · P1b, P4b · 3+2 cr SoSe26 · P5c, P1e · 2+1 cr
Trigger. "Is \(\hat\theta\) unbiased [erwartungstreu]?", "Compute \(\mathrm{mse}[\hat\theta]\)". In all three papers.
- Write the estimator as \(c\cdot\sum_i X_i\), or as a sample mean \(\bar Y_n\) after a linear map.
- Mean: pull the constant out and use linearity, \(\E[aX+bY]=a\E[X]+b\E[Y]\) (Prop 2.4(i)). No independence is needed here. Compare with \(\theta\) to read off the bias, \(\mathrm{bias}[\hat\theta] =\E[\hat\theta]-\theta\) (Def 3.20(i)).
- Variance: constants come out squared, \(\Var[aX+b]=a^2\Var[X]\) (Prop 2.8(iii)); then the variances of independent summands add (Prop 2.8(iv)). Independence is needed here and nowhere else — say so.
- If the bias is 0 then \(\mathrm{mse}=\Var\); otherwise \(\mathrm{mse}=\Var+\mathrm{bias}^2\) (Def 3.20(iv)). Two exam sub-parts turn on exactly that sentence.
- If the estimator is a count divided by \(n\), recognise the \(\Bin(n,p)\) behind it and reuse \(\E=np\), \(\Var=np(1-p)\) (Lem 2.26(iv)) instead of re-deriving. Those two values were not hinted on WiSe25.
Pitfall. Forgetting that "the mle is good" is an asymptotic statement (Rem 3.30). For a fixed finite \(n\) the mle need not have the smallest mse — that is exactly SoSe26 P1e.
Taught on: properties of estimators · variance. Drill: the estimation drills.
TT7 · Bound a tail with Chebyshev or Markov WiSe25 · P4b · 3 cr SoSe25 · P5c · 4 cr SoSe26 · P4d · 3 cr
Trigger. "Give an upper bound for \(\P(|\hat\theta-\theta|\ge\varepsilon)\)", or "find \(k\) such that \(X\in[\E[X]\pm k]\) with probability at least 90 %". 10 credits, in all three papers.
- Rewrite the event into the shape the inequality wants. Chebyshev (Thm 2.40) needs \(\{|Y-\E[Y]|\ge\varepsilon\}\); Markov (Thm 2.38) needs a non-negative variable over a threshold. For \(\P(|Z_n|\ge a)\) the official move is \(|Z_n|\ge a \iff Z_n^2\ge a^2\), then Markov on \(Z_n^2\). For "within \([\E[X]\pm k]\) with probability at least 90 %", it is \(\P(X\notin[\E[X]\pm k])\le 0.1\).
- Compute \(\E[Y]\) and \(\Var[Y]\) (or \(\E[Z^2]=\Var[Z]+\E[Z]^2\)) first, as a separate labelled step.
- Apply the theorem by name: \(\P(|Y-\E[Y]|\ge\varepsilon)\le \Var[Y]/\varepsilon^2\), or \(\P(Z\ge\varepsilon)\le\E[Z]/\varepsilon\) for \(Z\ge0\).
- If a value is wanted, set the bound equal to the allowed failure probability and solve.
- Round in the safe direction and say why ("rounding up, so that the inequality still holds the way we want it").
Pitfall. Using Markov on a variable that can be negative. Markov's special case needs \(X\ge0\); that is why the official route squares first.
Taught on: Markov · Chebyshev. Drill: the estimation drills.
TT8 · clt approximation of an estimator, answer in terms of \(\Phi\) WiSe25 · P4c · 3 cr SoSe25 · P4c · 2 cr SoSe26 · P4d · part of 3 cr
Trigger. "Use the central limit theorem to approximate …". Here \(\Phi\) is the cumulative distribution function of the standard normal \(\mathcal N(0,1)\): \(\Phi(z)=\P(Z\le z)\) for \(Z\sim\mathcal N(0,1)\). In all three papers.
- Check Thm 2.64's hypotheses out loud: iid, finite mean, finite non-zero variance.
- Standardise: \((\hat\theta-\E[\hat\theta])/\sqrt{\Var[\hat\theta]}\xrightarrow{d}\mathcal N(0,1)\).
- Write the approximate law: \(\hat\theta\approx\mathcal N(\theta,\Var[\hat\theta])\) — for example \(\bar X_n\approx\mathcal N(\lambda,\lambda/n)\) or \(\hat\theta\approx\mathcal N(\theta,\theta^2/2n)\).
- Two-sided tail: \(\P(|\hat\theta-\theta|\ge\varepsilon)\approx 2\Phi(-\varepsilon/\mathrm{sd}) = 2\bigl(1-\Phi(\varepsilon/\mathrm{sd})\bigr)\), where \(\mathrm{sd}=\sqrt{\Var[\hat\theta]}\). Leave \(\Phi\) symbolic — no table has ever been supplied.
- Use the word approximation. WiSe25 P4d is one whole credit for saying that Chebyshev is a valid but loose guarantee decaying like \(1/n\), while the clt is only approximate but far sharper.
Pitfall. "Improving" the answer by substituting \(\hat\theta\) for the unknown \(\theta\) inside the \(\Phi\). WiSe25 P4c's answer \(2\Phi(-\sqrt{2n}\,\varepsilon/\theta)\) is meant to keep \(\theta\) in it.
Taught on: the central limit theorem · the \(\Phi\) table. Drill: the estimation drills.
TT9 · Choose and run an approximate one-sided z-test SoSe25 · P4d · 4 cr SoSe26 · P5d · 5 cr
Trigger. A story sentence with a direction in it ("has increased above", "more than 60 %"), a number \(\alpha\), and a data summary. 9 credits, in two of the three papers; both were one-sided.
- Put the claim you want evidence for into \(H_1\). Directional wording means one-sided (Def 3.43). Both official solutions write "note that this is one-sided".
- Identify the null boundary \(\theta_0\) and compute the mean and variance of the statistic there, not at the observed value. SoSe26 P5d: with \(r=\tfrac12\), \(q(p)=\tfrac12 p+\tfrac14\) is increasing, so the worst case of \(H_0:p\le0.6\) is \(p_0=0.6\), giving \(q_0=0.55\), \(\E[\bar Y_{100}]=0.55\), \(\Var=0.55\cdot0.45/100\).
- Statistic \(Z=\dfrac{\text{estimate}-\text{null mean}}{\sqrt{\text{null variance}}}\); state that it is "approximately \(\mathcal N(0,1)\) under the null boundary, by the clt".
- Rejection rule: reject if \(z_{\mathrm{obs}} > z_\alpha\) (one-sided) — \(z_{0.05}\approx1.64\) is supplied — or \(|z_{\mathrm{obs}}| > z_{\alpha/2}\) (two-sided).
- Plug in, compare, and state the decision in words. SoSe26's scheme: 1 credit each for the hypotheses, the null-boundary numbers, the standardised statistic and its law, the rule together with \(z_{\mathrm{obs}}\), and the decision.
Pitfall. Two of them, both worth a credit: standardising with the observed variance instead of the null one, and using \(z_{\alpha/2}=1.96\) where the one-sided \(z_\alpha=1.64\) is meant.
Taught on: constructing tests in practice · quantiles \(z_\alpha\). Drill: the story-problem bank.
TT10 · Approximate confidence interval for a proportion (Wald) WiSe25 · P5d · 2 cr
Trigger. "Give an approximate \(100(1-\alpha)\%\) confidence interval [Konfidenzintervall] for …". One of the three papers.
- Recognise the quantity as a mean of iid Bernoulli indicators and name its parameter \(p\). For the empirical cdf, \(\one_{(-\infty,t]}(X_i)\sim\Ber(F(t))\), so \(p=F(t)\).
- \(\hat p=\bar Y_n\), the sample mean of those indicators.
- clt: \((\hat p-p)/\sqrt{p(1-p)/n}\) is approximately \(\mathcal N(0,1)\).
- Replace the unknown \(p\) in the standard error by \(\hat p\) (Example 3.58). That substitution is what makes it the Wald interval.
- Answer: \(\hat p \pm z_{\alpha/2}\sqrt{\hat p(1-\hat p)/n}\), with \(z_{\alpha/2}\) left symbolic.
Pitfall. Saying "the parameter lies in this interval with probability \(1-\alpha\)". The interval is random, the parameter is a fixed unknown number (Rem 3.55). The correct sentence is about the procedure.
Taught on: the Wald interval · what a confidence interval is. Drill: the estimation drills.
TT11 · Decide a convergence claim, or place it on the ladder WiSe25 · P1d, P2b · 3+3 cr SoSe25 · P2b · 3 cr SoSe26 · P1d, P2a · 1+3 cr
Trigger. An arrow \(\xrightarrow{\P}\), \(\xrightarrow{\text{a.s.}}\) or \(\xrightarrow{d}\) in the statement, or the words "converges in probability / almost surely / in distribution". In all three papers.
- Name the mode claimed and write its definition (Def 2.56(i)(ii)(iii)).
- Recall the only implications that hold in general: \(\xrightarrow{\text{a.s.}}\Rightarrow\xrightarrow{\P}\Rightarrow\xrightarrow{d}\) (Rem 2.57). The converses fail — except that convergence in distribution to a constant does imply convergence in probability.
- If the claim is a law of large numbers or the clt, audit the assumption list: iid, or merely identically distributed? finite mean? finite non-zero variance?
- For counterexamples use the two machines: \(X_i:=X_1\) (kills independence) and \(X_n:=n\cdot\one_{\{U\le1/n\}}\) (kills convergence of expectations).
- Name the mode and the exact reason in the last sentence.
Pitfall. Believing that \(X_n\xrightarrow{d}X\) carries expectations along. \(X_n=n\cdot\one_{\{U\le1/n\}}\) converges to 0 but \(\E[X_n]=n\cdot\tfrac1n=1\) for every \(n\).
Taught on: modes of convergence · the laws of large numbers. Drill: the true/false bank and the state-it bank.
TT12 · Characteristic-function computation SoSe26 · P1c · 1 cr SoSe26 · P4a, P4b · 1+3 cr
Trigger. The symbol \(\varphi_X\). The characteristic function [charakteristische Funktion] is \(\varphi_X(t)=\E[e^{itX}]\) (Def 2.46), where \(i\) is the imaginary unit, \(i^2=-1\). 5 credits, one of the three papers.
- For a finite discrete \(X\), just sum \(\sum_x e^{itx}p_X(x)\) and apply Euler's formula \(e^{iu}=\cos u + i\sin u\) (supplied as a hint when needed).
- Affine scaling: \(\varphi_{aX+b}(t)=e^{itb}\varphi_X(at)\) (Rem 2.47(ii)).
- Independence turns sums into products: \(\varphi_{X+Y}=\varphi_X\cdot\varphi_Y\) (Rem 2.47(iv)); for an iid sum, \(\varphi_{S_n}(t)=\varphi_X(t)^n\).
- Combine both for a scaled sum: \(\varphi_{Z_n}(t)=\varphi_{X_1}(t/\sqrt n)^n=\cos^n(t/\sqrt n)\). The marking split this 1/1/1 for the \(t/\sqrt n\) scaling, for using independence, and for the final expression.
- Moments from derivatives at 0: \(\E[X^n]=i^{-n}\varphi_X^{(n)}(0)\) (Rem 2.47(iii)) — an alternative route to \(\E[Z_n]\) and \(\Var[Z_n]\) that scored full marks.
Pitfall. Over-simplifying under time pressure. SoSe26 P4a's note says that turning \(\tfrac12 e^{it}+\tfrac12 e^{-it}\) into \(\cos t\) was not required for the credit.
Taught on: characteristic functions · the complex-number primer. Drill: the estimation drills.
TT13 · Build a random variable out of indicators (the counting trick) SoSe25 · P5a, P5b · 4+4 cr WiSe25 · P5a · 3 cr
Trigger. "How many … survive / exceed / succeed?" An indicator [Indikatorfunktion] \(\one_A\) is the random variable that is 1 when \(A\) happens and 0 otherwise. 11 credits; SoSe25 P5a printed the hint telling you to do this, which shows the examiner expects the move to be learned.
- Define the event \(A_i\) per item ("duck \(i\) survives", "\(X_i\le t\)").
- Set \(X_i:=\one_{A_i}\) and \(X:=\sum_i X_i\), so \(X\) counts the items.
- \(\E[X_i]=\P(A_i)\) — the mean of a Bernoulli variable is its success probability. Then linearity gives \(\E[X]=\sum_i\P(A_i)\), with no independence needed. That matters, because in the duck hunt the indicators are genuinely dependent.
- For the variance, expand \(\E[X^2]=\sum_{i,k}\E[X_iX_k]\) and use \(\E[X_iX_k]=\P(A_i\cap A_k)\), splitting the diagonal \(i=k\) (where \(X_i^2=X_i\), because \(0^2=0\) and \(1^2=1\)) from the off-diagonal terms.
- Sanity-check at extreme parameter values (0 hunters: all ducks survive; 1 hunter: exactly \(m-1\) survive, variance 0).
Pitfall. Adding variances as if the indicators were independent. They are not, and \(\Var[\sum_i X_i]=\sum_i\Var[X_i]+2\sum_{i<k}\Cov[X_i,X_k]\) (Prop 2.12(vi)) keeps the cross terms.
Taught on: expectation and linearity · covariance. Drill: the story-problem bank.
TT14 · A story problem solved by total probability and Bayes WiSe25 · P6a, P6b · 4+2 cr SoSe26 · P5a · 3 cr
Trigger. A mechanism in two stages: a coin or a schedule decides something first, then the outcome of interest happens. 9 credits, two of the three papers.
- Name the events and the conditioning variable explicitly (\(W_i\) / \(L_i\) for match outcomes; \(T\) = "answers truthfully").
- Split the event of interest into disjoint pieces and price each by independence. For "two consecutive wins in three matches", \(W_1\cap W_2\) and \(L_1\cap W_2\cap W_3\) are disjoint and exhaust it.
- Law of total probability (Thm 1.70(ii)) for the unconditional probability: \(\P(A)=\sum_i\P(A\mid B_i)\P(B_i)\) over a partition \(\{B_i\}\).
- Bayes' rule (Thm 1.70(iii)) for the reverse conditional: \(\P(B_i\mid A)=\P(A\mid B_i)\P(B_i)\big/\sum_j\P(A\mid B_j)\P(B_j)\).
- Compare the branches algebraically and give the intuition in one sentence. WiSe25 P6a asks for the intuition explicitly, "without just restating the computational results", and it is part of the 4 credits.
Pitfall. Splitting into pieces that overlap. Then the probabilities may not simply be added; check disjointness before you sum.
Taught on: conditional probability and Bayes · independence. Drill: the story-problem bank.
TT15 · Inclusion–exclusion on overlapping events WiSe25 · P6c · 4 cr
Trigger. "At least two non-consecutive wins", "at least one of the following happens" where the "following" share ingredients. One of the three papers — the only appearance of Thm 1.22 anywhere.
- Enumerate the events whose union is the target. For four matches and non-consecutive index pairs, these are \((1,3), (1,4), (2,4)\).
- Price each single event by independence.
- Price each pairwise and the triple intersection by taking the union of the index sets: \(E_{13}\cap E_{14}=A_1\cap A_3\cap A_4\).
- Apply Thm 1.22 with alternating signs: \(+\)singles \(-\) pairs \(+\) triple.
- Simplify and sanity-check at extreme parameter values.
Pitfall. The derived events \(E_{13}\) and \(E_{14}\) are not independent even though the \(A_i\) are, because they share \(A_1\). Multiplying \(\P(E_{13})\P(E_{14})\P(E_{24})\) is the intended wrong turn, and it is precisely why inclusion–exclusion is needed.
Taught on: probability measures and inclusion–exclusion · independence. Drill: the story-problem bank.
Master sheet — the results to know
This is the pool to compress your handwritten sheet from, not the sheet itself: it is deliberately longer than one A4 page. Every item is here because some sub-part of the three papers was marked on it, or because one of the fifteen recipes above needs it to run. The numbering is the script's own. Each entry carries a one-line note saying where the exams used it.
§1.1–§1.2 · Probability spaces and discrete distributions
- Def 1.6 · \(\sigma\)-algebra
- \(\Aa\subseteq\pow(\Omega)\) with (i) \(\Omega\in\Aa\); (ii) \(A\in\Aa\Rightarrow A^c\in\Aa\); (iii) \((A_i)_{i\in\N}\subseteq\Aa\Rightarrow\bigcup_{i\in\N}A_i\in\Aa\). WiSe25 P1a (3 cr): the listed collection fails (ii). SoSe26 P2b (3 cr): a forward image fails (ii). Speed fact: on a finite \(\Omega\), a \(\sigma\)-algebra has \(2^k\) members, so a 5-element collection can never be one.
- Prop 1.7 · intersection
- An arbitrary intersection \(\bigcap_{\alpha\in I}\Aa_\alpha\) of \(\sigma\)-algebras on \(\Omega\) is again a \(\sigma\)-algebra. The object \(\mathcal S\) in WiSe25 P1c is exactly this.
- Lem 1.8 · generator
- \(\sigma(\mathcal E)=\bigcap\{\Aa : \Aa\ \text{a}\ \sigma\text{-algebra},\ \mathcal E\subseteq\Aa\}\) is the smallest \(\sigma\)-algebra containing \(\mathcal E\). WiSe25 P1c (3 cr): two measures agreeing on a generator need not agree on \(\sigma(\mathcal E)\) unless the generator is closed under intersection; \(\{1,2\}\cap\{2,3\}=\{2\}\) is exactly the set the counterexample measures disagree on.
- Cor 1.10 · closure
- \(A,B\in\Aa\Rightarrow A\cup B,\ A\cap B,\ A\setminus B,\ A\triangle B\in\Aa\); countable intersections too. WiSe25 P1c, to close \(\{\{1,2\},\{2,3\}\}\) up to the full power set.
- Def 1.17 · measure
- \(\mu:\Aa\to[0,\infty]\) with (i) \(\mu(\emptyset)=0\); (ii) \(\mu\ge0\); (iii) \(\sigma\)-additivity: \(\mu(\bigcup_i A_i)=\sum_i\mu(A_i)\) for countably many pairwise disjoint \(A_i\). Background to WiSe25 P1c: you must check the counterexamples really are measures.
- Prop 1.19 · properties
- (i) \(\mu(A\cup B)+\mu(A\cap B)=\mu(A)+\mu(B)\); (iii) monotone: \(A\subseteq B\Rightarrow\mu(A)\le\mu(B)\); plus continuity from below and above and \(\sigma\)-subadditivity. (iii) is used silently whenever \(\{X\ge10\}\subseteq\{X\ge5\}\) (WiSe25 P3b).
- Def 1.20 · probability measure
- A measure \(\P\) with \(\P(\Omega)=1\); then \((\Omega,\Aa,\P)\) is a probability space.
- Thm 1.22 · inclusion–exclusion
- \(\P\bigl(\bigcup_{i=1}^n A_i\bigr)=\sum_{k=1}^{n}(-1)^{k-1}\!\!\sum_{1\le i_1<\dots<i_k\le n}\!\! \P(A_{i_1}\cap\dots\cap A_{i_k})\). For \(n=3\): \(\P(A\cup B\cup C)=\P(A)+\P(B)+\P(C)-\P(A\cap B)-\P(A\cap C)-\P(B\cap C)+\P(A\cap B\cap C)\). WiSe25 P6c (4 cr) — the only appearance in three papers. Carry the \(n=3\) line verbatim; it is easy to misremember.
- Def 1.23 / 1.56 · cdf
- \(F_\P(x)=\P((-\infty,x])\); for a random variable \(F_X:=F_{\P_X}\), and \(p_X:=F_X'\) where \(F_X\) is (weakly) differentiable. SoSe25 P3b (2 cr), SoSe25 P1d (3 cr), WiSe25 P3a (4 cr), WiSe25 P5a.
- Lem 1.24 · cdf properties
- Increasing; right-continuous; \(F(x)-F(x^-)=\P(\{x\})\); \(F\to0\) at \(-\infty\), \(F\to1\) at \(+\infty\). The three boundary facts catch algebra errors when you write a cdf with all its branches.
- Def 1.34 / Lem 1.35 · pmf
- For countable \(\Omega\), \(p(\omega):=\P(\{\omega\})\); any \(p:\Omega\to[0,1]\) with \(\sum_\omega p(\omega)=1\) defines a discrete probability measure via \(\P(A)=\sum_{\omega\in A}p(\omega)\). WiSe25 P1c (3 cr) hands its counterexample as two pmfs; SoSe25 P1a (3 cr) uses a two-point space.
§1.3–§1.4 · Densities, random variables, independence
- Def 1.45 · pdf
- \(p:\R^n\to\R_{\ge0}\) with \(\int_{\R^n}p(x)\,\mathrm dx=1\). SoSe25 P3a (2 cr) is exactly "impose \(\int p=1\), solve for the constant, check \(p\ge0\)".
- Lem 1.49 · pdf ↔ cdf
- (i) \(F(x)=\int_{-\infty}^{x}p(y)\,\mathrm dy\); (ii) \(p=F'\) where \(F\) is differentiable. SoSe25 P3b (2 cr); the cdf route of WiSe25 P3a and SoSe25 P3d.
- Def 1.50 · random variable
- \(X:\Omega\to\Omega'\) is measurable if \(X^{-1}(A')\in\Aa\) for every \(A'\in\Aa'\). SoSe26 P2b (3 cr): pre-images of a \(\sigma\)-algebra always form one, forward images need not.
- Def 1.53 · induced law
- \(\P_X(A')=\P(X^{-1}(A'))=\P(\{X\in A'\})\); write \(X\sim\P_X\).
- Def 1.54 / 1.79 · identically distributed vs iid
- Identically distributed: all \(\P_{X_i}\) are equal. iid: independent and identically distributed. WiSe25 P1d (3 cr) turns entirely on the difference. Write the two definitions next to each other.
- Def 1.69 · conditional probability
- For \(\P(B)>0\), \(\P(A\mid B):=\P(A\cap B)/\P(B)\). SoSe25 P1a (3 cr): it is not symmetric. WiSe25 P3b (4 cr): with \(\{X\ge10\}\subseteq\{X\ge5\}\) the intersection is \(\{X\ge10\}\), so \(\P(X\ge10\mid X\ge5)=e^{-10\lambda}/e^{-5\lambda}=e^{-5\lambda}\).
- Thm 1.70(ii) · total probability
- For a measurable partition \(\{B_i\}\) of \(\Omega\) with \(\P(B_i)>0\): \(\P(A)=\sum_i\P(A\mid B_i)\P(B_i)\). WiSe25 P6b (2 cr); SoSe26 P5a (3 cr) gives \(q(p)=rp+\tfrac{1-r}{2}\).
- Thm 1.70(iii) · Bayes' rule
- \(\P(B_i\mid A)=\dfrac{\P(A\mid B_i)\P(B_i)}{\sum_j\P(A\mid B_j)\P(B_j)}\) for \(\P(A)>0\). WiSe25 P6b (2 cr): \(\P(\text{SWS}\mid\text{win})=(2-p)/(4-p-q)\).
- Def 1.74 · independent events
- \(A\perp\!\!\!\perp B\) iff \(\P(A\cap B)=\P(A)\P(B)\); a family is independent iff \(\P(\bigcap_{j\in J}A_j)=\prod_{j\in J}\P(A_j)\) for every finite \(J\). WiSe25 P6a, P6c (4+4 cr). The trap: derived events \(E_{ij}=A_i\cap A_j\) are not independent.
- Def 1.77 · independent random variables
- The joint cdf factorises, \(F_{(X_1,\dots,X_n)}(x)=\prod_i F_{X_i}(x_i)\); consequently joint densities factorise. SoSe25 P1d (3 cr): the joint density is \(\lambda e^{-\lambda x}\cdot\lambda e^{-\lambda y}\).
- Def 1.78 · conditional pmf / pdf
- Discrete \(p_{Y\mid X=x}(y)=\P(\{X=x\}\cap\{Y=y\})/\P(X=x)\); continuous \(p_{Y\mid X=x}(y)=p_{X,Y}(x,y)/p_X(x)\) where \(p_X(x)>0\). Background to SoSe26 P2c.
§2.1 · Expectation, variance, covariance — the heaviest topic on the papers
- Def 2.1 · expectation
- Discrete \(\E[X]=\sum_x x\,p_X(x)\) provided \(\sum_x|x|p_X(x)<\infty\); continuous \(\E[X]=\int_{-\infty}^{\infty}x\,p_X(x)\,\mathrm dx\) provided \(\int|x|p_X(x)\,\mathrm dx<\infty\). SoSe25 P3c (2 cr); the integrability proviso is what SoSe26 P2a exploits.
- Lem 2.2 · LOTUS
- \(\E[g(X)]=\sum_x g(x)p_X(x)\) or \(\int g(x)p_X(x)\,\mathrm dx\) — you never need the distribution of \(g(X)\) itself. WiSe25 P3c (3 cr) runs it backwards: from \(\E[X]=1/\lambda\) and \(X=-\tfrac1\lambda\ln U\) you read off \(\int_0^1\ln u\,\mathrm du=-1\) without integrating.
- Prop 2.4 · expectation rules
- (i) linearity \(\E[aX+bY]=a\E[X]+b\E[Y]\); (ii) \(\E[c]=c\); (iii) \(X\ge0\Rightarrow\E[X]\ge0\); (iv) monotone; (v) \(X\perp\!\!\!\perp Y\Rightarrow\E[XY]=\E[X]\E[Y]\). The most-used item on the papers. Linearity needs no independence — say so wherever the summands are dependent (SoSe25 P5a).
- Def 2.5 · variance
- \(\Var[X]=\E[(X-\E[X])^2]=\E[X^2]-\E[X]^2\); \(\sigma[X]=\sqrt{\Var[X]}\). SoSe25 P5b (4 cr) is computed exactly through \(\E[X^2]-\E[X]^2\).
- Prop 2.8 · variance rules
- (i) \(\Var\ge0\), \(=0\) iff \(X\) is almost surely constant; (iii) \(\Var[aX+b]=a^2\Var[X]\); (iv) \(X\perp\!\!\!\perp Y\Rightarrow\Var[X+Y]=\Var[X]+\Var[Y]\). (iii)+(iv) give every estimator variance on the papers: \(\Var[\tfrac{1}{2n}\sum X_i]=\theta^2/2n\), \(\Var[Z_n]=1\), \(\Var[\hat p]=q(1-q)/(r^2n)\).
- Def 2.9 / Prop 2.12 · covariance
- \(\Cov[X,Y]=\E[(X-\E[X])(Y-\E[Y])]\); (ii) \(\Cov[X,X]=\Var[X]\); (iii) bilinearity; (iv) \(\Cov[X,c]=0\); (v) independent \(\Rightarrow\Cov=0\), converse false in general; (vi) \(\Var[\sum_i a_iX_i]=\sum_i a_i^2\Var[X_i]+2\sum_{i<j}a_ia_j\Cov[X_i,X_j]\). SoSe26 P1a (1 cr): \(\Cov[X,1-X]=-\Var[X]\). SoSe26 P2d (3 cr): \(\Cov[X+Y,X-Y]=\Var[X]-\Var[Y]\). Exception worth a line: for a Bernoulli pair, zero covariance does give independence (SoSe26 P1b, 1 cr).
- Def 2.13 · correlation
- \(\rho[X,Y]=\Cov[X,Y]/(\sigma_X\sigma_Y)\in[-1,1]\); "uncorrelated" [unkorreliert] means \(\rho=0\), which for non-degenerate variables is the same as \(\Cov=0\). SoSe26 P1a (1 cr) is phrased with that word.
- Def 2.20 · quantile and median
- \(x_q\) with \(\P(X\le x_q)\ge q\) and \(\P(X\ge x_q)\ge1-q\); if \(F_X\) is continuous and strictly increasing, \(x_q=F_X^{-1}(q)\). The median is \(q=\tfrac12\). SoSe25 P3c; also the meaning of \(z_{0.05}\) in both test problems.
- Def 2.28 / 2.30 · conditional expectation
- \(\E[Y\mid X=x]\) is the expectation of \(Y\) under the conditional law of \(Y\) given \(X=x\); \(\E[Y\mid X]\) is the random variable \(h(X)\) with \(h(x)=\E[Y\mid X=x]\). SoSe26 P2c (3 cr); WiSe25 P1b (3 cr).
- Thm 2.32 · tower property
- \(\E[Y]=\E\bigl[\E[Y\mid X]\bigr]\). The engine behind the ladder independent \(\Rightarrow\E[X\mid Y]=\E[X]\Rightarrow\) uncorrelated.
- Thm 2.35 · law of total variance
- \(\Var[Y]=\E\bigl[\Var[Y\mid X]\bigr]+\Var\bigl[\E[Y\mid X]\bigr]\). WiSe25 P1b (3 cr): the second summand is a variance, hence \(\ge0\) by Prop 2.8(i), so \(\Var[Y]\ge\E[\Var[Y\mid X]]\) is true. Two lines for three credits — keep it verbatim.
§2.2–§2.3 · Inequalities, characteristic functions, transformations
- Thm 2.38 · Markov
- General form: \(f:S_X\to\R_{\ge0}\) monotonically increasing and \(f(\varepsilon)>0\) give \(\P(X\ge\varepsilon)\le\E[f(X)]/f(\varepsilon)\). The used special case: for \(X\ge0\) and \(\varepsilon>0\), \(\P(X\ge\varepsilon)\le\E[X]/\varepsilon\). SoSe26 P4d: \(|Z_n|\ge a\iff Z_n^2\ge a^2\), so \(\P(|Z_n|\ge a)\le\E[Z_n^2]/a^2=1/a^2\). Write the special case and the squaring trick side by side.
- Thm 2.40 · Chebyshev
- For \(X\) with finite mean and finite \(\Var[X]>0\) and any \(\varepsilon>0\): \(\P(|X-\E[X]|\ge\varepsilon)\le\Var[X]/\varepsilon^2\). WiSe25 P4b (3 cr): \(\le\theta^2/(2n\varepsilon^2)\). SoSe25 P5c (4 cr), solved backwards for \(k\). It is the case \(f(x)=x^2\) of Markov applied to \(X-\E[X]\).
- Thm 2.42 · Jensen
- \(X\) real with finite \(\E[X]\), \(g:\R\to\R\) convex (that is, \(g(tx_1+(1-t)x_2)\le t\,g(x_1)+(1-t)g(x_2)\) for all \(x_1,x_2\in\R\), \(t\in[0,1]\)). Then \(\E[g(X)]\ge g(\E[X])\). Concave \(g\) reverses it. SoSe26 P3a (3 cr): marked one credit per assumption — finite \(\E[X]\), \(g\) convex, correct direction. P3b (2 cr): \(g(x)=e^x\) gives \(e^{\E[X]}\le\E[e^X]\), then take \(\log\); the separately marked extras were "\(\log\) is increasing on \((0,\infty)\)" and "\(\E[e^X]>0\)".
- Def 2.46 · characteristic function
- \(\varphi_X(t)=\E[e^{itX}]=\E[\cos(tX)]+i\,\E[\sin(tX)]\); it always exists. SoSe26 P4a (1 cr): \(\tfrac12e^{it}+\tfrac12e^{-it}=\cos t\) by Euler.
- Rem 2.47 · cf rules
- (i) \(\varphi_X(0)=1\), \(|\varphi_X(t)|\le1\); (ii) \(\varphi_{aX+b}(t)=e^{itb}\varphi_X(at)\); (iii) \(\E[X^n]=i^{-n}\varphi_X^{(n)}(0)\); (iv) \(X\perp\!\!\!\perp Y\Rightarrow \varphi_{X+Y}=\varphi_X\varphi_Y\); (v) the cf determines the law; (vi) Lévy: \(X_n\xrightarrow{d}X\) iff \(\varphi_{X_n}\to\varphi_X\) pointwise with \(\varphi_X\) continuous at 0. SoSe26 P1c (1 cr) is (ii)+(iv); P4b (3 cr) gives \(\varphi_{Z_n}(t)=\cos^n(t/\sqrt n)\), marked 1/1/1.
- Prop 2.51 · change of variables
- \(g\) continuously differentiable and strictly monotonic on \(S_X=\{x:p_X(x)>0\}\), \(Y=g(X)\): \(p_Y(y)=p_X(g^{-1}(y))\cdot\bigl|\tfrac{\mathrm d}{\mathrm dy}g^{-1}(y)\bigr|\) on \(g(S_X)\), and 0 otherwise. WiSe25 P3a (4 cr) and SoSe25 P3d (3 cr, supplied as a hint). The cdf route scores the same.
§2.4 · Convergence and the limit theorems
- Def 2.56(i) · in probability
- \(X_n\xrightarrow{\P}X\) if for every \(\varepsilon>0\), \(\lim_{n\to\infty}\P(|X_n-X|\ge\varepsilon)=0\).
- Def 2.56(ii) · almost surely
- \(X_n\xrightarrow{\text{a.s.}}X\) if \(\P(\{\omega\in\Omega:\lim_{n\to\infty}X_n(\omega)=X(\omega)\})=1\). WiSe25 P2b (3 cr) asks for this verbatim. The probability-one clause carries the marks.
- Def 2.56(iii) · in distribution
- \(X_n\xrightarrow{d}X\) if \(\lim_{n\to\infty}F_{X_n}(x)=F_X(x)\) for every \(x\in\R\) at which \(F_X\) is continuous. Equivalently \(\varphi_{X_n}(t)\to\varphi_X(t)\) for all \(t\). SoSe25 P2b (3 cr) asks for this verbatim; the cf version was also accepted. The continuity-point clause is the marked part.
- Rem 2.57 · the ladder
- \(X_n\xrightarrow{\text{a.s.}}X\ \Rightarrow\ X_n\xrightarrow{\P}X\ \Rightarrow\ X_n\xrightarrow{d}X\). The converses fail in general; but if \(X_n\xrightarrow{\P}X\) some subsequence converges almost surely, and if \(X_n\xrightarrow{d}c\) for a constant \(c\in\R\) then also \(X_n\xrightarrow{\P}c\). SoSe26 P1d (1 cr) is the first arrow; the constant-limit reversal is the one that holds.
- Thm 2.61 · weak law
- \(X_1,X_2,\dots\) identically distributed, finite mean \(\mu\), pairwise uncorrelated; \(\bar X_n=\tfrac1n\sum_{i=1}^n X_i\). Then \(\bar X_n\xrightarrow{\P}\mu\). Never stated on an exam, but WiSe25 P1d (3 cr) is exactly the observation that the printed statement drops the uncorrelatedness assumption. Carry the assumption list, not the proof.
- Thm 2.62 · strong law
- \(X_1,X_2,\dots\) iid with finite mean \(\E[X_i]=\mu<\infty\); then \(\bar X_n\xrightarrow{\text{a.s.}}\mu\). WiSe25 P2a (3 cr), asked verbatim.
- Thm 2.64 · central limit theorem
- \(X_1,X_2,\dots\) iid, finite mean \(\mu\), finite and non-zero variance \(\sigma^2\in\R_{>0}\). With \(S_n=\sum_{i=1}^n X_i\), \(Z_n=\dfrac{S_n-n\mu}{\sigma\sqrt n}=\dfrac{\bar X_n-\mu}{\sigma/\sqrt n}\), we have \(Z_n\xrightarrow{d}\mathcal N(0,1)\). The quantity \(\sigma/\sqrt n\) is the standard error [Standardfehler]. SoSe25 P2a (3 cr) asked verbatim; used in WiSe25 P4c, SoSe25 P4c/P4d, SoSe26 P4d/P5d.
- clt consequences to carry
- \(\hat\theta\approx\mathcal N(\theta,\Var[\hat\theta])\) for an unbiased estimator that is a scaled iid sum; two-sided tail \(\P(|\hat\theta-\theta|\ge\varepsilon)\approx2\Phi\bigl(-\varepsilon/\sqrt{\Var[\hat\theta]}\bigr) =2\bigl(1-\Phi(\varepsilon/\sqrt{\Var[\hat\theta]})\bigr)\). WiSe25 P4c: \(2\Phi(-\sqrt{2n}\varepsilon/\theta)\). SoSe26 P4d: \(2\Phi(-a)\).
Chapter 3 · Statistical inference
- Def 3.4 · statistical model
- \((\Omega,\Aa,\mathcal P_\Theta)\) with \(\mathcal P_\Theta=(\P_\theta)_{\theta\in\Theta}\) a family of laws indexed by a parameter space \(\Theta\); parametric if \(\Theta\subseteq\R^k\). The framing of every mle problem, and of SoSe26 P5.
- Def 3.6 · statistic
- A measurable \(T:\Omega^n\to\R^k\) that does not depend on the unknown \(\theta\). This is why a test statistic is standardised at the known null boundary \(q_0\), not at \(\theta\).
- Def 3.11 · identifiability
- \(\gamma(\theta)\) is identifiable [identifizierbar] if \(\P_{\theta_1}=\P_{\theta_2}\Rightarrow \gamma(\theta_1)=\gamma(\theta_2)\). SoSe26 P5a: since \(r>0\), the map \(p\mapsto q(p)=rp+\tfrac{1-r}{2}\) is injective on \([0,1]\), so yes. The method: show the map from parameter to distribution is injective.
- Def 3.13 · likelihood
- \(L(\theta\mid x):=p_\theta(x)\); for iid data \(L(\theta\mid x)=\prod_{i=1}^n p(x_i\mid\theta)\), and \(\ell(\theta\mid x):=\ln L(\theta\mid x)\). It is a function of \(\theta\), not of \(x\). Step 1 of all three mle derivations.
- Def 3.20 · estimator properties
- (i) \(\mathrm{bias}[\hat\theta]=\E[\hat\theta]-\theta\); unbiased iff \(\E[\hat\theta]=\theta\) for all \(\theta\in\Theta\); (ii) consistent if \(\hat\theta_n\xrightarrow{\P}\theta\); (iii) \(\Var[\hat\theta]\); (iv) \(\mathrm{mse}[\hat\theta]=\E[(\hat\theta-\theta)^2] =\Var[\hat\theta]+\bigl(\mathrm{bias}[\hat\theta]\bigr)^2\). The single most profitable line on the sheet: if the bias is 0 then mse = var.
- Def 3.27 · mle
- \(\hat\theta_{\mathrm{mle}}(x)\in\arg\max_{\theta\in\Theta}L(\theta\mid x) =\arg\max_{\theta\in\Theta}\ell(\theta\mid x)\); for a differentiable \(\ell\) with an interior maximum, solve \(\nabla_\theta\ell=0\). All three papers. Verify the maximum, and check that it lies inside \(\Theta\).
- mle by reparametrisation
- If \(q=q(\theta)\) is invertible and \(\hat q\) is the mle of \(q\), then \(\hat\theta=q^{-1}(\hat q)\). SoSe26 P5b. The script states no invariance theorem, so present it as "solve \(\bar y_n=q(p)\) for \(p\)", which is what the official solution does.
- Rem 3.30 · no finite-sample optimality
- Consistency, asymptotic normality and asymptotic efficiency of the mle are asymptotic statements; for finite \(n\) there is no guarantee that the mle minimises the mse. SoSe26 P1e (1 cr).
- Ex 3.21 · the sample mean
- For iid data with mean \(\mu\) and variance \(\sigma^2\): \(\E[\bar X_n]=\mu\) (unbiased), \(\Var[\bar X_n]=\sigma^2/n\), \(\bar X_n\xrightarrow{\text{a.s.}}\mu\), \(\bar X_n\approx\mathcal N(\mu,\sigma^2/n)\). SoSe25 P4b (2 cr) is one sentence: "mles are not unbiased in general, but this one is a sample mean".
- Def 3.34 · test vocabulary
- \(\Theta=\Theta_0\uplus\Theta_1\); a test is a measurable \(\varphi:\Omega^n\to[0,1]\) with \(\varphi=1\) meaning "reject \(H_0\)"; type I error = rejecting a true \(H_0\); type II = failing to reject a false one; the level [Signifikanzniveau] is \(\alpha\) with \(\sup_{\theta\in\Theta_0}\E_\theta[\varphi]\le\alpha\); the power function is \(G_\varphi(\theta)=\E_\theta[\varphi]\). SoSe25 P1c (3 cr): \(\alpha\) is a property of the procedure, not of the hypothesis.
- Def 3.43 · one- vs two-sided
- Directional \(H_1:\theta>\theta_0\) (or \(<\)) puts the whole rejection region in one tail; \(H_1:\theta\ne\theta_0\) splits it. Both exam tests were one-sided, and both solutions say so.
- Ex 3.46(i)(ii) · z-tests
- One-sided \(H_0:\mu\le\mu_0\) vs \(H_1:\mu>\mu_0\): \(Z=(\bar X_n-\mu_0)/(\sigma/\sqrt n)\), reject if \(z_{\mathrm{obs}}>z_\alpha\). Two-sided: reject if \(|z_{\mathrm{obs}}|>z_{\alpha/2}\). Here \(z_\alpha\) is the upper \(\alpha\)-quantile, \(\P(Z>z_\alpha)=\alpha\). SoSe25 P4d: \(z_{\mathrm{obs}}=(5-4)/0.2=5>1.64\), reject. SoSe26 P5d: \(z_{\mathrm{obs}}=0.09/\sqrt{0.002475}=1.809>1.64\), reject.
- Def 3.54 · confidence interval
- Random endpoints \(L(X)\le U(X)\) with \(\P_\theta\bigl(L(X)\le\gamma(\theta)\le U(X)\bigr)\ge1-\alpha\) for all \(\theta\). The interval is random, the parameter is a fixed unknown constant. WiSe25 P5d (2 cr); Rem 3.55's interpretation warning is the same error as SoSe25 P1c.
- Ex 3.58 · Wald interval
- \(\hat p\pm z_{\alpha/2}\sqrt{\hat p(1-\hat p)/n}\) for iid \(\Ber(p)\) data with \(\hat p=\bar X_n\). WiSe25 P5d verbatim, with \(\hat p=\hat F_n(t)\).
The distribution table
Means and variances come from Lemmas 2.26 and 2.27. The last column gives the characteristic function only where the script itself prints one; the exams have never asked for any of the others, and the empty cells are not worth ink on your sheet.
| Distribution | pmf / pdf | \(\E[X]\) | \(\Var[X]\) | \(\varphi_X(t)\) (only if the script gives it) | where on the exams |
|---|---|---|---|---|---|
| \(\Ber(p)\) | \(\P(X=1)=p\), \(\P(X=0)=1-p\) | \(p\) | \(p(1-p)\) | not in the script | WiSe25 P5a; SoSe26 P1a, P1b, P5a–d |
| \(\Bin(n,p)\) | \(\binom nk p^k(1-p)^{n-k}\) | \(np\) | \(np(1-p)\) | not in the script | WiSe25 P5a–c (not hinted) |
| \(\Poi(\lambda)\) | \(e^{-\lambda}\lambda^x/x!\), \(x\in\N_0\) | \(\lambda\) | \(\lambda\) | not in the script | WiSe25 P1d; SoSe25 P4a–d (pmf hinted) |
| \(\Lap[m]\) (uniform on a finite set) | \(p(\omega)=1/|\Omega|\) | \(\tfrac{1}{|\Omega|}\sum_\omega\omega\) | \(\tfrac{1}{|\Omega|}\sum_\omega(\omega-\E[X])^2\) | not in the script | SoSe25 P1a, P5a |
| \(\Unif(a,b)\) | \(1/(b-a)\) on \([a,b]\) | \((a+b)/2\) | \((b-a)^2/12\) | not in the script | WiSe25 P3a, P3c; SoSe26 P2a, P2c |
| \(\Exp(\lambda)\) | \(\lambda e^{-\lambda x}\), \(x\ge0\); \(F(x)=1-e^{-\lambda x}\); survival \(\P(X\ge x)=e^{-\lambda x}\) | \(1/\lambda\) | \(1/\lambda^2\) | \((1-it/\lambda)^{-1}\) (Ex 2.50(ii), as \(\Gamma(1,\lambda)\)) | WiSe25 P3a, P3b; SoSe25 P1d (pdf hinted) |
| \(\Gamma(\alpha,\beta)\) | \(\dfrac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}\), \(x>0\) | \(\alpha/\beta\) | \(\alpha/\beta^2\) | \((1-it/\beta)^{-\alpha}\) (Ex 2.50(ii)) | WiSe25 P4: the rainfall density \(\theta^{-2}xe^{-x/\theta}\) is \(\Gamma(2,1/\theta)\), so \(\E=2\theta\), \(\Var=2\theta^2\) |
| \(\mathcal N(\mu,\sigma^2)\) | \(\dfrac{1}{\sqrt{2\pi}\sigma}e^{-(x-\mu)^2/(2\sigma^2)}\); \(\Phi\) = cdf of \(\mathcal N(0,1)\) | \(\mu\) | \(\sigma^2\) | \(\exp\bigl(i\mu t-\tfrac12\sigma^2t^2\bigr)\) (Ex 2.48) | WiSe25 P4c; SoSe25 P2a, P4c, P4d; SoSe26 P4d, P5d |
| Rademacher: \(\P(X=\pm1)=\tfrac12\) | two atoms at \(\pm1\) | \(0\) | \(1\) | \(\cos t\) — derived on the exam itself, not in the script | SoSe26 P4a, P4b |
The convergence ladder
Three modes, one chain of implications, one reversal that holds. Everything else in this corner of the course is a counterexample to a reversal that does not.
| Mode | Definition (Def 2.56) | Implies | Does it come back? |
|---|---|---|---|
| almost surely \(\xrightarrow{\text{a.s.}}\) | \(\P(\{\omega:\lim_n X_n(\omega)=X(\omega)\})=1\) | \(\Rightarrow\) in probability | no; only a subsequence of a sequence converging in probability converges a.s. |
| in probability \(\xrightarrow{\P}\) | \(\forall\varepsilon>0:\ \P(|X_n-X|\ge\varepsilon)\to0\) | \(\Rightarrow\) in distribution | yes, when the limit is a constant: \(X_n\xrightarrow{d}c\Rightarrow X_n\xrightarrow{\P}c\) (Rem 2.57) |
| in distribution \(\xrightarrow{d}\) | \(F_{X_n}(x)\to F_X(x)\) at every continuity point \(x\) of \(F_X\) | nothing further | — and it does not carry expectations: \(X_n=n\one_{\{U\le1/n\}}\xrightarrow{d}0\) with \(\E[X_n]=1\) (SoSe26 P2a) |
Cross-chapter items the exams marked repeatedly
- indicators are Bernoulli
- \(\one_A\sim\Ber(\P(A))\), so \(\E[\one_A]=\P(A)\) and \(\Var[\one_A]=\P(A)(1-\P(A))\). A sum of indicators is a count; a sum of independent indicators with the same \(p\) is \(\Bin(n,p)\). WiSe25 P5a–c; SoSe25 P5a, P5b — 15 credits in total.
- the empirical cdf
- \(\hat F_n(t)=\tfrac1n\sum_i\one_{(-\infty,t]}(X_i)\), so \(n\hat F_n(t)\sim\Bin(n,F(t))\); hence \(\hat F_n(t)\) is unbiased for \(F(t)\) and \(\mathrm{mse}[\hat F_n(t)]=F(t)(1-F(t))/n\). WiSe25 P5a–d, 9 cr.
- exponential survival
- \(X\sim\Exp(\lambda)\Rightarrow\P(X\ge x)=e^{-\lambda x}\) and \(\P(X\ge s+t\mid X\ge s)=\P(X\ge t)\). WiSe25 P3b, 4 cr. The word "memoryless" does not occur anywhere in the script, so derive this from Def 1.69 in two lines rather than citing it as a named result — see the memorylessness section.
- the \(\sqrt n\) scaling
- \(Z_n=n^{-1/2}\sum_j X_j\) with iid mean-0, variance-1 summands has \(\E[Z_n]=0\) and \(\Var[Z_n]=1\) for every \(n\) — the factor is chosen so the variance stays 1, which is the clt's normalisation. SoSe26 P4b, P4c, P4d.
- algebra that earned or lost credits
- \((\ln t)'=1/t\); \((1/\theta)'=-1/\theta^2\); \(\ln\prod_i a_i=\sum_i\ln a_i\); \(e^{iu}=\cos u+i\sin u\); \(p(1-p)\le\tfrac14\); \(\Phi(-a)=1-\Phi(a)\).
What this master sheet leaves out, and why
Being honest about the gaps matters more than being complete. The following are in the script but were dropped from the list above, because no sub-part of the three papers was marked on them and no recipe needs them. They are not "unexaminable" — they are unexamined in a sample of three.
- Chapter 0 in full (history, the card box, Russian roulette, sleeping beauty). The script itself brackets it as a philosophical interlude; zero credits in three papers.
- Appendix A.1 (set theory), Definition 1.2, Lemma 1.3 (de Morgan). Background you use silently; you will not look it up under time pressure.
- Caveat 1.26, Theorems 1.27 / 1.28 (Vitali sets) — motivation for why \(\sigma\)-algebras exist.
- Lemma 1.36 (urn models) and the counting formulas \(n^k\), \(n!/(n-k)!\), \(\binom nk\). Not one of the three papers asked a counting question. A borderline call: \(\binom nk\) alone is cheap insurance, because \(\Bin\) does appear.
- Theorem 1.42 (Poisson limit theorem); Prop 1.47 / Thm 1.48 (Radon–Nikodym); Def 1.60 (Gamma and Beta functions); Def 1.82 (conditional independence).
- Def 2.16 (partial correlation); Prop 2.14 (correlation properties — only \(\rho=0\iff\Cov=0\) is ever used, and that is already in Def 2.13); Prop 2.23 (quantile transformation).
- Lem 2.26(ii)(v)(vi) and Lem 2.27(v)(vi)(vii) — hypergeometric, geometric, negative binomial, Beta, \(\chi^2\), Student-\(t\). None of these distributions appears anywhere in the three papers.
- Rem 2.49 (moment generating functions); Lem 2.53 (multivariate Gaussian rules); Ex 2.50(i) (sums of independent Poissons). The technique of Rem 2.47(iv) is kept, because SoSe26 P4b needs it.
- Def 3.38, Def 3.39, Thm 3.40 (uniformly most powerful and unbiased tests, Neyman–Pearson); Def 3.48, Caveat 3.50 (p-values). No exam computed or interpreted a p-value.
- Ex 3.45, Ex 3.46(iii)(iv), Ex 3.57 (\(t\)-tests and \(t\)-intervals). No \(t\) quantile has ever been supplied on any of the three papers, and in both test problems the null variance was known or derivable, so \(z\) was the right statistic. Costly to carry, no evidence of use.
- §3.5 in full — Bayesian models, posteriors, Bayesian point estimators, credible intervals. Zero credits across three papers. WiSe25 P6b looks Bayesian but is Theorem 1.70(iii), the ordinary Bayes rule, which is kept above.
- Rem 3.59 (duality between confidence intervals and tests). Never asked; one line if you have room, because it explains why WiSe25 P5d and SoSe26 P5d are the same machine.
Four items are kept above despite zero direct appearances, because a recipe needs them: Theorem 2.61 (its assumption list is WiSe25 P1d), Definition 3.6 (why a test statistic may not contain the unknown parameter), Remark 2.47(v)(vi) (what justifies the cf route), and \(z_{0.025}\approx1.96\) (the two-sided companion of the only quantile the exams have ever supplied).
Values, hints and what to put on your A4 sheet
All three cover pages allow exactly two things: one single sheet of A4 paper with handwritten notes on both sides, and one analogue dictionary English ↔ your native language without notes. No formula sheet is handed out, no calculator, no statistical tables. So the question "what goes on the sheet" has a precise answer: everything the examiner has never handed over, and nothing he always does.
What the papers actually supplied
| Value | Where | Status across the three papers |
|---|---|---|
| \(z_{0.05}\approx1.64\), the 0.95-quantile of \(\mathcal N(0,1)\) | SoSe25 P4d, SoSe26 P5d | Supplied both times. The only numeric quantile ever to appear on any of the three papers. The exact value is 1.6449. |
| values of \(\Phi\) | WiSe25 P4c, SoSe26 P4d | Never supplied, and never needed. Both official answers are left symbolic: \(2\Phi(-\sqrt{2n}\,\varepsilon/\theta)\) and \(2(1-\Phi(a))=2\Phi(-a)\). |
| \(z_{\alpha/2}\) | WiSe25 P5d | Left symbolic in the answer. |
| \(t\) quantiles \(t_{n-1,\alpha/2}\) | — | Never. No paper ever had an unknown variance in a test or an interval. |
| \(\chi^2\) quantiles | — | Never. |
| \(z_{0.025}\approx1.96\) | script Example 3.44 only | Never needed by an exam, but it is the two-sided companion of 1.64 and belongs on the sheet. |
Practical consequence. The only two numeric answers any of the three papers ever asked for were \(z_{\mathrm{obs}}=(5-4)/0.2=5\) (SoSe25 P4d) and \(z_{\mathrm{obs}}=0.09/\sqrt{0.002475}\approx1.809\) (SoSe26 P5d). Everything else is a closed formula. No calculator is allowed and none is needed — but you do have to be able to produce \(\sqrt{0.55\cdot0.45/100}=\sqrt{0.002475}\approx0.0497\) by hand to about two digits.
Every hint printed on the three papers
Reading these together tells you what the examiner considers free and what he considers examinable.
- WiSe25 · P3b
- "If you could not solve (a), you may assume for this part that the cdf of \(X\) is \(F_X(x)=1-e^{-\lambda x}\) for \(x>0\) and 0 otherwise."
- WiSe25 · P4b, P4c
- "You may use that \(\E[X_i]=2\theta\) and \(\Var[X_i]=2\theta^2\) for all \(i\in\{1,\dots,n\}\)."
- WiSe25 · P4d
- "This subproblem can also be solved without solving b) and c)."
- SoSe25 · P1d
- "The pdf of the exponential distribution is \(p_{\Exp(\lambda)}(x)=\lambda e^{-\lambda x}\) for \(x\ge0\) (and 0 otherwise). Note that \(F_{X/Y}(t)=\P(X<t\,Y)\)."
- SoSe25 · P3d
- "You may use the change of variables formula for densities: \(p_Y(y)=p_X(g^{-1}(y))\cdot\bigl|\tfrac{\mathrm d}{\mathrm dy}g^{-1}(y)\bigr|\)."
- SoSe25 · P4a
- "The pmf of a \(\Poi(\lambda)\) distributed random variable is \(p(x)=e^{-\lambda}\lambda^x/x!\), which has mean and variance \(\lambda\)" — plus a reminder that the derivative of \(\ln(t)\) is \(1/t\) for \(t>0\).
- SoSe25 · P4d
- "You may use that the 0.95-quantile of a standard normal distribution is \(z_{0.05}\approx1.64\)."
- SoSe25 · P5a
- "Enumerate the ducks and define the event \(A_i\) := 'the \(i\)-th duck survives.' Then construct the random variable \(X\) using \(\one_{A_i}\)."
- SoSe25 · P5c
- "Rewrite this condition so you can use the Chebyshev inequality."
- SoSe26 · P4a
- "Euler's formula states \(e^{iu}=\cos(u)+i\cdot\sin(u)\)."
- SoSe26 · P4d
- "If you could not solve (c), you may use \(\E[Z_n^2]=1\) here."
- SoSe26 · P5b
- A reminder that "the maximum likelihood estimator in a Bernoulli model is the sample mean".
- SoSe26 · P5d
- "For this subproblem, you may use \(q(p)=rp+(1-r)/2\) and \(z_{0.05}\approx1.64\)."
A suggested layout for the one handwritten A4 sheet
This is a proposal, not a rule, and you should write it out yourself — the writing is most of the revision. Two sides, five blocks each. Keep the statements verbatim where the exam asks you to state them (the limit theorems, the modes of convergence, Jensen) and compressed where it only asks you to use them.
Side 1 — probability My addition
- block 1 · axioms
- The three \(\sigma\)-algebra axioms verbatim (Def 1.6); "\(2^k\) members on a finite \(\Omega\)"; measure axioms (Def 1.17); \(\P(A\cup B)=\P(A)+\P(B)-\P(A\cap B)\); the \(n=3\) inclusion–exclusion line (Thm 1.22).
- block 2 · conditioning
- \(\P(A\mid B)=\P(A\cap B)/\P(B)\); total probability; Bayes; independence of events and of random variables; "identically distributed \(\ne\) iid" in capital letters.
- block 3 · the distribution table
- The eight rows of the table above: pmf/pdf, mean, variance. Add the exponential survival function \(\P(X\ge x)=e^{-\lambda x}\) on its own line.
- block 4 · expectation and variance
- Linearity (no independence needed); \(\Var[aX+b]=a^2\Var[X]\); \(\Var[X]=\E[X^2]-\E[X]^2\); variance of a sum with the covariance cross terms; \(\Cov\) bilinearity; "independent \(\Rightarrow\) uncorrelated, converse false except for Bernoulli pairs"; the tower property and the law of total variance.
- block 5 · densities
- \(\int p=1\) and \(p\ge0\); \(F=\int p\), \(p=F'\); the change-of-variables formula with the absolute value; "specify the support"; \(F(m)=\tfrac12\) for the median.
Side 2 — limits and statistics My addition
- block 6 · inequalities
- Markov for \(X\ge0\) and the squaring trick; Chebyshev; Jensen with both assumptions and the direction. Three lines, 15 credits of evidence behind them.
- block 7 · the ladder
- The three modes verbatim with their exceptional-set clauses; the arrow chain; the constant-limit reversal; the two counterexample machines \(X_i:=X_1\) and \(X_n:=n\one_{\{U\le1/n\}}\).
- block 8 · limit theorems
- wlln, slln and clt with complete assumption lists, in the standardised form. Add \(\hat\theta\approx\mathcal N(\theta,\Var[\hat\theta])\) and \(\P(|\hat\theta-\theta|\ge\varepsilon)\approx2\Phi(-\varepsilon/\mathrm{sd})\).
- block 9 · estimation
- Likelihood and log-likelihood; the five mle steps including the global-maximum check; bias, variance, mse and \(\mathrm{mse}=\Var+\mathrm{bias}^2\); "bias 0 \(\Rightarrow\) mse = var"; "the mle has no finite-sample optimality".
- block 10 · testing and intervals
- What \(\alpha\) is a statement about; one-sided and two-sided rejection rules; the five steps of a z-test with the null-boundary warning; the Wald interval; \(z_{0.05}\approx1.64\), \(z_{0.025}\approx1.96\), \(\Phi(-a)=1-\Phi(a)\).
One thing I would leave off: a proof of anything. In three papers no sub-part ever asked for a proof of a named theorem — the closest is SoSe26 P3b, which applies Jensen in two lines. Space on the sheet is better spent on assumption lists than on arguments.
Traps
Two different kinds of hazard live on these papers. The first kind is deliberate: a statement built so that the fast answer is the wrong one. The second kind is accidental: places where the official solution itself is incomplete or mistyped, so that copying it would cost you.
The conceptual traps the papers deliberately set
| Where | The tempting wrong answer | The right one, and why |
|---|---|---|
| WiSe25 P1a · 3 cr | "\(\{\emptyset,\{\circ\},\{\star\},\{\circ,\star\},\Omega\}\) is a \(\sigma\)-algebra — it has \(\emptyset\) and \(\Omega\) and is closed under the unions I can see." | False. Axiom (ii) fails: \(\{\circ\}^c=\{\triangle,\star\}\) is missing. A speed check: a \(\sigma\)-algebra on a finite \(\Omega\) has \(2^k\) elements, and this one has 5. |
| WiSe25 P1d · 3 cr | "\(X_1,X_2,\dots\sim\Poi(2)\), so \(\bar X_n\xrightarrow{\P}2\) by the law of large numbers." | False. The statement says identically distributed and nothing about independence. Take \(X_i:=X_1\); then \(\bar X_n=X_1\) for every \(n\) and \(\P(|X_1-2|\ge\varepsilon)>0\) never shrinks. This is the single most examined reflex error on these papers. |
| SoSe26 P2a · 3 cr | "\(X_n\xrightarrow{d}X\) and all means are finite, so \(\E[X_n]\to\E[X]\)." | False. \(X_n=n\cdot\one_{\{U\le1/n\}}\) with \(U\sim\Unif(0,1)\): the probability of being non-zero is \(1/n\to0\), so \(X_n\xrightarrow{d}0\), yet \(\E[X_n]=n\cdot\tfrac1n=1\) for every \(n\). Convergence in distribution says nothing about expectations. |
| SoSe26 P1a + P1b · 1+1 cr | Answering "false" to both, because "zero covariance does not imply independence". | P1a is false (\(\Cov[X,1-X]=-\Var[X]=-\tfrac14\), so \(X\) and \(1-X\) are correlated), but P1b is true: for a Bernoulli pair, zero covariance really does give independence. The two items sit next to each other on purpose. |
| SoSe26 P2c · 3 cr | "\(\E[X\mid Y]=\E[X]\), so \(X\) and \(Y\) are independent." | False. The ladder is independent \(\Rightarrow\E[X\mid Y]=\E[X]\Rightarrow\) uncorrelated, and no arrow reverses. Witness: \(X\) uniform on \(\{-1,0,1\}\), \(Y=X^2\). |
| SoSe25 P1c · 3 cr | "The test rejected at \(\alpha=0.05\), so the batch conforms with probability at most 5 %." | False. \(\alpha\) bounds \(\P_\theta(\text{reject})\) for \(\theta\) in \(H_0\) — a property of the procedure. \(\P(H_0\text{ true}\mid\text{data})\) is not even defined in the frequentist model. The same error is reading "95 % probability that \(\mu\) lies in this interval" into a confidence interval (Rem 3.55). |
| SoSe26 P1e · 1 cr | "The mle is optimal, so \(\mathrm{mse}[\hat\theta_n^{\mathrm{mle}}]\le\mathrm{mse}[\hat\theta_n]\) for every \(n\)." | False. The mle's good properties are asymptotic (Rem 3.30). At a fixed finite \(n\) a shrunken estimator can beat it. |
| WiSe25 P1c · 3 cr | "Two measures agreeing on a generator \(L\) agree on \(\sigma(L)\)." | False unless the generator is closed under intersection. With \(L=\{\{1,2\},\{2,3\}\}\), \(\{1,2\}\cap\{2,3\}=\{2\}\) is not in \(L\), and \(\{2\}\) is exactly the set on which the two counterexample measures disagree. |
| SoSe26 P2b · 3 cr | "Pre-images of a \(\sigma\)-algebra form one, so forward images do too — especially if \(f\) is onto." | False. The official counterexample is surjective on purpose, precisely to kill the "but \(f\) is onto" objection. Name which axiom fails: the marking gives a credit for that. |
| WiSe25 P6c · 4 cr | Multiplying \(\P(E_{13})\P(E_{14})\P(E_{24})\), because "the matches are independent". | The derived events share indices — \(E_{13}\) and \(E_{14}\) both contain \(A_1\) — so they are not independent. That is exactly why inclusion–exclusion (Thm 1.22) is needed. |
| SoSe26 P5d | Standardising with the observed proportion: \(\sqrt{0.64\cdot0.36/100}\). | Evaluate the null variance at the boundary: \(q_0=q(0.6)=0.55\), so \(\sqrt{0.55\cdot0.45/100}\approx0.0497\) and \(z_{\mathrm{obs}}\approx1.809\). The observed value belongs in the numerator only. |
| SoSe25 P4d, SoSe26 P5d | Using \(z_{\alpha/2}=1.96\) as the critical value. | Both tests ever asked were one-sided, so \(z_\alpha=z_{0.05}\approx1.64\). Both official solutions flag the one-sidedness explicitly, and the rejection-rule credit hangs on it. |
| WiSe25 P3a, SoSe25 P3a | Giving the formula for the density and stopping. | The support is worth credits on its own. WiSe25 P3a prints "Be sure to correctly specify the support of \(X\)", and both density problems mark it separately. |
Where the official solutions are themselves sloppy
Every one of these was re-checked against the exam text. They are listed so that you copy the marked route, not the flawed one; the chapter pages named at the end of each row work the correct version through.
| Item | What is wrong or incomplete | Worked out on |
|---|---|---|
| WiSe25 · P4a | The second-derivative test alone proves only a local maximum: \(\ell''(\theta) =\tfrac{2}{\theta^3}(n\theta-s)\) is positive for \(\theta>s/n\). The complete argument is the sign of \(\ell'=(s-2n\theta)/\theta^2\) — positive left of \(\hat\theta\), negative right of it. One extra line. | mle |
| WiSe25 · P6c | Two typesetting slips: it writes \(\P(E_{13}\cup E_{14}\cup E_{14})\) where the last term should be \(E_{24}\), and the bracket opened after the minus sign closes only after the triple-intersection term, so as printed that term is subtracted instead of added. The next line has the signs right and the final answer \(p(2q+p-2pq)\) is correct. | §1.4 exam tasks |
| WiSe25 · P3b | The primary route invokes "the exponential distribution is memoryless". That word does not appear anywhere in the script. Use the official "Alternative" instead — the two-line conditional-probability computation \(\P(X\ge10)/\P(X\ge5)=e^{-10\lambda}/e^{-5\lambda}=e^{-5\lambda}=p\) — which stands entirely on Def 1.69. | memorylessness |
| WiSe25 · P4c | The answer \(2\Phi(-\sqrt{2n}\,\varepsilon/\theta)\) still contains the unknown \(\theta\). That is what was asked; note only that it is not a usable number, and do not "improve" it by substituting \(\hat\theta\) unless a sub-part asks for that. | the clt |
| WiSe25 · P1c, P1d | Cosmetic: the PDF renders the shared value \(2/3\) as "32", and the statement is printed as \(\lim_{n\to\infty}\bar X_n\xrightarrow{\P}2\), where the "lim" is redundant. Read it as \(\bar X_n\xrightarrow{\P}2\). | §2.4 exam tasks |
| SoSe25 · P2a | The solution prints, in square brackets, that \(S_n\xrightarrow{d}\mathcal N(n\mu,n\sigma^2)\) and \(\bar X_n\xrightarrow{d}\mathcal N(\mu,\sigma^2/n)\) were counted as correct "even though [they] are mathematically incorrect" — a limit law cannot depend on \(n\). Do not rely on that leniency: write the standardised version. | the clt |
| SoSe25 · P2b | The official definition of convergence in distribution demands that \(X_n\) and \(X\) live on the same probability space. Convergence in distribution does not need that. Harmless, but the question asked for the full general definition. | modes of convergence |
| SoSe25 · P4a | The maximum check \(\mathrm d^2\ell/\mathrm d\lambda^2=-(\sum x_i)/\lambda^2<0\) silently needs \(\sum x_i>0\). If every observation is 0 then \(\ell(\lambda)=-n\lambda\) is strictly decreasing on \((0,\infty)\) and there is no interior maximum. The probability of that is \(e^{-n\lambda}\), tiny — but the inequality as printed is not unconditional. | mle |
| SoSe25 · P3d | "The support of \(X\) is \([0,2]\), so the support of \(Y\) is \((-\infty,\ln2]\)" — strictly, \(\ln0\) is undefined. Harmless because \(\P(X=0)=0\), but write the support as \((0,2]\) first. | transformations |
| SoSe25 · P5c | "At least 90 %" means \(\P(\text{outside})\le0.1\), but the solution writes \(<0.1\) and then sets \(\Var[X]/k^2=0.1\). Separately, the answer is valid but not sharp: with 2 hunters only \(m-2\) or \(m-1\) ducks can survive, so \(k=1\) already works with probability 1 for every \(m\ge2\). The question only asked to "find a \(k\)", so the official answer scores. | Chebyshev |
| SoSe26 · P4c | States \(\varphi_{Z_n}''(0)=-1\) without the computation. If you take the characteristic-function route, show it. | characteristic functions |
| SoSe26 · P5b | "The Bernoulli likelihood is maximised at \(\hat q=\bar y_n\)" silently needs \(\bar y_n\) to be a reachable value of \(q\) — which is exactly what the printed assumption \(\bar y_n\in[\tfrac{1-r}{2},\tfrac{1+r}{2}]\) supplies. Without it the mle would sit at the boundary \(\hat p=0\) or \(1\), and the unrestricted formula could return a negative "probability". | mle |
| SoSe26 · P5a | Uses, without saying so, that the choice of answering mechanism is independent of the attribute being surveyed. That is how the mechanism is meant, but it is an assumption in use — name it and you lose nothing. | randomized response |
What to do with a solution you believe is wrong
In the exam: answer the question that was asked, using the route the marking scheme can follow, and add one sentence saying what you think is missing. SoSe26 is the only paper that prints its marking scheme, and it shows that alternative routes score equally and that follow-through credit exists — P4b states that a wrong result in (a), correctly carried forward in (b), is not deducted again. Never leave a later sub-part blank because an earlier one failed.
A two-week plan
This is a suggestion, not a promise, and it is weighted by the credit ranking of the three past papers — which is a record of what has been asked, not a forecast. It assumes you have already been to the lectures and have worked the sheets once; if you have not, the plan is too fast and you should stretch it. Two hours a day is the assumption behind the sizes below. Adjust freely: the ordering matters more than the calendar.
Week 1 — the engines My addition
- Days 1–2 · expectation, variance, covariance
- The heaviest topic by a wide margin: 38 of the 154 credits, and never a problem of its own — it is the machinery inside the true/false items, the estimator problems and the story problems alike. Work §2.1 end to end, then the indicator trick (TT13) until \(\E[X]=\sum_i\P(A_i)\) and the covariance expansion are automatic. Drills: the story-problem bank.
- Day 3 · convergence, the laws of large numbers and the clt
- 25 credits, present in all three papers. Learn Def 2.56(i)(ii)(iii) and Thm 2.62, 2.64 verbatim, exceptional-set clauses included — this is the cheapest block on the paper, because it is pure recall. Then the ladder and its two counterexample machines. Pages: modes, clt. Drills: the state-it bank.
- Day 4 · estimators: mle, bias, mse
- 23 credits, all three papers. Run TT5 and TT6 on three different models until the five mle steps, the global-maximum check and "bias 0 \(\Rightarrow\) mse = var" come out without thinking. Pages: mle, estimator properties. Drills: the estimation drills.
- Day 5 · conditional probability, independence, Bayes
- 19 credits. TT14, plus the difference between "identically distributed" and "iid" — the one that costs three credits on WiSe25 P1d. Page: conditioning.
- Day 6 · the inequalities
- 15 credits and only three statements: Markov, Chebyshev, Jensen. Practise TT7 in both directions — bounding a probability, and solving a bound for a constant. Page: §2.2.
- Day 7 · first timed mock
- Draw a paper with the mock-paper generator below, set 120 minutes, and write it under exam conditions with only a handwritten sheet. Then mark it yourself against the credit values. Expect it to go badly; that is what it is for.
Week 2 — the rest of the paper, then rehearsal My addition
- Day 8 · the true/false block
- 41 credits — the largest single task type, and the one that rewards drilling most, because each item is two minutes of recognition. Work the whole of the true/false bank and, for every item you get wrong, write the missing hypothesis on your sheet.
- Day 9 · hypothesis testing and the Wald interval
- 12 + 2 credits, two of three papers. TT9 five times, always one-sided, always standardising at the null boundary. Then TT10 once. Pages: tests in practice, the Wald interval.
- Day 10 · densities, cdfs, transformations
- 11 credits, but absent from the newest paper — so this is the block to shorten if you are behind, and the one to do properly if you are not. TT3 and TT4, both routes. Drills: the density drills.
- Day 11 · \(\sigma\)-algebras and characteristic functions
- 13 + 5 credits, each present in only one or two papers, and each cheap to revise: the three axioms and the \(2^k\) counting check on one side, \(\varphi_{aX+b}\) and \(\varphi_{X+Y}\) on the other. Pages: \(\sigma\)-algebras, characteristic functions.
- Day 12 · write the A4 sheet
- By hand, from memory, checking against the master sheet only afterwards. Whatever you could not reproduce is your real revision list for the last two days.
- Day 13 · second timed mock, and the traps
- A second drawn paper under time, then read the traps section twice — once for the conceptual traps, once for the sloppy official solutions.
- Day 14 · light
- Re-read the assumption lists of the limit theorems, the three modes of convergence, and the five steps of a z-test. Nothing new. Sleep.
Two honest caveats. First, the plan is weighted by three papers, and the three papers disagree with each other on positions 2, 3 and 6 — so a topic that looks light here (characteristic functions, 5 credits, one paper) could be heavy next time. Second, no plan survives contact with a topic you turn out not to understand; if day 4 shows that you cannot differentiate a log-likelihood, day 5 belongs to that, not to Bayes.
Self-test
Appendix A.1 · the script's own set-theory refresher
Set theory
Mengenlehre
What this page covers Script §A.1, pp. 115–116
Every item of the script's appendix A.1, in the script's order: Definition A.1 (subsets and equality), Example A.2 (notation), Definition A.3 (power set), Example A.4, Remark A.5 (the notation \(2^\Omega\)), Definition A.6 (complement, intersection, disjoint, union), the remark on Venn diagrams, and Definition A.7 (families of sets).
This is the vocabulary §1.1 is written in. A longer, slower treatment with more examples and two widgets is the background page B2; Sheet 1 Ex 1 (de Morgan) and Ex 2 (pre-images) are worked on §1.1.
This page versus B2 my addition
This page is the script's own short appendix summary (A.1), item by item in the script's order. The background page B2 (Sets, families and countability) teaches the same material in more depth — it is the full course, with more examples and widgets — and in addition covers what this appendix leaves out but §1.1 onwards uses: the symmetric difference (B2), de Morgan's laws (B2), maps, images and pre-images (B2), Cartesian products (B2) and countability (B2). If you have time for only one, study B2; use this page to check you know each item of the script's appendix.
The big picture
In probability, an event is a set: "the die shows an even number" is the set \(\{2,4,6\}\). Combining events is combining sets: "even and at least 4" is an intersection, "even or at least 4" is a union, "not even" is a complement. The collection of all events you may ask about is a set of sets — which is why the power set appears. This page fixes the words and symbols for all of that.
In words: events are sets of outcomes; "and", "or", "not" are ∩, ∪, complement; the set of all subsets is the power set.
Subsets and equality
Definition A.1 (proper) subset and superset Script A.1
Let \(X,Y\) be sets.
- Subset [Teilmenge]: \(X\subseteq Y\) (equivalently \(Y\supseteq X\), "\(Y\) is a superset of \(X\)") means: every element of \(X\) is also an element of \(Y\). In symbols: \(X\subseteq Y:\Leftrightarrow\forall x\in X:\ x\in Y\). (Read \(:\Leftrightarrow\) as "is defined to mean" and \(\forall\) as "for all"; quantifiers and how to negate them: Analysis 1.1 — Quantifiers.)
- Equality: \(X=Y:\Leftrightarrow(X\subseteq Y)\wedge(Y\subseteq X)\) — both inclusions hold (\(\wedge\) means "and"). This is how equalities of sets are proved: show each side is contained in the other.
- Proper subset: \(X\subsetneq Y\) (equivalently \(Y\supsetneq X\)) means \(X\subseteq Y\) and \(X\ne Y\): \(Y\) has at least one element that \(X\) lacks.
- Properties of \(\subseteq\): \(X\subseteq X\) (reflexivity); if \(X\subseteq Y\) and \(Y\subseteq Z\), then \(X\subseteq Z\) (transitivity).
Examples (mine). \(\{2,4\}\subseteq\{2,4,6\}\), and in fact \(\{2,4\}\subsetneq\{2,4,6\}\) because 6 is missing on the left. \(\{2,4,6\}\subseteq\{2,4,6\}\) but not \(\subsetneq\). \(\{1,7\}\not\subseteq\{1,2,3\}\) because \(7\) is not on the right.
Script typo: it writes "\(X\subsetneq X\)"; it means \(X\subsetneq Y\).
Why transitivity holds supplied by me
Take any \(x\in X\). Since \(X\subseteq Y\), \(x\in Y\). Since \(Y\subseteq Z\), \(x\in Z\). So every element of \(X\) lies in \(Z\): \(X\subseteq Z\). Reflexivity: every element of \(X\) is an element of \(X\).
Example A.2 notation Script A.2
- \(\{x\}\) is the set whose only element is \(x\) (a singleton).
- \(\{a,b,\dots,*,\odot\}\) is the set of the listed elements — any symbols can be elements. Order and repetition do not matter: \(\{1,2\}=\{2,1\}=\{1,1,2\}\) (my example).
- \(\emptyset\) is the empty set [leere Menge], which has no elements. (The script calls it "the empty subset".) (mine) It is a subset of every set: to fail \(\emptyset\subseteq Y\) you would have to produce an element of \(\emptyset\) that is not in \(Y\), and \(\emptyset\) has no elements to produce.
Power sets
Definition A.3 power set Script A.3
The power set [Potenzmenge] \(\pow(X)\) (also written \(2^X\)) of a set \(X\) is the set of all subsets of \(X\).
Counting (mine). If \(X\) has \(n\) elements, \(\pow(X)\) has \(2^n\): to build a subset, decide for each of the \(n\) elements "in" or "out" — two choices each, so \(2\cdot2\cdots2=2^n\) subsets (product rule, B3). A die: \(2^6=64\) possible events.
Example A.4 power set of \(\emptyset\) Script A.4
- \(\pow(\emptyset)=\{\emptyset\}\): the empty set has exactly one subset, itself. So \(\pow(\emptyset)\) is not empty — it has one element, \(\emptyset\) (\(2^0=1\)).
- \(\pow(\{\emptyset\})=\{\emptyset,\{\emptyset\}\}\): the set \(\{\emptyset\}\) has one element (the empty set), so it has \(2^1=2\) subsets — "take nothing" and "take that one element".
- \(\pow(\{*,\odot\})=\{\emptyset,\{*\},\{\odot\},\{*,\odot\}\}\): \(2^2=4\) subsets.
The trap in (i) and (ii): \(\emptyset\) (nothing) and \(\{\emptyset\}\) (a box containing an empty box) are different sets — the first has 0 elements, the second 1.
Remark A.5 the notation \(2^\Omega\) Script A.5
\(2^\Omega\) usually denotes the set of all maps \(\Omega\to\{0,1\}\). Such a map is the same thing as a subset: it decides, for each element, whether it is included (1) or excluded (0). This one-to-one correspondence is why the power set is also written \(2^\Omega\).
The two words (my addition). A map [Abbildung] \(f:\Omega\to\{0,1\}\) is a rule that assigns to every element \(\omega\in\Omega\) exactly one value \(f(\omega)\in\{0,1\}\). A one-to-one correspondence (a bijection [Bijektion]) between two sets pairs their elements off perfectly: each element on one side has exactly one partner on the other, nobody is left over and nobody is used twice. Here the pairing is "subset \(A\) \(\leftrightarrow\) its indicator map \(\one_A\)": different subsets give different maps, and every map \(f\) comes from the subset \(\{\omega\mid f(\omega)=1\}\). That is why a set with \(n\) elements has as many subsets as there are bit strings of length \(n\), namely \(2^n\). Maps and bijections in full: B2; indicators and the power set: B2.
Example: \(\Omega=\{a,b,c\}\). The map \(a\mapsto1,\ b\mapsto0,\ c\mapsto1\) — written as the bit string 101 — corresponds to the subset \(\{a,c\}\). The map for a subset \(A\) is its indicator function \(\one_A\), used all through the course. The widget below lists every subset with its bit string.
Complement, intersection, union
Definition A.6 (relative) complement, intersection, disjoint, union Script A.6
Let \(X\) be a set and \(A,B\subseteq X\).
- Relative complement of \(B\) in \(A\) ("\(A\) without \(B\)"): \(A\setminus B:=\{x\in X\mid x\in A\wedge x\notin B\}\).
- Complement [Komplement] of \(A\) (when the big set \(X\) is clear): \(A^c:=X\setminus A\).
- Intersection [Schnitt]: \(A\cap B:=\{x\in X\mid x\in A\wedge x\in B\}\) — in both.
- \(A\) and \(B\) are disjoint [disjunkt] if \(A\cap B=\emptyset\) — no common element.
- Union [Vereinigung]: \(A\cup B:=\{x\in X\mid x\in A\vee x\in B\}\) — in at least one (\(\vee\) means "or", including "both").
(The notation \(\{x\in X\mid\ldots\}\) reads "the set of all \(x\) in \(X\) such that …".)
Example (mine). One die, \(X=\{1,\dots,6\}\), \(A=\{2,4,6\}\) (even), \(B=\{4,5,6\}\) (at least 4): \(A\cap B=\{4,6\}\), \(A\cup B=\{2,4,5,6\}\), \(A\setminus B=\{2\}\), \(A^c=\{1,3,5\}\). \(A\) and \(\{1,3\}\) are disjoint.
Remark (Venn diagrams) Script A.1, remark after A.6
Set relations can be drawn as Venn diagrams — overlapping circles inside a rectangle for \(X\); the script prints one such picture at this point. They build intuition, but the script warns that they are not suitable for proofs: a picture shows one arrangement, a proof must cover all of them. The Venn-diagram widget is on B2.
Families of sets
Definition A.7 family of sets, index set Script A.7
Let \(I\ne\emptyset\) and let \(A_\alpha\) be a set for each \(\alpha\in I\). Then \(\{A_\alpha\mid\alpha\in I\}\) is a family (or collection) of sets, and \(I\) is its index set. The same set may appear several times (\(A_\alpha=A_\beta\) for \(\alpha\ne\beta\) is allowed), and some members may be empty.
Notation (my addition). The script writes a family as \(\{A_\alpha\mid\alpha\in I\}\) here and as \((A_\alpha)_{\alpha\in I}\) elsewhere (e.g. in the summary below and in §1.1). In this course both mean the same thing: the members \(A_\alpha\), each labelled by its index \(\alpha\), with repeats allowed. (Strictly, the curly-bracket version as a plain set would forget repeats; the round-bracket version keeps the labels. The script does not make that distinction, and nothing in the course depends on it.) More: B2.
Examples (mine). \(I=\{1,2,3\}\), \(A_1=\{1\}\), \(A_2=\{1,2\}\), \(A_3=\{1\}\): a family of three members, two of them equal. \(I=\N\), \(A_n=[0,1-\frac1{n+1}]\): an infinite family of growing intervals, as in continuity from below (Proposition 1.19). The index set can even be uncountable, e.g. \(I=\R\), \(A_t=(-\infty,t]\) — the sets that generate the Borel σ-algebra.
Why families rather than plain sets of sets: Definition 1.6 (σ-algebras) and Definition 1.17 (measures) talk about sequences \(A_1,A_2,\dots\) of events, and the index keeps track of which is which, even if two coincide. Unions and intersections of families, \(\bigcup_{\alpha\in I}A_\alpha\) and \(\bigcap_{\alpha\in I}A_\alpha\), and de Morgan's laws for them (Lemma 1.3) are on §1.1 and B2.
Summary sheet
- \(X\subseteq Y\)
- every element of \(X\) is in \(Y\); reflexive and transitive
- \(X=Y\)
- \(X\subseteq Y\) and \(Y\subseteq X\)
- \(X\subsetneq Y\)
- \(X\subseteq Y\) and \(X\ne Y\)
- \(\pow(X)=2^X\)
- all subsets; \(2^n\) of them; \(\pow(\emptyset)=\{\emptyset\}\)
- \(A\setminus B\), \(A^c\)
- in \(A\) not in \(B\); \(X\setminus A\)
- \(\cap\), \(\cup\)
- in both; in at least one
- disjoint
- \(A\cap B=\emptyset\)
- family
- \((A_\alpha)_{\alpha\in I}\); repeats and empty members allowed
Traps
- \(\emptyset\ne\{\emptyset\}\); \(\pow(\emptyset)\) has one element.
- "\(x\in A\)" (element) versus "\(\{x\}\subseteq A\)" (subset) — events are sets, outcomes are elements.
- Venn diagrams are not proofs.