Boost logo

Boost :

From: Topher Cooper (topher_at_[hidden])
Date: 2007-12-26 14:26:02


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk