final Multiset<String> k2 = HashMultiset.create();
for (int i = 0; i < 50000; i++) {
k2.add(x2.sample());
}
final NormalDistribution normal = new NormalDistribution();
List<Double> scores = Ordering.natural().sortedCopy(Iterables.transform(k1.elementSet(),
new Function<String, Double>() {
public Double apply(String s) {
return normal.cumulativeProbability(LogLikelihood.rootLogLikelihoodRatio(k1.count(s), 50000 - k1.count(s), k2.count(s), 50000 - k2.count(s)));
}
}));
int n = scores.size();
// System.out.printf("%.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f", scores.get(0), scores.get((int) (0.05*n)), scores.get(n / 4), scores.get(n / 2), scores.get(3 * n / 4), scores.get((int) (0.95 * n)), scores.get(n - 1));
int i = 0;