The art of computer programming, volume 2 (3rd ed.): seminumerical algorithms
The art of computer programming, volume 2 (3rd ed.): seminumerical algorithms
IEEE Computational Science & Engineering
Computing in Science and Engineering
Computing in Science and Engineering
Hi-index | 0.00 |
A colleague recently asked for a way to sample from a Poisson distribution to simulate the way metallic flakes cluster in paint. The flakes aren't distributed uniformly at random throughout the paint binder but form clusters around center points. The number of flakes around a center is distributed like the Poisson distribution. In this installment of "Computing Prescriptions," we give three ways to sample from the Poisson distribution. We describe the usual method, a faster method that uses some preprocessing, and an even faster method with more preprocessing. The last two methods work with any discrete probability distribution. Depending on how often we need to generate samples, paying extra for a deluxe model of sample generation might be worth it