Random Variables
Definition
A random variable $X$ is a function that maps outcomes from a sample space $\Omega$ to real numbers:
Discrete random variable: takes countable values (e.g., number of heads, word counts).
Continuous random variable: takes uncountable values in an interval (e.g., height, time).
Probability Mass Function (PMF)
For discrete random variables:
Properties:
- $0 \leq p(x) \leq 1$
- $\sum_x p(x) = 1$
- $P(X \in A) = \sum_{x \in A} p(x)$
Probability Density Function (PDF)
For continuous random variables:
The probability over an interval:
Important: $P(X = x) = 0$ for continuous variables (probability at a point is zero).
Cumulative Distribution Function (CDF)
The CDF gives the probability that $X$ is less than or equal to $x$:
For discrete variables:
For continuous variables:
Properties:
- $F(x)$ is non-decreasing
- $\lim_{x \to -\infty} F(x) = 0$, $\lim_{x \to \infty} F(x) = 1$
- $P(a < X \leq b) = F(b) - F(a)$
- PDF is the derivative: $f(x) = \frac{d}{dx} F(x)$
Survival Function
Complement of the CDF:
Used in reliability analysis and survival analysis.
Quantiles and Percentiles
The $p$-th quantile (or $100p$-th percentile) is the value $x_p$ such that:
Special quantiles:
- Median: $x_{0.5}$ (50th percentile)
- Quartiles: $x_{0.25}, x_{0.5}, x_{0.75}$ (25th, 50th, 75th percentiles)
- Interquartile range (IQR): $x_{0.75} - x_{0.25}$
Indicator Random Variables
For an event $A$, the indicator variable:
Useful for converting events into numeric quantities for expectation calculations.
Transformations of Random Variables
If $Y = g(X)$, the distribution of $Y$ can be derived from $X$.
For monotonic $g$:
The term $\lvert \frac{d}{dy} g^{-1}(y) \rvert$ is the Jacobian of the transformation.
Joint Distributions
For two random variables $X$ and $Y$:
Joint PMF/PDF: $p(x, y) = P(X = x, Y = y)$ or $f(x, y)$
Marginal distribution:
Conditional Distributions
Conditional PMF/PDF:
Independent Random Variables
$X$ and $Y$ are independent if:
Equivalently: $p(y \mid x) = p_Y(y)$ (knowing $X$ gives no information about $Y$).