Example usage for org.apache.commons.math3.distribution TDistribution probability

List of usage examples for org.apache.commons.math3.distribution TDistribution probability

Introduction

In this page you can find the example usage for org.apache.commons.math3.distribution TDistribution probability.

Prototype

public double probability(double x0, double x1) 

Source Link

Document

For a random variable X whose values are distributed according to this distribution, this method returns P(x0 < X <= x1) .

Usage

From source file:de.bund.bfr.knime.pmm.common.math.MathUtilities.java

public static double getPValue(double tValue, int degreesOfFreedom) {
    TDistribution dist = new TDistribution(degreesOfFreedom);

    return 1.0 - dist.probability(-Math.abs(tValue), Math.abs(tValue));
}