Example usage for org.apache.commons.math.distribution FDistribution inverseCumulativeProbability

List of usage examples for org.apache.commons.math.distribution FDistribution inverseCumulativeProbability

Introduction

In this page you can find the example usage for org.apache.commons.math.distribution FDistribution inverseCumulativeProbability.

Prototype

double inverseCumulativeProbability(double p) throws MathException;

Source Link

Document

For this distribution, X, this method returns x such that P(X < x) = p.

Usage

From source file:geogebra.kernel.statistics.AlgoInverseFDistribution.java

protected final void compute() {

    if (input[0].isDefined() && input[1].isDefined() && input[2].isDefined()) {
        double param = a.getDouble();
        double param2 = b.getDouble();
        double val = c.getDouble();
        try {//from w  w w.java 2  s. c o m
            FDistribution dist = getFDistribution(param, param2);
            num.setValue(dist.inverseCumulativeProbability(val)); // P(T <= val)
        } catch (Exception e) {
            e.printStackTrace();
            num.setUndefined();
        }
    } else
        num.setUndefined();
}

From source file:geogebra.common.kernel.statistics.AlgoInverseFDistribution.java

@Override
public final void compute() {

    if (input[0].isDefined() && input[1].isDefined() && input[2].isDefined()) {
        double param = a.getDouble();
        double param2 = b.getDouble();
        double val = c.getDouble();
        try {/*from  w  ww  . j a  va  2  s .co  m*/
            FDistribution dist = getFDistribution(param, param2);
            num.setValue(dist.inverseCumulativeProbability(val)); // P(T <=
            // val)
        } catch (Exception e) {
            e.printStackTrace();
            num.setUndefined();
        }
    } else
        num.setUndefined();
}