Numerical integration of LogNormal distributions in log space

Hello

Im trying to find the resulting distribution for a convolution (of sorts) of two normal distributions as follows, such that the pdf is given by

$\displaystyle \Pr (z)=\int_{0}^{z}\Pr (N_{1}=x)\Pr (N_{2}=\log (e^{z}-e^{x}))dx$

where

$\displaystyle N_{i}\symbol{126}N(\mu _{i},\sigma _{i})$

The problem I'm having (and the reason this is in the calculus thread) is that the integral can't be evaluated in closed form, so a numerical solution is needed. I've started with Gaussian integration such that the problem becomes

$\displaystyle \Pr (z)\approx \frac{z}{2}\sum\limits_{i=1}^{n}w_{i}\Pr (N_{1}=x_{i})\Pr (N_{2}=\log (e^{z}-e^{x_{i}}))$

In my example, I'm using mu1=5, mu2=6, s1=0.5, s2=2 for 0<z<12

However, this doesn't give a good approximation for large(ish) z. (which can be proved by setting Pr(N1=x)=1 for all x and performing the integration. This becomes the integration of a PDF, which should converge to 1). I think the problem comes down to the fact that the absiccia are appropriately spaced for the x variable, but not for the \$\displaystyle log (e^{z}-e^{x_{i}})$ part. I'm not sure if a different numerical integration scheme would be more appropriate.

I have found, practically, that the following provides a good approximation when z is reasonably large (say >10).

$\displaystyle \Pr (z)\approx \frac{z}{2}\sum\limits_{i=1}^{n}w_{i}\Pr (N_{1}=x_{i})\Pr (N_{2}=\log (e^{z}-e^{x_{i}}))+\Pr (N_{2}=x_{i})\Pr (N_{1}=\log (e^{z}-e^{x_{i}}))$

Which I think works because it effectively samples both PDFs in the good/bad regions. I'm aware that it's not a mathematical solution and won't work for all mu,sigma,z combinations.

As you can tell, i'm not a mathematician, so am struggling with the literature surrounding this. I have found the following paper, but am struggling to deciper it. Gaussian Quadrature Formulae for Arbitrary Positive Measures

It would be great if anyone can shed any light on a more rigorous solution

Cheers

Mat

Re: Numerical integration of LogNormal distributions in log space

Hey matdavies.

In terms of approximations, typically the way that numerical schemes work is that they use more terms in the Taylor series expansion, or they fit some kind of interpolating function (like a spline).

What I would suggest you do is take the Taylor series expansion of your function that you are integrating with an appropriate center and then look at how the higher order terms are expressed and see how quickly they vanish.

If they don't vanish quick, this will tell you that you need more terms or a particular form of integration that accounts for this error and you should read the literature or available books for such techniques.