# Finding the expectation

I'm just brushing up my math skills and I came across the following problem.

A lifetime X of a certain device is exponential with parameter $\mu$ years. What is the expected value of $\max\{\mu/2 , X\}$?

I have no clue on how to start solving this. Any ideas?

-
Your edit is truly mystifying. The new version does not make sense and also makes the answer appear disjointed. – cardinal Oct 16 '11 at 1:34
I have rolled back your last edit and cleaned it up a bit. I hope you don't mind. Please check that it reads as intended. – cardinal Oct 16 '11 at 12:01

By the definition of an expectation trough the density, $$\mathsf E g(X) = \int\limits_{-\infty}^\infty g(t)f_X(t)\,dt$$ where $f_X(t)$ is a density function of r.v. $X$. In your case $X\sim\mathcal E(\mu)$ so $f_X(t) = 0$ for $t<0$ and $f_X(t) = \mu\mathrm e^{-\mu t}$ for $t\geq 0$. As a result $$\mathsf E\max\{\mu/2,X\}= \int\limits_{0}^\infty \max\{\mu/2,t\}\mu\mathrm e^{-\mu t}\,dt = \int\limits_{0}^{\mu/2} \frac12\mu^2\mathrm e^{-\mu t}\,dt+\int\limits_{\mu/2}^\infty t\mu\mathrm e^{-\mu t}\,dt.$$
@ManiKrish: yes, $\mu$ is a constant, so first term integrates directly and second - by parts. – Ilya Oct 15 '11 at 19:51