PROBABILITY MODEL CHECKS

Checking a two-event probability table from its marginals

Two events split a probability space into four disjoint cells, and three numbers are enough to fill all of them. This guide rebuilds the table from P(A), P(B) and the overlap, then shows how to spot inputs that cannot be a valid table.

Four cells from three inputs

Take any two events A and B defined on the same experiment. Every outcome falls into exactly one of four groups: in A and in B, in A only, in B only, or in neither. Those four groups are disjoint and together cover everything, so their probabilities must add to 1. A table of four cells has four unknowns, and the rule that they sum to 1 removes one degree of freedom, leaving three numbers to supply. The natural choice is the two marginals, P(A) and P(B), plus the joint probability P(A∩B), the chance that both events occur. Once those three are fixed, the other three cells follow by subtraction. This guide uses the values 0.4, 0.3 and 0.12 and reconstructs the full table with the union and complement calculators plus the basic calculator.

The default table, cell by cell

The joint cell is given as 0.12. The A-only cell is the part of A outside B, so it is 0.4 minus 0.12, which is 0.28. The B-only cell is 0.3 minus 0.12, or 0.18. Adding the three cells that involve at least one event gives 0.12 + 0.28 + 0.18 = 0.58, which matches the union formula P(A) + P(B) − P(A∩B) = 0.4 + 0.3 − 0.12 = 0.58. The remaining cell is the complement of that union: 1 − 0.58 = 0.42. The four cells 0.12, 0.28, 0.18 and 0.42 sum to exactly 1. The cases below the article reproduce this with three tools: the union calculator returns 0.58, the complement calculator returns 0.42 for an input of 0.58, and the basic calculator returns 0.28 for 0.4 minus 0.12.

Why the overlap is subtracted once

The union formula subtracts the joint probability because adding P(A) and P(B) counts the overlap twice. Imagine a bag of 100 equally likely tickets. Forty tickets carry the label A and thirty carry the label B. If twelve carry both labels, then the two counts together add up to seventy, but those twelve tickets were counted once in each tally. The number of distinct tickets with at least one label is 70 minus 12, or 58, which is 0.58 of the bag. The probability version works the same way, with no need for the tickets to be real. Subtracting the overlap one time corrects the double count exactly, and subtracting it twice would undercount. This is the reasoning behind the single subtraction in the union calculator and the reason its output is checked against the cells.

A table with a different overlap

Change the inputs to P(A) = 0.5, P(B) = 0.4 and P(A∩B) = 0.1, which are illustrative values. The A-only cell is 0.5 − 0.1 = 0.4. The B-only cell is 0.4 − 0.1 = 0.3. The union is 0.5 + 0.4 − 0.1 = 0.8, and the cell for neither event is 1 − 0.8 = 0.2. The four cells 0.1, 0.4, 0.3 and 0.2 add to 1. Comparing this table with the first shows how the overlap shapes the rest. A bigger overlap leaves less probability in the single-event cells, shrinks the union and enlarges the neither cell. A smaller overlap does the reverse. Because every cell is a difference of numbers you entered, rounding in the inputs carries straight through, so keep the same number of decimal places throughout.

When the cells reveal independence

In the default table, P(A) times P(B) is 0.4 × 0.3 = 0.12, which equals the joint probability. That is the definition of independent events: the chance of both equals the product of the separate chances. Equivalently, the conditional probability of B given A, which is 0.12 divided by 0.4, equals 0.3, the same as P(B). Knowing that A occurred does not change the probability of B. The second table does not behave this way. There, 0.5 × 0.4 is 0.2, but the joint is 0.1, so the events are dependent, and P(B given A) is 0.1 / 0.5 = 0.2, lower than P(B) = 0.4. Independence is not a property the table forces. It shows up only when the joint happens to match the product, and the cells let you check it directly.

Cells that cannot be negative

A probability cannot be below zero, so any input set that makes a cell negative is not a valid table. Suppose P(A) = 0.4, P(B) = 0.3 and the proposed overlap is 0.35. Then the B-only cell is 0.3 − 0.35 = −0.05, which is impossible. The overlap cannot exceed either marginal, because the event A and B is contained in each of them. So the overlap must be no larger than the smaller of P(A) and P(B), here 0.3. The Event Union Probability Calculator rejects such an overlap with a message that it cannot exceed either event probability. This failure signals an inconsistent model, and the correct response is to revisit the inputs. Smoothing the overlap down to 0.3 without examining why the first value was too large hides a mistake in the underlying estimates, for example a joint count taken from a different population than the marginals.

