PROBABILITY MODEL CHECKS

Checking supplied binary event probabilities for independence

Compare a conditional probability with its marginal to see whether a supplied joint model for two binary events is independent.

Independence in one equation

Two events A and B are independent when P(A and B) equals P(A) times P(B). Equivalent statements are that P(A given B) equals P(A) and that P(B given A) equals P(B). Learning that B occurred does not change the probability of A. This page takes marginals P(A) = 0.4 and P(B) = 0.3 and compares two supplied joint probabilities, 0.12 and 0.18, using the Conditional Probability Calculator, which computes probability = joint over b. One of the joint choices is consistent with independence and the other is not, even though the marginals are identical.

The independent joint

With P(A) = 0.4 and P(B) = 0.3, independence requires a joint of 0.4 times 0.3, which is 0.12. The Conditional Probability Calculator with joint 0.12 and b 0.3 returns 0.4. That equals P(A), so learning B did not move the probability of A. The reverse direction also works: 0.12 over 0.4 is 0.3, which equals P(B). Both conditional probabilities match their marginals, as independence requires. Checking one direction is enough, since the two are equivalent when the marginals are positive.

The dependent joint

Now supply a joint of 0.18 with the same marginals. The conditional probability is 0.18 over 0.3, which is 0.6, compared with P(A) of 0.4. Learning B raises the chance of A by half. The other direction gives 0.18 over 0.4, which is 0.45, compared with P(B) of 0.3. The model is internally consistent, since the joint does not exceed either marginal, but it describes positive dependence. A ratio of the joint to the product of marginals, 0.18 over 0.12, is 1.5, and values above 1 indicate positive association.

Negative dependence

A joint below the product describes negative dependence. With a joint of 0.06 and the same marginals, the conditional probability of A given B is 0.06 over 0.3, or 0.2, half of P(A). The union is 0.4 plus 0.3 minus 0.06, or 0.64, against 0.58 under independence and 0.52 under the 0.18 joint. The Event Union Probability Calculator makes this comparison direct. The joint can range from 0, since 0.4 plus 0.3 minus 1 is negative, up to 0.3, the smaller marginal, at which point B always implies A and the conditional probability is 1.

A second set of marginals

Take P(A) = 0.5 and P(B) = 0.2. Independence requires a joint of 0.1, and the conditional probability of A given B is 0.1 over 0.2, or 0.5. With a joint of 0.15, the conditional is 0.75, a clear departure from 0.5. The size of the departure depends on how much probability the joint carries relative to the product, not on whether the event probabilities themselves are large or small. For rare events the product is tiny, and even a small absolute change in the joint can be a large relative change.

Coherence conditions

Not every joint is allowed. It must lie between max(0, P(A) plus P(B) minus 1) and min(P(A), P(B)). For 0.4 and 0.3, that means between 0 and 0.3. A joint of 0.35 would exceed P(B) and implies a conditional probability above 1, which no model can have. Within the allowed range, all values are possible, and the independent value 0.12 is just one point in the interval. The calculator returns whatever ratio you supply, so a result above 1 is a signal that the inputs are inconsistent.

Exact model probabilities versus data

The page treats the probabilities as known model values, so the comparison is exact: either the conditional equals the marginal or it does not. Real data give estimated frequencies, which carry sampling uncertainty. A sample conditional of 0.43 against a marginal of 0.40 might be consistent with independence, and a statistical test such as a chi-square test is used to judge it. The calculator does not perform that inference. It only evaluates the probability model that you supply. For a sample of 1,000 cases, observed counts would be compared with the counts expected under independence, 1,000 times 0.4 times 0.3 or 120 cases with both events. An observed 121 or 125 would usually be unremarkable, while 180 would be far from 120. This is the logic behind tests of independence in contingency tables, covered in introductory statistics texts such as OpenStax Introductory Business Statistics 2e. The page stays one step earlier, with exact model probabilities, so that the later inferential step has a clear reference.

Conditioning needs a positive denominator

The conditional probability divides by P(B), so P(B) must be positive. If P(B) is zero, then the event B never occurs in the model and conditioning on it has no meaning. Very small P(B) values make the conditional probability sensitive to tiny changes in the joint, so rounding the joint to two decimals can distort it. For a P(B) of 0.01, a joint of 0.004 gives a conditional of 0.4, and a rounded 0.00 would give 0. Keep enough decimals in the joint to preserve at least two significant figures of the conditional. Likewise, P(A) and P(B) should come from the same population and the same time frame as the joint. A joint measured on one group and marginals measured on another can look like dependence or independence purely because the groups differ, and no division can repair that mismatch afterward.

Using the check

Whenever someone supplies two marginals and a joint, divide the joint by one marginal and compare the result with the other. If they match, the product rule holds. If not, the direction and size of the gap describe the association. This check should come before applying formulas that assume independence, such as multiplying probabilities along a chain or using the at-least-one complement for independent events. A worked case shows why it matters. With P(A) = 0.4 and P(B) = 0.3 and an actual joint of 0.18, treating the events as independent would put the union at 0.58 when the supplied model gives 0.52, an overstatement of 0.06. The gap is not large here, but it grows when the events are more strongly linked. The check also costs one division, which is far cheaper than discovering later that a chain of products rested on an assumption the model did not satisfy.

Reproduce the checks

Independent joint control

Open the Conditional Probability Calculator and enter:

Probability of A and B
0.12
Probability of B
0.3

Expected output:

Probability of A given B

0.4

The conditional equals the supplied A marginal.

Dependent joint control

Open the Conditional Probability Calculator and enter:

Probability of A and B
0.18
Probability of B
0.3

Expected output:

Probability of A given B

0.6

The marginals are unchanged but the conditional differs.

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