in reply to Hypergeometric Distribution

If you don't want to bother with some library (and don't have to worry about numerical issues), I would suggest NIST's engineering statistics handbook.