Skip to content

Conditional Probability Mass Function

Definition

For discrete random variables XX and YY and a value yy with pY(y)>0p_Y(y)>0, the conditional PMF of XX given Y=yY=y is

pX∣Y(x∣y)=pX,Y(x,y)pY(y),pY(y)>0.\begin{aligned} p_{X\mid Y}(x\mid y)=\frac{p_{X,Y}(x,y)}{p_Y(y)}, \quad p_Y(y)>0. \end{aligned}

The numerator is the Joint Probability Mass Function, and the denominator is its Marginal Probability Mass Function for YY. This is the ordinary Conditional Probability rule applied to {X=x}\{X=x\} and {Y=y}\{Y=y\} when the latter has positive probability.


Interpretation

A conditional PMF rescales the part of a joint table consistent with the observed discrete value. Once Y=yY=y is known, only the pairs with that value of yy remain possible, and their masses are divided by pY(y)p_Y(y) so that they again add up to 11, just as in conditional probability for events.

A 2 by 2 joint probability table with the column Y = 1 boxed, its sum 0.6 marked, and an arrow to the rescaled column 1/3 and 2/3, the conditional PMF of X given Y = 1.

In the diagram the column Y=1Y=1 holds the masses 0.20.2 and 0.40.4, with total pY(1)=0.6p_Y(1)=0.6. Dividing by 0.60.6 gives pX∣Y(0∣1)=13p_{X\mid Y}(0\mid1)=\tfrac{1}{3} and pX∣Y(1∣1)=23p_{X\mid Y}(1\mid1)=\tfrac{2}{3}. Unconditionally P(X=1)=0.3+0.4=0.7\mathbb{P}(X=1)=0.3+0.4=0.7, so learning Y=1Y=1 lowers the probability of X=1X=1 slightly.

Here yy runs up the vertical axis. Fix Y=yY=y: keep that row of masses and divide by pY(y)p_Y(y) so that they sum to 11.

For each fixed yy with pY(y)>0p_Y(y)>0, x↦pX∣Y(x∣y)x\mapsto p_{X\mid Y}(x\mid y) is an ordinary PMF: nonnegative and summing to 11. Dividing by one number keeps the relative sizes of the masses, so the conditional PMF has the shape of the selected column. As a function of yy for fixed xx it is not a PMF: in the table, pX∣Y(1∣0)+pX∣Y(1∣1)=0.75+23≠1p_{X\mid Y}(1\mid0)+p_{X\mid Y}(1\mid1)=0.75+\tfrac{2}{3}\neq1. When pY(y)=0p_Y(y)=0 the conditional PMF is not defined.

Independence of XX and YY means that every conditional PMF equals the marginal pXp_X: observing YY changes nothing. Multiplying back, pX,Y(x,y)=pX∣Y(x∣y)pY(y)p_{X,Y}(x,y)=p_{X\mid Y}(x\mid y)p_Y(y), which is how two-stage models are built, as in the chicken–egg theorem, where NN is Poisson and the count given N=nN=n is binomial. Summing over yy gives the law of total probability in PMF form, pX(x)=∑ypX∣Y(x∣y)pY(y)\displaystyle p_X(x)=\sum_yp_{X\mid Y}(x\mid y)p_Y(y).


Key Results

  • For pY(y)>0p_Y(y)>0, ∑xpX∣Y(x∣y)=1\displaystyle \sum_xp_{X\mid Y}(x\mid y)=1.
  • pX,Y(x,y)=pX∣Y(x∣y)pY(y)p_{X,Y}(x,y)=p_{X\mid Y}(x\mid y)p_Y(y).

Examples

  • For the table 0.1,0.2,0.3,0.40.1,0.2,0.3,0.4 at (0,0),(0,1),(1,0),(1,1)(0,0),(0,1),(1,0),(1,1), P(X=1∣Y=1)=0.4/0.6=2/3\mathbb{P}(X=1\mid Y=1)=0.4/0.6=2/3.
  • If X=Y∼Bern⁡(1/2)X=Y\sim\operatorname{Bern}(1/2), then P(X=1∣Y=1)=1\mathbb{P}(X=1\mid Y=1)=1.

Prerequisites

Sources

Aliases: conditional PMF, conditional mass function Symbols: sum

Last updated: 20 October 2026 03:02