4.9.7Probability Theory & Statistics

Continuous random variables — PDF, CDF, percentiles

1,863 words8 min readdifficulty · medium2 backlinks

1. Why density, not probability?

So we never read probability off the height of f(x)f(x). Height is density; area is probability.


2. The PDF — definition from first principles

WHAT: A function f(x)f(x) describing how probability is spread over the real line.

WHY it must integrate to 1: some value must occur, so the total area = total probability = 1.


3. The CDF — accumulating the density

WHAT: The cumulative distribution function F(x)F(x) = "probability of being at most xx."

WHY define it: it converts "area" questions into simple subtraction and is defined for every RV (discrete or continuous).

Derivation of its properties (from the PDF axioms):

  • F()=f=0F(-\infty)=\int_{-\infty}^{-\infty} f = 0, and F()=f=1F(\infty)=\int_{-\infty}^{\infty} f = 1.
  • FF is non-decreasing: adding more area (since f0f\ge 0) can't shrink the total.
  • FF is continuous for a continuous RV (no jumps, because no point carries mass).
Figure — Continuous random variables — PDF, CDF, percentiles

4. Percentiles & the median

WHAT: The pp-th percentile xpx_p is the value below which a fraction pp of probability lies.

WHY FF is invertible here: for a continuous RV with f>0f>0 on its support, FF is strictly increasing, so each pp has a unique xpx_p.


5. Worked examples


6. Common mistakes


7. Active-recall flashcards

What two conditions make f(x)f(x) a valid PDF?
f(x)0f(x)\ge0 everywhere, and f(x)dx=1\int_{-\infty}^\infty f(x)\,dx=1.
For a continuous RV, what is P(X=c)P(X=c)?
00, since ccf=0\int_c^c f=0.
How do you get the CDF from the PDF?
F(x)=xf(t)dtF(x)=\int_{-\infty}^x f(t)\,dt (accumulate area from the left).
How do you get the PDF from the CDF?
f(x)=F(x)f(x)=F'(x), by the Fundamental Theorem of Calculus.
Express P(aXb)P(a\le X\le b) using the CDF.
F(b)F(a)F(b)-F(a).
Define the pp-th percentile xpx_p.
The value with F(xp)=pF(x_p)=p; i.e. xp=F1(p)x_p=F^{-1}(p).
Can a PDF value exceed 1?
Yes — it's a density, only the total area must equal 1.
Why is the << vs \le distinction irrelevant for continuous RVs?
Endpoints have zero probability, so including/excluding them changes nothing.
CDF of f(x)=2xf(x)=2x on [0,1][0,1]?
F(x)=x2F(x)=x^2 on [0,1][0,1].
Median of exponential with λ\lambda?
Solve 1eλm=0.5m=ln2/λ1-e^{-\lambda m}=0.5 \Rightarrow m=\ln2/\lambda.

Recall Feynman: explain to a 12-year-old

Imagine spreading 1 kg of jam over a long piece of bread. You can't ask "how much jam is exactly at this one dot?" — a dot is too tiny, the answer is zero. But you can ask "how much jam between here and there?" — you scoop that strip and weigh it. The PDF is how thickly the jam is spread at each spot. The CDF is "how much jam have I scooped from the left edge up to here." The median is the spot where exactly half the jam is on each side.


Connections

  • Discrete random variables — PMF (the discrete cousin: sums instead of integrals)
  • Expectation and Variance of continuous RVs (E[X]=xf(x)dxE[X]=\int x f(x)\,dx)
  • Normal distribution (its CDF Φ\Phi defines z-scores & percentiles)
  • Exponential distribution (worked Example 2; memorylessness)
  • Fundamental Theorem of Calculus (the fFf\leftrightarrow F link)
  • Uniform distribution (constant density, linear CDF)
  • Quantile function and inverse-transform sampling (using F1F^{-1} to generate random numbers)

Concept Map

implies

so use

height is density, area is prob

axiom

axiom

integrate up to x

differentiate via

recovers

subtract

equals F b - F a

gives

gives

has

Continuous RV

P of single point = 0

PDF f x

Area = probability

CDF F x = P X le x

Fundamental Theorem of Calculus

Interval prob F b - F a

Total area = 1

f x greater or equal 0

F non-decreasing and continuous

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, continuous random variable wahi hota hai jo koi bhi value le sakta hai ek range me — jaise kisi banda ki exact height 172.48...172.48... cm. Yahan ek tricky baat hai: kisi ek exact value par probability hamesha zero hoti hai, kyunki ek point ki width zero hai. Isliye hum probability ko hamesha ek interval (chunk) par measure karte hain. Yeh measure karne ka tool hai PDF f(x)f(x) — yeh batata hai ki probability kitni "thick" spread hai us point ke aaspaas. Important: f(x)f(x) ki height probability nahi, density hai; probability to curve ke neeche ka area hai. Isliye f(x)f(x) ka value 1 se bada bhi ho sakta hai, sirf total area 1 hona chahiye.

CDF F(x)=P(Xx)F(x)=P(X\le x) ka matlab hai "left side se ab tak kitna area accumulate hua." PDF se CDF banate waqt integrate karte hain (F=fF=\int f), aur CDF se wapas PDF nikalne ke liye differentiate (f=Ff=F') — yeh Fundamental Theorem of Calculus ka direct istemaal hai. Interval ki probability nikalna super easy ho jata hai: P(aXb)=F(b)F(a)P(a\le X\le b)=F(b)-F(a), bas subtraction.

Percentile ka funda: pp-th percentile xpx_p wo value hai jiske niche pp fraction probability hai, yaani F(xp)=pF(x_p)=p. Median to bs 50th percentile hai — F(m)=0.5F(m)=0.5 solve karo. Yaad rakho percentile ke liye hamesha FF (cumulative) use karo, ff nahi — yeh sabse common galti hai. Exam me jam-on-bread wala analogy yaad rakho: ff = jam kitni thick lagi, FF = left se ab tak kitni jam scoop ki, median = wo spot jahan aadhi jam idhar aadhi udhar.

Go deeper — visual, from zero

Test yourself — Probability Theory & Statistics

Connections