A random variable is a function from the sample space Ω to the real numbers. Intuitively, it is a numerical quantity whose value depends on a random outcome. Stock prices, daily returns, credit losses, recovery rates — every quantitative object in finance is a random variable.
Discrete vs continuous
A discrete random variable takes countably many values (e.g., number of defaults in a portfolio). Its distribution is the PMF p(x) = P(X = x). A continuous random variable takes uncountably many values (e.g., a stock price). Its distribution is the PDF f(x), and P(a ≤ X ≤ b) = ∫ₐᵇ f(x) dx. Both have a CDF F(x) = P(X ≤ x), which is the most universally usable object.
Expectation and variance
E[X] = Σ x·p(x) (discrete)E[X] = ∫ x·f(x) dx (continuous)Var(X) = E[(X - E[X])²] = E[X²] - (E[X])²
Linearity of expectation
E[aX + bY] = aE[X] + bE[Y], with no independence requirement. This is the single most powerful identity in applied probability. Expected portfolio return is the weighted sum of expected asset returns — no matter how correlated the assets.
Variance of a linear combination
Var(aX + bY) = a² Var(X) + b² Var(Y) + 2ab Cov(X, Y)
Unlike expectation, variance is not linear; the covariance term is the diversification lever that drives all of portfolio theory. In matrix form for w ∈ Rⁿ: Var(wᵀr) = wᵀΣw — the quadratic form we'll see in Portfolio Theory.
Moments and the moment-generating function
The k-th raw moment is E[X^k]; the k-th central moment is E[(X - E[X])^k]. The MGF M(t) = E[e^(tX)] generates all moments by differentiation. Two distributions with identical MGFs (in a neighbourhood of 0) are identical.
- Mean (1st moment): central tendency.
- Variance (2nd central moment): spread.
- Skewness (3rd standardised moment): asymmetry. Negative skew in equity returns means crash risk.
- Kurtosis (4th standardised moment): tail weight. Normal has kurtosis 3; daily equity returns are usually 5-15 (fat-tailed).
Log returns vs simple returns
Simple return: R_t = P_t/P_{t-1} - 1. Log return: r_t = log(P_t/P_{t-1}) = log(1 + R_t). Two reasons quants prefer log returns:
- Time-additive: log return over k periods is the sum of single-period log returns. The CLT then gives approximate normality for moderate-horizon returns.
- Symmetric around zero: a +50% then -50% gives log returns +0.405 and -0.693, but simple returns +50% and -50% give a net -25%. Log returns honour the asymmetric multiplicative reality.
Log returns are not cross-sectionally additive
The log return of an equally-weighted portfolio is NOT the average of the asset log returns. r_portfolio,t = log(Σ wᵢ exp(rᵢ,t)). For small returns, log and simple are nearly identical, but at horizons longer than a month the discrepancy matters.
Exercise
Daily log returns for a stock have mean μ = 0.001 (0.1%) and standard deviation σ = 0.02 (2%). Assume i.i.d. (1) Compute annualised mean log return and annualised volatility (252 trading days). (2) What is the expected price ratio P_252 / P_0? (3) What is the median price ratio P_252 / P_0?