The prosecutor’s fallacy reverses conditional probability: the probability of evidence given a hypothesis, P(E|H), is not the probability of the hypothesis given the evidence, P(H|E). Avoiding this error requires considering prior probabilities, competing explanations, and the observed evidence. section 2.6
Figure 2.5 The prosecutor's fallacy arises when the probability of observing evidence if someone is innocent is confused with the probability that someone is innocent after the evidence has been observed. The outer region represents all individuals who match the evidence. The shaded region identifies those who are actually guilty, while the remaining area represents innocent individuals who also match the evidence (false positives). When the underlying event is rare, most matches may still be false positives. Bayesian inference avoids this mistake by combining the observed evidence with the prior likelihood of the event before drawing conclusions.

The figure shows how a rare event can produce many false positives: most people matching the evidence may still be innocent. section 2.6
