Skip to content

Bayes' theorem in business

Revise a prior probability with Bayes' theorem to find the chance that a flagged transaction is really fraud, from a base rate and a screen's hit rate and false alarm rate.

It opens on

Fraud is 2% of transactions, and the screen flags 90% of frauds and 5% of honest transactions. A transaction is flagged: is it more likely fraud or more likely honest?

Why it matters

Fraud screens, quality tests and credit checks all raise alarms, and a manager who ignores how rare the underlying problem is will chase the wrong cases and misjudge what an alarm means.

Good to know first

  • conditional probability

Step by step

  1. Counting 10,000 transactions

    Find P(fraud | flagged) by building a table of 10,000 transactions from the base rate, hit rate and false alarm rate.

    Given a flagged transaction, the chance it is fraud is P(fraud | flagged) = 180 / 670 = 0.269, about 27%.

    P(fraud | flagged) = 180 / 670 = 0.269

    A common mix-up

    A screen that catches 90% of fraud means 90% of flagged transactions are fraud.

    In fact: The hit rate is P(flagged | fraud), but we want P(fraud | flagged), which also depends on the base rate and false alarms.

  2. Bayes' theorem and the tree

    Compute P(A | B) with Bayes' theorem from the prior and the two conditional chances.

    The path fraud then flagged has probability 0.02 × 0.90 = 0.018.

    0.02 × 0.90 = 0.018

    A common mix-up

    P(A | B) = P(B | A).

    In fact: The two differ unless P(A) = P(B), and Bayes' theorem converts one into the other with the prior.

  3. Why the base rate matters

    Show how the posterior probability changes with the base rate, and update it again with a second flag.

    The screen flags 0.90 × 1,000 = 900 frauds and 0.05 × 9,000 = 450 honest ones, so P(fraud | flagged) = 900 / 1,350 = 0.667.

    900 / 1,350 = 0.667

    A common mix-up

    A reliable test always means a positive result is probably right.

    In fact: When the thing tested for is rare, most positives can be false alarms.

Try it

In a batch of 10,000 parts, 3% are bad. A test flags 80% of bad parts and 4% of good ones. How many flagged parts are bad, and what share of flagged parts is that?Answer

240 bad flagged out of 240 + 388 = 628, so 38.2%

Hint: Apply each rate to its own group

A shipment is late with probability 0.05. A tracker warns for 70% of late shipments and 2% of on-time ones. Find P(late | warning).Answer

0.035 / (0.035 + 0.019) = 0.648

Hint: Two warning paths

A screen flags 90% of frauds and 5% of honest cases, and fraud is 5% of transactions. What is P(fraud | flagged)?Answer

0.045 / (0.045 + 0.0475) = 0.486

Hint: 0.05 × 0.90 over the sum of both flagged paths

Given that a transaction is not flagged, what is the chance it is fraud?Answer

20 / 9,330 = 0.0021, about 0.2%

What is P(honest | flagged)?Answer

0.049 / 0.067 = 0.7313, which is 1 − 0.2687

Bayes' theorem in business

30 minutes every month. No card.