# Expected Shortfall Formula in terms of P

Let $X$ be a continuous random variable and $Q_x$ is the associated quantile function. Show that expected shortfall $ES_X[p]$ at the confidence level $p$ which is defined as
$$ES_X[p]=\Bbb E[X|X\leq Q_x(1-p)]$$ has the representation $$ES_X[p]=\frac{1}{1-p}\int_0^{1-p} Q_x(a)da.$$

Can some one give me a hint for this?

I know the definition of quantile function $Q_X(p)=\inf\{x: F_x \geq p\}$, I can think of it on an intuitive level, but want some thoughts to get started mathematically

• Intuitively, it is the average of the worst possible losses (so in your case left tail of the probability distribution) so you sum them all up and divide by the number of the values in the integral ~length. Dowd, K. (2007): Measuring market risk. John Wiley & Sons. is a really good reference in my opininon. – Jan Sila Dec 8 '16 at 15:09

\begin{align*} ES_X(p) &=E\left(X \mid X\le Q_X(1-p)\right)\\ &=\int_{-\infty}^{\infty} x\, \phi\left(x \mid x\le Q_X(1-p)\right) dx \\ &=\int_{-\infty}^{\infty} x\, \frac{\phi\left(x\le Q_X(1-p) \mid x \right)\phi(x)}{\int_{-\infty}^{\infty} \phi\left(u\le Q_X(1-p) \mid u \right)\phi(u) du } dx \end{align*} Now simply note that $$\phi\left(x \le Q_X(1-p) \mid x \right) = 1\left\{ x \le Q_X(1-p) \right\}$$ to be able to rewrite the integral as in the second line in Gordon's answer \begin{align*} ES_X(p) &= \frac{E\left(X\, 1_{X\le Q_X(1-p)} \right)}{P(X\le Q_X(1-p))} \\ &= \frac{1}{1-p} \int_{-\infty}^{Q_X(1-p)} x\, \phi(x) dx \end{align*} a change of variable $x \to y=\Phi(x)$ (the cdf of $X$) finishes the demonstration.
• is it possible to use your approach if $X$ is a discrete random variable? – Nick Dec 9 '16 at 0:42
• @Nick Absolutely, the Bayes formula can also be written out in that case, see here en.wikipedia.org/wiki/Bayes'_theorem#Random_variables. As a matter of fact I made an abuse of notation. Let $X$ be the continuous random variable that it is and let $Y =1\{X \leq Q_X(1-p)\}$ represent a discrete random variable. Given these notations, I should have written: $$\phi(x \mid x \leq Q_X(1-p)) = \phi(x \mid Y=1) = \frac{P(Y=1 \mid X=x)\phi(x)}{P(Y=1)}$$ with $P(Y=1 \mid X=x) = 1\{x \leq Q_X(1-p)\}$ – Quantuple Dec 9 '16 at 7:56
Note that $Q_X$ is the pseudo-inverse of the distribution function $F$, and for any uniform random variable $U$ over $[0, 1]$, the random variable $Q_X(U)$ has the same distribution as $X$. Moreover, since $X$ is continuous, $Q_X$ is strictly increasing. Proofs of these facts are purely mathematical, and can be discussed some other questions.