in reply to Re: Fastest way to calculate hypergeometric distribution probabilities (i.e. BIG factorials)?
in thread Fastest way to calculate hypergeometric distribution probabilities (i.e. BIG factorials)?
I could be mistaken but I think this calculates the probability of i successful selections, not i or more successful selections as claimed above. For the cdf, prob of i or more successes, you need to do the following:
my $hypercdf = 0; for (my $iref=$i; $iref < min($N,$n); $iref++) { $hypercdf += hypergeom($n,$m,$N,$iref); } print $hypercdf;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Fastest way to calculate hypergeometric distribution probabilities (i.e. BIG factorials)?
by Alokito (Novice) on Jun 06, 2011 at 11:30 UTC |
In Section
Seekers of Perl Wisdom