Uniform Distribution | Formula, Definition and Examples
A Uniform Distribution is a type of probability distribution in which every outcome in a given range is equally likely to occur. That means there is no bias—no outcome is more likely than another within the specified set.
- It is also known as rectangular distribution (continuous uniform distribution).
- It has two parameters a and b: a = minimum and b = maximum. The distribution is written as U (a, b).

For example: Rolling a fair six-sided die.
- Each number (1, 2, 3, 4, 5, or 6) has an equal chance of being rolled, with a probability of
\frac{1}{6} for each outcome.
Table of Content
Graph of Uniform Distribution
Rolling a Fair Die ( Discrete Uniform distribution)
- When rolling a fair six-sided die, each face (1, 2, 3, 4, 5, 6) has an equal probability of 1/6 of landing face up.
- This is a classic example of a discrete uniform distribution.
Graph: Probability Mass Function (PMF) of Rolling a Fair Die

The graph for this example will show each possible outcome (1 through 6) on the x-axis and the probability (1/6) on the y-axis.
Random Number Generation (Continuous Uniform Distribution)
Suppose a random number generator is programmed to produce a real number between 0 and 1, with each number in this range being equally likely. This is an example of a continuous uniform distribution.
Graph: Probability Density Function (PDF) of Random Number Generation

