A Complete Table Tells More Than One Story
A two-way table can summarize the same categorical data in several useful ways. The counts show how many observations fall into each combination of categories; proportions describe shares of the whole data set, shares of a row or column, or shares within a subgroup. These are different summaries, and their denominators answer different questions.
This workshop follows one hypothetical treatment comparison from its stratified counts to its pooled table. The data are deliberately arranged so that Treatment A has a higher success proportion than Treatment B in each severity group, while its pooled success proportion is lower. The calculation will show exactly how both statements can be true.
Worked Example: Build the Pooled and Stratified Tables
Worked Example: Build the Pooled and Stratified Tables
Suppose a hypothetical clinic records success or failure for patients receiving Treatment A or Treatment B. Patients are also classified as having lower or higher initial severity. These invented counts are for practicing table analysis; they do not represent real treatment evidence.
The lower-severity counts are: for Treatment A, 81 successes and 6 failures; for Treatment B, 234 successes and 36 failures. The higher-severity counts are: for Treatment A, 192 successes and 108 failures; for Treatment B, 18 successes and 12 failures.
First check the row totals. In the lower-severity group, Treatment A has \(81+6=87\) patients and Treatment B has \(234+36=270\). In the higher-severity group, the corresponding totals are \(192+108=300\) and \(18+12=30\).
The stratified tables preserve the severity information:
| Lower severity | Success | Failure | Total |
|---|---|---|---|
| Treatment A | 81 | 6 | 87 |
| Treatment B | 234 | 36 | 270 |
| Total | 315 | 42 | 357 |
| Higher severity | Success | Failure | Total |
|---|---|---|---|
| Treatment A | 192 | 108 | 300 |
| Treatment B | 18 | 12 | 30 |
| Total | 210 | 120 | 330 |
Add corresponding cells across severity groups to obtain the pooled table. Treatment A has \(81+192=273\) successes and \(6+108=114\) failures, for a total of 387. Treatment B has \(234+18=252\) successes and \(36+12=48\) failures, for a total of 300. The full sample size is \(357+330=687\).
| All severity levels | Success | Failure | Total |
|---|---|---|---|
| Treatment A | 273 | 114 | 387 |
| Treatment B | 252 | 48 | 300 |
| Total | 525 | 162 | 687 |
The totals provide a useful arithmetic check: \(273+114=387\), \(252+48=300\), and \(387+300=687\). The outcome column totals also agree: \(273+252=525\) successes and \(114+48=162\) failures.
Worked Example: Joint, Marginal, and Conditional Proportions
Worked Example: Joint, Marginal, and Conditional Proportions
Use the pooled table to calculate three kinds of proportions. The denominator changes with the question, so write it explicitly.
Joint proportion. The proportion of all 687 patients who received Treatment A and succeeded is the A-success cell divided by the grand total:
Thus about 39.74% of all patients in this hypothetical data set were in the Treatment A-and-success cell. This is not the success rate among Treatment A patients; its denominator is all patients.
Marginal proportion. The proportion of all patients who received Treatment A is the A row total divided by 687:
So 56.33% of the patients received Treatment A. The marginal success proportion is \(525/687=0.7642\), or 76.42% of all patients.
Conditional proportion. The pooled success proportion among Treatment A patients is the number of A successes divided by the A row total:
The pooled success proportion for Treatment B is calculated with the B row total as denominator:
The pooled comparison therefore favors Treatment B by \(0.8400-0.7054=0.1346\), or about 13.46 percentage points. That comparison describes the pooled data. It does not yet tell us what the comparison looks like within each severity group.
Compare Within Each Severity Group
To make a within-group comparison, divide each success count by the treatment total in that same severity group. The lower-severity success proportions are \(81/87\) for Treatment A and \(234/270\) for Treatment B. The higher-severity proportions are \(192/300\) and \(18/30\), respectively.
Within lower severity, the success proportion is higher for Treatment A by about 0.0644, or 6.44 percentage points. This difference comes from the original fractions: \(81/87-234/270\). Subtracting the separately rounded displayed proportions can produce a slightly different last digit. Within higher severity, Treatment A’s success proportion is higher by 0.0400, or 4.00 percentage points.
The within-group comparisons and the pooled comparison have opposite directions: A’s success proportion is higher in both severity groups, but B’s is higher in the pooled table. This is a form of Simpson’s paradox: an association seen in separate groups reverses when those groups are combined.
Why the Pooled Comparison Reverses
The pooled success proportion for a treatment is a weighted average of that treatment’s subgroup success proportions. The weights are the proportions of that treatment’s patients who belong to each severity group. The weights can differ between treatments, and in this data set they differ substantially.
Here, 300 of 387 Treatment A patients are in the higher-severity group, whereas only 30 of 300 Treatment B patients are. The weighted-average calculations recover the pooled proportions exactly:
A Short Justification of the Weighted-Average Formula
The formula follows by splitting the event “success and treatment T” into disjoint cases according to stratum. For two strata, every success in group \(T\) is either a success in stratum 1 or a success in stratum 2. Dividing the sum of those two counts by the total number in \(T\) gives:
The weights are nonnegative and sum to one because \(n_{T,1}/n_T+n_{T,2}/n_T=1\). Consequently, the pooled proportion lies between the two subgroup proportions for that treatment. But if the treatment groups have different weights, their pooled proportions need not preserve the direction of the within-stratum comparisons. In this example, the A group contains a much larger share of higher-severity patients, whose success proportions are lower for both treatments.
Worked Example: Diagnose a Reversal in a New Table
Worked Example: Diagnose a Reversal in a New Table
Consider another invented data set, this time about applications accepted in two departments. In Department 1, Group X has 9 acceptances among 10 applicants and Group Y has 80 among 100. In Department 2, Group X has 30 acceptances among 100 applicants and Group Y has 1 among 5.
Within Department 1, the acceptance proportions are \(9/10=0.9000\) for X and \(80/100=0.8000\) for Y, so X is higher by 10 percentage points. Within Department 2, they are \(30/100=0.3000\) for X and \(1/5=0.2000\) for Y, so X is again higher by 10 percentage points.
Pool the department counts. Group X has \(9+30=39\) acceptances among \(10+100=110\) applicants, giving \(39/110=0.3545\). Group Y has \(80+1=81\) acceptances among \(100+5=105\), giving \(81/105=0.7714\). The pooled comparison favors Y even though X has the higher acceptance proportion in each department.
The table reveals the differing mix: most X applicants are in Department 2, where acceptance proportions are lower for both groups; most Y applicants are in Department 1. The pooled comparison is therefore strongly affected by how applicants are distributed across departments. The descriptive table alone does not establish why those distributions differ or support a causal conclusion about group membership.
Reading and Reporting the Pattern Carefully
When a pooled comparison and subgroup comparisons disagree, report both rather than choosing whichever supports a preferred conclusion. Identify the outcome category, state which proportion is in the numerator and which group forms the denominator, and name the strata. For the clinic example, a clear summary is: “Treatment A had a higher success proportion in each severity group, but Treatment B had a higher success proportion in the pooled data. Treatment A’s patients were much more concentrated in the higher-severity group.”
This is a descriptive statement about the table. A reversal can signal that the grouping variable is important to understanding the observed association, but it does not by itself show that severity caused the reversal or establish which treatment is more effective. In particular, do not turn a pattern in hypothetical or observational counts into a causal claim.
Common Mistake
- Wrong reasoning: “Treatment A is better overall because its success proportion is higher in both severity groups.” This ignores the pooled data and treats the subgroup comparisons as if they automatically determine the pooled comparison.
- Correction: Report the subgroup and pooled proportions separately. In this example, A is higher within both strata, while B is higher overall. Explain that the groups have different severity mixes and that pooling uses different weights.
- Another denominator error: Calling \(273/687\) the success rate for Treatment A. That is the joint proportion of all patients who received A and succeeded. The conditional success proportion among A patients is \(273/387\).
Check Your Understanding
Use the tables and reasoning in this tutorial to answer the following questions.
- In the pooled clinic table, what does \(48/300\) represent, and what does \(48/687\) represent?
- Calculate the higher-severity failure proportion for Treatment A. State its denominator and interpret it in context.
- Why is \(81/87-234/270\) the appropriate lower-severity comparison, rather than comparing either success count directly?
- What are the proportions of Treatment A patients in the lower- and higher-severity groups? Do they sum to one?
- Explain how Treatment A can have a higher success proportion within each severity group but a lower pooled success proportion.