Tutorials › Introduction to Statistics › Row Conditional Distributions

Two-Way Tables and Association · Tutorial 204 of 996

Row Conditional Distributions

Learn how to turn each row of a two-way table into a distribution of proportions that describes the composition of that row category.

Beginner 9 min read

What You'll Learn

  • Identify the row total that serves as the denominator for a row conditional distribution.
  • Calculate each cell's proportion of its row and convert proportions to percentages.
  • Interpret the resulting values as the composition of a particular row category.
  • Check a row conditional distribution by verifying that its proportions sum to one.
  • Recognize when a row conditional distribution cannot be calculated from a zero row total.

From Counts to the Composition of a Row

A two-way table organizes counts according to two categorical variables. Its cell counts tell us how many observations fall into each combination of categories. But a count by itself can be hard to interpret when the row categories contain different numbers of observations. A row conditional distribution changes the scale: within each row, it reports the proportion of observations in each column category.

For example, suppose a hypothetical table records whether appointments at several clinics were completed or missed. If one clinic's row contains 30 appointments and another's contains 40, comparing their raw counts of completed appointments does not directly describe the composition of either clinic's appointments. Dividing each cell count by its own row total answers a focused question: among the observations in this row category, what fraction belongs to each column category?

Definition: A row conditional distribution is the set of proportions obtained by dividing every cell count in a given row by that row's total. Each proportion describes the share of observations in that row category that fall into the corresponding column category.

How to Calculate a Row Conditional Distribution

Suppose the rows represent categories of one variable and the columns represent categories of another. Let \(n_{ij}\) be the count in row \(i\), column \(j\), and let \(n_{i+}\) be the total count in row \(i\). The plus sign indicates that the counts across the columns have been added for that row. The row conditional proportion for cell \((i,j)\) is:

$$ \text{Row conditional proportion}_{ij} = \frac{n_{ij}}{n_{i+}} $$

To express that proportion as a percentage, multiply it by 100. The numerator is one cell count; the denominator is the total for the same row. Calculate each row separately. A row conditional distribution is not the same as a distribution of proportions out of the entire table: its denominator is the row total, not the grand total.

The table must have meaningful counts for each row. In particular, every observation included in a row total must be classified into exactly one of the column categories. If there are unclassified or missing observations, the analyst must decide how they are handled and make clear what population the row total represents. If a row total is zero, no row conditional proportions can be calculated for that row, because division by zero is undefined.

Worked Example: Appointment Outcomes by Clinic

In a hypothetical scheduling summary, each appointment is classified by clinic and by whether it was completed or missed. The counts are:

ClinicCompletedMissedRow total
North181230
Central281240
South161430

For the North row, the row total is 30. The completed proportion is \(18/30=0.60\), or \(60\%\). The missed proportion is \(12/30=0.40\), or \(40\%\). These describe the composition of the North clinic's 30 appointments: 60% were completed and 40% were missed.

For the Central row, use its row total of 40 for both calculations:

$$ \frac{28}{40}=0.70=70\% \qquad\text{and}\qquad \frac{12}{40}=0.30=30\%. $$

Thus, 70% of the Central clinic's appointments were completed and 30% were missed. For the South row, the row total is 30:

$$ \frac{16}{30}\approx 0.5333=53.3\% \qquad\text{and}\qquad \frac{14}{30}\approx 0.4667=46.7\%. $$

The South row therefore consists of approximately 53.3% completed appointments and 46.7% missed appointments. Each interpretation keeps the row category as its reference group: the percentages describe appointments within that clinic, not all appointments in the table.

Why Each Row Adds to One

A row conditional distribution should account for the entire row. If the column categories are exhaustive and mutually exclusive for the observations in that row, their cell counts add up to the row total. Dividing each of those counts by that same total makes the row proportions add to one.

$$ \sum_j \frac{n_{ij}}{n_{i+}} = \frac{\sum_j n_{ij}}{n_{i+}} = \frac{n_{i+}}{n_{i+}} = 1 $$

This is a short algebraic justification for the row-sum check. The numerator \(\sum_j n_{ij}\) is the sum of all cell counts in row \(i\), which equals \(n_{i+}\). Since a positive row total divided by itself is 1, the row proportions sum to 1. If reported as percentages, they sum to 100%, apart from small discrepancies caused by rounding.

The check is useful, but it does not by itself prove that every calculation is correct: an incorrect set of values can sometimes still add to one. Check both that each cell was divided by its own row total and that the resulting row sum is one.

