Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to calculate the expectation of function of random variable without using probability density function? Note:- only cumulative distribution function is available. For example $E[g(X)]$=? where X is nonnegative r.v. with CDF $F_{X}(x)$.

share|cite|improve this question
If $X$ is a non-negative random variable, then $\int_0^{+\infty}(1-F_X(t))dt=E X$ (use Fubini's theorem). – Davide Giraudo Dec 16 '11 at 17:12
What do we know about $g$? Are there other assumptions than measurable? – Davide Giraudo Dec 16 '11 at 17:33
g(X) can be any function linear of exponential no further assumptions. – dikuve Dec 16 '11 at 17:43
Just for trivia, the rule you would use is called the "law of unconscious statistician", as you don't actually know the distribution of $g$. – r.g. Dec 16 '11 at 18:48
Thanks @r.g. for the trivia. – dikuve Dec 17 '11 at 5:24
up vote 3 down vote accepted

If $X\geqslant0$ almost surely and if $g$ is regular, $$ \mathrm E(g(X))=g(0)+\int_0^{+\infty}g'(x)\cdot(1-F_X(x))\cdot\mathrm dx. $$ Proof: integrate with respect to $\mathrm P$ both sides of the almost sure relation $$ g(X)=g(0)+\int_0^{+\infty}g'(x)\cdot[x\lt X]\cdot\mathrm dx, $$ where $[\ \ ]$ denotes Iverson bracket.

share|cite|improve this answer
You omitted g'(x) in the second integral. I like it, it's a very nice generalisation of the equality mentioned by @DavideGiraudo in the first comment below the question. – savick01 Dec 16 '11 at 20:24
@savick01: Yes, thanks. – Did Dec 16 '11 at 20:27

I'm going to hazard a guess about what the original poster might mean. Suppose wone knows the probability density function of $X$ but not of $g(X)$. My guess is that it is the latter that is not to be used. In that case, one can write $$ \mathbb{E}(g(X)) = \int_{-\infty}^\infty g(x)f(x)\;dx $$ where $f$ is the probability density function of $f$. In other words, one doesn't need to find the probability density function of $g(X)$.

share|cite|improve this answer
I am also not interested in finding the PDF of g(X). The question is How we can find the $E[g(X)]$ without using $f(x)$. Whereas we are having CDF of X i.e. $F_{X}(x)$. – dikuve Dec 17 '11 at 5:22

At least formally, the probability density function is $f(X) = dF/dX$, so

$ E[g(X)] = \int dX f(X) g(X) = \int dX g(X) dF/dX = Fg(X_f) - Fg(X_i) - \int dX F(X) dg/dX $.

So if $g(X)$ is differentiable, and $g$ is finite at the endpoints of the domain of $X$ ($X_f$ and $X_i$), then you can try to evaluate the integral above.

share|cite|improve this answer
Please: Don't use the capital $X$ to refer to two different things on the same line. First you wrote $E[g(X)]$, where $X$ is a random variable, then you used the same capital $X$ as the variable of integration. – Michael Hardy Dec 16 '11 at 19:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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