Package org.apache.commons.math.distribution

Examples of org.apache.commons.math.distribution.ChiSquaredDistribution.cumulativeProbability()


    throws IllegalArgumentException, MathException {
        checkArray(counts);
        double df = ((double) counts.length -1) * ((double) counts[0].length - 1);
        ChiSquaredDistribution chiSquaredDistribution =
            getDistributionFactory().createChiSquareDistribution(df);
        return 1 - chiSquaredDistribution.cumulativeProbability(chiSquare(counts));
    }

    /**
     * @param counts array representation of 2-way table
     * @param alpha significance level of the test
View Full Code Here


    public double chiSquareTest(double[] expected, long[] observed)
        throws IllegalArgumentException, MathException {
        ChiSquaredDistribution chiSquaredDistribution =
            getDistributionFactory().createChiSquareDistribution(
                    (double) expected.length - 1);
        return 1 - chiSquaredDistribution.cumulativeProbability(
                chiSquare(expected, observed));
    }

    /**
     * @param observed array of observed frequency counts
View Full Code Here

    throws IllegalArgumentException, MathException {
        checkArray(counts);
        double df = ((double) counts.length -1) * ((double) counts[0].length - 1);
        ChiSquaredDistribution chiSquaredDistribution =
            getDistributionFactory().createChiSquareDistribution(df);
        return 1 - chiSquaredDistribution.cumulativeProbability(chiSquare(counts));
    }

    /**
     * @param counts array representation of 2-way table
     * @param alpha significance level of the test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.