# Finding E(X) from distribution function

1. May 17, 2010

### kingwinner

Theorem: Let F(x) be the distribution function of X.
If X is any r.v. (discrete, continuous, or mixed) defined on the interval [a,∞) (or some subset of it), then
E(X)=

∫ [1 - F(x)]dx + a
a

1) Is this formula true for any real number a? In particular, is it true for a<0?

2) When is this formula ever useful (computationally)? Why don't just get the density function then integrate to find E(X)?

Thanks for clarifying!

2. May 17, 2010

### Hurkyl

Staff Emeritus
1) If there was a restriction on a, the statement of the theorem should have said something. If the statement is right for positive a, then it's surely right for negative a as well.

2) Why would you go through all the trouble of looking for the density distribution*, multiplying by x, and integrating that when you could just use that formula?

*: The hypotheses cover the situation where the density cannot be written as a function

3. May 17, 2010

### Mandark

The formula for general RV X is $$EX = -\int_{-\infty}^{0} F(x) dx + \int_{0}^{\infty} (1 - F(x)) dx$$. This formula works in a much more general setting than you might expect. Some distributions don't have densities (singular distributions), for example http://en.wikipedia.org/wiki/Cantor_distribution but the formula still applies.

4. May 18, 2010

### kingwinner

I've seen this general formula. But does it imply that the "theorem" above is true for a<0 (e.g. a=-2, or a=-2.4) as well? I've done some manipulations and I think the theorem above is true for ANY a, but I would like someone to confirm this.

Thanks!

5. May 18, 2010

### Mandark

Try to prove it by manipulating the general formula I posted, it's not hard.