# Let $X$ be a continuous random variable with density function $f_X$. What is $Y=aX+b$?

Let $X$ be a continuous random variable with density function $f_X$ and let $a,b>0$.

What is $Y=aX+b$?

I need some help with this one. And I am quite sure it is not $af_X+b$.

• The literal answer to the question asked: "What is $Y = aX+b$?" is that $Y$ is a random variable that happens to be a function of the random variable $X$. Commented Jun 2, 2015 at 12:58

We have that $$\Pr\{aX+b\le y\}=\Pr\{X\le(y-b)/a\}=\int_{-\infty}^{(y-b)/a}f_X(x)\mathrm dx.$$ Using the substitution $x=(t-b)/a$, we obtain that $$\Pr\{Y\le y\}=\int_{-\infty}^{(y-b)/a}f_X(x)\mathrm dx=\int_{-\infty}^y\frac1af_X((t-b)/a)\mathrm dt$$ and the density function $f_Y(y)=a^{-1}f_X((y-a)/b)$.

In general, if $Y=g(X)$ with a monotone function $g$, we have that $$f_Y(y) = \left| \frac{\mathrm d}{\mathrm dy} (g^{-1}(y)) \right| \cdot f_X(g^{-1}(y)),$$ where $g^{-1}$ denotes the inverse function (see here for more details). In this particular case $g(x)=ax+b$ for $x\in\mathbb R$.

• Killing flies with a sledge-hammer? And not an answer to the question asked: "What is $Y = aX+b$?" Commented Jun 2, 2015 at 12:56
• Where you use the fact that $a,b>0$? Commented Sep 29, 2023 at 3:14
• @MeetPatel The sign of $b$ does not affect the derivation but the sign of $a$ does. The assumption that $a>0$ is used when we divide both sides of the inequality $aX+b\le y$ by $a$ (we do not reverse the inequality). Commented Sep 29, 2023 at 10:56

$X$ is a random variable, wich means $X$ is a measurable function $X:\Omega\rightarrow\mathbb R$ where $\mathbb R$ is equipped with the Borel-$\sigma$-algebra. In that context $Y:\Omega\rightarrow\mathbb R$ prescribed by $\omega\mapsto aX(\omega)+b$ is also a random variable. Here I presume that $(\Omega,\mathcal A,P)$ is the underlying probability space.

For every Borelset $C$:$$P\left\{ Y\in C\right\} =P\left\{ aX+b\in C\right\} =\int1_{C}\left(ax+b\right)f_{X}\left(x\right)dx$$

Substitution $y=ax+b$ shows that the RHS equals:

$$\int1_{C}\left(y\right)\frac{1}{a}f_{X}\left(\frac{y-b}{a}\right)dy=\int_{C}\frac{1}{a}f_{X}\left(\frac{y-b}{a}\right)dy$$

This proves that the function prescribed by: $$y\mapsto\frac{1}{a}f_{X}\left(\frac{y-b}{a}\right)$$ serves as PDF of $Y$.

• OK, I missed the $a > 0$ part. But I still think it is overkill. Commented Jun 2, 2015 at 13:47
• $$P\left\{ aX+b\in C\right\} =\int1_{C}\left(ax+b\right)f_{X}\left(x\right)dx$$ .Can you explain this equality? i know about For every Borelset $C$:$$P\left\{ X\in C\right\} =\int_{C} f_{X}\left(x\right)dx$$ . Commented Sep 28, 2023 at 18:09
• @MeetPatel What I used is the general equality $\mathbb Eh(X)=\int h(x)dF_X(x)=\int h(x)f_X(x)dx$. This for function $h$ prescribed by $x\mapsto 1_C(ax+b)$. Not familiar with it? Back to the basics then! Expectations are not more than integrals and probability theory is filled up with them. If a CDF has a derivative then this derivative serves as density, yes. But "CDF having a derivative" is not necessary for the existence of a density. $Y$ can have a density while at the same time its CDF is not differentiable. Anyway, I will stop here because this is a place for comments (not college). Commented Sep 29, 2023 at 10:11
• @MeetPatel I think that is correct but not more than that. Just like you I must first check it (e.g. on the internet). Just not in the mood for that. Further it has no connection with the answer we are both commenting. Commented Sep 29, 2023 at 11:22
• @drhab Thank you for your response . Commented Sep 29, 2023 at 11:24