Examples of FDistribution

@version $Revision: 545192 $ $Date: 2007-06-07 07:35:04 -0700 (Thu, 07 Jun 2007) $
  • org.apache.commons.math3.distribution.FDistribution
    pedia.org/wiki/F-distribution">F-distribution (Wikipedia) @see F-distribution (MathWorld)

  • Examples of org.apache.commons.math.distribution.FDistribution

         * is the commons-math implementation of the F distribution.</p>
         */
        public double anovaPValue(Collection<double[]> categoryData)
            throws IllegalArgumentException, MathException {
            AnovaStats a = anovaStats(categoryData);
            FDistribution fdist = new FDistributionImpl(a.dfbg, a.dfwg);
            return 1.0 - fdist.cumulativeProbability(a.F);
        }
    View Full Code Here

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

         * is the commons-math implementation of the F distribution.</p>
         */
        public double anovaPValue(Collection<double[]> categoryData)
            throws IllegalArgumentException, MathException {
            AnovaStats a = anovaStats(categoryData);
            FDistribution fdist = new FDistributionImpl(a.dfbg, a.dfwg);
            return 1.0 - fdist.cumulativeProbability(a.F);
        }
    View Full Code Here

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

         * is the commons-math implementation of the F distribution.</p>
         */
        public double anovaPValue(Collection<double[]> categoryData)
            throws IllegalArgumentException, MathException {
            AnovaStats a = anovaStats(categoryData);
            FDistribution fdist = new FDistributionImpl(a.dfbg, a.dfwg);
            return 1.0 - fdist.cumulativeProbability(a.F);
        }
    View Full Code Here

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

         * is the commons-math implementation of the F distribution.</p>
         */
        public double anovaPValue(Collection categoryData)
            throws IllegalArgumentException, MathException {
            AnovaStats a = anovaStats(categoryData);
            FDistribution fdist = new FDistributionImpl(a.dfbg, a.dfwg);
            return 1.0 - fdist.cumulativeProbability(a.F);
        }
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.FDistribution

         * @return random value sampled from the F(numeratorDf, denominatorDf) distribution
         * @throws NotStrictlyPositiveException if
         * {@code numeratorDf <= 0} or {@code denominatorDf <= 0}.
         */
        public double nextF(double numeratorDf, double denominatorDf) throws NotStrictlyPositiveException {
            return new FDistribution(getRandomGenerator(), numeratorDf, denominatorDf,
                    FDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample();
        }
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.FDistribution

            IntervalUtils.checkParameters(numberOfTrials, numberOfSuccesses, confidenceLevel);
            double lowerBound = 0;
            double upperBound = 0;
            final double alpha = (1.0 - confidenceLevel) / 2.0;

            final FDistribution distributionLowerBound = new FDistribution(2 * (numberOfTrials - numberOfSuccesses + 1),
                                                                           2 * numberOfSuccesses);
            final double fValueLowerBound = distributionLowerBound.inverseCumulativeProbability(1 - alpha);
            if (numberOfSuccesses > 0) {
                lowerBound = numberOfSuccesses /
                             (numberOfSuccesses + (numberOfTrials - numberOfSuccesses + 1) * fValueLowerBound);
            }

            final FDistribution distributionUpperBound = new FDistribution(2 * (numberOfSuccesses + 1),
                                                                           2 * (numberOfTrials - numberOfSuccesses));
            final double fValueUpperBound = distributionUpperBound.inverseCumulativeProbability(1 - alpha);
            if (numberOfSuccesses > 0) {
                upperBound = (numberOfSuccesses + 1) * fValueUpperBound /
                             (numberOfTrials - numberOfSuccesses + (numberOfSuccesses + 1) * fValueUpperBound);
            }

    View Full Code Here

    Examples of org.apache.commons.math3.distribution.FDistribution

            ConvergenceException, MaxCountExceededException {

            final AnovaStats a = anovaStats(categoryData);
            // No try-catch or advertised exception because args are valid
            // pass a null rng to avoid unneeded overhead as we will not sample from this distribution
            final FDistribution fdist = new FDistribution(null, a.dfbg, a.dfwg);
            return 1.0 - fdist.cumulativeProbability(a.F);

        }
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.FDistribution

            throws NullArgumentException, DimensionMismatchException,
                   ConvergenceException, MaxCountExceededException {

            final AnovaStats a = anovaStats(categoryData, allowOneElementData);
            // pass a null rng to avoid unneeded overhead as we will not sample from this distribution
            final FDistribution fdist = new FDistribution(null, a.dfbg, a.dfwg);
            return 1.0 - fdist.cumulativeProbability(a.F);

        }
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.FDistribution

            TestUtils.assertChiSquareAccept(expected, counts, 0.001);
        }

        @Test
        public void testNextF() {
            double[] quartiles = TestUtils.getDistributionQuartiles(new FDistribution(12, 5));
            long[] counts = new long[4];
            randomData.reSeed(1000);
            for (int i = 0; i < 1000; i++) {
                double value = randomData.nextF(12, 5);
                TestUtils.updateCounts(value, counts, quartiles);
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.FDistribution

         * @param denominatorDf the denominator degrees of freedom of the F distribution
         * @return random value sampled from the F(numeratorDf, denominatorDf) distribution
         * @since 2.2
         */
        public double nextF(double numeratorDf, double denominatorDf) {
            return nextInversionDeviate(new FDistribution(numeratorDf, denominatorDf));
        }
    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.