Unreliable Witness and Bayes' Theorem

Probability · Easy · Free problem

You have a pet cat that sometimes sneaks out of the house while you're at work. Every day, you call your neighbor to ask whether the cat left. Your neighbor always gives a definite yes or no -- but sometimes they lie (saying the cat left when it didn't, or saying it stayed when it actually left).

The probability that your cat actually leaves on any given day is $P(C) = 0.001$. The probability that your neighbor lies is $P(L) = 0.1$, independent of whether the cat actually left.

Your neighbor tells you the cat left. What is the probability that the cat actually left the house?

Hints

  1. Think about the base rate of the event -- how rare is it that the cat actually leaves? When the base rate is very low, even a fairly accurate test produces mostly false positives.
  2. Apply Bayes' theorem: $P(C \mid N) = P(N \mid C) \cdot P(C) / P(N)$. You will need the law of total probability to compute $P(N)$.
  3. Compute $P(N) = 0.9 \times 0.001 + 0.1 \times 0.999 = 0.1008$. The denominator is dominated by the false-positive term because $P(\neg C)$ is so large.

Worked Solution

How to Think About It: This is a classic base-rate problem -- the textbook example of why naive intuition about conditional probability fails. Your neighbor says the cat left. Most people's gut reaction is "well, the neighbor is right 90% of the time, so maybe 80-90% chance the cat left." That instinct is completely wrong here, and recognizing why is the whole point of the problem. The base rate of the cat leaving is tiny ($0.1\%$), so even a fairly reliable witness generates far more false positives than true positives.

Quick Estimate: Think about 10,000 days. The cat leaves on about $10$ of them. The neighbor lies on about $1{,}000$ days (10% of 10,000). On the 10 days the cat actually leaves, the neighbor correctly reports it about $9$ times. On the $9{,}990$ days the cat stays home, the neighbor falsely claims it left about $999$ times. So when the neighbor says "yes," there are roughly $9$ true alarms vs. $999$ false alarms. That gives $P(\text{cat left} \mid \text{neighbor says yes}) \approx 9 / (9 + 999) \approx 0.009$, or just under $1\%$.

Approach: Apply Bayes' theorem directly with the law of total probability to get the exact answer.

Formal Solution:

Define the events: - $C$ = cat left the house - $N$ = neighbor says the cat left

We need $P(C \mid N)$. By Bayes' theorem:

$$P(C \mid N) = \frac{P(N \mid C) \cdot P(C)}{P(N)}$$

The likelihood $P(N \mid C)$ is the probability the neighbor says yes when the cat actually left -- i.e., the neighbor tells the truth:

$$P(N \mid C) = 1 - P(L) = 0.9$$

The false-positive rate $P(N \mid \neg C)$ is the probability the neighbor says yes when the cat stayed -- i.e., the neighbor lies:

$$P(N \mid \neg C) = P(L) = 0.1$$

By the law of total probability:

$$P(N) = P(N \mid C) \cdot P(C) + P(N \mid \neg C) \cdot P(\neg C) = 0.9 \times 0.001 + 0.1 \times 0.999 = 0.0009 + 0.0999 = 0.1008$$

Plugging in:

$$P(C \mid N) = \frac{0.9 \times 0.001}{0.1008} = \frac{0.0009}{0.1008} \approx 0.00893$$

Answer: $P(C \mid N) \approx 0.0089$, or about $0.89\%$. Despite the neighbor's report, there is less than a $1\%$ chance your cat actually left.

Intuition

This problem is the poster child for the base-rate fallacy. When the event you're testing for is rare (the cat leaves only 0.1% of the time), even a fairly reliable signal (90% accuracy) is overwhelmed by false positives from the vastly larger pool of non-events. Out of every 1,000 "yes" reports from the neighbor, roughly 999 are lies and only about 9 are genuine. This is the same math behind why screening tests for rare diseases produce so many false positives -- a 95%-accurate test for a 1-in-10,000 disease still gives you a positive predictive value well under 1%.

In quant finance, this pattern shows up constantly. A trading signal that is "80% accurate" sounds great until you realize it fires on thousands of non-events and only a handful of real opportunities. The practical takeaway: always weight any signal by the prior probability of the event. If you skip that step -- if you just trust the signal at face value -- you will massively overestimate the probability of the rare event. Bayes' theorem is the antidote to that mistake.

Open the full interactive solver →