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
Where the moments come from
- Shift the support to with ; shifting changes the mean by a constant and leaves the variance alone.
- using the arithmetic-series sum.
- using the sum of squares.
- .
- 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.
- The support is , so values.
- .
- 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 that test run.
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.
1 solved sample question
From the free samples in the question bank, solved in full. They never rotate and they are never gated.
- Exam PRandom variables and distribution functionsExam levelA random variable is uniform on the integers 1 through 20. Find .
Solution
- Each of the 20 integers has probability .
- 'Greater than 14' means the values 15 through 20 - six of them.
- .
- . Counting carefully matters: 'at least 14' would give seven values and 0.35.
Trap. Including 14 itself and answering 0.35.
Drill this topic: Discrete distributions has 32 questions, 2 of them solved free on that page, and the full question bank has 400. The drills are part of Premium. Every free sample and today’s mixed round stay free.
Related
The recall trainer builds its prompts from exactly the formulas above.