Uniform Distribution
Uniform Distribution is defined by having a constant probability within given domain.
The uniform distribution is defined by two parameters, a and b,
- a is the minimum
- b is the maximum
The uniform distribution is written as U(a, b)
Area
Since it is a nice an simple rectangle and we can find the area by using the formula for the area of a rectangle.
Like all probability distributions for continuous random variables, the area under the graph of a random variable is always equal to 1.
From the graph above.
So,
Putting all together we get.
There are 2 types of uniform distribution, continuous and discrete.
Continuous Uniform Distribution
In continuous uniform distribution the expected output takes a value in a specified range. Ex: In a range 0 to 1 it can take any value such as 0.1, 0.2, 0.22, etc.
Probability Density Function (PDF)
The Probability Density Function (PDF) for a continuous uniform distribution taking values in the range a to b is:
Cumulative Distribution Function (CDF)
The Cumulative Distribution Function (CDF) for a continuous uniform distribution taking values in the range a to b is:
Probability
From any continuous probability density function we can calculate probabilities by using integration.
Mean or Expected Value
The mean of a continuous uniform distribution is.
Variance
The variance of a continuous uniform distribution is given by.
Standard Deviation
The standard deviation of a continuous uniform distribution is given by.
Example
You arrive into a building and are about to take an elevator to the your floor. Once you call the elevator, it will take between 0 and 40 seconds to arrive to you. We will assume that the elevator arrives uniformly between 0 and 40 seconds after you press the button. In this case a = 0 and b = 40.
To calculate the probability that elevator takes less than 15 seconds to arrive we set d = 15 and c = 0.
Discrete Uniform Distribution
In discrete uniform distribution the expected output takes a finite set of values. Ex: 1, 2, 3, 4, etc.
Probability Mass Function (PMF)
A discrete uniform random variable X with parameters a and b has Probability Mass Function (PMF).
Cumulative Distribution Function (CDF)
The Cumulative Distribution Function (CDF) for a uniform distribution is given by.
Probability
From any discrete probability mass function we can calculate probabilities by using a summation.
Mean or Expected Value
The mean of a discrete uniform distribution is.
Variance
The variance of a discrete uniform distribution is given by.
Standard Deviation
The standard deviation of a discrete uniform distribution is given by.
Example
Lets take an example of throwing a Dice.
To calculate the probability that the dice lands on 2 or 3 we set d = 3 and c = 2.
Standard Uniform Distribution
The standard uniform distribution is where a = 0 and b = 1 and is common in statistics, especially for random number generation. Its expected value is 1/2 and variance is 1/12.
Mass vs Density Function
A probability mass function (PMF) differs from a probability density function (PDF) in that the latter is associated with continuous rather than discrete random variables.
Probability mass functions are used for discrete distributions. It assigns a probability to each point in the sample space. Whereas the integral of a probability density function gives the probability that a random variable falls within some interval.
Takeaways
- Uniform distributions are probability distributions with equally likely outcomes.
- In a discrete uniform distribution, outcomes are discrete and have the same probability.
- In a continuous uniform distribution, outcomes are continuous and infinite.
I hope this article provides you with a good understanding of Uniform Distribution.
If you have any questions or if you find anything misrepresented please let me know.
Thanks!