4.9.10 · D3Probability Theory & Statistics

Worked examples — Joint distributions — joint PMF - PDF, marginal, conditional

2,325 words11 min readBack to topic

The scenario matrix

Every joint-distribution problem is one of these cases. The right column names the worked example that covers it.

Cell Case class What makes it tricky Covered by
C1 Discrete, finite table just sums, but must find marginals & test independence Example 1
C2 Discrete, truly independent joint factors exactly — the "null" case Example 2
C3 Continuous on a rectangle constant bounds, easiest continuous case Example 3
C4 Continuous on a triangle (support matters) bounds depend on the other variable Example 4
C5 Degenerate / zero input conditioning on — undefined Example 5
C6 Limiting behaviour what happens as we slide the conditioning value to an edge Example 6
C7 Real-world word problem translate English → joint PMF, then answer a question Example 7
C8 Exam twist: given conditional + marginal, rebuild the joint (chain rule) reverse direction, uses Bayes' Theorem flavour Example 8

We hit all eight cells below.


Example 1 — Discrete table (Cell C1)

Step 1 — check it's a valid PMF. Why this step? A table is only a distribution if all entries are and sum to ; otherwise everything downstream is meaningless.

Step 2 — marginal of (sum each row). Why this step? — " and anything" is the Law of Total Probability over the -values.

Step 3 — marginal of (sum each column).

Step 4 — the conditional. Why this step? Freeze : look only at that column , then divide by its total to re-normalize the slice (see Conditional Probability).

Step 5 — independence test. Why this step? Independence is a statement about the joint factoring, never about marginals alone. Test one cell. One matching cell is not enough — check another: Since one cell fails, are dependent.

Verify: rows sum to (total ); columns to (total ); conditional column sums to . ✔


Example 2 — The independent case (Cell C2)

Step 1 — build the joint by multiplying. Why this step? Independence of Random Variables means — the joint is literally the outer product of the marginals.

Step 2 — check the total.

Step 3 — the tell-tale of independence: conditional = marginal. Why this step? Under independence, knowing tells you nothing about , so the slice equals the marginal.

Verify: conditional equals the marginal exactly — the fingerprint of independence. ✔


Example 3 — Continuous, rectangular support (Cell C3)

Step 1 — find from total probability . Why this step? Every density must integrate to over its support; that pins the constant.

Step 2 — marginal of (integrate out , constant bounds to ). Why this step? ; the rectangle means always runs the full .

Step 3 — marginal of (by symmetry).

Step 4 — conditional. Why this step? Divide the joint by the marginal of the conditioning variable.

Step 5 — independent? So dependent — even on a clean square, an additive density does not factor.

Verify: ✔; for every ✔.


Example 4 — Continuous, triangular support (Cell C4)

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

Step 1 — read the bounds off the picture. Why this step? The region is : for a fixed , runs from up to ; for a fixed , runs from to . Constant bounds would give the wrong answer. Look at the amber slice in the figure.

Step 2 — confirm total .

Step 3 — marginal of (for fixed , from to ).

Step 4 — marginal of (for fixed , from to ).

Step 5 — conditional of given . Why this step? We want , so condition on . Divide joint by ; the support becomes .

Step 6 — the requested probability at .

Verify: ✔; the numeric answer is re-checked below.


Example 5 — Degenerate / zero conditioning (Cell C5)

Step 1 — evaluate the marginal at the conditioning value. Why this step? The conditional is only defined where .

Step 2 — declare it undefined. Both give a or " over -support" situation:

Verify: and the support requires , so has zero density — both conditionals are undefined. ✔ (No numeric answer; the "answer" is undefined.)


Example 6 — Limiting behaviour (Cell C6)

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

Step 1 — write the conditional of given . Why this step? Condition on this time: divide joint by , support .

Step 2 — limit . A wide, gently increasing slope over the full interval — the picture's cyan curve.

Step 3 — limit . Why this step? Look at the shape: on the shrinking interval the density is . Its peak at is , but its width is . The mass stays but concentrates into a spike at . So as the slice becomes an ever-taller, ever-narrower spike (a "point mass forming"), even though at itself the object is undefined (Example 5). The amber curves in the figure show this squeeze.

Verify: area under is for all ; limit at gives . ✔


Example 7 — Real-world word problem (Cell C7)

Step 1 — check validity & get . Why this step? We condition on , so we need the weight of that column. Total ✔.

Step 2 — conditional distribution of given . Why this step? Slice the column and re-normalize by .

Step 3 — answer the headline question. Compare baseline . Buying a pastry raises the chance of 2 coffees () — they go together.

Step 4 — conditional expectation (see Expectation and Variance). Why this step? Expected value under the conditional distribution weights each coffee-count by its conditional probability.

Verify: conditional probs ✔; and re-checked below.


Example 8 — Exam twist: rebuild the joint (Cell C8)

Step 1 — chain rule to get the joint. Why this step? — multiply the slice by the weight of the thing you conditioned on. A flat density of height on the triangle .

Step 2 — sanity: does it integrate to ?

Step 3 — marginal of (integrate out ; for fixed , runs ).

Step 4 — reverse conditional (Bayes direction). Why this step? Now we want given : divide the joint by . That's uniform on — the mirror of the forward "uniform on ".

Verify: joint integrates to ✔; ✔; ✔.


Recall Which cell was hardest — and why

Cell C5 (degenerate). It looks answerable because you can "plug in", but conditioning on a zero-density value is genuinely undefined — the algebra hides a . Never skip the "is ?" check.


Recall

Marginal of from a triangle joint on with
.
Why is undefined for ?
Conditioning divides by ; at a zero-density value this is , an indeterminate/undefined form.
Independence fingerprint in the discrete table
joint factors as in every cell, equivalently conditional = marginal.
Chain rule to rebuild a joint from a conditional and a marginal
.
As for on , what happens?
it becomes a taller, narrower spike near but always encloses area .

Connections