5.2 Random Variables
Key Takeaways
- A random variable maps outcomes in Ω to numbers; discrete RVs use a PMF, continuous RVs use a PDF, and both are summarized by a CDF F(x) = P(X ≤ x)
- Expectation E[X] is the probability-weighted mean; it is linear—E[aX + b] = aE[X] + b—even when X is not normal
- The four population moments central to risk are mean, variance, skewness, and kurtosis (often excess kurtosis versus the normal)
- The quantile function F⁻¹(p) returns the smallest x with F(x) ≥ p and underpins VaR as a left-tail quantile of the loss (or return) distribution
- Affine transforms Y = aX + b scale mean by a and shift by b, scale variance by a², flip skew sign if a < 0, leave kurtosis unchanged for a ≠ 0, and map median/IQR in the same affine way
Random Variables
Probability on events becomes operational for risk when we map outcomes to numbers: P&L, returns, default counts, spreads. A random variable (RV) is a function X: Ω → ℝ. Once X is defined, we study its distribution rather than the abstract sample space.
PMF Versus CDF (Discrete Case)
For a discrete RV taking values in a countable set {x₁, x₂, …}, the probability mass function (PMF) is
p(x) = P(X = x),
with p(x) ≥ 0 and Σₓ p(x) = 1. The cumulative distribution function (CDF) is
F(x) = P(X ≤ x) = Σ_{xᵢ ≤ x} p(xᵢ).
F is nondecreasing, right-continuous, with lim_{x→−∞} F(x) = 0 and lim_{x→∞} F(x) = 1. For discrete X, F jumps at mass points; the jump size at x equals p(x).
Worked PMF/CDF example
Let operational-loss counts in a month be X ∈ {0, 1, 2} with p(0) = 0.50, p(1) = 0.30, p(2) = 0.20.
| x | p(x) | F(x) = P(X ≤ x) |
|---|---|---|
| 0 | 0.50 | 0.50 |
| 1 | 0.30 | 0.80 |
| 2 | 0.20 | 1.00 |
Then P(X ≥ 1) = 1 − F(0) = 0.50, and P(1 ≤ X ≤ 2) = F(2) − F(0) = 0.50.
Expectation
The expectation (population mean) of a discrete RV is E[X] = Σₓ x p(x). For the count example, E[X] = 0·0.50 + 1·0.30 + 2·0.20 = 0.70 losses per month.
For a nonnegative continuous RV, E[X] = ∫₀^∞ (1 − F(x)) dx (tail integral form); more generally E[X] = ∫ x f(x) dx when a density exists. Linearity always holds: E[aX + bY] = aE[X] + bE[Y] whether or not X and Y are independent. Independence is needed for E[XY] = E[X]E[Y], not for linearity of E.
Four Population Moments
Risk analysis leans on four population moments (or moment-based shape measures):
- Mean (1st raw moment): μ = E[X] — location.
- Variance (2nd central moment): σ² = Var(X) = E[(X − μ)²] = E[X²] − μ² — dispersion. Standard deviation σ = √Var(X).
- Skewness (standardized 3rd central moment): γ₁ = E[(X − μ)³] / σ³ — asymmetry. Positive skew means a long right tail; loss distributions often show positive skew when X is loss.
- Kurtosis (standardized 4th central moment): κ = E[(X − μ)⁴] / σ⁴ — tail heaviness / peakedness relative to scale. A normal distribution has κ = 3; excess kurtosis is κ − 3. Financial returns typically show excess kurtosis > 0 (leptokurtosis).
| Moment measure | Formula (population) | Risk reading |
|---|---|---|
| Mean μ | E[X] | Expected P&L or loss |
| Variance σ² | E[(X − μ)²] | Volatility of X |
| Skewness γ₁ | E[(X − μ)³]/σ³ | Asymmetry of outcomes |
| Kurtosis κ | E[(X − μ)⁴]/σ⁴ | Tail weight vs normal |
Worked moments on the count RV
E[X] = 0.70. E[X²] = 0²·0.50 + 1²·0.30 + 2²·0.20 = 1.10. Var(X) = 1.10 − 0.70² = 1.10 − 0.49 = 0.61. Skewness is positive because mass at 2 stretches the right side relative to a symmetric distribution around 0.70—qualitatively matching operational-count data that allow large months.
PDF Versus PMF
A continuous RV has a probability density function (PDF) f such that P(a ≤ X ≤ b) = ∫ₐᵇ f(x) dx and F′(x) = f(x) at continuity points. Densities can exceed 1; they are not probabilities. Only integrals of f over intervals are probabilities. The PMF is the discrete analogue of “probability at a point”; for continuous X, P(X = x) = 0 for each single x.
Exam trap: treating f(x) as P(X = x). Another trap: mixing PMF and PDF notation without stating discrete vs continuous.
Quantile Function
The quantile function (generalized inverse CDF) is
Q(p) = F⁻¹(p) = inf{x : F(x) ≥ p}, for p ∈ (0, 1).
For continuous strictly increasing F, Q(p) is the unique x with F(x) = p. Value-at-Risk at level α for a loss distribution L is typically the quantile Q_L(α)—for example α = 0.99 means the loss threshold exceeded only with probability 1%. For a return distribution R where losses are −R, left-tail quantiles of R map to right-tail loss quantiles. Always check whether the stem defines VaR on losses or on P&L.
Median is Q(0.5). Interquartile range IQR = Q(0.75) − Q(0.25) is a robust scale measure less sensitive to extremes than variance.
Numeric quantile sketch
Suppose continuous losses (in $m) have F(2) = 0.95 and F is continuous and strictly increasing near 2. Then the 95% loss quantile is $2m: only 5% of outcomes exceed 2. If a firm’s capital is set at that quantile, it is using a VaR-style threshold, not an expectation.
Linear (Affine) Transformations
Let Y = aX + b with a ≠ 0. Effects on common summaries:
| Statistic of Y | In terms of X |
|---|---|
| Mean | E[Y] = aμ + b |
| Variance | Var(Y) = a² σ² |
| Std. dev. | |
| Skewness | sign(a) · γ₁(X) |
| Kurtosis / excess kurtosis | unchanged (κ_Y = κ_X) |
| Median | a·median(X) + b |
| IQR |
Scaling by a stretches dispersion by a² for variance and by |a| for IQR and σ. Adding b shifts location (mean, median, all quantiles) but does not change variance, skewness, kurtosis, or IQR. Negating (a = −1) flips skewness sign—profits become losses—and reverses quantile order carefully: the p-quantile of −X is −(the (1−p)-quantile of X) for continuous strictly increasing F.
Worked transform
Let X be a return with μ = 0.01, σ = 0.02, skewness −0.4, excess kurtosis 1.5. Portfolio P&L on $10m notional with no fees: Y = 10,000,000 · X (here b = 0, a = 10⁷). Then E[Y] = $100,000, σ_Y = $200,000, skewness remains −0.4, excess kurtosis remains 1.5. Reporting σ in dollars versus percent is only a units choice via a.
Why This Matters for FRM
VaR, expected shortfall, moment-matching in risk models, and unit conversions between returns and cash P&L all rest on PMF/PDF/CDF literacy, expectation linearity, moment interpretation, and quantile geometry. Get the transform rules cold so that changing units never changes your risk story by accident.
For a continuous random variable with PDF f, which statement is true?
If Y = −3X + 5 and X has skewness +1.2, the skewness of Y is:
Using p(0)=0.50, p(1)=0.30, p(2)=0.20, what is E[X]?
The 99% VaR of a continuous loss distribution L is best described as: