---
title: Independence and reliability
heading: When chances multiply, and how redundancy works
eyebrow: A11 · Lesson 6 · Independence and reliability
xp: 40
---

::: hook
A circuit board has 50 solder joints, each 99.9% likely to be good. Every one must hold for the board to work. Is the board 99.9% reliable? 95%? And if you put two 95%-reliable power supplies in parallel, so either can carry the load, how reliable is the pair? Both answers come from one idea: when events are independent, their chances multiply. The same idea also shows where redundancy stops helping, when one shared cause can take out both copies.
:::

::: play
- Components of reliability $r$ are combined $n$ at a time: in **series** (all must work) and in **parallel** (any one is enough).
- Raise $n$. Series systems get worse quickly; parallel ones get better quickly. How many 90% parts in parallel make a 99.9% system?
- The dashed line is a 2-of-3 voting system, which works if at least two of three parts do.
:::
:::

```sim plot
view: graph
x: r = 0.5..1
y: R = 0..1
slider: n = 1..10 step 1 = 3
slider: r0 = 0.5..0.999 step 0.001 = 0.9
plot: r^n | label: n in series
plot: 1 - (1 - r)^n | label: n in parallel | color: ch2
plot: 3*r^2 - 2*r^3 | label: 2 of 3 | dashed | color: ch3
marker: x = r0 | label: r
readout: series = r0^n | digits: 4
readout: parallel = 1 - (1 - r0)^n | digits: 5
readout: 2 of 3 = 3*r0^2 - 2*r0^3 | digits: 4
```

::: predict
## A board has 50 solder joints in series, each good with probability 0.999, independently. About what fraction of boards work?

- [ ] 99.9%
- [x] 95%
- [ ] 50%
- [ ] 5%

::: reveal
About 95%: $0.999^{50} = 0.951$. Each joint takes off about 0.1%, and fifty of them take off about 5%. Systems with many parts in series need each part to be far more reliable than the system has to be, which is why parts-per-million defect rates matter.
:::
:::

::: nameit
## Independence

Events $A$ and $B$ are **independent** if

$$P(A \cap B) = P(A)\,P(B)$$

Equivalently, $P(A \mid B) = P(A)$: learning $B$ tells you nothing about $A$. Several events are independent if this product rule holds for every group of them, so that $P(A \cap B \cap C) = P(A)P(B)P(C)$ and so on.

Independence is a property of the physical situation that you assume or check, not something the formulas give you. Bit errors from thermal noise are close to independent; bit errors from a lightning strike are not. Note the difference from mutually exclusive: those events can't happen together, which makes them strongly dependent.

## Reliability of systems

Let each part work with probability $r_i$, independently.

| Arrangement | Works if | Reliability |
|---|---|---|
| series | every part works | $R = r_1r_2\cdots r_n$ |
| parallel (redundant) | at least one part works | $R = 1 - (1 - r_1)(1 - r_2)\cdots(1 - r_n)$ |
| 2 of 3 (voting) | at least two of three work | $R = 3r^2 - 2r^3$ for equal parts |

For parallel systems, work with failure: the system fails only if every part fails, and those independent failure chances multiply. Larger systems combine these: reduce each parallel group to one equivalent part, then multiply along the series chain.

## Common causes

Redundancy only helps as far as the failures are independent. Two power supplies fed from the same AC line both fail when the line does. Model it as a series element: the shared cause in series with the redundant pair. A shared cause with reliability 0.99 caps the whole system at 0.99, however many supplies you add.
:::

::: example
## Two power supplies, each 95% reliable, share a load so either one can carry it. How reliable is the pair? And if both run from one AC feed that's 99% reliable?

::: solution
1. **The pair.** It fails only if both supplies fail:
   $$\begin{aligned} R &= 1 - 0.05^2 \\ &= 0.9975 \end{aligned}$$
2. **Add the shared feed in series.**
   $$\begin{aligned} R &= 0.99 \times 0.9975 \\ &= 0.9875 \end{aligned}$$
3. **What limits it now.** The feed now limits the system more than the supplies do, so a second feed would help more than a third supply.

**Answer:** the pair is 0.9975 reliable, and 0.9875 with the shared feed.
:::
:::

::: example
## A flight computer uses three channels with 2-of-3 voting, each channel 90% reliable. How does it compare with one channel, and with three in parallel?

::: solution
1. **2-of-3 voting.**
   $$3(0.9)^2 - 2(0.9)^3 = 0.972$$
2. **One channel.** Its reliability is 0.9.
3. **Three in parallel.**
   $$1 - 0.1^3 = 0.999$$
4. **Compare.** Voting is less reliable than plain redundancy, but it can outvote a channel that's working wrongly instead of failing silently, which plain parallel can't.

**Answer:** voting gives 0.972, against 0.9 for one channel and 0.999 for three in parallel.
:::
:::

::: example
## A board has 10 components in series, each 99% reliable. How reliable is the board, and how reliable must each part be for the board to reach 99%?

::: solution
1. **The board.** Every part must work, so the board's reliability is the product:
   $$0.99^{10} = 0.904$$
2. **Each part, for 99% overall.**
   $$0.99^{1/10} = 0.99900$$
   ten times fewer failures per part.
3. **With a thousand parts.** Each would need 99.999%: this is why complex systems need very reliable components, or redundancy.

**Answer:** the board is 0.904 reliable, and each part must reach 0.99900 for the board to reach 99%.
:::
:::

::: check
given: pa = 0.3 | 0.4; pb = 0.5 | 0.2
answer: pa*pb
tolerance: 0.5%

## $A$ and $B$ are independent, with $P(A)$ = {pa} and $P(B)$ = {pb}. What is $P(A \cap B)$?

