# Expectation of Random Variable with even Probability Density Function

By Definition of Expectation of Random Variable:

$$E(X)= \int_{-\infty}^{\infty}\,x\,f_X(x)\,dx$$

Now if the pdf $f_X(x)$ is Even we know that $E(X)=0$ (Ofcourse if integral Converges, i.e, Lets exclude cases like Cauchy Random Variable)

Is the Converse True, i.e., is there a Random Variable $X$ whose pdf is Neither Even-Nor Odd, such that $E(X)=0$.

• I don't a practical example but probably there is! LOL – checkmath May 15 '12 at 12:10
• Have you considered that a probability density function $f_X(x)$ cannot possibly be an odd function of $x$? And so your question is whether there exists a random variable whose density function is not an even function of $x$ but whose mean is $0$? – Dilip Sarwate May 15 '12 at 12:13

It is possible to make up as many examples as you wish. Let $Y$ be almost any random variable with mean $\mu$, and let $X=Y-\mu$. All we need to do is to avoid symmetry about $\mu$, so for example let $Y$ have exponential distribution, or density $2y$ in $[0,1]$ and $0$ elsewhere.

For a discrete example, let $Y$ have binomial distribution with $p\ne 0$, $1$, or $1/2$.

• very good answer Andre, thanks :) – Ekaveera Kumar Sharma May 15 '12 at 12:59

Define $f_X(x):=\frac 1{x^3}\chi_{[1,+\infty)}(x)+\frac 12\chi_{(-5/2,-3/2)}$.

• Since $\int_{\Bbb R}f_X(x)dx=\left[-\frac 1{2x^2}\right]_1^{+\infty}+\frac 12=1$ and $f_X$ is non-negative, it's a density.
• We have \begin{align} E[X]&=\int_1^{+\infty}\frac 1{x^2}dx+\frac 12\int_{-5/2}^{-3/2}xdx\\\ &=\left[-\frac 1x\right]_1^{+\infty}+\frac 12\left[\frac{x^2}2\right]_{-5/2}^{-3/2}\\ &=1+\frac 14\frac 14(9-25)\\ &=0. \end{align}
• $f_X$ is not even, since $f_X(10)=\frac 1{1000}\neq 0=f_X(-10)$

(there should be simpler examples)

Note that a density function cannot be odd, since in this case $\int_{-\infty}^{+\infty}f(x)dx=0$, whereas it should be $1$.