A lower limit on the overlap

There is also a floor. If P(A) + P(B) exceeds 1, the two events must overlap, because there is not enough room for them to sit apart. With P(A) = 0.7 and P(B) = 0.6, the sum is 1.3, so the union cannot exceed 1, and the overlap must be at least 0.3. At that minimum the neither cell is zero. In general the joint probability must lie between the larger of 0 and P(A) + P(B) − 1, and the smaller of P(A) and P(B). These are often called the Fréchet bounds. For the default marginals the lower bound is 0 and the upper bound is 0.3, so a valid overlap lies anywhere from 0 to 0.3. The value 0.12 sits comfortably inside that range. Checking the interval before building a table saves time when inputs come from several sources.

Where marginals and overlaps come from

In practice the three inputs are usually estimated from counts. If a survey of 500 people finds 200 who own a bicycle, 150 who own a car and 60 who own both, then the estimates are 0.4, 0.3 and 0.12, the same numbers used in this guide. They are illustrative here and do not describe any real survey. The worksheet takes probabilities as given and does not estimate a table from observed data, and it does not attach uncertainty to them. Sampling error means that a table built from a sample is itself an estimate. A contingency table of counts, as presented in OpenStax Introductory Business Statistics, holds the same information in a grid, and dividing each count by the grand total turns the grid into the probabilities used here.

Reading the neither cell

The complement of the union is often the answer people actually want. It is the chance that none of the listed events happens, such as no defect of either type or no late delivery of either kind. In the default table that is 0.42. Because it is one minus the union, it responds to the overlap in a way that surprises some people: a larger overlap makes the union smaller, which makes the neither cell larger. Two overlapping risks together cover less ground than two separate ones, so the chance of avoiding both rises. With zero overlap in the default case, the union would be 0.7 and the neither cell 0.3. With the overlap at its maximum of 0.3, the union drops to 0.4 and the neither cell climbs to 0.6.

The same table as natural frequencies

Probabilities of 0.12, 0.28, 0.18 and 0.42 are easier to sanity-check as counts. Imagine 1,000 cases drawn to match the table. Then 120 fall in both events, 280 in A only, 180 in B only and 420 in neither, and 120 + 280 + 180 + 420 = 1,000. The marginals fall out of the same counts: A contains 120 + 280 = 400 cases, so P(A) = 0.4, and B contains 120 + 180 = 300, so P(B) = 0.3. Counts also make conditional questions concrete. Among the 400 cases in A, 120 are also in B, which is 30 percent. This is an illustrative thousand, not a record of real observations, and the worksheet applies the same arithmetic to the probabilities directly. If any count in your own version turns out negative or fractional, the inputs are not coherent.

Complements of the single events

The table also contains the complements of each event. P(not A) is 1 − 0.4 = 0.6, and P(not B) is 1 − 0.3 = 0.7, which the complement calculator returns for inputs of 0.4 and 0.3. The neither cell sits inside both complements. For these independent events it equals the product 0.6 × 0.7 = 0.42, which matches the value found from the union. For dependent events the product and the neither cell differ. In the second table the complements are 0.5 and 0.6, their product is 0.3, but the neither cell is 0.2, so the events are not independent. Another useful figure is the probability of exactly one event, the sum of the two single cells. In the default table it is 0.28 + 0.18 = 0.46, which also equals the union minus the overlap, 0.58 − 0.12.

What the worksheet does not do

The cases here treat the numbers as exact and abstract. They do not say how P(A), P(B) or the overlap were obtained, and they do not test whether the events are independent or related by a cause. They also do not extend to three events, which have eight cells and more constraints. Keep the three inputs next to the four cells in your notes, and recheck the sum to 1 after any edit. If the sum drifts from 1 by more than rounding, one of the cells has been entered or copied wrongly. A table that adds to exactly 1 and has no negative cell is internally consistent, which is the most this kind of check can establish.

Try your own values with the Two-event probability table calculator.

Reproduce the checks

Union reconstruction

Open the Event Union Probability Calculator and enter:

Probability of A
0.4
Probability of B
0.3
Probability of both
0.12

Expected output:

Probability A or B occurs

0.58

The overlap is subtracted once.

Neither-event cell

Open the Complement Probability Calculator and enter:

Event probability
0.58

Expected output:

Probability event does not occur

0.42

This is the complement of the full union.

A-only cell

Open the Basic calculator and enter:

First number
0.4
Operation
subtract
Second number
0.12

Expected output:

Result

0.28

The joint cell is removed from A’s marginal.

References and implementation scope

The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.

Sources

Related tasks