Random Variables
The bridge between probability and numbers. Every statistical model speaks the language of random variables.
Not a Variable. A Function.
A random variable X maps each outcome ω in the sample space to a real number. The randomness comes from the experiment, not from X itself.
Discrete vs. Continuous
Finite / countable values
Uncountable continuum
Probability Mass Function
p(x) = P(X = x). How much probability mass sits at each point?
Probability Density Function
Probability = area under f(x). The value f(x) itself is a density, not a probability — it can exceed 1.
Cumulative Distribution Function
F(x) = P(X ≤ x). Accumulates probability up to x. Always runs from 0 to 1, never decreases.
Expected Value
E[X] is the probability-weighted average — the balancing point of the distribution. Need not be an achievable value.
Linearity of Expectation
- E[aX + b] = a·E[X] + b
- E[X + Y] = E[X] + E[Y] always — even if dependent
- No assumptions about independence needed
- Used in almost every probabilistic argument
Variance & Std. Deviation
Var(X) = E[(X − μ)²] = E[X²] − μ². Takes squared units. Standard deviation σ = √Var(X) restores original units.
LOTUS: No Rederivation Needed
E[g(X)] = ∑ g(x) p(x). Apply g to each value of X, weight by P(X = x). Variance is just LOTUS with g(x) = (x − μ)².
Every Model Is a Random Variable
- Regression: Y = f(X) + ε where ε is a random variable
- Hypothesis tests use test statistics as random variables
- Separates the model from the specific experiment
- Common toolkit for an endless variety of problems
What you learned
Random variables, PMF, PDF, CDF, expected value, linearity of expectation, variance, standard deviation, and LOTUS — the core language of probability.