As part of my research, I am having trouble calculating the 2nd L moment $\lambda_2$ and the third and fourth moment ratios $\tau_3$ and $\tau_4$ of the standard normal distribution, where L moments are defined as they are in this paper (Hosking 1990), page 3.

Take $\lambda_2$ for example.

$\lambda_2 = \frac{1}{2} [ EX_{2:2} - EX_{1:2}] \\ \implies \lambda_2 = \int_{-\infty}^{\infty} xF(x)f(x) dx - EX + \int_{-\infty}^{\infty} x F(x) f(x) dx \\ = \ \cdots \\ = \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} x e^{-x^2/2} dx + \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} x \ erf(\frac{x}{\sqrt{2}}) e^{-x^2/2} dx \\ = \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} x \ erf(\frac{x}{\sqrt{2}}) e^{-x^2/2} dx$

There must be an error in my calculation as this is supposed to be equal to $\frac{1}{\sqrt{ \pi}}$.

$\lambda_3 = \frac{1}{3}E(X_{3:3} - 2X_{2:3}+X_{1:3}) = \int_0^1 x(F) (6F^2 - 6F + 1) dF$ $\lambda_4 = \frac{1}{4}E(X_{4:4} - 3X_{3:4}+3X_{2:4} -X_{1:4}) = \int_0^1 x(F) (20F^3 - 30F^2 + 12F - 1) dF$ $\tau_3 = \frac{\lambda_3}{\lambda_2}$ $\tau_4 = \frac{\lambda_4}{\lambda_2}$

$\tau_3$'s formula is rather involved.

EDIT: I was able to figure it out. Instead of working through the integral as an ugly function of exponentials, x's and erf, work through it as a function of a power of F multiplied by the inverse erf term. The latter is analytically tractable. I am not sure the former is.


Using the formula (2.4) in the paper you refer to, we get (with $f$ the gaussian pdf and $F$ the cdf) $$\begin{aligned} \lambda_2 &= \int_{-\infty}^{+\infty} x (2F(x) - 1) f(x) d x \\ &= 2\int_{-\infty}^{+\infty} x F(x) f(x) d x\\ \end{aligned}$$ Let $g(x) = x f(x) = {x \over \sqrt{2\pi}} e^{-x^2\over 2}$. This is the derivative of $G(x) = -{1\over \sqrt{2\pi}} e^{-x^2\over 2}$. We have $G(x) = -f(x)$. Integration by parts gives

$$\begin{aligned} {1\over 2} \lambda_2 &= \int_{-\infty}^{+\infty} F(x) g(x) d x\\ &= \Bigl[ F(x) G(x) \Bigr]_{-\infty}^{+\infty} - \int_{-\infty}^{+\infty} f(x) G(x) d x \\ &= \int_{-\infty}^{+\infty} f^2(x) dx \\ &= {1\over 2 \pi} \int_{-\infty}^{+\infty} e^{-x^2} d x \\ &= {1\over 2 \pi} \sqrt{\pi} \end{aligned}$$ and $\lambda_2 = {1 \over \sqrt{\pi}}$.

Edit I tried to check if the same computation is tractable for higher $L$-moments. I had hard times but after a while I found the following, which this seems ok but a bit cumbersome. Everything boils down to computing $$ I_k = \int_{-\infty}^{+\infty} x F^k(x) f(x) dx.$$ Integration by part seem to lead nowhere. A change of variable $y = -x$ leads to $$ I_k = - \int_{-\infty}^{+\infty} y (1 -F(y))^k f(y) dy,$$ hence $$ I_k = - \sum_{\ell=1}^k (-1)^{\ell} {k \choose \ell} I_\ell.$$ For $k=2, 3$, this leads to $I_2 = I_1$. For $k=4, 5$, this leads to two linear equations in $I_1, I_2, I_3, I_4$, allowing to compute $I_3$ and $I_4$ from $I_1$. This can be continued... I really can’t find anything simpler. I think this trick is well known – but not by me.

  • $\begingroup$ Sadly it took me a little more than 12 minutes to figure this out (I am getting old), so I didn’t see your final edit and answered anyway. $\endgroup$ – Elvis Dec 22 '12 at 6:27
  • $\begingroup$ Thanks Elvis. This is a useful way of thinking about it nonetheless. $\endgroup$ – Dan Dec 22 '12 at 15:54
  • $\begingroup$ No problem, it’s always good to do that kind of things from time to time. But I am curious about your solution. The solution you sketch is basically working with a change of variable $w = F(x)$. For $\lambda_2$ this gives $\sum_0^1 F^{-1}(w) w dw$, and $I_k$ is $\sum_0^1 F^{-1}(w) w^k dw$. Any computation done with $w$ can be mimicked with $x$. Do you have a simpler solution?! $\endgroup$ – Elvis Dec 22 '12 at 17:15
  • $\begingroup$ Well, it happens to be more analytically tractable for numerical integration. For example in Wolfram Mathematica (Alpha) this would calculate $I_1$: Integrate[Sqrt[2]*InverseErf[-1 + 2*x]*(x^1),{x,0,1}]. As one goes to higher $I_k$, as you rightly show, this becomes more and more useful... $\endgroup$ – Dan Dec 22 '12 at 19:29
  • $\begingroup$ Oh, I thought you had an analytic solution, not a numeric one. I think your intuition is wrong. If you’re performing numerical integration with fixed step size, the behavior of $F^{-1}(w)$ near to the bounds (where it goes to the infinity) could lead to very bad results. As an exact solution is available, you should go for it, but if for some reason you really prefer to do numerical integration, integrating the form with $x F^k(x) f(x)$ between -10 and 10 seems a better option to me. $\endgroup$ – Elvis Dec 22 '12 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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