Calculating expected value from definition. Where is the mistake?

62 Views Asked by At

Probability density function $f(x)$ for continous random variable has following property: $$\int_{-\infty}^\infty f(x) dx=1$$

Expected value $EX$ is given as: $$EX=\int_{-\infty}^\infty xf(x) dx$$

So I tried to perform integration in definition of $EX$ by parts for $u(x)=x$, $v'(x)=f(x)$:

$$EX=\int_{-\infty}^\infty xf(x) dx = {[x]}_{-\infty}^{\infty} - \int_{-\infty}^\infty1(x)dx$$

Did I violate some rules of integration or just came in a legit way to situation which is meaningless due to subtraction of indefinite values?

1

There are 1 best solutions below

0
On BEST ANSWER

You had it wrong in integration by parts.

Actually, $$EX=\int_{-\infty}^\infty xf(x) dx = {[x v(x)]}_{-\infty}^{\infty} - \int_{-\infty}^\infty v(x)dx$$ where $v(x) = \int f(x) dx $.