Uniform Distribution: Formulas and Worked Probability Examples
Use discrete and continuous uniform formulas for probabilities, mean, variance, and percentiles. Follow six worked examples.
TL;DR
A uniform distribution gives equal probability to equal-sized choices. In the discrete case, each outcome has probability . In the continuous case, divide the interval length you want by the total interval length.
Key Points
- A discrete uniform model assigns equal mass to each possible outcome.
- A continuous uniform model on has constant density for .
- The continuous uniform mean is , and its variance is .
- For a continuous model, the probability of any exact point is zero.
- Find interval probabilities using only the part of the requested interval inside the model’s support.
What is a uniform distribution?
A uniform distribution spreads probability evenly over its possible outcomes. If outcomes are separate, like the faces of a fair die, each outcome receives equal probability. If a value can be anywhere in a continuous interval, equal-length pieces of the interval receive equal probability. OpenStax’s statistics chapter uses a rectangle to illustrate the continuous case.
The support is the set of possible values. The same word uniform describes a finite equally likely list and a continuous interval, but the probability calculations are different.
| Model | Example | Probability rule |
|---|---|---|
| Discrete uniform | A fair die with six faces | Count the favorable outcomes and divide by 6. |
| Continuous uniform | A model for a moment selected uniformly from a 10-minute interval | Divide the length of the desired portion by 10 minutes. |
How do you find discrete uniform probabilities?
For equally likely outcomes, a particular outcome has probability . If an event contains of them, its probability is . MIT’s random-variables notes distinguish probability mass for countable outcomes from probability density for a continuous variable.
If the possible values are consecutive integers from to , there are values. The count includes both ends. The probability mass function is
and zero for other values. The mean is and the variance is . The variance formula applies to the consecutive-integer case. For an equally likely set such as , calculate the mean and squared deviations from those actual values. The variance guide explains that calculation.
What are the continuous uniform PDF, CDF, mean, and variance?
Write for a continuous uniform variable with . Its probability density function, or PDF, has constant height between the endpoints. A rectangle with base and that height has total area 1.
The cumulative distribution function, or CDF, gives . Between and , the rectangle under the density from to has width .
NIST’s engineering statistics handbook lists the density, cumulative function, and percent point function. Its continuous uniform center is the midpoint. The variance is the average squared distance from that midpoint.
For a brief derivation, center the interval at 0 with half-width . Its average squared distance is , which equals .
How do you calculate an interval probability or a percentile?
For an interval contained in , divide its length by the support width.
If an endpoint falls outside the support, intersect the requested interval with first. If there is no overlap, the probability is zero. In a continuous model the endpoint itself contributes zero probability, so the answer does not change when you swap for .
For a percentile with probability between 0 and 1, solve to get . This is also how you map a standard uniform value on to any interval. The Naval Postgraduate School and TU Delft use continuous uniform examples to work with densities and interval widths.
Examples of Uniform Distribution Formulas
Example 1
A fair spinner has eight equally likely numbered regions from 1 through 8. Find the chance of a result of at least 6.
- The qualifying outcomes are 6, 7, and 8.
- They are three of the eight equally likely outcomes.
- The probability is . Counting misses one endpoint for this discrete question.
Example 2
Let . Find and .
- The support width is .
- The first interval has length , so its probability is .
- The single point 6 has zero width, so .
Example 3
Let . Find .
- Values below are outside the support.
- The overlapping interval is , of length 3.
- Divide by the total width . The probability is .
Example 4
Find the mean, variance, and standard deviation for .
- The midpoint is .
- The variance is .
- The standard deviation is .
Example 5
Find the 90th percentile for .
- Set .
- Move across 90% of the interval width: .
- Check that .
Example 6
Let . Given that , find the probability that .
- The condition restricts the possible values to the six units from 6 to 12.
- Values above 9 cover the three units from 9 to 12.
- The conditional probability is .
What mistakes change the answer?
Mistake 1: Reporting density as a probability
For a uniform variable between 0 and 0.5, the density is 2. A density can exceed 1. The probability from 0 to 0.1 is , because probability comes from the area under the density.
Mistake 2: Treating a list of integers as a continuous interval
There are six equally likely faces on a standard fair die, even though . In a discrete model count the endpoints. In a continuous model use the length between them.
Mistake 3: Assuming every bounded variable is uniform
A wait time bounded by 10 minutes can still cluster near zero or near ten. Uniformity requires a reason for equal-length intervals to be equally likely. For a clock with a strict 10-minute schedule, the assumption may fit an independent arrival with random phase. Arrivals timed to the schedule would give a different distribution.
Try It Yourself
- Find for a continuous uniform distribution on .
- Find the median of a continuous uniform distribution on .
- A fair random choice selects an integer from 3 through 9. What is the chance of selecting 6 or 7?
Answers and Reasoning
- The interval width is 3 and the total width is 10, so the probability is .
- The midpoint is . Each side has half the total probability.
- There are seven choices and two qualifying values, so the answer is .
Questions About the Uniform Distribution
Is a uniform distribution the same as a normal distribution?
A continuous uniform density is flat over a finite interval. A normal density is bell-shaped and extends indefinitely in both directions. The normal distribution lesson explains how its spread and probabilities differ.
What is a standard uniform distribution?
It is the continuous uniform distribution on . Its density is 1 on the interval, and for .
What happens if ?
The ordinary continuous uniform formula requires . Equal endpoints describe a constant value, with probability 1 concentrated at that single point.
Conclusion
- Count outcomes for a discrete uniform model and measure widths for a continuous one.
- Use the support to limit the interval before calculating its probability.
- Use the midpoint and the width to calculate continuous mean and spread.
Read More
Research Behind This Article
- OpenStax, Statistics: The Uniform Distribution. OpenStax
- Massachusetts Institute of Technology, Random Variables in a Nutshell. MIT OpenCourseWare
- NIST/SEMATECH, Engineering Statistics Handbook: Uniform Distribution. NIST
- Naval Postgraduate School, Introduction to Statistics and Data Science: Continuous Random Variables. NPS
- TU Delft, Probability and Statistics Applications for Civil Engineers: Uniform Distribution. TU Delft