4.9.13 · D2 · HinglishProbability Theory & Statistics

Visual walkthroughConditional expectation

2,125 words10 min read↑ Read in English

4.9.13 · D2 · Maths › Probability Theory & Statistics › Conditional expectation

Pehli line se pehle hum aapko har symbol ka hisaab denge. Chalo earn karte hain.


Step 1 — Random variable kya hota hai, picture mein?

KYA. Ek random variable ek rule hai jo experiment ke har possible outcome ko ek number assign karta hai. Die roll karo: outcome ek face hai, number ho sakta hai "dikhne wale dots". Ek doosra variable usi outcome ko ek aur number assign karta hai.

KYUN. Neeche ki saari cheezein pairs par rehti hain — ek experiment ke do measurements. ke baare mein baat karne ke liye pehle hum chahte hain ek aisi picture jahan dono saath rehte hain.

PICTURE. Grid dekho. Har choti cell ek possible pair of values hai: ki ek value (kaun si row) aur ki ek value (kaun sa column). Cell ke andar amber number hai — woh chance ki yeh exact pair ho. Yeh ek object, joint distribution, hamaari poori duniya hai.

Figure — Conditional expectation

Us cell weight ka symbol tour:

  • ::: "pehla measurement value par aaya" — ek row chunna.
  • ::: "doosra measurement par aaya" — ek column chunna.
  • comma ::: matlab aur — dono ek saath hote hain — toh hum ek cell ki taraf point karte hain.

Poore object ke liye Joint and marginal distributions dekho; hum sirf grid chahiye.


Step 2 — Plain expectation : ek bada weighted average

KYA. aapka ek best guess hai ke liye jab aapko kuch pata nahi. Yeh saari -values ka average hai, har ek ko uski likelihood se weight karke.

Term by term:

  • ::: ek value jo le sakta hai (ek row label).
  • ::: us row ka total chance — amber weights ko us puri row mein add karo.
  • ::: har row ke upar yeh add karo.
  • product ::: "value times its weight" — ek tall bar ka contribution.

KYUN. Yeh woh number hai jo Tower Rule end mein hume dega. Hum clearly jaanna chahte hain yeh kya hai taaki jab yeh aaye toh hum pehchaan sakein.

PICTURE. Har column ko uske row-total mein collapse karo: ek row mein amber cells ek white bar mein merge ho jaate hain right margin par. Har bar ko uski row-value se multiply karo, add karo — woh ek blended value hai , dashed cyan line ki tarah drawn.

Figure — Conditional expectation

Step 3 — Ek column freeze karo: ek number hai

KYA. Ab koi ki value whisper karta hai. Maan lo . Hum ab poori grid nahi dekh rahe — sirf ek column dekh rahe hain. Us column ke andar hum ko re-average karte hain.

Term by term:

  • ::: pore column ka total weight — uske amber cells ko upar se neeche add karo.
  • se divide karna ::: column ko rescale karta hai taaki uske weights phir se mein add hon (ab yeh apne aap mein ek valid distribution hai).
  • ::: cell ki hissa apne column ke andar — uska amber weight column total ke fraction ke roop mein.
  • ::: un rescaled column weights se row-values ka average nikalo.

KYUN. Conditioning = ek column mein zoom karo aur baaki bhool jao. se rescale karna poora trick hai: iske bina column ke weights mein sum nahi hote aur yeh probability distribution nahi hoti. (Yeh bilkul Conditional probability ki definition hai.)

PICTURE. Ek column lit hai; baaki dim ho jaate hain. Us mein amber cells column fill karne ke liye stretch karti hain (yeh rescale hai). Cyan dot balance point mark karta hai — column ka apna average, .

Figure — Conditional expectation

Step 4 — unfreeze karo: ab ek random variable hai

KYA. Step 3 ko har column ke liye karo. Har column apna average deta hai. Collect karo: function ek column label leta hai aur us column ka mean return karta hai. Ise random column mein feed karo aur aapko ek random variable milta hai .

KYUN. Jab tak pata nahi tha, hume nahi pata tha hum kis column mein land karenge — isliye nahi pata tha kaun si column-average hum report karenge. Ek quantity jiska value ek random outcome par depend kare woh random variable hai. Yeh sabse mushkil idea hai; picture ise nail karti hai.

PICTURE. Har column mein ek cyan balance-dot baitha hai. Saath mein woh grid ke across ek step-profile trace karte hain — ek column per ek height. Woh poora profile hi hai: ek random column chuno aur aap ek random height read karte ho.

Figure — Conditional expectation

Step 5 — Column-averages ka average lo, column size se weighted karke

KYA. khud ek random variable hai, isliye uski apni expectation hai. Lo:

Term by term:

  • ::: column ke cyan dot ki height (Step 3 se).
  • ::: us column ki width/weight (uska total amber mass).
  • ::: standard "expectation of a function of " recipe — Expectation and its linearity dekho.

KYUN. Hum Step 4 ke step-profile ko average kar rahe hain. Importantly har column-average ko us column ke kitna likely hone se weight kiya ja raha hai, — ek mota column apne dot ki taraf blend kheenchta hai. Dots ka plain unweighted average galat hoga jab tak saare columns equally likely na hon.

PICTURE. Cyan dots (heights) saath aate hain, har ek ko us column ke amber mass ke barabar push milti hai. Result ek dashed line hai — averages ka average.

Figure — Conditional expectation

Step 6 — Collapse: two-step average = one-step average

KYA. Ab Step 5 ko cells tak expand karo aur dekho yeh ban jaata hai.

