Examples of probability()


Examples of org.apache.commons.math3.distribution.IntegerDistribution.probability()

    IntegerDistribution ref = new PoissonDistribution(RandomUtils.getRandom().getRandomGenerator(),
                                                      alpha,
                                                      PoissonDistribution.DEFAULT_EPSILON,
                                                      PoissonDistribution.DEFAULT_MAX_ITERATIONS);
    for (int i = 0; i < count.length; i++) {
      assertEquals(ref.probability(i), count[i] / 10000.0, 2.0e-2);
    }
  }
}
View Full Code Here

Examples of org.apache.commons.math3.distribution.PoissonDistribution.probability()

        for (int i = 0; i < len; i++) {
            observed[i] = f.getCount(i + 1);
        }
        final double[] expected = new double[len];
        for (int i = 0; i < len; i++) {
            expected[i] = poissonDistribution.probability(i + 1) * largeSampleSize;
        }
       
        TestUtils.assertChiSquareAccept(expected, observed, 0.0001);
    }

View Full Code Here

Examples of org.apache.commons.math3.distribution.PoissonDistribution.probability()

        for (int i = 0; i < len; i++) {
            observed[i] = f.getCount(i + 1);
        }
        final double[] expected = new double[len];
        for (int i = 0; i < len; i++) {
            expected[i] = poissonDistribution.probability(i + 1) * largeSampleSize;
        }
       
        TestUtils.assertChiSquareAccept(expected, observed, 0.0001);
    }

View Full Code Here

Examples of org.apache.commons.math3.distribution.PoissonDistribution.probability()

        for (int i = 0; i < len; i++) {
            observed[i] = f.getCount(i + 1);
        }
        final double[] expected = new double[len];
        for (int i = 0; i < len; i++) {
            expected[i] = poissonDistribution.probability(i + 1) * largeSampleSize;
        }
       
        TestUtils.assertChiSquareAccept(expected, observed, 0.0001);
    }

View Full Code Here

Examples of org.apache.commons.math3.distribution.PoissonDistribution.probability()

    IntegerDistribution ref = new PoissonDistribution(RandomUtils.getRandom().getRandomGenerator(),
                                                      alpha,
                                                      PoissonDistribution.DEFAULT_EPSILON,
                                                      PoissonDistribution.DEFAULT_MAX_ITERATIONS);
    for (int i = 0; i < count.length; i++) {
      assertEquals(ref.probability(i), count[i] / 10000.0, 2.0e-2);
    }
  }
}
View Full Code Here

Examples of org.apache.commons.math3.distribution.PoissonDistribution.probability()

    final Iterator<?> it = observations.valuesIterator();
    int index = 0;
    while (it.hasNext()) {
      final Long l = (Long) it.next();
      observed[index] = observations.getCount(l);
      expected[index] = pd.probability(l.intValue())
          * observations.getSumFreq();
      if (expected[index] == 0) {
        return false;
      }
      index++;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.