Quantcast
Channel: Math.NET Numerics
Viewing all articles
Browse latest Browse all 971

New Post: Hypergeometric function not working correctly

$
0
0
I tried to use Hypergeometric cummulative distribution in Math.Net like below:

var hyper = new MathNet.Numerics.Distributions.Hypergeometric(30,15,10);
Console.WriteLine ("{0},", hyper.CumulativeDistribution(3)); -->0.025087456
Console.WriteLine("{0},", hyper.Probability(3)); -->0.097451274

However, the result is different from excel Hypergeometric distribution function for the cummulative distribution. The Math.Net hyper.CumulativeDistribution (3) = Excel HYPEGEOM.DIST(2,10,15,30,1). Off by 1 position.

Excel: HYPEGEOM.DIST(3,10,15,30,1) = 0.122538731
     HYPEGEOM.DIST(3,10,15,30,0) = 0.097451274
Please let me know whether it is intended to be like this or there is a mistakes in the calc.

Thanks.

Viewing all articles
Browse latest Browse all 971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>