0% found this document useful (0 votes)
2 views56 pages

Chapter 8

The document explains the concepts of expected value and variance in probability and statistics, highlighting their importance in understanding random variables. Expected value represents the average outcome of repeated experiments, while variance measures the dispersion of data points around the mean. The document also provides formulas, examples, and applications of these concepts in various fields such as finance and machine learning.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views56 pages

Chapter 8

The document explains the concepts of expected value and variance in probability and statistics, highlighting their importance in understanding random variables. Expected value represents the average outcome of repeated experiments, while variance measures the dispersion of data points around the mean. The document also provides formulas, examples, and applications of these concepts in various fields such as finance and machine learning.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

4/12/26, 8:12 AM Expected Value and Variance - GeeksforGeeks

Courses
Search... Tutorials Sign In
Interview Prep

Expected Value and Variance


Last Updated : 23 Jul, 2025

Expected value and variance are fundamental concepts in probability and statistics that help us understand
the behavior of random variables. The expected value, also known as the mean, represents the average
outcome of an experiment repeated many times. Variance, on the other hand, measures the spread or
dispersion of a set of values.

For example, if you were to roll a fair six-sided die, the expected value of the roll would be the average
of all possible outcomes; meanwhile, the variance would give you an idea of how much each roll
deviates from this average value.

In this article, we will discuss Expected Value and Variance in detail.

Expected Value
The expected value (often denoted as E(X) or μ) of a random variable X is a measure of the central tendency
of its probability distribution. It is essentially the mean value that the variable would take if the experiment
were repeated many times.

Figure 1: Expected Value of a Coin Flip

In Figure 1, we can understand the concept of expected value:


You play a game where:
You win ₹10 if you get Heads
You win ₹0 if you get Tails

The coin is fair (so the probability of Heads = 0.5 and Tails = 0.5).
If you play this game many times, you’ll win ₹5 on average per flip — even though you never actually
win exactly ₹5 in any single flip. That's the expected value.
[Link] 1/7
4/12/26, 8:12 AM Expected Value and Variance - GeeksforGeeks

Expected value can be thought of as the "center of mass" of the probability distribution. It is the point at
which the distribution would balance if it were possible to place it on a scale.

Formula for Expected Value

The expected value of a discrete random variable X with possible values x1, x2,..., xn and corresponding
probabilities p1, p2,...,pn​is given by:

E(X) = \sum_{i=1}^{n} x_i \cdot p_i

For a continuous random variable X with probability density function f(x), the expected value is defined as:

E(X) = \int_{-\infty}^{\infty} x \cdot f(x) \, dx

Example 1: Find the expected value when rolling a fair six-sided die.
Solution:

Possible outcomes: 1, 2, 3, 4, 5, 6
Probabilities: P(X=i) = \frac{1}{6} for i = 1,...,6
Expected value calculation:
E(X) = \sum_{i=1}^{6} x_i \cdot P(X=x_i) \\E(X)= 1 \cdot \frac{1}{6} + 2 \cdot \frac{1}{6} + 3 \cdot \frac{1}
{6} + 4 \cdot \frac{1}{6} + 5 \cdot \frac{1}{6} + 6 \cdot \frac{1}{6} \\E(X) = \frac{1+2+3+4+5+6}{6} =
\frac{21}{6} = 3. 5
The expected value of a fair die roll is 3.5.

Example 2: Find the expected waiting time when the time is uniformly distributed between 0 and 10 minutes.
Solution:

Probability density function (PDF):


f(x) = \begin{cases} \frac{1}{10} & \text{for } 0 \leq x \leq 10 \\ 0 & \text{otherwise} \end{cases}
Expected value calculation:
E(X) = \int_{-\infty}^{\infty} x \cdot f(x) \, dx = \int_{0}^{10} x \cdot \frac{1}{10} \, dx \\ E(X) = \frac{1}
{10} \int_{0}^{10} x \, dx = \frac{1}{10} \left[ \frac{x^2}{2} \right]_0^{10} \\ E(X) = \frac{1}{10} \cdot
\frac{100}{2} = 5
The expected waiting time is 5 minutes.

Properties of Expected Value

Some of the properties of expected value are listed in the following table:

Property Description Formula Example

Linearity of Expectation The expected value of a linear combination E(aX + bY) = If E(X) = 2 and E(Y) = 3,
of random variables is the linear aE(X) + bE(Y) then E(2X + 3Y) = 2⋅2 +

[Link] 2/7
4/12/26, 8:12 AM Expected Value and Variance - GeeksforGeeks

Property Description Formula Example

combination of their expectations. 3⋅3 = 13

Expected Value of a The expected value of a constant is the


E(c) = c If c=5, then E(5) = 5.
Constant constant itself.

The expected value of the sum of random If E(X) = 2 and E(Y) = 3,


Sum of Random E(X + Y) =
variables is the sum of their expected then
Variables E(X) + E(Y)
values. E(X + Y) = 2 + 3 = 5

The expected value of a constant


Product of a Constant multiplied by a random variable is the If a = 4 and E(X) = 2, then
E(aX) = aE(X)
and a Random Variable constant multiplied by the expected value E(4X) = 4⋅2 = 8
of the variable.

Non-Negativity for
The expected value of a non-negative E(X) ≥ 0 if X ≥
Non-Negative Random If X ≥ 0, then E(X) ≥ 0.
random variable is non-negative. 0
Variables

For independent random variables, the If X and Y are


Expectation and E(XY) = E(X) ⋅
expected value of their product is the independent, E(X) = 2 and
Independence E(Y)
product of their expected values. E(Y) = 3, then E(XY) = 6

The expected value of an indicator variable


If P(A) = 0.7, then E(IA) =
Indicator Variables equals the probability of the event it E(IA)=P(A)
0.7
indicates.

For a convex function g, the expected


E(g(X)) ≥ For a convex g, E(g(X)) ≥
Jensen's Inequality value of g(X) is at least g of the expected
g(E(X)) g(E(X)).
value of X.

Variance
Variance is a statistical measure that indicates the spread or dispersion of a set of data points. It shows how
much the data points in a dataset differ from the mean (average) value.

[Link] 3/7
4/12/26, 8:12 AM Expected Value and Variance - GeeksforGeeks

1/2

A high variance indicates that the data points are spread out widely around the mean, while a low variance
indicates that they are clustered closely around the mean. Variance helps in understanding the variability
within a dataset.

In real-world applications, variance is used in finance to assess risk, in quality control to measure consistency,
and in many other fields to analyze variability.

Formula for Variance

Population Variance (σ²)


The formula for the variance of a population is:

\sigma^2 = \frac{\sum_{i=1}^{N} (x_i - \mu)^2}{N}

Where:

σ2 is the population variance.


xi represents each data point in the population.
μ is the mean of the population.
N is the total number of data points in the population.

Sample Variance (s²)


The formula for the variance of a sample is:

s^2 = \frac{\sum_{i=1}^{n} (x_i - \bar{x})^2}{n-1}

Where:

s2 is the sample variance.


xi represents each data point in the sample.
\bar{x} is the mean of the sample.
n is the total number of data points in the sample.

Example: Find the population variance for outcomes of a fair six-sided die.
Solution:

Possible outcomes: X in 1, 2, 3, 4, 5, 6
Probabilities: P(X=i) = \frac{1}{6} \: for \: i = 1,\ldots,6
Mean (from previous): = 3.5
\sigma^2 = \frac{\sum_{i=1}^{6} (x_i - \mu)^2}{6} \\ \sigma^2 = \frac{(1-3.5)^2 + (2-3.5)^2 + \cdots +
(6-3.5)^2}{6} \\ \sigma^2 = \frac{6.25 + 2.25 + 0.25 + 0.25 + 2.25 + 6.25}{6} \\ \sigma^2 = \frac{17.5}{6}
\approx 2.9167
[Link] 4/7
4/12/26, 8:12 AM Expected Value and Variance - GeeksforGeeks

The population variance of a fair die is {\dfrac{35}{12}} (exact) or 2.9167 (approximate).

Relationship Between Expected Value and Variance


Variance can also be expressed using the expected value in the following way:

Var(X) = E[(X − E(X))2]

This formula can be expanded to show the relationship between the expected value and variance more
explicitly:

Var(X) = E[(X − E(X))2] = E[X2 − 2XE(X) + (E(X))2]

Using the linearity of expectation, this becomes:

Var(X) = E[X2] − 2E(X)E(X)+(E(X))2 = E[X2] − (E(X))2

Therefore, the variance of a random variable X can be calculated as the difference between the expected
value of the square of X and the square of the expected value of X:

Var(X) = E[X2]−(E(X))2

Example: A casino game uses a special 4-sided die with the following probability distribution: for outcomes
1, 2, 3, and 4, the probabilities are 0.1, 0.4, 0.3, and 0.2, respectively. Find the variance of the payout.

Solution:
E[X] = \sum x_i P(x_i) \\
E[X] = (1)(0.1) + (2)(0.4) + (3)(0.3) + (4)(0.2) \\
E[X] = 0.1 + 0.8 + 0.9 + 0.8 = 2.6
E[X^2]= \sum x_i^2 P(x_i) \\
E[X^2]= (1^2)(0.1) + (2^2)(0.4) + (3^2)(0.3) + (4^2)(0.2) \\
E[X^2]= (1)(0.1) + (4)(0.4) + (9)(0.3) + (16)(0.2) \\
E[X^2]= 0.1 + 1.6 + 2.7 + 3.2 = 7.6
Var(X) = E[X^2] - (E[X])^2 \\
Var(X) = 7.6 - (2.6)^2 \\
Var(X) = 7.6 - 6.76 \\
Var(X) = 0.84

Applications of Expected Values and Variance

In computer science, especially in areas like algorithm analysis, machine learning, and data analysis, expected
value and variance are the fundamental concepts with practical significance:

Algorithm Analysis: Analyzing the expected running time or output of an algorithm, especially randomized
algorithms.

[Link] 5/7
4/12/26, 8:12 AM Expected Value and Variance - GeeksforGeeks

Machine learning: Evaluating model performance, optimizing algorithms (e.g., reinforcement learning to
maximize expected rewards), making predictions using probabilistic models, and selecting the best model
based on metrics like expected accuracy or loss.
Data Analysis: Summarizing datasets using expected values to estimate population means.
Gaming & Gambling: Used to determine the probability of winning or losing in games of chance, helping
players and casinos make informed decisions.
Bias-Variance Tradeoff: In machine learning, variance is crucial in understanding the bias-variance tradeoff
– a fundamental concept balancing model complexity and generalization capability.

Related Articles

Standard Deviation
Variance and Standard Deviation
Binomial Distribution
Poison Distribution
Difference Between Variance and Standard Deviation

Comment S somes… 0

Article Tags: Mathematics School Learning Math-Statistics

Explore
Basic Arithmetic
Algebra
Geometry
Trigonometry & Vector Algebra
Calculus
Probability and Statistics
Practice

Company Explore Tutorials Courses Videos Preparation


About Us POTD Programming ML and Data DSA Corner
Corporate & Communications Address: Legal Job-A- Languages Science Python Interview
Privacy Thon DSA DSA and Java Corner
A-143, 7th Floor, Sovereign Corporate
Tower, Sector- 136, Noida, Uttar Policy Blogs Web Placements C++ Aptitude
Pradesh (201305) Contact Us Nation Technology Web Web Puzzles
Skill Up Development Development GfG 160

[Link] 6/7
4/12/26, 7:54 AM Probability Density Function - GeeksforGeeks
Courses
Search... Tutorials Sign In
Interview Prep

Probability Density Function


Last Updated : 21 Feb, 2026

