Tutorials › Introduction to Statistics › Binary Outcomes in Matched Pairs

Paired and Matched Designs · Tutorial 768 of 996

Binary Outcomes in Matched Pairs

Organize binary matched-pair data and see how the pair structure determines the comparison between two proportions.

Intermediate 10 min read

What You'll Learn

  • Arrange paired binary responses in a two-by-two table.
  • Define concordant and discordant pairs and interpret each cell.
  • Calculate the difference in sample proportions from the discordant-pair counts.
  • Explain why marginal proportions alone do not capture the pairing.
  • Identify the pair-level quantity that describes variability in a paired comparison.

Why Binary Outcomes Need a Paired View

A binary outcome records one of two categories, often coded 1 for an event and 0 for no event. When the same individuals, or deliberately matched units, each contribute an outcome under two conditions, the observations come in pairs. The two condition-specific proportions still describe how often the event occurred, but they do not by themselves show how responses correspond within pairs.

That correspondence matters. If the outcome is 1 under both conditions, the pair contributes to both proportions but not to their difference. If it changes from 0 to 1, or from 1 to 0, it contributes to the difference in opposite directions. A useful analysis therefore keeps both the marginal totals and the within-pair pattern visible.

Definition: For \(n\) matched pairs, let \(A_i\) and \(B_i\) be the binary outcomes for pair \(i\) under conditions A and B, respectively, with 1 denoting the event and 0 denoting no event. A pair is concordant if \(A_i=B_i\), and discordant if \(A_i\ne B_i\). In a two-by-two table, the concordant pairs are in the two cells where both outcomes agree; the discordant pairs are in the two cells where they differ.

Organizing the Outcomes

A two-by-two table displays the outcome under condition A in rows and the outcome under condition B in columns. The orientation must be stated because it determines which discordant cell represents an event in A but not B.

Condition B: 1Condition B: 0Row total
Condition A: 1Both 1: concordantA only 1: discordantA events
Condition A: 0B only 1: discordantBoth 0: concordantA non-events
Column totalB eventsB non-eventsAll pairs

Call the cell counts \(n_{11}\), \(n_{10}\), \(n_{01}\), and \(n_{00}\), where the first subscript is the outcome under A and the second is the outcome under B. Thus \(n_{10}\) counts pairs with an event under A and no event under B; \(n_{01}\) counts pairs with no event under A and an event under B. These discordant cells are the only cells that change the difference between the two event totals.

The sample proportion of events under A is \(\hat{p}_A=(n_{11}+n_{10})/n\), and under B it is \(\hat{p}_B=(n_{11}+n_{01})/n\). Subtracting gives:

$$ \hat{p}_A-\hat{p}_B =\frac{(n_{11}+n_{10})-(n_{11}+n_{01})}{n} =\frac{n_{10}-n_{01}}{n}. $$

This identity is the central descriptive result for matched binary data. The paired difference in sample proportions is the net number of discordant pairs favoring A, divided by the number of pairs. Pairs with both outcomes 1 cancel in the subtraction, as do pairs with both outcomes 0.

Worked Example: Calculating the Paired Difference

Suppose a hypothetical study forms 80 matched pairs of clinics. For each pair, one clinic uses process A and the other uses process B. The binary outcome is whether a target was met. The observed table is:

B: target metB: target not metTotal
A: target met321850
A: target not met62430
Total384280

The sample proportions meeting the target are \(\hat{p}_A=50/80=0.625\) and \(\hat{p}_B=38/80=0.475\). Their difference is \(0.625-0.475=0.150\), or 15.0 percentage points.

The table gives the same result from the discordant pairs: \(n_{10}=18\) pairs met the target under A only, while \(n_{01}=6\) met it under B only. Therefore,

$$ \hat{p}_A-\hat{p}_B=\frac{18-6}{80} =\frac{12}{80}=0.150. $$

In this sample, condition A had a target-meeting proportion 15.0 percentage points higher than condition B. The 32 pairs meeting the target under both conditions and the 24 pairs meeting it under neither do not change that difference, though they remain part of the data and help describe how outcomes were paired.

What the Pairing Adds

The paired comparison is not a comparison of two unrelated collections of outcomes. Each pair contributes a joint outcome: one of \((1,1)\), \((1,0)\), \((0,1)\), or \((0,0)\). A compact way to represent that contribution is the within-pair difference \(D_i=A_i-B_i\). It equals 1 for an A-only event, -1 for a B-only event, and 0 for a concordant pair.

Definition: The population paired difference is \(\Delta=E(D_i)=P(A_i=1,B_i=0)-P(A_i=0,B_i=1)\), for the population of matched pairs being studied. Its sample estimate is the mean of the within-pair differences, \(\bar{D}=(1/n)\sum_{i=1}^{n}D_i=\hat{p}_A-\hat{p}_B\). The parameter is a difference in marginal event probabilities, expressed through the joint outcomes within a pair.

This definition separates two ideas. The marginal probabilities \(p_A=P(A_i=1)\) and \(p_B=P(B_i=1)\) describe event rates under each condition. Their difference is \(\Delta=p_A-p_B\). The paired data also tell us how those outcomes co-occur. Two studies can have the same marginal proportions but different patterns of concordance and discordance.

Worked Example: Same Difference, Different Pair Patterns

Consider two hypothetical data sets, each with 60 matched pairs. In the first, the table has 20 pairs with both outcomes 1, 11 with A only 1, 9 with B only 1, and 20 with both outcomes 0. In the second, it has 29 pairs with both outcomes 1, 2 with A only 1, 0 with B only 1, and 29 with both outcomes 0.

