Compute posterior for accurate-but-rare classifier

Quick Overview

This question evaluates understanding of Bayes' theorem and probabilistic reasoning for interpreting classifier outputs, specifically computing posterior probabilities given sensitivity, specificity, and prevalence.

Compute posterior for accurate-but-rare classifier

Company: Meta

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Onsite

In a population, 5% are 'bad' users and 95% are 'good'. A screening model predicts 'bad' with sensitivity 0.95 (P(pred=bad | bad)=0.95) and specificity 0.95 (P(pred=good | good)=0.95). (a) If the model predicts 'bad' for a user, compute P(user is actually bad). (b) If the model predicts 'good', compute P(user is actually good). (c) Explain how these posteriors change with the prevalence and why this illustrates the base-rate effect.

Quick Answer: This question evaluates understanding of Bayes' theorem and probabilistic reasoning for interpreting classifier outputs, specifically computing posterior probabilities given sensitivity, specificity, and prevalence.

|Home/Statistics & Math/Meta
Meta logo
Meta
Oct 13, 2025, 9:49 PM
mediumData ScientistOnsiteStatistics & Math
4
0

Bayes' Theorem: Interpreting Screening Model Predictions

Context

You are evaluating a binary screening model that flags "bad" users in a population. The model has known sensitivity and specificity, and the population has a known prevalence of "bad" users.

  • Prevalence: P(bad) = 5%, P(good) = 95%.
  • Sensitivity: P(pred = bad | bad) = 0.95.
  • Specificity: P(pred = good | good) = 0.95 (so false positive rate = 0.05).

Tasks

(a) If the model predicts "bad" for a user, compute P(user is actually bad).

(b) If the model predicts "good" for a user, compute P(user is actually good).

(c) Explain how these posterior probabilities change with the prevalence and why this illustrates the base-rate effect.

Loading comments...