Posterior probability given model accuracy

Quick Overview

Evaluates Bayesian posterior probability for a flagged bad-user classifier with low base rate and symmetric 95% sensitivity and specificity. Strong answers compute precision with Bayes' theorem and explain the base-rate effect.

Posterior probability given model accuracy

Company: Meta

Role: Data Scientist

Category: Analytics & Experimentation

Difficulty: easy

Interview Round: Onsite

Scenario: Security classification model has symmetric 95 % accuracy, base‑rate bad users 5 %. Compute posterior probability a user is bad when flagged. ​ Question 1: If 5 % of users are bad and model accuracy is 95 % on both classes, what is P(true bad | predicted bad)? (Hint: Bayes’ theorem)

Quick Answer: Evaluates Bayesian posterior probability for a flagged bad-user classifier with low base rate and symmetric 95% sensitivity and specificity. Strong answers compute precision with Bayes' theorem and explain the base-rate effect.

|Home/Analytics & Experimentation/Meta
Meta logo
Meta
Jul 12, 2025, 6:59 PM
easyData ScientistOnsiteAnalytics & Experimentation
7
0

Security Classification: Posterior Probability When Flagged

You are evaluating a binary classifier that flags potentially bad users.

Assume:

  • Base rate of bad users: P(Bad) = 5%
  • Sensitivity, or true positive rate: P(Flagged | Bad) = 95%
  • Specificity, or true negative rate: P(Not Flagged | Good) = 95%

Using Bayes' theorem, compute P(Bad | Flagged).

Constraints & Assumptions

  • Treat accuracy as symmetric sensitivity and specificity as stated.
  • Show the false positive rate.
  • Use Bayes' theorem and explain the base-rate effect.
  • Report the final probability clearly.

Clarifying Questions to Ask Guidance

  • Does "95% accuracy" mean both sensitivity and specificity are 95%?
  • What is the base rate in the scored population?
  • Are flagged users all reviewed, blocked, or just marked for investigation?
  • Is the goal precision, recall, or cost-sensitive decisioning?

What a Strong Answer Covers Guidance

  • Defines prior P(Bad) and P(Good).
  • Uses TPR = 0.95 and FPR = 0.05.
  • Computes numerator as 0.95 times 0.05.
  • Computes denominator as true positives plus false positives.
  • Gives P(Bad | Flagged) = 0.5 under the stated assumptions.
  • Explains why high sensitivity and specificity can still produce moderate precision when base rate is low.

Follow-up Questions Guidance

  • How would the posterior change if the base rate were 1%?
  • What if specificity improves to 99%?
  • Which metric matters more if false positives are very costly?
Loading comments...