Discrete random variables: probability distributions, expectation, variance
Probability & Statistics 1 (S1) – Discrete Random Variables 🎲
1. Probability Distributions
A probability distribution tells you how likely each possible outcome of a random variable is. For a discrete random variable \(X\) we write:
\(P(X = x_i) = p_i\) with \(\sum_{i} p_i = 1\)
Think of a bag of marbles: each colour represents an outcome, and the fraction of marbles of that colour is the probability of drawing that colour. 🎨
2. Example – Rolling a Fair Die
| Outcome \(x_i\) | Probability \(p_i\) |
|---|---|
| 1 | $\frac{1}{6}$ |
| 2 | $\frac{1}{6}$ |
| 3 | $\frac{1}{6}$ |
| 4 | $\frac{1}{6}$ |
| 5 | $\frac{1}{6}$ |
| 6 | $\frac{1}{6}$ |
3. Expectation (Mean) – The “Average Result”
The expectation \(E(X)\) is the weighted average of all possible outcomes, weighted by their probabilities. It tells you the long‑run average if you repeat the experiment many times.
\(E(X) = \sum_{i} x_i p_i\)
Example (Die): \(E(X) = 1\cdot\frac16 + 2\cdot\frac16 + \dots + 6\cdot\frac16 = 3.5\). So if you roll a die many times, the average of all rolls will be about 3.5. 📊
4. Variance – How Spread Out Are the Outcomes?
Variance measures the average squared deviation from the mean. A larger variance means outcomes are more spread out.
\(Var(X) = E[(X - E(X))^2] = \sum_{i} (x_i - \mu)^2 p_i\) where \(\mu = E(X)\)
Example (Die): \(\mu = 3.5\). \(Var(X) = \frac{1}{6}\big[(1-3.5)^2 + (2-3.5)^2 + \dots + (6-3.5)^2\big] = 2.9167\). The standard deviation is \(\sqrt{Var(X)} \approx 1.71\). So most rolls are within about 1.7 points of the average. 📈
5. Common Discrete Distributions
- Binomial: \(X \sim \text{Bin}(n,p)\) – number of successes in \(n\) independent trials with success probability \(p\).
- Poisson: \(X \sim \text{Pois}(\lambda)\) – number of events in a fixed interval when events occur independently at rate \(\lambda\).
- Geometric: \(X \sim \text{Geom}(p)\) – number of trials until the first success.
6. Quick Formula Sheet
| Distribution | Mean \(E(X)\) | Variance \(Var(X)\) |
|---|---|---|
| Binomial \(n,p\) | \(np\) | \(np(1-p)\) |
| Poisson \(\lambda\) | \(\lambda\) | \(\lambda\) |
| Geometric \(p\) | \(\frac{1}{p}\) | \(\frac{1-p}{p^2}\) |
7. Practice Problems
- For a fair six‑sided die, calculate the probability that the roll is an even number.
- Suppose a student flips a fair coin 5 times. What is the probability of getting exactly 3 heads? (Use the binomial distribution.)
- Let \(X\) be the number of cars passing a checkpoint in an hour, modelled by \(X \sim \text{Pois}(4)\). Find \(E(X)\) and \(Var(X)\).
- In a game, you win \$10 if you roll a 6 on a die, otherwise you lose \$2. Define a random variable for your net gain and compute its expectation.
- Show that for a binomial random variable \(X\), the variance can be derived from the definition \(Var(X)=E[X^2]-E[X]^2\).
8. Key Take‑Away Messages
- A probability distribution is like a recipe that tells you how often each outcome appears.
- Expectation is the “average” you would get if you repeated the experiment many times.
- Variance tells you how much the outcomes vary from that average.
- Remember the formulas: \(E(X)=\sum x_ip_i\) and \(Var(X)=\sum (x_i-\mu)^2p_i\).
- Use the quick formula sheet for common distributions to save time during exams.
Revision
Log in to practice.