# Find expected value using cdf

I'm going to start out by saying this is a homework problem straight out of the book. I have spent a couple hours looking up how to find expected values and have determined I understand nothing.

Let $X$ have the cdf $F(x) = 1 - x^{-\alpha}, x\ge1$. Find $E(X)$ for those values of $\alpha$ for which $E(X)$ exists.

I have no idea how to even start this. How can I determine which values of $\alpha$ exist? I also don't know what to do with the cdf (I'm assuming this means Cumulative Distribution Function). There are forumlas for finding the expected value hwne you have a frequency function or density function. Wikipedia says the CDF of $X$ can be defined in terms of the probability density function ƒ as follows:

$F(x) = \int_{-\infty}^x f(t)\,dt$

This is as far as I got. Where do I go from here?

EDIT: I meant to put $x\ge1$.

-

Edited for the comment from probabilityislogic

Note that $F(1)=0$ in this case so the distribution has probability $0$ of being less than $1$, so $x \ge 1$, and you will also need $\alpha > 0$ for an increasing cdf.

If you have the cdf then you want the anti-integral or derivative which with a continuous distribution like this

$$f(x) = \frac{dF(x)}{dx}$$

and in reverse $F(x) = \int_{1}^x f(t)\,dt$ for $x \ge 1$.

Then to find the expectation you need to find

$$E[X] = \int_{1}^{\infty} x f(x)\,dx$$

providing that this exists. I will leave the calculus to you.

-
@henry - $F(1)=1-1^{-\alpha}=1-1=0$, so support can't be below 1 (as CDF is a non-decreasing function) –  probabilityislogic Apr 30 '11 at 6:59
@probabilityislogic: You may be correct in terms of the book. I will change my response. –  Henry Apr 30 '11 at 9:49
Thanks for the response. What does f(x) represent? The probability density function? Is the derivative of the cdf always f(x)? –  styfle Apr 30 '11 at 20:23
$f(x)$ is indeed supposed to be the probability density function. If the cdf has a derivative then it is the density, though there are distributions (for example discrete) where the cdf does not have a derivative everywhere –  Henry Apr 30 '11 at 20:24
@styfle: If it exists then $E[X^2] = \int_{1}^{\infty} x^2 f(x)\,dx$, and similarly for the expectations of other functions of $x$. –  Henry Apr 30 '11 at 22:08
show 1 more comment

I think you actually mean $x\geq 1$, otherwise the CDF is vacuous, as $F(1)=1-1^{-\alpha}=1-1=0$.

What you "know" about CDFs is that they eventually approach zero as the argument $x$ decreases without bound and eventually approach one as $x \to \infty$. They are also non-decreasing, so this means $0\leq F(y)\leq F(x)\leq 1$ for all $y\leq x$.

So if we plug in the CDF we get:

$$0\leq 1-x^{-\alpha}\leq 1\implies 1\geq \frac{1}{x^{\alpha}}\geq 0\implies x^{\alpha}\geq 1 > 0\implies x\geq 1 \>.$$

From this we conclude that the support for $x$ is $x\geq 1$. Now we also require $\lim_{x\to\infty} F(x)=1$ which implies that $\alpha>0$

To work out what values the expectation exists, we require:

$$\newcommand{\rd}{\mathrm{d}}E(X)=\int_{1}^{\infty}x\frac{\rd F(x)}{\rd x}\rd x=\alpha\int_{1}^{\infty}x^{-\alpha} \rd x$$

And this last expression shows that for $E(X)$ to exist, we must have $-\alpha<-1$, which in turn implies $\alpha>1$. This can easily be extended to determine the values of $\alpha$ for which the $r$'th raw moment $E(X^{r})$ exists.

-
(+1) Particularly for the sharp-eyed recognition that the given support was incorrect. –  cardinal Apr 30 '11 at 14:00
Thanks for the response. I fixed the question. I meant to put x>=1. How did you know to first differentiate the cdf to get the density function? –  styfle Apr 30 '11 at 20:37
@styfle - because that's what a PDF is, whenever the CDF is continuous and differentiable. You can see this by looking at how you have defined your CDF. Differentiating an integral just gives you the integrand when the upper limit is the subject of the differentiation. –  probabilityislogic May 1 '11 at 1:00
@styfle - the PDF can also be seen as the probability that a RV lies in an infinitesimal interval. $Pr(x<X<x+dx)=F(x+dx)-F(x)\to \frac{dF(x)}{dx}dx=f(x)dx$ as $dx\to 0$. This way holds more generally, even for discrete RV and RV without a density (the limit is just something other than a derivative) –  probabilityislogic May 1 '11 at 1:04

# Usage of the density function is not necessary

## Integrate 1 minus the CDF

When you have a random variable $X$ that has a support that is non-negative (that is, the variable has nonzero density/probability for only positive values), you can use the following property:

$$E(X) = \int_0^\infty \left( 1 - F_X(x) \right) \,\mathrm{d}x$$

A similar property applies in the case of a discrete random variable.

## Proof

Since $1 - F_X(x) = P(X\geq x) = \int_x^\infty f_X(t) \,\mathrm{d}t$,

$$\int_0^\infty \left( 1 - F_X(x) \right) \,\mathrm{d}x = \int_0^\infty P(X\geq x) \,\mathrm{d}x = \int_0^\infty \int_x^\infty f_X(t) \,\mathrm{d}t \mathrm{d}x$$

Then change the order of integration:

$$= \int_0^\infty \int_0^t f_X(t) \,\mathrm{d}x \mathrm{d}t = \int_0^\infty \left[xf_X(t)\right]_0^t \,\mathrm{d}t = \int_0^\infty t f_X(t) \,\mathrm{d}t$$

Recognizing that $t$ is a dummy variable, or taking the simple substitution $t=x$ and $\mathrm{d}t = \mathrm{d}x$,

$$= \int_0^\infty x f_X(x) \,\mathrm{d}x = \mathrm{E}(X)$$