118119120121122123124125
p.addOccurrence(-1, (this.rand.nextDouble()) * i); } for (int i = 0; i < num_samples; i++) { p.addOccurrence(i, i); } assertEquals(0.5, roundToDecimals(p.calculate(), 1)); } }