Definition
The union bound is an inequality of probability theory: the probability that at least one of several events happens is at most the sum of their separate probabilities. An event is a set of possible outcomes of a random experiment, such as ‘the die shows 1, 2 or 3’. The bound holds whether or not the events are independent. It equals the true probability when no two of the events can happen together, and exceeds it otherwise. It is also called Boole’s inequality.
The idea
A device fails a task if any of three things goes wrong: the radio link drops, with probability 0.01; a flash memory §6.6 write fails, with probability 0.002; or the supply voltage sags too low, with probability 0.001. The three are not independent, because a voltage sag can also make the write fail. Without knowing how they depend on each other, nobody can compute the exact chance that at least one happens. The union bound still gives a safe answer: at most .
Picture all possible outcomes as a region of area 1, and each event as a patch inside it whose area is the event’s probability. The probability that at least one event happens is the area covered by at least one patch. Adding the patch areas counts every overlap once for each patch that covers it, so the sum is never smaller than the covered area. Dependence between the events decides how much the patches overlap. It can never make the covered area larger than the sum.
How it works
Define the events in one model. Every event must be a set of outcomes of the same experiment, with probabilities from the same probability assignment. A failure chance per hour and a failure chance per message cannot be added until both refer to the same experiment, such as one day of operation.
Bound each event on its own. Give each event a probability, or an upper limit on it, each with its own justification: a measurement, a datasheet value or a proof.
Add the bounds. The sum is an upper limit on the probability that at least one event happens.
Cap at 1. No probability exceeds 1, so if the sum exceeds 1, the only useful statement left is ‘at most 1’.
The sum is never too small, for this reason. For two events and , the probability of or is : adding and counts the outcomes that lie in both events twice, and subtracting removes the second count. This exact formula is called inclusion–exclusion. The subtracted term is never negative, so dropping it can only make the result larger, which gives . For more events, add one event at a time and repeat the step.
The sum also has a meaning of its own. It is the expected number of the events that happen, where the expected value of a quantity is its probability-weighted average. That follows from linearity of expectation, the rule that the expected value of a sum is the sum of the expected values, which holds for dependent quantities too. The union bound therefore says that the probability that the count of events is at least 1 is at most the expected count.
The bound has two common uses. One limits the chance that at least one of many attempts by an attacker succeeds, as in the example below. The other is the Bonferroni correction for multiple comparisons §11.26: running each of statistical tests with a false-positive §1.22 probability (the chance of reporting an effect that is not there) of at most keeps the chance of at least one false positive among all tests at most .
Worked example
Roll one fair six-sided die. Let be ‘the die shows 1, 2 or 3’, with , and let be ‘the die shows 3 or 4’, with . The union bound gives . The faces in or are 1, 2, 3 and 4, so the true value is . The difference is the probability of face 3, which lies in both events and was counted twice.
Now add , ‘the die shows 4, 5 or 6’, with . The sum is , more than 1. Every face lies in at least one of the three events, so the true probability that , or happens is . The statement ‘at most ’ is true but says nothing beyond ‘at most 1’. Count how many of the three events each face satisfies: face 1 one, face 2 one, face 3 two ( and ), face 4 two ( and ), face 5 one, face 6 one. The average count is , exactly the sum of the three probabilities.
A security use: an attacker sends forged messages, and each one is accepted with probability at most . The probability that at least one is accepted is at most , however the attempts depend on each other. If the attempts were independent, each with probability exactly , the exact value would be , which agrees with the bound to six significant digits. When the probabilities are small, overlaps are rare, and the union bound is nearly exact.
Stated precisely
Let be the set of possible outcomes of a random experiment, and let be the rule that gives each event, a subset of , a probability between 0 and 1. Let be events, and write for the event that at least one of them happens. Then The same holds for an infinite sequence of events . Combined with the fact that no probability exceeds 1, the usable form is .
The bound needs two assumptions: all events are subsets of the same with probabilities from the same , and each , or the upper limit used in its place, is correct. It needs no independence. It is an equality exactly when for every pair , where is the event that both happen. A matching lower bound is : the union is at least as likely as its most likely event.
Proof: at every outcome in , the indicator of the union, which is 1 if lies in at least one event and 0 otherwise, is at most , the number of events that contain . Taking expected values of both sides gives the probability of the union on the left and, by linearity of expectation, on the right.
Limits and common mistakes
The bound can be very loose when the events overlap. Two copies of one event with probability 0.6 give a sum of , while the probability that at least one happens is 0.6.
The sum is an upper limit, not an estimate. A sum above 1 is not an error, only a true statement with no content. Reporting any sum as ‘the probability of failure’ overstates the risk whenever the events overlap.
The bound is only as good as its inputs. The theorem turns correct separate probabilities into a correct combined limit; it cannot justify a per-attempt forgery probability §5.13, a hardware failure rate or any other input. Each of those needs its own experiment or proof, and an input that is too small makes the combined limit too small.
Do not combine probabilities by multiplying unless the events are independent. The chance that none of the events happens equals the product of the separate chances that each does not happen only for independent events. The union bound avoids that assumption; in exchange it gives an upper limit instead of an exact value.
Questions answered
Why can the bound exceed one and still be mathematically valid?
The bound can exceed one and still be valid because it is an upper limit, not an estimate, and any number of at least 1 is a true upper limit on a probability. The union bound says that the probability that at least one of several events happens is at most the sum of their separate probabilities. The sum overshoots whenever events overlap, because an outcome that lies in several events is counted once for each of them. In fact the sum equals the expected number of events that happen, and a count can average more than 1.
For a fair die with the events ‘1, 2 or 3’, ‘3 or 4’ and ‘4, 5 or 6’, the sum is , while the probability that at least one happens is 1. The statement ‘at most ’ is true but says no more than ‘at most 1’, so the bound is then read as capped at 1. Validity needs no independence between the events. It needs only that all events belong to one probability model and that each separate probability is correct.
Related entries: Message authentication code (MAC) (§5.7), Tag truncation (§5.12), Conditional probability (§15.43), Forgery probability (§5.13), Multiple comparisons (§11.26).