PROJECTENGRAM

BAYES'S RULES

Tags: #◇Computer Science #◇STT101A #◇Conceptual #◇Bayes's Rules


◇Overview

Bayes' Rule (Bayes' Theorem) inverts conditional probabilities, allowing us to compute the posterior probability P(Bk∣A)P(B_k \mid A) of an unobservable cause or hypothesis BkB_k given observed evidence AA, using the prior probabilities P(Bi)P(B_i) and likelihoods P(A∣Bi)P(A \mid B_i) across a partition of the sample space.

◇Key Definitions

  • Two-Hypothesis Form: P(B∣A)=P(A∣B)P(B)P(A∣B)P(B)+P(A∣Bc)P(Bc)P(B \mid A) = \frac{P(A \mid B)P(B)}{P(A \mid B)P(B) + P(A \mid B^c)P(B^c)}.
  • General Partition Form: For a partition {B1,B2,…,Bn}\{B_1, B_2, \dots, B_n\} of SS:
    P(Bk∣A)=P(A∣Bk)P(Bk)∑i=1nP(A∣Bi)P(Bi)P(B_k \mid A) = \frac{P(A \mid B_k)P(B_k)}{\sum_{i=1}^n P(A \mid B_i)P(B_i)}
  • Posterior Odds Form: P(B∣A)P(Bc∣A)=P(A∣B)P(A∣Bc)⋅P(B)P(Bc)=Likelihood Ratio×Prior Odds\frac{P(B \mid A)}{P(B^c \mid A)} = \frac{P(A \mid B)}{P(A \mid B^c)} \cdot \frac{P(B)}{P(B^c)} = \text{Likelihood Ratio} \times \text{Prior Odds}.

◇Worked Example

Problem: Factory machines M1M_1 and M2M_2 produce 60%60\% and 40%40\% of chips, respectively. Defective rates are P(D∣M1)=0.02P(D \mid M_1) = 0.02 and P(D∣M2)=0.05P(D \mid M_2) = 0.05. If a randomly selected chip is defective (DD), what is the probability it came from M2M_2?

Solution:
P(M2∣D)=P(D∣M2)P(M2)P(D∣M1)P(M1)+P(D∣M2)P(M2)=(0.05)(0.40)(0.02)(0.60)+(0.05)(0.40)=0.0200.012+0.020=0.0200.032=0.625P(M_2 \mid D) = \frac{P(D \mid M_2)P(M_2)}{P(D \mid M_1)P(M_1) + P(D \mid M_2)P(M_2)} = \frac{(0.05)(0.40)}{(0.02)(0.60) + (0.05)(0.40)} = \frac{0.020}{0.012 + 0.020} = \frac{0.020}{0.032} = 0.625

◇References & Navigation

CONFIRMATION // 理解度の確認

ACTIVE RECALL VERIFICATION

Select an answer to verify conceptual comprehension and reveal the technical rationale.

Q1

Which identity directly relates P(B∣A)P(B \mid A) and P(A∣B)P(A \mid B) when P(A)>0P(A) > 0 and P(B)>0P(B) > 0?

Q2

Using the worked example (P(M1)=0.60,P(M2)=0.40,P(D∣M1)=0.02,P(D∣M2)=0.05P(M_1)=0.60, P(M_2)=0.40, P(D\mid M_1)=0.02, P(D\mid M_2)=0.05), what is the posterior probability P(M1∣D)P(M_1 \mid D) that a defective chip came from Machine 1?

Q3

Why must the sum of posterior probabilities ∑i=1nP(Bi∣A)\sum_{i=1}^n P(B_i \mid A) over a partition {B1,…,Bn}\{B_1, \dots, B_n\} always equal 11?

Q4

Suppose a diagnostic test has sensitivity P(+∣D)=0.90P(+ \mid D) = 0.90 and false-positive rate P(+∣Dc)=0.10P(+ \mid D^c) = 0.10. If disease prevalence is P(D)=0.01P(D) = 0.01, what is the posterior odds P(D∣+)P(Dc∣+)\frac{P(D \mid +)}{P(D^c \mid +)}?

Q5

Which common error confuses P(A∣B)P(A \mid B) with P(B∣A)P(B \mid A) in legal and statistical reasoning?

Bayes's Rules | PROJECT ENGRAM