1

Let $f(x)=e^{-2|x|}$

Find:

  1. $E(X)$

  2. $E(|X|)$

  3. $E(x')$ where $x'$ denotes the largest integer not greater than $x$.

I'm stuck on this question and am confused about how to use the modulus sign. I feel I need to show it separately for cases when $x\ge0$ and $x\le0$ but I'm not sure.

Any help is appreciated

  • 2
    What is $X$? How does it relate to $f$? I'm guessing maybe $f$ is the pdf of $X$ or something? – dfeuer Aug 29 '13 at 06:38
  • 2
    Also, if that interpretation is right, how does $X$ relate to $|X|$? Also also, what on Earth is $x$, if not a typo? – dfeuer Aug 29 '13 at 06:40
  • The Maple code $$restart; with(Statistics): $$ $$ X := RandomVariable(Distribution(PDF = (t ->exp(-2*abs(t)))));$$ $$Y := floor(X): Mean(Y); $$ gives the answer to your third question $$\frac {-2+{{\rm e}^{-2}}+{{\rm e}^{2}}}{ \left( {{\rm e}^{2}}-1 \right) \left( {{\rm e}^{-2}}-1 \right) } .$$ – user64494 Aug 29 '13 at 06:52

3 Answers3

2

By definition, $$E(X)=\int_{-\infty}^\infty xe^{-2|x|}\,dx.\tag{1}$$

To evaluate this integral is easy. First, a technical thin, the integral does converge. The function $xe^{-2|x|}$ is an odd function, so the integral is $0$.

We have $$E(|X|)=\int_{-\infty}^\infty |x|e^{-2|x|}\,dx.\tag{2}$$ Now the integrand is symmetric about the $y$-axis, so we find the integral from $0$ to $\infty$, and double.

To find the integral from $0$ to $\infty$, we need $$\int_{-\infty}^\infty xe^{-2x}\,dx.$$ We can use integration by parts, or recall that the exponential with parameter $2$ has mean $\frac{1}{2}$. That tells us that $\int_0^\infty (x)2e^{-2x}=\frac{1}{2}$.

The greatest integer one takes a bit more woek to analyze. The integral breaks up into parts. From $0$ to $1$ we are integrating $0\cdot e^{-2x}$. From $1$ to $2$ we are integrating $1\cdot e^{-2x}$, and so on.

So we get $$(1)\frac{1}{2}(e^{-2}-e^{-4})+(2)\frac{1}{2}(e^{-4}-e^{-6})+(3)\frac{1}{2}(e^{-6}-e^{-8})+\cdots.$$ This is a geometric series, not hard to evaluate.

However, we can be tricky, and do the negative part, hoping for cancellation. We get $$(-1)\frac{1}{2}(e^{0}-e^{2})+(-2)\frac{1}{2}(e^{-2}-e^{-4})+(-3)\frac{1}{2}(e^{-4}-e^{-6})+\cdots.$$ Add the two, simplify.

André Nicolas
  • 514,336
1
  1. $f(x)=f(-x)$, so if $E[X]$ exists then $E[X]=0$ as a symmetric random variable. It does exist, because $E[|X|]$ exists.

  2. If $Y=|X|$ then the density of $Y$ is $g(y)=2e^{-2y}$ for positive $y$ and $E[|X|]=E[Y]=\frac12$ as an exponential random variable

  3. If $Z=\lfloor X \rfloor $ then $\Pr(Z=n) = \Pr(Z=-(n+1)) = e^{-2n}(1-e^{-2})$ for non-negative integer $n$, so is should be easy to see $E[\lfloor X \rfloor]=E[Z]=-\frac12$.

Henry
  • 169,616
  • I dont understand part 2 when Y=|X| how the density turns out to be 2e^-2y – user91689 Aug 29 '13 at 08:16
  • shoudnt it be e^-2y as i got my F_y(x)=-e^-(2y)/2 .so when i differentiate it i get e^-2y ad my g(y) – user91689 Aug 29 '13 at 08:33
  • @user91689: Take your pick of explanations: (a) Since $X$ is symmetric about $0$, the probability density of $Y$ must be twice the density of $X$ at positive values. (b) $\Pr(Y \le y) = 1 - e^{-2y}$ with a derivative of $2e^{-2y}$. (c) In general, the probability density of an exponential random variable is of the form $\lambda e{-\lambda x}$. – Henry Aug 29 '13 at 09:04
  • thankyou i understood it now and if we were given E[X^2] how would we calculate it since it is an even function now – user91689 Aug 29 '13 at 09:09
  • $E[X^2]=E[Y^2] = \frac{1}{2}$. In general the $n$th moment of an exponential random variable with rate $\lambda$ is $n!, \lambda^{-n}$. – Henry Aug 29 '13 at 09:37
-3

Hint:

$$\operatorname{E}[X] = \int_{-\infty}^\infty x f(x)\, \mathrm{d}x, $$

and more generally

$$\operatorname{E}[g(X)] = \int_{-\infty}^\infty g(x) f(x)\, \mathrm{d}x. $$

To deal with integrals contain the floor function $\lfloor x\rfloor$ see here.

  • @Downvoter: I do not know what the down vote for? It is the first answer to be posted yet it is a good hint for the OP to start working on his problem. – Mhenni Benghorbal Sep 09 '13 at 04:02