Lesson 1.8: The Continuous World: PDFs and Smooth CDFs
We now cross the bridge from the discrete (counts) to the continuous (measurements). Here, the old tools break down. We introduce the Probability Density Function (PDF), where probability is AREA, and revisit the CDF, now as a smooth curve defined by calculus. Mastering this is the key to understanding all continuous models, including the famous Normal distribution.
Part 1: The Problem with Continuous Variables
The Core Idea: In the discrete world, we could assign probability "mass" to a specific point. In the continuous world, there are infinitely many points. The probability of landing on any *single exact point* is zero. We must shift our thinking from probability at a point to density over a region.
Consider a stock's daily return, . What is the probability that the return is *exactly* 1.25%? Not 1.250001% or 1.249999%, but exactly 1.25000...% with infinite precision?
This means our old friend, the PMF, is useless here. We need a new tool: the **Probability Density Function (PDF)**.
Imagine a bell curve. The area shaded between x=a and x=b is the probability.
Definition: Probability Density Function (PDF)
The PDF, , is a function where the probability of falling between and is the **integral (the area)** of the function from to .
The Rules of a Valid PDF
A function is a valid PDF only if it meets two conditions:
- Always Non-Negative: for all . (Density can't be negative).
- Total Area is One: . (The total probability of all outcomes must be 1).
Part 2: The PDF and CDF: Two Sides of the Same Coin
In the discrete world, the CDF was a staircase built from the PMF's bars. In the continuous world, the CDF is a smooth ramp built by the PDF's curve. They are intrinsically linked by the **Fundamental Theorem of Calculus**.
The CDF, , is the total accumulated area under the PDF from the very beginning up to the point .
The PDF represents the *rate of change* of cumulative probability. It's the slope of the CDF at any given point.
Derivation: Using the CDF to Find Probabilities
Let's prove the most useful property of the CDF: calculating the probability of an interval.
Step 1: By definition, and .
Step 2: In terms of integrals, this is:
Step 3: By the properties of definite integrals, subtracting the area up to from the area up to leaves just the area between and .
Conclusion: . This is the continuous equivalent of the rule we learned in Lesson 1.4.
Part 3: Why This Matters for Quants and ML
Quant Finance: The Engine of Maximum Likelihood Estimation (MLE)
The PDF is the absolute heart of MLE for continuous data (Module 3). When you have a series of stock returns , you assume they are drawn from a distribution with a certain PDF, like the Normal PDF .
The **Likelihood Function** is the joint PDF of all your data points. You find the parameters () that maximize the value of this function. Without a correctly specified PDF, MLE is impossible.
Machine Learning: Quantiles, Percentiles, and Risk
The CDF is the direct gateway to understanding the risk and ranking of continuous predictions.
A risk model might output a continuous loss distribution for a portfolio. The risk manager needs to know the **Value-at-Risk (VaR)**, which is simply a percentile of this distribution. To find the 99% VaR, they must solve for in the equation:
This requires using the **Inverse CDF** (also called the quantile function). This is one of the most common operations in risk management.
What's Next? Finding the Center in a Continuous World
We have successfully defined the functions that govern the continuous world. We've replaced summation with integration.
Now, we must update our methods for calculating the key summary statistics. How do we find the "center of gravity" (Expected Value) or the "spread" (Variance) when we're dealing with a smooth curve instead of discrete weights?
The next lesson, **Expected Value and Variance via Integration**, will do exactly that.