Compute posterior for biased coin after 3H1T

Quick Overview

This question evaluates a candidate's understanding of Bayesian inference, computation of posteriors and Bayes factors, posterior predictive probabilities, and decision-theoretic model selection in a simple biased-coin scenario.

Compute posterior for biased coin after 3H1T

Company: Zoox

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Technical Screen

You are given a coin known to be biased: one face lands with probability 2/3 and the other with probability 1/3, but you do not know whether Heads is the 2/3 face or Tails is. Assume prior P(Heads-heavy)=P(Tails-heavy)=1/2. You flip the coin 4 times and observe 3 Heads and 1 Tail (order unspecified). a) Compute the posterior P(Heads-heavy | 3H,1T). b) Compute the Bayes factor BF = P(data | Heads-heavy) / P(data | Tails-heavy). c) Compute the posterior predictive P(next toss is Head | 3H,1T). d) Generalize to n tosses with k Heads: derive a closed-form posterior and the decision rule (under 0–1 loss) for choosing Heads-heavy vs Tails-heavy; show BF as a simple power of 2. e) Does the order of outcomes matter under this model? Explain precisely. f) How would the posterior and predictive change under an asymmetric prior π = P(Heads-heavy) ≠ 1/2?

Quick Answer: This question evaluates a candidate's understanding of Bayesian inference, computation of posteriors and Bayes factors, posterior predictive probabilities, and decision-theoretic model selection in a simple biased-coin scenario.

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

You are given a coin known to be biased: one face lands with probability 2/3 and the other with probability 1/3, but you do not know whether Heads is the 2/3 face or Tails is. Assume prior P(Heads-heavy)=P(Tails-heavy)=1/2. You flip the coin 4 times and observe 3 Heads and 1 Tail (order unspecified). a) Compute the posterior P(Heads-heavy | 3H,1T). b) Compute the Bayes factor BF = P(data | Heads-heavy) / P(data | Tails-heavy). c) Compute the posterior predictive P(next toss is Head | 3H,1T). d) Generalize to n tosses with k Heads: derive a closed-form posterior and the decision rule (under 0–1 loss) for choosing Heads-heavy vs Tails-heavy; show BF as a simple power of 2. e) Does the order of outcomes matter under this model? Explain precisely. f) How would the posterior and predictive change under an asymmetric prior π = P(Heads-heavy) ≠ 1/2?

Loading comments...