Optimize red-ball draw probability, prove optimality
Company: Thumbtack
Role: Data Scientist
Category: Statistics & Math
Difficulty: medium
Interview Round: Onsite
You have 100 red balls and 100 blue balls and two identical boxes. A box is chosen uniformly at random, then one ball is drawn uniformly from that box. How should you distribute the balls between the two boxes to maximize the probability of drawing a red ball? What is the resulting probability? Prove optimality (not just intuition). Then generalize: for R red and B blue balls (R,B ≥ 1), characterize the optimal allocation and the maximal probability in terms of R and B.
Quick Answer: This question evaluates probabilistic reasoning, optimization and mathematical proof skills by asking how to allocate red and blue balls across two boxes to maximize the probability of drawing a red, testing understanding of probability theory, combinatorics and constrained optimization.