AI Glossary / Data science and analytics / Beginner
Discrete Uniform Distribution
Definition
A discrete uniform distribution assigns equal probability to each value in a specified finite set of possible outcomes. If there are n outcomes, each has probability 1/n. A common version uses consecutive integers, such as 1 through 6 for an ideal fair die. Equal likelihood is an assumption about the generating process, not a consequence of merely listing several possible values.
What it means
Discrete means the outcomes can be listed separately; uniform means their individual probabilities are equal. The support is the set of values that can occur. For consecutive integers from a through b inclusive, there are b minus a plus one possible values. Stating the support precisely avoids mistakes at the endpoints. A software function may instead use an excluded upper endpoint, so its parameters need not match the way a textbook writes the same distribution.
How it works
To calculate the probability of an event, count how many supported outcomes satisfy it and divide by the total number of equally likely outcomes. For numerical outcomes, the expected value is their probability-weighted average; equal probabilities make this their ordinary average. Repeated draws require a separate statement about dependence and replacement. The fact that each draw has a uniform distribution does not, by itself, imply that successive draws are independent. A practical simulation should document both the single-draw distribution and the mechanism connecting draws.
Three practical examples
- Teaching simulation: a program models an ideal fair six-sided die so learners can compare theoretical and observed frequencies.
- Random assignment prototype: a system chooses one of several equally eligible options using a properly implemented uniform selection mechanism.
- Scenario exercise: an analyst explores equally weighted integer scenarios as a stated modeling assumption and compares the results with more realistic nonuniform alternatives.
Think of it this way
Think of drawing one ticket from a well-mixed container where each eligible option has exactly one identical ticket. That makes equal chances plausible under the idealized draw. The analogy breaks if some options have more tickets, tickets differ in accessibility, or the mixing process is biased. It also does not tell you what happens to the ticket before the next draw.
Worked example
Suppose X is uniform over the integers 2, 3, 4, 5, and 6. There are five outcomes, so P(X = 4) = 1/5 = 20%. The event X at least 5 contains two outcomes, 5 and 6, giving probability 2/5 = 40%. The expected value is (2 + 3 + 4 + 5 + 6)/5 = 4.
Now make two independent draws with replacement. The probability both equal 6 is 1/5 times 1/5 = 1/25 = 4%. If instead tickets are drawn without replacement from the five-ticket set, drawing 6 twice is impossible. Each position in the draw order can still have the same marginal chance of being 6, but the two draws are dependent. This distinction matters in simulations and assignment systems. Finally, a function whose upper endpoint is excluded would need an upper bound of 7 to represent the integer set 2 through 6; always check the documented convention.
Illustrative case study
In a fictional training platform, five exercise variants are intended to be equally likely. A developer selects an integer from a documented half-open range but uses an upper bound that excludes the fifth variant. The team compares the actual support with the intended list and corrects the boundary specification. It then tests the selection behavior across many draws while recognizing that a uniform process will not produce exactly equal counts in every short run. The scenario illustrates endpoint definitions and validation, not a guarantee that a short frequency test proves a generator is correct.
Common misconceptions and mistakes
Uniform does not mean outcomes appear in a repeating cycle or occur equally often in every sample. A fair die can repeat the same value several times. Knowing only a minimum and maximum does not establish equal probabilities for the values between them. The average can be a value that no single draw can produce, such as 3.5 for integers 1 through 6. A discrete uniform distribution differs from a continuous uniform distribution: an individual supported discrete value can have positive probability, whereas a single exact point under a continuous uniform model has probability zero.
Business use
Businesses can use uniform selection when options genuinely should receive equal chances or when a transparent scenario assumption is useful. Confirm eligibility before selection so unintended duplicates do not give an option extra weight. Document whether draws are independent and whether an option can be selected again. For simulations of real demand or behavior, compare the equal-probability assumption with evidence instead of treating uniformity as a default description of uncertainty. Reporting should distinguish the model's theoretical probabilities from observed frequencies in one finite run.
People also ask
Can the outcomes be labels rather than consecutive integers?
Equal probability can be assigned to a finite collection of labels; numerical formulas such as a mean require meaningful numerical values.
Must a sample contain equal counts of every outcome?
No. Equal probabilities allow random variation in finite samples.
Does uniform imply independence?
No. Uniformity describes individual outcome probabilities; independence describes relationships between draws.
Check your understanding
X is uniform on integers 2 through 6 inclusive. Is P(X at least 5) equal to one half?
Answer: No. Two of the five equally likely values satisfy the condition, so the probability is 2/5, or 40%. Count endpoints explicitly.
Related terms
- Probability mass function (pmf)
- Sample space
- Expected value
- Independence
- Sampling with replacement
- Continuous Uniform Distribution
- Probability mass function
- support
- random number generation
Learn next
List the support of several finite distributions and calculate event probabilities by counting. Then compare replacement and nonreplacement draws. Learn expected value and variance next, and inspect a random-number library's endpoint convention before using it in a simulation.
More in Data science and analytics
- Dimensionality reduction - Dimensionality reduction represents data using fewer features or coordinates than the original representation.
- Directional-change intrinsic time - Directional-change intrinsic time is an event-based way to represent a time series in which the clock advances when an observed value reverses from a...
- Directional component analysis - Directional component analysis, or DCA, is a statistical method for deriving patterns of variability that reflect a chosen linear impact measure as well as...
- Discrete variable - A discrete variable takes values from a finite or countably infinite set of distinct possibilities.
- DOACROSS parallelism - DOACROSS parallelism executes work from different loop iterations concurrently while preserving required dependencies between those iterations.
- DOE mean plot - A DOE mean plot shows the average response at each level of factors in a designed experiment. DOE stands for design of experiments.
Sources
Oracle Crystal Ball, discrete uniform distribution: https://docs.oracle.com/cd/E52437_01/en/crystal_ball_users_guide/discrete_uniform_distribution.htm . SciPy, discrete uniform integer distribution reference: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.randint.html . NumPy, integer-generator endpoint convention: https://numpy.org/doc/stable/reference/random/generated/numpy.random.randint.html . Primary documentation excerpts were consulted. Calculations and scenarios are original illustrations; editorial review remains pending.
Previous: Discrete-time proportional hazards Next: Discrete variable