The probability density function(PDF) is the function that represents the density of probability for a
continuous random variable over the specified ranges. It is denoted by f(x). The PDF is obtained by
differentiating the Cumulative Distribution Function (CDF), and the CDF can be obtained by integrating
the PDF. The PDF does not give the probability at a single point; instead, probability is found over an
interval using the area under the curve.

A Probability Density Function (PDF) tells us:

Relative Likelihood of values within a given interval


Shape of the Distribution
Expected Value (Mean) and Variance

A function f(x) is a valid probability density function if


f(x) ≥ 0 for all values of x

The total area under the curve equals 1 i.e. ∫−∞ f (x) dx = 1 ​

The function f(x) should be piecewise continuous over its domain.

PDFs are widely used in real-life applications such as rainfall prediction, financial modeling (stock
markets), and income distribution analysis.

Check:Normal distribution Formula


Example of a Probability Density Function

⎧2x, 0≤x≤1
If the probability density function is given as: f (x) = ⎨
⎩0,
​ ​ ​

otherwise

Find P (0.2≤ X ≤ 0.6)

⎧2x, 0≤x≤1
=⎨
⎩0,
Given f (x) ​ ​ ​

otherwise

Step 1: Verify that it is a valid PDF


1 1
∫0 2x dx = [x2 ]0 = 1
​ ​

Step 2: Find P (0.2 ≤ X ≤ 0.6)

[Link] 1/10
4/12/26, 7:54 AM Probability Density Function - GeeksforGeeks
0.6 0.6
P (0.2 ≤ X ≤ 0.6) = ∫0.2 ​ 2x dx = [x2 ]0.2 = [0.36 − 0.04] = 0.32

∴ P (0.2 ≤ X ≤ 0.6) = 0.32

Probability Density Function Formula


Let Y be a continuous random variable and F(y) be the cumulative distribution function (CDF) of Y.
Then, the probability density function (PDF) f(y) of Y is obtained by differentiating the CDF of Y.

d
f(y) = dy [F (y)]= F'(y)

If we want to calculate the probability for X lying between the interval a and b, then we can use the
following formula:

a
P (a ≤ X ≤ b) = F(b) - F(a) =∫b f (x)dx ​

Finding Probability Using Probability Density Function( PDF )


To find the probability from the probability density function we have to follow some steps.

Step 1: First check the PDF is valid or not using the necessary conditions.
Step 2: If the PDF is valid, use the formula and write the required probability and limits.
Step 3: Divide the integration according to the given PDF.
Step 4: Solve all integrations.
Step 5: The resultant value gives the required probability.

Graph for Probability Density Function


If X is continuous random variable and f(x) be the probability density function. The probability for the
random variable is given by area under the PDF curve. The graph of PDF looks like bell curve, with the
probability of X given by area below the curve. The following graph gives the probability for X lying
between interval a and b.

Properties of Probability Density Function


Let f(x) be the probability density function for continuous random variable X.

The following are the properties of a probability density function:


[Link] 2/10
4/12/26, 7:54 AM Probability Density Function - GeeksforGeeks

Probability density function is always positive for all the values of x : f(x) ≥ 0, ∀ x ∈ R

Total area under probability density curve is equal to 1:

−∞
∫∞ f (x)dx = 1

For a continuous random variable X, probabilities are calculated over intervals. The endpoints of the
interval do not affect the probability:

P (a ≤ X ≤ b) = P (a ≤ X < b) = P (a < X ≤ b) = P (a < X < b)

Probability density function of a continuous random variable over a single value is zero.

a
P(X = a) = P (a ≤ X ≤ a) = ∫a ​ f (x)dx = 0

Probability density function defines itself over the domain of the variable and over the range of the
continuous values of the variable.

Important Measures of a Probability Distribution

1. Mean of Probability Density Function:

Mean of the probability density function refers to the average value of the random variable. The mean
is also called as expected value or expectation. It is denoted by μ or E[X] where, X is random variable.
Mean of the probability density function f(x) for the continuous random variable X is given by:

−∞
E[X] = μ = ∫∞ xf (x)dx ​

2. Median of Probability Density Function:

Median is the value which divides the probability density function graph into two equal halves. If x = M
is the median then, area under curve from -∞ to M and area under curve from M to ∞ are equal which
gives the median value = 1/2. Median of the probability density function f(x) is given by:

−∞ M 1
∫M f (x)dx = ∫∞ f (x)dx =

2

3. Variance Probability Density Function:

Variance of probability density function refers to the squared deviation from the mean of a random
variable. It is denoted by Var(X) where, X is random variable. Variance of the probability density
function f(x) for continuous random variable X is given by:

−∞
Var(X) = E [(X - μ)2] = ∫∞ (x − μ)2 f (x)dx

4. Standard Deviation of Probability Density Function

[Link] 3/10
4/12/26, 7:54 AM Probability Density Function - GeeksforGeeks

Standard Deviation is the square root of the variance. It is denoted by σ and is given by:

σ = √Var(X)

PDF Vs CDF
The key differences between Probability Density Function (PDF) and Cumulative Distribution Function
(CDF) are listed in the following table:

Probability Density Function (PDF) Cumulative Distribution Function (CDF)

The PDF gives the probability that a random


The CDF gives the probability that a random variable
variable takes on a specific value within a certain
is less than or equal to a specific value.
range.

Defined for both continuous and discrete random


Defined for continuous random variables.
variables.

f(x), where f(x)≥0 and


F(x), where 0≤F(x)≤1 for all x, and F(−∞)=0 and
−∞ ​
∫∞ f (x)dx = 1 F(∞)=1

Represents the likelihood of the random variable Represents cumulative probability up to a given
taking on a specific value. value.

The area under the PDF curve over a certain interval The value of the CDF at a specific point gives the
gives the probability that the random variable falls probability that the random variable is less than or
within that interval. equal to that point.

The PDF can be obtained by differentiating the CDF The CDF can be obtained by integrating the PDF
with respect to the random variable. with respect to the random variable.

The probability of a random variable falling within a The probability of a random variable being less than
specific interval (a,b) is given by P (a < X < b) = or equal to a specific value x is given by P (a < X ≤
∫a ​f (x) dx b) = F (b) − F (a)
b

The CDF is a monotonically increasing function: F(x1​


The PDF is always non-negative: f(x)≥0 for all x.
) ≤ F(x2​) if x1​≤ x2​.
The total area under the PDF curve is equal to 1.
0≤F(x)≤1 for all x.

Normal Distribution PDF: Normal Distribution CDF:


(x−μ)2 ​
1 ​ − 1​ ​
e
σ 2π ​
2σ 2
2
(1 + erf ( x−μ
σ 2
​))

−λx
Exponential distribution PDF: λe ,x≥0 Exponential distribution CDF: 1−e−λx ,x≥0

Types of Probability Density Function


There are different types of probability density functions given below:
[Link] 4/10
4/12/26, 7:54 AM Probability Density Function - GeeksforGeeks

Uniform Distribution
Binomial Distribution
Normal Distribution
Chi-Square Distribution

Probability Density Function for Uniform Distribution

The uniform distribution is the distribution whose probability for equally likely events lies between a
specified range. It is also called as rectangular distribution. The distribution is written as U(a, b) where,
a is the minimum value and b is the maximum value. If x is the variable which lies between a and b,
then formula of PDF of uniform distribution is given by:

1
f (x) = (b−a)

Probability Density Function for Binomial Distribution

The binomial distribution is the distribution which has two parameters: n and p where, n is the total
number of trials and p is the probability of success.

Let x be the variable, n is the total number of outcomes, p is the probability of success and q be the
probability of failure, then probability density function for binomial distribution is given by:

P (x) = n Cx px q n−x

Probability Density Function for Normal Distribution

