What is the trick in computing this expectation? 
A machine starts operating at time $0$ and fails at a random time $T.$  The distribution of $T$ has density $f(t)=(1/3)e^{-t/3}$ for $t\gt 0.$  The machine will not be monitored until time $t=2.$  The expected time of discovery of the machine's failure is
(a) $2 + e^{-6}/3$
(b) $2-2e^{-2/3}+5e^{-4/3}$
(c) $2+3e^{-2/3}$
(d) $3$

I know that the random variable follows an exponential distribution with rate parameter $1/3.$  I tried to solve this by integrating the pdf multiplied by $(t)$ with limits from $2$ to infinity and I got the answer $5 e^{-2/3}$ but the answer is wrong. Please tell what point am I missing.
 A: The time of discovery is not $T$ itself: it is $2$ when $T \le 2$ and otherwise is $T$.  We might write this as a function $X$ of $T$ in the form
$$X(T) = \max(2, T).$$
Accordingly, its expectation is
$$E[X(T)] = \int_0^\infty X(t) f(t) dt = \int_0^\infty \max(2,t) \frac{e^{-t/3}}{3}dt.$$
It's convenient to compute the integral by splitting it into the integral over the interval $[0,2],$ where $X(t)=2,$ and the integral over $[2,\infty),$ where $X(t) = t.$  This gives
$$E[X(T)] = \int_0^2 2 \frac{e^{-t/3}}{3}dt + \int_2^\infty t \frac{e^{-t/3}}{3}dt.$$
A smart test-taker will compare this to the offered choices before proceeding.  They all have an additive constant, usually $2.$  We can force it to appear by rewriting 
$$X(T) = 2 + \mathcal{I}(t\gt 2)(t-2)$$
where $\mathcal{I}(t\gt 2)$ is zero when $t\le 2$ and otherwise equal to $1.$  This yields
$$E[X(T)] = 2 + \int_2^\infty (t-2) \frac{e^{-t/3}}{3}dt.$$
At this point it's possible, simply by looking at the forms of the choices, to choose the correct answer without doing any further calculation!
