# Finding probability density, mean and variance of Y=2X+3

• Jun 6th 2010, 04:47 AM
acevipa
Finding probability density, mean and variance of Y=2X+3
Suppose X has a probability density given by:

$\displaystyle f(x)=\left\{\begin{array}{cc} \alpha e^{-\alpha x},&\mbox{for}\ x\geq 0\\0 & \mbox{ otherwise}\end{array}\right.$

1) Find the probability density of $\displaystyle Y=2X+3$

2) Find the mean and variance of $\displaystyle Y=2X+3$

Could someone please explain or refer me to someone website which explains the 'scale effects'. I tried reading it in my textbook, but don't really understand it.
• Jun 6th 2010, 04:49 AM
SpringFan25
by scale effects do you mean you want an explanation of why

$\displaystyle Var(aX+b) = a^2 Var(X)$
and
$\displaystyle E(aX+b) = aE(x) + b$

?
• Jun 6th 2010, 04:51 AM
acevipa
Quote:

Originally Posted by SpringFan25
by scale effects do you mean you want an explanation of why

$\displaystyle Var(aX+b) = a^2 Var(X)$
and
$\displaystyle E(aX+b) = aE(x) + b$

?

Yeh kind of. I'll give you an example

Say X is a continuous random variable with PDF $\displaystyle f(x)$ and CDF $\displaystyle F(x)$. Suppose $\displaystyle Y=aX+b$ where $\displaystyle a \ne 0$ has PDF $\displaystyle g(x)$ and CDF $\displaystyle G(x)$.

What I don't understand is the meaning of $\displaystyle F(x)=G(ax+b)$ and $\displaystyle g(y)=\frac{1}{a}f\left(\frac{y-b}{a}\right)$ for $\displaystyle a>0$
• Jun 6th 2010, 05:14 AM
SpringFan25
Ok, lets examine the CDF of Y.

Step 1:
$\displaystyle G(Y) = P(Y<y) = P(aX + b < y)$
$\displaystyle G(Y) = P(Y<y) = P(X < \frac{y - b}{a})$
$\displaystyle G(Y) = P(X < \frac{y - b}{a}) = F(\frac{y-b}{a})$

Step 2:
Now, to get any pdf from a cdf, we just differenciate.
$\displaystyle g(y) = \frac{dG}{dy} = \frac{dF \left( \frac{y-b}{a} \right)}{dy}$

You can do this derivative easily using the chain rule

$\displaystyle g(y) = \frac{dF \left( \frac{y-b}{a} \right)}{dy} = \frac{1}{a} \times F' \left( \frac{y-b}{a} \right)$
Notation point: $\displaystyle F' \left( \frac{y-b}{a} \right)$ means the derivative of F with respect to x, evaluated at the point $\displaystyle \left( \frac{y-b}{a} \right)$

But by definition, the derivative of F is the pdf (ie, F' = f).
$\displaystyle g(y) = \frac{1}{a} \times f \left( \frac{y-b}{a} \right)$

To explain why F(X) = G(aX + b) you can follow the argument in step 1 again, but try to find F() instead of G(). I've done it as a spoiler in case you get stuck

Spoiler:

$\displaystyle X=\frac{Y-3}{2}$

Lets examine the PDF of X
$\displaystyle F(X) = P(X<x) = P(\frac{Y-3}{2}) < x)$
$\displaystyle F(X) = P(X<x) = P(Y < 2x + 3)$
$\displaystyle F(X) = P(Y < 2x + 3) = G(2x + 3)$

• Jun 6th 2010, 05:43 AM
acevipa
Quote:

Originally Posted by SpringFan25
Ok, lets examine the CDF of Y.

Step 1:
$\displaystyle G(Y) = P(Y<y) = P(aX + b < y)$
$\displaystyle G(Y) = P(Y<y) = P(X < \frac{y - b}{a})$
$\displaystyle G(Y) = P(X < \frac{y - b}{a}) = F(\frac{y-b}{a})$

Step 2:
Now, to get any pdf from a cdf, we just differenciate.
$\displaystyle g(y) = \frac{dG}{dy} = \frac{dF \left( \frac{y-b}{a} \right)}{dy}$

You can do this derivative easily using the chain rule

$\displaystyle g(y) = \frac{dF \left( \frac{y-b}{a} \right)}{dy} = \frac{1}{a} \times F' \left( \frac{y-b}{a} \right)$
Notation point: $\displaystyle F' \left( \frac{y-b}{a} \right)$ means the derivative of F with respect to x, evaluated at the point $\displaystyle \left( \frac{y-b}{a} \right)$

But by definition, the derivative of F is the pdf (ie, F' = f).
$\displaystyle g(y) = \frac{1}{a} \times f \left( \frac{y-b}{a} \right)$

To explain why F(X) = G(aX + b) you can follow the argument in step 1 again, but try to find F() instead of G(). I've done it as a spoiler in case you get stuck

Spoiler:

$\displaystyle X=\frac{Y-3}{2}$

Lets examine the PDF of X
$\displaystyle F(X) = P(X<x) = P(\frac{Y-3}{2}) < x)$
$\displaystyle F(X) = P(X<x) = P(Y < 2x + 3)$
$\displaystyle F(X) = P(Y < 2x + 3) = G(2x + 3)$

Thanks, I kind of understand that now. Although how do you approach the question. Do you just remember the formula??
• Jun 6th 2010, 05:46 AM
SpringFan25
I never saw that formula before actually :D

The principle i remembered was "Find the CDF of Y and differenciate to get the PDF"
• Jun 6th 2010, 05:58 AM
acevipa
Quote:

Originally Posted by SpringFan25
I never saw that formula before actually :D

The principle i remembered was "Find the CDF of Y and differenciate to get the PDF"

In my case, do I integrate first to find F(x) then use that to find G(Y) then F(Y) then f(y)??
• Jun 6th 2010, 06:05 AM
SpringFan25
Im not clear on what you mean, there are 2 ways to get the pdf of Y.

Short way:
just plug the numbers into the formula we just derived

Long way:
Step 1:
Find the CDF of X

HintYou can either integrate, or notice that we are dealing with the pdf of an exponential distribution. You can lookup the CDF of an exponential distribution

Step 2:
Find the CDF of Y (use the same reasoning i did in the derivation above)

Step 3:
Differentiate the CDF of Y to get the pdf of Y.
• Jun 6th 2010, 05:43 PM
acevipa
Quote:

Originally Posted by SpringFan25
Im not clear on what you mean, there are 2 ways to get the pdf of Y.

Short way:
just plug the numbers into the formula we just derived

Long way:
Step 1:
Find the CDF of X

HintYou can either integrate, or notice that we are dealing with the pdf of an exponential distribution. You can lookup the CDF of an exponential distribution

Step 2:
Find the CDF of Y (use the same reasoning i did in the derivation above)

Step 3:
Differentiate the CDF of Y to get the pdf of Y.

Thanks for that