Four values (55, 66, 77, 88) are \(\leq\) 88 \(\Rightarrow\) percentile rank = 80.
What if you scored 77?
\[P = \frac{3}{5} \times 100 = 60\]
What Is a CDF?
Maps values to their percentile rank (as probability)
Gives \(\mathbb{P}(X \leq x)\) for any value \(x\)
Works for both discrete and continuous variables
Always increases from 0 to 1
CDF: How It Works
For any value \(x\), the CDF counts:
\[F(x) = \frac{\text{No. values} \leq x}{\text{Total no. of values}}\]
Same idea as the percentile formula, but expressed as a probability \([0, 1]\)
For continuous distributions, R computes this with pnorm(x, mean, sd)
CDF Example: Three Coin Flips
Flip a fair coin 3 times. Total outcomes: \(2^3 = 8\).
Heads (\(k\))
0
1
2
3
Probability
1/8
3/8
3/8
1/8
Cumul. Prob.
0.125
0.500
0.875
1.000
Each probability: \(P(X=k) = \binom{3}{k}\left(\frac{1}{2}\right)^3\)
CDF: Coin Flips Plot
Figure 15: CDF for number of heads in 3 coin flips
CDF: Continuous Example (Height)
Heights modeled as \(N(\mu = 170,\; \sigma = 10)\) cm.
Figure 16: CDF for height: P(X <= 175) = 0.69
Life Expectancy: CDF
Figure 17: CDF of average life expectancy by country
PMF vs. PDF vs. CDF
%%{init:{'flowchart':{'useMaxWidth':true,'nodeSpacing':60,'rankSpacing':60},'themeVariables':{'fontSize':'22px'}}}%%
flowchart LR
A["Raw Data"] --> B["Histogram<br/>(Frequencies)"]
B --> C["PMF<br/>(Discrete Prob.)"]
B --> D["PDF<br/>(Continuous<br/>Density)"]
C --> E["CDF<br/>(Cumulative<br/>Prob.)"]
D --> E
Function
Variable Type
Gives
PMF
Discrete
\(\mathbb{P}(X = x)\)
PDF
Continuous
Density at \(x\)
CDF
Both
\(\mathbb{P}(X \leq x)\)
Conclusion
What Can You Do Now?
Quantify uncertainty: given a distribution, compute the probability of any range of outcomes
Compare: the CDF lets you answer “what fraction falls below this threshold?” for any dataset
Model: if data is approximately normal, two numbers (\(\mu\), \(\sigma\)) plus the 68-95-99.7 rule give you most of the picture
Communicate: PMF, PDF, and CDF are the shared language for describing how variables behave
Next: we’ll use these tools in R with pnorm, qnorm, and dnorm.