In the world of statistics and probability, the Cumulative Distribution Function (CDF) plays a pivotal role in understanding how random variables behave. Whether you're dealing with continuous or discrete variables, the CDF offers a comprehensive view of the probability distribution, helping us understand the likelihood of outcomes in a given scenario. This blog explores the CDF's definition, its relationship with probability density functions (PDF), and its application across various types of distributions, such as normal, uniform, and exponential.
The Cumulative Distribution Function (CDF) is a function that provides the probability that a random variable X will take a value less than or equal to a given number x. Simply put, it accumulates the probability of all outcomes up to a certain point. The CDF is defined for both discrete and continuous random variables.
In mathematical terms, for a continuous random variable X, the CDF is represented as:
Where:
The CDF increases monotonically from 0 to 1, meaning that as x increases, the probability of X ≤ x either stays the same or increases.
For continuous random variables, the Cumulative Distribution Function is directly related to the probability density function (PDF). The PDF describes the likelihood of a random variable taking a specific value, while the CDF accumulates this probability over a range of values.
The key relationship is:
Thus, the formula to transition from a PDF to a CDF is:
And the reverse, from CDF to PDF, is:
1. Cumulative Distribution Function of Normal Distribution
The Normal Distribution (or Gaussian Distribution) is one of the most commonly encountered distributions in probability and statistics. Its CDF is typically expressed in terms of the error function (erf), and its formula is complex, but it provides crucial insights for calculating probabilities associated with data that follows a bell-shaped curve.
For a normal distribution with mean μ and standard deviation σ, the CDF is:
This formula allows you to calculate the probability that a value from a normal distribution is less than or equal to x.
2. Cumulative Distribution Function of Exponential Distribution
For an Exponential Distribution, which is often used to model the time between events in a Poisson process, the CDF is simpler. For a random variable X that follows an exponential distribution with rate parameter λ, the CDF is:
This CDF gives the probability that the random variable X is less than or equal to x, where λ is the rate parameter.
3. Cumulative Distribution Function of Uniform Distribution
The Uniform Distribution is a simple and intuitive distribution where all outcomes are equally likely within a certain interval. For a random variable X that follows a uniform distribution between a and b, the CDF is:
The CDF increases linearly from 0 to 1 as x moves from a to b.
Example 1: Suppose we have a normal distribution with a mean μ = 50 and a standard deviation σ = 10. We want to calculate the probability that a randomly selected value X from this distribution is less than or equal to 60. In other words, we want to find: P(X ≤ 60)
Solution:
Step 1: Write the Formula for the CDF of a Normal Distribution
For a normal distribution, the CDF is given by the following formula:
Where:
Step 2: Standardize the Value
To apply this formula, we first need to standardize the value of x=60x = 60 by converting it into a z-score:
Now we have the standardized value z = 1.
Step 3: Use the Standard Normal CDF Formula
Now that we have the z-score, we can plug it into the standard normal distribution CDF formula:
Using a calculator or a table for the error function, we find:
Now substitute this value into the formula:
Step 4: Interpret the Result
The value 0.841350.84135 represents the probability that a randomly selected value from the normal distribution will be less than or equal to 60. Therefore:
This means that there is an 84.14% chance that a randomly selected value from this normal distribution will not exceed than or equal to 60.
Example 2: Now, let’s consider a different example using a uniform distribution. Suppose we have a uniform distribution between 0 and 10, and we want to calculate the probability that a random variable X falls between 3 and 7. The probability we are interested in is:
Solution:
Step 1: Write the Formula for the CDF of a Uniform Distribution
For a uniform distribution between a and b, the CDF is given by:
Where:
Step 2: Calculate F(7) and F(3)
First, we calculate the CDF at x = 7:
Next, we calculate the CDF at x = 3:
Step 3: Calculate the Probability
Now, we can find the probability that X falls between 3 and 7 by subtracting the CDF values:
Step 4: Interpret the Result
The value 0.40.4 means that there is a 40% chance that a randomly selected value from this uniform distribution will lie between 3 and 7.
Example 3: Let X be the outcome of a fair six-sided die. Write the CDF and compute
Solution
For a fair die, for k=1,2,....,6. The CDF:
Compute
Example 4: Suppose CDF of an integer-valued XX is . Find P(X = 0), P(X = 1), P(X = 2).
Solution
For discrete distributions, mass at integer kk equals jump of CDF at k:
Finally corresponds to mass at 3 (or mass spread on ≥3 depending on support); since jump at 3 is
Example 5: Let X be uniform on [2,5]. Write its CDF and PDF, then compute
Solution
Uniform [2,5]: PDF for CDF:
For continuous variable,
(Alternate: integrate PDF: )
Example 6: CDF is given by . Find
(a) P(X = 0),
(b) density for 1 < x < 6,
(c) P(0 < X < 2).
Solution
(a) Mass at 0 is jump at 0: P(X = 0) = 0.3 – 0 = 0.3.
(b) On 1 < x < 6, Differentiate to get PDF: for 1 < x < 6.
(c) Check total mass:
The remaining 0.2 sits as jump at 6: indeed
Example 7: Let X have CDF for (exponential, ). Find the median mm (value with ).
Solution
Set F(m)=0.5:
So median
Example 8: Let . Find CDF of and then PDF.
Solution
For . Since . Thus
Differentiate for PDF on (0,1): (Check integral: )
Example 9: Let be i.i.d. with CDF . Let . Find CDF of M.
Solution
Example numeric: if uniform [0,1], for
Example 10: CDF:
Compute
Solution
Check totals: P(X = 0) = 0.4 (mass at 0), P(X = 2) = 0.3, P(2)=0.3 at 3? Actually mass at 3 is 1-0.7=0.3. Total 0.4 + 0.3 + 0.3 = 1.
Example 11: Let discrete nonnegative integer X have CDF for integers . Find PMF and E[X].
Solution
First obtain PMF: for integer
So for . (Check sum: )
Compute expectation:
Use known sum: for . Here but note the exponent is k with coefficient so
Example 12: Suppose two random variables have CDFs and for . Which variable is stochastically larger (i.e., which has higher values on average)?
Solution
A variable U is stochastically larger than V if for all x (so mass is shifted to the right). For
Compare: for (since decreases slower), so . Thus ⇒ X is stochastically larger than Y. Intuitively, X has mean 1, Y has mean 1/2.
1. What is the difference between a Cumulative Distribution Function and a Probability Density Function?
Ans: The Probability Density Function (PDF) describes the likelihood of the random variable taking specific values. The Cumulative Distribution Function (CDF), however, accumulates the probabilities and gives the cumulative probability up to a point. The CDF is the integral (or sum for discrete variables) of the PDF: So, while the PDF shows density, the CDF shows cumulative probability.
2. How do you calculate the CDF for discrete random variables?
Ans: For discrete random variables, the CDF is found by summing the probabilities of all values less than or equal to a given value x. If X takes values with probabilities P(X = xi), the CDF is: This gives the cumulative probability at or below each value.
3. How do you calculate the CDF for continuous random variables?
Ans: For continuous random variables, the CDF is the integral of the probability density function (PDF) from negative infinity to a given value xx. The CDF is computed as: where f(t) is the PDF of the random variable. This gives the total probability up to x.
(Session 2025 - 26)