Package org.apache.commons.math.distribution

Examples of org.apache.commons.math.distribution.ChiSquaredDistribution

@version $Revision: 920852 $ $Date: 2010-03-09 13:53:44 +0100 (mar. 09 mars 2010) $

     * @return p-value
     * @throws IllegalArgumentException if preconditions are not met
     */
    public double chiSquareTest(double[] expected, double[] observed)
        throws IllegalArgumentException, MathException {
        ChiSquaredDistribution chiSquaredDistribution =
            DistributionFactory.newInstance().createChiSquareDistribution(
                (double) expected.length - 1);
        return 1
            - chiSquaredDistribution.cummulativeProbability(
                chiSquare(expected, observed));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.math.distribution.ChiSquaredDistribution

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.