discrete-joint-distributions
The whole idea in one line The marginals of and are two shadows of one object, and the joint table is the object. Everything here is that table plus three moves: sum a row to get a marginal, rescale a row to get a conditional, and compare each cell against its row times its column to test independence. The one-time pad's perfect secrecy is the last move in action: the message-ciphertext table factors.
Two marginals do not fix the joint
Suppose and are each , and that is everything you know. What is ?
The natural first answer is 1/4:
The chain rule step is fine. The trap is the marked step, which replaced with . That replacement needs independence, and independence was never given. A counterexample: flip one fair coin, let for heads and for tails. Both marginals are , yet .
So the honest answer is "cannot be determined." Keep both marginals pinned at and change only the relationship: the joint value is 0 when (one coin, opposite faces), 1/4 when independent (two separate coins), and 1/2 when (one coin, same face). Same marginals, three different joints. Why this must happen, and the one-sample-space picture underneath it, is its own note: joint-distribution-mental-model.
The joint PMF as a 2D table
A joint probability mass function (PMF) can be visualized as a table: rows for 's values, columns for 's, each cell holding . The comma means "and", so every cell is an intersection event. There is no joint notation for "or": a union goes through inclusion-exclusion, , and even that needs a joint term.
What makes the table work: one outcome produces exactly one pair , so it lands in exactly one cell. The cells are mutually exclusive and exhaustive, they partition the sample space, and they sum to 1. Each move below rests on this.
Marginal PMF: sum a row
The event is the union of the disjoint cells " with anything", so summing them is just the rule for a disjoint union. This move runs one way only. Joint to marginals is easy summing, marginals back to joint is impossible without relationship information. That is the opening question again.
Conditional PMF: rescale a row
Sample a random adult male: if he currently smokes, if he develops lung cancer.
| 5/100 | 20/100 | |
| 3/100 | 72/100 |
Learning keeps only the top row, whose total mass is 25/100. Divide each cell by that total and the row becomes a valid PMF:
A Venn diagram is the wrong tool for this. A circle in a Venn diagram stands for one whole event, but the conditional PMF needs the event split across every value of , cell by cell. Those pieces have no home in a two-circle picture. The table shows exactly them.
Redraw the Venn intuition as a grid A random variable is not one circle. Each is its own region, those regions are disjoint and tile all of , and a second variable tiles the same space crosswise with . Two r.v.s together give a grid of intersection cells, which is exactly the joint table. Update the Venn picture to this grid view. (Raised during sitting 2, 2026-07-19. Tracked in tasks/redraw-venn-as-grid.)
The comparison that matters is conditional against marginal. Before learning anything, . After learning , it jumps to . Learning moved 's distribution, so the pair is dependent. (The event-level version is in conditional-probability.)
Conditioning does not always shrink a probability With on one coin, , larger than the marginal . Learning can push a probability of up, down, or not at all.
Independence: every cell factors
Three equivalent faces:
- CDF face: the joint cumulative distribution function factors, for all .
- PMF face: every cell equals its row margin times its column margin, . This is the one case where the marginals do fix the joint.
- Conditional face: whenever . Every row renormalizes to the same marginal, so conditioning changes nothing.
The two directions cost differently: one non-factoring cell is enough to disprove independence, but proving it requires every one of the cells to factor.
Bayes' rule and the Law of Total Probability (LOTP) hold on PMFs unchanged, with events replaced by "variable value":
Chicken and egg: a split Poisson is two independent Poissons
A chicken lays eggs. Each egg hatches on its own with probability and fails with . Let count the hatched eggs and the failed ones, so . The natural guess is that and are dependent, since : learn and you seem to know something about . The joint PMF says otherwise.
Given , the eggs are independent trials, so . To reach the joint, condition on with LOTP:
Given , the pair is impossible unless , and once and , the event is automatic. So one term survives, and the factorials cancel:
Split every factor along the seam, using and :
The joint factors into . By the PMF face, and are independent.
Two points make this result land. First, is well defined on its own even though only was ever specified. Marginalize out of the factored joint, the -part sums to 1, and with no in sight. "Not computed yet" is not the same as "not defined": a marginal is one quantity's distribution with the other randomness averaged out, not ignored. This is Poisson thinning: keep each item of a count independently with probability , and the kept count is .
Second, the dependence intuition is about the wrong pair. Conditional on , the two counts are and and perfectly dependent, knowing one pins the other. Unconditionally, 's Poisson randomness is exactly the kind that makes learning useless for predicting . This is special to the Poisson, no other egg-count distribution does it, and it runs both ways: independent and sum to a with a binomial conditional, and a Poisson count split by independent coin flips gives back independent Poissons.
Never substitute a value inside the conditioning event The step is illegal. To the right of the bar, is still random, only the hypothesis is given, so cannot be plugged in there. Conditioning on is what licenses replacing by , and only to the left of the bar: is fine. The two sides of the illegal step really are different distributions, on the left and on the right.
The one-time pad: perfect secrecy is independence
Take a message bit with any adversary prior , a key bit independent of , and ciphertext . The chain rule fills the cells:
where dropping the conditioning is exactly where gets used. Without it the table falls apart.
The column sums give whatever is, and every cell factors as . So , the adversary's posterior equals the prior, and seeing the ciphertext teaches them nothing. That is Shannon's perfect secrecy, and it is plain independence, no extra cryptographic machinery.
At real sizes nobody checks cells, the argument goes structural. Fix any pair : exactly one key produces it, and keys are uniform over values, so every row of the giant table is uniform. The table gives the statement to prove, a bijection proves it.
The requirement is identical rows, not a uniform . If every row is the same PMF , LOTP averages identical things and returns that thing:
so conditional equals marginal and posterior equals prior. Uniformity is just what XOR with a uniform key happens to produce. A non-uniform case: append an independent junk bit to every ciphertext. The rows stay identical to each other, the marginal of is now biased, and the adversary still learns nothing about .
What is still shaky
The seam between conditional and joint quantities. A conditional is not automatically smaller than the marginal, and it is not the joint cell either, the two differ by the row-total factor. The continuous version of this material is built on exactly that move: conditional probability density functions (PDFs) as renormalized slices of a density surface, with integrals in place of row sums. Watch that seam.