Probability question about calculating a expected value of a continuous random variable (A alternative way that I'm stumped on)

88 Views Asked by At

I'm a senior studying calculus based probability and also studying for exam P. I need help walking through every part of this problem please. I understand there is a different way to do it but I need to know how to do the double integration way. I can't seem to visually or conceptually understand the problem and for me that is necessary. Here is a link to the problem.

Expected value of a continuous random variable: interchanging the order of integration

I just don't get what is going on when we are integrating, why does the inner integral go from y to infinity then from 0 to x. I just don't understand the process, I just was wondering if someone could walk me through each step and explain what is going on. I understand and derived out the other method which is A + the integral from A to B of 1-F(x) dx, where F(x) is the cumulative distribution function or just the anti-derivative of f(x).

1

There are 1 best solutions below

2
On BEST ANSWER

Here is an equation similar to the one in the proof, in which the inner integral bounds are $y$ to infinity on the left of the equation and $0$ to $x$ on the right: $$ \int_0^\infty \int_y^\infty f_Y(x)\,dx\,dy = \int_0^\infty \int_0^x f_Y(x)\,dy\,dx. $$ In this form I think it's a little clearer that the only things that change are the order of the integration variables and the bounds of the inner integral.

Both sides of the equation are integrating over the same region of integration. The region is the infinite area above the $x$-axis and below the line $y=x,$ shown as the shaded portion of the figure below.

enter image description here

Each integral integrates $f_Y(x)$ over the entire shaded region. On the left side, to find any of the points in the region of integration, you first choose $y$ within the bounds given by the outer integral and then choose $x$ within the bounds given by the inner integral. Observe that in the shaded region, $y$ is never greater than $x$; instead, $x$ is always greater than or equal to $y.$ Hence the only $x$ values over which we can integrate are between $y$ and infinity; but at any particular value of $y,$ all the $x$ values from $y$ to inifinity give points in the integration region. So the bounds on the left are correct.

On the right, the outer integral is over $dx,$ so to find a point in the integration region of this integral you first choose $x$ within the bounds of the outer integral and then choose $y$ within the bounds of the inner integral. On this side, for any given $x,$ the $y$ values in the shaded region are $0 \leq y \leq x,$ so we integrate over $y$ from $0$ to $x.$

The rest of the proof is just further rewriting of the same integral to or from one of these two forms. In particular, we can rewrite the right-hand side this way: \begin{align} \int_0^\infty \int_0^x f_Y(x)\,dy\,dx &= \int_0^\infty \left( \int_0^x f_Y(x)\,dy\right)dx \\ &= \int_0^\infty \left( f_Y(x) \int_0^x dy\right)dx \\ &= \int_0^\infty \left(\int_0^x dy\right) f_Y(x)\,dx, \end{align} and now we have the right-hand side in the form in which it was written in the proof.


As an aside (to relate this to the answers to the other question), the formal proof of the integral equation uses things called "indicator functions" to identify the region of integration in the figure above. In the proof, each indicator function takes the value $1$ whenever the pair of variables $(x,y)$ is in the shaded region of the figure, and the indicator function takes the value $0$ everywhere else. That way the proof can set the integral up as an integral over the entire first quadrant, for $0 \leq x < \infty$ and $0 \leq y < \infty,$ and because the integrand is multiplied by the indicator function, which is zero everywhere in the unshaded region, the integration over the unshaded region is just an integral of zero, which comes out to zero. As a result, the integral over the entire first quadrant comes out to just the positive value contributed by the shaded region.