Is there a formula for the variance of a (continuous, non-negative) random variable in terms of its CDF?

The only place I saw such formula was is Wikipedia's page for the Variance (

Unfortunately, I was not able to prove the expression there. Please, can anyone help?

  • If you are not too fussy about rigor, you can find $E(X)$ and $E(X^2)$ by integration by parts. – André Nicolas Aug 31 '15 at 1:55

Here is a derivation of a formula for $E(X^2)$. The calculation is excessively informal. For "nice" density functions it is not difficult to justify. A similar calculation gives us $E(X)$. Then the variance is $E(X^2)-(E(X))^2$.

We find $\int_0^\infty x^2f(x)\,dx$ by integration by parts. Let $u=x^2$ and $dv=f(x)\,dx$. Then $du=2x\,dx$ and we can take $v=F(x)-1$. (Here we are being a little tricky.)

Then our integral is $$\left. x^2(1-F(x))\right|_0^\infty +\int_0^\infty 2x(1-F(x))\,dx.$$ The first part vanishes at both ends. So we find that

$$E(X^2)=\int_0^\infty 2x(1-F(x))\,dx.$$

  • 3
    Thank you very much! You helped me a lot! One more question: should the first part of the integral (the part which vanishes) be (F(x) - 1)x^2? – Felipe Schoemer Jardim Aug 31 '15 at 12:34

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.