Continous and Discrete Uniform Distribution Formula
Data Structures Algorithms Python Java C C++ JavaScript Android Development SQL Data Science Machine Learning PHP Web Development System Design Tutorial Technical Blogs Interview Experience Interview Preparation Programming Competitive Programming Jobs Coding Contests GATE CSE HTML CSS React NodeJS Placement Aptitude Quiz Computer Science Programming Examples GeeksforGeeks Courses Puzzles SSC Banking UPSC Commerce Finance CBSE School k12 General Knowledge News Mathematics Exams
GeeksforGeeks
Uniform Distribution is the probability distribution that represents equally likely outcomes. Learn more about continuous uniform distribution, discrete uniform distribution, types, examples, applications, properties, and uniform distribution formulas at GeeksforGeeks.
https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_favicon.png
GeeksforGeeks
Uniform Distribution is the probability distribution that represents equally likely outcomes i.e. the probability of each outcome occurring is the same. There are two types of uniform distribution: Discrete uniform distribution and continuous uniform distribution (the most common type in elementary statistics). It defines the density function of the random variable, mean, and variance.

In this article, we will learn about uniform distribution, types of uniform distribution, and uniform distribution formulas along with some solved examples based on it.

Uniform Distribution

A uniform distribution is a distribution that has constant probability due to equally likely occurring events. 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).

Uniform Distribution Definition

A uniform distribution is a type of probability distribution where every possible outcome has an equal probability of occurring. This means that all values within a given range are equally likely to be observed.

Graph of Uniform Distribution

Calculating the height of the rectangle:

The maximum probability of the variable X is 1 so the total area of the rectangle must be 1.

Area of rectangle = base × height = 1

(b – a) × f(x) = 1

f(x) = 1/(b – a) = height of the rectangle

Note: Discrete uniform distribution: Px = 1/n. Where, Px = Probability of a discrete variable, n = Number of values in the range

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 ≤ bMean(μ)

[Tex]\int_{a}^{b} x.f(x) \,dx =\frac{1}{b-a}[\frac{x^2}{2}]_a^b [/Tex]

= (a + b)/2

Variance (σ2 )

[Tex]\int_{a}^{b} x.f(x) \,dx =\frac{1}{b-a}[\frac{x^2}{2}]_a^b [/Tex]

= μ2‘ – μ2 = [Tex]\int_{a}^{b}x^2.\frac{1}{b-a}dx \hspace{0.1cm}-(\frac{a+b}{2})^2 [/Tex]

= (b – a)2 /12

Standard Deviation (σ)

[Tex]= \sqrt {\frac{(b – a)^2}{12}}[/Tex]

Cumulative Distribution function (cdf)= (x – a)/(b – a) for x ∈ [a , b] Median = (a + b)/2For the conditional probability = P( c < x < d )

= (d – c ) × f(x)

= (d – c)/(b – a)

Types of Uniform Distribution

Types of uniform distribution are:

Continuous Uniform Distribution: A continuous uniform probability distribution is a distribution that has an infinite number of values defined in a specified range. It has a rectangular-shaped graph so-called rectangular distribution. It works on the values which are continuous in nature. Example: Random number generator

Discrete Uniform Distribution: A discrete uniform probability distribution is a distribution that has a finite number of values defined in a specified range. Its graph contains various vertical lines for each finite value. It works on values that are discrete in nature. Example: A dice is rolled.

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.

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.

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

Modelling 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 for generating keys and creating 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.

Read More,

Poisson Distribution

Binomial Distribution

Normal Distribution

Sample Questions

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

P(X>k) = 1 – P(X≤ k) = 1 – [Tex]\int_{-2}^{k}f(x)dx [/Tex]

= 1 – (1/4).[Tex]\int_{-2}^{k}dx [/Tex] =1 – (k+2)/4 = 1/2

By solving we get k = 0

(ii) P(X<1) = [Tex]\int_{-2}^{1}f(x)dx [/Tex] =(1/4). [Tex]\int_{-2}^{k}dx [/Tex]= 3/4

(iii) P[|X -1| <1] = P[1-1<X<1+1] = P[0 < x < 2] = [Tex]\int_{0}^{1}f(x)dx [/Tex]= (1/4).[Tex]\int_{0}^{1}dx [/Tex] = 1/4

Question 2: If X is uniformly distributed in (-1 , 4) then

(i) its mean is ______________.

(ii) its variance is ______________.

(iii) its 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, spade, clubs, and diamonds. Each suite contains 13 cards of which 3 cards are face cards. The new deck is formed by excluding the number of cards. 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.

Formula for the probability in discrete uniform distribution is P(X) = 1/n

Probability of getting heart in the modified deck = 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

Uniform Distribution Formula – FAQs

What is uniform distribution?

Uniform distribution refers to a type of probability distribution where every possible outcome has an equal probability of occurring. In other words, the values within a given range are equally likely to be observed. The uniform distribution can be either continuous or discrete.

What is continuous uniform distribution?

Continuous uniform distribution is a probability distribution that assigns equal probability density to all outcomes within a specified interval. This means that any value within the interval has an equal chance of occurring. The probability density function (PDF) remains constant throughout the interval and is zero outside the interval. Examples include the standard uniform distribution over the interval [0, 1] and variations of this distribution over other intervals.

What is discrete uniform distribution?

Discrete uniform distribution is a probability distribution where a finite number of outcomes exist, and each outcome has an equal probability of occurring. In essence, it’s a discrete version of the continuous uniform distribution. Examples include rolling a fair die, where each face has an equal probability of 1/6, or drawing a card from a standard deck, where each card has a probability of 1/52 if drawn randomly and without replacement.

How Do You Calculate the Mean of a Uniform Distribution?

The mean or expected value of a continuous uniform distribution is 2μ=2a+b​.

How Can You Identify a Uniform Distribution from a Graph?

A uniform distribution graph is flat, indicating that each outcome within the specified range has an equal probability of occurring.

What Are Some Examples of Uniform Distribution?

Examples include rolling a fair die, where each outcome is equally likely, or randomly choosing a point along a stretch of road.

Can Uniform Distribution Be Skewed?

No, by definition, uniform distributions are not skewed since each outcome within the range has the same likelihood.

How Is Uniform Distribution Used in Real Life?

It’s used in simulations, for creating random numbers in computer programs, and in quality control processes.

What Is the Difference Between Discrete and Continuous Uniform Distributions?

Discrete uniform distributions apply to scenarios with a finite set of outcomes, while continuous uniform distributions apply to scenarios where any value within a continuous range is equally likely.