A screening test must decide between "disease" (D) and "healthy" (H). The loss is 0 for a correct decision, 20 for declaring "healthy" when the person has the disease, and 1 for declaring "disease" when the person is healthy. For one patient the posterior is P(D∣x)=0.1. Which decision minimises the expected loss, and above what posterior probability of disease should we declare "disease"?

Supervised learning, Bayes decision theory
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can compute the conditional risk of each action and see how unequal costs change the threshold.

Key idea

The conditional risk is R(a∣x)=∑kλ(a,Ck)P(Ck∣x); choose the action with the smallest risk.

Steps

  1. Write the loss matrix λ(a,truth): λ(say D,D)=0, λ(say D,H)=1, λ(say H,D)=20, λ(say H,H)=0.
  2. Risk of saying "disease": R(D∣x)=0×0.1+1×0.9=0.9.
  3. Risk of saying "healthy": R(H∣x)=20×0.1+0×0.9=2.
  4. 0.9<2, so declare "disease", even though the patient is probably healthy (90%).
  5. For the threshold, let p=P(D∣x). Say "disease" when 1×(1−p)<20×p, that is p>121≈0.048.
  6. With equal costs (0–1 loss) the threshold would be 0.5. Costs of mistakes are unequal, so the threshold falls to about 4.8%.

Common mistakes

How long your answer should be

Half a page; 3 minutes.

Last checked on 4 December 2026.

Read this

Previous in Supervised learning: A feature x has class-conditional densities N(μ1=1,σ2=4) for class C1 and N(μ2=5,σ2=4) for class C2, with priors P(C1)=0.8 and P(C2)=0.2. For equal-variance 1-D Gaussians, the Bayes decision boundary is x∗=μ1+μ22+σ2μ2−μ1ln⁡P(C1)P(C2). What is x∗, which class is predicted for x=4, and how does the unequal prior shift the boundary?
Next in Supervised learning: A 3-class classifier may also reject (refuse to decide). A wrong decision costs 1, a correct decision costs 0, and rejecting costs λr=0.2. For the posteriors (0.55,0.30,0.15) and (0.85,0.10,0.05), what should the classifier do? What is the general rule in terms of λr?