Following this thread "Does a univariate random variable's mean always equal the integral of its quantile function?" I tried to do a similar thing for a conditional expectation. It seems like my stochastic skills are a bit rusty. For a continuous r.v. with support on the real line I think that it holds

$ E[X|X<q_\theta] = \int_{-\infty}^\infty x f(x|x<q_\theta)dx = ... = \frac{1}{F(q_\theta)} \int_{-\infty}^{q_\theta} x f(x)dx = \frac{1}{\theta} \int_{0}^{\theta}F^{-1} (p) dp$

where $q_\theta$ is the $\theta$ quantile and $f(x)$ is the density, $F(x)$ is the cdf and $F^{-1}(x)$ is the quantile function.

EDIT: My solution so far is

$E[X|X<q_\theta]=\int xf(x|x<q_\theta)dx = \int x \frac{f(x)P(x<q_\theta|X=x)}{\int f(u)P(u<q_\theta|X=u)du}dx = \frac{1}{\int f(u) 1{(u<q_\theta)}du} \int x f(x) 1{(x<q_\theta)}dx= \frac{1}{F(q_\theta)} \int_{-\infty}^{q_\theta} xf(x)dx = \frac{1}{\theta} \int_{0}^{\theta}F^{-1} (p) dp$

using the relationsip

$f(x|B)=\frac{f(x)P(B|X=x)}{\int f(x)P(B|X=x)dx}$

See here http://www.randomservices.org/random/dist/Conditional.html

Is this alright? Thanks a lot in advance for any suggestions!

  • 3
    $\begingroup$ I believe that if you consult your favorite definition of conditional distribution, this question will resolve itself easily. In particular I am thinking of the relationship $\Pr(A|B)\Pr(B)=\Pr(A)$ where $A$ is the event $X\le x$ and $B$ is the event $X\le q_\theta$. $\endgroup$
    – whuber
    Commented Jun 19, 2014 at 19:02
  • 1
    $\begingroup$ Two notes. Firstly, $P(X=x)$ for any random variable $X$ which has a continuous distribution is 0. Secondly, I think you need the denominator in your first step. Specifically $ E\left[X\vert X<q_\theta\right] = \frac{\int_{-\infty}^\infty xf(x\vert x < q_\theta)dx}{\int_{-\infty}^\infty f(x\vert x < q_\theta)dx}$ The expectation is only over the viable area. $\endgroup$
    – Avraham
    Commented Jun 19, 2014 at 19:25
  • $\begingroup$ See edit in the original question. It would be nice if someone could confirm the correctness of the solution. Thanks a lot for your help so far!! $\endgroup$
    – Joz
    Commented Jun 20, 2014 at 19:19

1 Answer 1


The random variable $X$ has the same law as $F^{-1}(U)$ where $U$ has the uniform distribution on $[0,1]$. Thus we can assume $X=F^{-1}(U)$, and the event $\{X \leq q_\theta\}$ equals $\{U \leq \theta\}$. Conditionally to this event, $U$ has density $\frac{1}{\theta}{\boldsymbol 1}_{[0,\theta]}(u)$. Then $$ E[X \mid X \leq q_\theta] = E[F^{-1}(U) \mid U \leq \theta] = \frac{1}{\theta}\int_0^\theta F^{-1}(u)\mathrm{d}u. $$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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