}
TestUtils.assertChiSquareAccept(densityPoints, expectedCounts, observedCounts, .001);
}
public void testNextPascal() throws Exception {
PascalDistributionTest testInstance = new PascalDistributionTest("");
int[] densityPoints = testInstance.makeDensityTestPoints();
double[] densityValues = testInstance.makeDensityTestValues();
int sampleSize = 1000;
int length = TestUtils.eliminateZeroMassPoints(densityPoints, densityValues);
PascalDistributionImpl distribution = (PascalDistributionImpl) testInstance.makeDistribution();
double[] expectedCounts = new double[length];
long[] observedCounts = new long[length];
for (int i = 0; i < length; i++) {
expectedCounts[i] = sampleSize * densityValues[i];
}