Zoox·Data Scientist·Technical Phone Screen
- You have a biased coin where one side lands with probability 2/3 and the other 1/3, but you don't know which side is which. Given equal priors, you flip it 4 times and get 3 heads and 1 tail. What is the posterior probability that heads is the heavier side?
- Compute the Bayes factor comparing the two hypotheses given the observed data.
- What is the posterior predictive probability that the next flip is heads, given the data you've already observed?
- Generalize the setup to n flips with k heads. Derive a closed-form posterior, state the decision rule under 0-1 loss, and show that the Bayes factor simplifies to a power of 2.
- Does the order in which the coin flips occurred matter under this model? Explain precisely.
- How would the posterior and the predictive probability change if you used an asymmetric prior where P(heads-heavy) is not equal to 1/2?
“This is where it started and I actually felt okay here.”