The graph will show the range [0, 1] on the x-axis, with a constant probability density of 1 across this interval.
Uniform Distribution Formula
A random variable X is said to be uniformly distributed over the interval -∞ < a < b < ∞. Formulae for uniform distribution:
Probability density function(pdf) | f(x) = 1/( b - a), a ≤ x ≤ b |
---|---|
Mean(μ) | = (a + b)/2 |
Variance (σ2 ) | = μ2' - μ2 = = (b - a)2 /12 |
Standard Deviation (σ) | |
Cumulative Distribution function (CDF) | = (x - a)/(b - a) for x ∈ [a , b] |
Median | = (a + b)/2 |
For the conditional probability = P( c < x < d ) | = (d - c ) × f(x) |
Types of Uniform Distribution
Types of uniform distribution are:
Discrete Uniform Distribution
- Applies to finite and countable outcomes.
- Each possible value of the random variable has an equal probability.
- Example: Rolling a fair die (each number from 1 to 6 has an equal chance: 1/6).
Continuous Uniform Distribution
- This applies when outcomes can take on any value within a continuous interval [a, b].
- All values within this range are equally likely, but since there are infinitely many values, we use a probability density function (PDF) instead of direct probabilities.
- Example: Choosing a random number between 0 and 1.
Let's discuss these types in detail as follows.
Continuous Uniform Distributions or Rectangular Distributions
Continuous uniform distributions, also known as rectangular distributions, are probability distributions where the probability density function (PDF) is constant within a certain interval and zero elsewhere. This means that all outcomes within the interval are equally likely.
Continuous uniform distributions provide a simple yet powerful framework for understanding and modeling randomness within defined intervals, making them essential tools in probability theory and applied statistics.
Probability Density Function (PDF)
The probability density function (PDF) of a continuous uniform distribution defines the probability of a random variable falling within a particular interval. For a continuous uniform distribution over the interval [a, b], the PDF is given by:
f(x) = 1 / (b - a) for a ≤ x ≤ b
and f(x) = 0 otherwise.
The height of the PDF is constant between a and b, indicating that every value within the interval is equally likely. The total area under the curve (which represents the total probability) is 1.
Cumulative Distribution Function (CDF)
The cumulative distribution function (CDF) of a continuous uniform distribution gives the probability that a random variable is less than or equal to a certain value. For the continuous uniform distribution over [a, b], the CDF is defined as:
F(x) = (x - a) / (b - a) for a ≤ x ≤ b
and F(x) = 0 for x < a, F(x) = 1 for x > b.
- For values less than a: the probability is 0.
- For values greater than b, the probability is 1.
- For values within the interval [a,b][a, b][a,b]: probability increases linearly from 0 to 1.
This function is a rising straight line between aaa and bbb, showing how probability accumulates across the interval.
Generating Functions
Generating functions provide a way to represent sequences of numbers as power series. In probability theory, generating functions are often used to manipulate sequences of random variables. They can simplify calculations and help derive important properties of random variables and distributions.
Standard Uniform Distribution
The standard uniform distribution is a special case of the continuous uniform distribution where the interval is [0, 1]. It is widely used in simulations, random number generation, and various statistical applications.
Properties of Continuous Uniform Distributions
- Equal probability density within the interval.
- Cumulative distribution function increases linearly within the interval.
- The mean of a continuous uniform distribution is the midpoint of the interval.
- The variance of a continuous uniform distribution is [(b - a)2] / 12.
Applications of Continuous Uniform Distributions
- Modeling uncertainty in various fields such as engineering, finance, and physics.
- Random number generation for simulations and games.
- Used in statistical quality control to model uniformity in manufacturing processes.
- In cryptography generate keys and create random permutations.
- As a baseline distribution for comparison with other distributions in statistical analysis.
Discrete Uniform Distribution
Discrete uniform distribution is a probability distribution that describes the likelihood of outcomes when each outcome in a finite set is equally likely. It's characterized by a constant probability mass function (PMF) over a finite range of values.
The discrete uniform distribution serves as a fundamental model in probability theory and statistics, providing a simple yet effective way to describe uncertainty in situations where outcomes are equally likely. Its properties and applications extend across various disciplines, making it a versatile tool in data analysis and decision-making processes.
Estimation of Maximum
In statistics, the estimation of the maximum refers to methods used to estimate the largest value or the maximum observation in a dataset. Techniques such as order statistics and maximum likelihood estimation are commonly employed for this purpose.
Random Permutation
A random permutation is a random arrangement of a set of items or elements. It's often used in various fields such as cryptography, statistics, and computer science. Generating random permutations is essential in algorithms, simulations, and experimental designs.
Properties of Discrete Uniform Distribution
- Each outcome in the sample space has an equal probability of occurrence.
- The probability mass function (PMF) is constant over the range of possible outcomes.
- The mean of a discrete uniform distribution is the average of the minimum and maximum values.
- The variance of a discrete uniform distribution is [(n^2 - 1) / 12], where n is the number of possible outcomes.
Applications of Discrete Uniform Distribution
- Rolling fair dice or flipping fair coins, where each outcome has an equal probability.
- Modeling scenarios where there is no preference or bias towards any particular outcome.
- Sampling without replacement, such as selecting random samples from a finite population.
- Generating random numbers for simulations, Monte Carlo methods, and randomized algorithms.
- Creating random permutations for shuffling decks of cards, designing experiments, and cryptographic applications.
Difference between Discrete and Continuous Uniform Distribution
The following table shows the difference between Continuous and Discrete Uniform Distribution:
Aspect | Discrete Uniform Distribution | Continuous Uniform Distribution |
---|---|---|
Outcomes | Finite or countable number of possible outcomes | An infinite number of possible outcomes within a continuous interval |
Probability | Each outcome has a specific, equal probability of occurring | The probability density is constant across the interval, but the probability of any specific single outcome is 0 |
Examples | - Rolling a fair die (6 possible outcomes) - Drawing a card from a deck (52 possible outcomes) | - Generating a random number between 0 and 1 - Time of arrival at a bus stop (between 0 and 10 minutes) |
Graph | Probability Mass Function (PMF) with individual bars representing each outcome with equal height | Probability Density Function (PDF) with a flat, continuous line over the interval indicating equal likelihood across all points |
Read More:
Sample Questions on Uniform Distribution
Question 1: A random variable X has a uniform distribution over(-2, 2),
(i) Find k for which P(X>k) = 1/2 (ii) Evaluate P(X<1) (iii) P[|X-1|<1]
Solution:
(i) X =f(x) = 1/(b-a) =1/(2-(-2)) = 1/4
We want the value of k such that the probability to the right of k is 1/2.
In a uniform distribution, probability is proportional to length, so we find k such that:
2-k/2-(-2) = 1/2
2-k/4 = 1/2
2-k = 2
k = 0By solving we get k = 0
(ii) Evaluate P(X < 1)
We find the proportion of the interval [−2,2] that is less than 1:
P(X < 1) = 1 - (-2)/4 = 3/4(iii) Evaluate P( ∣X − 1∣ < 1 )
This is equivalent to:
P (−1 < X − 1 <1 )⇒P (0 < X < 2)
Now compute:
P( 0 < X < 2 ) = 2 − 0/4 = 2/4 = 1/2
Question 2: If X is uniformly distributed in (-1,, 4) then
(i) Its mean is ______________.
(ii) Its variance is ______________.
(iii) Spade's standard deviation is ___________.
(iv) Its median is ______________.
Solution:
Here, a = -1 and b = 4
(i) Mean (μ) = (4-1)/2 = 1.5
(ii) Variance(σ2) = (4+1)2 /12 = 2.08
(iii) Standard deviation(σ) =√2.08 = 1.443
(iv) Median = (4-1)/2 = 1.5
Question 3: If there are 52 cards in the traditional deck of cards with four suits: hearts, a clubs, and diamonds. Each suite contains 13 cards of which 3 cards are face cards. The new deck is formed by excluding a . Then what is the probability of getting a heart card from the modified deck?
Solution:
In the question, the given number of cards is finite so it is a discrete uniform distribution.
Given:
- Original deck: 52 cards
- 4 suits: Hearts, Spades, Clubs, Diamonds
- Each suit has 13 cards
- Each suit contains 3 face cards (Jack, Queen, King)
Modified Deck Composition:
- Cards per suit after removing number cards: 4 cards
- Total suits: 4
- Total cards in modified deck:
4 cards/suit × 4 suits=16 cards
Formula for the probability in discrete uniform distribution is P(X) = 1/n
Probability of getting heart in the modified deck P(Heart) = 4/16 = 1/4 = 0.25
Question 4: Using the uniform distribution probability density function for random variable X. in (0, 20), find P(3< X < 16).
Solution:
Here, a = 0, b =20
f(x) = 1/(20 - 0) = 1/20
P(3< X < 16) = (16 - 3) × (1/20) = 13/20
Question 5: A random variable X has a uniform distribution over (-5 , 6), find cumulative distribution function for x = 3.
Solution:
Here, a = -5, b = 6, x = 3
CDF = (3 - (-5))/(6 - (-5)) = 8/11
Practice Problems on Uniform Distribution
Question 1. A random variable X follows a uniform distribution over the interval [2,10]. Find the probability that X lies between 4 and 8.
Question 2. Suppose a continuous random variable Y is uniformly distributed over the interval [0,5]
- (a) Calculate the expected value E(Y)
- (b) Calculate the variance Var(Y).
Question 3. A random variable Z is uniformly distributed over [3,15]. Spade's Derive the CDF of Z and use it to find the probability that Z is less than or equal to 9.