PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Machine Learning/Meta

Build a Bayes classifier for reviewer types

Last updated: Mar 29, 2026

Quick Overview

This question evaluates Bayesian inference skills, including posterior updating under conditional independence, likelihood modeling for categorical observations, and application of Bayes decision rules with associated false-positive and false-negative rate calculations.

  • medium
  • Meta
  • Machine Learning
  • Data Scientist

Build a Bayes classifier for reviewer types

Company: Meta

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Onsite

Reviewers are of two types: Lazy (prior 20%) who always give 'Good' reviews, and Careful (prior 80%) who independently give 'Good' with probability 0.60 and 'Bad' with probability 0.40. Assume independence across items conditioned on type. (a) Derive P(review = Good) marginally. (b) Given a particular reviewer produces 3 consecutive 'Good' reviews and no 'Bad', compute the posterior P(Lazy | 3 Good). (c) More generally, derive P(Lazy | g Good, b Bad). (d) Propose a Bayes decision rule that labels a reviewer as Lazy when the posterior exceeds 0.5; find the smallest g (with b=0) that triggers a Lazy label. (e) If each reviewer is observed for exactly N reviews, express the false-positive and false-negative rates of this rule in terms of N.

Quick Answer: This question evaluates Bayesian inference skills, including posterior updating under conditional independence, likelihood modeling for categorical observations, and application of Bayes decision rules with associated false-positive and false-negative rate calculations.

Related Interview Questions

  • Self-Attention: Implementation, Complexity, and Efficient Variants - Meta (hard)
  • Machine Learning Fundamentals: Optimizers, Scaling Laws, and Clustering - Meta (hard)
  • Implement 1NN Embeddings and Forward Pass - Meta (hard)
  • Design and evaluate an ads ranking algorithm - Meta (easy)
  • How would you design a Shop Ads ranking algorithm? - Meta (easy)
|Home/Machine Learning/Meta

Build a Bayes classifier for reviewer types

Meta logo
Meta
Oct 13, 2025, 9:49 PM
mediumData ScientistOnsiteMachine Learning
2
0
Loading...

Bayesian Reviewer-Type Inference

Setup

There are two reviewer types:

  • Lazy (prior probability 0.20): always gives a "Good" review.
  • Careful (prior probability 0.80): independently gives "Good" with probability 0.60 and "Bad" with probability 0.40 on each item.

Assume conditional independence of reviews given the reviewer type.

Tasks

(a) Compute the marginal probability P(Review = Good).

(b) Given a reviewer produces 3 consecutive "Good" reviews and no "Bad", compute the posterior P(Lazy | 3 Good).

(c) Derive the general posterior P(Lazy | g Good, b Bad).

(d) Consider a Bayes decision rule that labels a reviewer as Lazy when the posterior exceeds 0.5. With b = 0, find the smallest g that triggers a Lazy label.

(e) If each reviewer is observed for exactly N reviews, express the false-positive and false-negative rates of this rule in terms of N.

Loading comments...

Browse More Questions

More Machine Learning•More Meta•More Data Scientist•Meta Data Scientist•Meta Machine Learning•Data Scientist Machine Learning

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.