Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Discrete Uniform Distribution Explorer


Modify Parameters and See Results

Equal probability for finite outcomes

Parameters

Minimum Value (a)
1

The smallest possible value in the distribution

Maximum Value (b)
6

The largest possible value in the distribution

Number of Values (n)
6

Total count of distinct values (n = b - a + 1)

Statistics

Expected Value
3.5000
Variance
2.9167
Std Deviation
1.7078
Mode
All values

Probability Calculator

Key Properties

Real-World Applications

  • Rolling a fair die (outcomes 1-6 with equal probability)
  • Drawing a random card from a deck (each card equally likely)
  • Selecting a random number from a finite set
  • Lottery number generation where each number is equally likely
  • Random assignment of participants to groups in experiments







Setting the Distribution Range

Adjust a (minimum value) using the top slider to set the lowest value in your distribution. The range spans from 0 to 30, accommodating most practical scenarios like die rolls, card draws, or random selections.

Set b (maximum value) with the bottom slider to define the upper bound. The calculator automatically ensures b > a, maintaining a valid range with at least 2 possible outcomes.

The number of possible values n = b - a + 1 displays in the parameters section. For a standard die with a = 1 and b = 6, you have n = 6 equally likely outcomes.

Understanding the Flat PMF

The PMF visualization shows perfectly flat bars - every value has identical probability 1/n. This uniform height is the defining characteristic of discrete uniform distributions and represents maximum uncertainty.

With n values in the range, each has probability 1/n. For a = 1, b = 6, each outcome {1,2,3,4,5,6} has probability 1/6 ≈ 0.1667, exactly like a fair die.

The flat PMF indicates maximum entropy - no outcome is favored over others. This makes the discrete uniform the "fairest" possible distribution for a given finite set of outcomes.

Reading the Linear CDF

The CDF displays as a perfect step function with equal-height steps. Each step adds probability 1/n, creating a linear staircase from 0 to 1 across the support.

At any value k, the CDF shows P(X ≤ k) = (k - a + 1)/n. The linearity makes probability calculations intuitive - the probability of any interval is proportional to its length.

For ranges, P(c ≤ X ≤ d) = (d - c + 1)/n. With a = 1, b = 10, the probability of landing in [3, 7] is 5/10 = 0.5, simply counting the 5 values in that range.

Computing Point Probabilities

Enter any value k in the Point Probability calculator. If k is in the range [a, b], you get 1/n. If k is outside this range, probability is 0 - the value simply cannot occur.

This constant probability applies to every outcome in the support. There's no concept of "more likely" or "less likely" outcomes - complete uniformity across all possibilities.

The calculation is trivial compared to other distributions: just check if a ≤ k ≤ b, and if so, return 1/(b-a+1). This simplicity makes discrete uniform the baseline for comparison with other distributions.

Using Cumulative Calculators

P(X ≤ k) calculator gives (k - a + 1)/n for values in the support, counting all outcomes from a to k inclusive. For k < a, probability is 0. For k ≥ b, probability is 1.

P(X ≥ k) computes (b - k + 1)/n, counting outcomes from k to b. This equals 1 - P(X ≤ k-1), using the complement rule.

The strict inequalities P(X < k) and P(X > k) differ by one outcome: P(X < k) = P(X ≤ k-1) and P(X > k) = P(X ≥ k+1). This distinction matters for discrete distributions.

Range Probability Calculations

The range calculator computes P(c ≤ X ≤ d) using the formula (d - c + 1)/n, simply counting integers in [c, d] and dividing by total outcomes.

Four boundary options:
[c, d] - Include both endpoints, count d - c + 1 values
(c, d) - Exclude both, count d - c - 1 values
[c, d) - Include c, exclude d, count d - c values
(c, d] - Exclude c, include d, count d - c values

Example: Rolling a die (a = 1, b = 6), what's P(2 ≤ X ≤ 5)? Count {2,3,4,5} = 4 values, so probability is 4/6 = 2/3.

What is the Discrete Uniform Distribution?

The discrete uniform distribution assigns equal probability to every value in a finite set. It models complete randomness across a defined range with no bias toward any particular outcome.

The distribution is defined by two parameters: the minimum value a and maximum value b. With n = b - a + 1 possible values, each has probability exactly 1/n.

Applications include fair die rolls, random card selection, lottery number generation, random assignment in experiments, and baseline probability models. For theoretical foundations, see discrete uniform distribution theory page.

Maximum Entropy Principle

Among all discrete distributions on n values, the uniform distribution has maximum entropy - it contains the least information and represents maximum uncertainty about which outcome will occur.

This principle explains why uniform distribution is the default assumption when you have no reason to favor any outcome. It's the "most random" distribution possible for a given finite set.

The entropy equals log(n), maximized among distributions on n points. When you know nothing beyond the support, maximum entropy reasoning leads to the uniform distribution.

Distribution Statistics

The mean equals (a + b)/2, the midpoint of the range. For a standard die (a = 1, b = 6), mean = 3.5, the exact center between minimum and maximum.

The variance equals (n² - 1)/12 where n = b - a + 1. Larger ranges have proportionally larger variance. For a die, variance = 35/12 ≈ 2.92.

The standard deviation √[(n² - 1)/12] measures typical deviation from the mean. Perfect symmetry around the midpoint is a key feature - the distribution is balanced on both sides.

Related Distributions and Tools

The continuous uniform distribution is the continuous analog, assigning equal density (not probability) across an interval. Both represent maximum uncertainty in their respective domains.

The discrete uniform appears as a special case of categorical distributions where all categories have equal probability. It's also a special case of binomial with n = 1 and p = 1/k for k categories.

Related Calculators:

Continuous Uniform Distribution - Equal density over intervals

Dice Roll Calculator - Specific discrete uniform applications

Random Number Generation - Uniform distribution fundamentals

Entropy and Information Theory - Maximum entropy principle