For the first data set, A has \(20+11=31\) events and B has \(20+9=29\). Thus \(\hat{p}_A=31/60\), \(\hat{p}_B=29/60\), and the difference is \(2/60=0.0333\). For the second, A has \(29+2=31\) events and B has \(29+0=29\), so the marginal proportions and their difference are exactly the same.

The within-pair patterns are not the same. The first data set has 20 discordant pairs, split between 11 favoring A and 9 favoring B. The second has only 2 discordant pairs, both favoring A. The marginal totals alone cannot reveal this distinction. Pair-aware variability calculations use the pair-level differences, which depend on the discordant counts, rather than treating all 120 condition-specific responses as unrelated observations.

Why an Independent-Proportion Comparison Is Different

An ordinary independent-proportion comparison treats the observations contributing to the two sample proportions as independent groups. That assumption does not describe a matched-pair design: the A and B outcomes within each pair may be related, and the design intentionally preserves their pairing. The marginal proportions can be calculated correctly from the table, but an independent-groups standard error or test does not use the observed within-pair relationship.

The distinction can be seen from the variance of the pair-level difference. If pairs are independent of one another and come from the target population, then the \(D_i\) values are the independent units for estimating the variability of the paired mean. Since \(D_i\) is 1 in the \(n_{10}\) cell, -1 in the \(n_{01}\) cell, and 0 in the concordant cells, its sample variance is calculated from those pair-level values. For example, with \(s_D\) denoting their sample standard deviation, the estimated standard error of \(\bar{D}\) is \(s_D/\sqrt{n}\), under the usual independent-pairs sampling framework.

This is a description of the relevant structure, not a complete inferential procedure. A specific confidence interval or test also requires its own conditions and method. In particular, it is not valid to call the \(2n\) condition outcomes independent merely because there are two records per pair: the matching means those two records belong to the same unit or matched set.

A Short Derivation of the Pair-Level Variance

The pair-level formulation gives a direct justification for focusing on discordance. Let \(q_{10}=P(A_i=1,B_i=0)\) and \(q_{01}=P(A_i=0,B_i=1)\). Because \(D_i\) takes values 1, -1, or 0, its expectation is:

$$ E(D_i)=1q_{10}+(-1)q_{01}+0(1-q_{10}-q_{01}) =q_{10}-q_{01}=\Delta. $$

Squaring \(D_i\) makes both kinds of discordance contribute 1, while concordance still contributes 0. Hence \(E(D_i^2)=q_{10}+q_{01}\). Using the definition of variance, \(Var(D_i)=E(D_i^2)-[E(D_i)]^2\), gives:

$$ Var(D_i)=q_{10}+q_{01}-(q_{10}-q_{01})^2. $$

Thus the variability of a paired difference depends on the total probability of discordance and on the net difference between the two discordant probabilities. The concordant outcomes contribute zero to each individual \(D_i\); they do not create variation in the paired difference. This does not mean concordant pairs should be discarded from the table: they establish the total number of pairs and the marginal event rates, and their presence helps explain the data structure.

Worked Example: Interpreting Concordance and Discordance

Suppose 100 hypothetical matched pairs of farms are compared on whether a specified threshold was reached. The table has 45 pairs with the threshold reached under both conditions, 12 reached under A only, 8 reached under B only, and 35 reached under neither.

There are \(45+35=80\) concordant pairs and \(12+8=20\) discordant pairs. The event proportions are \(\hat{p}_A=(45+12)/100=0.57\) and \(\hat{p}_B=(45+8)/100=0.53\), so the estimated difference is \(0.04\), or 4 percentage points.

The discordant-pair calculation confirms it: \((12-8)/100=0.04\). Of the 20 pairs that differed, 12 favored A and 8 favored B, a net excess of 4 pairs favoring A. The 80 concordant pairs do not change the observed difference. This table describes the sample; by itself it does not establish that the population difference is nonzero.

Common Mistake and Practical Checklist

A common mistake is to say, “There are 80 outcomes under A and 80 under B, so I can compare them as two independent samples.” That reasoning counts the marginal records but ignores how the design created the observations. When each A observation is linked to a specific B observation, treating all records as independent discards the information about concordance and discordance, and can give an inappropriate measure of uncertainty.

Another mistake is to focus only on the number of discordant pairs without keeping their direction. The total \(n_{10}+n_{01}\) describes how often pairs disagree, but the difference in event proportions depends on \(n_{10}-n_{01}\). If the two discordant counts are equal, the sample difference is zero even if many pairs disagree.

Before moving from description to inference, check that the design and data support a paired analysis:

  • Identify what makes each A outcome belong with its corresponding B outcome.
  • State which outcome value represents the event and which condition is in the table rows.
  • Check that the four cell counts sum to the number of complete pairs.
  • Calculate the two marginal proportions and verify that their difference equals \((n_{10}-n_{01})/n\).
  • Recognize the pair, rather than each condition-specific record separately, as the observational unit for the paired difference.

Matched binary outcomes are therefore summarized both by their marginal event rates and by their joint table. The difference in proportions is determined by the balance between the two discordant cells, while the pair-level differences retain the structure needed for appropriate paired analysis.

Check Your Understanding

Use the two-by-two table and the paired interpretation to answer each question.

  1. In a matched-pair table, what do \(n_{10}\) and \(n_{01}\) count when the first subscript refers to A and the second to B?
  2. A study has 14 pairs with an A-only event and 9 with a B-only event, among 100 pairs. Calculate \(\hat{p}_A-\hat{p}_B\) using the discordant counts.
  3. Why do concordant pairs contribute zero to \(D_i=A_i-B_i\)?
  4. Can two matched-pair data sets have the same marginal event proportions but different numbers of discordant pairs? Explain briefly.
  5. Why is an independent-proportion standard error not automatically appropriate when each observation under A is matched to an observation under B?