Re: [boost] [random] poisson_distribution problem and fix

At 01:33 PM 12/26/2007, you wrote:
Well, sure. But the [random] poisson_distribution function doesn't return the normal at high means. It returns 0 (slowly!). That's just wrong. It should either be fixed or throw an exception.
. . .
How far off is the Poisson distribution from the normal at a mean of 750? How large a sample would you need to have, say, a one in a thousand chance of detecting the difference? (I don't know the answer, but if there is a problem at that extreme, its a question that should be answered before getting too fancy with "precise" solutions).
Topher
I was implying (when I should have been saying) that at some point the error of generating a *normal* random variant with a mean and standard deviate of lambda instead of a "for real" Poisson becomes too small to have any practical significance. If large lambdas are causing problems then one solution is to see if this is only occurring sufficiently far into that regime then it might make sense to just generate a normal instead. Scaling and shifting by 750 is not likely to cause much rounding errors for a standard normal deviate, but many direct algorithms for that extreme a value are likely to run into numerical problems. Topher

At 02:26 PM 12/26/2007, I wrote:
I was implying (when I should have been saying) that at some point the error of generating a *normal* random variant with a mean and standard deviate of lambda instead of a "for real" Poisson becomes too small to have any practical significance. If large lambdas are causing problems then one solution is to see if this is only occurring sufficiently far into that regime then it might make sense to just generate a normal instead. Scaling and shifting by 750 is not likely to cause much rounding errors for a standard normal deviate, but many direct algorithms for that extreme a value are likely to run into numerical problems.
Topher
I checked this out. The difference between the two curves (Poisson[750] and Normal[750, Sqrt(750)]) is very small -- when plotted, almost indistinguishable to the eye. In total, the absolute difference between the two is about 1%. The largest single error was that using the normal generator would result in 729 being generated with a probability of 0.01086 instead of 0.01098. While that is unlikely to have much effect on most applications, it is possible that a large simulation that is very sensitive to the precise probabilities might be thrown off, so I withdraw this suggestion. Topher
participants (1)
-
Topher Cooper