Bayes' Theorem
Update belief with evidence · 베이즈 정리
1. What Is Bayes’ Theorem?
Bayes’ theorem flips a conditional probability: it turns P(B | A), which you often know, into P(A | B), which is usually what you actually want. It is the mathematical engine for updating belief as evidence arrives.
The classic use is diagnosis: a test tells you P(positive | disease), but a patient needs P(disease | positive). Those two are very different numbers, and Bayes’ theorem is the bridge between them.
베이즈 정리는 조건부 확률을 뒤집습니다 — 보통 알고 있는 P(B | A)를 정작 원하는 P(A | B)로 바꿉니다. 증거가 들어올 때 신념을 갱신하는 수학적 엔진입니다. 대표적 쓰임은 진단입니다: 검사는 P(양성 | 질병)을 알려주지만 환자에게 필요한 것은 P(질병 | 양성)입니다. 이 둘은 매우 다른 값이며, 베이즈 정리가 그 다리를 놓습니다.
2. The Formula & Its Pieces
The theorem states P(A | B) = P(B | A) · P(A) / P(B). The denominator usually expands via the law of total probability: P(B) = P(B | A)·P(A) + P(B | Aᶜ)·P(Aᶜ).
The names matter:
- P(A) — the prior, your belief before the evidence.
- P(B | A) — the likelihood, how probable the evidence is if A holds.
- P(A | B) — the posterior, your updated belief.
정리는 P(A | B) = P(B | A) · P(A) / P(B)입니다. 분모는 전확률 법칙으로 P(B) = P(B | A)·P(A) + P(B | Aᶜ)·P(Aᶜ)로 펼칩니다. 용어: P(A)는 증거 이전의 믿음인 사전확률(prior), P(B | A)는 A일 때 증거의 확률인 가능도(likelihood), P(A | B)는 갱신된 믿음인 사후확률(posterior)입니다.
3. The Medical-Test Example
A disease has prevalence 1%. A test is 95% accurate both ways: P(positive | disease) = 0.95 and P(negative | no disease) = 0.95 (so P(positive | no disease) = 0.05). You test positive — what is P(disease | positive)?
- Prior: P(A) = 0.01, so P(Aᶜ) = 0.99.
- Evidence: P(B) = 0.95·0.01 + 0.05·0.99 = 0.0095 + 0.0495 = 0.059.
- Posterior: P(A | B) = (0.95 · 0.01) / 0.059 = 0.0095 / 0.059 ≈ 0.161.
So despite a positive result from a 95%-accurate test, the chance of actually having the disease is only about 16%.
유병률 1%인 질병, 양방향 정확도 95%인 검사(P(양성 | 질병) = 0.95, P(음성 | 비질병) = 0.95 → P(양성 | 비질병) = 0.05)에서 양성이 나왔을 때 P(질병 | 양성)? 사전 P(A) = 0.01, 전확률 P(B) = 0.95·0.01 + 0.05·0.99 = 0.059, 사후 P(A | B) = 0.0095/0.059 ≈ 0.161. 95% 정확한 검사의 양성에도 실제 질병 확률은 약 16%에 불과합니다.
4. Why the Base Rate Dominates
The 16% surprises people because they anchor on the 95% accuracy and ignore the base rate. Out of 10,000 people, only ~100 have the disease (95 test positive); of the 9,900 healthy, 5% — about 495 — also test positive. So positives are 95 true vs 495 false: 95 / (95 + 495) ≈ 16%.
When the prior is extreme, even an accurate test cannot overcome it in one shot — which is why screening uses confirmatory follow-ups. Ignoring this is the base-rate fallacy.
16%가 놀라운 이유는 95% 정확도에 고정되어 기저율을 무시하기 때문입니다. 10,000명 중 질병자는 약 100명(95명 양성), 건강한 9,900명 중 5%인 약 495명도 양성입니다. 따라서 양성자는 진짜 95명 대 가짜 495명 → 95/(95+495) ≈ 16%. 사전확률이 극단적이면 정확한 검사도 한 번에 이를 뒤집지 못해 검진은 확인 검사를 둡니다. 이를 무시하는 것이 기저율 오류입니다.
5. Frequently Asked Questions
What is Bayes’ theorem? P(A | B) = P(B | A) · P(A) / P(B) — it converts the conditional you know into the one you want by weighting it with the prior.
Why is the disease probability only 16% after a positive test? Because the disease is rare (1% prior); the many false positives from the 99% healthy population outnumber the true positives.
What is the base-rate fallacy? Judging P(disease | positive) from the test’s accuracy alone while ignoring how rare the disease is — the prior.
베이즈 정리는 P(A | B) = P(B | A) · P(A) / P(B)로, 아는 조건부 확률을 사전확률로 가중해 원하는 조건부 확률로 바꿉니다. 양성 후 질병 확률이 16%인 이유는 질병이 드물어(사전 1%) 건강한 다수에서 나오는 거짓 양성이 진짜 양성보다 많기 때문입니다. 기저율 오류는 사전확률을 무시한 채 검사 정확도만으로 P(질병 | 양성)을 판단하는 실수입니다.
Ready to practice? Drill Bayes’ theorem and more on C:Prob, or review the full probability reference and related pages: conditional probability, basic probability, and expected value.
실전 연습은 C:Prob에서, 전체 개념은 확률 레퍼런스와 조건부 확률, 기본 확률, 기댓값 문서에서 이어집니다.