Density function and expectation of a random variable

465 Views Asked by At

Random variable $X$ has exponential distribution $\mathcal E(\lambda)$ with probability $0.3$, and distribution given by density function $f_2(x)=\frac{1}{2}e^{-|x+1|},\forall x\in\mathbb R$ with probability $0.7$. Find density (density function) and expectation of a random variable $X$.

First, I don't understand why are we given probabilities $0.3$ and $0.7$?

Density function of an exponential distribution is given by $f(x)=\lambda e^{-\lambda x},x\ge 0,\lambda>0$. This is the density function for the first case. Expectation of $X$ for the first case is $$E(X)=\int_0^{+\infty}x\lambda e^{-\lambda x}dx=-\frac{1}{\lambda}$$

In the second case, we are already given the density function $f_2(x)$. $$ |x+1| = \begin{cases} x+1, & x+1\ge 0, & x\ge -1\\ -(x+1), & x+1< 0, & x<-1 \end{cases}$$ $$ f_2(x) = \begin{cases} \frac{1}{2}e^{x+1}, & x<-1 \\ \frac{1}{2}e^{-(x+1)}, & x\ge -1 \end{cases}$$

Now, I am not sure how to set limits of integration for evalution of expectation. $$E(X)=\int_{-\infty}^{-1}\frac{1}{2}xe^{x+1}dx+\int_{-1}^{+\infty}\frac{1}{2}xe^{-(x+1)}dx=-1+0=-1$$

Is this correct?

1

There are 1 best solutions below

3
On BEST ANSWER

This is a mixture distribution (If I'm understanding your question correctly).

$$f_1(x) = \lambda e^{-\lambda x}$$

and

$$f_2(x) = \frac{e^{-\left| x+1\right| }}{2}$$.

Then, the density function is

$$g(x) = 0.3 f_1(x) + 0.7 f_2(x) = 0.3 \lambda e^{-\lambda x} + 0.7\frac{e^{-\left| x+1\right| }}{2}$$.

To calculate $E(X)$, we follow first principles noting the respective domains of support, so we get:

$$E(X) = 0.3 \int_0^{\infty}x\lambda e^{-\lambda x} + 0.7 \int_{-\infty}^{\infty} x \frac{e^{-\left| x+1\right| }}{2}=\frac{0.3}{\lambda }-0.7$$