AI Glossary / Statistics and probability / Intermediate
Cumulative distribution function
Definition
The cumulative distribution function, or CDF, of a real-valued random variable X is F(x) = P(X <= x). It gives the probability that the variable does not exceed a specified threshold. A CDF describes the entire distribution and works for discrete, continuous, and mixed outcomes, making it a broadly useful representation of uncertainty.
What it means
The input x is a threshold in the variable's original units. The output F(x) is a probability between zero and one. For example, if X measures delay in seconds, F(4) describes the chance of a delay no longer than four seconds. It is not the probability of exactly four seconds.
The same definition handles a count of errors, a measured delay, or a variable with both a special exact value and a continuous range. This universality is useful when a probability density alone cannot describe the complete distribution. A fitted CDF remains a model whose reliability depends on its assumptions and data.
How it works
A valid CDF is nondecreasing, right-continuous, and has limits zero and one as x tends to negative and positive infinity. Right-continuity means its value includes any probability mass at the threshold itself. A jump at x has size P(X = x).
For discrete variables, accumulate probability masses. For an absolutely continuous variable with density f, integrate f from negative infinity to x. Not every distribution has an ordinary density, so the CDF definition is more general than the integration formula.
For a <= b, F(b) - F(a) equals P(a < X <= b). Writing F(a-) for the left-hand limit gives P(a <= X <= b) = F(b) - F(a-). The distinction disappears at a when there is no probability mass there. Quantiles can be defined using the smallest threshold whose CDF reaches the requested probability.
Three practical examples
- A response-time model provides the probability of meeting several latency limits without requiring a separate predictive model for each limit.
- A demand model converts a proposed stock quantity into the probability that demand will not exceed that quantity during a specified period.
- An AI forecasting system supplies a full predictive CDF so analysts can derive intervals and evaluate different operational thresholds consistently.
Think of it this way
Think of a probability ledger organized by outcome size. Each CDF value is the balance after including every outcome up to the stated threshold. A discrete outcome is a lump-sum deposit, while a continuous range adds probability gradually. The ledger must account for both; ignoring a lump sum leaves the total incomplete.
Worked example
Consider an original model of queueing delay X in minutes. With probability 0.20, a request has zero queueing delay. Otherwise, with probability 0.80, its delay is uniformly distributed between zero and ten minutes. These are stipulated teaching assumptions, not measured service performance.
The CDF is zero for x < 0; it is 0.20 + 0.08x for 0 <= x < 10; and it is one for x >= 10. At zero, the CDF jumps from zero to 0.20, representing the probability of immediate service.
At five minutes, F(5) = 0.20 + 0.40 = 0.60. The probability of waiting more than two but at most seven minutes is F(7) - F(2) = 0.76 - 0.36 = 0.40.
The 90th percentile solves 0.20 + 0.08x = 0.90, giving x = 8.75 minutes. Differentiating the sloping section gives 0.08, but integrating that over ten minutes gives only 0.80. The missing 0.20 is the atom at zero, showing why an ordinary density for the continuous part does not represent the whole mixed distribution.
Illustrative case study
In this fictional case, Silverline Services builds a model of waiting time before an AI-supported review begins. Some reviews start immediately, while others enter a queue. The first implementation fits a smooth distribution to positive waits and reports it as the distribution for all reviews.
An analyst notices that this excludes immediate starts. The team models both the probability of zero delay and the conditional distribution of positive delay, then checks the combined CDF against held-out observations.
Managers receive threshold probabilities with clear definitions and uncertainty. The case is invented to illustrate a modeling omission; the simple uniform model in the worked example is not proposed as a realistic operational fit.
Common misconceptions and mistakes
A CDF value is not a density height, and a density can exceed one without being an invalid probability model. A CDF itself cannot exceed one.
Do not assume every CDF has an ordinary inverse. Flat stretches and jumps require a generalized quantile definition, and software may use different interpolation conventions for sample quantiles.
For continuous variables, probability at an individual point can be zero even though that value is possible. For mixed variables, some points can carry positive mass. Using “less than” and “less than or equal to” interchangeably without checking for atoms can therefore produce incorrect results.
Business use
CDFs help businesses evaluate thresholds consistently: delivery deadlines, capacity limits, tolerable prediction errors, or waiting-time commitments. They also make it possible to compare whole distributions rather than one summary value.
Keep the modeled population and conditioning information explicit. A CDF for a quiet weekday may not apply during a surge. For predictive applications, check performance on new observations and inspect important subgroups. A mathematically valid curve is only the first requirement; useful probability forecasts must also match observed frequencies sufficiently well for the intended decisions.
People also ask
Does every random variable have a CDF?
Every real-valued random variable does, although vector-valued variables require a multivariate definition.
Is the CDF always increasing?
It is nondecreasing, so it may remain flat over some intervals.
What is the relationship to survival probability?
With the convention S(x) = P(X > x), the survival function is 1 - F(x). Other endpoint conventions must be stated where exact values have mass.
Check your understanding
Check your understanding: In the delay example, what does F(0) = 0.20 mean?
Answer: There is a 20% chance of no queueing delay.
Why is the continuous component's density insufficient on its own?
Answer: It accounts for only 80% of total probability.
What is P(X > 5)?
Answer: It is 1 - 0.60 = 0.40 under the stipulated model.
Related terms
- Cumulative distribution
- Probability mass function (pmf)
- Probability density function
- Survival function
- probability mass function
- mixed distribution
- quantile function
- empirical CDF
- predictive distribution
Learn next
Practice reading jumps and flat sections in a CDF. Then construct quantiles using the generalized inverse and compare empirical and fitted CDFs on data that include repeated values or a point mass at zero.
More in Statistics and probability
- Cross-entropy loss - Cross-entropy loss is a training objective that penalizes a model for assigning low probability to the correct outcome.
- Cross-sectional regression - Cross-sectional regression models relationships between an outcome and explanatory variables across different units observed for a common point or period in...
- Crossover study - A crossover study compares interventions by having the same participants receive different interventions during successive periods.
- Cumulative incidence - Cumulative incidence is the probability that a specified event has occurred by a particular time.
- Curvilinear relationship - A curvilinear relationship is a relationship between variables that is better represented by a curve than by a straight line on the chosen measurement scales.
- Cusum chart - A CUSUM chart, short for cumulative sum control chart, monitors a process by accumulating evidence of departures from a reference level.
Sources
Sources: Pishro-Nik, Cumulative Distribution Function, https://www.probabilitycourse.com/chapter3/3_2_1_cdf.php, and Mixed Random Variables, https://www.probabilitycourse.com/chapter4/4_3_1_mixed.php. NIST/SEMATECH, Related Distributions, https://www.itl.nist.gov/div898/handbook/eda/section3/eda362.htm. The mixed-delay example and fictional case are original, with endpoint conventions stated explicitly.
Previous: Cumulative distribution Next: Cumulative forecasting