Random variables
Random variable X: Numerical outcome of random experiment. Discrete: countable values (e.g., 0,1,2...). Continuous: any value in range.
Worked example
Coin flipped 3 times. Let X=number of heads. What are possible values?
Solution
- All outcomes: HHH, HHT, HTH, HTT, THH, THT, TTH, TTT
- X can be: 0 heads (TTT), 1 head (3 ways), 2 heads (3 ways), 3 heads (HHH)
- X ∈ {0,1,2,3} - discrete random variable
Final answer
Discrete RV: X ∈ {0,1,2,3}.
Probability distributions
Probability mass function (PMF): For each value x, assign probability P(X=x). All probabilities sum to 1.
Worked example
Coin 3 times, X=heads. Find P(X=0), P(X=1), P(X=2), P(X=3).
Solution
- P(X=0)=1/8 (1 way)
- P(X=1)=3/8 (3 ways)
- P(X=2)=3/8 (3 ways)
- P(X=3)=1/8 (1 way)
- Total: 1/8+3/8+3/8+1/8=1 ✓
Final answer
PMF table complete, probabilities sum to 1.
Practice with real exam questions
Answer exam-style questions and get AI feedback that shows you exactly what examiners want to see in a full-marks response.
Expected value (mean) and variance
Worked example
From coin example: find E(X) and Var(X).
Solution
- E(X)=0(1/8)+1(3/8)+2(3/8)+3(1/8)
- E(X)=0+3/8+6/8+3/8=12/8=1.5
- E(X2)=0²(1/8)+1²(3/8)+2²(3/8)+3²(1/8)=15/8
- Var(X)=15/8-1.5²=15/8-2.25=0.75
Final answer
E(X)=1.5, Var(X)=0.75, SD(X)=√0.75≈0.87.
Linear transformations
Key insight: E changes linearly. Variance: only a² matters (not b).
Worked example
E(X)=1.5, Var(X)=0.75. Find E(2X+5) and Var(2X+5).
Solution
- E(2X+5)=2E(X)+5=2(1.5)+5=8
- Var(2X+5)=2²Var(X)=4(0.75)=3
Final answer
E=8, Var=3, SD≈1.73.