Apache Commons Statistics: DistributionApache Commons Statistics provides a framework and implementations for commonly used probability distributions. Continuous univariate distributions are represented by the ContinuousDistribution interface. Discrete distributions implement DiscreteDistribution (values must be mapped to integers). Example: import org.apache.commons.statistics.distribution.TDistribution; double degreesOfFreedom = 29; TDistribution t = TDistribution.of(degreesOfFreedom); double lowerTail = t.cumulativeProbability(-2.656); // P(T(29) <= -2.656) double upperTail = t.survivalProbability(2.75); // P(T(29) > 2.75) Browse the Javadoc for more information. |