$1)$ A machine starts operating at time $0$ and fails at a random time $T$. The distribution of $T$ has density $f(t) = \frac{1}{3}e^{-\frac{t}{3}}$ for $t > 0$. The machine will not be monitored until time $t = 2$. What will be the expected time of discovery of the machine's failure ?
The question was asked in an examination. I solved in the following way in my answer script. I think there are two possible cases- $(1)$ The failure is discovered at the instant $t=0$ if the machine has already failed before time $t$ (in between the time $t=0$ to $t=2$) $(2)$ The second possible case is that the failure is discovered at time $t>0$
Now, we are required to find an expectation. $$E(t)=2\times P(0<t<2)+\int_{2}^{\infty} tf(t) dt$$ $$=2(1-e^{-\frac{2}{3}})+5e^{-\frac{2}{3}}$$ $$=2+3e^{-\frac{2}{3}}$$
Someone objected me " how can you take $t=2$ ? $t$ is a continuous variable."
Am I correct ?
Assuming it can fail only once, your solution seems correct. If it fails at any time when $t \lt 2$ with probability
$$\int_0^2 \frac{1}{3}e^{-\frac{t}{3}}dt=1-e^{-\frac{2}{3}}$$
then the observed time is $t=2$ since that's the time of $discovery$.