[SciPy-User] characteristic functions of probability distributions
nicky van foreest
vanforeest@gmail....
Sun Nov 8 14:30:36 CST 2009
Hi Joseph,
> Thanks Nicky, I looked at some papers by Ward Whitt and they look
> interesting but much more than what I want to chew on right now.
I understand. I wish I had the time to study these papers in more detail.
> I don't think I ever needed a path integral in my life,
That must be a most undesirable state of affairs, :-)
> integral exp(i t x)dF(x) = integrate.quad(real(exp(itx)*f(x))) + j *
> integrate.quad(imag(exp(itx)*f(x)))
> or is there another way?
Perhaps you recall that Re(exp(ix)) = cos(x), and Im(exp(ix) =
sin(x). Hence, you might try simply:
integrate.quad(cos(tx)f(x)) + i integrate.quad(sin(tx) f(x))
(untested code though..)
I have my doubt about the stability of these integrations, although I
am by no means an expert on this. Suppose that t is big. Then cos(tx)
varies rapidly in comparison to f(x) as a function of x. Then you are
adding lots of negative and possitive numbers of roughly the same
size... This must result in bogus.
Perhaps it is better not to include any "generic" code to tranform the
characteristic function into a density, unless the methods work
reasonably well.
bye
Nicky
More information about the SciPy-User
mailing list