Deriving linear transformation of a probability expectation?

910 Views Asked by At

In looking at linear transformations of the expectation of a random varaible $E(X)$, the following is given, but I'm not seeing how it is derived:

The linear transform: $Y=aX+b$

The result on expectations: $E(Y)=aE(X)+b$

However, when deriving this mathematically, isn't the following true (looking at continuous distributions for X and Y)?

$$\int_{}^{}{yf(y)dy}=\int_{}^{}{(axf(x)+b)dx}=a\int_{}^{}{xf(x)}dx+\int_{}^{}{b}dx=a\int_{}^{}{xf(x)}dx+bx$$

In this case, the expectations would be: $E(Y)=aE(X)+bx$

...of course this isnt making sense, and clearly the given equation is the correct one, but I'm not sure how it's being derived (likely my calculus is wrong somewhere).

2

There are 2 best solutions below

0
On

Not like this: $$\int_{}^{}{yf(y)dy}=\int_{}^{}{(ax \color{red}{f(x)}+b)dx}=\color{red}{a\int_{}^{}{xf(x)}dx+\int_{}^{}{b}dx=a\int_{}^{}{xf(x)}dx+bx}$$

But like this:

$$E[Y]=\int(ax+b)f_X(x)dx\color{green}=\color{green}{a\int_{}^{}{xf(x)}dx+{b}\int_{}^{}f(x)dx=aE[X]+b}.$$

0
On

You've calculated the density for $Y$ incorrectly. If $Y=aX+b$ and $X$ has density $f_X(x)$, then the density of $Y$ in terms of $f_X$ is $$ f_Y(y) = \frac1a f_X\left({y-b\over a}\right) $$ so the expectation of $Y$ is $$ E(Y)=\int yf_Y(y)\,dy=\int {y\over a} f_X\left({y-b\over a}\right)\,dy\stackrel{(1)}=\int(ax+b)f_X(x)\,dx = aE(X)+b $$ where in (1) we use the change of variables $x=\displaystyle{y-b\over a}$.

How to derive the density for $Y$? Calculate the derivative of the cumulative: $$P(Y\le y)=P(aX+b\le y) = P\left(X\le{y-b\over a}\right) = F_X\left({y-b\over a}\right)\;,$$ so the derivative is $$f_Y(y)={d\over dy}P(Y\le y)={d\over dy}F_X\left({y-b\over a}\right) = f_X\left({y-b\over a}\right)\frac1a$$