# Integrating the tail exponent of a Pareto Distribution (difficult integrals).

Looking for two difficult integrals, whichever is solved first:

With $\alpha>0,L>0, \mu>0,\sigma>0, a>0, b>0, x>L$ , $$\phi_l (x;\mu,\sigma)=\frac{1}{\sqrt{2 \pi } \sigma }\int_0^{\infty } \alpha L^{\alpha } x^{-\alpha -1} e^{-\frac{(\alpha -\mu )^2}{2 \sigma ^2}} \, \mathrm{d}\alpha$$ and $$\phi_g (x;a,b)=\frac{b^{-\frac{a}{b}} }{\Gamma \left(\frac{a}{b}\right)}\int_0^{\infty } e^{-\frac{\alpha }{b}} L^{\alpha } x^{-\alpha -1} \alpha ^{a/b}\, \mathrm{d}\alpha$$

Background: these correspond to the density of a Pareto distribution $\alpha L^{\alpha } x^{-\alpha -1}$ with its tail exponent $\alpha$: 1) Lognormally distributed in the first case, and 2) following a Gamma distribution in the second case.

With gratitude.

$\textbf{Later Comment}$: It turned out that the first integral was not the Lognormally distributed exponent (I copied the wrong equation), but I leave here for its calculus/integration interest, rather than distributional importance. –

The first integral is

$$\frac1{\sqrt{2 \pi} \sigma x} \int_0^{\infty} d\alpha \, \alpha \, e^{\alpha \log{(L/x)}} e^{-(\alpha-\mu)^2/(2 \sigma^2)}$$

This basically has the form

$$C \int_0^{\infty} d\alpha \, \alpha \, e^{-A (\alpha+B)^2} = C \int_B^{\infty} d\alpha \, (\alpha-B) e^{-A \alpha^2}$$

which is an error function plus an exponential term.

The second integral is

$$\frac{b^{-a/b}}{x \Gamma \left ( \frac{a}{b} \right )}\int_0^{\infty} d\alpha \, \alpha^{a/b} \, e^{- \alpha (1/b + \log{(x/L)})} = \frac{a}{b} \frac{b^{-a/b}}{x \left ( \frac1{b} + \log{\left (\frac{L}{x} \right )} \right )^{a/b+1} }$$

because the integral is a Gamma function.

• Great, I will parametrize and revert. Thanks. – Nero Mar 6 '15 at 0:10

Let's start with $\phi_l$:

\begin{align} \phi_l(x;\mu,\sigma) &= \frac{L}{\sqrt{2\pi \sigma^2}}\int_0^\infty \alpha \left(\frac{L}{x}\right)^{\alpha - 1} e^{-\tfrac{(\alpha - \mu)^2}{2\sigma^2}}\, d\alpha\\ &= \frac{L}{\sqrt{2\pi \sigma^2}} \frac{d}{dy}\bigg|_{y = L/x} \int_0^\infty y^\alpha e^{-\tfrac{(\alpha - \mu)^2}{2\sigma^2}}\, d\alpha\\ &= \frac{L}{\sqrt{2\pi \sigma^2}} \frac{d}{dy}\bigg|_{y = L/x} \int_0^\infty e^{-\tfrac{(\alpha - \mu)^2}{2\sigma^2} + \alpha \ln y}\, d\alpha\\ &= \frac{L}{\sqrt{2\pi \sigma^2}}\frac{d}{dy}\bigg|_{y = L/x} \int_0^\infty e^{-\tfrac{(\alpha - \mu - \sigma^2\ln y)^2 + \mu^2 - (\mu + \sigma^2 \ln y)^2}{2\sigma^2}}\, d\alpha\\ &= \frac{L}{\sqrt{2\pi \sigma^2}} \frac{d}{dy}\bigg|_{y = L/x} e^{-\tfrac{\mu^2 - (\mu + \sigma^2 \ln y)^2}{2\sigma^2}} \int_0^\infty e^{-\tfrac{(\alpha - \mu - \sigma^2\ln y)^2}{2\sigma^2}}\, d\alpha\\ &= \frac{L}{\sqrt{2\pi \sigma^2}} \frac{d}{dy}\bigg|_{y = L/x} e^{\mu\ln y\, + \frac{\sigma^2}{2}\ln^2 y} \sqrt{2\pi \sigma^2}\operatorname{erfc}\left(-\frac{\mu + \sigma^2\ln y}{\sqrt{2\sigma^2}}\right)\\ &= x\exp\left\{-\mu\ln \frac{x}{L} + \frac{\sigma^2}{2}\ln^2 \frac{x}{L}\right\}\left(\mu - \sigma^2 \ln \frac{x}{L}\right) \operatorname{erfc}\left(-\frac{\mu + \sigma^2 \ln y}{\sqrt{2\sigma^2}}\right)\\ &\quad + \frac{\sigma x}{\sqrt{2}}\exp\left\{-\mu\ln \frac{x}{L} + \frac{\sigma^2}{2}\ln^2 \frac{x}{L}-\frac{(\mu - \sigma^2 \ln \frac{x}{L})^2}{2\sigma^2}\right\}. \end{align}

Now with $\phi_g$:

