PROBABILITY MODEL CHECKS

Checking a signal probability across several disjoint categories

The overall chance of a signal across several disjoint categories is a weighted average of the category-specific signal probabilities, with the category probabilities as the weights.

The law of total probability in plain arithmetic

If every case belongs to exactly one of several categories, the probability of a signal is found by splitting it by category. Within each category, the signal occurs with its own conditional probability. Multiplying that conditional probability by the share of cases in the category gives that category contribution to the overall signal rate, and adding the contributions gives the total. With three categories that hold 20, 30 and 50 percent of cases and signal likelihoods of 0.1, 0.4 and 0.8, the contributions are 0.02, 0.12 and 0.40, and the total is 0.54. This page walks through that sum and the common ways it goes wrong.

Using the weighted average calculator

The sum of products divided by the sum of weights is a weighted average, so the weighted average calculator applies directly. Enter the likelihoods 0.1, 0.4 and 0.8 as the values and the category probabilities 0.2, 0.3 and 0.5 as the weights. The result is 0.54 and the total weight is 1. Because the weights already sum to 1, the division by the sum changes nothing. The calculator would also accept the weights as counts, for example 20, 30 and 50, and return the same 0.54 with a total weight of 100. In both forms the arithmetic is Σ(x × w) / Σw.

Checking by adding the contributions

The basic calculator verifies each stage. The first two contributions, 0.02 and 0.12, add to 0.14. Adding the third, 0.4, gives 0.54. Each contribution is a joint probability: the chance of being in that category and having the signal. For the third category, that is 0.5 × 0.8 = 0.4. Writing out the contributions this way shows which category drives the total. Here the third category supplies 0.4 of the 0.54, about 74 percent of the signals, even though it holds half of the cases. A category with both a large share and a high likelihood dominates the sum. A category with a high likelihood but a tiny share, say 0.02 of cases with likelihood 0.9, adds only 0.018, and a category with a large share but a very low likelihood adds little as well. Looking at contributions rather than at likelihoods alone tells you where the total comes from, which is often the question a reader asks next.

The unweighted mean gives a different answer

A tempting shortcut is to average the three likelihoods directly: (0.1 + 0.4 + 0.8) / 3 = 0.4333. That number would be correct only if the three categories held equal shares of one third each. With the shares 0.2, 0.3 and 0.5 the correct total is 0.54, which is noticeably higher because the high-likelihood category is also the largest. Reversing the shares to 0.5, 0.3 and 0.2 gives 0.05 + 0.12 + 0.16 = 0.33, lower than the unweighted mean. The weights decide whether the total lands above or below the plain average, so they are not a detail to skip.

Reading the result back as a posterior

The total 0.54 is also the evidence in a Bayes calculation across three categories. Given a signal, the probability that the case came from the third category is its contribution divided by the total: 0.4 / 0.54 ≈ 0.7407. For the second category it is 0.12 / 0.54 ≈ 0.2222, and for the first it is 0.02 / 0.54 ≈ 0.0370. The three posteriors add to 1, as they must. This link explains why the total probability is the first step in any multi-category Bayes problem, and why a mistake in the weighting spreads into every posterior.

Making sure the categories form a partition

The method requires that the categories be disjoint, so no case is counted twice, and exhaustive, so no case is left out. The weights must then sum to 1 if they are probabilities. When they are given as counts or percentages, normalize by dividing by their total, which a weighted average does automatically. If the weights sum to less than 1, some cases are missing from the model, and the result understates the signal probability. If they sum to more than 1, categories overlap, and the cases in the overlap are counted twice. Check the sum before trusting the total.

Examples with more or fewer categories

Two categories reduce the method to the familiar form P(signal) = P(A) × P(signal | A) + P(not A) × P(signal | not A), the same expression as the evidence in the previous guide. Five categories use five terms. The calculation does not change in kind. With weights 0.1, 0.2, 0.2, 0.2 and 0.3 and likelihoods 0.9, 0.5, 0.5, 0.1 and 0.05, the contributions are 0.09, 0.10, 0.10, 0.02 and 0.015, giving 0.325. The more categories there are, the more useful it becomes to write the contributions in a column so that an input in the wrong row stands out. A related check is to compute the total twice, once by summing contributions and once with the weighted average calculator, and compare. Agreement to every shown digit confirms that the values and weights were paired in the same order. A reversed weight list, for example 0.5, 0.3, 0.2 against the original value order, gives 0.33 instead of 0.54, which is a visible disagreement worth investigating before going further.

Where the weights come from

The category probabilities in this page are supplied. In practice they might come from a population table, a sampling plan or a prior assumption. Each source has its own uncertainty, and a total built from estimated weights inherits it. The likelihoods likewise have to be conditional on the category, not on the signal. A frequent mix-up is entering the share of signals that come from each category, which is a posterior, in place of the signal rate within each category. Using posteriors where likelihoods belong gives a total that is plausible-looking and wrong. Here the posteriors 0.037, 0.222 and 0.741 sum to 1, while the likelihoods 0.1, 0.4 and 0.8 have no such constraint, which offers a quick test: a column that sums to 1 across categories is probably posteriors or shares, and a column that does not is probably likelihoods. Confirm which column you hold before filling the value field of the calculator.

What the weighted total leaves out

The calculation assumes the supplied categories and probabilities are a valid model. It does not establish the categories, infer their probabilities from data, or account for uncertainty in the inputs. The OpenStax introductory business statistics text, in its section on contingency tables and probability trees, shows how the same totals arise from tables of counts. The arithmetic here is a model check and not a claim about any real population.

Reproduce the checks

Probability-weighted likelihood

Open the Weighted average calculator and enter:

Values
0.1,0.4,0.8
Weights
0.2,0.3,0.5

Expected output:

Weighted average

0.54

Total weight

1

The weights already sum to one.

First two contributions

Open the Basic calculator and enter:

First number
0.02
Operation
add
Second number
0.12

Expected output:

Result

0.14

Both contributions use category probability times likelihood.

Full signal probability

Open the Basic calculator and enter:

First number
0.14
Operation
add
Second number
0.4

Expected output:

Result

0.54

The final disjoint contribution completes the total.

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