PROBABILITY MODEL CHECKS

Checking independence before and after pooling categories

Two events can look unrelated within each category and still be dependent once the categories are pooled, and the joint probability shows it.

Pooling hides a shared cause

Suppose two equally likely categories drive two binary events. In the first category neither event occurs, and in the second category both occur. Each event then happens exactly when the second category does, so each has marginal probability 0.5, and the two events always occur together. Looking only at the marginals, 0.5 and 0.5, would suggest nothing special. The joint probability, however, is 0.5, not 0.25. The shared category links the events. This page uses the Event Union Probability Calculator and the Independent Events Calculator to show how the union and the independence-based numbers differ.

The union under the supplied model

The Event Union Probability Calculator computes union = a plus b minus joint. With a = 0.5, b = 0.5 and joint = 0.5, the union is 0.5. That matches the model: either both events occur or neither does, and the probability that at least one occurs is the probability of the second category, 0.5. The union equals each marginal because the events coincide. The overlap term removes the double counting of the cases where both occur, and here all cases overlap. If you forgot to subtract the joint, the sum a plus b would be 1.0, which would claim certainty that at least one event happens, when in the model there is a 0.5 chance that neither does. The union formula is a good test of whether you have read the joint correctly. When the events are mutually exclusive the joint is zero and the union is the plain sum. When one event contains the other, the union equals the larger marginal, and the model here is the extreme case of two events that are the same set.

What independence would predict

If the same two marginals were assumed independent, the joint probability would be 0.5 times 0.5, or 0.25, and the union would be 0.5 plus 0.5 minus 0.25, which is 0.75. The Independent Events Calculator with probabilities 0.5 and 0.5 returns an all-occur probability of 0.25 and an at-least-one probability of 0.75. Compared with the true values of 0.5 and 0.5, the independence assumption understates the chance that both occur by half, and overstates the chance that at least one occurs by 50 percent. The same marginals, two different joint models, two different answers.

A softer version with a mixed category model

The dependence does not need to be deterministic. Suppose, as an illustration, two equally likely categories, and within each category the two events are independent. In category one each event has probability 0.2, and in category two each has probability 0.8. Each marginal is 0.5 times 0.2 plus 0.5 times 0.8, which is 0.5. The joint is 0.5 times 0.04 plus 0.5 times 0.64, which is 0.34. Independence would give 0.25. The union is 0.5 plus 0.5 minus 0.34, or 0.66, against 0.75 under independence. The pooled events are positively dependent although each category treats them independently.

Reading the dependence with a conditional probability

A direct way to see dependence is to compare a conditional probability with its marginal. In the mixed example, the Conditional Probability Calculator with joint 0.34 and b 0.5 returns P(A given B) equal to 0.68. The marginal P(A) is 0.5. Knowing that B occurred raises the probability of A from 0.5 to 0.68, so the events are not independent. Under independence the conditional would equal the marginal. The larger the gap, the stronger the dependence, and a gap of zero means the supplied joint is consistent with independence.

Simpson-style mixing in general

Pooling can change relationships in other ways too. Two groups can each show no association between two variables, yet the pooled data show a clear association because the groups differ in how often both variables are present. The reverse also occurs: an association within groups can vanish or flip in the pool. Textbook treatments in contingency tables and probability trees, such as the OpenStax introductory business statistics text, introduce the tables and trees that make these joint structures visible. A tree that splits on the shared category first makes the mixing explicit.

Why marginal probabilities are not enough

A joint distribution of two binary events has three free numbers, but two marginals give only two. The missing piece is the joint probability, which may range from max(0, a plus b minus 1) to min(a, b). For marginals of 0.5 and 0.5, the joint can be anything from 0 to 0.5, giving unions from 0.5 to 1. The independent value of 0.25 sits in the middle of that range, and the example uses the top end. You cannot compute the union, conditional probabilities or at-least-one chances from the marginals alone without stating how the events relate.

Using the check

When you apply an independence formula to real events, ask whether a shared factor could affect both. Two machines fed from one supplier, two symptoms from one condition, or two survey answers from one respondent type are all candidates. If a shared factor exists, either model it explicitly with category probabilities and within-category probabilities, or measure the joint frequency directly. The product of marginals is a hypothesis to test, not a default. One way to build the full model is with a probability tree: the first branch splits on the category, the second branch gives each event's chance within that category, and the joint is found by multiplying along branches and adding across categories. For the mixed example the two category branches contribute 0.5 times 0.04 and 0.5 times 0.64, which total 0.34, and writing the tree out makes it clear where the extra 0.09 above the independent 0.25 comes from.

Limits

The example defines the categories and outcomes explicitly. It does not claim that a hidden category explains a real dataset, and it does not establish any causal mechanism. The numbers 0.2 and 0.8 are illustrative. A real analysis would estimate the category structure from data and carry its uncertainty, which this calculator does not do. Dependence through a shared category also does not imply that one event causes the other. In the deterministic example, neither event produces the other. Both are consequences of the category. A causal claim needs design features such as randomization or a carefully argued model, and a probability calculation on supplied numbers cannot supply them.

Reproduce the checks

Supplied pooled joint model

Open the Event Union Probability Calculator and enter:

Probability of A
0.5
Probability of B
0.5
Probability of both
0.5

Expected output:

Probability A or B occurs

0.5

The two pooled events always occur together.

Independence comparison

Open the Independent Events Calculator and enter:

Probabilities
0.5,0.5

Expected output:

All

0.25

At least one

0.75

This different model imposes independence.

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