Random Variables

Random variables attach numbers to uncertain outcomes. Learn discrete and continuous random variables, PMF, PDF and CDF, expectation, variance and standard deviation, moments, linear transformations, and sums of independent variables.

The number of defects in a batch, the lifetime of a bearing, the noise voltage on a line and the load on a bridge are random variables. Their distributions summarise everything we know about their uncertainty.

An analogy

A random variable is like a weighted die: the distribution tells you how heavily each outcome is weighted.

Discrete vs continuous

Discrete: countable values with probabilities (PMF sums to 1). Continuous: probabilities are areas under a density (PDF integrates to 1); P(X = exact value) = 0.

Mean and spread

The mean is the long-run average; standard deviation measures typical deviation in the same units. Coefficient of variation σ/μ compares variability across scales.

Combining variables

Means always add. Variances add for independent variables — the basis of tolerance stack-up by RSS: σ_total = √(Σσᵢ²).

Moments and beyond

Skewness (third moment) and kurtosis (fourth) describe shape. Covariance and correlation describe dependence; the central limit theorem explains why sums tend to be normal.

Formulas

Worked example: Discrete mean and variance

Given: Defects per board: 0 (p 0.6), 1 (0.3), 2 (0.1)

Find: E[X], Var X.

Answer: μ = 0.5, σ = 0.67

Worked example: Tolerance stack

Given: Three parts, each σ = 0.02 mm, independent

Find: σ of total length.

Answer: 0.035 mm (not 0.06 mm worst case)

Common mistakes

Applications

Key takeaways

Going further