Numerical integration of LogNormal distributions in log space
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
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
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 \ 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).
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
Re: Numerical integration of LogNormal distributions in log space
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.