# A doubt in finding the expected value of lifetime

Lifetime of a bulb has uniform probability distribution on (2,12). Bulb is replaced upon failure or upon reaching age 10, whichever occurs first.Find the expected value and standard deviation of age of bulb at time of replacement.. I have approached the problem with considering X=age of bulb at time of replacement with interval(2,10) and p.d.f, f(x)=1/8. On finding the expectation the answer obtained is 6. But the answer provided is 6.8 for expected value. Please guide me through the error in my approach.

• What was your working out? And do you know how to calculate expected values of random variables that are "partly continuous and partly discrete" like this? – Minus One-Twelfth Mar 29 at 11:01
• no, I didn't know this is partly continuous ad partly discrete at the first place. can you please explain why it is so? – sam soft Mar 29 at 11:14

Your distribution should have a discrete weight of $$20\%$$ on the point $$10$$ years and the rest is uniform, i.e. $$f(x) = \begin{cases} 0.1, & x \in (2,10) \\ 0.2, & x = 10. \end{cases}$$ Note this way, $$\int_2^{10} f(x) dx = 0.2 + \int_2^{10} 0.1 dx = 0.2 + 0.8 = 1,$$ where first integral is in the Riemann-Stieltjes sense (allowing to integrate over functions with discrete weights) and the second is in the ordinary Riemann sense.
Therefore you need a Riemann-Stieltjes integral to compute the expected value, which would be $$\int_2^{10} x f(x)dx$$ or in terms of regular Riemann integral $$\mathbb{E}[X] = 0.2\cdot 10 + 0.1\int_2^{10}xdx,$$ can you now complete it?
• This is because if you let $X$ be the time of replacement, there is positive ($0.2$) probability of $X$ taking the value $10$. – Minus One-Twelfth Mar 29 at 11:17
• @samsoft inserted a piece on how to integrate such $f$ if you need it... – gt6989b Mar 29 at 13:48