The Student Room Group

Continuous r.v. expectation and double integrals

Ok, the questions is to show that, for a non-negative continuous r.v.:

E[X]=0P(X>x)dxE[X]=\int_{0}^{\infty}P(X>x)dx.

First way to do this is integration by parts:
0P(X>x)dx=[xP(X>x)]00x(dP(X>x)dx)dx=0+0xfX(x)dx=E[X]\int_{0}^{\infty}P(X>x)dx=[xP(X>x)]^{\infty}_{0}-\int_{0}^{\infty}x (\frac{ \mathrm{d} P(X>x)}{\mathrm{d} x})dx=0 + \int_{0}^{\infty}xf_{X}(x)dx=E[X]

The second way I was shown is kind of confusing (given I have not really done double integral stuff yet):

E[X]=0P(X>x)dx=0xfX(u)dudx=00ufX(u)dxdu=0fX(u)0udxdu=0fX(u)udu=0ufX(u)du=E[X]E[X]=\int_{0}^{\infty}P(X>x)dx=\int_{0}^{\infty}\int_{x}^{\infty}f_{X}(u)dudx=\int_{0}^{\infty}\int_{0}^{u}f_{X}(u)dxdu=\int_{0}^{\infty}f_{X}(u)\int_{0}^{u}dxdu=\int_{0}^{\infty}f_{X}(u)udu=\int_{0}^{\infty}uf_{X}(u)du=E[X]

The third inequality is where I am unsure. I can "see" why:
0xdudx=00udxdu\int_{0}^{\infty}\int_{x}^{ \infty}dudx=\int_{0}^{\infty}\int_{0}^{u}dxdu by taking the same area above the line u=x by varying u, x integration variables in different order.

But why does this imply the second equality?

Thanks.
Original post by twig

The second way I was shown is kind of confusing (given I have not really done double integral stuff yet):

E[X]=0P(X>x)dx=0xfX(u)dudx=00ufX(u)dxdu=0fX(u)0udxdu=0fX(u)udu=0ufX(u)du=E[X]E[X]=\int_{0}^{\infty}P(X>x)dx=\int_{0}^{\infty}\int_{x}^{\infty}f_{X}(u)dudx=\int_{0}^{\infty}\int_{0}^{u}f_{X}(u)dxdu\\=\int_{0}^{\infty}f_{X}(u)\int_{0}^{u}dxdu=\int_{0}^{\infty}f_{X}(u)udu= \int_{0}^{\infty}uf_{X}(u)du=E[X]

The third inequality is where I am unsure. I can "see" why:
0xdudx=00udxdu\int_{0}^{\infty}\int_{x}^{ \infty}dudx=\int_{0}^{\infty} \int_{0}^{u}dxdu by taking the same area above the line u=x by varying u, x integration variables in different order.

But why does this imply the second equality?

Thanks.


Is this the one you are having trouble with?

00ufX(u)dxdu=0fX(u)0udxdu\displaystyle\int_{0}^{\infty} \int_{0}^{u}f_{X}(u)dxdu=\int_{0}^{\infty}f_{X}(u)\int_{0}^{u}dxdu

If so, fX(u)f_X(u) is just a constant like any other as far as x is concerned (i.e. it's independent of x), and hence can be pulled out of the inner integral.


Had to edit the quote a bit, as the LaTex wasn't working properly.
(edited 11 years ago)
Reply 2
Original post by ghostwalker
Is this the one you are having trouble with?

00ufX(u)dxdu=0fX(u)0udxdu\displaystyle\int_{0}^{\infty} \int_{0}^{u}f_{X}(u)dxdu=\int_{0}^{\infty}f_{X}(u)\int_{0}^{u}dxdu

If so, fX(u)f_X(u) is just a constant like any other as far as x is concerned (i.e. it's independent of x), and hence can be pulled out of the inner integral.


Had to edit the quote a bit, as the LaTex wasn't working properly.


that part is fine, it's the part before which I don't quite follow:

0xfX(u)dudx=00ufX(u)dxdu\displaystyle \int_{0}^{\infty}\int_{x}^{ \infty}f_{X}(u)dudx= \displaystyle \int_{0}^{\infty} \int_{0}^{u}f_{X}(u)dxdu
Reply 3
Original post by twig
that part is fine, it's the part before which I don't quite follow:

0xfX(u)dudx=00ufX(u)dxdu\displaystyle \int_{0}^{\infty}\int_{x}^{ \infty}f_{X}(u)dudx= \displaystyle \int_{0}^{\infty} \int_{0}^{u}f_{X}(u)dxdu


That's just changing the order of the integration. Do a sketch to make sense of the limits.
Reply 4
Original post by BabyMaths
That's just changing the order of the integration. Do a sketch to make sense of the limits.


I can sketch and make sense for:

0xdudx=00udxdu\displaystyle \int_{0}^{\infty}\int_{x}^{ \infty}dudx= \displaystyle \int_{0}^{\infty} \int_{0}^{u}dxdu

but can't visually see how to sketch the required things for:
0xfX(u)dudx=00ufX(u)dxdu\displaystyle \int_{0}^{\infty}\int_{x}^{ \infty}f_{X}(u)dudx= \displaystyle \int_{0}^{\infty} \int_{0}^{u}f_{X}(u)dxdu

Probably missing some obvious stuff as always.
Reply 5
Original post by twig
I can sketch and make sense for:

0xdudx=00udxdu\displaystyle \int_{0}^{\infty}\int_{x}^{ \infty}dudx= \displaystyle \int_{0}^{\infty} \int_{0}^{u}dxdu

but can't visually see how to sketch the required things for:
0xfX(u)dudx=00ufX(u)dxdu\displaystyle \int_{0}^{\infty}\int_{x}^{ \infty}f_{X}(u)dudx= \displaystyle \int_{0}^{\infty} \int_{0}^{u}f_{X}(u)dxdu

Probably missing some obvious stuff as always.

fX(u)f_X(u) is just a function that represents the height of each volume element, with cross-sectional area, dudx. Its not the region you're integrating within as thats defined by the limits, so afaik, you generally don't need to draw it. If you wanted to, you could draw it, but you'd be drawing a surface/plane, depending on the function and not a line, and it can get horrendously difficult to draw by hand.

If it helps, in Rdudx,fX(u)=1\displaystyle \int_{}^{} \int_{R}^{} dudx, f_X(u)=1, where R is the region you're integrating over.
Reply 6
Original post by F1Addict
fX(u)f_X(u) is just a function that represents the height of each volume element, with cross-sectional area, dudx. Its not the region you're integrating within as thats defined by the limits, so afaik, you generally don't need to draw it. If you wanted to, you could draw it, but you'd be drawing a surface/plane, depending on the function and not a line, and it can get horrendously difficult to draw by hand.

If it helps, in Rdudx,fX(u)=1\displaystyle \int_{}^{} \int_{R}^{} dudx, f_X(u)=1, where R is the region you're integrating over.


thanks. then it does make sense (i think!).
Reply 7
Original post by twig
thanks. then it does make sense (i think!).

No problem. I only really started understanding double integrals after I watched the video below.

Quick Reply

Latest