The Wayback Machine - https://web.archive.org/web/20240815021126/https://www.geeksforgeeks.org/uniform-distribution-formula/
Open In App

Uniform Distribution Formula

Last Updated : 29 Jul, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

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


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 

Cumulative Distribution Function Graph

Cumulative Distribution Function Graph

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

[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)/2
For the conditional probability = P( c < x < d ) 

= (d – c ) × f(x)

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

Types of Uniform Distribution

Types of uniform distribution are:

  1. 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
  2. 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,

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.



Previous Article
Next Article

Similar Reads

Write Examples of Uniform Motion and Non Uniform Motion
Here are a few Examples of Uniform Motion and Non Uniform Motion: Uniform Motion: A Car on a Highway: Imagine a car traveling on a straight highway at a constant speed of 60 miles per hour (mph). In this case, the car is in uniform motion because it covers the same distance in equal intervals of time. Each hour, it travels 60 miles, and the speed r
2 min read
Uniform and Non-Uniform Motion
If an object moving along a straight line covers equal distances in equal intervals of time, it is said to be in uniform motion otherwise the motion is said to be non-uniform. Uniform and Non-Uniform Motion are two types of motion based on the rate of covering distance per unit of time. In the case of Uniform Motion, the rate of covering distance p
10 min read
Difference between Continuous and Discrete Uniform Distribution
Continuous and discrete uniform distributions are two types of probability distributions. A continuous uniform distribution has an interval of equally likely values. Instead, a discrete uniform distribution applies to a finite set of outcomes with equal probabilities. Understanding the difference between continuous and discrete uniform distribution
5 min read
Mathematics | Probability Distributions Set 1 (Uniform Distribution)
Prerequisite - Random Variable In probability theory and statistics, a probability distribution is a mathematical function that can be thought of as providing the probabilities of occurrence of different possible outcomes in an experiment. For instance, if the random variable X is used to denote the outcome of a coin toss ("the experiment"), then t
4 min read
Dipole in a Uniform Magnetic Field
The magnetic field lines produced by the magnet are represented by the pattern of iron filings. We may get a rough estimate of the magnetic field B by looking at these magnetic field lines. However, we are frequently called upon to precisely measure the magnitude of the magnetic field B. We do this by placing a small compass needle in the magnetic
11 min read
Non Uniform Motion
Non-Uniform Motion is the motion of an object, in which the object covers unequal distances in equal time intervals. Motion of a car in traffic, motion of a footballer, etc are considered to be non-uniform motions. In this article, we have covered Non-Uniform motion definition, Examples of non-uniform motion, and various others in detail. Table of
5 min read
Uniform Motion
Uniform motion describes the movement of an object at a constant speed, either in a straight line or along a circular path. Consider an object which covers equal distance in equal interval of time then the object is said to be moving in uniform motion. In this article, we will learn about uniform motion in detail, including its characteristics, equ
7 min read
Uniform Acceleration
Uniformly Accelerated Motion or Uniform Acceleration in Physics is a motion in which the object is accelerated at constant acceleration. We have to keep in mind that uniform accelerated motion does not mean uniform velocity i.e. in uniform accelerated the velocity of the object increases linearly with time. An object drop from the top of the roof,
8 min read
Uniform Circular Motion
Uniform Circular Motion as the name suggests, is the motion of a moving object with constant speed in a circular path. As we know, motion in a plane only has two coordinates, either x, and y, y and z, or z and x. Except for Projectile motion, circular motion is also an example of motion in a 2-D plane. In a uniform circular motion, the object moves
9 min read
Torque on an Electric Dipole in Uniform Electric Field
Science is a strange subject that never ceases to amaze you as new subjects are presented. We're all aware that charge occurs everywhere around us and that its existence causes a variety of natural events. Furthermore, positive and negative charges exist in many forms, displaying various characteristics in the presence of a stimulating field. Have
9 min read
Dipole in a Uniform External Field
If a dipole is in a uniform electric field, it will experience some force and a rotating effect. This rotating effect is known as ‘torque’. Torque is a vector quantity, and its direction generally depends only on the force applied. The torque is calculated based on the rotational effect experienced by the electric dipole as a result of its interact
7 min read
Hypergeometric Distribution Formula
The hypergeometric distribution is defined as the concept of approximation of a random variable in a hypergeometric probability distribution. This value is further used to evaluate the probability distribution function of the data. The hypergeometric distribution resembles the binomial distribution in terms of a probability distribution. Combinatio
4 min read
Geometric Distribution Formula
Geometric Distribution is a probability distribution that tells the number of independent Bernoulli trials needed to achieve the first success. It is used to analyze situations where each trial has only two possible outcomes (success or failure), and the probability of success remains constant across all trials. What is Geometric Distribution?The g
7 min read
Poisson Distribution | Definition, Formula, Table and Examples
Poisson Distribution is one of the types of discrete probability distributions like binomial distribution in probability. It expresses the probability of a given number of events occurring in a fixed interval of time. Poisson distribution is a type of discrete probability distribution that determines the likelihood of an event occurring a specific
11 min read
Frequency Distribution - Table, Graphs, Formula
Frequency Distribution is a tool in statistics that helps us organize the data and also helps us reach meaningful conclusions. It tells us how often any specific values occur in the dataset. A frequency distribution in a tabular form organizes data by showing the frequencies (the number of times values occur) within a dataset. A frequency distribut
12 min read
Probability Distribution - Function, Formula, Table
A probability distribution is an idealized frequency distribution. In statistics, a frequency distribution represents the number of occurrences of different outcomes in a dataset. It shows how often each different value appears within a dataset. Probability distribution represents an abstract representation of the frequency distribution. While a fr
15+ min read
Molecular Weight Formula - Definition, Formula, Solved Examples
An atom is the basic building block of matter i.e. everything around us is made of matter. This is the smallest unit into which matter can be divided without the release of any electrically charged particles. This is the smallest unit of matter which has the characteristic properties of a chemical element. The mass of an atom depends on the electro
5 min read
Rydberg Formula: Formula, Proof and Solved Examples
The Rydberg formula predicts the wavelength of light produced by an electron moving between atomic energy levels. Each element has a unique spectral fingerprint. When an element's gaseous state is heated, light is produced. When this light passes through a prism or a diffraction grating, bright lines of various hues can be discerned. In some manner
6 min read
Mathematics | Probability Distributions Set 2 (Exponential Distribution)
The previous article covered the basics of Probability Distributions and talked about the Uniform Probability Distribution. This article covers the Exponential Probability Distribution which is also a Continuous distribution just like Uniform Distribution. Introduction - Suppose we are posed with the question- How much time do we need to wait befor
5 min read
Water: A Wonder Liquid - Distribution, Importance, Pollution and FAQs
Natural resources are naturally occurring materials that are useful to man or could be useful under hypothetical technological, economic, or social circumstances, as well as supplies are drawn from the earth, Food, building and clothing materials, fertilisers, metals, water, and geothermal power are just a few examples. Natural resources were once
7 min read
Factors Affecting Distribution of Population
The term HR alludes to the size of the number of inhabitants in a country alongside its effectiveness, instructive characteristics, efficiency, hierarchical capacities, and farsightedness. It is a definitive asset, however not similarly, disseminated over the world. Factors Affecting Distribution PopulationPopulaces are not uniformly circulated ove
8 min read
Class 12 RD Sharma Solutions- Chapter 33 Binomial Distribution - Exercise 33.2 | Set 1
Question 1. Can the mean of a binomial distribution be less than its variance? Solution: Let np be the mean and npq be the variance of a binomial distribution. So, Mean - Variance = np - npq Mean - Variance = np (1 - q) Mean - Variance = np.p Mean - Variance = np2 Since n can never be a negative number and p2 will always be a positive number, thus
7 min read
Class 12 RD Sharma Solutions - Chapter 33 Binomial Distribution - Exercise 33.2 | Set 2
Question 15. A dice is thrown thrice. A success is 1 or 6 in a throw. Find the mean and variance of the number of successes. Solution: Let p denote the success and q denote failure of an event. Now, the sample space when a dice is thrown is given by S = {1, 2, 3, 4, 5, 6} Hence, p = 2/6 = 1/3 and q = 1 - 1/3 = 2/3 Therefore, Mean = np = 3 × 1/3 = 1
9 min read
What factors are responsible for the distribution of plants and animals in India?
The diversity of different species on Earth is called plant and animal biodiversity. The term biodiversity was given by Walter G. Rosen in 1986 and the literal meaning of the word is biodiversity. Studying the concept of biodiversity involves counting the total number of species living in a particular area. The study of plant and animal diversity w
5 min read
Superposition Principle and Continuous Charge Distribution
Electric charge is a fundamental feature of matter that regulates how elementary particles are impacted by an electric or magnetic field. Positive and negative electric charge exists in discrete natural units and cannot be manufactured or destroyed. There are two sorts of electric charges: positive and negative. When two items with an overabundance
8 min read
Continuous Charge Distribution
Electric charge is a fundamental feature of matter that regulates how elementary particles are impacted by an electric or magnetic field. Positive and negative electric charge exists in discrete natural units and cannot be manufactured or destroyed. There are two sorts of electric charges: positive and negative. When two items with an overabundance
7 min read
Class 12 RD Sharma Solutions - Chapter 33 Binomial Distribution - Exercise 33.1 | Set 2
Question 19. A bag contains 7 green, 4 white, and 5 red balls. If four balls are drawn one by one with replacement, what is the probability that one is red? Solution: Let us consider X be the number of red balls drawn from 16 balls with replacement. So, a binomial distribution follows by X with n = 4. Here, p = 5/16 and q = 1 - p = 11/16 P(X = r) =
15+ min read
Class 12 RD Sharma Solutions - Chapter 33 Binomial Distribution - Exercise 33.1 | Set 3
Question 37. An experiment succeeds twice as often as it fails. Find the probability that in the next 6 trials there will be at least 4 successes. Solution: Let us consider X be the number of successes out of 6 experiment. Also, p denotes the probability of success and q denotes the probability of failure. According to the question, successes are t
15+ min read
Is rolling a dice a probability distribution?
Probability of a set of events can be considered as a measure of the likelihood of an event to occur. There are many events that cannot be predicted with total certainty. The chance of the occurrence of any event can be predicted with the help of probability. The value of chance of occurrence or probability of occurrence of events lies between 0 to
5 min read
Types and Distribution of Forest and Wildlife Resources
Our planet Earth is home to a large number of residing creatures. From miniature organic entities and microbes, and lichens to banyan trees, elephants, and blue whales, there is an immensely large number of living creatures found on the earth. Tragically, people today have changed nature and untamed life into an asset. The majority of the woodland
11 min read
three90RightbarBannerImg