Worked Example: Preferred Travel Mode Within Residence Category

A hypothetical survey records the usual travel mode for students living in two residence categories. Each student is counted once, and every response belongs to one of the three listed modes.

ResidenceWalkBusCarRow total
On campus513624
Off campus1215936

For students living on campus, divide each count by 24:

$$ \frac{5}{24}\approx 0.2083,\qquad \frac{13}{24}\approx 0.5417,\qquad \frac{6}{24}=0.25. $$

As percentages, approximately 20.8% of the on-campus students usually walk, 54.2% usually take the bus, and 25.0% usually travel by car. The rounded percentages add to 100.0%.

For students living off campus, use 36 as the denominator throughout:

$$ \frac{12}{36}=0.3333,\qquad \frac{15}{36}\approx 0.4167,\qquad \frac{9}{36}=0.25. $$

Thus, among the off-campus students represented in this table, approximately 33.3% usually walk, 41.7% take the bus, and 25.0% travel by car. The row totals differ, so the count in a cell is not itself a percentage of that row; the division is what gives it that interpretation.

Presenting and Interpreting the Results

A clear presentation keeps the row categories and column categories visible, labels the entries as proportions or percentages, and states what the percentages are percentages of. One convenient format is a table with each row converted to percentages. For the travel-mode example, that format is:

ResidenceWalkBusCarRow sum
On campus20.8%54.2%25.0%100.0%
Off campus33.3%41.7%25.0%100.0%

A useful interpretation names the row category and the column category. For example: “Among the surveyed students living on campus, 54.2% reported that they usually take the bus.” This states the relevant group, the measured category, and the percentage's denominator in words. Avoid writing only “54.2% take the bus,” which leaves unclear which group the percentage describes.

It is often helpful to show one decimal place for percentages, but the level of rounding should suit the size and precision of the data. Keep enough digits during calculation, then round the displayed result. Because individually rounded values may add to 99.9% or 100.1%, a small discrepancy from 100% is not necessarily an error. The unrounded proportions should sum to 1.

Worked Example: Turning One Row into a Distribution

In a hypothetical inventory summary, 50 orders are classified by order type and by whether they were shipped within two days, shipped later, or not yet shipped. For the standard-order row, the counts are 32 within two days, 13 shipped later, and 5 not yet shipped. Find and interpret the row conditional distribution.

First check that the row total is \(32+13+5=50\). Each proportion uses this same denominator:

$$ \frac{32}{50}=0.64,\qquad \frac{13}{50}=0.26,\qquad \frac{5}{50}=0.10. $$

As percentages, these are 64%, 26%, and 10%. They sum to \(64\%+26\%+10\%=100\%\). In context, among the 50 standard orders represented in the row, 64% were shipped within two days, 26% were shipped later, and 10% had not yet been shipped. This statement describes the composition of that row; it does not claim that the same percentages apply to another order category.

Common Mistake: Using the Wrong Denominator

A frequent error is to divide a cell by the grand total of the table instead of by its row total. That produces a joint relative frequency: the fraction of all observations in the particular cell. It does not give the composition of the row. For instance, in the appointment table, \(18/100=18\%\) is the share of all 100 appointments that were both from the North clinic and completed. The North row conditional proportion is \(18/30=60\%\), the share of North clinic appointments that were completed. The two values answer different questions.

Another error is to divide by a column total. A cell divided by its column total describes a proportion with a different reference group, so it is not the row conditional proportion. For this topic, keep the question in view: within this row category, how are the observations distributed across the columns? The answer uses the row total as the denominator.

Key takeaway: To find a row conditional distribution, divide every cell in a row by that row's total. Interpret the results as the composition of that row category, and check that the proportions sum to 1 (or 100% when expressed as percentages), allowing for rounding.

Check Your Understanding

For each question, identify the denominator and explain the result in context.

  1. A row has counts 14, 21, and 15, with row total 50. What is the row conditional distribution as percentages, and what check should the values satisfy?
  2. In a hypothetical table, one row has 12 observations in a cell and a row total of 30. Calculate and interpret that cell's row conditional proportion.
  3. A two-way table has a grand total of 240. Why would dividing a cell count by 240 generally not give its row conditional proportion?
  4. A row has counts 0, 7, and 13. Calculate the row conditional distribution and confirm the total.
  5. What prevents a row conditional distribution from being calculated for a row whose total is zero?