I've been stuck on this question for a while and it's annoying the hell out of me!
I know it's a basic definition type of question, but I can't seem to understand it. Can any of you help?
Question: Let X be a random variable and A be an event such that, conditional on A, X is exponential with parameter λ, and conditional on $A^C$ (A complement), X is exponential with parameter μ. Write E[X] in terms of λ, μ and p, the probability of A
$X$ is a nonnegative random variable and so we know that $$E[X] = \int_0^\infty [1 - F_X(x)] \, \mathrm dx.$$ (If you don't know this result, see, for example, here). The question now is: what is $[1-F_X(x)]$? Well, $$\begin{align} 1- F_X(x) &= P\{X > x\}\\ &= P\{X > x \mid A\}P(A) + P\{X > x\mid A^c\}P(A^c)\\ &= e^{-\lambda x}P(A) + e^{-\mu x}P(A^c)\\ &= pe^{-\lambda x} + (1-p)e^{-\mu x}. \end{align}$$ Hence, $$E[X] = \int_0^\infty pe^{-\lambda x} + (1-p)e^{-\mu x} \, \mathrm dx.$$ Can you take it from here?