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

1. Aug 22, 2012

### Charlotte87

1. The problem statement, all variables and given/known data
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

3. 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?

2. Aug 22, 2012

### uart

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).

3. Aug 22, 2012

### uart

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)$.

4. Aug 22, 2012

### Ray Vickson

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

5. Aug 22, 2012

### uart

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: Aug 22, 2012