Step 1: Identify the partition Common setups: multiple bags, machines, factories, or coin types. These are the events.
Step 2: Assign prior probabilities P() Often given directly (e.g., "bag chosen with probability 1/3") or derived from proportions.
Step 3: Determine likelihoods P(A|) The probability of the observed event given each cause. E.g., P(red|Bag 1) = 3/7.
Step 4: Compute total probability P(A) P(A) = sum P(A|)*P(). This is the denominator.
Step 5: Apply Bayes' formula P(|A) = P(A|)*P(A)
Example template: Three machines produce 20%, 30%, 50% of items with defect rates 5%, 3%, 2%.
- P()=0.2, P()=0.3, P()=0.5
- P(D|)=0.05, P(D|)=0.03, P(D|)=0.02
- P(D) = 0.01+0.009+0.01 = 0.029
- P(|D) = 0.01/0.029 = 10/29
Common traps:
- Confusing P(A|B) with P(B|A) — direction matters
- Forgetting to use total probability for the denominator
- Not partitioning the sample space correctly