1.3.13 · HinglishProbability & Statistics

Joint, marginal, and conditional distributions

1,404 words6 min readRead in English

1.3.13 · AI-ML › Probability & Statistics


WHY — humein teeno ki zaroorat kyun hai?

  • WHAT hamare paas hai: do RVs, maano = "kya email spam hai?" aur = "kya usme word free hai?"
  • WHY hum care karte hain: ek joint complete description hai — aap isse aur ke baare mein koi bhi sawaal ka jawab nikal sakte ho. Lekin aksar hum sirf story ka ek hissa chahte hain:
    • "Email kitni baar spam hoti hai, words ko ignore karke?" → marginal
    • "Agar word free aaya, toh spam kitna likely hai?" → conditional
  • HOW yeh connect hote hain: marginal = ek dimension collapse karo; conditional = ek slice lo aur rescale karo.

Definitions from first principles

Conditional derive karna (memorize mat karo — build karo)

Joint ko factor karne ke do tareekon se humein turant Bayes' theorem milta hai:

Figure — Joint, marginal, and conditional distributions

Worked Example 1 — ek 2×2 joint table (discrete)

Maano = spam? (), = "free" word hai? (). Joint pmf:

Row sum =
(ham) 0.60 0.10 0.70
(spam) 0.05 0.25 0.30
Col sum = 0.65 0.35 1.00

Marginals (edge sums — isliye hi inhe margins mein likha jaata hai):

  • . Yeh step kyun? Dono values par sum karne se word info erase ho jaati hai.
  • .

Conditional : Yeh step kyun? Hum "free"-column (total 0.35) tak restrict karte hain aur poochte hain ki kitna fraction spam hai.

Independent? Check karo . Equal nahi ⇒ dependent. Sahi — word free spam probability ko 0.30 se 0.714 tak badhata hai.


Worked Example 2 — continuous joint

Maano unit square par.

Step 1 — valid hai? Kyun? Ek pdf ko 1 tak integrate karna chahiye.

Step 2 — marginal of : ko integrate out karo.

Step 3 — conditional of given : Yeh interesting kyun hai? Yeh par depend nahi karta aur yahan independent hain. Aur waqai . ✔


Common mistakes (Steel-manned)


Recall Feynman: ek 12-saal ke bachche ko samjhao

Socho ek bada grid of boxes hai jo bachche count karta hai (favorite fruit) aur (favorite sport) ke hisaab se. Joint har chote box mein count hai. Agar aap har row ke saare boxes ek pile mein dhakel do, toh aapko pata chalta hai kitne logo ko kaun sa fruit pasand hai, sport se regardless — woh hai marginal. Agar aap sirf football khelne wale bachche dekhein aur poochein "inme se kitno ko apples pasand hain?", toh pehle woh column uthao phir usse fractions mein baanto jo ek tak jodein — woh hai conditional. Marginal = ek direction squeeze karo; conditional = ek strip chuno aur usse 100% mein baanto.


Active recall

Joint se marginal kaise nikalte hain?
Joint ko doosre variable ki saari values par sum (ya integrate) karo: .
Conditional pmf define karo.
jab — joint slice re-normalized.
Conditioning karte waqt marginal se divide kyun karna padta hai?
Kyunki par joint slice tak sum hoti hai, 1 tak nahi; divide karne se woh valid distribution ban jaati hai.
Joint ke liye product/chain rule batao.
.
aur independent kab hote hain (distributions ke terms mein)?
Jab sabhi ke liye, equivalently .
Joint ki do factorizations se Bayes' theorem derive karo.
equate karo ⇒ .
Spam table di gayi hai, compute karo.
.
True/False: uncorrelated hona independent hona imply karta hai.
False — independence uncorrelated imply karta hai, lekin ulta nahi.

Connections

  • Bayes' theorem — joint ki do factorizations ka direct consequence.
  • Independence and conditional independence — factorization condition.
  • Covariance and correlation — full distribution ki jagah joint ke weaker summaries.
  • Naive Bayes classifier — label given features ki conditional independence assume karta hai.
  • Marginalization and the law of total probability.
  • Probabilistic graphical models — encode karta hai ki kaun se conditionals joint ko factor karte hain.
  • Expectation and variance — inhi distributions ke against compute hote hain.

Concept Map

sum out a variable

slice at X=x

divide by p X

denominator

rearrange

equals joint

two factorings

factorizes then

implies

Joint distribution p X,Y

Marginal p X

Conditional p Y given X

Re-normalize by p X

Chain rule / product rule

Bayes theorem

Independence

Probabilistic ML models