VISUAL LESSON · 7 PICTURES

From CDF to PDF

How does accumulated probability reveal local probability density?

Progress stays on this device · no login
BEFORE THE FIRST PICTURE

How this lesson unfolds.

Begin with What is the probability that a uniform random point falls to the left of a target position $x$? The sequence then connects The CDF Records Accumulated Probability and builds toward Differentiate the CDF Piece by Piece.

Picture 1 of 7 · tap to inspect in full resolution
01

What is the probability that a uniform random point falls to the left of a target position x?

INTUITION

Dropping an ideal dart onto the unit interval [0, 1] spreads probability uniformly across length: the likelihood of landing inside [0, x] matches the length x itself, providing a linear cumulative baseline.

MATHEMATICAL STATEMENT
  1. $$X \sim \text{Uniform}(0, 1) \implies P(X \le x) = x \quad (x \in [0, 1])$$
✦ More context & mechanics
1. Conceptual Mechanics & Logic

Consider selecting a point X entirely at random on the unit interval [0, 1]. Because the probability density is uniform (equal chance across equal lengths), the probability that X lands in the sub-interval [0, x] is given by the ratio of lengths: Length([0, x]) / Length([0, 1]) = x / 1 = x. As x sweeps from 0 to 1, the probability of falling to the left of x rises continuously from 0 to 1.

2. Real-World Tech Application

