3

For a discrete random variable X, $\Omega_X\subseteq \{0,1,2,\ldots\}$, we can write

$$\mathrm{E}[X] = \sum_{x=0}^\infty (1-F(x)) $$

where $F(x)$ is the cumulative distribution function of $X$.

This formula is proving convenient to me on the current problem I'm working on where the cumulative probability of being in a "sink" state naturally comes out of formulating the problem in terms of a transition matrix.

However, I was wondering whether there is an analogous formula for variance in terms of the CDF, or whether if I want the variance I'm going to have to change tack?

I'm thinking there isn't such a formula, because variance is defined as $E[(X-\mu)^2]$ and although $(X-\mu)^2$ is positive, it isn't an integer and so a similar approach won't work.

TooTone
  • 6,343

1 Answers1

4

There is such a thing as $\operatorname{Var}(X)=E[X^2]-(E[X])^2$, and I suspect you can reuse your trick to find $E[X^2]$.


Specifically: if we let $G$ be the cdf for $X^2$, then $G(1)=G(2)=G(3)=F(1)$, $G(4)=G(5)=G(6)=G(7)=G(8)=F(2)$, etc. (This is the "add $2x+1$ to get from $x^2$ to $(x+1)^2$" recurrence.) That means that $$E[X^2] = \sum_{x=0}^\infty (2x+1)(1-F(x)).$$

tabstop
  • 1,598