Hello,

I am using the nextPoisson method of the RandomDataImpl in
commons-math-1.1.jar and having problems as the size of the population
mean value increases.

Code:

package util;

import org.apache.commons.math.random.JDKRandomGenerator;
import org.apache.commons.math.random.RandomDataImpl;

public class PoissonEstimator {

          public double getEstimate(JDKRandomGenerator rand, double popMean) {
                  double estimate;

          RandomDataImpl rdi = new RandomDataImpl(rand);
                  estimate = rdi.nextPoisson(popMean);

                  System.out.println("posisson estimate=" + estimate);

                  return estimate;
          }

                //Unit test
                public static void main(String[] args) {
                        PoissonEstimator pe = new PoissonEstimator();
                        JDKRandomGenerator jdkRandGenerator = new 
JDKRandomGenerator();
                        pe.getEstimate(jdkRandGenerator, 650);

                }
}

so for example a value of 650 returns an expected response, while a value
of 900 returns a value off by a factor of 1000.

Has anyone ran into this before? Am I missing something obvious?  Is it a
bug and if so where should I report the bug (didn't see any entries for
ASF commons in bugzilla).

Many thanks,
Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to