From Joint Masses to Conditional Masses
A joint probability mass function describes how probability is distributed across pairs of values. A conditional pmf answers a more focused question: after observing a particular value of one variable, how is probability distributed across the possible values of the other? The calculation uses the same principle as conditional probability for events: retain the joint mass in the relevant slice and divide by the probability of that slice.
The condition that the observed value has positive probability matters. It ensures that the denominator is nonzero, so the conditional probabilities are defined by ordinary division. Once the conditional pmf is found, its support identifies which values remain possible under that condition, and summing its masses gives probabilities of conditional events.
The order of the subscripts and arguments records the roles: \(X\) is the variable whose conditional distribution is being described, and \(Y=y\) is the condition. The denominator is therefore the marginal probability of the conditioning event, \(P(Y=y)\), obtained by summing the joint pmf over all values of \(X\). Reversing the roles gives a different conditional pmf: \(f_{Y\mid X}(y\mid x)=f_{X,Y}(x,y)/f_X(x)\), when \(f_X(x)>0\).
Why the Formula Gives a Probability Mass Function
Fix a value \(y\) for which \(f_Y(y)>0\). For each possible \(x\), the event \(\{X=x,Y=y\}\) is contained in \(\{Y=y\}\). The conditional probability of that cell is the joint probability of the cell divided by the probability of the conditioning event. This gives the ratio in the definition. The next result confirms that these ratios sum to one.
Proof. Joint probabilities are nonnegative and \(f_Y(y)>0\), so their ratios \(f_{X,Y}(x,y)/f_Y(y)\) are nonnegative. By the definition of the marginal pmf,
For a set \(A\), the events \(\{X=x,Y=y\}\) for \(x\in A\) are pairwise disjoint, and their union is \(\{X\in A,Y=y\}\). Countable additivity and the definition of conditional probability therefore give
This result gives a reliable calculation route: first determine the joint masses in the slice \(Y=y\), then divide each by the total mass of that slice. A conditional event probability can then be computed either by summing the resulting conditional masses or by summing the relevant joint masses and dividing once by the slice total.
Worked Calculations
Worked Example: Conditioning on One Row of a Joint Distribution
Suppose \(X\) takes values \(0,1,2\), \(Y\) takes values \(0,1\), and the joint pmf is given by the following cell masses. Rows correspond to \(Y\), and columns to \(X\).
| \(X=0\) | \(X=1\) | \(X=2\) | |
|---|---|---|---|
| \(Y=0\) | 0.10 | 0.20 | 0.10 |
| \(Y=1\) | 0.15 | 0.25 | 0.20 |
Find the conditional pmf of \(X\) given \(Y=1\), its support, and \(P(X\geq 1\mid Y=1)\).
Step 1: Find the probability of the conditioning event. Sum the masses in the \(Y=1\) row: \(f_Y(1)=0.15+0.25+0.20=0.60\). This is positive, so the conditional pmf is defined.
Step 2: Divide each joint mass in that row by \(0.60\).
The masses sum to one: \(1/4+5/12+1/3=3/12+5/12+4/12=1\). Each is positive, so the conditional support is \(\{0,1,2\}\).
Step 3: Sum the masses for the event \(X\geq 1\).
Worked Example: A Conditional Distribution on a Finite Grid
Let \(X,Y\in\{0,1,2\}\), with joint pmf \(f_{X,Y}(i,j)=(i+j+1)/27\) for \(i,j\in\{0,1,2\}\). Find the pmf and support of \(Y\) given \(X=1\), and calculate \(P(Y\geq 1\mid X=1)\).
First check that the proposed joint masses sum to one. The numerator over the nine pairs sums to \(9+\sum_{i,j}i+\sum_{i,j}j=9+9+9=27\), since each value of \(i\) occurs for three values of \(j\), and vice versa. Thus the total mass is \(27/27=1\).
The conditioning event has probability
For \(j=0,1,2\), divide the joint mass at \((1,j)\) by \(1/3\):
The probabilities sum to \(2/9+3/9+4/9=1\), and all three are positive, so the conditional support is \(\{0,1,2\}\). Therefore \(P(Y\geq1\mid X=1)=1/3+4/9=3/9+4/9=7/9\).
Worked Example: A Value Removed From the Conditional Support
Suppose \(X\in\{0,1\}\) and \(Y\in\{0,1,2\}\), with joint masses \(f_{X,Y}(0,0)=0.10\), \(f_{X,Y}(0,1)=0.20\), \(f_{X,Y}(0,2)=0\), \(f_{X,Y}(1,0)=0.10\), \(f_{X,Y}(1,1)=0.20\), and \(f_{X,Y}(1,2)=0.40\). These nonnegative masses sum to \(0.10+0.20+0+0.10+0.20+0.40=1\). Find the conditional pmf of \(Y\) given \(X=0\), its support, and \(P(Y=0\text{ or }Y=2\mid X=0)\).
The marginal probability of \(X=0\) is \(0.10+0.20+0=0.30\), which is positive. Divide each mass in the \(X=0\) slice by \(0.30\):
The conditional support is \(\{0,1\}\), not the full marginal set \(\{0,1,2\}\): the joint cell at \((0,2)\) has zero mass, so \(Y=2\) cannot occur under \(X=0\). The requested event consists of \(Y=0\) and \(Y=2\), so \(P(Y=0\text{ or }Y=2\mid X=0)=1/3+0=1/3\).
Reading the Conditional Support Correctly
For a fixed \(y\) with \(f_Y(y)>0\), the conditional support of \(X\) is the set of values receiving positive conditional mass:
The equality follows because the denominator \(f_Y(y)\) is positive: dividing a nonnegative joint mass by this denominator preserves whether it is zero or positive. Thus the conditional support is the part of the joint support lying in the slice \(Y=y\), expressed as possible \(X\)-values. A variable's marginal support may be larger than its conditional support; the third example showed precisely this.
Conditioning in the opposite direction generally changes both the denominator and the slice. In particular, \(f_{X\mid Y}(x\mid y)\) and \(f_{Y\mid X}(y\mid x)\) need not be equal. The first divides the cell mass by \(f_Y(y)\); the second divides it by \(f_X(x)\). The denominator is determined by which event is being conditioned on.
Common Mistakes and Why the Condition Matters
- Dividing by the wrong marginal. To find \(f_{X\mid Y}(x\mid y)\), divide by \(f_Y(y)\), not \(f_X(x)\). The latter is the denominator when conditioning on \(X=x\).
- Using the joint cell mass as the conditional mass. The value \(f_{X,Y}(x,y)\) is a probability before conditioning. It must be rescaled by \(f_Y(y)\) to describe probabilities within the event \(Y=y\).
- Keeping impossible values in the support. A value can belong to the marginal support of \(X\) but have zero joint mass in the slice \(Y=y\). Its conditional mass is zero and it is not in the conditional support.
- Applying the ratio when the denominator is zero. If \(f_Y(y)=0\), then \(P(X=x\mid Y=y)\) is not defined by the elementary conditional-probability ratio, because \(P(Y=y)=0\). Do not divide by zero or assign a conditional pmf by this formula.
The positive-probability requirement is not merely a computational convenience. Conditional probabilities on an event of positive probability are defined by ratios of event probabilities. When \(P(Y=y)=0\), that definition supplies no values. More advanced treatments can define conditional distributions in broader settings, but those constructions are not the cell-by-cell division used here.
Check Your Understanding
For each question, identify the relevant slice and denominator before calculating.
- If \(f_{X,Y}(0,1)=0.12\), \(f_{X,Y}(1,1)=0.18\), and \(f_Y(1)=0.30\), what are \(f_{X\mid Y}(0\mid 1)\) and \(f_{X\mid Y}(1\mid 1)\)?
- Why must the conditional masses \(f_{X\mid Y}(x\mid y)\) sum to one when \(f_Y(y)>0\)?
- If the joint mass is zero at \((x,y)\), what is \(f_{X\mid Y}(x\mid y)\) when \(f_Y(y)>0\), and what does that imply about the conditional support?
- Suppose \(f_X(2)=0.4\) and \(f_{X,Y}(2,3)=0.10\). Which conditional probability can be calculated from these values directly, and what is its value?
- What prevents the elementary ratio formula from defining \(f_{X\mid Y}(x\mid y)\) when \(f_Y(y)=0\)?