Hi, I'm using  commons math 2.2 and the values from the hypergeometric 
distribution do not seem to match an alternative implementation (from R 
2.15.1). The code I'm using is

        HypergeometricDistributionImpl d = 
                new HypergeometricDistributionImpl(2550, 61, 8);
        double logp = Math.log(1 - d.cumulativeProbability(7));

Using JDK 1.6.1, logp comes out to be -30.258290927468533

However, on R 2.15.1 when doing 

        phyper(7, 61, 2489, 8, lower=F, log.p=T)

I get -30.33188

This seems to be a pretty big difference and in the project that I'm using 
commons-math prevents me from porting some R code to Java.

Can anybody confirm these results? Is this a bug? Or am I invoking something in 
the wrong way?

Pointers would be appreciated.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to