= \sum_y\sum_x x\,P(X=x,Y=y)$$ $P(Y=y)$ jisse hum Step 3 mein *divide karte the* bilkul wahi $P(Y=y)$ hai jisse hum Step 5 mein *multiply karte hain* — woh **cancel** ho jaate hain, column ko raw amber weights mein un-rescale kar dete hain. $$=\sum_x x\underbrace{\sum_y P(X=x,Y=y)}_{P(X=x)}=\sum_x x\,P(X=x)=E[X].$$ Collapse ke term by term: - $\tfrac{P(X=x,Y=y)}{P(Y=y)}\cdot P(Y=y)=P(X=x,Y=y)$ ::: rescale phir un-rescale — column phir raw amber hai. - $\sum_y P(X=x,Y=y)=P(X=x)$ ::: ek row mein saare columns mein sweep karo — **marginalising**, bilkul Step 2 wali move. - $\sum_x x\,P(X=x)=E[X]$ ::: aur yeh bilkul Step 2 hai. **KYUN.** Column-averaging phir column-weighting **har original cell ko untouched re-assemble karta hai**, phir unhe row-wise sum karta hai. Grid ko columns mein split karna aur recombine karna weight create ya destroy nahi kar sakta — isliye grand average unchanged rehta hai. **PICTURE.** Dim columns full amber re-light karte hain (cancellation), phir saare columns sideways sweep ho jaate hain Step 2 ke row-margin bars mein. Dashed cyan line *wahi* height par land karti hai jahan $E[X]$ hai. ![[deepdives/dd-maths-4.9.13-d2-s06.png]] > [!formula] The Tower Rule, ab earn ki gayi > $$\boxed{\,E\big[E[X\mid Y]\big]=E[X]\,}$$ > Har column ke andar average karo, phir columns ko unke size se weighted average karo — poori grid ka average wapas milta hai. --- ## Step 7 — Degenerate cases (kabhi andheron mein mat rehna) **KYA.** Woh boundaries check karo jahan picture todhne ki dhamki deta hai. **Empty column, $P(Y=y)=0$.** Step 3 column mass se divide karta hai. Agar ek column sach mein empty hai, toh $E[X\mid Y=y]$ **undefined** hai — lekin yeh Step 5 mein enter hi nahi karta, kyunki uska weight $P(Y=y)=0$ us term ko zero kar deta hai. Grid mein aisa koi column simply hota hi nahi. **Sirf ek column ($Y$ constant).** Tab across average karne ke liye kuch nahi: $E[X\mid Y]=E[X]$ already, aur tower trivial statement hai $E[X]=E[X]$. **$X$ aur $Y$ independent.** Har column ki **same** step-height hai, kyunki column jaanna $X$ ke baare mein kuch nahi batata: $E[X\mid Y]=E[X]$, ek flat profile. Cells ke saath independence kya karta hai uske liye [[Conditional probability]] dekho (har cell factorise hoti hai $P(X=x)P(Y=y)$). **PICTURE.** Left panel: ek flat cyan profile — independence, saare columns agree karte hain. Right panel: ek single fat column — $Y$ constant. Dono mein two-step average trivially one-step average ke barabar hai. ![[deepdives/dd-maths-4.9.13-d2-s07.png]] > [!formula] Independence collapse (special case, visible) > Agar $X\perp Y$: $E[X\mid Y]=E[X]$ — flat profile. Tower phir bhi hold karta hai, ab keh raha hai $E[\,\text{constant}\,]=\text{constant}$. --- ## Ek-picture summary Sab kuch ek frame mein: **column-average, phir weight-and-recombine, $E[X]$ par wapas land.** ![[deepdives/dd-maths-4.9.13-d2-s08.png]] > [!recall]- Feynman retelling — poora walkthrough plain words mein > Ek classroom seating chart ko ek grid ki tarah socho. Har seat ek tiny weight rakhti hai = kitna likely hai woh exact (score $X$, class $Y$) pair (Step 1). Kisi random bachche ke score ka best guess, class ignore karke, poore chart ka average hai, $E[X]$ (Step 2). > Ab koi class batata hai. Aap us ek **column** mein zoom karte ho, use blow up karte ho taaki uske weights ek mein add hon, aur uska average padhte ho — ek number (Step 3). Yeh har class ke liye karo aur aapko dots ki ek row milti hai, ek per column: woh row of dots hi $E[X\mid Y]$ hai, aur kyunki aapko pehle se nahi pata bachcha kis class mein hai, yeh khud random hai (Step 4). > Un class-averages ko blend karo, har class ko uske size ke barabar push dete hue (Step 5). Step 3 mein aapne jo blow-up kiya tha aur Step 5 mein size-weight exact opposites hain — woh cancel ho jaate hain, har column ko uski raw seats mein un-shrink kar dete hain, aur saari seats ko saath sweep karne se phir se whole-chart average milta hai (Step 6). Toh classes ke andar average karna phir classes ke across average karna usi number par land karta hai jaise har bachche ko ek saath average karna. Empty classes kabhi matter nahi karti (zero weight), ek class trivial hai, aur agar class irrelevant hai toh har column-average identical hai (Step 7). Yeh hai Tower Rule — split, average, recombine, kuch lost nahi. --- ## Connections - [[Conditional expectation]] (parent) - [[Joint and marginal distributions]] — grid aur uske margins - [[Conditional probability]] — Step 3 mein column rescale - [[Law of total probability]] — probabilities ke liye sibling identity - [[Expectation and its linearity]] — Steps 2 & 5 mein weighted-average recipe - [[Conditional variance and Eve's law]] — condition karne par *spread* ka kya hota hai - [[Wald's identity]] — random sums par tower apply - [[Martingales]] — jahan $E[X\mid\mathcal F]$ ise generalise karta hai