\begin{align} \phi_g(x;a,b) &= \frac{b^{-\tfrac{a}{b}}}{x\Gamma\left(\frac{a}{b}\right)} \int_0^\infty \alpha^{\tfrac{a}{b}} e^{-\left(\frac{1}{b} + \ln \frac{x}{L}\right)\alpha}\, d\alpha\\ &= \frac{b^{-\frac{a}{b}}}{x\Gamma\left(\frac{a}{b}\right)} \left(\frac{1}{b} + \ln \frac{x}{L}\right)^{-\frac{a}{b} - 1}\int_0^\infty u^{\frac{a}{b}} e^{-u}\, du, \quad u = \left(\frac{1}{b} + \ln \frac{x}{L}\right)\alpha\\ &= \frac{b^{-\frac{a}{b}}}{x\Gamma\left(\frac{a}{b}\right)} \left(\frac{1}{b} + \ln \frac{x}{L}\right)^{-\frac{a}{b} - 1} \Gamma\left(\frac{a}{b} + 1\right)\\ &= \frac{b^{-\frac{a}{b}}}{x\Gamma\left(\frac{a}{b}\right)} \left(\frac{1}{b} + \ln \frac{x}{L}\right)^{-\frac{a}{b} - 1} \frac{a}{b}\Gamma\left(\frac{a}{b}\right)\\ &= \frac{a}{x}b^{-\frac{a}{b} - 1} \left(\frac{1}{b} + \ln \frac{x}{L}\right)^{-\frac{a}{b} - 1}\\ &= \frac{a}{x}\left(1 + b\ln \frac{x}{L}\right)^{-\frac{a}{b} - 1}. \end{align}

• Thanks a million. The second integrates to 1. Checking the first. – Nero Mar 5 '15 at 19:51
• The first integral doesn't work. – Nero Mar 5 '15 at 22:50
• Not yet. There is the error function that is missin (first integral) – Nero Mar 6 '15 at 0:11
• @Nero I initially calculated the first integral thinking that the lower limit was $-\infty$. Hopefully, I haven't made any errors with the last equality, but the second-to-last equality is correct. – kobe Mar 6 '15 at 1:13

$$\phi_l (x;\mu,\sigma)=\frac{1}{\sqrt{2 \pi } \sigma }\int_0^{\infty } \alpha L^{\alpha } x^{-\alpha -1} e^{-\frac{(\alpha -\mu )^2}{2 \sigma ^2}} \, \mathrm{d}\alpha$$ we can right as $$\frac{1}{\sqrt{2 \pi } \sigma }\int_0^{\infty } \alpha L^{\alpha } \mathrm{e}^{-(\alpha+1)\ln x} e^{-\frac{(\alpha -\mu )^2}{2 \sigma ^2}} \, \mathrm{d}\alpha =\frac{1}{\sqrt{2 \pi } \sigma }\mathrm{e}^{-\ln x} \int_0^{\infty } \alpha L^{\alpha } e^{-\left(\frac{(\alpha -\mu )^2}{2 \sigma ^2}+\alpha\ln x\right)} \, \mathrm{d}\alpha$$ nowe we can write $$\alpha L^{\alpha} = L\dfrac{d}{dL}L^{\alpha}$$ thus the integral is $$\frac{1}{\sqrt{2 \pi } \sigma }\mathrm{e}^{-\ln x} L\dfrac{\partial}{\partial L}\int_0^{\infty } L^{\alpha } e^{-\left(\frac{(\alpha -\mu )^2}{2 \sigma ^2}+\alpha\ln x\right)} \, \mathrm{d}\alpha = \frac{1}{\sqrt{2 \pi } \sigma }\mathrm{e}^{-\ln x} L\dfrac{\partial}{\partial L}\int_0^{\infty } \mathrm{e}^{\alpha \ln L}e^{-\left(\frac{(\alpha -\mu )^2}{2 \sigma ^2}+\alpha\ln x\right)} \, \mathrm{d}\alpha$$ now $$\frac{(\alpha -\mu )^2}{2 \sigma ^2}+\alpha\ln x - \alpha \ln L = \frac{\alpha^2 + 2\left((\ln x - \ln L )\sigma^2 -\mu\right)\alpha + \mu^2}{2\sigma^2}\\ = \frac{\left(\alpha + \left((\ln x - \ln L )\sigma^2 -\mu\right)\right)^2 + \mu^2 - \left(\left((\ln x - \ln L )\sigma^2 -\mu\right)\right)^2}{2\sigma^2}$$ we can clean it up a bit to yeild $$\frac{\left(\alpha+\sigma^2\ln\frac{x}{L}-\mu\right)^2}{2\sigma^2}-\frac{\left(\sigma^2\ln\frac{x}{L}-\mu\right)^2-\mu^2}{2\sigma^2}$$ thus your first integral looks like this $$\frac{1}{\sqrt{2 \pi } \sigma }\mathrm{e}^{-\ln x} L\dfrac{\partial}{\partial L}\mathrm{e}^{+\frac{\left(\sigma^2\ln\frac{x}{L}-\mu\right)^2-\mu^2}{2\sigma^2}} \int_0^{\infty } \mathrm{e}^{-\frac{\left(\alpha+\sigma^2\ln\frac{x}{L}-\mu\right)^2}{2\sigma^2}} \, \mathrm{d}\alpha$$ now if your parameters within the integral are bounded (which i guess they have to be apart from $\alpha$) then you have an integral of the form $$\int^\infty_0\mathrm{e}^{-\frac{(x-\bar{\mu})^2}{2\sigma^2}}dx$$ to solve?