Compute posterior spam risk from flags

Quick Overview

This question evaluates understanding of Bayes' theorem, conditional probability, and interpretation of classifier performance metrics (true positive and false positive rates) for computing posterior spam risk.

Compute posterior spam risk from flags

Company: Snapchat

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Technical Screen

A binary classifier flags spammy requesters. Last week the base rate of spam among all requesters was 12%. The classifier has true positive rate (TPR) 0.90 and false positive rate (FPR) 0.04. a) Using Bayes' theorem, compute P(Spam | Flagged). Show your formula and final numeric answer rounded to 4 decimals. b) Compute P(Spam | Not Flagged) and interpret it (what fraction of unflagged requesters are still spam?). c) If the base rate dropped to 6% with the same TPR/FPR, recompute P(Spam | Flagged). Briefly explain how base rate changes affect the posterior and why. Provide all steps, formulas, and final answers.

Quick Answer: This question evaluates understanding of Bayes' theorem, conditional probability, and interpretation of classifier performance metrics (true positive and false positive rates) for computing posterior spam risk.

|Home/Statistics & Math/Snapchat
Snapchat logo
Snapchat
Oct 13, 2025, 9:49 PM
mediumData ScientistTechnical ScreenStatistics & Math
7
0

A binary classifier flags spammy requesters. Last week the base rate of spam among all requesters was 12%. The classifier has true positive rate (TPR) 0.90 and false positive rate (FPR) 0.04.

a) Using Bayes' theorem, compute P(Spam | Flagged). Show your formula and final numeric answer rounded to 4 decimals. b) Compute P(Spam | Not Flagged) and interpret it (what fraction of unflagged requesters are still spam?). c) If the base rate dropped to 6% with the same TPR/FPR, recompute P(Spam | Flagged). Briefly explain how base rate changes affect the posterior and why.

Provide all steps, formulas, and final answers.

Loading comments...