# Expected value as a function of quantiles?

I was wondering where there is a general formula to relate the expected value of a continuous random variable as a function of the quantiles of the same r.v. The expected value of r.v. $X$ is defined as:
$E(X) = \int x dF_X(x)$ and quantiles are defined as : $Q^p_X = \{x : F_X(x) = p \} =F_X^{-1}(p)$ for $p\in(0,1)$.

Is there for instance a function function $G$ such that: $E(X) = \int_{p\in(0,1)} G(Q^p_X) dp$

## 1 Answer

The inverse (right inverse in discrete case) of the cumulative distribution function $F(x)$ is called the quantile function, often denoted $Q(p)=F^{-1}(p)$. The expectation $\mu$ can be given in terms of the quantile function (when the expectation exists ...) as $$\mu=\int_0^1 Q(p)\; dp$$ For the continuous case, this can be showed via a simple substitution in the integral: Write $$\mu = \int x f(x) \; dx$$ and then $p=F(x)$ via implicit differentiation leads to $dp = f(x) \; dx$: $$\mu = \int x \; dp = \int_0^1 Q(p) \; dp$$ We got $x=Q(p)$ from $p=F(x)$ by applying $Q$ on both sides.

• Can you have a look at this question please? I think your insights might be helpful. – luchonacho Sep 4 '18 at 14:53