PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Statistics & Math/Thumbtack

Optimize red-ball draw probability, prove optimality

Last updated: Mar 29, 2026

Quick Overview

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.

  • medium
  • Thumbtack
  • Statistics & Math
  • Data Scientist

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.

Related Interview Questions

  • Design cross-validation; explain bias–variance - Thumbtack (Medium)
  • Test regional response-rate differences rigorously - Thumbtack (medium)
Thumbtack logo
Thumbtack
Oct 13, 2025, 9:49 PM
Data Scientist
Onsite
Statistics & Math
3
0
Loading...

Two-Box Ball Allocation to Maximize Probability of Drawing Red

Setup

  • You have 2 boxes and two colors of balls.
  • In the 100/100 case: 100 red and 100 blue balls.
  • A box is chosen uniformly at random (probability 1/2 each), then one ball is drawn uniformly from that box.

Tasks

  1. For 100 red and 100 blue balls, how should you distribute the balls between the two boxes to maximize the probability of drawing a red ball? Compute the resulting probability.
  2. Prove optimality (not just intuition).
  3. Generalize: For R red and B blue balls (R,B ≥ 1), characterize the optimal allocation and give the maximal probability as a function of R and B.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Statistics & Math•More Thumbtack•More Data Scientist•Thumbtack Data Scientist•Thumbtack Statistics & Math•Data Scientist Statistics & Math
PracHub

Master your tech interviews with 7,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
  • Compare Platforms
  • Discord Community

Support

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

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.