Hypergeometric distribution

Robert Kern robert.kern at gmail.com
Thu Jan 5 10:47:02 EST 2006


Bengt Richter wrote:
> On 4 Jan 2006 12:46:47 -0800, "Raven" <balckraven at gmail.com> wrote:

>>The problem with Stirling's approximation is that I need to calculate
>>the hypergeometric hence the factorial for numbers within a large range
>>e.g. choose(14000,170) or choose(5,2)
> 
> It seems you are hinting at some accuracy requirements that you haven't
> yet explained. I'm curious how you use the values, and how that affects your
> judgement of Stirling's approximation. In fact, perhaps the semantics of your
> value usage could even suggest an alternate algorithmic approach to your actual end result.

Does it matter? Implementing Stirling's approximation is pointless when
scipy.special.gammaln() or scipy.special.gamma() does it for him.

-- 
Robert Kern
robert.kern at gmail.com

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the Python-list mailing list