The normal distribution is distribution that is symmetric about its mean. It is also called as Gaussian
ˉ, σ2) where, x
distribution. It is denoted as N (x ˉis the mean and σ2 is the variance. The graph of the
ˉ is the mean, σ2 is the variance and σ be the
normal distribution is bell like graph. If x be the variable, x
standard deviation, then formula for the PDF of Gaussian or normal distribution is given by:

−1 x−μ 2
1 [ σ ]
ˉ, σ2) = f(x) =
N (x
σ 2π
e


2
​ ​

In standard normal distribution mean = 0 and standard deviation = 1. So, the formula for the
probability density function of the standard normal form is given by:

−x 2
1
f(x) = e 2 ​

σ 2π

Probability Density Function for Chi-Squared Distribution

Chi-Squared distribution is the distribution defined as the sum of squares of k independent standard
normal form. IT is denoted as X2(k).

The probability density function for Chi-squared distribution formula is given by:

[Link] 5/10
4/12/26, 7:54 AM Probability Density Function - GeeksforGeeks

k
−1 −x
2 2
f(x) = x k e k , x > 0
​ ​

2 2 Γ( 2 )

f(x) = 0, otherwise

Joint Probability Density Function


The joint probability density function is the density function that is defined for the probability
distribution for two or more random variables. It is denoted as f(x, y) = Probability [(X = x) and (Y = y)]
where x and y are the possible values of random variable X and Y. We can get joint PDF by
differentiating joint CDF. The joint PDF must be positive and integrate to 1 over the domain.

Difference Between PDF and Joint PDF

The PDF is the function defined for single variable whereas joint PDF is the function defined for two or
more than two variables, and other key differences between these both concepts are listed in the
following table:

PDF (Probability Density Function) Joint PDF

Probability Density Function is the probability Joint Probability Density Function is the probability
function defined for single variable. function defined for more than one variable.

It is denoted as f(x). It is denoted as f (x, y, ...).

Probability Density Function is obtained by Joint Probability Density Function is obtained by


differentiating the CDF. differentiating the joint CDF

It can be calculated using multiple integrals as there are


It can be calculated by single integral.
multiple variables.

Read More,

Cumulative Frequency Distribution


Probability Distribution Function

Examples on Probability Density Function

={
x/2 0≤x<4
Example 1: If the probability density function is given as: f (x) . Find P (1 ≤
0 x≥4
​ ​

X ≤ 2).

Apply the formula and integrate the PDF.

[Link] 6/10
4/12/26, 7:54 AM Probability Density Function - GeeksforGeeks
1
P (1 ≤ X ≤ 2) = ∫2 ​ f (x)dx
f(x) = x / 2 for 0 ≤ x ≤ 4
1
⇒ P (1 ≤ X ≤ 2) = ∫2 (x/2)dx ​

2 2
⇒ P (1 ≤ X ≤ 2) = 12 × [ x2 ]1 ​ ​ ​

⇒ P (1 ≤ X ≤ 2) = 3 / 4

={
c(x − 1) 0<x<5
Example 2: If the probability density function is given as: f (x) . Find c.
0 x≥5
​ ​

For PDF:
−∞
∫∞ f (x)dx = 1

−∞ 1 5
⇒ ∫1 f (x)dx + ∫5 f (x)dx + ∫∞ f (x)dx = 1
​ ​ ​

−∞ 1 5
⇒ ∫1 0dx + ∫5 c(x − 1)dx + ∫∞ 0dx = 1
​ ​ ​

2 5
⇒ 0 + c[ x2 − x]1 + 0 = 1 ​ ​

2 5
⇒ c[ x2 − x]1 ​ ​

⇒ 8c = 1
⇒ c = 18 ​

={
5 2
2
x 0≤x<2
Example 3: If the probability density function is given as: f (x) . Find the

0
​ ​

otherwise
mean.

Formula for mean:


−∞
μ = ∫∞ ​
xf (x)dx
−∞ 1 2 2
⇒ μ = ∫1 ​
x(0)dx + ∫2 x( 5x2 )dx + ∫∞ x(0)dx ​ ​ ​

4 2
⇒ μ = 52 [ x4 ]1 ​ ​

⇒ μ = (5/2) × (15/4)
⇒ μ = 75/8 = 9.375

={
2x 0≤x<1
Example 4: If the probability density function is given as: f (x) . verify if this
0
​ ​

otherwise
is a valid probability density function.

To verify that f(x) is a valid PDF, it must satisfy two conditions:


f(x)≥0 for all x.
The integral of f(x) over its entire range must equal 1.
Checking f(x)≥0:
f(x)=2x is clearly non-negative for 0≤x≤10.

[Link] 7/10
4/12/26, 7:54 AM Probability Density Function - GeeksforGeeks

Integrating f(x) over its range:∫−∞∞f(x) dx=∫012x dx=[x2]01=12−02=1.∫−∞ f (x) dx = ​

1 1
∫0 ​ 2x dx = [x2 ]0 ​

= 12 - 02 = 1.
Since both conditions are satisfied, f(x) is a valid PDF.

Example 5: Given the probability density function f(x)= {


3x2 if 0 ≤x≤1
, find the mean
0
​ ​

otherwise
(expected value) of the distribution.

The mean of a continuous random variable X with PDF f(x) is given by:

E(X)= ∫−∞ xf (x) dx. ​

For the given PDF:


1
E(X)= = ∫0 x ⋅ 3x2 dx ​

1
= ∫0 3x3 dx ​

1
= 3 [ x4 ]
4
​ ​

= 3 ⋅ 14 ​

= 34 ​

={
3x2 if 0 ≤x≤1
Example 6: Using the same PDF f (x) ​, find the variance of the
0
​ ​

otherwise
distribution.

The variance of a continuous random variable X is given by:


Var(X) = E(X 2 ) − [E(X)]2 .
We already have E(X) = 34 ​. ​

Now, we need to find E(X2):



E(X 2 ) = ∫−∞ x2 f (x) dx ​

1
= ∫0 x2 ⋅ 3x2 dx ​

1
= ∫0 3x4 dx ​

1
= 3 [ x5 ]
5
​ ​

0
1
=3⋅ 5

= 35 . ​

Practice Questions on Probability Density Function


Q 1: Let f(x) be a probability density function given by:

[Link] 8/10
4/12/26, 7:54 AM Probability Density Function - GeeksforGeeks

f(x) = 2x for 0 ≤ x ≤ 2
f(x) = 0 otherwise

Verify that f(x) is a valid probability density function.

Q 2: Let f(x) be a probability density function given by:

f(x) = 1/2e-x/2 for x ≥ 0


f(x) = 0 for x < 0

Calculate the probability that X ≤ 1.

Q 3: Let f(x) be a probability density function given by:

f(x) = 2x2 for 0 ≤ x ≤ 1


f(x) = 0 otherwise

Find the cumulative distribution function (CDF) F(x) for x ≥ 0.

{
k(1 − x2 ) if − 1 ≤ x ≤ 1
Q 4: Given
ry Geometry the
Linear function
Algebra f (x) = ​, find the
Trigonometry Logarithms Statistics Probability Calculus value
Discrete of k that makes f(x) Sign
Mathematics a In
0
​ ​

otherwise
valid PDF.

= {3
1 −x/3
e if x ≥0
Q 5: For the PDF f (x) ​, calculate the expected value E(X).

0
​ ​

otherwise

Comment A aayush… 12

Article Tags: Engineering Mathematics Probability

Explore
Linear Algebra
Sequence & Series
Calculus
Probability & Statistics
Practice Questions

Company Explore Tutorials Courses Videos Preparation


About Us POTD Programming ML and Data DSA Corner
Corporate & Communications Address: Legal Job-A- Languages Science Python Interview
Thon DSA Java Corner

[Link] 9/10
4/12/26, 8:00 AM Moment Generating Functions - GeeksforGeeks
Courses
Search... Tutorials Sign In
Interview Prep

Moment Generating Functions


Last Updated : 26 Jul, 2025

Moment Generating Functions (MGFs) are a powerful tool in probability theory used to analyze
random variables. They transform a random variable into a function that simplifies the calculation of
important characteristics, such as the mean, variance, skewness, and kurtosis.

What are Moments?

Moments are quantitative measures that describe the shape and characteristics of a probability
distribution:

First moment: Mean


Second moment: Variance
Third moment: Skewness
Fourth moment: Kurtosis

The moment generating function MX(t) of a random variable X is defined as:

MX (t) = E[etX ]

Where:

MX(t) is the moment generating function of X.


E denotes the expected value.
t is a real number.

The domain Dx of Mx is defined as:

DX​ = {t ∈ R ∣ MX ​(t) < ∞}

MGFs exist for all values of t in some open interval around 0 where the expectation is finite.

MGFs for Discrete and Continuous Random Variables

If X is a discrete random variable with PMF pX, then,

MX(s) = ∑x esx pX(x)


If X is a continuous random variable, with PDF fX, then

MX(s) = ∫ esx f X(x)dx

[Link] 1/7
4/12/26, 8:00 AM Moment Generating Functions - GeeksforGeeks

Examples of Moment Generating Functions of Common Distributions


Moment generating functions for some of the most common distributions are listed in the following
table:

Distribution Moment Generating Function

Bernoulli Distribution ​
MX (t) = pet + (1 − p)

Binomial Distribution ​
MX (t) = (pet + (1 − p))n

Geometric Distribution MX ​(t) = pet ​


1−(1−p)et , t < − ln(1 − p)

Poisson Distribution ​
MX (t) = exp(λ(et − 1))

Uniform Distribution ​ e −e ​,
tb ta
MX (t) = t(b−a)
=0
t

Exponential Distribution MX ​(t) = λ ​


λ−t , t<λ

Normal Distribution ​ σ 2 t2 ​
MX (t) = exp(μt + 2
)

Gamma Distribution ​ ​
MX (t) = (1 − θt )−k , t<θ

Beta Distribution MX ​(t) = ∑∞ ​ tn ​Γ(α+n)Γ(α+β) ​


n=0 n! Γ(α)Γ(α+β+n) , ∣t∣ < 1

Chi-Square Distribution ​ 1​
MX (t) = (1 − 2t)−k/2 , t< 2

Moments from Moment Generating Functions


Moments of a random variable can be derived from its Moment Generating Function (MGF). The nth
moment of a random variable X is given by taking the nth derivative of the MGF with respect to t and
evaluating it at t = 0:

(n)
E[X n ] = MX (0) ​

Deriving Moments from the Moment Generating Function (MGF)

The moment generating function (MGF) of a random variable X is defined as:

[Link] 2/7
4/12/26, 8:00 AM Moment Generating Functions - GeeksforGeeks

MX (t) = E[etX ]

The n-th moment of X, E[X n ] , can be obtained by taking the n-th derivative of M_X(t) with respect
to t and evaluating it at t = 0:
(n)
E[X n ] = MX (0) ​

Example: Exponential Distribution

Let X ∼ Exp(λ), where its MGF is:

MX (t) =​
λ
λ−t
, ​ t<λ
Step 1: Find the First Moment (Mean, (E[X]))

Compute the first derivative of M_X(t): MX (t) = dtd ( λ−t
λ
) = (λ−t)
λ
2 ​ ​ ​ ​

′ 1
At t = 0: E[X] = MX (0) = (λ−0)2 = λ
λ
​ ​ ​

This matches the known mean of an exponential distribution.

Step 2: Find the Second Moment( E[X 2 ] )


Compute the second derivative of MX (t): ​

MX′′ (t) =

d
dt
​ ( (λ−t)
λ

2) =

(λ−t)3

2λ 2
At t = 0: E[X 2 ] = MX
′′
(0) = (λ−0) 3 = λ2 ​ ​ ​

This matches the known second moment of an exponential distribution.


Step 3: Find the Variance (Var(X))
2
Using the moments: Var(X) = E[X 2 ] − (E[X])2 = λ22 − ( λ1 ) = λ12 ​ ​ ​

This matches the known variance of an exponential distribution.


First moment (Mean): MX ′
(0) = λ1 ​ ​

′′
Second moment: MX (0) = λ22 ​ ​

1
Variance: Var(X) = λ2

Properties of Moment Generating Functions


Some of the common properties of moment generating functions are:

1. If Y = aX + b, then

MY(s) = esbMX(as)

2. If X and Y are independent, then

MX + Y(s) = MX (s) MY (s)

3. Let X and Y be the independent random variables. Let Z be equal to X, with probability p, and equal
to Y, with probability 1-p. Then,

MZ(s) = pMX(s) + (1 - p) MY(s)

[Link] 3/7
4/12/26, 8:00 AM Moment Generating Functions - GeeksforGeeks

Solved Examples of Moment Generating Functions

Example 1:

1
Let X be a random variable with MGF MX(s) = 1−s (exponential with λ=1). ​

Define Y=2X+3. Then, the MGF of Y is:


1 1
MY (s) = e3s MX (2s) = e3s ⋅
​ ​

1−2s
,s ​ < 2

Example 2:

Let X∼Poisson(λ1) with MX (s) = eλ1 (e −1)


s

Y∼Poisson(λ2) (independent of X) with


Then, the MGF of X+Y is:
MX+Y (s) = MX (s)MY (s) = eλ1 (e −1) ⋅ eλ2 (e −1) = e(λ1+λ2)(e −1)
s s s
​ ​

​ ​ ​

This shows X+Y∼Poisson(λ1+λ2)

Example 3:

Z =X (prob p) or Z = Y (prob 1−p) ⇒ Mz(s) = pMX(s) + (1 − p) MY(s)


2
Let X∼N(0,1) (standard normal) with MX (s) = es /2 ​

2
and Y∼N(1,1) (normal with mean 1) with MY (s) = es+s /2 ​

Suppose Z equals X with probability 0.6 and Y with probability 0.4.


Then, the MGF of Z is:
2 2
/2 /2
MZ (s) = 0.6 ⋅ es
​ + 0.4 ⋅ es+s

Inverse Theorem for Moment Generating Function


Suppose that MX(s) is finite for all s in an interval of the form [-a, a], where a is a positive number.
Then, MX determines uniquely the CDF of the random variable X.

In particular, if MX(s) = MY(s) < ∞, for all s ϵ [-a, a], where a is a positive number, then the random
variables X and Y have the same CDF.

For example, let us take an example of two Bernoulli functions, X and Y, both with the same parameter
p = 0.4.

MGF of bernoulli random variabe is:


MX​(s) = E[esX] = (1 − p) e0 + p⋅es = (1 − p) + pes
For both X and Y, with p = 0.4:
MX(s) = MY(s) = 0.6 + 0.4es
This MGF is finite for all real s, so in particular, it's finite for all s ϵ [-a,a] for any a>0.
MX​(s)=MY​(s) on an interval around 0,
⇒ X and Y must have the same distribution,
⇒ Therefore, FX(t)=FY(t) for all t, i.e., they have the same CDF.

Moment Cumulant and Probability Generating Function


[Link] 4/7
4/12/26, 8:00 AM Moment Generating Functions - GeeksforGeeks

Moment Cumulant and Probability Generating Functions are three different mathematical tools used in
probability theory and statistics to characterize and analyze the properties of random variables and
their distributions.

Each function provides unique insights into the underlying distribution, helping to simplify the
computation and understanding of moments, cumulants, and probabilities.

1. Moment Generating Function (MGF): It is used to calculate the moments of a distribution, which
are useful in understanding the central tendency (mean), spread (variance), and higher-order
properties of the distribution.

MX (t) = E[etX ] ​

For normal distribution:

MX (t) = exp (tμ +​


t2 σ 2
2
​ )

2. Cumulant Generating Function (CGF): This provides a way to calculate cumulants, which describe
the shape of a distribution and are particularly useful for sums of random variables. It is the logarithm
of the MGF and helps in simplifying complex distributional properties. The CGF, denoted as KX(t), is
the natural logarithm of the MGF:

KX (t) = ln(MX (t))


​ ​

The nth cumulant of a random variable X is given by the nth derivative of the CGF evaluated at t = 0:


dn KX (t)
κn = ​

dtn

​ ​ ​

∣t=0

Cumulants are used to describe the shape of the probability distribution, similar to moments, but they
have properties that often make them more convenient for certain types of statistical analysis,
especially when dealing with sums of random variables.

3. Probability Generating Function (PGF): Probability Generating Function (PGF) is another useful
tool in probability theory, particularly for discrete random variables. The PGF of a discrete random
variable X is defined as:

GX (s) = E[sX ] = ∑∞

k=0 P (X = k)s
k

Applications of Moment Generation Function in CS

Randomized Algorithms

Analyzing expectations, variances, and tail bounds


In Quicksort, MGFs help analyze the expected number of comparisons.

[Link] 5/7
4/12/26, 8:00 AM Moment Generating Functions - GeeksforGeeks

Probabilistic Data Structures

Estimating error and behavior of sketches/filters


MGFs can help assess the probability of error in approximating cardinalities or set memberships.

Performance Modeling

Analyzing queues, latency, and throughput.


MGFs are used to derive the distribution of waiting times and queue lengths.

Machine Learning

Moment matching, feature extraction, and convergence analysis


Used in moment-matching techniques and feature engineering.

Cryptography

Randomness testing, distribution analysis


Used in analyzing pseudo-random number generators (PRNGs) and detecting bias in output.

Related Articles

Mean (first moment),


Variance (second moment)
Skewness (third moment)
Kurtosis (fourth moment)

Comment S somes… 1

Article Tags: Engineering Mathematics Probability

Explore
Linear Algebra
Sequence & Series
Calculus
Probability & Statistics
Practice Questions

[Link] 6/7
4/12/26, 8:01 AM Probability Distribution Function - GeeksforGeeks
Courses
Search... Tutorials Sign In
Interview Prep

Probability Distribution Function


Last Updated : 23 Jul, 2025

Probability Distribution refers to the function that gives the probability of all possible values of a
random [Link] shows how the probabilities are assigned to the different possible values of the
random variable.
Common types of probability distributions Include:

Binomial Distribution.
Bernoulli Distribution.
Normal Distribution.
Geometric Distribution.

Note: A Probability Distribution can also be seen as the set of all possible outcomes of a random
experiment, showing how probabilities are distributed across the values of the random variable.

A Probability Distribution Function (PDF) is a mathematical function that describes the likelihood of
different outcomes in a random experiment. For any random variable X, where its value is evaluated at
the points 'x', then the probability distribution function gives the probability that X takes the value less
than equal to x.
We represent the probability distribution as, F(x) = P (X ≤ x)

Probability Distribution Function is also called Cumulative Distribution Function(CDF), The CDF
represents the cumulative probability up to a certain value of the random variable.
The cumulative probability for a closed interval(a, b] is given by:

P(a < X ≤ b) = F(b) – F(a)

Note: For probability distribution function the value of the variable lies between 0 and 1: 0 ≤ F(x) ≤
1
Related Reads: Probability Distribution

Probability Distribution Function (PDF) Formula


The probability distribution function formula gives the probability of all the possible outcomes of any
random variable. Depending on the type of random variable (discrete or continuous), the formulas for
the probability distribution function can differ.
Different formulas for the probability distribution function are listed beolw:

Probability Distribution of a Discrete Random Variable

Discrete Random Variable is the variable that takes distinct countable values are 0, 1, 2, 3 ... The
formula for the probability distribution of a discrete random variable is,

[Link] 1/7
4/12/26, 8:01 AM Probability Distribution Function - GeeksforGeeks

Probability Distribution Function:

F(x) = P (X ≤ x)

Probability Distribution of a Continuous Random Variable

A continuous Random Variable is a variable that takes infinitely many values. The formula for the
probability distribution of a continuous random variable is,
Probability Distribution Function: F(x) = P (X ≤ x)

Additionally, the Probability Density Function (PDF) is the derivative of the CDF:

f(x) = d/dx (F(x))


where,
• F(x) = ∫x-∞ f(u)du

Normal Probability Distribution Formula

The Normal Distribution, also known as the Gaussian distribution, is commonly represented by a
bell-shaped curve. The formula for a normal probability distribution is:

(x−μ)2
P (x) = 1
2πσ 2


e− 2σ 2

where,
• μ is the Mean
• σ is the Standard Distribution
• x is the Normal random variable

Note: If mean(μ) = 0 and standard deviation(σ) = 1, then this distribution is called the Normal
Distribution.

Binomial Probability Distribution Formula

The Binomial Distribution describes the probability of exactly r successes in n independent trials,
where each trial has a probability p of success and 1 − p of failure. The formula for the binomial
probability distribution is:

P(r out of n) = n!/r!(n − r)! × pr(1 − p)n - r = nCr × pr(1 − p)n−r


where,
• n is the Total number of events
• r is the Total number of successful events
• p is the Probability of success on a single trial
• 1 – p is the Probability of failure

Note: The binomial coefficient(nr) is given by: nCr = n!/r!(n – r)!

Probability Distribution Graph

[Link] 2/7
4/12/26, 8:01 AM Probability Distribution Function - GeeksforGeeks

The graph that plot the Probability Distribution Functions are called the Probability Distribution
graphs. These graphs help us to visualize the probability distribution around a random variable and
help us to easily find the required solution.

The sum of all the probabilities in any discrete distribution is one and for a continuous distribution of
random variables the area under the graph is equal to 1. The distribution graph of the continuous
distribution function is added below, where X (the random variable) lies between a and b. It is made
using the Probability Density Function

For discrete random variables, the probability distribution is given using the Bernoulli distribution.

Probability Distribution Function and Probability Density Function


We easily describe the Probability distribution using the Probability Distribution Function and
Probability Density Function. Using a probability distribution function is very useful for both
continuous probability distribution and discrete probability distribution, while the probability density
function(pdf) is only used for continuous probability distribution.

Articles related to Probability Distribution Function:

Poisson Distribution
Bernoulli Trials
Binomial Distribution

Uses of Probability Distribution Function


Statistical Inference: PDFs are fundamental in statistical inference, allowing for the estimation of
population parameters and hypothesis testing.
Modeling and Simulations: PDFs are used to model real-world phenomena and to simulate
random processes in fields like engineering, finance, and the natural sciences.
Risk Assessment: In finance and insurance, PDFs help assess risks and determine the likelihood of
various financial outcomes.

Probability Distribution Function Examples


Example 1: Suppose we toss two dice. Make a table of the probabilities for the sum of the dice.
The possibilities are: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
Solution:
[Link] 3/7
4/12/26, 8:01 AM Probability Distribution Function - GeeksforGeeks

Probability Distribution Table

X P(x)

2 1/36

3 2/36

4 3/36

5 4/36

6 5/36

7 6/36

8 5/36

9 4/36

10 3/36

11 2/36

12 1/36

Example 2: The number of old people living in houses on a randomly selected city block is
described by the following probability distribution.

Number of adults Probability

(x) P(x)

3 0.50

4 0.25

5 0.10

6 ?

What is the probability that 6 or more old people live in a randomly selected house?
Solution:

Sum of all the p(probability) is equal to 1


Probability that six or more old peoples live in a house,
= 1 - (0.50 + 0.25 + 0.10)
= 0.15
[Link] 4/7
4/12/26, 8:01 AM Probability Distribution Function - GeeksforGeeks
Thus, probability that six or more old peoples live in a house is equal to 0.15

Example 3: When a fair coin is tossed 8 times, then the Probability of:

Exactly Four Heads


At least Four Heads

Solution:

Every coin tossed can be considered as the Bernoulli trial. Suppose X be the number of heads in
this experiment,
n=8
p = 1/2
So,
P(X = x) = nCx pn - x (1 - p)x, x = 0, 1, 2, 3,...n
P(X = x) = 8Cxp8 - x(1 - p)x
P(Exactly 4 Heads)
= P(x = 4)
= 8C4 p4 (1 - p)4
= 8!/4!4!(1/2)4(1/2)4
= (8 × 7 × 6 × 5/2 × 3 × 4) × (1/16) × (1/16)
= 420/1536
= 35/128
Thus, the probability of Exactly Four Heads in a Eight Coin Toss experiment is 35/128
P(At Least 4 Heads)
= P(X >= 4)
= P(X = 4) + P(X = 5) + P(X = 6)+ P(X = 7) + P(X = 8).
= 8C4 p4 (1 - p)4 + 8C5 p3 (1 - p)5 + 8C6 p2 (1 - p)6 + 8C7 p1(1 - p)7 + 8C8(1 - p)8
= 8!/4!4!(1/2)8 + 8!/5!3!(1/2)8 + 8!/6!2!(1/2)8 + 8!/7!1!(1/2)8 + 8!/8!(1/2)8
= 8 × 7 × 6 × 5/4 × 3 × 2 × 256 + 8 × 7 × 6/3 × 2 × 256 + 8/256 + 1/256
= 1680/6144 + 336/1536 + 9/256
= 70/256 + 56/256 + 9/256
= 135/256
Thus, the probability of Atleast Four Heads in a Eight Coin Toss experiment is 135/256

Example 4: Calculate the probability of getting 10 heads, if a coin is tossed 12 times.


Solution:

Given,
Number of Trials(n) = 12
Number of Success(r) = 10 (getting 10 heads)
Probability of Single Head(p) = 1/2 = 0.5

To find nCr = n!/r!(n – r)!


etic Algebra Set Theory Probability Statistics Geometry Calculus Logarithms Mensuration Matrices Tr Sign In
= 12!/10!(12 – 10)!
= (12 × 11 × 10!)/10!2!
= 66
To find pr = (0.5)10 = 0.00097665625
So, the probability of getting 10 heads is:
P(x) = nCr pr (1 - p)n - r
= 66 × 0.00097665625 × (1 – 0.5)(12-10)
[Link] 5/7
4/12/26, 8:01 AM Probability Distribution Function - GeeksforGeeks
= 0.0644593125 × (0.5)2
= 0.016114828125
The probability of getting 10 heads = 0.0161...

Example 5: Suppose that each time you take a free throw shot, you have a 35% chance of making
it. If you take 25 shots, what is the probability of making exactly 15 of them?
Solution:

Given,
n = 25
r = 15
p = 0.35
q = 0.65

Compute
C25,15 (0.35)15 (0.65)10 = 0.165
There is a 16.5% chance of making exactly 15 shots.

Example 6: There is a total of 5 people in the room, what is the possibility that someone in the
room shares His / Her birthday with at least someone else?
Solution:

P(s) = p(At least someone shares with someone else)


P(d) = p(No one share their birthday everyone has a different birthday)
p(s) + p(d) = 1 or 100%
p(s) =100% - p(d)
There are 5 people in the room, the possibility that no one shares his/her birthday
= (365 × 364 × 363 × 362 × 361) ⁄ (365)5
= (365! ⁄ (365 - 5)!) ⁄ 3655
= (365! ⁄ 360!) ⁄ 3655
= 0.9728
p(d) = 0,9728 or 97.28%
p(s) = 100% - p(d)
= 100% - 97.28% or 1 - 0.9728
= 2.72% ≈ 0.0272

Practice Questions on the Probability Distribution Function


Q1: Find the Probability Distribution of the the Number of Heads when two coins are tossed
Simultaneously.
Q2: What is the Probability Distribution of the of number of Kings when three cards are drawn at
random.
Q3: A die is thrown twice. Find the probability of getting a number of sixes.

Q4: A coin is thrown until a tail appears or the the head appears three times continuously. Find the
probability distribution of tosses.

[Link] 6/7
4/12/26, 8:02 AM Binomial Distribution in Probability - GeeksforGeeks
Courses
Search... Tutorials Sign In
Interview Prep

Binomial Distribution in Probability


Last Updated : 17 Dec, 2025

Binomial Distribution is a probability distribution used to model the number of successes in a fixed
number of independent trials, where each trial has only two possible outcomes: success or failure. This
distribution is useful for calculating the probability of a specific number of successes in scenarios like
flipping coins, quality control, or survey predictions.

Example: Imagine we toss a coin 5 times. Each toss can only give us a head or a tail, and the
chance of getting a head stays the same every time. Also, what happens in one toss doesn’t
affect the next one. Now, if we want to know the chance of getting exactly 3 heads out of these
5 tosses, this is a situation where we use the binomial distribution.

Binomial Distribution is based on Bernoulli trials, where each trial has an independent and identical
chance of success.

etic Algebra Set Theory Probability Statistics Geometry Calculus Logarithms Mensuration Matrices Tr Sign In

Binomial Distribution Graph

Conditions for Binomial Distribution


The Binomial distribution can be used in scenarios where the following conditions are satisfied:

1. Fixed Number of Trials: There is a set number of trials or experiments (denoted by n), such as
flipping a coin 10 times.
2. Two Possible Outcomes: Each trial has only two possible outcomes, often labeled as "success" and
"failure." For example, getting heads or tails in a coin flip.
3. Independent Trials: The outcome of each trial is independent of the others, meaning the result of
one trial does not affect the result of another.
4. Constant Probability: The probability of success (denoted by p) remains the same for each trial. For
example, if you’re flipping a fair coin, the probability of getting heads is always 0.5.

[Link] 1/10
4/12/26, 8:02 AM Binomial Distribution in Probability - GeeksforGeeks

The Binomial distribution is an appropriate model to use for calculating the probabilities of obtaining a
certain number of successes in the given trials.

Binomial Distribution Formula


The Binomial Distribution Formula, which is used to calculate the probability, for a random variable X
= 0, 1, 2, 3,....,n is given as

P(X = r) = nCr pr (1-p) n-r, r = 0, 1, 2, 3....

Where,

n = Total number of trials


r = Number of successes
p = Probability of success

Example : A fair coin is tossed 3 times. Find the probability of getting exactly 2 heads.
Solution :

Number of trials, n = 3
Probability of getting head (success), p = 0.5 ; Probability of getting tail (failure), q = 1 − p = 0.5
Required number of successes, r = 2
P(X = r) = nCr pr (1-p) n-r
P(X = 2) = 3C2 (0.5) 2 (0.5) 1 = 3 x 0.25 x 0.5 = 0.375 or 37.5 %

Binomial Random Variable

A binomial random variable X counts the number of "successes" in n independent trials, with two
outcomes in each trial: success (with probability p) or failure (with probability 1−p) and constant
probability p across all trials.
Example:

A fair coin is flipped 20 times;


Success: "Heads" (p=0.5).
Random variable X: Number of heads observed in 20 flips.
Distribution: X∼Binomial (n=20,p=0.5).
Probability of Getting exacly 10 heads is given by, (r=10)
P (X = 10) =10 C20 (0.5)10 (0.5)10 ≈ 0.176(17.6%)

Negative Binomial Distribution


The Negative Binomial Distribution is used to model the number of trials needed to achieve a certain
number of successes in a sequence of independent trials, where the probability of success in each trial
is constant.

For example, consider a situation where getting 6 is the success of throwing a die. Now if we throw
the die and not get 6 then it is a failure. Now we throw again and do not get 6. Let's say we don't get
6 for three successive attempts and 6 is obtained in the fourth attempt and onwards then the binomial
distribution of the number of getting 6 is called the Negative Binomial Distribution.
[Link] 2/10
4/12/26, 8:02 AM Binomial Distribution in Probability - GeeksforGeeks

Negative Binomial Distribution Formula

The formula for Negative Binomial Distribution is given as

P(x) = n+r-1Cr-1 pr(1-p) n

Where,

n = Total Number of Trials.


r = Number of Trials in which we get the first success.
p = Probability of Success in Each Trial.
(1-p) = Probability of Failure in Each Trial.

Bernoulli Trials in Binomial Distribution


Bernoulli Trial are a sequence of independent experiments, where each experiment (or trial) results in
exactly two possible outcomes:

Success (with probability p)


Failure (with probability 1−p)

A random experiment is called Bernoulli Trial if it satisfies the following conditions:

Trials are finite in number


Trials are independent of each other
Each trial has only two possible outcomes
The probability of success and failure in each trial is the same.

The binomial distribution models the number of successes in a fixed number of Bernoulli trials.

Binomial Distribution Calculation


Binomial Distribution in statistics is used to compute the probability of likelihood of an event using the
above formula. To calculate the probability using binomial distribution we need to follow the following
steps:

Step 1: Find the number of trials and assign it as 'n'.


Step 2: Find the probability of success in each trial and assign it as 'p'
Step 3: Find the probability of failure and assign it as q where q = 1-p
Step 4: Find the random variable X = r for which we have to calculate the binomial
distribution
Step 5: Calculate the probability of Binomial Distribution for X = r using the Binomial
Distribution Formula.

The use of the above steps has been illustrated using an example below:

Binomial Distribution Examples


Finding the probability of getting exactly 6 heads when a fair coin is flipped 10 times.
Finding the probability of exactly 3 bulbs being defective when a batch of 100 bulbs is tested and
each bulb has a 2% chance of being defective.

[Link] 3/10
4/12/26, 8:02 AM Binomial Distribution in Probability - GeeksforGeeks

To find the Probability of exactly 7 patients responding positively to the treatment when the drug is
tested on 8 patients and has a 90% success rate.

Let's say we toss a coin twice, and getting head is a success we have to calculate the probability of
success and failure then, in this case, we will calculate the probability distribution as follows:

In each trial getting a head that is a success, its probability is given as:

p = 1/2
n = 2 as we throw a coin twice
r = 0 for no success, r = 1 for getting head once and r = 2 for getting head twice

Probability of failure q = 1 - p = 1 - 1/2 = 1/2.


P(Getting 1 head) = P(X = 1) = ncrprqn-r = 2c1 (1/2)1(1/2)1 = 2 ⨯ 1/2 ⨯ 1/2 = 1/2
P(Getting 2 heads) = P(X = 2) = 2c2(1/2)2(1/2)0 = 1/4
P(Getting 0 heads) = P(X = 0) = 2c0(1/2)0(1/2)2 = 1/4

Random Variable (X = r) P(X = r)

X = 0 (Getting 0 Head) 1/4

X = 1 (Getting 1 Head) 1/2

X = 2 (Getting 2 Head) 1/4

As of now, we know that Binomial Distribution is calculated for the Random Variables obtained in
Bernoulli Trials. Hence, we should understand these terms.

Binomial Distribution Visualization


Binomial Distribution Graph is plotted for X and P(X). We will plot a Binomial Distribution Graph for
tossing a coin twice where getting the head is a success. If we toss a coin twice, the possible outcomes
are {HH, HT, TH, TT}.

The Binomial Distribution Table for this is given below:

X (Random Variable) P(X)

X = 0 (Getting no head) {TT} P(X = 0) = 1/4 = 0.25

X = 1 (Getting 1 head) {HT, TH} P(X = 1) = 2/4 = 1/2 = 0.5

X = 2 (Getting two heads) {HH} P(X = 2) = 1/4 = 0.25

Binomial Distribution Graph for the above table is given below:

[Link] 4/10
4/12/26, 8:02 AM Binomial Distribution in Probability - GeeksforGeeks

Binomial Distribution in Statistics


Measures of central tendency, specifically the mean, provide insights into the distribution's central or
typical value for the number of successes in a series of independent trials. For a binomial distribution
defined by parameters n (number of trials) and p (probability of success on each trial), the measures of
central tendency are characterized as follows:

Binomial Distribution Mean


Binomial Distribution Variance
Binomial Distribution Standard Deviation

Measure of Central Tendency for Binomial Distribution


The formulas for Mean, Variance, and Standard Deviation of Binomial Distribution are listed below:

Binomial Distribution Mean

The Mean of Binomial Distribution is the measurement of average success that would be obtained in
the 'n' number of trials. The Mean of Binomial Distribution is also called Binomial Distribution
Expectation(Expected Value or Expectation). The formula for Binomial Distribution Expectation is
given as:

μ = n.p

where,

μ is the Mean or Expectation


n is the Total Number of Trials
p is the Probability of Success in Each Trial

Example: If we toss a coin 20 times and getting head is the success then what is the mean of
success?
Solution:

[Link] 5/10
4/12/26, 8:02 AM Binomial Distribution in Probability - GeeksforGeeks

Total Number of Trials n = 20


Probability of getting head in each trial, p = 1/2 = 0.5
Mean = n.p = 20 ⨯ 0.5
It means on average we would get head 10 times on tossing a coin 20 times.

Binomial Distribution Variance

Varianceof Binomial Distribution tells about the dispersion or spread of the distribution. It is given by
the product of the number of trials, probability of success, and probability of failure. The formula for
Variance is given as follows:

σ2 = n.p.q

where

σ2is Variance
n is the Total Number of Trials
p is the Probability of Success in Each Trial
q is the Probability of Failure in Each Trial

Example: If we toss a coin 20 times and getting head is the success then what is the variance of the
distribution?
Solution:

We have, n = 20
Probability of Success in each trial (p) = 0.5
Probability of Failure in each trial (q) = 0.5
Variance of the Binomial Distribution, σ = n.p.q = (20 ⨯ 0.5 ⨯ 0.5) = 5

Binomial Distribution Standard Deviation

Standard Deviation of Binomial Distribution tells about the deviation of the data from the mean.
Mathematically, Standard Deviation is the square root of the variance. The formula for the Standard
Deviation of Binomial Distribution is given as

σ= n⋅p⋅q ​

where,

σ is the Standard Deviation


n is the Total Number of Trials
p is the Probability of Success in Each Trial
q is the Probability of Failure in Each Trial

Example: If we toss a coin 20 times and getting head is the success then what is the standard
deviation?
Solution:

[Link] 6/10
4/12/26, 8:02 AM Binomial Distribution in Probability - GeeksforGeeks

We have, n = 20
Probability of Success in each trial (p) = 0.5
Probability of Failure in each trial (q) = 0.5
Standard Deviation of the Binomial Distribution, σ = √n.p.q
⇒ σ = √(20 ⨯ 0.5 ⨯ 0.5)
⇒ σ = √5 = 2.23

Binomial Distribution Applications


Binomial Distribution is used where we have only two possible outcomes. Let's see some of the areas
where Binomial Distribution can be used.

To find the number of male and female students in an institute.


To find the likeability of something in Yes or No.
To find defective or good products manufactured in a factor.
To find positive and negative reviews on a product.
Votes are collected in the form of 0 or 1.

Binomial Distribution vs Normal Distribution


Binomial Distribution differs from the Normal Distribution in many aspects. The key differences and
characteristics of the Binomial and Normal distributions are highlighted in the following table:

Binomial Distribution Normal Distribution

Discrete probability distribution Continuous probability distribution

Two possible outcomes per trial (success or failure) Infinite possible outcomes within a continuous range

Varies depending on n and p; typically skewed


Bell-shaped curve (symmetric)
unless p=0.5 and n is large

x can take integer values from 0 to n x can take any real number (from −∞ to +∞)

μ = np
μ (mean; center of the curve, given directly)
(n = number of trials, p = success probability)

𝝈 2 = np(1 -p) 𝝈 2 (variance; spread, given directly)

Used for modeling the number of successes in a Used for modeling continuous data that cluster
fixed number of independent trials around a mean

Flipping coins, quality control (defective items) Heights of people, test scores, measurement errors

Approximates Normal distribution for large n and p Considered the limit of the Binomial Distribution as n
not too close to 0 or 1 becomes large and p is near 0.5

[Link] 7/10
4/12/26, 8:02 AM Binomial Distribution in Probability - GeeksforGeeks

Related Articles

Probability Theory
Probability Distribution Function
Baye's Theorem
Binomial Distribution in Business Statistics

Binomial Distribution in Probability Examples


Example 1: A die is thrown 6 times and if getting an even number is a success what is the probability
of getting
(i) 4 Successes
(ii) No success
Solution:

Given: n = 6, p = 3/6 = 1/2, and q = 1 - 1/2 = 1/2


P(X = r) = nCrprqn-r
(i) P(X = 4) = 6C4(1/2)4(1/2)2 = 15/64
(ii) P(X = 0) = 6C0(1/2)0(1/2)6 = 1/64

Example 2: A coin is tossed 4 times what is the probability of getting at least 2 heads?
Solution:

Given: n = 4
Probability of getting head in each trial, p = 1/2 ⇒ q = 1 - 1/2 = 1/2
P(X = r) = 4Cr(1/2)r(1/2)4-r
⇒ P(X = r) = 4Cr(1/2)4 {Using the laws of Exaponents}
And we know, Probability of getting at least 2 heads = P(X ≥ 2)
⇒ Probability of getting at least 2 heads = P(X = 2) + P(X = 3) + P(X = 4)
⇒ Probability of getting at least 2 heads = 4C2(1/2)4 + 4C3(1/2)4 + 4C4(1/2)4
⇒ Probability of getting at least 2 heads = (4C2 + 4C3 + 4C4)(1/2)4
⇒ Probability of getting at least 2 heads = 11(1/2)4 = 11/16

Example 3: A pair ofdice is thrown 6 times and getting sum 5 is a success then what is the probability
of getting (i) no success (ii) two success (iii) at most two success
Solution:

Given: n = 6
5 can be obtained in 4 ways (1, 4) (4, 1) (2, 3) (3, 2)
Probability of getting the sum 5 in each trial, p = 4/36 = 1/9
Probability of not getting sum 5 = 1 - 1/9 = 8/9
(i) Probability of getting no success, P(X = 0) = 6C0(1/9)0(8/9)6 = (8/9)6
(ii) Probability of getting two success, P(X = 2) = 6C2(1/9)2(8/9)4 = 15(84/96)
(iii) Probability of getting at most two successes, P(X ≤ 2) = P(X = 0) + P(X = 1) + P(X = 2)
⇒ P(X ≤ 2) = (8/9)6 + 6(85/96) + 15(84/96)

Practice Problems on Binomial Distribution in Probability


[Link] 8/10
4/12/26, 8:02 AM Binomial Distribution in Probability - GeeksforGeeks

1. A box has 5 red, 7 black,? and 8 white balls. If three balls are drawn one by one with
replacement what is the probability that all,
i) all are white
ii) all are red
iii) all are black
2. What is the probability distribution of the number of tails when three coins are tossed together?
3. A die is thrown three times what is the probability distribution of getting six?
4. A coin is tossed 4 times then what is the probability distribution of getting head.

Binomial Distribution in Probability | Formula, Definition & Examples

Comment K kaurba… 6

Article Tags: Mathematics School Learning Class 12 Probability +1 More

Explore
Basic Arithmetic
Algebra
Geometry
Trigonometry & Vector Algebra
Calculus
Probability and Statistics
Practice

[Link] 9/10
4/12/26, 8:02 AM Geometric Distribution - GeeksforGeeks
Courses
Search... Tutorials Sign In
Interview Prep

Geometric Distribution
Last Updated : 7 Jan, 2026

A geometric distribution is a discrete probability distribution that gives the probability that the first
success occurs on a specific trial in a sequence of independent Bernoulli trials, where each trial has
two outcomes—success or failure—and the probability of success p remains constant across trials.

Geometric distributions are probability distributions that are based on three key assumptions.

Trials are independent


Each trial has one of two outcomes: success or failure
For each trial, the probability of success, p, is constant across trials.

Example: Imagine you toss a fair coin repeatedly.


Getting a head = success
Getting a tail = failure

If you want to find the probability that the first head appears on the 4th toss, this situation
follows a geometric distribution.

The geometric distribution is commonly used in various real-life circumstances. In the financial
industry, it is used to estimate the financial rewards of making a given decision in a cost-benefit
analysis.

Geometric Distribution Formulas


The geometric distribution is characterized by two important functions: the Probability Mass Function
(PMF) and the Cumulative Distribution Function (CDF). These formulas help calculate the likelihood
of achieving the first success after a certain number of trials. Below are the key formulas associated
with the geometric distribution:

[Link] 1/5
4/12/26, 8:02 AM Geometric Distribution - GeeksforGeeks

Geometric Distribution Formulas

Geometric Distribution PMF

The likelihood that a discrete random variable, X, will be exactly identical to some value, x, is
determined by the probability mass function.
etic Algebra Set Theory Probability Statistics Geometry Calculus Logarithms Mensuration Matrices Tr Sign In
P (X = x) = (1 - p)x -1p

where, 0 < p ≤ 1.

Geometric Distribution CDF

The probability that a random variable, X, will assume a value that is less than or equal to x can be
described as the cumulative distribution function of a random variable, X, that is assessed at a point, x.
The distribution function is another name for it.

P(X ≤ x) = 1 - (1 - p)x

Mean of Geometric Distribution

The geometric distribution's mean is also the geometric distribution's expected value. The weighted
average of all values of a random variable, X, is the expected value of X.

E[X] = 1 / p

Variance of Geometric Distribution

Variance is a measure of dispersion that examines how far data in a distribution is spread out about
the mean.

Var[X] = (1 - p) / p2

Standard Deviation of Geometric Distribution


[Link] 2/5
4/12/26, 8:02 AM Geometric Distribution - GeeksforGeeks

The square root of the variance can be used to calculate the standard deviation. The standard
deviation also indicates how far the distribution deviates from the mean.

S.D. = √VAR[X]
S.D. = √1 - p / p

Related Articles:

Probability Theory
Binomial Distribution
Negative Binomial Distribution
Probability Distribution Function

Sample Problems on Geometric Distribution


Problem 1: If a patient is waiting for a suitable blood donor and the probability that the selected
donor will be a match is 0.2, then find the expected number of donors who will be tested till a
match is found, including the matched donor.
Solution:

Given,
p = 0.2
E[X] = 1 / p
= 1 / 0.2
=5
The expected number of donors who will be tested till a match is found is 5

Problem 2: Suppose you are playing a game of darts. The probability of success is 0.4. What is the
probability that you will hit the bullseye on the third try?
Solution:

Given,
p = 0.4
P(X = x) = (1 - p)x - 1p
P(X = 3) = (1 - 0.4)3 - 1(0.4)
P(X = 3) = (0.6)2(0.4)
= 0.144
The probability that you will hit the bullseye on the third try is 0.144

Problem 3: A light bulb manufacturing factory finds 3 in every 60 light bulbs defective. What is the
probability that the first defective light bulb with be found when the 6th one is tested?
Solution:

Given,
p = 3 / 60 = 0.05
P(X = x) = (1 - p)x - 1p
P(X = 6) = (1 - 0.05)6 - 1(0.05)
P(X = 6) = (0.95)5(0.05)
P(X = 6) = 0.0386
The probability that the first defective light bulb is found on the 6th trial is 0.0368

[Link] 3/5
4/12/26, 8:02 AM Geometric Distribution - GeeksforGeeks
Problem 4: Find the probability density of the geometric distribution if the value of p is 0.42; x =
1,2,3, and also calculate the mean and variance.
Solution:

Given that p = 0.42 and the value of x = 1, 2, 3


The formula of probability density of geometric distribution is
P(x) = p (1 - p) x-1; x = 1, 2, 3
P(x) = 0; otherwise
P(x) = 0.42 (1 - 0.42)
P(x) = 0; Otherwise
Mean= 1/p
= 1/0.42
= 2.380
Variance = 1 - p/p2
= 1 - 0.42 /(0.42)2
= 3.287

Problem 5: If the probability of breaking the pot in the pool is 0.4, find the number of breaks before
success and the corresponding variance and standard deviation.
Solution:

Here,
X ∼ geo(0.4)
Hence,
e(x) = 1/0.4 = 2.5
Var(x) = 0.6/0.4²
= 3.75
Hence, standard deviation ( σ) = 1.94

Geometric Distribution | Definition, PMF, Formula & Examples

Comment M mande… 2

Article Tags: Mathematics School Learning Commerce Probability

[Link] 4/5
4/12/26, 8:05 AM Normal Distribution - GeeksforGeeks
Courses
Search... Tutorials Sign In
Interview Prep

Normal Distribution
Last Updated : 27 Dec, 2025

Normal Distribution is the most common or normal form of distribution of Random Variables, hence
the name "normal distribution." It is also called the Gaussian Distribution in Statistics or Probability.
We use this distribution to represent a large number of random variables. It serves as a foundation for
statistics and probability theory.

It also describes many natural phenomena, forms the basis of the Central Limit Theorem, and supports
numerous statistical methods.

Example: Imagine a class where students take a math test. Most students score close to the
average mark, and only a few score very low or very high. If we want to describe how these
marks are spread around the average in a bell-shaped pattern, this is a situation where we use
the normal distribution.

Normal distribution is a continuous probability distribution that is symmetric about the mean, depicting
that data near the mean are more frequent in occurrence than data far from the mean.

Fig 1: Normal Distribution

As shown in Fig 1, the distribution is symmetric about its center, which is the mean (0 in this
case). This symmetry means that events equidistant from the mean have equal probabilities. The
density is highest near the mean, resulting in lower probabilities for values farther away from it.

We define Normal Distribution as the probability density function of any continuous random variable
for any given system. Now for defining Normal Distribution suppose we take f(x) as the probability
density function for any random variable X.

The area under the curve of a normal distribution is always 1.

[Link] 1/8
4/12/26, 8:05 AM Normal Distribution - GeeksforGeeks

The curve traced by the upper values of the Normal Distribution is in the shape of a Bell, hence
Normal Distribution is also called the "Bell Curve".

Normal Distribution Formula


The formula for the probability density function of the Normal Distribution (Gaussian Distribution) is
added below:

Probability Density Formula for Normal Distribution

where,
x is Random Variable
μ is Mean
σ is Standard Deviation

Normal Distribution Characteristics


Symmetry: The normal distribution is symmetric around its mean. This means the left side of the
distribution mirrors the right side.
Mean, Median, and Mode: In a normal distribution, the mean, median, and mode are all equal and
located at the center of the distribution.
Bell-shaped Curve: The curve is bell-shaped, indicating that most of the observations cluster
around the central peak and the probabilities for values further away from the mean taper off
equally in both directions.
Standard Deviation: The spread of the distribution is determined by the standard deviation. About
68% of the data falls within one standard deviation of the mean, 95% within two standard
deviations, and 99.7% within three standard deviations.

Normal Distribution Examples


We can draw a Normal Distribution for various types of data that include,

Distribution of Height of People.


Distribution of Errors in any Measurement.
Distribution of Blood Pressure of any Patient, etc.

[Link] 2/8
4/12/26, 8:05 AM Normal Distribution - GeeksforGeeks

Normal Distribution Curve


In a Normal Distribution, a random variable (X) is a numerical outcome of a process that follows this
distribution. The values of X are not fixed but instead vary according to the distribution’s properties,
where:

The variable is continuous (can take any real value within a range).
The distribution is defined by its mean (μ) - the peak of the curve and standard deviation (σ) - which
controls the spread of the curve.

The Normal Distribution Curve (also called the Bell Curve or Gaussian Curve) is the graphical
representation of this distribution, showing:

1. Symmetry around the mean (μ).


2. 68-95-99.7% Rule (Empirical Rule) for data spread.
3. Asymptotic tails (the curve never touches the x-axis but extends infinitely).

Unlike some distributions, the normal distribution is not strictly "bound" to a finite range—it
theoretically spans from −∞ to +∞, though extreme values are highly improbable.

An example of the random variable is, suppose we take a distribution of the height of students in a
class, then the random variable can take any value in this case, but is bound by a boundary of 2 ft to 6
ft, as it is generally forced physically.

Standard Deviation of Normal Distribution


The mean of any data spread out as a graph helps us to find the line of symmetry of the graph.
Standard Deviation tells us how far the data is spread out from the mean value on either side.

For smaller values of the standard deviation, the values in the graph come closer and the graph
becomes narrower.
For higher values of the standard deviation, the values in the graph are dispersed more, and the
graph becomes wider.

Empirical Rule of Standard Deviation

Generally, the normal distribution has a positive standard deviation, and the standard deviation divides
the area of the normal curve into smaller parts, and each part defines the percentage of data that falls
into a specific region. This is called the Empirical Rule of Standard Deviation in Normal Distribution.

Empirical Rule states that,


68% of the data approximately fall within one standard deviation of the mean, i.e. it falls
between {Mean - One Standard Deviation, and Mean + One Standard Deviation}
95% of the data approximately fall within two standard deviations of the mean, i.e. it falls
between {Mean - Two Standard Deviation, and Mean + Two Standard Deviation}
99.7% of the data approximately fall within a third standard deviation of the mean, i.e. it falls
between {Mean - Third Standard Deviation, and Mean + Third Standard Deviation}

[Link] 3/8
4/12/26, 8:05 AM Normal Distribution - GeeksforGeeks

Studying the graph, it is clear that using the Empirical Rule, we distribute data broadly in three parts.
Thus, the empirical rule is also called the "68 – 95 – 99.7" rule. The curve is perfectly symmetric
around the mean (μ), which is located at the center and marks the highest point of the curve. This
mean represents the average value of the datasheet. This distribution is commonly used in real-world
statistics to represent things like test scores, height, and measurement errors, where most of the
values tend to cluster around the average, and extreme values are less common.

Normal Distribution Table


Normal Distribution Table, which is also called Normal Distribution Z Table, is the table of z-values for
normal distribution. This Normal Distribution Z Table is given as follows:

Z- 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09


Value

0 0 0.004 0.008 0.012 0.016 0.0199 0.0239 0.0279 0.0319 0.0359

0.1 0.0398 0.0438 0.0478 0.0517 0.0557 0.0596 0.0636 0.0675 0.0714 0.0753

0.2 0.0793 0.0832 0.0871 0.091 0.0948 0.0987 0.1026 0.1064 0.1103 0.1141

0.3 0.1179 0.1217 0.1255 0.1293 0.1331 0.1368 0.1406 0.1443 0.148 0.1517

etic Algebra Set Theory Probability Statistics Geometry Calculus Logarithms Mensuration Matrices Tr Sign In
0.4 0.1554 0.1591 0.1628 0.1664 0.17 0.1736 0.1772 0.1808 0.1844 0.1879

0.5 0.1915 0.195 0.1985 0.2019 0.2054 0.2088 0.2123 0.2157 0.219 0.2224

0.6 0.2257 0.2291 0.2324 0.2357 0.2389 0.2422 0.2454 0.2486 0.2517 0.2549

0.7 0.258 0.2611 0.2642 0.2673 0.2704 0.2734 0.2764 0.2794 0.2823 0.2852

0.8 0.2881 0.291 0.2939 0.2967 0.2995 0.3023 0.3051 0.3078 0.3106 0.3133

0.9 0.3159 0.3186 0.3212 0.3238 0.3264 0.3289 0.3315 0.334 0.3365 0.3389

[Link] 4/8
4/12/26, 8:05 AM Normal Distribution - GeeksforGeeks

Z- 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09


Value

1 0.3413 0.3438 0.3461 0.3485 0.3508 0.3531 0.3554 0.3577 0.3599 0.3621

1.1 0.3643 0.3665 0.3686 0.3708 0.3729 0.3749 0.377 0.379 0.381 0.383

1.2 0.3849 0.3869 0.3888 0.3907 0.3925 0.3944 0.3962 0.398 0.3997 0.4015

1.3 0.4032 0.4049 0.4066 0.4082 0.4099 0.4115 0.4131 0.4147 0.4162 0.4177

1.4 0.4192 0.4207 0.4222 0.4236 0.4251 0.4265 0.4279 0.4292 0.4306 0.4319

1.5 0.4332 0.4345 0.4357 0.437 0.4382 0.4394 0.4406 0.4418 0.4429 0.4441

1.6 0.4452 0.4463 0.4474 0.4484 0.4495 0.4505 0.4515 0.4525 0.4535 0.4545

1.7 0.4554 0.4564 0.4573 0.4582 0.4591 0.4599 0.4608 0.4616 0.4625 0.4633

1.8 0.4641 0.4649 0.4656 0.4664 0.4671 0.4678 0.4686 0.4693 0.4699 0.4706

1.9 0.4713 0.4719 0.4726 0.4732 0.4738 0.4744 0.475 0.4756 0.4761 0.4767

2 0.4772 0.4778 0.4783 0.4788 0.4793 0.4798 0.4803 0.4808 0.4812 0.4817

Applications of Normal Distribution in Computer Science


Feature Scaling (Standardization) in Machine Learning
Data is transformed to have μ = 0, σ = 1 (Z-score normalization).
Improves the performance of algorithms like SVM, KNN, and Neural Networks.

Bayesian Inference & Probabilistic Models


Assumes Gaussian priors in Bayesian networks.
Used in Gaussian Mixture Models (GMM) for clustering.

Anomaly Detection
Outliers are detected if they fall beyond μ ± 3σ.
Used in fraud detection, network security.

Gaussian Blurring
Applies a normal-distributed kernel to smooth images.
Reduces noise while preserving edges.

Diffusion Models (Generative AI)


Noise is added/removed in a Gaussian process (e.g., Stable Diffusion).

[Link] 5/8
4/12/26, 8:05 AM Normal Distribution - GeeksforGeeks

Solved Examples of Normal Distribution


Let's solve some problems with Normal Distribution.

Example 1: Find the probability density function of the normal distribution of the following data. x = 2,
μ = 3 and σ = 4.
Solution:

Given,
Variable (x) = 2
Mean = 3
Standard Deviation = 4

Using formula of probability density of normal distribution


−(x−μ)2
1
f (x, μ, σ) = σ 2π
e ​


2σ 2

Simplifying,
f(2, 3, 4) = 0.09666703

Example 2: If the value of the random variable is 4, the mean is 4, and the standard deviation is 3,
then find the probability density function of the Gaussian distribution.
Solution:

Given,
Variable (x) = 4
Mean = 4
Standard Deviation = 3

Using formula of probability density of normal distribution


−(x−μ)2
1
f (x, μ, σ) = σ 2π
e ​


2σ 2

Simplifying,
f(4, 4, 3) = 1/(3√2π)e0
f(4, 4, 3) = 0.13301

Related Articles

Normal Distribution in Business Statistics


Poisson Distribution
Binomial Distribution
Probability Distribution

Practice Problems on Normal Distribution


Question 1: A normal distribution has a mean of 50 and a standard deviation of 5. What is the
probability that a randomly selected value from this distribution is less than 45?

[Link] 6/8
4/12/26, 8:05 AM Normal Distribution - GeeksforGeeks

Question 2: If a dataset follows a normal distribution with a mean of 100 and a standard deviation of
15, what is the Z-score for a value of 130? Interpret the Z-score.

Question 3: Given a normal distribution with a mean of 70 and a standard deviation of 10, find the
probability that a randomly selected value falls between 60 and 80.

Question 4: In a normally distributed dataset with a mean of 80 and a standard deviation of 10, what
value corresponds to the 90th percentile?

Question 5: A sample of 30 students has an average test score of 78 with a standard deviation of 12.
Assuming the distribution of test scores is normal, what is the probability that the sample mean score
is greater than 82?

Normal Distribution | Definition, Formula, Properties of Normal


Distribution

Comment S satya… 5

Article Tags: Mathematics School Learning Class 12 Math-Statistics +2 More

Explore

[Link] 7/8
4/12/26, 8:02 AM Poisson Distribution - GeeksforGeeks
Courses
Search... Tutorials Sign In
Interview Prep
em and Arithmetic Algebra Set Theory Probability Statistics Geometry Calculus Logarithms Mensuration Matrices Trigonometry

Poisson Distribution
Last Updated : 8 Jan, 2026

The Poisson distribution is a discrete probability distribution that calculates the likelihood of a certain
number of events occurring within a fixed interval of time, assuming the events occur independently.

Example: Emails er Hour


If you receive emails randomly at an average rate of 5 per hour (λ = 5), the Poisson distribution
can tell you the probability of receiving 0 emails, exactly 3 emails, and so on.

To model this, the interval is imagined as divided into tiny subintervals where:

No more than one event can occur.


The probability of one event is proportional to the subinterval’s length.
Events in different subintervals are independent.

It is characterized by a single parameter, λ (lambda), which represents the event's average occurrence
rate in an interval(not a subinterval).

Shape of the Poisson Distribution

The shape of the Poisson distribution depends on the value of λ. As λ increases, the distribution shifts
to the right and becomes more spread out.

Poisson distribution curves for different λ values

Key Assumptions:

[Link] 1/7
4/12/26, 8:02 AM Poisson Distribution - GeeksforGeeks

1. Events occur independently of each other.


2. The average rate of occurrence (λ) is constant over the given interval.
3. The number of events can be any non-negative integer.

Poisson Distribution Formula


Poisson distribution is characterized by a single parameter, lambda (λ), which represents the average
rate of occurrence of the events. The probability mass function of the Poisson distribution is given by:

e−λ λr
P (X = r) = r!

Where,

P(X = r) is the Probability of observing k Events


e is the Base of the Natural Logarithm (approximately 2.71828)
λ is the Average Rate of Occurrence of Events
r is the Number of Events that occur

Recurrence Relation for Poisson Probabilities


In the Poisson distribution, there is a special recursive relationship that allows you to compute the
probability of getting r events based on the probability of getting r−1 events. This relation is given by:

P (X = r) = λr P (X = r − 1) f or r ≥ 1

Example:

Calculate the value for P(X = 8) using the recurrence relation and the value for P(X = 7), where
P(X = 7) = 0.0346, λ = 3 and r = 6.
Solution:P (X = 7) = λr P (6) = 36 0.345 = 0.1725
​ ​

Poisson Distribution Characteristics


Let's discuss some characteristics of Poisson Distributions here.

Expectation and Variance

In the Poisson distribution, both the Expectation(mean) and variance are equal and are denoted by the
parameter λ (lambda). This property of equal mean and variance is a distinctive characteristic of the
Poisson distribution and simplifies its statistical analysis.

Expectation(mean), E(X) = λ and


Variance, V(X) = λ

where

λ = np, (n is the Number of Trials, p is the Probability of Success)

Standard Deviation of Poisson Distribution

[Link] 2/7
4/12/26, 8:02 AM Poisson Distribution - GeeksforGeeks

Standard Deviation of a Poisson distribution is a measure of the amount of variability or dispersion in


the distribution. Mathematically, it is given by:

σ= λ ​

where,

λ (lambda) is the Average Rate of Occurrence of Events


σ (sigma) is the Standard Deviation of the Distribution

Probability Mass Function and Cumulative Distribution Function

Probability Mass Function (PMF) describes the likelihood of observing a specific number of events in
a fixed interval. It is given by:

(e−λ ×λr )
PMF = r! ,r

= 0, 1, 2, …

where,

e is the Base of the Natural Logarithm (approximately 2.71828)


λ is the Parameter, which is also equal to the Mean, and Variance
r is the Number of times an event occurs

Some properties of PMF are:

P ( X = k ) ≥ 0 for all k.
The sum of all probabilities over possible values of k is 1.

Example:

Suppose a hospital receives an average of λ = 4 emergency cases per hour. What is the
probability that exactly 2 cases occur in an hour?
Solution:
Using the Poisson formula:
P (X = 2) = e-4 42 /2! = e-4 ✕ 16/2 = 0.0183 ✕ 16 /2 = 0.1465

Cumulative Distribution Function (CDF): gives the probability that the random variable is less than or
equal to a certain value. It is expressed as:
(e−λ ×λk )
F (x) = ∑k=0
⌊x⌋ ​

k!

where ⌊x⌋ denotes the greatest integer less than or equal to x.

Poisson Distribution Graph


The following illustration shows the Graph of the Poisson Distribution or the Poisson Distribution
Curve.

[Link] 3/7
4/12/26, 8:02 AM Poisson Distribution - GeeksforGeeks

The Poisson distribution is positively skewed (Skewness > 0) and leptokurtic (Kurtosis > 0), meaning
it has a longer tail on the right side and heavier tails than the normal distribution. However, for large
values of λ, it becomes increasingly symmetric and bell-shaped, resembling a normal distribution.

Note: Leptokurtic refers to a distribution that has a higher kurtosis than the normal distribution.
Kurtosis measures the "tailedness" or sharpness of the peak of a frequency distribution curve.

The event with the highest probability is represented by the peak of the distribution—the mode.

When λ is a non-integer, the mode is the closest integer smaller than λ.


When λ is an integer, there are two modes: λ and λ−1.

When λ is low, the distribution is much more distributed on the right side of its peak than on its left
(right-skewed).

As λ increases, the distribution starts to appear more and more similar to a normal distribution. When
λ is 10 or greater, a normal distribution is a good approximation of the Poisson distribution.

Binomial Distribution vs Poisson Distribution


The key differences between the Poisson Distribution and the Binomial Distribution are listed in the
following table:

Binomial Distribution Poisson Distribution

Number of Trials: Fixed (n) Number of Trials: Unlimited

Outcomes are Success or Failure Outcomes are Rare Events

​ e−λ λr ​
P (X = x) = n Cx px (1 − p)n−x P (X = r) = r!

Probability of Success (p), Number of trials(n), Average Event Rate (λ),


Number of successes (x) r is the Number of Events that occur

Mean μ = n ⨉ p Mean μ = λ

[Link] 4/7
4/12/26, 8:02 AM Poisson Distribution - GeeksforGeeks

Binomial Distribution Poisson Distribution

Variance σ2 = n ⨉ p ⨉ (1 - p) Variance σ2 = λ

Assumptions: Fixed number of trials, two possible Assumptions: Probability of success is small,
outcomes, independent trials, constant probability number of trials is large, mean remains constant.

Example: Tossing a coin 5 times: Probability of getting Example: A call center receives 3 calls/min:
exactly 2 heads Probability of exactly 2 calls in a minute

Poisson Distribution Solved Examples


Example 1: If 4% of the total items made by a factory are defective. Find the probability that less than
2 items are defective in the sample of 50 items.
Solution:

Here we have, n = 50, p = (4/100) = 0.04, q = (1-p) = 0.96, λ = 2


Using Poisson's Distribution,
0 −2
P(X = 0) = 2 0!
e
= 1/e2 = 0.13534

1 −2
P(X = 1) = 2 1!
e
= 2/e2 = 0.27068

Hence the probability that less than 2 items are defective in sample of 50 items is given by:
P( X > 2 ) = P( X = 0 ) + P( X = 1 ) = 0.13534 + 0.27068 = 0.40602

Example 2: If the probability of a bad reaction from medicine is 0.002, determine the chance that out
of 1000 persons, more than 3 will suffer a bad reaction from medicine.
Solution:

Here we have, n = 1000, p = 0.002, λ = np = 2


X = Number of person suffer a bad reaction
Using Poisson's Distribution
P(X > 3) = 1 - {P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3)}
0 −2
P(X = 0) = 2 0!
e
= 1/e2

1 −2
P(X = 1) = 2 1!
e
= 2/e2 ​

2 −2
P(X = 2) = 2 2!
e
= 2/e2 ​

3 −2
P(X = 3) = 2 3!
e
= 4/3e2​

P(X > 3) = 1 - [19/3e2] = 1 - 0.85712 = 0.1428

Example 3: If 1% of the total screws made by a factory are defective. Find the probability that less
than 3 screws are defective in a sample of 100 screws.
Solution:

Here we have, n = 100, p = 0.01, λ = np = 1


X = Number of defective screws
Using Poisson's Distribution
[Link] 5/7
4/12/26, 8:02 AM Poisson Distribution - GeeksforGeeks

P(X < 3) = P(X = 0) + P(X = 1) + P(X = 2)


0 −1
P(X = 0) = 1 0!
e
= 1/e ​

1 −1
P(X = 1) = 1 1!
e
=1/e ​

2 −1
1 e
P(X = 2) = 2! =1/2e ​

Thus, P(X < 3) = 1/e + 1/e +1/2e = 2.5/e = 0.919698

Example 4: If in an industry there is a chance that 5% of the employees will suffer from coronavirus.
What is the probability that in a group of 20 employees, more than 3 employees will suffer from
coronavirus?
Solution:

Here we have, n = 20, p = 0.05, λ = np = 1


X = Number of employees who will suffer corona
Using Poisson's Distribution
P(X > 3) = 1-[P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3)]
0 −1
P(X = 0) = 1 0!
e
= 1/e ​

1 −1
P(X = 1) = 1 1!e
= 1/e

12 e−1
P(X = 2) = 2! =1/2e

3 −1
P(X = 3) = 1 3!
e
​=1/6e
P(X > 3) = 1 - [1/e + 1/e + 1/2e + 1/6e]
⇒ P(X > 3) = 1 - [ 8/3e] = 0.018988

Related Articles:

Poisson Distribution Meaning


Types of Frequency Distribution
Probability Distribution
Binomial Distribution

Poisson
Distribution
| Formula,
Table,
Mean and
Variance

Poisson
Distribution
Examples
with
Solutions

 

Poisson Distribution | Formula, Table, Mean and Variance

[Link] 6/7
4/12/26, 8:10 AM Mathematics | Weibull Distribution Model - GeeksforGeeks
Courses
Search... Tutorials Sign In
Interview Prep

Mathematics | Weibull Distribution Model


Last Updated : 2 Sep, 2024

The Weibull distribution is a versatile probability distribution widely used in reliability engineering,
survival analysis, and failure time analysis. Named after Wallodi Weibull, this distribution is
particularly effective for representing different types of failure rates based on its parameters. This
article provides an in-depth understanding of the Weibull distribution, its properties, applications, and
comparisons to similar models.

Weibull Distribution
The Weibull distribution is defined by its probability density function (PDF) and cumulative
distribution function (CDF). Three key parameters characterize it:

Shape (β): Determines the shape of the distribution, indicating whether the failure rate is increasing,
decreasing, or constant over time.

Scale (α): A scale parameter that stretches or compresses the distribution.

Location (γ): A location parameter that shifts the distribution along the x-axis. For simplicity, this
article assumes γ = 0.

Given these parameters, the Weibull distribution becomes a flexible tool to model various types of
data.

Properties of Weibull Distribution

1. Probability Density Function (PDF):

The probability density function of a Weibull-distributed random variable X is given by:


β
f (x) = αβxβ−1 e−αx , for x > 0, α > 0, β > 0

Otherwise, f (x) =0
This function provides the likelihood of the random variable \( X \) taking on a particular value.

2. Cumulative Distribution Function (CDF):

The cumulative distribution function, which gives the probability that \( X \) is less than or equal to a
certain value, is derived as follows:
x β
F (x) = ∫0 αβw β−1 e−αw dw

By substituting y = w β , the CDF simplifies to:

[Link] 1/4
4/12/26, 8:10 AM Mathematics | Weibull Distribution Model - GeeksforGeeks
β
F (x) = 1 − e−αx
This shows that when \( X \) follows a Weibull distribution, the transformation \( Y = X^\beta \) follows
an exponential distribution.

3. Hazard Function:

The hazard function, or failure rate function, is given by the ratio of the PDF to the survival function (1
- CDF):
f (x)
h(x) = 1−F (x)

= αβxβ−1
This function indicates the rate at which failures occur over time and is crucial in reliability analysis.

Expected Value and Variance

1. Expected Value:
The expected value (mean) of the Weibull distribution is found using the formula:

μ = E(X) = ∫0 x ⋅ f (x) dx. ​

Substituting the PDF into the equation and solving using the gamma function, we get:

μ = α−1/β Γ (1 + β1 )

2. Variance and Standard Deviation:


The variance of the Weibull distribution is computed as:

σ 2 = E(X 2 ) − μ2

By evaluating E(X 2 ) similarly to E(X), we obtain:

2
σ 2 = α−2/β [Γ (1 + β2 ) − (Γ (1 + β1 )) ]
​ ​

The standard deviation is the square root of the variance:

2
σ = α−1/β Γ (1 + β2 ) − (Γ (1 + β1 ))
​ ​

Examples of Weibull Distributions


Let’s consider an example of a Weibull distribution applied to the lifetime of emergency backup
batteries.

Example: Suppose the lifetime (in hours) of a backup battery is modeled by a Weibull distribution
with α = 0.1 and β = 0.5

1. Mean Lifetime:

[Link] 2/4
4/12/26, 8:10 AM Mathematics | Weibull Distribution Model - GeeksforGeeks

Substituting the values of αand β into the mean formula:

μ = (0.1)−2 Γ(3) = 200 hours

2. Probability of Lasting More Than 300 Hours:


ry Geometry Linear Algebra Trigonometry Logarithms Statistics Probability Calculus Discrete Mathematics Sign In

The probability that a battery lasts more than 300 hours is given by:
0.5
P (X > 300) = 1 − F (300) = e−0.1×300 = 0.177
This shows that there is a 17.7% chance the battery will last more than 300 hours.

Uses of Weibull Distribution Model


The Weibull distribution is widely used in various fields due to its flexibility in modeling different types
of data. Some of the most common applications include:

Reliability Engineering: To model the life of products and systems, helping in the prediction of
failure rates and maintenance scheduling.
Survival Analysis: Used to study the time until the occurrence of events such as failure or death,
commonly applied in medical research.
Weather Forecasting: Employed to model wind speeds and other meteorological data, aiding in
accurate weather predictions.
Economics: Analyzes income distribution and financial risks, providing insights into economic
behaviors and market trends.

Comparison of Weibull Distribution Model with Other Similar Models


The Weibull distribution is often compared to other probability distributions like the exponential and
normal distributions:

Exponential Distribution: The Weibull distribution generalizes the exponential distribution. When the
shape parameter β=1, the Weibull distribution simplifies to the exponential distribution. However, the
Weibull distribution can model both increasing and decreasing failure rates, unlike the constant failure
rate assumed by the exponential distribution.

Normal Distribution: While the normal distribution is symmetric and suitable for modeling data that
clusters around a mean, the Weibull distribution is more flexible, particularly for modeling skewed
data and varying failure rates over time.

Conclusion
The Weibull distribution is a powerful and flexible tool in probability and statistics, particularly useful
in fields that require modeling of time-to-event data, such as reliability engineering and survival
analysis. Its ability to represent various types of failure rates and model different data shapes makes it
a preferred choice for many applications.

Comment I img20… 1

Article Tags: Technical Scripter Engineering Mathematics Technical Scripter 2020

[Link] 3/4

You might also like