Conditional probability and base rates

Use counts to decide what a sample request predicts and whether a repair flag justifies an inspection.

What you’ll learn

Use a two-way table to distinguish the probability of a signal given an event from the probability of the event given the signal.

What does a sample request tell you?

A sales manager at a tile manufacturer learns that 80% of customers who placed an order had first requested a sample. She proposes forecasting 80 orders from the next 100 sample requests. Before the factory reserves capacity, there is one question to ask: how many people requested a sample and never bought?

The businesses and numbers in this lesson are fictional. Use paper and a calculator; no earlier spreadsheet is needed.

Recall Lesson 037: When comparing two offers, you multiplied each payoff by a probability. If you already know a prospect requested a sample, which group's purchase rate belongs in the calculation?

Choose the group before dividing

The event here is a purchase within 30 days of first inquiry. The signal is a sample request at that inquiry. A signal is something you can observe before the outcome is known. It need not cause the outcome to be useful for forecasting.

A base rate tells you how often the event occurs in the relevant group before you use the signal. A conditional probability asks the same kind of question after restricting attention to a group that satisfies a condition. Penn State's statistics course illustrates how to compute it by selecting a row or column in a two-way table. Penn State

Write P(purchase given request) for the probability of purchase among requesters. The word given tells you what is already known. In counts, the formula is:

P(purchase given request) = number who requested and purchased ÷ number who requested.

Reverse the question and the numerator stays the same, but the denominator changes to the number who purchased. A useful habit is to finish the sentence “Out of all the ___” before doing any arithmetic. If that group is empty, the rate cannot be calculated.

Read one table in two directions

The manufacturer followed 1,000 distinct prospects. Each had a full 30 days to buy. Each appears once, with a verified purchase outcome whether or not they requested a sample. A two-way table sorts each prospect by both facts.

At first inquiryPurchasedDid not purchaseTotal
Requested a sample4095135
No sample request10855865
Total509501,000

The base purchase rate is 50 ÷ 1,000 = 5%. Now read down the purchased column: out of 50 buyers, 40 requested a sample. That is 40 ÷ 50 = 80%. The manager correctly described the buyers' earlier behavior.

To forecast orders from sample requests, read across the first row instead. Out of 135 requesters, 40 purchased: 40 ÷ 135 ≈ 29.6%. Among 100 comparable future requesters, that rate gives about 30 expected orders. It gives no guarantee for any particular group of 100.

The 95 nonbuyers who requested samples explain the gap. Just 95 ÷ 950 = 10% of nonbuyers requested one. But there were 950 nonbuyers and only 50 buyers. Even that small fraction of nonbuyers produced more sample requests than all 40 buyers who requested one. A request is useful evidence: it raises the estimated purchase chance from 5% to about 30%. It still leaves most requesters without an order.

What if the base rate changes?

Suppose a distributor refers 1,000 prospects, of whom 200 will buy. As a thought experiment, hold both request rates fixed: 80% among buyers and 10% among nonbuyers. Of the 200 buyers, 160 request a sample. Of the 800 nonbuyers, 80 request one. The purchase rate among requesters is now 160 ÷ (160 + 80) = 66.7%, rounded.

The sample request behaves the same way within each group, yet it means something different because the distributor sends a larger share of eventual buyers. Before using the original 29.6% forecast, check the source of the inquiries, the purchase deadline, and whether outcomes were recorded for everyone. Neither table establishes that mailing out more samples would cause more purchases.

Exercise: Which returned tools need inspection?

Allow 8–10 minutes. You own a tool rental shop. At check-in, a counter clerk flags returns that may need alignment repair. In a trial, a technician inspected all 500 returned tools, including those without a flag. Twenty needed repair. Of those 20, the clerk flagged 15. Of the 480 that did not need repair, the clerk flagged 45.

You are setting the inspection policy for future comparable returns. Inspection costs $8 per tool. Finding a needed repair in time avoids $40 of additional rework; this is the net saving before the inspection fee. An inspection finds every needed repair, and inspection produces no saving on a sound tool. Assume sufficient inspection capacity and no other consequences. These are routine alignment issues with no safety implications.

  1. Make a table with rows for flagged and unflagged returns, columns for repair needed and no repair needed, and totals. Calculate the base repair rate.
  2. What percentage of tools needing repair were flagged? What percentage of flagged tools needed repair? Explain which rate answers the owner's decision.
  3. Calculate the expected net saving per inspection for each group. Decide which tools to inspect and name one reason to recheck the policy later.

Try the table before reading the answer.

Answer
Return statusRepair neededNo repair neededTotal
Flagged154560
Unflagged5435440
Total20480500

Fill the unflagged row by subtraction: 20 − 15 = 5 missed repairs, and 480 − 45 = 435 sound tools. The base repair rate is 20 ÷ 500 = 4%.

Among tools needing repair, the clerk flagged 15 ÷ 20 = 75%. Among flagged tools, only 15 ÷ 60 = 25% needed repair. At check-in the owner knows the flag status, so the second rate is the relevant one. Using 75% would forecast 45 repairs among the 60 flagged tools; the trial found 15.

For a flagged tool, expected net saving is (0.25 × $40) − $8 = $2 per inspection. For an unflagged tool, the repair probability is 5 ÷ 440, about 1.14%. Expected net saving is (5 ÷ 440 × $40) − $8 ≈ −$7.55 per inspection. Charge the $8 in every inspection because it is paid whether or not a repair is found.

Inspect flagged tools under the stated assumptions. As a check, inspecting the 60 flagged returns would have cost $480 and avoided 15 × $40 = $600 of rework, a net saving of $120. Five needed repairs would have escaped detection. If the tool mix or the cost of missing a repair changes, revisit the decision. Periodically inspect a sample of unflagged returns as well; checking only flagged ones would leave the future missed-repair count unknown.

Recall answer: Use the purchase rate among requesters to weight a payoff that depends on a requester buying. The share of buyers who requested a sample answers a sales-history question, not the forecast question.

Applying this lesson

Before acting on a signal, write the claim as a count: “Of the 60 flagged tools, 15 needed repair.” That sentence names the group you actually face and gives you the probability to place on the repair branch of your decision tree.

Sources

Comments

Comments

Loading comments…