A doctor has scheduled two appointments, one at 2:00 P.M. and the other at 3:00 P.M. The amounts of time that appointments last are independent exponential random variables with mean 60 minutes. Assuming that both patients are on time, find the expected amount of time that the 3:00 appointment spends at the doctor’s office.
I tried to find my own solution by using conditional expectation where :
$T_1 (\text{time appointment 2:00 P.M leaves before 3:00 P.M})$
$T_2 (\text{time appointment 2:00 P.M leaves after 3:00 P.M})$
$\mathbb{E}(T_1)=\mathbb{E}(T_2)=60.$
My solution is:
$$\mathbb{E}(\text{T spent time})=\mathbb{E}(T{|}T_1\le 60)\mathbb{P}(T_1\le 60)+\mathbb{E}(T{|}T_2\ge 60)\mathbb{P}(T_2\ge 60)$$ $$=\mathbb{E}(T_1)\int _0^{60}\:\frac{1}{60}e^{-\frac{1}{60}t_1}dt_1+\mathbb{E}(T_2)\int _{60}^{\infty }\frac{1}{60}e^{-\frac{1}{60}t_2}dt_2$$
$$=60(1-e^{-1})+60(e^{-1})=60.$$
I see this is wrong answer , and I'm not sure if
$$\mathbb{E}(T{|}T_1\le 60)=\mathbb{E}(T_1)$$ $$\mathbb{E}(T{|}T_2\ge 60)=\mathbb{E}(T_2)$$
Let's measure time in hours. The random treatment times $X$ and $Y$ of the two patients have probability density functions $$f_X(t)=f_Y(t)=e^{-t}\qquad(t\geq0)\ .$$ The time $T$ that the second patient spends at the doctor's office is equal to a possible overtime of the first patient plus his own treatment time. It follows that $T=(X-1)^+ +Y$, whereby the so-called positive part $\>a^+$ of a real number $a$ is defined as $0$ if $a<0$ and as $a$ if $a\geq0$. It follows that $$\eqalign{E(T)&=\int_0^\infty (t-1)^+\>f_X(t)\>dt+\int_0^\infty t\>f_Y(t)\>dt \cr &=\int_1^\infty(t-1)\>e^{-t}+\int_0^\infty t\> e^{-t}\>dt=1+{1\over e}\ .\cr}$$