Every pseudo-random number generator in computing (e.g. `Math.random()` or Python's `random.random()`) draws standard uniform floats on [0, 1). Inverse Transform Sampling maps these uniform draws through inverse CDFs to simulate arbitrary distributions like Normal or Exponential in production Monte Carlo engines.

3. Historical Discovery Story

Georges-Louis Leclerc, Comte de Buffon, pioneered geometric probability in 1777 with his famous 'Buffon's Needle' problem, proving that continuous probabilities can be determined by geometric lengths and areas.

4. How to Memorize

'Length is Chance': On the unit interval [0, 1], the probability of being to the left of x is literally just the distance x.

Picture 2 of 7 · tap to inspect in full resolution
02

What does the Cumulative Distribution Function F(x) collect as its argument sweeps across the real line?

INTUITION

Sweeping across the real line from negative infinity acts like a financial balance ledger: the function F(x) = P(X ≤ x) starts at 0, climbs monotonically as mass is encountered, and tops out at 1.0.

MATHEMATICAL STATEMENTS
  1. $$F_X(x) = P(X \le x), \quad \lim_{x\to-\infty} F(x) = 0, \; \lim_{x\to\infty} F(x) = 1$$
  2. $$The CDF $F(x) = P(X \le x)$ acts as a probability accumulator, starting at 0 at $-\infty$, monotonically climbing, and reaching 1 at $+\infty$.$$
✦ More context & mechanics
1. Conceptual Mechanics & Logic

The Cumulative Distribution Function (CDF), denoted F(x) = P(X ≤ x), measures the total probability mass accumulated from the far left up to coordinate x. For X ~ Uniform(0, 1):

  • For x < 0, no mass has been encountered: F(x) = 0.
  • Inside 0 ≤ x ≤ 1, mass accumulates at a steady linear rate: F(x) = x.
  • For x > 1, all probability mass has been captured: F(x) = 1.

The CDF is continuous everywhere and non-decreasing.

2. Real-World Tech Application

In database query optimization and streaming analytics (e.g. Apache Kafka / Prometheus), percentile metrics (such as the p99 latency) are evaluated by inverting the empirical CDF: x_(p99) = F^(-1)(0.99).

3. Historical Discovery Story

Pafnuty Chebyshev and his student Andrey Markov introduced distribution functions in the late 19th century, recognizing that F(x) universally unifies discrete, continuous, and singular random variables under a single mathematical roof.

4. How to Memorize

'The Snowplow': As you drive along the x-axis, the CDF snowplow accumulates probability mass behind its blade. It starts at 0, plows up to 1, and never rolls backward.

Picture 3 of 7 · tap to inspect in full resolution
03

How much probability enters the CDF across an infinitesimal window Δ x, and what rate does this define?

INTUITION

Dividing the incremental accumulation ΔF across a narrow window [x, x + Δx] by the window width Δx converts raw probability into an instantaneous spatial concentration rate.

MATHEMATICAL STATEMENTS
  1. $$\frac{\Delta F}{\Delta x} = \frac{F(x + \Delta x) - F(x)}{\Delta x}$$
  2. $$Across $[x, x + \Delta x]$, the probability gained is $\Delta F = F(x+\Delta x) - F(x)$; dividing by $\Delta x$ yields the local probability density (rate per unit length).$$
✦ More context & mechanics
1. Conceptual Mechanics & Logic

Consider an interval of width Δ x starting at x. The probability that X lands in this window is P(x < X ≤ x + Δ x) = F(x + Δ x) - F(x) = Δ F. If we divide this probability by the window length Δ x, we obtain the average probability concentration per unit length: Δ F / Δ x. Taking the limit as Δ x → 0 yields the instantaneous rate at which probability is accumulating at point x.

2. Real-World Tech Application

In financial quantitative risk models, high-frequency order books analyze trade execution density: dividing the fraction of orders placed in a narrow price band [p, p+Δ p] by the tick size Δ p computes the instantaneous liquidity density.

3. Historical Discovery Story

Sir Isaac Newton and Gottfried Wilhelm Leibniz independently recognized that rates of change of accumulated quantities yield instantaneous densities, founding the differential and integral calculus in the 1670s.

4. How to Memorize

'Rise over Run': Δ F is the probability rise; Δ x is the spatial run. Rise over run is your local density.

Picture 4 of 7 · tap to inspect in full resolution
04

What distinct operational questions do the CDF F(x) and the PDF f(x) answer?

INTUITION

A cumulative curve evaluates total mass accumulated up to a given boundary, while a density curve measures the instantaneous height of mass concentration per unit length at that exact spot.

MATHEMATICAL STATEMENT
  1. $$F(x) \in [0, 1] \quad \text{vs.} \quad f(x) = \lim_{\Delta x \to 0} \frac{\Delta F}{\Delta x} \in [0, \infty)$$
  • Learning goalDifferentiate cumulative probability scale F(x) from localized probability density rate f(x).
  • Helpful foundationsCumulative distribution function · Probability density function · Dimensional analysis in calculus
  • Common trapDensity height f(x) is not probability; only integrals of f(x) produce actual probabilities.
  • Next connectionConnect CDF slope geometrically to PDF height.
✦ More context & mechanics
1. Conceptual Mechanics & Logic

It is vital to contrast their mathematical units and roles:

  • CDF F(x): Measures total mass up to x. It is dimensionless, strictly bounded in [0, 1], non-decreasing, and evaluated at a single point to give a direct probability.
  • PDF f(x): Measures spatial density at x. It has dimensions of 1/(units of x), can take any nonnegative value (even ∞), and must be integrated over an interval to yield a probability.
2. Real-World Tech Application

In lidar autonomous driving systems, a sensor measures distance D. The safety supervisor queries the CDF F(5m) = P(D ≤ 5m) to check collision probability, while the Kalman filter uses the PDF f(d) to compute continuous observation likelihoods for state estimation.

3. Historical Discovery Story

Joseph Fourier's work on heat diffusion in 1822 established that continuous flux (density) and total accumulated heat energy require separate mathematical formulations, directly inspiring modern density formalization.

4. How to Memorize

'Odometer vs. Speedometer': The CDF is your odometer (how many total miles accumulated so far); the PDF is your speedometer (how fast miles are accumulating right now).

Picture 5 of 7 · tap to inspect in full resolution
05

Why does a linear, steady CDF produce a completely flat, constant probability density?

INTUITION

Where the cumulative curve climbs steeply, probability mass is densely concentrated, producing a tall density peak; where the cumulative curve flattens into a horizontal plateau, density drops to zero.

MATHEMATICAL STATEMENT
  1. $$f(x) = \frac{d}{dx} F(x) = F'(x)$$
  • Learning goalExplain the geometric correspondence between the slope of F(x) and the height of f(x).
  • Helpful foundationsDerivatives of linear functions · Slope interpretation · PDF definition
  • Common trapA flat CDF implies zero density; constant positive density produces a linear ramp CDF.
  • Next connectionFormulate the fundamental calculus relationship between CDF differentiation and PDF integration.
✦ More context & mechanics
1. Conceptual Mechanics & Logic

For X ~ Uniform(0, 1), F(x) = x on the interval (0, 1). Because equal steps in x yield identical increases in probability, the graph of F(x) is a straight ramp with slope Δ F / Δ x = 1. The slope of F(x) at any point is the derivative F'(x). Since the slope is everywhere 1 on (0, 1), the PDF f(x) = F'(x) = 1 is a horizontal, flat line across that interval.

2. Real-World Tech Application

In digital audio signal processing, dither noise is generated using uniform white noise. Engineers ensure the dither CDF is a linear ramp across quantization bins so that the resulting noise PDF is flat, eliminating harmonic distortion.

3. Historical Discovery Story

René Descartes revolutionized geometry in 1637 by linking curves to algebraic equations, establishing that slopes of tangent lines represent tangible physical and operational rates.

4. How to Memorize

'Steepness Equals Height': Where the CDF climbs steeply, the PDF towers high. Where the CDF is a steady ramp, the PDF is flat. Where the CDF is horizontal, the PDF drops to zero.

Picture 6 of 7 · tap to inspect in full resolution
06

Where does the PDF come from mathematically, and how does the Fundamental Theorem of Calculus link it to the CDF?

INTUITION

By the Fundamental Theorem of Calculus, taking the first derivative of the cumulative integral recovers the local density function: d/dx [∫_(-∞)^x f(t)dt] = f(x).

MATHEMATICAL STATEMENTS
  1. $$f(x) = F'(x) \iff F(x) = \int_{-\infty}^x f(t)\,dt$$
  2. $$By the Fundamental Theorem of Calculus, differentiating accumulated probability recovers the local density: $f(x) = F'(x) = \frac{d}{dx} \int_{-\infty}^x f(t)\,dt$.$$
  • Learning goalDerive continuous probability density functions by differentiating cumulative distribution functions.
  • Helpful foundationsFundamental Theorem of Calculus · Derivatives · Definite integrals
  • Common trapDifferentiation and integration are inverse operations bridging cumulative probability and local density.
  • Next connectionDifferentiate piecewise continuous functions with jump boundaries.
✦ More context & mechanics
1. Conceptual Mechanics & Logic

The relationship between CDF and PDF is the classic pairing of accumulated quantity and rate from calculus. The CDF accumulates probability: F(x) = ∫_(-∞)^x f(t) dt. Differentiating both sides with respect to x by the Fundamental Theorem of Calculus strips away the integral, leaving the local density: F'(x) = f(x). Accumulation and local density are two sides of the same mathematical coin.

2. Real-World Tech Application

In survival analysis and medical biostatistics (such as analyzing cancer patient survival times), researchers fit empirical Kaplan-Meier cumulative survival curves S(t) = 1 - F(t), and differentiate them to obtain hazard rates and mortality density functions.

3. Historical Discovery Story

Augustin-Louis Cauchy formalized the rigorous epsilon-delta foundations of the Fundamental Theorem of Calculus in the 1820s, cementing the exact mathematical duality of differentiation and integration.

4. How to Memorize

'Differentiate to Unpack, Integrate to Pack': Integrate the PDF to pack probability into the CDF; differentiate the CDF to unpack it back into local density.

Picture 7 of 7 · tap to inspect in full resolution
07

How do you systematically differentiate a piecewise CDF across its entire domain, including boundary zones?

INTUITION

Evaluating a piecewise cumulative profile requires taking derivatives region by region: outside [0, 1] the flat slope yields 0, while inside [0, 1] the linear slope of x evaluates to a constant density of 1.

MATHEMATICAL STATEMENTS
  1. $$f(x) = \begin{cases} 1 & 0 < x < 1 \\ 0 & \text{otherwise} \end{cases}$$
  2. $$Differentiate each piece independently: outside $[0,1]$ the CDF is flat so $f(x)=0$; inside $(0,1)$ the slope is 1 so $f(x)=1$; isolated boundary points carry zero continuous measure.$$
  • Learning goalDifferentiate piecewise cumulative distribution functions to construct complete continuous density functions.
  • Helpful foundationsPiecewise differentiation · Measure zero in integration · Uniform PDF support
  • Common trapUndefined derivative points on sets of measure zero never alter continuous interval probabilities.
  • Next connectionApply CDF-to-PDF transformations to non-linear functions of random variables.
✦ More context & mechanics
1. Conceptual Mechanics & Logic

A complete CDF is defined across all of R. We differentiate region by region:

  • For x < 0: F(x) = 0 ⟹ f(x) = 0.
  • For 0 < x < 1: F(x) = x ⟹ f(x) = 1.
  • For x > 1: F(x) = 1 ⟹ f(x) = 0.

At the sharp corners x=0 and x=1, the derivative does not exist in the strict calculus sense. However, because the probability of individual points in continuous distributions is zero, we can define f(0) and f(1) arbitrarily without changing any integration results.

2. Real-World Tech Application

In robotic motion planning, piece-wise spline trajectory CDFs model uncertain obstacle distances. Planners differentiate the piecewise splines to compute spatial collision densities used in gradient-based path optimization.

3. Historical Discovery Story

Henri Lebesgue in 1904 introduced Lebesgue integration and measure theory, proving that functions differing only on sets of measure zero are indistinguishable under integration, resolving classical boundary derivative paradoxes.

4. How to Memorize

'Slice and Derive': Differentiate each region separately. Flat floors give zero; sloping ramps give density; corners carry zero measure.