Cumulative Distribution Function
Last Updated :
23 Jul, 2025
Cumulative Distribution Function (CDF), is a fundamental concept in probability theory and statistics that provides a way to describe the distribution of the random variable. It represents the probability that a random variable takes a value less than or equal to a certain value. The CDF is a non-decreasing function that ranges from 0 to 1 capturing the entire probability distribution of the random variable.
What is a Cumulative Distribution Function?
The Cumulative Distribution Function (CDF) of a random variable is a mathematical function that provides the probability that the variable will take a value less than or equal to a particular number.
The CDF starts at 0 for the smallest possible value of X and increases to 1 as x approaches the largest possible value of X. It is a non-decreasing function that provides a complete description of the distribution of the random variable.
For example, if you're looking at the CDF for a test score of 80, and it gives you 0.75, this means there's a 75% chance that a random student's score will be 80 or less.
In short, the CDF helps you understand the likelihood of a random value being within a certain range by summing up probabilities as you go along.
Definition of CDF
The Cumulative Distribution Function F(x) of the random variable X is defined as:
F(x) = P(X \leq x)
Graphical Representation of Cumulative Distribution Function
The graph of a CDF is a non-decreasing curve that starts at 0 and approaches 1 as the x increases. It is useful for visualizing the probability distribution of the random variable.
Properties of Cumulative Distribution Function
Some of the properties of Cumulative Distribution Function:
The CDF is a non-decreasing function. This means that for any two values x_1 and x_2 such that x_1 \leq x_2 the corresponding CDF values satisfy F(x_1) \leq F(x_2).
As x approaches negative infinity the CDF approaches 0:
\lim_{x \to -\infty} F(x) = 0
As x approaches positive infinity the CDF approaches 1:
\lim_{x \to +\infty} F(x) = 1
The CDF of a continuous random variable is a continuous function while the CDF of the discrete random variable has jumps or discontinuities at specific points.
The CDF is always non-negative i.e. F(x) \geq 0 for the all x.
How to Calculate Cumulative Distribution Function?
Steps to find cumulative distribution function are given below-
Step 1. Identify the Distribution: The Determine whether the random variable follows a discrete or continuous distribution.
Step 2. Determine the PDF: For continuous distributions find the Probability Density Function (PDF) f(x).
Step 3. Integrate the PDF: The Integrate the PDF from the -\infty to x to find the CDF:
F(x) = \int_{-\infty}^{x} f(t) \, dt
Step 4. Sum the Probabilities: For discrete distributions sum the probabilities for the all values less than or equal to the x.
Using Probability Density Function (PDF) to Find CDF
For continuous random variables the CDF F(x) is derived from the PDF f(x) by the integrating:
F(x) = \int_{-\infty}^{x} f(t) \, dt
This process accumulates the probability from the left up to the point x.
Types of Cumulative Distribution Functions
CDF of a Discrete Random Variable
For a discrete random variable X with the possible values x_1, x_2, \dots, x_n and corresponding probabilities P(X = x_i) = p_i the CDF is given by:
F(x) = \sum_{x_i \leq x} p_i
The CDF of the discrete random variable increases in steps at the points where the variable takes on the specific values.
For example, Consider a random variable X that represents the roll of the fair 6-sided die. The CDF F(x) for this random variable is:
F(x) =
\begin{cases}
0 & \text{if } x < 1 \\
\frac{1}{6} & \text{if } 1 \leq x < 2 \\
\frac{2}{6} & \text{if } 2 \leq x < 3 \\
\frac{3}{6} & \text{if } 3 \leq x < 4 \\
\frac{4}{6} & \text{if } 4 \leq x < 5 \\
\frac{5}{6} & \text{if } 5 \leq x < 6 \\
1 & \text{if } x \geq 6
\end{cases}
CDF of a Continuous Random Variable
For a continuous random variable X with the probability density function (PDF) f(x) the CDF is the integral of the PDF:
F(x) = \int_{-\infty}^{x} f(t)\, dt
Since the CDF is the integral of the PDF it is a continuous and differentiable function.
For example: Consider a continuous random variable X that is uniformly distributed between the 0 and 1. The CDF F(x) for this random variable is:
F(x) =
\begin{cases}
0 & \text{if } x < 0 \\
x & \text{if } 0 \leq x \leq 1 \\
1 & \text{if } x > 1
\end{cases}
Difference Between Cumulative Distribution Function (CDF) and Probability Density Function (PDF)
Some of the common differences between CDF and PDF are listed in the following table:
Aspect | Cumulative Distribution Function (CDF) | Probability Density Function (PDF) |
---|
Definition | Shows the probability that a random variable is less than or equal to a certain value. | Describes the probability of the random variable taking a specific value. |
Representation | A running total of probabilities. | The likelihood of the random variable being exactly at a specific value. |
Mathematical Expression | F(x) = P(X ≤ x) | f(x) such that f(x) ≥ 0 and \int_{-\infty}^{\infty} f(x)dx = 1 |
Value Range | Always non-decreasing and ranges from 0 to 1. | Can be any non-negative value but does not exceed 1. |
Interpretation | CDF gives the cumulative probability up to a certain point. | PDF gives the relative likelihood for a continuous random variable to occur at a specific value. |
Visualization | A continuous, non-decreasing curve. | A curve where the area under the curve represents probabilities. |
Area Under Curve | Not applicable as it represents cumulative probability. | The total area under the PDF curve equals 1. |
Usage | Used to find the probability that a random variable falls within a certain range. | Used to understand the distribution and likelihood of specific outcomes. |
Derivative Relationship | The derivative of the CDF gives the PDF. | The integral of the PDF gives the CDF. |
When to Use CDF vs. PDF?
- CDF: Use the CDF when we need to find the probability that a random variable is less than or equal to the specific value. It provides the cumulative probability up to the certain point.
- PDF: Use the PDF when you need to the find the probability density at a specific value. The PDF represents the rate of the change of the CDF and is useful for the calculating the probabilities over intervals.
Relationship Between CDF and PDF
For a continuous random variable X with the PDF f(x) the relationship between the CDF F(x) and PDF is given by:
f(x) = \frac{dF(x)}{dx}
This indicates that the PDF is the derivative of the CDF.
Solved Examples: Cumulative Distribution Function
Example 1: Consider a random variable X representing the number of the heads obtained in the two coin flips. Calculate the CDF F(x) of X.
Solution:
The possible values of X are 0, 1 and 2. The probabilities are:
P(X=0) = \frac{1}{4} \quad \text{(no heads)}
P(X=1) = \frac{1}{2} \quad \text{(one head)}
P(X=2) = \frac{1}{4} \quad \text{(two heads)}
The CDF F(x) is:
F(x) =
\begin{cases}
0 & \text{if } x < 0 \\
\frac{1}{4} & \text{if } 0 \leq x < 1 \\
\frac{3}{4} & \text{if } 1 \leq x < 2 \\
1 & \text{if } x \geq 2 \\
\end{cases}
Example 2: Let X be a continuous random variable with the PDF f(x) = 2x for the 0 \leq x \leq 1. Find the CDF F(x).
Solution:
To find the CDF integrate the PDF:
F(x) = \int_{-\infty}^{x} f(t) \, dt = \int_{0}^{x} 2t \, dt = x^2 \quad \text{for } 0 \leq x \leq 1
Thus, the CDF is:
F(x) =
\begin{cases}
0 & \text{if } x < 0 \\
x^2 & \text{if } 0 \leq x \leq 1 \\
1 & \text{if } x > 1 \\
\end{cases}
Example 3: Given the CDF F(x) = 1 - e^{-x} for x \geq 0 find the probability that X lies between the 1 and 2.
Solution:
The probability that X lies between the 1 and 2 is:
P(1 \leq X \leq 2) = F(2) - F(1)
Calculate:
F(2) = 1 - e^{-2} \quad \text{and} \quad F(1) = 1 - e^{-1}
P(1 \leq X \leq 2) = (1 - e^{-2}) - (1 - e^{-1}) = e^{-1} - e^{-2}
Example 4: Let X be a mixed random variable with the following distribution: P(X=0) = 0.2, P(X=1) = 0.3 and the continuous part is uniformly distributed over [2, 3]. Find the CDF F(x).
Solution:
For x < 0, F(x) = 0.
For 0 \leq x < 1, F(x) = 0.2.
For 1 \leq x < 2, F(x) = 0.5.
For 2 \leq x < 3 the continuous part applies:
F(x) = 0.5 + 0.5 \times (x - 2) = 0.5 + 0.5x - 1
Thus, F(x) = 0.5x - 0.5 for 2 \leq x \leq 3.
For x \geq 3, F(x) = 1.
Example 5: Given a PDF f(x) = \frac{3}{4}(1 - x^2) for the -1 \leq x \leq 1 find the CDF F(x).
Solution:
Integrate the PDF to find the CDF:
F(x) = \int_{-\infty}^{x} f(t) \, dt = \int_{-1}^{x} \frac{3}{4}(1 - t^2) \, dt
Solving the integral:
F(x) = \frac{3}{4} \left[t - \frac{t^3}{3}\right]_{-1}^{x} = \frac{3}{4} \left(x - \frac{x^3}{3} + \frac{2}{3}\right)
The CDF (F(x)) is:
F(x) =
\begin{cases}
0 & \text{if } x < -1 \\
\frac{3}{4} \left(x - \frac{x^3}{3} + \frac{2}{3}\right) & \text{if } -1 \leq x \leq 1 \\
1 & \text{if } x > 1 \\
\end{cases}
Practical Question: Cumulative Distribution Function (CDF)
Questions 1. Find the CDF of a random variable X representing the number of the heads in three coin flips.
Questions 2. Determine the CDF for a continuous random variable X with the PDF f(x) = 3x^2 for 0 \leq x \leq 1.
Questions 3. Calculate the probability that X is less than or equal to the 4 given the CDF F(x) = 1 - e^{-x} for x \geq 0.
Questions 4. Find the CDF for the random variable X uniformly distributed over the interval [2, 5].
Questions 5. Given the CDF F(x) for a random variable X find the PDF by differentiating the CDF.
Questions 6. Use the CDF F(x) = 1 - e^{-x} to find the probability that X lies between the 2 and 3.
Questions 7. For a discrete random variable X taking values 1, 2 and 3 with the probabilities 0.2, 0.5 and 0.3 respectively find the CDF F(x).
Questions 8.Calculate the CDF for a normal distribution with the mean 0 and standard deviation 1 at x = 1.
Questions 9.Given a random variable X with the PDF f(x) = \frac{1}{2} for 0 \leq x \leq 2 find the CDF F(x).
Questions 10. Determine the probability that a continuous random variable X with the PDF f(x) = 4x for the 0 \leq x \leq 1 is greater than 0.5.
Conclusion
The Cumulative Distribution Function (CDF) is an essential concept in the probability and statistics offering the comprehensive way to the describe the distribution of the random variables. Understanding the CDF and its properties is fundamental to the various statistical analyses and real-world applications. Whether dealing with the discrete or continuous variables the CDF provides the powerful tool for the calculating probabilities and making the inferences about data.
Read More
Similar Reads
Engineering Mathematics Tutorials Engineering mathematics is a vital component of the engineering discipline, offering the analytical tools and techniques necessary for solving complex problems across various fields. Whether you're designing a bridge, optimizing a manufacturing process, or developing algorithms for computer systems,
3 min read
Linear Algebra
MatricesMatrices are key concepts in mathematics, widely used in solving equations and problems in fields like physics and computer science. A matrix is simply a grid of numbers, and a determinant is a value calculated from a square matrix.Example: \begin{bmatrix} 6 & 9 \\ 5 & -4 \\ \end{bmatrix}_{2
3 min read
Row Echelon FormRow Echelon Form (REF) of a matrix simplifies solving systems of linear equations, understanding linear transformations, and working with matrix equations. A matrix is in Row Echelon form if it has the following properties:Zero Rows at the Bottom: If there are any rows that are completely filled wit
4 min read
Eigenvalues and EigenvectorsEigenvalues and eigenvectors are fundamental concepts in linear algebra, used in various applications such as matrix diagonalization, stability analysis and data analysis (e.g., PCA). They are associated with a square matrix and provide insights into its properties.Eigen value and Eigen vectorTable
10 min read
System of Linear EquationsA system of linear equations is a set of two or more linear equations involving the same variables. Each equation represents a straight line or a plane and the solution to the system is the set of values for the variables that satisfy all equations simultaneously.Here is simple example of system of
5 min read
Matrix DiagonalizationMatrix diagonalization is the process of reducing a square matrix into its diagonal form using a similarity transformation. This process is useful because diagonal matrices are easier to work with, especially when raising them to integer powers.Not all matrices are diagonalizable. A matrix is diagon
8 min read
LU DecompositionLU decomposition or factorization of a matrix is the factorization of a given square matrix into two triangular matrices, one upper triangular matrix and one lower triangular matrix, such that the product of these two matrices gives the original matrix. It is a fundamental technique in linear algebr
6 min read
Finding Inverse of a Square Matrix using Cayley Hamilton Theorem in MATLABMatrix is the set of numbers arranged in rows & columns in order to form a Rectangular array. Here, those numbers are called the entries or elements of that matrix. A Rectangular array of (m*n) numbers in the form of 'm' horizontal lines (rows) & 'n' vertical lines (called columns), is calle
4 min read
Sequence & Series
Calculus
Limits, Continuity and DifferentiabilityLimits, Continuity, and Differentiation are fundamental concepts in calculus. They are essential for analyzing and understanding function behavior and are crucial for solving real-world problems in physics, engineering, and economics.Table of ContentLimitsKey Characteristics of LimitsExample of Limi
10 min read
Cauchy's Mean Value TheoremCauchy's Mean Value theorem provides a relation between the change of two functions over a fixed interval with their derivative. It is a special case of Lagrange Mean Value Theorem. Cauchy's Mean Value theorem is also called the Extended Mean Value Theorem or the Second Mean Value Theorem.According
7 min read
Taylor SeriesA Taylor series represents a function as an infinite sum of terms, calculated from the values of its derivatives at a single point.Taylor series is a powerful mathematical tool used to approximate complex functions with an infinite sum of terms derived from the function's derivatives at a single poi
8 min read
Inverse functions and composition of functionsInverse Functions - In mathematics a function, a, is said to be an inverse of another, b, if given the output of b a returns the input value given to b. Additionally, this must hold true for every element in the domain co-domain(range) of b. In other words, assuming x and y are constants, if b(x) =
3 min read
Definite Integral | Definition, Formula & How to CalculateA definite integral is an integral that calculates a fixed value for the area under a curve between two specified limits. The resulting value represents the sum of all infinitesimal quantities within these boundaries. i.e. if we integrate any function within a fixed interval it is called a Definite
8 min read
Application of Derivative - Maxima and MinimaDerivatives have many applications, like finding rate of change, approximation, maxima/minima and tangent. In this section, we focus on their use in finding maxima and minima.Note: If f(x) is a continuous function, then for every continuous function on a closed interval has a maximum and a minimum v
6 min read
Probability & Statistics
Mean, Variance and Standard DeviationMean, Variance and Standard Deviation are fundamental concepts in statistics and engineering mathematics, essential for analyzing and interpreting data. These measures provide insights into data's central tendency, dispersion, and spread, which are crucial for making informed decisions in various en
10 min read
Conditional ProbabilityConditional probability defines the probability of an event occurring based on a given condition or prior knowledge of another event. It is the likelihood of an event occurring, given that another event has already occurred. In probability, this is denoted as A given B, expressed as P(A | B), indica
12 min read
Bayes' TheoremBayes' Theorem is a mathematical formula used to determine the conditional probability of an event based on prior knowledge and new evidence. It adjusts probabilities when new information comes in and helps make better decisions in uncertain situations.Bayes' Theorem helps us update probabilities ba
13 min read
Probability Distribution - Function, Formula, TableA probability distribution is a mathematical function or rule that describes how the probabilities of different outcomes are assigned to the possible values of a random variable. It provides a way of modeling the likelihood of each outcome in a random experiment.While a Frequency Distribution shows
13 min read
Covariance and CorrelationCovariance and correlation are the two key concepts in Statistics that help us analyze the relationship between two variables. Covariance measures how two variables change together, indicating whether they move in the same or opposite directions. Relationship between Independent and dependent variab
6 min read
Practice Questions