Optimal Pick Time for a Ripening Fruit

Reported in interviews at Optiver

Problem statement

A fruit becomes ripe at a random time $x \sim U(0,1)$, and then becomes overripe (spoiled) at a later random time $y \sim U(x, 1)$. You must choose a single time $t \in (0,1)$ to pick it; you succeed if the fruit is ripe but not yet spoiled, i.e. $x < t < y$.

What value of $t$ maximizes your probability of success, and what is that probability?

Show hint

What single random quantity, if you knew it, would make the success event easy to evaluate?

Relevant roles: Data Scientist, Applied Scientist and ML Engineer.

Related free problems