Question:
A battery has a lifetime of $24$ hours and it is used for maximum three days. On each day, a person uses the battery for $K$ hours, where $K$ is uniform on $[0,24]$ and independent of the other days. What is the expectation of the remaining lifetime at the end of the third day?
My work:
Let $X$, $Y$, $Z$ as the amount of battery lifetime used on each day, respectively. Then the amount of battery lifetime left at the third day would be as follows:
$W=$ $[(24-X)/24]$ * $[(24-X-Y)/24]$ * $(24-X-Y-Z)$
Since at the second day, for a probability of $X/24$, the remaining lifetime would be $0$, and else (for a probability of $(24-X)/24$), there would be $(24-X-Y)$ left. I did the same for the third day.
Then I computed $E[W]$, which seemed to be $4$, but the correct answer seems to be $1$ (hour).
I think $W$ is miscalculated, because I checked the rest a couple times. Can anyone tell me what is wrong?
(Edit) If it is simplified into a two-day process, I thought it can be calculated as the following:
Let $W$ the amount of lifetime left at the end of the second day. If $X$ is used on the first day, there is a $(X/24)$ probability that the battery will be used up on the second day. On the other hand, $((24-X)/24)$ is the probability that the used amount of the battery is $(X+Y)$, or $(24-X-Y)$ is the left amount.
Then $W=(X/24)*0+((24-X)/24)*(24-X-Y)$
and
$E[W]= (1/24) * E[(24-X)(24-X-Y)]= (1/24)*(24^2 - 48E[X] - 24E[Y] + E[X^2] + E[XY])$
where
$E[X]=E[Y], E[X^2]=E[XY]$ since $X$ and $Y$ are independent, and $E[X]=12, E[X^2]=192$.
Then we have:
$E[W]=24-2*12-12+16=4$ (hours),
which is the same as the calculation obtained by the integration method.
Don't you just want to integrate $24-x-y-z$ over the region where this is positive? That is, $${1\over24^3}\int_0^{24}\int_0^{24-x}\int_0^{24-x-y}(24-x-y-z)dzdydx$$