Bayes' theorem reverses the direction of conditional probability. Given partition B_1, B_2, ..., B_n of the sample space:
P(B_i|A) = P(A|B_i) * P(B_i) / [sum over j: P(A|B_j) * P(B_j)]
The denominator is the Total Probability: P(A) = sum P(A|B_j) * P(B_j).
Step-by-step approach (BAIT):
- Branches: Identify the partitioning events (e.g., which box, which machine)
- Assign priors: Write P(B_i) for each branch
- Input likelihoods: Write P(A|B_i) — probability of observed event given each branch
- Total and compute: Calculate denominator then apply formula
Common JEE pattern: "Given the item is defective, what is the probability it came from machine A?" This is a classic reverse conditional — use Bayes'.