4.9.14 · D3 · Maths › Probability Theory & Statistics › Transformations of random variables — change-of-variable tec
Intuition Ye page kis kaam ki hai
Parent note 4.9.14 ne tumhe machine di thi:
f Y ( y ) = f X ( g − 1 ( y ) ) d y d x , (non-monotonic) f Y ( y ) = ∑ i f X ( x i ) d y d x i .
Yahan hum us machine ko har tarah ke input par chalate hain — increasing maps, decreasing maps, folding maps, ek aisi map jo poori ray ko ek point mein squeeze kar deti hai, boundary/limit behaviour, ek word problem, aur ek exam twist. Kuch bhi naya introduce nahi ho raha; bas ensure karte hain ki koi bhi scenario tumhe surprise na kare.
Shuru karne se pehle, teen seedhi-saadhi reminders taaki neeche har symbol samajh aaye:
Definition Teen naam jo baar baar dikhenge
X woh input random variable hai — woh number jo kisi random process se niklta hai, jiski density f X tumhe pehle se pata hai. "Density" = probability per unit length: ruler par jam kitna ghana phaila hai.
g woh transformation hai — woh function jo tum apply karte ho, Y = g ( X ) .
g − 1 woh inverse hai — woh function jo g ko undo karta hai. Agar g , x ↦ y bhejta hai, toh g − 1 , y ↦ x bhejta hai. Symbol d y d x batata hai ki y -axis ka ek chhota sa sliver x -axis mein kitna stretch hota hai: yahi stretch factor (Jacobian) hai.
Is topic ka har problem inhi cells mein se kisi ek mein aata hai. Right column us worked example ka naam batata hai jo use cover karta hai.
#
Case class
Usmein kya khaas hai
Kaun cover karta hai
A
g strictly increasing
inequalities ka direction nahi badalti; d y d x > 0
Example 1
B
g strictly decreasing
inequalities flip hoti hain; d y d x < 0 , $
\cdot
C
g non-monotonic / folding (do branches)
dono roots ± par sum karna padta hai
Example 3
D
g poori ray ko ek point par map karta hai / degenerate & discrete mix
classic Y = max ( X , 0 ) : ek atom aata hai
Example 4
E
Support / range boundary matter karti hai; density blow up hoti hai edge par (limiting behaviour)
Example 5
F
Word problem (real-world units) — voltage → power
Example 6
G
Exam twist : composite / affine-then-square, a ke sign dono taraf
Example 7
Hum saaton work karte hain. Har ek Forecast se shuru hota hai — steps padhne se pehle ek guess karo.
Worked example Increasing affine:
Y = 2 X + 1 , with X ∼ Uniform ( 0 , 1 )
Forecast: Uniform density [ 0 , 1 ] par height 1 ka flat block hai. Axis ko 2 se stretch karo. Kya naya block taller ya shorter hoga, aur kis interval par?
Step 1 — Inverse g − 1 nikalo. Ye step kyun? Formula ko g − 1 ( y ) chahiye, toh y = 2 x + 1 ko x ke liye solve karo: x = 2 y − 1 .
Step 2 — Inverse ko differentiate karo. Ye step kyun? Stretch factor d y d x hai, g ′ nahi. Yahan d y d x = 2 1 , magnitude 2 1 .
Step 3 — Naya support nikalo. Ye step kyun? g ki range ke bahar f Y = 0 hoga. Jaise x , ( 0 , 1 ) par chalta hai, y = 2 x + 1 , ( 1 , 3 ) par chalta hai.
Step 4 — Assemble karo. f X ≡ 1 on ( 0 , 1 ) ke saath:
f Y ( y ) = 1 ⋅ 2 1 = 2 1 , 1 < y < 3.
Verify karo: integrate karo: ∫ 1 3 2 1 d y = 2 1 ⋅ 2 = 1 . ✓ Block shorter ho gaya (height 2 1 ) aur wider ho gaya (length 2 ) — forecast confirmed: 2 se stretch karne par density 2 se dilute hoti hai.
Kyunki inequality kabhi flip nahi hui, yeh textbook increasing case hai: F Y ( y ) = F X ( g − 1 ( y )) directly. Dekho Cumulative Distribution Function ki CDF route kyun hamesha kaam karti hai.
Worked example Decreasing affine:
Y = 1 − X , with X ∼ Uniform ( 0 , 1 )
Forecast: Y = 1 − X bas interval ( 0 , 1 ) ko 2 1 ke baare mein reflect karta hai. Kya density ki shape bilkul bhi badlegi?
Step 1 — Inverse. Kyun? y = 1 − x solve karo: x = 1 − y .
Step 2 — Inverse ka derivative. Kyun? d y d x = − 1 . Yeh negative hai — ek decreasing map. CDF ke through raw formula mein minus sign aata hai kyunki inequality flip hoti hai: g ( X ) ≤ y ⟺ X ≥ 1 − y , toh F Y ( y ) = 1 − F X ( 1 − y ) . Differentiate karo: f Y ( y ) = − f X ( 1 − y ) ⋅ ( − 1 ) = f X ( 1 − y ) . Dono minus signs cancel ho jaate hain — bilkul wahi jo d y d x = 1 hamein deta hai.
Step 3 — Support. x ∈ ( 0 , 1 ) ⇒ y = 1 − x ∈ ( 0 , 1 ) .
Step 4 — Assemble karo. f Y ( y ) = 1 ⋅ ∣ − 1∣ = 1 , 0 < y < 1.
Verify karo: ∫ 0 1 1 d y = 1 . ✓ Reflection length-preserving hoti hai (stretch factor 1 ), toh density unchanged rehti hai — forecast confirmed.
Common mistake Wo trap jo ye cell expose karne ke liye bani hai
Agar tum absolute value bhool gaye aur signed derivative − 1 use kiya, toh tumhe negative density f Y = − 1 milti. Densities kabhi negative nahi ho sakti — ∣ ⋅ ∣ yahi protect karta hai.
Yeh classic two-root case hai. Parabola imagine karo.
Worked example Uniform ka square:
Y = X 2 , with X ∼ Uniform ( − 1 , 1 )
Forecast: Square karne se x = + 0.5 aur x = − 0.5 dono ek hi y = 0.25 par fold ho jaate hain. Do strips ek mein girti hain. Kya y = 0 ke paas f Y badi ya chhoti hogi?
Step 1 — g ( x ) = y ke saare roots list karo. Ye step kyun? g one-to-one nahi hai, toh har preimage par sum karte hain. 0 < y < 1 ke liye, x 2 = y deta hai x = + y aur x = − y ; dono support ( − 1 , 1 ) mein hain.
Step 2 — Har branch ka stretch factor. Kyun? Har root x = ± y ke liye d y d x = ± 2 y 1 , dono ke liye magnitude 2 y 1 hai.
Step 3 — Dono pourings ko sum karo. f X ( x ) = 2 1 on ( − 1 , 1 ) ke saath:
f Y ( y ) = branch + 2 1 ⋅ 2 y 1 + branch − 2 1 ⋅ 2 y 1 = 2 y 1 , 0 < y < 1.
Step 4 — Support. Y = X 2 ∈ [ 0 , 1 ) , toh baaki jagah f Y = 0 .
Verify karo: ∫ 0 1 2 y 1 d y = [ y ] 0 1 = 1 . ✓ Yeh y = 0 ke paas blow up karta hai — chhote x -values squaring ke baad 0 ke paas crowd karte hain. Forecast: y = 0 ke paas bada, confirmed.
Parent ke Example 2 se compare karo (normal squared → chi-square ): same folding mechanic, alag f X .
Worked example Rectifier:
Y = max ( X , 0 ) , with X ∼ Uniform ( − 1 , 1 )
Forecast: x < 0 wali har cheez y = 0 par map ho jaati hai. Yeh ek poore interval ki probability ek single point par aana hai. Kya koi density yeh describe kar sakti hai?
Step 1 — Input ke behaviour ko split karo. Ye step kyun? g invertible nahi hai: x ≥ 0 par yeh identity hai (theek hai), lekin x < 0 par yeh 0 par collapse karta hai (degenerate). Dono regions alag handle karo.
Step 2 — Collapsed part atom ban jaata hai. Kyun? Event { Y = 0 } equals { X ≤ 0 } , jiski probability hai
P ( Y = 0 ) = P ( X ≤ 0 ) = ∫ − 1 0 2 1 d x = 2 1 .
Ek point par baitha finite probability ek point mass (atom) hai, koi density carry nahi kar sakti. Toh Y ek mix hai: 0 par weight 2 1 ka atom, plus ek continuous piece.
Step 3 — Identity part apni density rakhta hai. Kyun? x > 0 par, y = x , toh d y d x = 1 aur f Y ( y ) = f X ( y ) ⋅ 1 = 2 1 for 0 < y < 1 .
Step 4 — Poora law likho.
Y = { 0 density 2 1 with probability 2 1 (atom) on ( 0 , 1 ) .
Verify karo: total mass = atom 2 1 + = 1/2 ∫ 0 1 2 1 d y = 1 . ✓ Forecast confirmed: ek pure density ise describe nahi kar sakti — change-of-variable formula sirf smooth branch par apply hota hai, aur degenerate branch ko atom ke roop mein count karna padta hai.
Common mistake Degenerate-input trap
Blindly f Y ( y ) = f X ( y ) likhna [ 0 , 1 ) par 0 par 2 1 atom ko miss kar deta hai — tumhari "density" sirf 2 1 tak integrate hogi. Jab bhi g positive probability wale set par constant ho, atom expect karo.
Worked example Uniform ka log:
Y = − ln X , with X ∼ Uniform ( 0 , 1 )
Forecast: Jaise x → 0 + , − ln x → + ∞ ; jaise x → 1 − , − ln x → 0 + . Toh Y ka range ( 0 , ∞ ) hai. Kis end ke paas density pile up hogi?
Step 1 — Inverse. Kyun? y = − ln x solve karo: dono sides exponentiate karo, x = e − y .
Step 2 — Stretch factor. d y d x kyun, g ′ nahi? Formula ko inverse ka derivative chahiye: d y d x = − e − y , magnitude e − y .
Step 3 — Support / limits. Limits check kyun karo? Cell E sirf edges ke baare mein hai. x ∈ ( 0 , 1 ) ⇒ y ∈ ( 0 , ∞ ) . Jaise y → 0 + , f Y → 1 (finite); jaise y → ∞ , f Y → 0 (exponentially khatam) — yahan koi blow-up nahi, Example 3 ki tarah nahi.
Step 4 — Assemble karo. f X ≡ 1 ke saath:
f Y ( y ) = 1 ⋅ e − y = e − y , y > 0.
Yeh Exp ( 1 ) hai — same Inverse Transform Sampling mechanic jaise parent ke Example 3 mein.
Verify karo: ∫ 0 ∞ e − y d y = 1 . ✓ Density y = 0 ke paas sabse zyada hai aur decay karti hai; infinite tail mein vanishing mass hai. Forecast confirmed.
Worked example Voltage se power. Ek noisy voltage
V (volts) 1 Ω resistor par V ∼ N ( 0 , 1 ) hai. Dissipated power hai P = V 2 (watts). f P nikalo.
Forecast: Physically P ≥ 0 hamesha, aur chhote voltages (0 ke paas) sabse common hain. Power density kahan concentrate hogi?
Step 1 — Transform identify karo. Kyun? P = g ( V ) = V 2 — folding, do branches v = ± p for p > 0 . Same machinery jaise Example 3 mein, alag f X .
Step 2 — Har branch ka stretch factor. v = ± p ⇒ d p d v = ± 2 p 1 , magnitude 2 p 1 .
Step 3 — Branches sum karo. f V ( v ) = 2 π 1 e − v 2 /2 ke saath (v mein even hai, toh dono roots equal terms dete hain):
f P ( p ) = 2 ⋅ 2 π 1 e − p /2 ⋅ 2 p 1 = 2 π p 1 e − p /2 , p > 0.
Yeh exactly χ 1 2 hai — standard normal voltage ko square karne par chi-square power milti hai.
Step 4 — Units sanity. p watts mein hai; f P ( p ) ke units 1/ watt hain (density = probability per watt), jo p 1 ki dimension se match karta hai. ✓
Verify karo: ∫ 0 ∞ 2 π p 1 e − p /2 d p = 1 . ✓ Mean power bhi E [ P ] = E [ V 2 ] = Var ( V ) = 1 watt hai (yeh LOTUS ka kaam hai). Forecast confirmed: density p = 0 ke paas sabse zyada pile up hoti hai (chhote voltages common hain) aur ek heavy tail hai.
Worked example Composite transform:
Y = ( a X ) 2 = a 2 X 2 with a = 0 and X ∼ N ( 0 , 1 ) . Dikhao ki answer a ke sign par depend nahi karta , aur f Y nikalo.
Forecast: Kya a → − a flip karna Y ki distribution change karta hai? Squaring signs ko khatam kar deti hai — compute karne se pehle guess karo.
Step 1 — Ek jaane-maane case tak reduce karo. Kyun? Y = a 2 X 2 . Let Z = X 2 ; Example 6 / parent se, Z ∼ χ 1 2 with f Z ( z ) = 2 π z 1 e − z /2 . Phir Y = a 2 Z ek increasing affine map hai (kyunki a 2 > 0 hamesha) — Cell A machinery.
Step 2 — Scaling ka inverse. Kyun? y = a 2 z ⇒ z = a 2 y , aur d y d z = a 2 1 , magnitude a 2 1 . Note karo ki a 2 , + a aur − a dono ke liye same hai — sign pehle hi chali gayi.
Step 3 — Assemble karo.
f Y ( y ) = f Z ( a 2 y ) ⋅ a 2 1 = 2 π ⋅ y / a 2 1 e − y / ( 2 a 2 ) ⋅ a 2 1 = 2 π a 2 y 1 e − y / ( 2 a 2 ) , y > 0.
Step 4 — Sign check. Kyun? Jahan bhi a aata hai woh a 2 = ∣ a ∣ 2 ke roop mein hai. Toh f Y , a aur − a ke liye identical hai.
Verify karo: a = 2 ke saath (toh a 2 = 4 ): f Y ( y ) = 8 π y 1 e − y /8 aur ∫ 0 ∞ f Y = 1 . ✓ Forecast confirmed: a ka sign irrelevant hai; sirf a 2 (variance scale) matter karta hai — yeh exactly ek scaled chi-square hai, yaani N ( 0 , a 2 ) ko square karne ki law.
Cell B: flip then abs value
Cell E: check edges and limits
Recall Jaane se pehle self-test karo
Table cover karo. Har ek ke liye, cell ka naam aur woh ek cheez batao jo galat ho sakti hai.
Y = 3 X − 2 ::: Cell A (increasing); naya support bhoolna mat.
Y = 5 − X ::: Cell B (decreasing); absolute value rakho warna density negative ho jaayegi.
Y = X 2 , X symmetric ::: Cell C; dono roots sum karo warna density half ho jaayegi.
Y = max ( X , 0 ) ::: Cell D; positive-probability collapse ek atom create karta hai.
Y = − ln X ::: Cell E; range ( 0 , ∞ ) state karo aur check karo ki tail integrate hoti hai.
Y = ( a X ) 2 ::: Cell G; sirf a 2 bachta hai, a ka sign irrelevant hai.
Mnemonic Scenario checklist
"Roots, Range, Reciprocal, |Abs|, Atoms?" — saare roots list karo, range fix karo, reciprocal derivative d y d x use karo, absolute value lo, aur poochho ki koi branch atom par collapse toh nahi ho rahi.