Random variables
A random variable X assigns a number to each outcome of a chance process.
- X = number of heads in 3 coin flips
- X = sum of two dice
- X = height of a randomly chosen student
Probability distributions
A probability distribution gives the probability of each value.
Example: X = number of heads in 3 flips.
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(X = x) | 1/8 | 3/8 | 3/8 | 1/8 |
Rules:
- Every probability is between 0 and 1.
- The probabilities add to 1.
Discrete vs continuous
| Discrete | Continuous |
|---|---|
| countable values | any value in an interval |
| number of goals, dice sums | heights, times, temperatures |
| shown with a table or bar graph | shown with a smooth curve; area = probability |
For a continuous variable, P(X = exactly 170.000… cm) is 0; we find probabilities for ranges.
Common distributions
| Distribution | Type | Example |
|---|---|---|
| Uniform distribution | discrete or continuous | rolling a fair die |
| Binomial | discrete | number of successes in n trials |
| Geometric | discrete | trials until the first success |
| Normal | continuous | heights, measurement errors |
Uniform distribution
All outcomes equally likely. For a fair die, P(X = k) = 1/6 for k = 1, …, 6.
Expected value and spread
Expected value: E(X) = Σ x × P(x)
From the coin example: E(X) = 0(1/8) + 1(3/8) + 2(3/8) + 3(1/8) = 12/8 = 1.5
Variance: Σ (x − μ)² P(x); standard deviation is its square root.
Graphing
Discrete distributions: bar graphs (probability histograms). Continuous: density curves where the area under the curve over an interval gives the probability.
Building a distribution
Example: Sum of two dice.
| Sum | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Ways | 1 | 2 | 3 | 4 | 5 | 6 | 5 | 4 | 3 | 2 | 1 |
P(sum = k) = ways/36. The distribution is symmetric, peaking at 7.
Worked examples
Example 1: Is P = {0.2, 0.5, 0.4} a valid distribution? Sum = 1.1 → no.
Example 2: Find the missing value: P = {0.1, 0.3, ?, 0.25}. 0.35.
Example 3: Is "time to run 100 m" discrete or continuous? Continuous.
Common mistakes
- Probabilities not adding to 1.
- Treating continuous variables like discrete ones.
- Confusing the most likely value with the expected value.
Try it yourself
- A spinner gives 1, 2 or 3 with probabilities 0.5, 0.3, 0.2. Expected value?
- P(sum of two dice = 9)?
- Is the number of cars in a parking lot discrete or continuous?
- X takes values 0, 1, 2 with P(0) = 0.25, P(1) = 0.5. P(2)?
Answers: 1) 1.7 2) 4/36 = 1/9 3) discrete 4) 0.25
Quick recap
- A random variable gets its value from chance.
- A probability distribution lists probabilities that add to 1.
- Discrete vs continuous; expected value = Σ x P(x).