In a uniform distribution every value in a range is equally likely. The continuous version covers any real number between a and b (like a random arrival time within an hour); the discrete version covers whole numbers (like a die roll).
Continuous: P(c ≤ X ≤ d) = (d − c) ÷ (b − a), mean = (a + b)/2, variance = (b − a)²/12
Examples
- A bus arrives every 10 minutes and you turn up at a random time. Your wait is uniform on 0–10, so P(wait < 3) = 0.3 and the mean wait is 5 minutes.
- A fair die is discrete uniform on 1–6, so P(X ≥ 5) = 2/6, the mean is 3.5 and the variance is 35/12 = 2.92.