Random numbers from binomial distribution
Posted
by Sarah
on Stack Overflow
See other posts from Stack Overflow
or by Sarah
Published on 2010-05-07T20:27:14Z
Indexed on
2010/05/07
20:58 UTC
Read the original article
Hit count: 195
I need to generate quickly lots of random numbers from binomial distributions for dramatically different trial sizes (most, however, will be small). I was hoping not to have to code an algorithm by hand (see, e.g., this related discussion from November), because I'm a novice programmer and don't like reinventing wheels. It appears Boost does not supply a generator for binomially distributed variates, but TR1 and GSL do. Is there a good reason to choose one over the other, or is it better that I write something customized to my situation? I don't know if this makes sense, but I'll alternate between generating numbers from uniform distributions and binomial distributions throughout the program, and I'd like for them to share the same seed and to minimize overhead. I'd love some advice or examples for what I should be considering.
© Stack Overflow or respective owner