Skip to content
Glacius
ProbabilityConcept reference

Conditional mass functions

A joint mass table assigns probabilities to pairs of values.

On this page 7 sections
  1. Overview
  2. Keep only the observed case
  3. Divide by the slice's mass
  4. Conditioning on a column is different
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections

01Keep only the observed case#

A joint mass table assigns probabilities to pairs of values. After observing one variable, a conditional distribution keeps that variable's slice and renormalizes it to total probability one.

Suppose a joint table has columns X=0,2X=0,2 and rows Y=a,bY=a,b. Row aa has masses 0.1,0.30.1,0.3; row bb has masses 0.4,0.20.4,0.2. All four masses sum to one.

02Divide by the slice's mass#

Observing Y=aY=a restricts us to total mass 0.1+0.3=0.40.1+0.3=0.4. Dividing each entry in that row by 0.40.4 gives conditional probabilities 0.25,0.750.25,0.75 for X=0,2X=0,2.

P(X=xY=a)=P(X=x,Y=a)P(Y=a)\begin{gathered}P(X=x\mid Y=a)\\=\frac{P(X=x,Y=a)}{P(Y=a)}\end{gathered}

The conditional masses sum to 11. The original joint row sums to 0.40.4. Keeping its entries unchanged would describe joint events, not probabilities within the observed case.

Check your reasoning

Joint table columns X=0,1; row Y=a has masses (0.1,0.3), row Y=b has (0.2,0.4). Find P(X=1 | Y=a).

  1. A0.75
  2. B0.3
  3. C0.5
Show answer and explanation
0.75

The observed row has total mass 0.4; divide 0.3 by 0.4.

03Conditioning on a column is different#

If instead you observe X=0X=0, the selected column has total mass 0.1+0.4=0.50.1+0.4=0.5. The conditional probabilities for Y=a,bY=a,b become 0.2,0.80.2,0.8. The question determines which variable is fixed and which values remain possible.

Check your reasoning

A joint row sums to 0.4. A draft calls its unchanged entries a conditional distribution. What is missing?

  1. AMultiply each row entry by 0.4
  2. BDivide each row entry by 0.4
  3. CDivide by the number of columns
Show answer and explanation
Divide each row entry by 0.4

Conditioning rescales the selected slice to total probability one.

This finite-table ratio requires the conditioning case to have positive probability. A zero-mass slice cannot be normalized by dividing by zero. Zero entries within a positive-mass slice are fine and remain zero.

Key takeaway

Compute a conditional distribution from a joint mass table.

  • Compute a conditional distribution from a joint mass table.

Sources & further reading

  1. [1]
  2. [2]
    Harvard Stat 110, Strategic Practice 10 (2011)stat110.hsites.harvard.edu · Article
  3. [3]

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Conditional mass functions.” Math behind ML. /learn/p-discrete-conditional