Mean of overcooking time This question came up this week when I had to put my rice in the microwave for a third time.
Suppose the perfect cooking time for a meal is given by a random variable $X$ with values in seconds. Now suppose a quick check allows to determine if the food is :


*

*Uncooked,

*Perfectly cooked,

*Overcooked.


What is the estimated overcooking time in seconds if one uses the following technique :
Start by cooking for $T$ seconds, then
a) Check food state.
b) If food if perfectly cooked or overcooked, stop.
c) If food is uncooked, double the last $T$ used.
An answer could also hint for a better technique or optimize the choice of $T$.
EDIT : As suggested bellow, let us assume that $X\sim N(\mu;\sigma^2)$.

The answer is the remainder of $\frac{\mathbb{E} X}{T}.$  This is essentially the overshoot that you expect based on the step length $T$.  In particular, if $X \sim N(\mu, \sigma^2)$, then this would be the remainder of $\frac{\mu}{T}.$ If $X$ is a discrete r.v. with probabilities $p_1, \dots, p_n$, then the expected overcooking time is the remainder of $\frac{\sum_n p_n x_n}{T}.$
The choices of $T$ that lead to zero expected overcooking time are contained in the set $\{\frac{\mathbb{E} X}{  k }\mid k \in \mathbb{N} \}.$
Something interesting is that no matter what we choose for $T$, even if the expected overcooking time is zero, the wait time will still have a variance of $\mathbb{E}(kT-X)^2, $ where $k = \text{argmin} \{k \in \mathbb{N} \mid kT \ge X\}$.  In particular, when $X \sim N(\mu, \sigma^2),$
$$
\mathbb{E}(kT-X)^2 = T^2 \mathbb{E} k^2 - 2T \mathbb{E} kX + \sigma^2.
$$
This is where I will leave my answer, mostly because I don't know what the distribution of $k$ should be.  The formula for variance that I found does shed some light on the problem -- evidently the variance is quadratic in $T$.  In other words, the more often we check, the less variance we expect in our wait time at the expense of opening and closing the microwave door many times.
