Package org.apache.commons.math3.distribution

Examples of org.apache.commons.math3.distribution.BetaDistribution.cumulativeProbability()


            final BinomialDistribution distribution = new BinomialDistribution(numberOfTrials, probability);
            switch (alternativeHypothesis) {
                case GREATER_THAN:
                    return 1 - distribution.cumulativeProbability(numberOfSuccesses - 1);
                case LESS_THAN:
                    return distribution.cumulativeProbability(numberOfSuccesses);
                case TWO_SIDED:
                    int criticalValueLow = 0;
                    int criticalValueHigh = numberOfTrials;
                    double pTotal = 0;
View Full Code Here


        ExponentialFamily normal = new UnivariateGaussian();
        PVector p = new PVector(1);
        p.array[0] = 32;

        System.out.println(bn.cumulativeProbability(32));
        System.out.println(n.cumulativeProbability(32));
        System.out.println(normal.density(p, param_norm));

        p.array[0] = 27;
        System.out.println(bn.cumulativeProbability(27));
View Full Code Here

        System.out.println(bn.cumulativeProbability(32));
        System.out.println(n.cumulativeProbability(32));
        System.out.println(normal.density(p, param_norm));

        p.array[0] = 27;
        System.out.println(bn.cumulativeProbability(27));
        System.out.println(n.cumulativeProbability(27));
        System.out.println(n.density(27));
        System.out.println(normal.density(p, param_norm));

        p.array[0] = 60;
View Full Code Here

        System.out.println(n.cumulativeProbability(27));
        System.out.println(n.density(27));
        System.out.println(normal.density(p, param_norm));

        p.array[0] = 60;
        System.out.println(bn.cumulativeProbability(60));
        System.out.println(n.cumulativeProbability(60));
        System.out.println(n.density(60));
        System.out.println(normal.density(p, param_norm));

View Full Code Here

        DimensionMismatchException, MaxCountExceededException {

        // pass a null rng to avoid unneeded overhead as we will not sample from this distribution
        final ChiSquaredDistribution distribution =
            new ChiSquaredDistribution(null, expected.length - 1.0);
        return 1.0 - distribution.cumulativeProbability(chiSquare(expected, observed));
    }

    /**
     * Performs a <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda35f.htm">
     * Chi-square goodness of fit test</a> evaluating the null hypothesis that the
View Full Code Here

        checkArray(counts);
        double df = ((double) counts.length -1) * ((double) counts[0].length - 1);
        // pass a null rng to avoid unneeded overhead as we will not sample from this distribution
        final ChiSquaredDistribution distribution = new ChiSquaredDistribution(df);
        return 1 - distribution.cumulativeProbability(chiSquare(counts));

    }

    /**
     * Performs a <a href="http://www.itl.nist.gov/div898/handbook/prc/section4/prc45.htm">
View Full Code Here

        MaxCountExceededException {

        // pass a null rng to avoid unneeded overhead as we will not sample from this distribution
        final ChiSquaredDistribution distribution =
                new ChiSquaredDistribution(null, (double) observed1.length - 1);
        return 1 - distribution.cumulativeProbability(
                chiSquareDataSetsComparison(observed1, observed2));

    }

    /**
 
View Full Code Here

            DimensionMismatchException, MaxCountExceededException {

        // pass a null rng to avoid unneeded overhead as we will not sample from this distribution
        final ChiSquaredDistribution distribution =
                new ChiSquaredDistribution(null, expected.length - 1.0);
        return 1.0 - distribution.cumulativeProbability(g(expected, observed));
    }

    /**
     * Returns the intrinsic (Hardy-Weinberg proportions) p-Value, as described
     * in p64-69 of McDonald, J.H. 2009. Handbook of Biological Statistics
View Full Code Here

            DimensionMismatchException, MaxCountExceededException {

        // pass a null rng to avoid unneeded overhead as we will not sample from this distribution
        final ChiSquaredDistribution distribution =
                new ChiSquaredDistribution(null, expected.length - 2.0);
        return 1.0 - distribution.cumulativeProbability(g(expected, observed));
    }

    /**
     * Performs a G-Test (Log-Likelihood Ratio Test) for goodness of fit
     * evaluating the null hypothesis that the observed counts conform to the
View Full Code Here

            MaxCountExceededException {

        // pass a null rng to avoid unneeded overhead as we will not sample from this distribution
        final ChiSquaredDistribution distribution =
                new ChiSquaredDistribution(null, (double) observed1.length - 1);
        return 1 - distribution.cumulativeProbability(
                gDataSetsComparison(observed1, observed2));
    }

    /**
     * <p>Performs a G-Test (Log-Likelihood Ratio Test) comparing two binned
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.