4.9.7 · D3 · Maths › Probability Theory & Statistics › Continuous random variables — PDF, CDF, percentiles
Yeh page Continuous random variables — PDF, CDF, percentiles ki practice hai. Parent note ne ideas build kiye hain; yahan hum har tarah ke question drill karte hain, ek worked example per case. Agar koi symbol naya lage toh pehle parent ke [!definition] boxes padh lo.
Intuition "Har scenario" se hum kya matlab rakhte hain
Continuous random variables ka koi bhi problem actually ek machine hai jiske teen dials hain : (1) kya tumhe density f di gayi hai ya accumulation F ? (2) kya support ek finite chunk hai, half-line hai, ya degenerate hai? (3) kya woh area (probability), rate (density), ya location (percentile) pooch rahe hain? Har exam question un teen dials ki ek setting hai. Neeche hum sab tour karte hain.
Parent se vocabulary ek saath yaad karo:
==f ( x ) == = density — point x par probability kitni tightly spread hai. Height hai, probability nahi.
==F ( x ) = P ( X ≤ x ) == = cumulative — bilkul left se x tak sweep ki gayi total area.
Link: F ( x ) = ∫ − ∞ x f ( t ) d t aur (ulta) f ( x ) = F ′ ( x ) by the Fundamental Theorem of Calculus .
==p -th percentile== x p solve karta hai F ( x p ) = p .
Har row ek case class hai — ek aisi situation jo alag behave karti hai aur tumhe trip kar sakti hai agar tumne pehle na dekha ho. Last column us example ka naam batata hai jo ise cover karta hai.
#
Case class
Isme tricky kya hai
Covered by
C1
f diya hua, finite support , F + interval prob nikalo
F = 0 below, F = 1 above state karna padega
Ex 1
C2
f diya hua, half-line support (waiting time)
integral ∞ tak jaata hai; percentile via logs
Ex 2
C3
F diya hua, differentiate karke f recover karo
reverse direction; total area check karo
Ex 3
C4
Piecewise f (triangle) — probability crosses a corner
corner par integral split karna padega
Ex 4
C5
Normalising constant unknown (f = c g )
pehle c solve karo total-area = 1 se
Ex 5
C6
Degenerate / zero inputs: P ( X = c ) , P ( X ≤ below support) , empty interval
answers exactly 0 ya 1 hain
Ex 6
C7
Uniform — constant density, har percentile linear hai
density > 1 legal hai; "f ≤ 1 " myth check karo
Ex 7
C8
Word problem with units + ek real decision
"at least" translate karo, units carry karo
Ex 8
C9
Exam twist : mixed conditional probability P ( X > a ∣ X > b )
F ratios use karo, raw f nahi
Ex 9
C10
Limiting behaviour : x → edges par f , F kya karte hain
sanity checks, full solve nahi
Ex 10
Worked example Example 1 · linear density on
[ 0 , 2 ]
Maano f ( x ) = 2 1 x for 0 ≤ x ≤ 2 , aur f ( x ) = 0 elsewhere. F ( x ) (sab x par) nikalo, phir P ( 0.5 ≤ X ≤ 1.5 ) .
Forecast: guess karo ki F ( 2 ) = 1 hoga ya nahi, aur interval ka answer 2 1 se bada hoga ya chota.
Step 1 — Confirm karo ki yeh valid PDF hai. ∫ 0 2 2 1 x d x = [ 4 x 2 ] 0 2 = 1 , aur 2 1 x ≥ 0 on [ 0 , 2 ] . ✓
Yeh step kyun? Jab tak total area 1 na ho aur density non-negative na ho, downstream kuch bhi meaningful nahi hai.
Step 2 — 0 ≤ x ≤ 2 ke liye accumulate karo. F ( x ) = ∫ 0 x 2 1 t d t = [ 4 t 2 ] 0 x = 4 x 2 .
Yeh step kyun? F support ke left edge (yahan 0 ) se running area hai.
Step 3 — F PURI line par state karo. F ( x ) = 0 for x < 0 ; F ( x ) = 4 x 2 for 0 ≤ x ≤ 2 ; F ( x ) = 1 for x > 2 .
Yeh step kyun? Parent ki #4 mistake: yeh bhool jaana ki F ko support ke neeche 0 aur upar 1 reach karna chahiye.
Step 4 — Subtraction se interval. P ( 0.5 ≤ X ≤ 1.5 ) = F ( 1.5 ) − F ( 0.5 ) = 4 1. 5 2 − 4 0. 5 2 = 4 2.25 − 0.25 = 0.5.
Yeh step kyun? ∫ a b f = F ( b ) − F ( a ) — dobara integrate karne ki zaroorat nahi.
Verify: F ( 2 ) = 4 4 = 1 ✓, F ( 0 ) = 0 ✓. Answer 0.5 probability [ 0 , 1 ] mein hai ✓, aur kyunki zyada density right par hai, middle strip ka aadha probability pakadna reasonable lagta hai.
Neeche wala figure yeh density draw karta hai aur interval shade karta hai — dekho ki shaded red strip exactly woh "area" hai jo humari subtraction ne compute ki. Dashed mint lines dikhate hain ki support kahan shuru aur khatam hota hai (unke bahar f = 0 ), Step 3 ki visual reminder.
Dhyaan do ki density left se right badhti hai: woh slope hi wajah hai ki ek middle strip phir bhi aadhi probability capture kar leti hai — right par extra height peak se distance compensate kar deti hai.
Worked example Example 2 · exponential waiting time,
λ = 3 1
Bus gaps follow karte hain f ( x ) = 3 1 e − x /3 for x ≥ 0 (minutes). F , median, aur 90th percentile nikalo.
Forecast: waiting time ka median usually mean (= 3 min yahan) se kam hota hai. 3 se upar ya neeche guess karo.
Step 1 — CDF x tak integrate karke. F ( x ) = ∫ 0 x 3 1 e − t /3 d t = [ − e − t /3 ] 0 x = 1 − e − x /3 for x ≥ 0 .
Yeh step kyun? ∫ λ e − λ t d t = − e − λ t ; support 0 par shuru hoti hai toh 0 se integrate karte hain.
Step 2 — Median: solve karo F ( m ) = 0.5 . 1 − e − m /3 = 0.5 ⇒ e − m /3 = 0.5 ⇒ m = 3 ln 2 ≈ 2.079 min.
Yeh step kyun? Median 50th percentile hai — F invert karo, f ko mat chhuo.
Step 3 — 90th percentile: solve karo F ( x ) = 0.9 . 1 − e − x /3 = 0.9 ⇒ e − x /3 = 0.1 ⇒ x = 3 ln 10 ≈ 6.908 min.
Yeh step kyun? Same inversion p = 0.9 ke saath; log exponential ko undo karta hai.
Verify: median 2.079 < 3 ✓ (forecast se match — waiting times right-skewed hoti hain). x = 6.908 plug karo: e − 6.908/3 = e − 2.303 ≈ 0.100 , toh F ≈ 0.900 ✓. Ex 9 mein use hone wale memoryless twist ke liye Exponential distribution dekho.
Worked example Example 3 · CDF differentiate karo
F ( x ) = 1 − e − x 2 for x ≥ 0 aur F ( x ) = 0 for x < 0 . f nikalo aur total area verify karo.
Forecast: kyunki F 0 se 1 ki taraf badhta hai, uski slope f positive honi chahiye aur eventually 0 par wapas aani chahiye.
Step 1 — Differentiate (FTC). f ( x ) = F ′ ( x ) = d x d ( 1 − e − x 2 ) = 2 x e − x 2 for x ≥ 0 ; f = 0 for x < 0 .
Yeh step kyun? PDF accumulation ki rate hai — F ka derivative.
Step 2 — Non-negativity check. x ≥ 0 ke liye, 2 x ≥ 0 aur e − x 2 > 0 , toh f ≥ 0 . ✓
Yeh step kyun? Recovered f tabhi valid density hai jab woh kabhi negative na ho.
Step 3 — Total area check. ∫ 0 ∞ 2 x e − x 2 d x = [ − e − x 2 ] 0 ∞ = 0 − ( − 1 ) = 1. ✓
Yeh step kyun? Confirm karta hai F ( ∞ ) = 1 , yaani saari probability account ho gayi.
Verify: f ( 0 ) = 0 , aur jab x → ∞ toh e − x 2 term growth ko maar deti hai toh f → 0 — exactly woh "starts at 0, peaks, decays" shape jo forecast ne predict ki thi.
Worked example Example 4 · triangle density
f ( x ) = x for 0 ≤ x < 1 , f ( x ) = 2 − x for 1 ≤ x ≤ 2 , 0 elsewhere. F ( 1.5 ) aur P ( 0.5 ≤ X ≤ 1.5 ) nikalo.
Forecast: symmetry se peak x = 1 par hai; guess karo ki F ( 1 ) = 0.5 hoga ya nahi.
Step 1 — Pehla piece, 0 ≤ x ≤ 1 . F ( x ) = ∫ 0 x t d t = 2 x 2 . Toh F ( 1 ) = 2 1 .
Yeh step kyun? Rising slope par area accumulate karo.
Step 2 — Doosra piece, 1 ≤ x ≤ 2 . F ( 1 ) = 2 1 se shuru karo aur add karo: F ( x ) = 2 1 + ∫ 1 x ( 2 − t ) d t = 2 1 + [ 2 t − 2 t 2 ] 1 x .
Evaluate karo: F ( x ) = 2 1 + ( 2 x − 2 x 2 ) − ( 2 − 2 1 ) = 2 x − 2 x 2 − 1.
Yeh step kyun? x = 1 par corner ek split force karta hai; pehle se collected area carry karte hain.
Step 3 — Plug in karo. F ( 1.5 ) = 2 ( 1.5 ) − 2 1. 5 2 − 1 = 3 − 1.125 − 1 = 0.875.
P ( 0.5 ≤ X ≤ 1.5 ) = F ( 1.5 ) − F ( 0.5 ) = 0.875 − 2 0. 5 2 = 0.875 − 0.125 = 0.75.
Yeh step kyun? Interval prob corner cross karti hai lekin CDF ne split "heal" kar diya hai — ek subtraction finish kar deti hai.
Verify: F ( 1 ) = 0.5 ✓ (symmetry forecast se match), F ( 2 ) = 4 − 2 − 1 = 1 ✓. Answer 0.75 lies in [ 0 , 1 ] ✓.
Neeche wala figure dikhata hai ki is problem ko do integrals kyun chahiye, ek nahi: corner x = 1 par dashed mint line follow karo — uske left par density f = x ki tarah badhti hai, right par f = 2 − x ki tarah ghalti hai, toh shaded red region (hamara P = 0.75 ) actually do alag-shaped pieces hain jo corner par jode gaye hain. Ek formula se corner ke across integrate karne ki koshish switch miss kar deti.
Worked example Example 5 · pehle
c solve karo
f ( x ) = c x 2 on [ 0 , 3 ] , 0 elsewhere. c nikalo, phir P ( X ≤ 1 ) .
Forecast: zyaadatar area x = 3 ke paas hai (bada x 2 ). Guess karo ki P ( X ≤ 1 ) 2 1 se kaafi neeche hoga ya nahi.
Step 1 — Total area = 1 impose karo. ∫ 0 3 c x 2 d x = c [ 3 x 3 ] 0 3 = c ⋅ 9 = 1 ⇒ c = 9 1 .
Yeh step kyun? Density ko 1 integrate karna padta hai; woh ek equation unknown constant pin kar deti hai.
Step 2 — F build karo. F ( x ) = ∫ 0 x 9 1 t 2 d t = 27 x 3 for 0 ≤ x ≤ 3 .
Yeh step kyun? c known hone par, normally accumulate karo.
Step 3 — Evaluate karo. P ( X ≤ 1 ) = F ( 1 ) = 27 1 ≈ 0.037.
Yeh step kyun? P ( X ≤ x ) CDF hi hai — bas read off karo.
Verify: F ( 3 ) = 27 27 = 1 ✓. Answer 0.037 ≪ 0.5 ✓ — forecast se match ki mass right end ke paas hai.
Worked example Example 6 · "trick" answers
Ex 1 se f ( x ) = 2 1 x on [ 0 , 2 ] use karke evaluate karo: (a) P ( X = 1 ) , (b) P ( X ≤ − 4 ) , (c) P ( X ≤ 100 ) , (d) P ( 1.3 ≤ X ≤ 1.3 ) .
Forecast: inme se teen exactly 0 ya 1 hain bina kisi integration ke. Spot karo kaun sa.
Step 1 — (a) single point. P ( X = 1 ) = ∫ 1 1 f = 0.
Yeh step kyun? Ek point ki zero width hai, toh zero area — parent ka core rule.
Step 2 — (b) support ke neeche. − 4 < 0 , aur F ( x ) = 0 for x < 0 , toh P ( X ≤ − 4 ) = 0.
Yeh step kyun? Support shuru hone se pehle koi probability nahi rehti.
Step 3 — (c) support ke upar. 100 > 2 , aur F ( x ) = 1 for x > 2 , toh P ( X ≤ 100 ) = 1.
Yeh step kyun? Saari probability x = 2 tak collect ho gayi thi; aage kuch naya nahi add ho sakta.
Step 4 — (d) empty-width interval. P ( 1.3 ≤ X ≤ 1.3 ) = F ( 1.3 ) − F ( 1.3 ) = 0.
Yeh step kyun? Same width-zero logic — < vs ≤ ka distinction yahan kabhi matter nahi karta.
Verify: chaaron answers exactly 0 , 0 , 1 , 0 hain — pure boundary behaviour, koi integral evaluate nahi hua ✓.
Worked example Example 7 · density above 1 fine hai
X uniform hai on [ 0.2 , 0.6 ] : f ( x ) = 0.6 − 0.2 1 = 2.5 us interval par, 0 elsewhere. F , P ( X ≤ 0.5 ) , aur 25th percentile nikalo.
Forecast: density 2.5 > 1 hai. Kya yeh kuch toodta hai? (Nahi — dekho.)
Step 1 — Area se height check. Area = 2.5 × ( 0.6 − 0.2 ) = 2.5 × 0.4 = 1 . ✓
Yeh step kyun? Sirf area 1 ke barabar honi chahiye; ek lamba patla box bilkul legal hai. Yeh parent ki #1 mistake hai, live.
Step 2 — CDF (ek straight ramp). 0.2 ≤ x ≤ 0.6 ke liye: F ( x ) = 2.5 ( x − 0.2 ) . Bahar: 0 below 0.2 , 1 above 0.6 .
Yeh step kyun? Constant density ⇒ area linearly badhta hai ⇒ F ek straight line hai (dekho Uniform distribution ).
Step 3 — P ( X ≤ 0.5 ) . F ( 0.5 ) = 2.5 ( 0.5 − 0.2 ) = 2.5 × 0.3 = 0.75.
25th percentile: solve karo 2.5 ( x − 0.2 ) = 0.25 ⇒ x − 0.2 = 0.1 ⇒ x = 0.3.
Yeh step kyun? Probability ke liye CDF read karo; percentile ke liye invert karo.
Verify: F ( 0.6 ) = 2.5 × 0.4 = 1 ✓, F ( 0.2 ) = 0 ✓. Percentile 0.3 ∈ [ 0.2 , 0.6 ] ✓, aur f = 2.5 > 1 se koi trouble nahi ✓.
Worked example Example 8 · battery lifetime
Ek battery ki life (hours) ki f ( t ) = 4 1 e − t /4 for t ≥ 0 hai. Kitna fraction kam se kam 6 hours chalta hai? Top 5% kin lifetimes se zyada chalte hain?
Forecast: mean life 4 h hai, toh "at least 6 h" minority honi chahiye — 25% se neeche guess karo.
Step 1 — CDF. F ( t ) = 1 − e − t /4 , t ≥ 0 (Ex 2 jaisi form λ = 4 1 ke saath).
Yeh step kyun? Kisi bhi "kitna up to / beyond chalta hai" question ka jawab dene ke liye accumulated probability chahiye.
Step 2 — "At least 6 h" = upper tail. P ( T ≥ 6 ) = 1 − F ( 6 ) = e − 6/4 = e − 1.5 ≈ 0.223.
Yeh step kyun? "At least" matlab "≤ " ka complement: P ( T ≥ t ) = 1 − F ( t ) . Units: hours in, pure probability out.
Step 3 — "Top 5% exceed" = 95th percentile. Solve karo F ( t ) = 0.95 : 1 − e − t /4 = 0.95 ⇒ e − t /4 = 0.05 ⇒ t = 4 ln 20 ≈ 11.98 h.
Yeh step kyun? Jo value sirf 5% beat karti hai woh 95 th percentile hai — p = 0.95 par F invert karo.
Verify: 0.223 < 0.25 ✓ (forecast se match). Check karo t = 11.98 : e − 11.98/4 = e − 2.996 ≈ 0.050 toh F ≈ 0.95 ✓. Units poori tarah hours hain ✓.
Worked example Example 9 ·
P ( X > a ∣ X > b )
Ex 8 ki battery se (f ( t ) = 4 1 e − t /4 ), given ki battery pehle se 2 h survive kar chuki hai, P ( T > 5 ∣ T > 2 ) kya hai?
Forecast: exponential memoryless hai. Guess karo P ( T > 5 ∣ T > 2 ) = P ( T > 3 ) .
Step 1 — Conditional-probability definition. P ( T > 5 ∣ T > 2 ) = P ( T > 2 ) P ( T > 5 and T > 2 ) = P ( T > 2 ) P ( T > 5 ) .
Yeh step kyun? "T > 5 " pehle se "T > 2 " imply karta hai, toh joint event bas T > 5 hai.
Step 2 — Tail probabilities use karo. P ( T > t ) = e − t /4 , toh e − 2/4 e − 5/4 = e − ( 5 − 2 ) /4 = e − 3/4 ≈ 0.472.
Yeh step kyun? CDF/tail ke ratios, raw f nahi — parent ki #3 mistake se bacha.
Step 3 — Pattern recognize karo. e − 3/4 = P ( T > 3 ) : jo extra time chahiye woh 2 h pehle serve ho chuke bhool gaya.
Yeh step kyun? Memoryless property numerically confirm hoti hai.
Verify: e − 0.75 ≈ 0.4724 , aur P ( T > 3 ) = e − 3/4 ≈ 0.4724 ✓ — identical, forecast se match.
Worked example Example 10 · edges padho
Kisi bhi continuous RV ke liye, describe karo ki F aur f x → − ∞ aur x → + ∞ par kya karte hain, F ( x ) = 1 − e − x 2 (Ex 3) ko concrete case ki tarah use karke.
Forecast: F ko 0 aur 1 ke beech sandwich hona chahiye; f ko dono far ends par 0 tak fade karna chahiye (warna area infinite ho jaata).
Step 1 — Far left. F ( x ) = 0 for x < 0 , toh lim x → − ∞ F ( x ) = 0 aur f = 0 wahan.
Yeh step kyun? Support se pehle koi probability nahi; F 0 par flat shuru hota hai.
Step 2 — Far right. lim x → ∞ ( 1 − e − x 2 ) = 1 − 0 = 1 , toh F → 1 ; aur f ( x ) = 2 x e − x 2 → 0 kyunki e − x 2 linear 2 x ko crush kar deta hai.
Yeh step kyun? F ko 1 par saturate karna chahiye (total probability), aur f ko far edge par vanish karna chahiye taaki area finite rahe.
Step 3 — General rule. Har CDF ek non-decreasing curve hai jo 0 se 1 tak badhti hai; har PDF ko finite total 1 tak integrate karna hota hai, jo force karta hai f → 0 dono tails mein — agar f hamesha kisi fixed positive height se upar rehta, toh tail area badhta rehta aur total 1 par kabhi settle nahi kar pata.
Yeh step kyun? Yeh Steps 1–2 ke do concrete limits ko ek universal law mein badal deta hai jo tum kisi bhi density par instant sanity check ki tarah use kar sakte ho: jo PDF apni tails mein 0 tak decay nahi karta woh total area 1 nahi rakh sakta, toh woh valid density nahi hai.
Verify: F ( − ∞ ) = 0 , F ( + ∞ ) = 1 , f ( ± ∞ ) = 0 ✓ — universal boundary conditions, forecast se match.
Recall Kaun sa question ke liye kaun sa tool?
f diya, probability poochi ::: integrate karo / F ( b ) − F ( a ) use karo.
f diya, percentile poochi ::: F banao, phir F ( x p ) = p solve karo.
F diya, f poochi ::: differentiate karo: f = F ′ .
P ( X = c ) ya zero-width interval pooche ::: exactly 0 hai.
P ( X ≤ below support) / P ( X ≤ above support) pooche ::: 0 / 1 .
"at least a " pooche ::: P ( X ≥ a ) = 1 − F ( a ) .
P ( X > a ∣ X > b ) pooche ::: tails ka ratio 1 − F ( b ) 1 − F ( a ) .
"Given (f or F)? Support (box, ray, point)? Ask (area, rate, place)?" — yeh teen set karo aur upar ka har problem batata hai ki kaun sa formula use karna hai.
Differentiate f = F prime
Integrate or F b minus F a
Zero width or off support