If $X$ is a random variable with the pdf $f(x)$ and $Y=g(X)$ how come $E[Y]$ is the integral of $g(x)f(x)$ but $E[X]$ is the intergral of $xf(x)$ ??
2026-05-06 02:27:42.1778034462
Why does $E[X]$ not equal the integral of $f(x)^2$
81 Views Asked by user135842 https://math.techqa.club/user/user135842/detail At
2
Using the definition, for every positive function $g$ you have $$ Eg(X) = \int f(x)g(x) dx. $$ and if $E|g(X)|<\infty$ you have the same definition as well.
So if $g(x)=x$, as soon as $E|X|<\infty$ you have $$EX= \int x f(x) dx.$$