# Transformation of Random Variables and Expectation

Suppose we have $0\le\,X\le\,\infty$, and we have $Y = a+b\, X\,\quad$ where $a\in\mathbb{R}$, $b\in\mathbb{R}$, $X \sim \chi^2_\nu(\beta)\quad$ with a PDF $f_X(x)$. Now, I found that the PDF of Y is given by

$$f_Y(y) = \frac{1}{b}f_X\left(\frac{y-a}{b}\right)$$

• is the formula right for $f_Y(y)$.
• if I want to obtain the expectation of another function of $Y$, given by $g(y)$, is it right to use

$\int^\infty_0 g(y)f_Y(y)\mathrm{d}y$

or $\int^\infty_a g(y)f_Y(y)\mathrm{d}y$.

Thanks.

-

The pdf you give is correct for values of $z$ that are more than $a$, provided $b$ is positive.

You can prove that as follows: $$f_y(z) = \frac{d}{dz} F_y(z) = \frac{d}{dz} \Pr(y\le z) = \frac{d}{dz}\Pr(a+bx\le z) = \frac{d}{dz} \Pr\left( x \le \frac{z-a}{b} \right)$$ where the very last step works only if $b>0$. Then: $$\frac{d}{dz} \Pr\left( x \le \frac{z-a}{b} \right) = \frac{d}{dz} F_x\left( \frac{z-a}{b} \right) = f_x\left( \frac{z-a}{b} \right) \cdot \frac 1b.$$ In the last step, the chain rule is used.

For the expectation, you can use either $$\int_a^\infty g(z) f_y(z)\;dz$$ or $$\int_0^\infty g(a+bx) f_x(w)\;dw.$$ The second form given here is an instance of the "law of the unconscious statistician".

I prefer to use capital letters for random variables and often corresponding lower-case letters for the arguments to the cdf or pdf, thus: $$X \sim \chi^2_\nu$$ $$\Pr(a < X < b) = \int_a^b f_X(x)\;dx.$$

-
This is very helpful. Thank you. –  Remy Nov 19 '11 at 16:42
A minor emendation to the excellent answer by @MichaelHardy. When $b > 0$, expression $f_Y(z) = (1/b)f_X((z-a)/b)$ is correct for all $z$, not just for $z > a$. Of course, when $z < a$, the argument of $f_X(\cdot)$ is negative, and $f_X(t) = 0$ when $t$ is negative (since $X \geq 0$ is given). –  Dilip Sarwate Nov 19 '11 at 23:01
Thanks @Dilip Sarwate, so I can safely use the formula $\int^\infty_0g(y)f_Y(y)\,\mathrm{d}y$... –  Remy Nov 24 '11 at 8:51