Why a Two-by-Two Table Has a Shortcut
When two variables each have only two possible outcomes, their joint distribution can be displayed in four cells. Testing independence by comparing conditional probabilities is valid, but it can require several calculations and may create undefined expressions when a conditioning event has probability zero. For a two-by-two table, the same question has a compact answer: compare the products along the two diagonals.
The shortcut is useful only when the cells are placed and labelled consistently. It is an exact equality for a probability table, not a statistical significance test for a sample. The method is aligned with the SOA Exam P (Probability) syllabus.
Why the Cross-Product Equality Works
Independence means that every joint cell probability equals the product of its row and column probabilities. For example, the upper-left cell must satisfy \(a=(a+b)(a+c)\): the row total is \(P(X=1)\), and the column total is \(P(Y=1)\). Expanding this requirement and using the fact that the four entries sum to 1 gives the diagonal-product condition.
The last equivalence uses \(1-a-b-c=d\). This proves that independence implies the cross-product equality. To see that the equality is also sufficient, suppose \(ad=bc\). The same expansion shows that \(a=(a+b)(a+c)\). The other three cells also factor into their row and column totals:
For example, the difference between \(b\) and its proposed factorization is \(b-(a+b)(b+d)=bc-ad=0\), where the table total is 1. The corresponding differences for \(c\) and \(d\) are also zero when \(ad=bc\). Thus all four joint probabilities factor as the products of their marginals, which is exactly independence.
This argument does not divide by a cell or by a marginal probability. Consequently, the equality remains valid when some cells are zero, including when one variable has an outcome with probability zero. That detail matters: a conditional probability given an impossible event is undefined, but the cross-product equality is still well-defined.
Using the Test
The practical test is short: first map the outcomes to the four cells, then multiply opposite corners. Equality means the table represents independent variables; inequality means it does not. Keep the layout fixed while doing the calculation, since changing the placement of a cell changes which products are diagonals.
Choose which outcome is 1 and which is 0 for each variable, and write the four joint probabilities in the table.
Confirm that all entries are nonnegative and sum to 1. For counts, confirm that the cells describe the same total population or sample.
Calculate \(ad\) and \(bc\) using the displayed layout.
Equal products indicate independence in this probability table; unequal products indicate dependence.
Worked Example: Testing a Complete Probability Table
In a hypothetical monitoring program, let \(X=1\) mean a sensor issued an alert and \(Y=1\) mean a reviewed reading was classified as unusual. The joint probability table is
Determine whether \(X\) and \(Y\) are independent. If they are, calculate the probability that at least one of \(X=1\) or \(Y=1\) occurs.
Method. Use the cross-product equality. The entries sum to \(0.2400+0.1600+0.3600+0.2400=1.0000\), so this is a probability table.
The diagonal products are \(ad=(0.2400)(0.2400)=0.0576\) and \(bc=(0.1600)(0.3600)=0.0576\). Since they are equal, the variables are independent.
For the second part, the row and column totals give \(P(X=1)=0.2400+0.1600=0.4000\) and \(P(Y=1)=0.2400+0.3600=0.6000\). The probability of at least one event is \(P(X=1)+P(Y=1)-P(X=1,Y=1)=0.4000+0.6000-0.2400=0.7600\).
Check. Independence predicts \(P(X=1,Y=1)=P(X=1)P(Y=1)=(0.4000)(0.6000)=0.2400\), matching the table. The answer is \(0.7600\). A common mistake this method avoids is comparing products of cells in the same row instead of opposite corners.
Worked Example: Finding a Missing Cell Under Independence
A hypothetical two-outcome screening study has a joint probability table with entries \(x\) and \(0.2000-x\) in the first row, and \(0.3000\) and \(0.5000\) in the second row. Find \(x\) if the two outcomes are independent, and check that the resulting table is valid.
Method. Place the entries in the stated order:
Independence requires equality of the diagonal products: \(x(0.5000)=(0.2000-x)(0.3000)\). Expanding the right-hand side gives \(0.5000x=0.0600-0.3000x\), so \(0.8000x=0.0600\), and therefore \(x=0.0750\).
The remaining first-row entry is \(0.2000-0.0750=0.1250\). All four entries are nonnegative and their sum is \(0.0750+0.1250+0.3000+0.5000=1.0000\). The diagonal products check: \((0.0750)(0.5000)=0.0375\) and \((0.1250)(0.3000)=0.0375\). Thus the valid independent table has \(x=0.0750\).
Check. The first-row total is \(0.2000\), and the first-column total is \(0.3750\). Their product is \(0.0750\), exactly the upper-left cell. The common trap is to solve the equation with the wrong diagonal pairing; the cell \(0.2000-x\) is opposite \(0.3000\), not \(0.5000\).
Worked Example: Applying the Equality to Counts
A hypothetical quality audit records whether each of 100 components received a secondary inspection (\(X=1\)) and whether it had a marked surface flaw (\(Y=1\)). The counts are:
Decide whether the empirical two-by-two table factors as an independent table. Then find the empirical probability that a component was inspected or had a flaw, counting components with both outcomes only once.
Method. For a count table with total \(N\), the cell probabilities are the counts divided by \(N\). The probability cross-products are therefore the count cross-products divided by \(N^2\). It is enough to compare the count products: \(ad=(36)(16)=576\) and \(bc=(24)(24)=576\). The equality holds, so the empirical probability table represents independence.
The marginal probabilities are \(P(X=1)=60/100=0.6000\), \(P(Y=1)=60/100=0.6000\), and \(P(X=1,Y=1)=36/100=0.3600\). Thus the probability of inspection or a flaw is \(0.6000+0.6000-0.3600=0.8400\).
Check. Under independence, the joint probability of both outcomes is \(0.6000(0.6000)=0.3600\), as observed. The answer is \(0.8400\). This conclusion describes the empirical table; it does not, by itself, establish a population-level relationship or provide a statistical significance assessment.
Common Traps and Interpretation
The equality is simple, but several errors can reverse the conclusion or overstate what has been established.
- Using the wrong cell pairing. With the displayed layout, compare \(ad\) with \(bc\). Do not compare cells in the same row or column.
- Ignoring the table layout. If outcomes are swapped or rows and columns are rearranged, redraw the table and identify its diagonals again. A consistent rearrangement preserves the test, but an inconsistent cell labelling does not.
- Treating approximate equality as exact. For exact probabilities, independence requires exact equality. If values are rounded, apparent small discrepancies may be caused by rounding; use unrounded values when available.
- Confusing an empirical table with a population model. For observed counts, the equality says the proportions in that particular table factor exactly. It is not a test statistic, does not quantify sampling uncertainty, and does not prove that the underlying population variables are independent.
- Assuming a zero cell automatically decides the result. If \(a=0\), for instance, independence requires \(bc=0\). A zero cell can therefore occur in an independent table or a dependent one; compare both products.
For a two-by-two probability table, this test is equivalent to checking the joint-marginal factorization of independence, but it avoids calculating conditional probabilities separately. It is especially convenient when the table is already given, when one cell is unknown, or when zero marginals make conditional-probability calculations inconvenient.
Check Your Understanding
For each problem, identify the diagonal products before deciding whether the two outcomes are independent.
- A hypothetical table, with rows \(X=1,0\) and columns \(Y=1,0\), has entries \(0.1200, 0.2800, 0.1800, 0.4200\), in row order. Test independence. (Answer: Independent; \(0.1200(0.4200)=0.2800(0.1800)=0.0504\).)
- A joint probability table has rows \(X=1,0\), columns \(Y=1,0\), and entries \(0.1600, 0.2400, 0.2400, 0.3600\), in row order. Check that its entries sum to 1 and test independence. (Answer: The entries sum to \(1.0000\), and the variables are independent because both diagonal products equal \(0.0576\).)
- The first row of a probability table is \(x, 0.4000-x\), and the second row is \(0.2000, 0.4000\), in column order \(Y=1,0\). Find \(x\) if the variables are independent, and verify that the table is valid. (Answer: \(x=0.1333\ldots=2/15\); the other first-row entry is \(4/15\), and the four entries are nonnegative and sum to 1.)
- A hypothetical count table has cells \(25,15\) in its first row and \(20,40\) in its second row. Decide whether the empirical table factors as an independent table. (Answer: No; \(25(40)=1000\), whereas \(15(20)=300\).)
- A probability table has rows \(X=1,0\), columns \(Y=1,0\), and entries \(0,0,0.4000,0.6000\), in row order. Does the cross-product equality hold, and are the variables independent? Explain the zero-row case. (Answer: Yes, the products are both 0; the variables are independent because \(P(X=1)=0\), so \(X\) is constant.)