4.9.5 · D3 · Maths › Probability Theory & Statistics › Moment generating function (MGF) — definition, use
Yeh page MGF ki drill hall hai. Hum yahan theory dobara nahi padha rahe — balki har tarah ke problems jo exam mein aa sakte hain, unhe ek-ek karke solve kar rahe hain .
Kuch bhi compute karne se pehle, woh do machines yaad karo jo tumhare paas already hain:
Extraction: E [ X n ] = M X ( n ) ( 0 ) — n baar differentiate karo, phir dial t ko 0 par set karo.
Combination: agar X aur Y independent hain, toh M X + Y ( t ) = M X ( t ) M Y ( t ) .
Neeche sab kuch in do machines mein se kisi ek ka use hai, plus dhyan jahan MGF exist karna allowed hai (uski convergence interval) par.
Har MGF problem in case classes mein se kisi ek mein aati hai. Is page ka poora point yahi hai ki isko padhne ke baad tumne har row ko ek complete solution ke saath dekh liya ho.
Cell
Case class
Kya cheez tricky hai
Covered by
A
Discrete, finite support
bas e t x p ( x ) sum karo — build karne ke liye koi calculus nahi
Ex 1
B
Discrete, infinite support
yeh ek geometric series hai — convergence condition chahiye
Ex 2
C
Continuous, one-sided domain
integral sirf kuch t ke liye converge karta hai — exponent ka sign matter karta hai
Ex 3
D
Degenerate variable (X = c constant)
"no randomness" — kya MGF tab bhi kaam karta hai?
Ex 4
E
Shift & scale (a X + b ), sign of a
negative a convergence interval ko flip kar deta hai
Ex 5
F
Sum of independents
MGFs multiply karo, phir pehchano answer ko
Ex 6
G
Limiting behaviour (n → ∞ )
MGF → ek known MGF ⇒ distribution converge karti hai
Ex 7
H
Real-world word problem
words → distribution → MGF → number translate karo
Ex 8
I
Exam twist (given MGF, backwards kaam karo)
koi distribution naam nahi diya — MGF se hi padh lo
Ex 9
Intuition Matrix ko ek checklist ki tarah padho
Sign cell C mein aata hai (exponent sign convergence control karta hai) aur E mein (negative scale interval flip kar deta hai). Zero/degenerate input cell D hai. Limiting behaviour cell G hai. Agar tum saaton nine kar sakte ho, toh koi bhi MGF problem kar sakte ho.
Worked example Ek fair die
Maano X ek fair six-sided die ke ek roll ka result hai, toh X ∈ { 1 , 2 , 3 , 4 , 5 , 6 } har ek probability 6 1 ke saath. M X ( t ) nikalo aur use E [ X ] get karne ke liye use karo.
Forecast: aage padhne se pehle ek fair die ka mean guess karo. (Yeh 3.5 aana chahiye.)
Step 1 — Defining sum likho.
M X ( t ) = ∑ x = 1 6 e t x ⋅ 6 1 = 6 1 ( e t + e 2 t + e 3 t + e 4 t + e 5 t + e 6 t ) .
Yeh step kyun? Ek discrete variable ke liye MGF literally sum ∑ x e t x p ( x ) hoti hai — koi integral nahi, koi series trick nahi. Finite support matlab sum finite hai, isliye M X ( t ) sab t ke liye exist karta hai (kuch bhi blow up nahi ho sakta).
Step 2 — Dial zero par sanity-check karo.
M X ( 0 ) = 6 1 ( 1 + 1 + 1 + 1 + 1 + 1 ) = 1. ✓
Yeh step kyun? M X ( 0 ) = E [ 1 ] = 1 hamesha . Agar yeh 1 nahi hai, ruk jao — tumhare mein algebra bug hai.
Step 3 — Ek baar differentiate karo.
M X ′ ( t ) = 6 1 ( e t + 2 e 2 t + 3 e 3 t + 4 e 4 t + 5 e 5 t + 6 e 6 t ) .
Yeh step kyun? E [ X ] = M X ′ ( 0 ) — ek derivative exactly ek factor exponent se pull down karta hai (jo value x hai).
Step 4 — t = 0 set karo.
E [ X ] = M X ′ ( 0 ) = 6 1 ( 1 + 2 + 3 + 4 + 5 + 6 ) = 6 21 = 3.5.
Verify: Directly, E [ X ] = 6 1 ∑ x = 1 6 x = 3.5 . Match karta hai. ✓
Worked example Geometric on
{ 0 , 1 , 2 , … }
Maano X pehli success se pehle failures count karta hai, P ( X = k ) = ( 1 − p ) k p for k = 0 , 1 , 2 , … , with 0 < p < 1 . M X ( t ) , uski convergence interval, aur E [ X ] nikalo.
Forecast: infinitely many terms ke saath, humein sochna hoga jab sum converge karta hai. Guess: yeh tabhi kaam karna chahiye jab t itna chota ho ki e t , ( 1 − p ) ko overpower na kar sake.
Step 1 — Sum likho aur k -th power group karo.
M X ( t ) = ∑ k = 0 ∞ e t k ( 1 − p ) k p = p ∑ k = 0 ∞ [ ( 1 − p ) e t ] k .
Yeh step kyun? Sab kuch jo k tak raised hai usse collect karna sum ko ek geometric series ∑ r k mein badal deta hai jisme ratio r = ( 1 − p ) e t hai. Yahi ek tool hai jo closed form mein infinite discrete support ko sum karta hai.
Step 2 — Convergence demand karo.
Geometric series ∑ r k , 1 − r 1 tak converge karta hai sirf tabhi jab ∣ r ∣ < 1 :
( 1 − p ) e t < 1 ⟺ e t < 1 − p 1 ⟺ t < − ln ( 1 − p ) .
Yeh step kyun? Yahi cell B ka poora lesson hai: infinite support ⇒ MGF sirf ek interval par exist karta hai , yahan t < − ln ( 1 − p ) , jo 0 ke aas-paas ek open interval hai (achha — 0 iske andar hai kyunki − ln ( 1 − p ) > 0 ).
Step 3 — Sum karo.
M X ( t ) = 1 − ( 1 − p ) e t p .
Check karo M X ( 0 ) = 1 − ( 1 − p ) p = p p = 1. ✓
Step 4 — Mean ke liye differentiate karo.
u ( t ) = 1 − ( 1 − p ) e t ke saath, M X ( t ) = p u − 1 , toh
M X ′ ( t ) = − p u − 2 u ′ ( t ) = − p u − 2 ( − ( 1 − p ) e t ) = ( 1 − ( 1 − p ) e t ) 2 p ( 1 − p ) e t .
t = 0 set karo: u ( 0 ) = p , toh
E [ X ] = M X ′ ( 0 ) = p 2 p ( 1 − p ) = p 1 − p .
Verify: is "number of failures" geometric ka known mean p 1 − p hai. p = 2 1 ke liye yeh 1 deta hai, jo ek coin se match karta hai jahan average mein ek failure pehle head aane se pehle expect hoti hai. ✓
Worked example Exponential
( λ ) dobara, sign dekhte hue
f ( x ) = λ e − λ x for x ≥ 0 , λ > 0 . M X ( t ) rebuild karo aur dekho exactly konsa sign domain force karta hai.
Forecast: integrand e t x λ e − λ x = λ e ( t − λ ) x hai. Guess karo t − λ ka konsa sign [ 0 , ∞ ) par integral ko finite rehne deta hai.
Step 1 — Exponents combine karo.
M X ( t ) = ∫ 0 ∞ e t x λ e − λ x d x = λ ∫ 0 ∞ e ( t − λ ) x d x .
Yeh step kyun? Do ki jagah ek exponent convergence question ko ek single sign check bana deta hai.
Step 2 — Sign sab kuch decide karta hai.
Jab x → ∞ , e ( t − λ ) x → 0 sirf tabhi jab exponent negative ho: t − λ < 0 , yaani t < λ . Agar t ≥ λ toh integrand decay nahi karta aur integral ∞ hai — wahan koi MGF nahi.
Yeh step kyun? Yeh continuous MGFs ke liye sign-based "quadrant" analysis hai: ek one-sided support (x ≥ 0 ) matlab sirf + ∞ par exponent ka sign matter karta hai.
Step 3 — Achhi side par integrate karo (t < λ ).
λ [ t − λ e ( t − λ ) x ] 0 ∞ = λ ( 0 − t − λ 1 ) = λ − t λ .
Check karo M X ( 0 ) = λ λ = 1. ✓
Step 4 — Moments.
M X ′ ( t ) = ( λ − t ) 2 λ ⇒ E [ X ] = M X ′ ( 0 ) = λ 1 ;
M X ′′ ( t ) = ( λ − t ) 3 2 λ ⇒ E [ X 2 ] = M X ′′ ( 0 ) = λ 2 2 ;
Var = λ 2 2 − λ 2 1 = λ 2 1 .
Verify: λ = 2 ke saath: E [ X ] = 0.5 , Var = 0.25 , aur domain t < 2 . Sab known exponential moments se match karta hai. ✓
Upar wala red curve M X ( t ) = λ − t λ hai λ = 2 ke liye: notice karo yeh t = 0 ke aas-paas finite aur smooth hai lekin t → λ − = 2 jaate hi infinity ki taraf shoot karta hai (dashed black wall). Woh vertical wall convergence interval ka edge hai .
Worked example Ek constant bhi ek random variable hai
Maano X = c probability 1 ke saath (ek "sure thing"). M X ( t ) nikalo aur confirm karo ki machine ab bhi sahi moments deti hai.
Forecast: ek constant ka mean c , variance 0 hota hai. Kya MGF isko respect karega?
Step 1 — Expectation compute karo.
M X ( t ) = E [ e tX ] = e t c ( one value c , probability 1 ) .
Yeh step kyun? "Sum" mein exactly ek term hai, e t c ⋅ 1 . Degenerate = sabse simple possible support.
Step 2 — Domain.
e t c , sab t ke liye finite hai — ek degenerate variable ka MGF hamesha har jagah exist karta hai. M X ( 0 ) = e 0 = 1. ✓
Step 3 — Moments.
M X ′ ( t ) = c e t c ⇒ E [ X ] = M X ′ ( 0 ) = c .
M X ′′ ( t ) = c 2 e t c ⇒ E [ X 2 ] = M X ′′ ( 0 ) = c 2 .
Var = c 2 − c 2 = 0.
Verify: mean c , variance 0 — exactly yahi "no randomness" deni chahiye. Bonus: yeh shift rule M Y ( t ) = e b t M X ( a t ) se match karta hai a = 0 , b = c ke saath: scale ko zero set karna hi degenerate case hai, aur e c t M X ( 0 ) = e c t . ✓
Worked example Negative scaling interval flip kar deta hai
X ∼ Exponential ( λ = 2 ) ka M X ( t ) = 2 − t 2 hai jo t < 2 ke liye valid hai. Maano Y = − X (ek reflection). M Y ( t ) aur uski domain nikalo.
Forecast: − X , X ka negative axis par mirror hai. Guess karo kya domain t < 2 rehti hai ya t > − 2 ho jaati hai.
Step 1 — Shift-and-scale rule a = − 1 , b = 0 ke saath apply karo.
M Y ( t ) = M a X + b ( t ) = e b t M X ( a t ) = M X ( − t ) = 2 − ( − t ) 2 = 2 + t 2 .
Yeh step kyun? Property 1, "X ko a se scale karna" ko "M X ko a t par evaluate karna" mein badal deta hai — koi re-integration ki zaroorat nahi.
Step 2 — Domain bhi transform karo (sign trap).
Original ko uska argument < 2 chahiye tha. Argument ab − t hai, isliye humein chahiye − t < 2 ⟺ t > − 2 .
Yeh step kyun? Convergence interval M X ke argument ke baare mein ek statement hai, isliye jab argument ka sign flip hota hai, interval flip ho jaati hai: t < 2 ban jaata hai t > − 2 . Yeh bhoolna classic sign error hai.
Step 3 — Moments padho.
M Y ′ ( t ) = − ( 2 + t ) 2 2 ⇒ E [ Y ] = M Y ′ ( 0 ) = − 2 1 = − E [ X ] . ✓
Verify: E [ Y ] = − 2 1 (sahi, kyunki Y = − X aur E [ X ] = 2 1 ), aur domain t > − 2 hai — t < 2 ka 0 ke baare mein mirror image. ✓
Worked example Do independent Poissons ka sum
Maano X ∼ Poisson ( λ 1 ) aur Y ∼ Poisson ( λ 2 ) independent hain. Given ki Poisson( λ ) ka MGF M ( t ) = e λ ( e t − 1 ) hai, S = X + Y ki distribution nikalo.
Forecast: compute karne se pehle S ki distribution guess karo. (Poissons famous roop se "add" hote hain.)
Step 1 — MGFs multiply karo.
M S ( t ) = M X ( t ) M Y ( t ) = e λ 1 ( e t − 1 ) e λ 2 ( e t − 1 ) .
Yeh step kyun? Property 2: independence ek sum ki MGF ko MGFs ke product mein badal deta hai. Yahi reason hai ki MGFs sum-problems ko trivial bana deti hain.
Step 2 — Exponents combine karo.
M S ( t ) = e ( λ 1 + λ 2 ) ( e t − 1 ) .
Yeh step kyun? Do e ( ⋯ ) factors ke exponents add karna unhe ek clean form mein collapse kar deta hai.
Step 3 — Pehchano (uniqueness).
Yeh exactly Poisson MGF template e λ ( e t − 1 ) hai jisme λ = λ 1 + λ 2 hai. Uniqueness se, S ∼ Poisson ( λ 1 + λ 2 ) .
Yeh step kyun? Agar ek MGF ek known form se match kare, toh distribution identify ho jaati hai — koi pmf gymnastics ki zaroorat nahi.
Verify: means add hote hain: E [ S ] = M S ′ ( 0 ) . M S ′ ( t ) = e t ( λ 1 + λ 2 ) e ( λ 1 + λ 2 ) ( e t − 1 ) ke saath, hume milta hai M S ′ ( 0 ) = λ 1 + λ 2 = E [ X ] + E [ Y ] . Identified Poisson ke saath consistent hai. ✓ (Numeric: λ 1 = 3 , λ 2 = 4 ⇒ Poisson( 7 ) , mean 7 .)
Worked example Binomial → Poisson, MGFs ke zariye dekha
μ > 0 fix karo. Maano X n ∼ Binomial ( n , p = n μ ) , toh hum n tiny-probability trials karte hain. Dikhao ki M X n ( t ) → e μ ( e t − 1 ) jab n → ∞ , yaani X n converge karta hai Poisson( μ ) ki taraf.
Forecast: bahut saare rare trials → ek Poisson. Guess karo limiting MGF Poisson wala hai.
Step 1 — p = μ / n ke saath binomial MGF likho.
M X n ( t ) = ( 1 − p + p e t ) n = ( 1 + n μ ( e t − 1 ) ) n .
Yeh step kyun? p = μ / n substitute karna sab kuch n ke upar group karta hai, pattern ( 1 + n a ) n expose karta hai.
Step 2 — ( 1 + n a ) n → e a use karke limit lo.
a = μ ( e t − 1 ) ke saath,
lim n → ∞ M X n ( t ) = e μ ( e t − 1 ) .
Yeh step kyun? Yeh e a ki definition hai limit ke roop mein — woh ek tool jo "1 ke paas kuch cheez ki n -th power" ko ek exponential mein convert karta hai.
Step 3 — Continuity theorem se conclude karo.
Limit Poisson( μ ) MGF hai, isliye X n → d Poisson ( μ ) .
Yeh step kyun? MGFs ka convergence (0 ke ek neighbourhood mein) distributions ka convergence imply karta hai — wahi engine jo Central Limit Theorem prove karne ke liye use hota hai.
Verify: t = 0 par dono sides 1 ke barabar hain; aur d t d 0 e μ ( e t − 1 ) = μ , jo har n ke liye E [ X n ] = n p = μ se match karta hai. Mean limit ke through preserve hota hai. ✓
Worked example Bus ka wait, phir din bhar ka total
Ek bus ka waiting time (minutes mein) Exponential ( λ = 4 1 ) hai, toh E [ wait ] = 4 min. Tum ek din mein teen independent buses pakdte ho, W 1 , W 2 , W 3 . Total wait T = W 1 + W 2 + W 3 ka MGF kya hai, aur uska expected value?
Forecast: teen independent waits of 4 min each — compute karne se pehle total ka mean guess karo.
Step 1 — Ek wait ka MGF.
Ex 3 se, M W ( t ) = λ − t λ = 1/4 − t 1/4 , t < 4 1 ke liye valid.
Yeh step kyun? Words "waiting time is exponential" ko exponential MGF mein translate karo.
Step 2 — Independent sum ke liye multiply karo.
M T ( t ) = ( M W ( t ) ) 3 = ( 1/4 − t 1/4 ) 3 , t < 4 1 .
Yeh step kyun? Property 2 phir se — teen independent buses ⇒ teen MGFs ka product. (Yeh Gamma( 3 , 4 1 ) ka MGF hai, agar tum pehchano toh.)
Step 3 — Expected total.
Means add hote hain: E [ T ] = 3 ⋅ λ 1 = 3 ⋅ 4 = 12 min. (Ya M T ko ek baar 0 par differentiate karo — same answer.)
Verify (units + magnitude): har wait average 4 min ka hai; unke teen ka average 12 min. Units throughout minutes hain. ✓
Worked example "Mujhe identify karo"
Ek random variable ka MGF M X ( t ) = exp ( 3 t + 8 t 2 ) hai sab real t ke liye. Distribution ka naam batao aur mean aur variance state karo — yeh bataye bina ki yeh kya hai.
Forecast: exponent mein t 2 ki shape ek fingerprint hai. Kaun si distribution ke paas hai yeh?
Step 1 — Normal template se match karo.
Normal MGF M ( t ) = exp ( μ t + 2 1 σ 2 t 2 ) hai. Compare karo:
μ t + 2 1 σ 2 t 2 = 3 t + 8 t 2 .
Yeh step kyun? Uniqueness kehta hai: agar MGF kisi known family se match kare, toh distribution wahi family hai. Toh hum bas parameters padh lete hain.
Step 2 — Parameters ke liye solve karo.
t ka coefficient: μ = 3 . t 2 ka coefficient: 2 1 σ 2 = 8 ⇒ σ 2 = 16 .
Yeh step kyun? Do coefficients, do unknowns — power series matching (dekho Taylor Series ) unhe uniquely pin down karta hai.
Step 3 — Conclude karo.
X ∼ N ( μ = 3 , σ 2 = 16 ) , toh mean 3 , variance 16 , standard deviation 4 .
Verify (directly differentiate karo):
M X ′ ( t ) = ( 3 + 16 t ) e 3 t + 8 t 2 ⇒ M X ′ ( 0 ) = 3 = E [ X ] .
M X ′′ ( 0 ) = E [ X 2 ] ; compute karne par E [ X 2 ] = 25 milta hai, toh Var = 25 − 3 2 = 16 . Match karta hai. ✓
Recall Matrix ka one-line recap
Discrete finite (sum) ::: Ex 1 — bas ∑ e t x p ( x ) , sab t ke liye valid.
Discrete infinite (geometric) ::: Ex 2 — series sirf tab converge karta hai jab ∣ r ∣ < 1 .
Continuous one-sided (sign) ::: Ex 3 — exponent + ∞ par negative hona chahiye.
Degenerate constant ::: Ex 4 — M X ( t ) = e t c , variance 0 .
Negative scale ::: Ex 5 — M − X ( t ) = M X ( − t ) , interval sign flip karta hai.
Sum of independents ::: Ex 6 — multiply karo, phir pehchano (Poissons add hote hain).
Limit ::: Ex 7 — Binomial( n , μ / n ) → Poisson( μ ) via ( 1 + n a ) n → e a .
Word problem ::: Ex 8 — teen exp waits, total mean 12 .
Reverse-engineer ::: Ex 9 — exp ( 3 t + 8 t 2 ) ⇒ N ( 3 , 16 ) .
Mnemonic Poori page ek saanson mein
Discrete? sum karo. Continuous? exponent ka sign dekho. Sum of independents? multiply karo. Limit? n → ∞ push karo. MGF given hai? template se match karo. Aur hamesha pehle M X ( 0 ) = 1 check karo.
Related tools worth a click: Cumulant Generating Function (in MGFs ka ln lo), Characteristic Function (cell C ke failures ka hamesha-exist-karne-wala cousin), aur Probability Distributions un families ke liye jo humne pehchani.