Skip to content

Instantly share code, notes, and snippets.

import org.apache.commons.math3.distribution.TDistribution;
import org.apache.commons.math3.exception.MathIllegalArgumentException;
import org.apache.commons.math3.stat.descriptive.SummaryStatistics;
public class ConfidenceIntervalApp {
public static void main(String args[]) {
// data we want to evaluate: average height of 30 one year old male and female toddlers
// interestingly, at this age height is not bimodal yet
double data[] = new double[] { 63.5, 81.3, 88.9, 63.5, 76.2, 67.3, 66.0, 64.8, 74.9, 81.3, 76.2, 72.4, 76.2, 81.3, 71.1, 80.0, 73.7, 74.9, 76.2, 86.4, 73.7, 81.3, 68.6, 71.1, 83.8, 71.1, 68.6, 81.3, 73.7, 74.9 };
public List<Snippet> listSnippets() throws IOException {
verifyRootDirectoryExists();
File[] txtfiles = DIRECTORY.listFiles(new FileFilter() {
public boolean accept(File file) {
return file.isFile() && !file.isHidden() && file.getName().endsWith(".txt");
}
});
File[] titlefiles = DIRECTORY.listFiles(new FileFilter() {
public boolean accept(File file) {
return file.isFile() && !file.isHidden() && title.getName().endsWith(".title");