::: right
Right. Independent chances multiply: {answer}.
:::

::: misses
- [pa + pb] That's not even a probability rule for "and"; multiply.
- [pa + pb - pa*pb] That's $P(A \cup B)$.
- [any] Not yet. $P(A)P(B)$.
:::
:::

::: check
given: n = 10 | 20 | 50; r = 0.99 | 0.995
answer: r^n
tolerance: 0.5%

## A system has {n} parts in series, each working with probability {r}, independently. How reliable is it?

::: right
Right. $r^n$ = {answer}.
:::

::: misses
- [r] Every part must work; the chances multiply.
- [any] Not yet. Multiply the parts' reliabilities.
:::
:::

::: check
given: n = 2 | 3; r = 0.9 | 0.95
answer: 1 - (1 - r)^n
tolerance: 0.1%

## {n} identical units, each {r} reliable, are in parallel: the system works if any one does. How reliable is it?

::: right
Right. It fails only if all fail: $1 - (1 - r)^n$ = {answer}.
:::

::: misses
- [r^n] That's series. In parallel, multiply the failure chances.
- [n*r] Probabilities can't exceed 1; work with failure.
- [any] Not yet. $1 - (1 - r)^n$.
:::
:::

::: check
given: r = 0.9 | 0.95 | 0.8
answer: 3*r^2 - 2*r^3
tolerance: 0.1%

## Three channels, each {r} reliable, vote 2 of 3. How reliable is the system?

::: right
Right. All three, or exactly two: $r^3 + 3r^2(1 - r) = 3r^2 - 2r^3$ = {answer}.
:::

::: misses
- [1 - (1 - r)^3] That's plain parallel, needing only one channel.
- [r^3] Two of three is enough.
- [any] Not yet. Add the chances of exactly two and of all three working.
:::
:::

::: check
given: r = 0.9 | 0.95; c = 0.99 | 0.995
answer: c*(1 - (1 - r)^2)
tolerance: 0.1%

## Two redundant pumps, each {r} reliable, run from one controller that is {c} reliable. How reliable is the system?

::: right
Right. The controller is in series with the redundant pair: {answer}.
:::

::: misses
- [1 - (1 - r)^2] Include the shared controller.
- [c*r^2] The pumps are redundant: only one has to work.
- [any] Not yet. Common cause in series with the parallel pair.
:::
:::

::: check
kind: choice

## $P(A)$ = 0.2, $P(B)$ = 0.5 and $P(A \cap B)$ = 0.1. Which is true?

- [x] $A$ and $B$ are independent
- [ ] $A$ and $B$ are mutually exclusive
- [ ] $P(A \mid B) = 0.5$
- [ ] Nothing can be said without more information

::: right
Right. $P(A)P(B) = 0.1 = P(A \cap B)$, so $P(A \mid B) = 0.2 = P(A)$.
:::

::: misses
- [2] They overlap with probability 0.1, so they aren't exclusive.
- [3] $P(A \mid B) = 0.1/0.5 = 0.2$.
- [4] The three numbers are enough to check the product rule.
:::
:::

::: check
kind: parts
given: r = 0.9 | 0.99; n = 5 | 20

## A system has {n} independent parts in series, each with reliability {r}.

::: part
answer: r^n
tolerance: 0.5%

### How reliable is it?

::: misses
- [n*r] Series systems multiply reliabilities.
- [any] $r^n$.
:::
:::

::: part
answer: 1 - (1 - r)^2
tolerance: 0.5%

### How reliable are two of the parts in parallel (either one suffices)?

::: misses
- [any] It fails only if both fail.
:::
:::
:::

::: check
kind: derivation
vars: r = 0.5..0.99

## Three channels each with reliability $r$ vote 2-of-3.

::: step
answer: r^3

### What is the chance all three work?
:::

::: step
answer: r^3 + 3*r^2*(1 - r)

### What is the chance at least two work?
:::

::: right
Right. $3r^2 - 2r^3$: better than one channel when $r > 0.5$, worse below.
:::
:::

::: explain
## Why does a parallel system's reliability multiply failure chances instead of reliabilities?

::: model
A parallel system works if any one part works, which is a complicated "or" with many overlapping cases. Its complement is simple: the system fails only if every part fails, an "and" of failure events. When the parts fail independently, the chance that all of them fail is the product of their failure chances, so $1 - R = (1 - r_1)(1 - r_2)\cdots$. Each extra part multiplies the failure chance by a small number, which is why redundancy works so well, as long as the failures really are independent.
:::
:::

::: practice

::: check
given: r1 = 0.95 | 0.98; r2 = 0.9 | 0.99
answer: r1*r2
tolerance: 0.5%

## Two parts in series have reliabilities {r1} and {r2}. How reliable is the pair?

::: misses
- [1 - (1 - r1)*(1 - r2)] That's parallel.
- [any] Multiply.
:::
:::

::: check
given: r1 = 0.8 | 0.9; r2 = 0.7 | 0.85
answer: 1 - (1 - r1)*(1 - r2)
tolerance: 0.1%

## Two parts in parallel have reliabilities {r1} and {r2}. How reliable is the pair?

::: misses
- [r1*r2] That's series.
- [any] $1 - (1 - r_1)(1 - r_2)$.
:::
:::

::: check
given: p = 0.1 | 0.2; n = 3 | 5
answer: p^n
tolerance: 0.5%

## A message is sent {n} times over independent paths, each losing it with probability {p}. What is the chance every copy is lost?

::: misses
- [n*p] Independent losses multiply.
- [any] $p^n$.
:::
:::
:::
