The discrete uniform distribution

The discrete uniform distribution

Spec 5.4 · Edexcel International A Level Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • XX is discrete uniform on {1,2,…,n}\{1,2,\ldots,n\} when each of the nn values has probability 1n\frac1n.
  • Probabilities come from counting: P(X≤k)=knP(X\le k)=\frac kn and P(a≤X≤b)=b−a+1nP(a\le X\le b)=\frac{b-a+1}{n}.
  • E(X)=n+12E(X)=\dfrac{n+1}{2} and Var(X)=n2−112\mathrm{Var}(X)=\dfrac{n^2-1}{12}.
  • To find nn: n=2μ−1n=2\mu-1 from the mean, or n2=12σ2+1n^2=12\sigma^2+1 from the variance.
  • For values 0,1,…,n−10,1,\ldots,n-1 the mean is n−12\frac{n-1}{2} and the variance is unchanged.

The discrete uniform distribution

Each of nn values is equally likely, so every probability is 1n\frac1n. It is only valid if every outcome is really equally likely.

A discrete random variable XX has a discrete uniform distribution on {1,2,…,n}\{1,2,\ldots,n\} when each of the nn values is equally likely, so P(X=x)=1nP(X=x)=\frac1n for x=1,2,…,nx=1,2,\ldots,n.

Typical models are a fair die (n=6n=6), a fair spinner, or a number drawn at random from a list of equally likely numbers.

The model is only valid if every outcome really is equally likely.

00.050.10.15123456xP(X = x)
A fair six-sided die (n=6n=6): every bar has the same height, 16\frac16.

XX is uniform on {1,2,…,10}\{1,2,\ldots,10\}. What is P(X=7)P(X=7)?

Finding probabilities by counting

Count the favourable values and divide by nn, checking whether the inequality is strict.

Because every value has probability 1n\frac1n, probabilities are found by counting the favourable values.

Check whether the inequality is strict (>>) or not (≥\ge) before counting.

For example, P(Y>10)P(Y>10) for n=14n=14 is 414\frac{4}{14} (11, 12, 13, 14), not 514\frac{5}{14}.

00.020.040.061234567891011121314yP(Y = y)
  • Y ≤ 10
  • Y > 10
n = 14 equally likely values, each with probability 1/14. P(Y > 10) counts 11, 12, 13, 14: 4/14.
  • P(X≤k)P(X\le k)kn\dfrac kn
  • P(a≤X≤b)P(a\le X\le b)b−a+1n\dfrac{b-a+1}{n}

Worked example

A spinner is numbered 1 to 8. Find P(X≥6)P(X\ge6).

YY is uniform on {1,…,14}\{1,\ldots,14\}. What is P(Y≥10)P(Y\ge10)?

The mean and variance

The mean is the midpoint n+12\frac{n+1}{2} and the variance is n2−112\frac{n^2-1}{12}.

The mean is the midpoint of the values, because the distribution is symmetrical about it. It comes from E(X)=1n(1+2+⋯+n)=1n⋅n(n+1)2E(X)=\frac1n(1+2+\cdots+n)=\frac1n\cdot\frac{n(n+1)}{2}.

The variance comes from Var(X)=E(X2)−[E(X)]2\mathrm{Var}(X)=E(X^2)-[E(X)]^2 with E(X2)=(n+1)(2n+1)6E(X^2)=\frac{(n+1)(2n+1)}{6}.

For a fair die, E(X)=3.5E(X)=3.5 and Var(X)=3512=2.92\mathrm{Var}(X)=\frac{35}{12}=2.92 (3 s.f.), so the standard deviation is 1.711.71. The mean need not be a possible value of XX.

00.050.10.15123456xP(X = x)
Fair die: six equal bars of 1/6, symmetric about the mean E(X) = 3.5, with variance 35/12.
  • MeanE(X)=n+12E(X)=\dfrac{n+1}{2}
  • VarianceVar(X)=n2−112\mathrm{Var}(X)=\dfrac{n^2-1}{12}

Worked example

A spinner is numbered 1 to 8. Find E(X)E(X) and Var(X)\mathrm{Var}(X).

XX is uniform on {1,…,5}\{1,\ldots,5\}. What is Var(X)\mathrm{Var}(X)?

Finding n from the mean or variance

Rearrange E(X)=n+12E(X)=\frac{n+1}{2} or Var(X)=n2−112\mathrm{Var}(X)=\frac{n^2-1}{12} for nn, and check that nn is a positive integer.

If E(X)=μE(X)=\mu then n+12=μ\frac{n+1}{2}=\mu, so n=2μ−1n=2\mu-1.

If Var(X)=σ2\mathrm{Var}(X)=\sigma^2 then n2=12σ2+1n^2=12\sigma^2+1, and nn is the positive root.

Inequalities such as m2−112>14\frac{m^2-1}{12}>14 give bounds on mm; mm must be an integer.

Always check that nn is a positive integer. If it is not, the information given cannot describe a uniform distribution.

24681012142468101214161820xy(10, 5.5)(10, 8.25)meanvariance
Mean (n + 1)/2 and variance (n² − 1)/12 against n. For variance 8.25 the curve gives n = 10, where the mean is 5.5.
  • From the meann=2μ−1n=2\mu-1
  • From the variancen2=12σ2+1n^2=12\sigma^2+1

Worked example

E(Y)=7.5E(Y)=7.5 for a uniform YY on {1,…,n}\{1,\ldots,n\}. Find nn and Var(Y)\mathrm{Var}(Y).

Worked example

Var(X)=14\mathrm{Var}(X)=14. Find nn.

E(X)=10.5E(X)=10.5 for a uniform XX on {1,…,n}\{1,\ldots,n\}. What is nn?

Values that do not start at 1

For 0,1,…,n−10,1,\ldots,n-1 the shape is the same, shifted by 1, so the mean drops to n−12\frac{n-1}{2} and the variance is unchanged.

If XX takes the nn equally likely values 0,1,…,n−10,1,\ldots,n-1, the shape is the same, shifted by 1.

The mean becomes n−12\frac{n-1}{2} and the variance is unchanged at n2−112\frac{n^2-1}{12}.

For a spinner numbered 0 to 9, E(X)=4.5E(X)=4.5 and Var(X)=100−112=8.25\mathrm{Var}(X)=\frac{100-1}{12}=8.25. When in doubt, work from first principles with E(X)E(X) and E(X2)E(X^2).

To judge whether XX lies within one standard deviation of the mean, find μ±σ\mu\pm\sigma and count the values inside.

00.020.040.060.080.10123456789xP(X = x)
A spinner numbered 0 to 9: ten equal bars of 0.1, the same shape as 1 to 10 shifted down by 1. Mean 4.5, variance 8.25.

Values 1,…,n1,\ldots,n

  • Mean n+12\frac{n+1}{2}
  • Variance n2−112\frac{n^2-1}{12}

Values 0,…,n−10,\ldots,n-1

  • Mean n−12\frac{n-1}{2}
  • Variance n2−112\frac{n^2-1}{12} (unchanged)

XX is uniform on {0,1,…,9}\{0,1,\ldots,9\}. What is Var(X)\mathrm{Var}(X)?

Try an exam question

The discrete random variable XX has a discrete uniform distribution on {1,2,…,n}\{1,2,\ldots,n\} and E(X)=8.5E(X)=8.5. Find nn and Var(X)\mathrm{Var}(X).

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find P(X≥6)\mathrm{P}(X\ge6).

1 mark, marked against the mark scheme

Revision notes