Thread: Need help with another proof.

1. Need help with another proof.

I've got a problem that I don't know how to solve. The question: Suppose that Y is a continuous random variable with density f(y) that is positive only if y> or equal to zero. If F(y) is the distribution function, show that

$\displaystyle E(Y) = \int_{0}^{infty}{} yf(y) dy = \int_{0}^{infty}{} [1-F(y)] dy.$

The book also gives a hint: If y > 0, $\displaystyle y=\int_{0}^{y}{} dt$ and $\displaystyle E(Y) = \int_{0}^{+\infty} yf(y) dy = \int_{0}^{+\infty} [\int_{0}^{y} dt] f(y) dy$

Exchange the order of integration to obtain the desired result.

I've tried to change the integration order like this:

$\displaystyle E(Y) = \int_{0}^{+\infty} yf(y) dy = - \int_{+\infty}^{0} [\int_{0}^{y} dt] f(y) dy$

but how do I go on from there?

2. In order to change the order of integration, you must remove the $\displaystyle y$ from the bound. Here is how:
$\displaystyle E(Y) = \int_{0}^{+\infty} yf(y) dy = \int_{0}^{+\infty} \left(\int_{0}^{y} dt\right) f(y) dy$
....$\displaystyle = \int_0^\infty \int_0^\infty {\bf 1}_{(t\leq y)}dt f(y) dy = \int_0^\infty\left(\int_0^\infty {\bf 1}_{(t\leq y)}f(y) dy\right)dt$
....$\displaystyle = \int_0^\infty \left(\int_t^{+\infty} f(y) dy\right)dt =\int_0^\infty (1-F(t))dt$.
(I denote by $\displaystyle {\bf 1}_{(t\leq y)}$ an indicator function: it is equal to 1 if $\displaystyle t\leq y$ and to 0 otherwise)

3. Thank you, Laurent. I'm not sure that I understand the use of an indicator function. Can you please try to explain how I use it to go from:

$\displaystyle \int_0^\infty\left(\int_0^\infty {\bf 1}_{(t\leq y)}f(y) dy\right)dt$

to:

$\displaystyle \int_0^\infty \left(\int_t^{+\infty} f(y) dy\right)dt$

?

4. Originally Posted by approx
Thank you, Laurent. I'm not sure that I understand the use of an indicator function. Can you please try to explain how I use it to go from:

$\displaystyle \int_0^\infty\left(\int_0^\infty {\bf 1}_{(t\leq y)}f(y) dy\right)dt$

to:

$\displaystyle \int_0^\infty \left(\int_t^{+\infty} f(y) dy\right)dt$

?
Consider (for some fixed $\displaystyle t>0$) $\displaystyle \int_0^\infty {\bf 1}_{(t\leq y)}f(y) dy$. The function that is being integrated is equal to $\displaystyle f(y)$ when $\displaystyle y\geq t$ (because the indicator equals 1), and it is equal to $\displaystyle 0$ when $\displaystyle y<t$ (because the indicator equals 0). So it simplifies into: $\displaystyle \int_t^{+\infty} f(y) dy$ (we integrate only on the values of $\displaystyle y$ where the integrand is not zero, that is for $\displaystyle y$ greater than $\displaystyle t$). Is it clear? I use this operation twice: once to remove the $\displaystyle y$ from the integration sign, and once to put back a $\displaystyle t$.

5. There is also a "visual" way to understand this exchange in the order of integration. Draw the set of all $\displaystyle (t,y)$ such that $\displaystyle 0\leq t\leq y$ (with the $\displaystyle y$-axis as the horizontal axis): this is the part of the plane delimited by the positive $\displaystyle y$-axis and the half-line $\displaystyle t=y$, $\displaystyle t\geq 0$. When you compute $\displaystyle \int_0^\infty\int_0^y f(y) dt\,dy$, you integrate the function $\displaystyle f(y)$ along the vertical slices corresponding to fixed $\displaystyle y$'s, and then you "sum" the slices together. These slices are bounded: from 0 to $\displaystyle y$. And, by Fubini Theorem, the value of the integral does not change if you sum the horizontal slices instead: for each $\displaystyle t$, the slice goes from $\displaystyle t$ to $\displaystyle +\infty$. So that the integral becomes: $\displaystyle \int_0^\infty\int_t^\infty f(y) dy\,dt$. That's clearer when drawn on a paper actually, but I hope you got it anyway.

6. I think I understand now. Thank you for that explanation.