Definition D1
When P(B) > 0, define P(A|B) = P(A∩B) / P(B), called the probability of A given that B has occurred.
Proof.
(1)This definition is made only for B with P(B) > 0.convention
(2)A∩B ⊆ B, so P(A∩B) ≤ P(B)A2
(3)If P(B) = 0, then by (2) and P(A∩B) ≥ 0, P(A∩B) = 0(2), A3
(4)In that case both numerator and denominator are 0, so division fails to fix a single value. The proviso P(B) > 0 exists for this reason.(3), A1
∎
Definition D2
a ÷ b means the x satisfying b × x = a.
Proof.
a ÷ b has a value only when such an x is unique.convention
∎
Lemma L1
If P(B) > 0, then P(A∩B) = P(A|B) · P(B)
Proof.
(1)P(A|B) = P(A∩B) / P(B)assumption, D1
(2)P(A∩B) / P(B) is the x with P(B)·x = P(A∩B).D2
(3)Since P(B) ≠ 0, such an x is unique, and that x is P(A|B).(1), (2), A1, A10
(4)P(B) · P(A|B) = P(A∩B)(2), (3)
(5)P(A∩B) = P(A|B) · P(B)(4), A9, E
∎
Lemma L2
P(A) + P(Aᶜ) = 1
Proof.
(1)Ω = A ∪ Aᶜ and the two events are disjoint.A6
(2)P(Ω) = P(A) + P(Aᶜ)(1), A5
(3)P(Ω) = 1A7
(4)P(A) + P(Aᶜ) = 1(2), (3), E
∎
Lemma L3
If P(A) > 0, then P(B|A) + P(Bᶜ|A) = 1
Proof.
(1)A = (A∩B) ∪ (A∩Bᶜ) and the two events are disjoint.A8
(2)P(A) = P(A∩B) + P(A∩Bᶜ)(1), A5
(3)P(B|A) = P(B∩A)/P(A), P(Bᶜ|A) = P(Bᶜ∩A)/P(A)assumption, D1
(4)P(B∩A) = P(A∩B) and P(Bᶜ∩A) = P(A∩Bᶜ)A4
(5)P(B|A) + P(Bᶜ|A) = [P(A∩B) + P(A∩Bᶜ)] / P(A)(3), (4), A11
(6) = P(A) / P(A)(5), (2)
(7)Since P(A) ≠ 0, the only x with P(A)·x = P(A) is 1. That is, P(A)/P(A) = 1D2, A1, A10
(8)P(B|A) + P(Bᶜ|A) = 1(6), (7)
∎
Theorem T1
If P(A) > 0 and P(B) > 0, then P(A|B) = P(B|A) · P(A) / P(B)
Proof.
(1)P(A∩B) = P(A|B) · P(B)assumption, L1
(2)P(B∩A) = P(B|A) · P(A)assumption, L1
(3)A ∩ B = B ∩ AA4
(4)P(A|B) · P(B) = P(B|A) · P(A)(1), (2), (3), E
(5)Since P(B) ≠ 0, the x with P(B)·x = P(B|A)P(A) is unique, and that x is P(A|B).(4), A1, A9, A10
(6)P(A|B) = P(B|A) · P(A) / P(B)(5), D2
∎
Corollary C1
If 0 < P(A) < 1 and P(B) > 0, then P(A|B) = P(B|A)P(A) / [ P(B|A)P(A) + P(B|Aᶜ)P(Aᶜ) ]
Proof.
(1)P(A) + P(Aᶜ) = 1 and P(A) < 1, so P(Aᶜ) > 0assumption, L2, N
(2)B = (B∩A) ∪ (B∩Aᶜ) and the two events are disjoint.A8
(3)P(B) = P(B∩A) + P(B∩Aᶜ)(2), A5
(4)P(B∩A) = P(B|A)P(A), P(B∩Aᶜ) = P(B|Aᶜ)P(Aᶜ)assumption, (1), L1
(5)P(B) = P(B|A)P(A) + P(B|Aᶜ)P(Aᶜ)(3), (4)
(6)P(A|B) = P(B|A)P(A) / [ P(B|A)P(A) + P(B|Aᶜ)P(Aᶜ) ](5), T1, E
(7)The numerator is the same as in T1. What changed is the denominator, and the denominator is the sum over every path by which a positive result arises.(5), (6)
∎
Corollary C2
If P(A) = 0.001, P(B|A) = 0.99, P(Bᶜ|Aᶜ) = 0.99, then P(A|B) = 11/122, which is about 0.09.
Proof.
(1)Let A be the event of having the disease and B the event of a positive test.assumption
(2)P(Aᶜ) = 1 − 0.001 = 0.999assumption, L2, N
(3)P(A) > 0 and P(Aᶜ) > 0 and P(A) < 1.assumption, (2)
(4)P(B|Aᶜ) + P(Bᶜ|Aᶜ) = 1, so P(B|Aᶜ) = 1 − 0.99 = 0.01(3), L3, N
(5)P(B) = 0.99 × 0.001 + 0.01 × 0.999 = 0.00099 + 0.00999 = 0.01098assumption, (2), (4), C1, N
(6)P(B) = 0.01098 > 0(5), N
(7)P(A|B) = 0.00099 / 0.01098 = 99/1098 = 11/122(5), (6), C1, N
(8)11/122 = 0.0901…, so P(A|B) is about 0.09.(7), N
(9)For the same test with P(A) changed to 0.1, P(B) = 0.099 + 0.009 = 0.108 and P(A|B) = 0.099/0.108 = 11/12, about 0.92.C1, N
(10)In the two computations P(B|A) and P(B|Aᶜ) are the same. The only thing that changed is P(A).(8), (9)
∎