Random variables and expectation
Discrete probability distributions and expected value.
Random variables
A random variable X is a real-valued function defined on the sample space of a random experiment. If X takes a finite or countable set of values, it is discrete. Example: toss two coins and let X be the number of heads; X takes values 0, 1, 2.
Probability distribution
A probability distribution lists each value xᵢ of X with its probability pᵢ = P(X = xᵢ). It must satisfy:
- 0 ≤ pᵢ ≤ 1 for every i, and
- Σpᵢ = 1.
For two coins: P(X = 0) = 1/4, P(X = 1) = 1/2, P(X = 2) = 1/4.
If a distribution contains an unknown constant k, find it from Σpᵢ = 1. Example: P(X = x) = kx for x = 1, 2, 3, 4 gives k(1 + 2 + 3 + 4) = 1, so k = 1/10.
Expected value (mean)
The expectation of X is E(X) = μ = Σxᵢpᵢ. It is the long-run average value of X over many repetitions; it need not be a value X can actually take. For two coins, E(X) = 0 × 1/4 + 1 × 1/2 + 2 × 1/4 = 1.
Expectation in games and decisions
A game pays ₹10 with probability 0.2 and costs ₹2 otherwise. E(gain) = 10 × 0.2 + (−2) × 0.8 = ₹0.40 per game. A positive expectation means the game is favourable to the player in the long run.
Useful properties
- E(aX + b) = aE(X) + b.
- E(X + Y) = E(X) + E(Y).
Example: if two cards are drawn without replacement from a pack and X is the number of aces, then E(X) = 2 × 4/52 = 2/13 (each draw is an ace with probability 4/52).
Key points
- Probabilities in a distribution are non-negative and add to 1.
- E(X) = Σxp, the weighted average of the values.
- E(aX + b) = aE(X) + b.
- Expected value can be a fraction even for a count.
Common mistakes
- Forgetting to check Σp = 1 before calculating.
- Treating losses as positive values in a gain/loss problem.