/** * Creates an ExperimentStatistics object from an ExperimentCounts object. * * @param counts an ExperimentCounts object containing all the counts for this experiment * @param metric the binomial metric object to use for statistics calculations * @param effectSize the effect size of interest to use for statistics calculations * @return ExperimentStatistics */ ExperimentStatistics calculateExperimentStatistics(final ExperimentCounts counts, BinomialMetric metric, double effectSize, Parameters.Mode mode) { ExperimentStatistics statistics = new ExperimentStatistics.Builder() .withExperimentCounts(counts) .withBuckets(calculateBucketStatistics(counts.getBuckets(), metric, effectSize, mode)) .build(); analysisTools.generateRate(statistics, metric); analysisTools.generateProgress(statistics); return statistics; }
Map<Bucket.Label, BucketBasicStatistics> bucketsWithStats = new HashMap<>(); for (BucketCounts bucket : perDayCount.getBuckets().values()) { BucketBasicStatistics bucketWithStats = new BucketBasicStatistics.Builder() .withBucketCounts(bucket) ExperimentStatistics cumulativeStatistics = new ExperimentStatistics.Builder() .withExperimentCounts(cumulativeCount) .withBuckets(calculateBucketStatistics(cumulativeCount.getBuckets(), metric, effectSize, parameters.getMode())) .build();