Mathwords logoMathwords

Conditional Distribution — Definition, Formula & Examples

A conditional distribution is the distribution of one variable in a two-way table, limited to only the rows or columns that match a specific category of the other variable. It converts the counts in a single row or column into percentages of that row's or column's total.

Given two categorical variables AA and BB summarized in a contingency table, the conditional distribution of BB given A=aiA = a_i is the set of relative frequencies nijni\frac{n_{ij}}{n_{i\cdot}} for each category bjb_j, where nijn_{ij} is the joint frequency and nin_{i\cdot} is the marginal total for row aia_i.

Key Formula

P(B=bjA=ai)=nijniP(B = b_j \mid A = a_i) = \frac{n_{ij}}{n_{i\cdot}}
Where:
  • nijn_{ij} = Count in the cell where row i meets column j
  • nin_{i\cdot} = Total count in row i (the marginal total for that row)

How It Works

To find a conditional distribution, pick one category of the conditioning variable (one row or one column). Divide each cell count in that row or column by the row or column total. The resulting percentages must sum to 100%. Comparing conditional distributions across rows (or columns) lets you judge whether the two variables are associated — if the conditional distributions look different, the variables may not be independent.

Worked Example

Problem: A survey asks 200 students whether they prefer cats or dogs, sorted by grade. Among 80 freshmen, 30 prefer cats and 50 prefer dogs. Among 120 seniors, 60 prefer cats and 60 prefer dogs. Find the conditional distribution of pet preference given the student is a freshman.
Identify the row: Focus on the Freshman row: 30 cats, 50 dogs, 80 total.
Divide each cell by the row total: Compute the conditional percentages for each pet preference.
P(CatFreshman)=3080=0.375=37.5%P(\text{Cat} \mid \text{Freshman}) = \frac{30}{80} = 0.375 = 37.5\%
Repeat for dogs: Find the remaining conditional percentage.
P(DogFreshman)=5080=0.625=62.5%P(\text{Dog} \mid \text{Freshman}) = \frac{50}{80} = 0.625 = 62.5\%
Answer: The conditional distribution of pet preference for freshmen is 37.5% cats and 62.5% dogs. Note this differs from the seniors' conditional distribution (50%/50%), suggesting grade and pet preference may be associated.

Visualization

Why It Matters

On the AP Statistics exam, free-response questions on two-way tables almost always require you to compute and compare conditional distributions to argue whether two variables are associated. Understanding conditional distributions is also essential in fields like public health, where researchers compare disease rates across different demographic groups.

Common Mistakes

Mistake: Dividing cell counts by the grand total instead of the row or column total.
Correction: That gives a joint relative frequency, not a conditional distribution. Always divide by the total of the specific row or column you are conditioning on.

Related Terms