Target Audience: Anyone comfortable with discrete probability who wants to know what changes when the sample space stops being countable — and how little of it is genuinely new.
Prerequisites: Discrete Probability for the axioms, expectation and variance, and The Riemann Integral and Measure Zero — because here a probability is an integral, and the link between a density and its CDF is the Fundamental Theorem.
Almost nothing here is new. The axioms, conditional probability, independence, linearity of expectation and the variance identity all carry over from the discrete theory unchanged. What changes is the arithmetic: sums become integrals, point masses become densities, and the question “what is the probability of this outcome?” stops being useful, because the answer is always zero.
Sections 1 to 4 make that swap precisely and show what has to replace a sum over points. Sections 5 to 8 are the standard distributions and the moments. Section 9 is the part with no discrete counterpart worth the name.
The explorer in Section 4 computes each probability twice: once from the CDF, and once by squeezing the density between Darboux sums. The two routes share no code, and that they always agree is the Fundamental Theorem — the same machinery Unit 17 built, now carrying probability.
Discrete probability assigns a number to each outcome and adds them up. Pick a real number uniformly from \([0,1]\) and that recipe collapses immediately.
If each point carried the same probability \(p \gt 0\), then any \(n\) points would total \(np\), which exceeds \(1\) once \(n \gt 1/p\). And there are infinitely many points. So \(p = 0\) is forced — and then a sum over points gives \(0\), not \(1\).
The draw does return some particular number, and that number had probability \(0\) beforehand. So “probability zero” and “cannot happen” come apart here and stay apart — an event of probability \(1\) is assembled entirely out of parts each of which has probability zero.
Something other than a sum over points has to carry the theory. The candidate is already familiar: ask about intervals instead.
The cumulative distribution function is \(F(x) = P(X \leq x)\). It is nondecreasing, tends to \(0\) as \(x \to -\infty\) and to \(1\) as \(x \to +\infty\) — and those three properties characterise it completely.
That single line is the whole interface, and it needs no density. A CDF alone already determines every interval probability, which is why it is the primitive object rather than a derived one.
When \(F\) is continuous, \(P(X = c) = F(c) - F(c) = 0\), so \(P(a \lt X \lt b) = P(a \leq X \leq b)\). Strict and non-strict give the same answer. In the discrete case they do not, and losing track of which setting you are in is the standard error.
A probability density function is a function \(f \geq 0\) with \(F(x) = \int_{-\infty}^{x} f(t)\,dt\) — equivalently, \(f = F^{\prime}\) wherever \(F\) is differentiable.
So the density and the CDF are an antiderivative pair, and the relationship between them is exactly the Fundamental Theorem of Calculus.
\(f(x)\) is not \(P(X = x)\), which is \(0\). It is a probability per unit length, and it can exceed \(1\) freely.
The density \(6x(1-x)\) peaks at \(3/2\) when \(x = 1/2\). What must be at most \(1\) is the integral, never the height. Reading a density as a probability is the most common mistake in the topic.
\(f \geq 0\) everywhere, and \(\int_{-\infty}^{\infty} f = 1\). Any function meeting those two is the density of some random variable, which is why densities can be built to order — every preset in the explorer below was.
Every question about a continuous random variable becomes a question about area. That is the whole translation — and it is why this material sits after integration rather than before it.
\(F(b) - F(a)\) comes from an antiderivative in one step. \(\int_a^b f\) comes from squeezing Darboux sums until they close. The Fundamental Theorem says these agree, and the explorer checks it rather than assuming it.
Choose a density. Everything below is computed in exact rational arithmetic: the CDF as a symbolic antiderivative, and the Darboux bracket on partitions into \(1, 2, 4, \ldots, 256\) pieces — a divisibility chain, so each one genuinely refines the last. The two routes share no code. The FTC says the CDF answer must lie inside every bracket, and the explorer checks exactly that.
Densities are polynomials with rational coefficients, so every antiderivative, sum, mean and variance here is exact. The arithmetic is on arbitrary-precision integers: intermediate denominators reach 27 digits, well past what ordinary numbers hold.
\(f(x) = \dfrac{1}{b-a}\) on \([a,b]\) and \(0\) elsewhere, giving \(F(x) = \dfrac{x-a}{b-a}\) on the interval.
Here probability genuinely is length, rescaled to total \(1\). It is the one case where the continuous intuition matches the discrete one exactly, and the mean \(\frac{a+b}{2}\) and variance \(\frac{(b-a)^2}{12}\) are what you would guess.
\(f(x) = \lambda e^{-\lambda x}\) for \(x \geq 0\), with \(F(x) = 1 - e^{-\lambda x}\) and mean \(1/\lambda\). It models waiting times, and \(\lambda\) is a rate.
Having already waited \(t\) tells you nothing about how much longer you must wait. The exponential is the only continuous distribution with this property, which is why it is the default model for a process that does not age.
It does not say a long wait is unlikely to continue. It says the remaining wait has the same distribution as a fresh one — nothing “becomes due”. That is the gambler's fallacy, stated precisely enough to see why it fails.
Symmetric about \(\mu\), with spread set by \(\sigma\), and the constant in front is exactly what makes the total area \(1\).
\(\int e^{-x^2}\,dx\) cannot be written with elementary functions, so \(\Phi\) is defined by the integral and evaluated numerically. That is not a gap — a function defined by an integral is still a function, which is the same move that defines \(\ln x\) as \(\int_1^x dt/t\).
\(Z = \dfrac{X-\mu}{\sigma}\) has mean \(0\) and variance \(1\) whatever \(\mu\) and \(\sigma\) were, so one table serves every normal distribution.
About \(68\%\), \(95\%\) and \(99.7\%\) of the mass lies within \(1\), \(2\) and \(3\) standard deviations. Worth knowing as orders of magnitude: three deviations is already rare.
The discrete \(\sum x\,P(X = x)\) with the sum replaced by an integral. The second form says you never need the density of \(g(X)\) to find its expectation — the same shortcut as in the discrete case, for the same reason.
\(\operatorname{Var}(X) = E[X^2] - (E[X])^2\), with both moments now integrals. The identity and its proof are the discrete ones verbatim.
The Cauchy density \(\dfrac{1}{\pi(1+x^2)}\) is a perfectly good density whose mean does not exist, because \(\int |x|f(x)\,dx\) diverges. So “the average” is not always available — and Section 9 quietly assumes it is.
\(E[aX + bY] = aE[X] + bE[Y]\) needs no independence. But \(\operatorname{Var}(X+Y) = \operatorname{Var}(X) + \operatorname{Var}(Y)\) does. Expectation adds for free; variance does not.
For independent \(X_1, \ldots, X_n\) with the same distribution, the sample mean \(\bar{X}_n\) has \(E[\bar{X}_n] = \mu\) and \(\operatorname{Var}(\bar{X}_n) = \sigma^2/n\). Both theorems below are consequences of that second fact.
\(\bar{X}_n \to \mu\) as \(n \to \infty\).
It says nothing about any individual outcome. After a run of heads, the proportion is dragged back toward \(1/2\) by the sheer weight of later tosses — not by any correction. The absolute difference between heads and tails typically grows. That is the gambler's fallacy stated precisely.
Whatever the distribution of the \(X_i\), provided the variance is finite.
A skewed population stays skewed however many samples you take. Reading the theorem as “large samples are normally distributed” gets wrong the very thing it is about.
Variances add and standard deviations do not. \(\operatorname{Var}(\bar{X}_n) = \sigma^2/n\), so the standard deviation is \(\sigma/\sqrt{n}\). That is the entire origin of the square root — and why quadrupling the data only halves the error.
The Law of Large Numbers says where \(\bar{X}_n\) ends up. The Central Limit Theorem says how it gets there. The second is the one that gives confidence intervals, and it needs finite variance: both fail outright on the Cauchy distribution, where the mean of \(n\) samples has the same distribution as one sample and averaging achieves nothing.
| Discrete | Continuous | Changed? |
|---|---|---|
| The three axioms | The three axioms | No |
| \(P(A \cup B) = P(A) + P(B) - P(A \cap B)\) | Identical | No |
| \(P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}\) | Identical | No |
| \(\sum_x x\,P(X = x)\) | \(\int x\,f(x)\,dx\) | Sum becomes integral |
| \(P(X = x)\) is the basic quantity | \(P(X = x) = 0\); the density is | Yes |
| \(\lt\) and \(\leq\) differ | They agree | Yes |
| Linearity of expectation | Identical, no independence needed | No |
| \(\operatorname{Var} = E[X^2] - (E[X])^2\) | Identical | No |
Almost nothing is genuinely new. The machinery is re-expressed, not replaced — and the two rows that do change are exactly the ones Section 1 forced.
This is the last unit. The Probability group now covers both settings, and the integral it rests on was built two units earlier rather than assumed — which is why the plan put continuous probability after real analysis rather than beside the discrete material.
| Quantity | Formula | Note |
|---|---|---|
| CDF | \(F(x) = P(X \leq x)\) | Nondecreasing, \(0\) to \(1\) |
| Interval probability | \(F(b) - F(a) = \int_a^b f\) | Two routes, one answer |
| Density | \(f = F^{\prime}\), \(f \geq 0\), \(\int f = 1\) | May exceed \(1\) in height |
| Uniform on \([a,b]\) | \(f = \frac{1}{b-a}\) | Mean \(\frac{a+b}{2}\), variance \(\frac{(b-a)^2}{12}\) |
| Exponential | \(f = \lambda e^{-\lambda x}\) | Mean \(1/\lambda\); the only memoryless one |
| Normal | \(\frac{1}{\sigma\sqrt{2\pi}}e^{-(x-\mu)^2/(2\sigma^2)}\) | \(\Phi\) has no elementary form |
| Expectation | \(E[g(X)] = \int g(x)f(x)\,dx\) | Can fail to exist (Cauchy) |
| Sample mean | \(E = \mu\), \(\operatorname{Var} = \sigma^2/n\) | Both limit theorems follow |
| LLN | \(\bar{X}_n \to \mu\) | Nothing evens out |
| CLT | \(\frac{\bar{X}_n - \mu}{\sigma/\sqrt{n}} \to N(0,1)\) | About the mean, not the data |