PDA

View Full Version : CDP of a function of a continuous RV


IniquiTrance
Apr17-10, 07:58 PM
Given:

f_{X}(x)=1

0 \leq x \leq 1

and 0 everywhere else.

We are asked to find E[eX]

The way my book does it is as follows:

Y = e^{X}

F_{Y}(x) = P(X\leq Ln (x)) = \int_{0}^{ln x} f_{Y}(y) dy = ln (x)

f_{Y}(x) = \frac{d}{dx} \left[ln (x)\right]=\frac{1}{x}

1 \leq x \leq e

E[e^{X}] = \int_{-\infty}^{\infty} x f_{Y}(x) dx = \int_{1}^{e} dx = e - 1

I understand how to do it as follows. I don't understand the author's way of doing it.

Y = e^{X}

0 \leq x \leq 1

1 \leq y \leq e

F_{Y}(y) = P(X\leq Ln (y)) = \int_{0}^{ln y} f_{X}(x) dx = \int_{0}^{ln y} dx = ln (y)

f_{Y}(y) = \frac{d}{dy} \left[ln (y)\right]=\frac{1}{y}

E[e^{X}] = \int_{-\infty}^{\infty} y f_{Y}(y) dy = \int_{1}^{e} dy = e - 1

Can someone please explain to me why the author does it his way instead of mine?

I know I can make life easier by just taking:

\int_{-\infty}^{\infty}g(x)f(x) dx

but I want to understand what's going on here.

Any help is much appreciated!

IniquiTrance
Apr18-10, 06:38 PM
Any ideas? Sorry to bump, just redid the whole post, so it's essentially a new question :).

Dickfore
Apr18-10, 06:58 PM
A general rule if you're given f_{X}(x) to calculate E[g(X)] is:



E[g(X)] = \int{g(x) \, f_{X}(x) \, dx}

IniquiTrance
Apr18-10, 07:01 PM
A general rule if you're given f_{X}(x) to calculate E[g(X)] is:



E[g(X)] = \int{g(x) \, f_{X}(x) \, dx}



Yeah, I noted that I'm aware of that at the bottom of my post. :smile:

I just wanna understand why the book does it this way.

Dickfore
Apr18-10, 07:10 PM
Yeah, I noted that I'm aware of that at the bottom of my post. :smile:

I just wanna understand why the book does it this way.

I think the book did it the same way as you, but used a different dummy variable in the last integral.