Click or press any key to close help Help screen describing the interactive elements

The discrete uniform distribution gives each of the integer values N₀, N₀ + 1, ..., N₁ the same probability of success. Since the probabilities of all the outcomes must add up to 1, the probability of each outcome is 1/(N₁ - N₀ + 1).

Parameter Range Description
N₀ ..., N₁ - 1, N Lower bound of outcomes
N₁ N₀, N₀ + 1, ... Upper bound of outcomes

Probability Mass Function

P ( X = x | N 0 , N 1 ) = 1 N 1 N 0 + 1

Support

x = N 0 , , N 1

Mean

Variance

Example N₀ N₁
A fair six-sided die is thrown. Let X be the number of dots showing. 1 6
A card is chosen at random from a standard 52 card deck. Let X = 1 if a heart is chosen, 2 if a club, 3 if a diamond, and 4 if a spade. 1 4
In the Powerball lottery, there are 26 red Powerballs numbered from 1 to 26. Let X be the number of the red Powerball in a single draw. 1 26

X ~ Discrete Uniform(N₀, N₁)

Chart of the discrete uniform distribution Chart area for displaying the discrete uniform pmf, cdf, visualization, and simulation

E(X) = , Var(X) =

The discrete uniform distribution arises naturally when we have a finite number of possible outcomes and no reason to assume that any one outcome is more likely than any other.

The illustration above shows an integer X chosen randomly from the set {N₀, …, N₁}, where each integer has the same probability of being chosen.

The simulation above shows a number U chosen randomly from the interval [N₀ - 0.5, N₁ + 0.5]. The light blue line shows U rounded to the nearest integer, which has a discrete uniform(N₀, N₁) distribution. The histogram accumulates the results of each simulation.

Y = Discrete Uniform(0, 1) ~ Bernoulli(0.5)

Chart of the related distribution Chart area for displaying the related pdf, cdf, visualization, and simulation

E(Y) = , Var(Y) =