Probability Theory & Random Variables
Probability spaces, expectation, the law of large numbers, and the central limit theorem.
A probability space is a triple $(\Omega, \mathcal F, P)$: a sample space, a σ-algebra of events, and a probability measure with $P(\Omega) = 1$.
A random variable $X: \Omega \to \mathbb R$ is a measurable function. Its expectation is $\mathbb E[X] = \int X\, dP$. Variance: $\mathrm{Var}(X) = \mathbb E[X^2] - \mathbb E[X]^2$.
Law of large numbers: for i.i.d. $X_1, X_2, \ldots$ with mean $\mu$,
$$\bar X_n = \frac{1}{n}\sum_{i=1}^n X_i \;\xrightarrow{n\to\infty}\; \mu \quad (\text{a.s. and in probability}).$$Central limit theorem: with finite variance $\sigma^2$,
$$\sqrt n\,(\bar X_n - \mu) \;\Rightarrow\; \mathcal N(0, \sigma^2).$$The Gaussian shape is universal — it captures the asymptotic distribution of averages of essentially any well-behaved variable. Independence is the key assumption.
Interactive: sample means approaching a Gaussian
Press "draw" to sample $n$ uniform variables, average them, repeat many times, and plot the histogram of sample means against $\mathcal N(0.5, \tfrac{1}{12n})$.