4.9.10Probability Theory & Statistics

Joint distributions — joint PMF - PDF, marginal, conditional

1,810 words8 min readdifficulty · medium

1. WHAT is a joint distribution?

WHY a density and not a probability? In the continuous case P(X=x,Y=y)=0P(X=x,Y=y)=0 for any single point (a point has zero area). So we describe probability per unit area; you only get real probability by integrating over a region AA.

Figure — Joint distributions — joint PMF - PDF, marginal, conditional

2. Marginals — squashing a variable out

The name "marginal" comes from writing the joint PMF as a table and recording row/column sums in the margins.


3. Conditional — freeze and re-normalize


4. Worked examples


5. Common mistakes (steel-manned)


Recall Feynman: explain to a 12-year-old

Imagine a big grid of buckets. Each bucket holds some marbles for a pair (height, weight). The joint is how many marbles are in every bucket. If you push all the marbles in each row together and write the totals on the side, that side-total is the marginal for height. Now suppose I tell you "the weight is exactly 50 kg" — you throw away every bucket except that one column. But those leftover marbles must still add up to a full bag, so you scale them up. That re-scaled column is the conditional.


Flashcards

What two conditions define a valid joint PMF?
pX,Y(x,y)0p_{X,Y}(x,y)\ge0 for all x,yx,y, and xypX,Y(x,y)=1\sum_x\sum_y p_{X,Y}(x,y)=1.
How do you get the marginal PMF pXp_X from the joint?
Sum out the other variable: pX(x)=ypX,Y(x,y)p_X(x)=\sum_y p_{X,Y}(x,y).
How do you get a marginal PDF fXf_X from a joint PDF?
Integrate out the other variable: fX(x)=fX,Y(x,y)dyf_X(x)=\int_{-\infty}^{\infty} f_{X,Y}(x,y)\,dy.
Define the conditional PDF fXY(xy)f_{X\mid Y}(x\mid y).
fXY(xy)=fX,Y(x,y)/fY(y)f_{X\mid Y}(x\mid y)=f_{X,Y}(x,y)/f_Y(y) for fY(y)>0f_Y(y)>0.
Why must we divide by the marginal to get a conditional?
The raw slice integrates/sums to the marginal, not 1; dividing re-normalizes it into a valid distribution.
State the condition for X,YX,Y to be independent.
fX,Y(x,y)=fX(x)fY(y)f_{X,Y}(x,y)=f_X(x)f_Y(y) for all x,yx,y (equivalently fXY=fXf_{X\mid Y}=f_X).
Why is P(X=x,Y=y)=0P(X=x,Y=y)=0 for continuous variables?
A single point has zero area; only regions of positive area carry probability under a density.
State the chain rule for joint PDFs.
fX,Y(x,y)=fXY(xy)fY(y)=fYX(yx)fX(x)f_{X,Y}(x,y)=f_{X\mid Y}(x\mid y)f_Y(y)=f_{Y\mid X}(y\mid x)f_X(x).
For fX,Y=3xf_{X,Y}=3x on 0<y<x<10<y<x<1, what is fX(x)f_X(x)?
fX(x)=0x3xdy=3x2f_X(x)=\int_0^x 3x\,dy=3x^2, 0<x<10<x<1.
Equal marginals — does that imply independence?
No; independence is about the joint factoring, which marginals alone cannot determine.

Connections

  • Conditional ProbabilityP(AB)=P(AB)/P(B)P(A\mid B)=P(A\cap B)/P(B) is the parent rule conditionals come from.
  • Independence of Random Variables — defined via factorization of the joint.
  • Law of Total Probability — marginalization is its random-variable form.
  • Bayes' Theorem — built from fX,Y=fXYfY=fYXfXf_{X,Y}=f_{X\mid Y}f_Y=f_{Y\mid X}f_X.
  • Covariance and Correlation — measure how jointly distributed variables co-vary.
  • Expectation and Variance — computed from marginals/conditionals.
  • Bivariate Normal Distribution — a key continuous joint example.

Concept Map

discrete case

continuous case

sum out y

sum out x

integrate out

justifies

justifies

integrate over A

A given B

freeze one var

divide by

ensures sums to 1

Joint Distribution

Joint PMF discrete

Joint PDF continuous

Marginal of X

Marginal of Y

Law of Total Probability

Conditional Probability Def

Conditional PMF-PDF

Re-normalize slice

Probability over region A

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Socho tumhare paas do random cheezein hain ek saath — jaise kisi insaan ki height XX aur weight YY. Joint distribution ka matlab hai ek hi object jo dono ki saari probability information rakhta hai. Discrete case mein ye ek table hota hai (joint PMF), continuous case mein ek surface (joint PDF). Yaad rakho: continuous mein ek single point ki probability zero hoti hai, isliye hum "density" use karte hain aur region pe integrate karke hi actual probability nikaalte hain.

Marginal ka funda simple hai: agar tumhe sirf XX chahiye aur YY se matlab nahi, to YY ke saare values pe sum (ya integrate) kar do. Galti yahin hoti hai — log socte hain "marginal matlab YY ko hata do", lekin actually YY ko collapse/average karna hota hai, drop nahi. Table mein row totals nikaalo to wahi XX ka marginal ban jaata hai (isiliye naam "margin" pada).

Conditional mein hum ek value freeze karte hain, jaise "Y=0.3Y=0.3 given hai". Tab joint ka sirf wahi slice dekho. Par dikkat ye hai ki slice ka total 1 nahi hota — wo fY(y)f_Y(y) ke barabar hota hai. Isliye us slice ko fY(y)f_Y(y) se divide karke wapas normalize karte hain, taaki ek proper distribution ban jaaye. Short formula: Conditional = Joint ÷ Marginal.

Ye sab important kyun hai? Kyunki real data mein variables aksar ek doosre pe depend karte hain. Agar fX,Y=fXfYf_{X,Y}=f_X\cdot f_Y ho gaya to independent hain, warna dependent. Yahi concept aage Bayes theorem, covariance, aur regression sab ki base hai — to ise solid karo!

Go deeper — visual, from zero

Test yourself — Probability Theory & Statistics

Connections