Package org.apache.commons.math3.distribution

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


         *  evaluated at the random value from the distribution should match the uniform
         *  random value used to generate it, which is stored in the quantiles[] array.
         */
        for (int i = 0; i < 10; i++) {
            double value = betaDistribution.sample();
            Assert.assertEquals(betaDistribution.cumulativeProbability(value), quantiles[i], 10E-9);
        }
    }

    @Test
    public void testNextBeta() {
View Full Code Here


         *  evaluated at the random value from the distribution should match the uniform
         *  random value used to generate it, which is stored in the quantiles[] array.
         */
        for (int i = 0; i < 10; i++) {
            double value = betaDistribution.sample();
            Assert.assertEquals(betaDistribution.cumulativeProbability(value), quantiles[i], 10E-9);
        }
    }

    @Test
    public void testNextBeta() {
View Full Code Here

         *  evaluated at the random value from the distribution should match the uniform
         *  random value used to generate it, which is stored in the quantiles[] array.
         */
        for (int i = 0; i < 10; i++) {
            double value = betaDistribution.sample();
            Assert.assertEquals(betaDistribution.cumulativeProbability(value), quantiles[i], 10E-9);
        }
    }

    @Test
    public void testNextBeta() {
View Full Code Here

        // pass a null rng to avoid unneeded overhead as we will not sample from this distribution
        final BinomialDistribution distribution = new BinomialDistribution(null, 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;
View Full Code Here

        final BinomialDistribution distribution = new BinomialDistribution(null, 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

        }

        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;
View Full Code Here

        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

            }

            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;
View Full Code Here

            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

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.