Expected Value: $E[aX]=aE[X]$ Let $X$ be a random variable on [0,$ \infty $] and $a \in R$ .
We can prove
$E[aX] = \int_0^{+\infty} a*x f(x) dx = a\int_0^{+\infty} x f(x) dx = a E[X]$
I have $Y = aX$ then $E[Y]=aE[X]$
The expression below should give $aE[X]$ but I'm doing an error and I can't identify it. Please can someone explain me what is it.
Here are the steps:
$Y= aX  \leftrightarrow  dy= a\ dx$ 
$x=0 \rightarrow y= 0$, $x=\infty \ y=\infty$
$E[Y]= \int_0^{+\infty} y Pr(Y=y) dy= \int_0^{+\infty} a*x*pr(aX=ax)*a*dx$
$ = \int_0^{+\infty} a^2*x*pr(X=x)*dx = a^2* E[X]$
 A: Your issue is with the notation $P(Y=y)$. For continuous random variables the probability mass function is zero; you need to use the probability density function, usually denoted as $f_Y(\;)$ or such, the unsigned derivative of the Cummulative Distribution Function $F_Y(\;)$.   For $Y=aX$, the density of $Y$ in terms of the density of $X$ is:
$$\begin{split}f_Y(y) &= \tfrac{\mathsf d~~}{\mathsf d y}F_Y(y) \\ &= \tfrac{\mathsf d~~}{\mathsf d y}\mathsf P(Y\leq y) \\ & = \tfrac{\mathsf d~~}{\mathsf d y}\mathsf P(X\leq y/a) &\qquad& \text{if $0<a$}\\ &= \tfrac{\mathsf d~~}{\mathsf d y} F_X(\tfrac ya)\\&= \tfrac 1af_X(\tfrac ya)\end{split}$$
So, as we should anticipate:
$$\begin{split}\mathsf E(Y) &=\int_\Bbb R y f_Y(y) \mathsf d y\\ &= \int_\Bbb R ax\cdot\tfrac 1af_X(\tfrac {ax}a)\cdot a\mathsf d x\\ &= a\int_\Bbb R x~f_X(x)\mathsf d x \\&= a\mathsf E(X)\end{split}$$
A: Let $Y= aX=g(X)$:
\begin{align*}
E[g(X)]&=\int_0^{+\infty} g(x)\,f_{X}(x)\ dx\\
&= \int_0^{+\infty} y\,f_{X}\left(\frac{y}{a}\right)\ dx\\
&= \int_0^{+\infty} ay\,f_{Y}(y)\ \frac{dy}{a}\qquad\text{(since $f_{X}\left(\frac{y}{a}\right)=a\,f_{Y}(y)$, and $dx=\frac{dy}{a}$)}\\
&= \int_0^{+\infty} y\,f_{Y}(y)\ dy=E[Y]
\end{align*}
