I have a set of benchmark data for which I compute summary statistics using Apache Math Commons. Now I want to use the package to compute confidence intervals for the arithmetic means of e.g. running time measurements.
Is this possible at all? I am convinced that the package supports this, however I am at a loss about where to start.
This is the solution I ended up using with the help of Brent Worden's suggestion:
private double getConfidenceIntervalWidth(StatisticalSummary statistics, double significance) {
TDistribution tDist = new TDistribution(statistics.getN() - 1);
double a = tDist.inverseCumulativeProbability(1.0 - significance / 2);
return a * statistics.getStandardDeviation() / Math.sqrt(statistics.getN());
}