# Finding the pdf of a random variable which is a function of another rv

• Charlotte87
In summary, the conversation discusses the computation of E(X) and E(Y) for a given density function. It also delves into the determination of the density function for Y using the formula F_{Y}(y)=F_{X}(g^{-1}(y)). However, this formula is incorrect and should be corrected to F_{Y}(y)=1 - F_{X}(1/y) to obtain the correct probability density.

## Homework Statement

Let f(x)=x/8 be the density of X on [0,4], zero elsewhere.

a) Show that f(x) is a valid density and compute E(X)
b) Define Y=1/X. Calculate E(Y)
c) Determine the density function for Y

## The Attempt at a Solution

a) is just really basic. I've solved that one.

b) Without any "fuss" about it, i set g(x)=1/x, and use the following formula
$\int^4_0(1/x*x/8)$ = 1/2

c) Here the problem starts... So from my lecture notes i know that
$F_{Y}(y)=F_{X}(g^{-1}(y))$

Y=1/X --> X=1/Y=g^-1(y)

Using this i can write the above as
$F_{Y}(y)=F_{X}(g^{-1}(1/y))$

the pdf is then:

$f_{Y}(y)=f_{X}(1/y)*(-1/y^{2})$

From here, I do not know how to proceed, any clues?

Charlotte87 said:
c) Here the problem starts... So from my lecture notes i know that
$F_{Y}(y)=F_{X}(g^{-1}(y))$

Y=1/X --> X=1/Y=g^-1(y)

Using this i can write the above as
$F_{Y}(y)=F_{X}(g^{-1}(1/y))$
Should be just be $F_{Y}(y)=F_{X}(1/y)$

$f_{Y}(y)=f_{X}(1/y)*(-1/y^{2})$

From here, I do not know how to proceed, any clues?
Well that's actually your answer right there, if you just sub in $f_{X}(1/y) = 1/(8y)$ to your final equation. Though that solution is not quite correct, as the "prepackaged" equations have let you down.

To see that this is incorrect just subst in as above and you'll find that the result this gives you is,
$$f_{Y}(y) = -1/(8y^3)$$

Clearly this is wrong (because of the negative sign).

To do this problem without using the prepacked equations, just start by writing the definition of $F_{Y}(y)$ as,

$$F_{Y}(y) = P(\frac{1}{x} < y)$$

which for +ive x,y is equivalent to,

$$F_{Y}(y) = P(x > \frac{1}{y})$$

Now solve the above using the appropriate integral and then differentiate wrt y to find $f_{Y}(y)$.

uart said:
Should be just be $F_{Y}(y)=F_{X}(1/y)$

Well that's actually your answer right there, if you just sub in $f_{X}(1/y) = 1/(8y)$ to your final equation. Though that solution is not quite correct, as the "prepackaged" equations have let you down.

To see that this is incorrect just subst in as above and you'll find that the result this gives you is,
$$f_{Y}(y) = -1/(8y^3)$$

Clearly this is wrong (because of the negative sign).

The statement
$$F_Y(y) = F_X(1/y)$$ is incorrect. It should be
$$F_Y(y) = 1 - F_X(1/y),$$
because $\Pr\{ Y \leq y \} = \Pr \{ X \geq 1/y \}.$ Now when you differentiate wrt y you get the correct probability density.

RGV

Ray Vickson said:
The statement
$$F_Y(y) = F_X(1/y)$$ is incorrect. It should be
$$F_Y(y) = 1 - F_X(1/y),$$
because $\Pr\{ Y \leq y \} = \Pr \{ X \geq 1/y \}.$ Now when you differentiate wrt y you get the correct probability density.

RGV

Hi Ray. I was merely pointing out that the statement $F_Y(y) = F_X(1/y)$ is what the OP should have written at that point if they had correctly substituted into the previous line of their own derivation. I clearly pointed out however, that it was not the correct way to do the problem. :)

Last edited: