Leave lesson

Statistics · Statistical distributions

1 / 11

Continuous random variables

Probability density functions — the two validity conditions, probabilities as areas, E(X) and Var(X) by integration, the median and percentiles from cumulative area, the mode as the maximum of f, and the continuous uniform distribution as the simplest special case.

Statistics · Statistical distributions

Continuous random variables

Probability density functions — the two validity conditions, probabilities as areas, E(X) and Var(X) by integration, the median and percentiles from cumulative area, the mode as the maximum of f, and the continuous uniform distribution as the simplest special case.

Why it works

A continuous quantity — a waiting time, a mass, a length — can take any value in an interval, so no single value can carry a lump of probability: P(X=a)=0\mathrm{P}(X = a) = 0 for every exact aa. Instead, probability is spread across the interval with a probability density function f(x)\mathrm{f}(x), and probability lives in areas: P(a<X<b)=abf(x)dx.\mathrm{P}(a < X < b) = \int_a^b \mathrm{f}(x)\,\mathrm{d}x. Because single points carry no probability, P(Xa)\mathrm{P}(X \leqslant a) and P(X<a)\mathrm{P}(X < a) are the same — strict versus non-strict makes no difference for a continuous variable.

A valid pdf must satisfy two conditions: f(x)0 everywhere,f(x)dx=1 over its whole range.\mathrm{f}(x) \geqslant 0 \text{ everywhere}, \qquad \int \mathrm{f}(x)\,\mathrm{d}x = 1 \text{ over its whole range}. The total-area condition is how "find kk" questions work: integrate, set the result equal to 11, solve.

Mean and variance replace the sums of the discrete case with integrals: E(X)=xf(x)dx,Var(X)=x2f(x)dx[E(X)]2.\mathrm{E}(X) = \int x\,\mathrm{f}(x)\,\mathrm{d}x, \qquad \mathrm{Var}(X) = \int x^2\,\mathrm{f}(x)\,\mathrm{d}x - \left[\mathrm{E}(X)\right]^2. The variance shortcut ("mean of the squares minus square of the mean") is the same one used for data. If the pdf is symmetric about some value, that value is the mean — quote the symmetry rather than integrating.

Median and percentiles come from cumulative area. The median mm splits the area in half: lower endmf(x)dx=12,\int_{\text{lower end}}^{m} \mathrm{f}(x)\,\mathrm{d}x = \tfrac12, and the pp-th percentile cuts off area p/100p/100 in the same way. This usually produces an equation in mm to solve.

The mode is simply where f\mathrm{f} is largest — found by differentiating f\mathrm{f} (or by inspection for a simple shape). Mode, median and mean are three different summaries and only coincide for symmetric distributions.

The continuous uniform distribution on [a,b][a, b] is the simplest pdf: constant height 1ba\dfrac{1}{b-a} (so the rectangle has area 1). By symmetry and direct integration: E(X)=a+b2,Var(X)=(ba)212,\mathrm{E}(X) = \frac{a+b}{2}, \qquad \mathrm{Var}(X) = \frac{(b-a)^2}{12}, and any sub-interval's probability is just its length divided by bab - a.