PoissonDistribution extends AbstractIntegerDistribution { public double normalApproximateProbability(int x) { return normal.cumulativeProbability(x + 0.5); } PoissonDistribution(double p);  PoissonDistribution(double p, double epsilon, int maxIterations);  PoissonDistribution(RandomGenerator rng,
                               double p,
                               double epsilon,
                               int maxIterations);  PoissonDistribution(double p, double epsilon);  PoissonDistribution(double p, int maxIterations); double getMean(); double probability(int x); @Override double logProbability(int x); double cumulativeProbability(int x); double normalApproximateProbability(int x); double getNumericalMean(); double getNumericalVariance(); int getSupportLowerBound(); int getSupportUpperBound(); boolean isSupportConnected(); @Override int sample(); static final int DEFAULT_MAX_ITERATIONS; static final double DEFAULT_EPSILON; }
@Test public void testNormalApproximateProbability() { PoissonDistribution dist = new PoissonDistribution(100); double result = dist.normalApproximateProbability(110) - dist.normalApproximateProbability(89); Assert.assertEquals(0.706281887248, result, 1E-10); dist = new PoissonDistribution(10000); result = dist.normalApproximateProbability(10200) - dist.normalApproximateProbability(9899); Assert.assertEquals(0.820070051552, result, 1E-10); }