Is Uniform Distribution Discrete or Continuous?

A uniform distribution can be either discrete or continuous. Both versions exist in statistics, and they share the same core idea: every outcome is equally likely. The difference comes down to what kind of outcomes you’re working with. If the outcomes are countable, distinct values (like the faces of a die), it’s a discrete uniform distribution. If the outcomes fall anywhere along a continuous range (like a random point between 0 and 1), it’s a continuous uniform distribution.

What Both Versions Have in Common

The defining feature of any uniform distribution is equal probability. No outcome is favored over any other. Roll a fair six-sided die, and each face has exactly a 1-in-6 chance. Pick a random real number between 0 and 10, and any sub-interval of the same length has the same probability of containing your number. That “flatness” is what makes a distribution uniform, regardless of whether it’s discrete or continuous.

The Discrete Uniform Distribution

A discrete uniform distribution applies when there’s a finite number of specific outcomes, each equally likely. The classic example is rolling a fair die: there are exactly six outcomes, and each one has a probability of 1/6. Tossing a fair coin and using a random number generator that picks whole numbers from a set are other common examples.

The probability of any single outcome is simply 1 divided by the total number of outcomes (1/N). If you have 10 equally likely outcomes, each one has a 10% chance. The average (mean) of a discrete uniform distribution running from 1 to N lands at (N + 1) / 2, which is just the midpoint of the range. For a standard die, that’s (6 + 1) / 2 = 3.5.

When you graph a discrete uniform distribution, it looks like a row of bars or spikes, all the same height. Each bar sits on one of the possible values. There’s nothing between the bars because outcomes between those values don’t exist.

The Continuous Uniform Distribution

A continuous uniform distribution applies when outcomes can be any value within an interval, not just whole numbers or specific points. Think of waiting for a bus that arrives every 15 minutes at a random time. Your wait could be 3.7 minutes, 8.214 minutes, or any value between 0 and 15. Every sub-interval of equal length is equally probable.

Computer-generated random numbers are one of the most common real-world uses. Most algorithms produce pseudo-random numbers uniformly distributed between 0 and 1, meaning any value in that range is equally likely to appear.

Instead of a probability for each individual value, a continuous uniform distribution uses a probability density function (PDF). For a distribution spread across the interval from a to b, the PDF is a flat horizontal line at a height of 1/(b − a). The graph looks like a rectangle, which is why it’s sometimes called the “rectangular distribution.” To find the probability that a value falls within a specific range, you calculate the length of that range divided by the total interval. If your bus wait is uniform between 0 and 15 minutes, the probability you wait between 5 and 10 minutes is (10 − 5) / (15 − 0) = 1/3.

The mean of a continuous uniform distribution is (a + b) / 2, the midpoint of the interval. The variance is (b − a)² / 12, which reflects how spread out the values are.

How to Tell Which One You’re Dealing With

The deciding factor is the nature of your variable. Ask yourself: can the outcome take on any value in a range, or is it restricted to specific, countable values?

  • Discrete: outcomes you can list and count. Dice rolls (1, 2, 3, 4, 5, 6), lottery ball numbers, or randomly picking a day of the week.
  • Continuous: outcomes along a smooth, unbroken range. Arrival times, randomly generated decimals, or the exact position of a spinner on a wheel.

If you graphed the cumulative distribution function (CDF) for each, the difference is visually obvious. A discrete uniform CDF climbs in stair steps, jumping at each possible value and staying flat between them. A continuous uniform CDF is a smooth, straight diagonal line that rises steadily from 0 to 1 across the interval.

A Key Difference in How Probability Works

In a discrete uniform distribution, you can ask “what is the probability of getting exactly this value?” and get a meaningful, nonzero answer. The probability of rolling exactly a 4 on a fair die is 1/6.

In a continuous uniform distribution, the probability of landing on any single exact value is technically zero. That’s because there are infinitely many possible values in any interval. Instead, probability only makes sense for ranges. You can ask “what’s the probability the value falls between 2.5 and 3.5?” but not “what’s the probability the value is exactly 3.0?” This isn’t unique to the uniform distribution; it’s true of all continuous distributions. It’s why continuous distributions use density functions rather than assigning probabilities to individual points.

This distinction matters in practice. If you’re modeling something with a fixed set of equally likely outcomes, use the discrete version. If you’re modeling something where the variable can take any value in a range and no single point is special, the continuous version is the right tool.