1
$\begingroup$

I have the random variable \begin{equation} X = \begin{cases} 0 \;\; &\text{with probability }\frac{1}{2}\\ \exp(\frac{1}{\lambda}) \;\; &\text{with probability }\frac{1}{2} \end{cases} \end{equation} I want to compute the variance of this random variable. I first compute the expected value. \begin{equation} \mathbb{E}[X]=\mathbb{E}[\frac{1}{2}\cdot 0+\frac{1}{2}\cdot \exp(\frac{1}{\lambda})]=\frac{1}{2}\mathbb{E}[\exp(\frac{1}{\lambda})]=\frac{1}{2}\lambda \end{equation} Next I want to compute the second moment of $X$. \begin{equation} \mathbb{E}[X^{2}]=\mathbb{E}[(\frac{1}{2}\cdot 0+\frac{1}{2}\cdot\exp(\frac{1}{\lambda}))^{2}]=\frac{1}{4}\mathbb{E}[(\exp(\frac{1}{\lambda}))^{2}]=\frac{1}{4}\cdot2\lambda^{2}=\frac{1}{2}\lambda^{2} \end{equation} This would give me the variance as, \begin{equation} Var(X)=\mathbb{E}[X^{2}]-(\mathbb{E}[X])^{2}=\frac{1}{4}\lambda^{2} \end{equation} My teacher told me that the variance should be equal to $\frac{3}{4}\lambda^{2}$. I believe that this would mean that the second moment should be equal to $\lambda^{2}$, but I can't seem to figure out how I should get that answer. Can someone tell me where I go wrong in my computation?

$\endgroup$
1
  • $\begingroup$ Shouldn't $E X^2 = 0.5 * 0^2 + 0.5 *\exp(1/\lambda)^2$? That is, why are you squaring the probabilities? $\endgroup$
    – Galton
    Apr 11, 2022 at 13:38

1 Answer 1

1
$\begingroup$

You seem to be using $\exp(\frac1 \lambda)$ to mean an exponentially distributed random variable with mean $\lambda$ and variance $\lambda^2$, rather than the value $e^{1/\lambda}$.

If so, then $E[(\exp(\frac1 \lambda))^2] = Var(\exp(\frac1 \lambda))+(E[\exp(\frac1 \lambda)])^2 =\lambda^2+\lambda^2=2\lambda^2$

which makes $E[X]=\frac12 E[0]+\frac12 E[\exp(\frac1 \lambda)] = \frac12\lambda$

and $E[X^2]=\frac12 E[0^2]+\frac12 E[(\exp(\frac1 \lambda))^2] = 0+\frac12 2\lambda^2= \lambda^2$

and so $Var(X)= E[X^2]-(E[X])^2=\lambda^2-\frac14\lambda^2=\frac34\lambda^2$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .