Why Stratify a Two-Way Table?
A two-way table describes the relationship between two categorical variables. Sometimes a third categorical variable is also relevant to how the data are organized. For example, we might compare treatment group and outcome separately for patients in different severity categories. Stratifying means dividing the records into groups defined by that third variable and constructing a separate two-way table within each group.
The purpose is to make like-for-like comparisons. Instead of comparing treatment groups while ignoring severity, we compare them among patients in the same severity category. This does not, by itself, establish why outcomes differ or whether a treatment caused a difference. It is a way to organize and describe the observed data.
Constructing and Reading the Strata
Suppose the three variables are group, outcome, and stratum. First choose which variable will define the strata. Then, for each of its categories, count the records in every group-and-outcome combination. Include row and column totals so that the denominators for proportions are visible. The tables should use the same group and outcome categories in every stratum, even if some counts happen to be zero.
For comparing outcome proportions between groups, the denominator is the total number of records in the particular group and stratum being described. If \(a_z\) records in group A and stratum \(z\) have the outcome of interest, and \(n_{A,z}\) records are in that group and stratum altogether, then the proportion with the outcome is:
The same rule applies to group B or any other group: use that group's total within the same stratum. This gives a conditional proportion, describing the outcome distribution among records in a specified group and stratum. When comparing groups, keep the outcome, stratum, and denominator definition consistent.
A descriptive stratification requires no probability model or inference procedure. It does require that each record be assigned to the intended category for each variable, that the categories be clearly defined, and that counts refer to distinct records. If data are missing, state how those records are handled rather than silently treating missing values as a category or including them in an unclear denominator.
Identify the two variables for each table and the third categorical variable that defines the strata.
Count each group-and-outcome combination within that stratum, then show the corresponding totals.
For each group, divide the number with the outcome by that group's total in that stratum.
Compare the same outcome for the same groups within each stratum, and report the stratum and units.
Worked Comparisons Within Strata
Worked Example: Comparing Outcomes by Patient Severity
Hypothetical data: A clinic records treatment group, whether a patient improved, and initial severity. The table below shows the counts. Each row represents patients in a group within the displayed severity stratum.
Mild severity
| Group | Improved | Did not improve | Total |
|---|---|---|---|
| Treatment A | 18 | 12 | 30 |
| Treatment B | 12 | 18 | 30 |
Severe severity
| Group | Improved | Did not improve | Total |
|---|---|---|---|
| Treatment A | 8 | 32 | 40 |
| Treatment B | 4 | 16 | 20 |
Among patients with mild severity, the improvement proportion is \(18/30\) for Treatment A and \(12/30\) for Treatment B:
Within the mild-severity stratum, the observed improvement proportion is 20.0 percentage points higher for Treatment A than for Treatment B. The percentage-point difference is \(60.0\%-40.0\%=20.0\) percentage points.
Among patients with severe severity, the corresponding calculations are:
Within the severe-severity stratum, both groups have an observed improvement proportion of 20.0%, so their within-stratum difference is 0.0 percentage points. These are descriptive comparisons of the patients represented in each stratum; they do not show that treatment group caused the outcomes.
Worked Example: Comparing Groups Across Three Experience Strata
Hypothetical data: A training program records whether participants completed a course, whether they received text or letter reminders, and their previous experience level. Calculate the completion proportion for each reminder group separately at each experience level.
Low experience
| Reminder | Completed | Did not complete | Total |
|---|---|---|---|
| Text | 24 | 16 | 40 |
| Letter | 15 | 15 | 30 |
For low-experience participants, the proportions completing are \(24/40=0.600=60.0\%\) with text reminders and \(15/30=0.500=50.0\%\) with letter reminders. The within-stratum difference is 10.0 percentage points in favor of the text group.
Medium experience
| Reminder | Completed | Did not complete | Total |
|---|---|---|---|
| Text | 30 | 10 | 40 |
| Letter | 24 | 8 | 32 |
For medium-experience participants, the proportions are \(30/40=0.750=75.0\%\) and \(24/32=0.750=75.0\%\), respectively. The observed within-stratum difference is 0.0 percentage points.
High experience
| Reminder | Completed | Did not complete | Total |
|---|---|---|---|
| Text | 18 | 2 | 20 |
| Letter | 18 | 2 | 20 |
For high-experience participants, both proportions are \(18/20=0.900=90.0\%\), giving a difference of 0.0 percentage points. The complete stratified description is therefore: the text group has a higher observed completion proportion in the low-experience stratum, and the proportions are equal in the medium- and high-experience strata. The comparison is made within each experience category, not between one group's proportion in one stratum and the other group's proportion in another.
Worked Example: Comparing a Multi-Category Outcome
Hypothetical data: Two hospital wards record each patient's care group and discharge status: recovered, unchanged, or worsened. Ward is the stratum. Because the outcome has three categories, compare the within-group proportions for each outcome category, not only the recovered counts.
Ward 1
| Care group | Recovered | Unchanged | Worsened | Total |
|---|---|---|---|---|
| Group A | 18 | 8 | 4 | 30 |
| Group B | 15 | 10 | 5 | 30 |
For Group A in Ward 1, the proportions are \(18/30=60.0\%\) recovered, \(8/30=26.7\%\) unchanged, and \(4/30=13.3\%\) worsened. For Group B, they are \(15/30=50.0\%\), \(10/30=33.3\%\), and \(5/30=16.7\%\), respectively. Thus, within Ward 1, the recovered proportion is 10.0 percentage points higher in Group A, while the unchanged and worsened proportions are each lower.
Ward 2
| Care group | Recovered | Unchanged | Worsened | Total |
|---|---|---|---|---|
| Group A | 12 | 6 | 2 | 20 |
| Group B | 14 | 4 | 2 | 20 |
For Group A in Ward 2, the proportions are \(12/20=60.0\%\) recovered, \(6/20=30.0\%\) unchanged, and \(2/20=10.0\%\) worsened. For Group B, they are \(14/20=70.0\%\), \(4/20=20.0\%\), and \(2/20=10.0\%\). Within Ward 2, the recovered proportion is 10.0 percentage points higher in Group B. In each group and stratum, the three outcome proportions sum to 100%, apart from rounding. The comparison is descriptive and does not attribute the differences to care group.
Why the Denominator Matters
A within-stratum proportion answers a specific question: among records in this group and this stratum, what fraction had the outcome? The corresponding denominator is the total for that group within that stratum. For example, the 60.0% completion proportion for text reminders among low-experience participants uses 40 as its denominator, not the total number of participants across all experience levels.
The calculation can be justified directly from the table structure. Within a fixed stratum, the group total is divided into mutually exclusive outcome categories. For a binary outcome, the group total is the sum of the counts with and without the outcome. Therefore, dividing the count with the outcome by that group total gives the fraction of that group in that stratum with the outcome:
This is why a cell count alone is not a proportion and why a count from one stratum cannot be interpreted using another stratum's total. To compare groups fairly within a stratum, calculate each group's proportion from its own row total, then compare those proportions for the same outcome.
Common Mistakes and a Careful Interpretation
- Using the entire data set as the denominator. This does not give the proportion within a stratum. Use the relevant group's total inside that stratum.
- Comparing counts instead of proportions. A larger count may simply reflect a larger group. Calculate proportions before comparing outcome rates when group sizes differ.
- Changing the comparison between strata. Keep the same outcome and group ordering in every table so the comparisons have a consistent meaning.
- Claiming causation from a table. A difference in observed proportions describes the data. It does not, on its own, establish that the group difference caused the outcome difference.
A clear report names the groups, the outcome, the stratum, and the proportions being compared. For example: “Among low-experience participants, 60.0% of those receiving text reminders completed the course, compared with 50.0% of those receiving letter reminders, a difference of 10.0 percentage points.” This statement identifies the denominator groups and does not overstate what the table can establish.
Check Your Understanding
For each question, identify the relevant stratum and denominator before calculating or interpreting a proportion.
- A table separates participants by age category, then lists group and outcome counts. Which variable defines the strata, and what should be held constant when comparing groups?
- In one stratum, 16 of 25 members of Group A have the outcome. Write the proportion and interpret it in context-free terms.
- Why is it incorrect to divide an outcome count from one group and stratum by the total number of records in the entire data set when reporting a within-stratum proportion?
- Two groups have different counts with an outcome, but also different group totals within a stratum. What should you calculate to make a descriptive comparison?
- If the outcome has three categories, what should the within-group proportions across those categories sum to, before rounding?