Exam PDiscreteFree to read

Discrete uniform distribution

A finite set of equally likely integer outcomes, such as one fair die.

Parameters and support

smallest value in the support
largest value in the support
Support

The formulas

p(x)
F(x)
Mean
Variance
MGF
Memory hook. The mean is the midpoint, and the variance is (n² − 1)/12 where n is the COUNT of values, not the range. A fair die has n = 6, so Var = 35/12 — not 25/12.

Where the moments come from

  1. Shift the support to with ; shifting changes the mean by a constant and leaves the variance alone.
  2. using the arithmetic-series sum.
  3. using the sum of squares.
  4. .
  5. Shifting back adds to the mean and leaves the variance unchanged.

Worked example

A fair six-sided die is rolled once. Find the variance of the number showing.

  1. The support is , so values.
  2. .
  3. As a decimal that is .

Answer: 35/12 ≈ 2.9167

The mean, variance, CDF and moment generating function above are re-derived numerically from this distribution’s own density on every test run — summed over the support for a discrete distribution, integrated by quadrature for a continuous one — and compared with the closed forms printed here. A typo on this page fails the build.

Traps

  • Using the range b − a instead of the count b − a + 1 in the variance.
  • Assuming the variance formula (n² − 1)/12 applies to a CONTINUOUS uniform — there it is (b − a)²/12.

Related

Drill this: the Exam P question bank has original questions on this distribution, and the recall trainer builds its prompts from exactly the formulas above.