Examples of cumulativeProbability()

@param x the value at which the CDF is evaluated. @return CDF for this distribution. @throws MathException if the cumulative probability can not becomputed due to convergence or other numerical errors.
  • org.apache.commons.math.distribution.NormalDistributionImpl.cumulativeProbability()
    For this distribution, X, this method returns P(X < x). If xis more than 40 standard deviations from the mean, 0 or 1 is returned, as in these cases the actual value is within Double.MIN_VALUE of 0 or 1. @param x the value at which the CDF is evaluated. @return CDF evaluated at x. @throws MathException if the algorithm fails to converge
  • org.apache.commons.math.distribution.PoissonDistribution.cumulativeProbability()
  • org.apache.commons.math.distribution.PoissonDistributionImpl.cumulativeProbability()
    The probability distribution function P(X <= x) for a Poisson distribution. @param x the value at which the PDF is evaluated. @return Poisson distribution function evaluated at x @throws MathException if the cumulative probability can not be computeddue to convergence or other numerical errors.
  • org.apache.commons.math.distribution.TDistribution.cumulativeProbability()
  • org.apache.commons.math.distribution.TDistributionImpl.cumulativeProbability()
    For this distribution, X, this method returns P(X < x). @param x the value at which the CDF is evaluated. @return CDF evaluated at x. @throws MathException if the cumulative probability can not becomputed due to convergence or other numerical errors.
  • org.apache.commons.math.distribution.WeibullDistribution.cumulativeProbability()
  • org.apache.commons.math3.distribution.BetaDistribution.cumulativeProbability()
    {@inheritDoc}
  • org.apache.commons.math3.distribution.BinomialDistribution.cumulativeProbability()
    {@inheritDoc}
  • org.apache.commons.math3.distribution.ChiSquaredDistribution.cumulativeProbability()
    {@inheritDoc}
  • org.apache.commons.math3.distribution.FDistribution.cumulativeProbability()
    orld.wolfram.com/F-Distribution.html"> F-Distribution, equation (4).
  • org.apache.commons.math3.distribution.GammaDistribution.cumulativeProbability()
    orld.wolfram.com/Chi-SquaredDistribution.html"> Chi-Squared Distribution, equation (9).
  • Casella, G., & Berger, R. (1990). Statistical Inference. Belmont, CA: Duxbury Press.
  • org.apache.commons.math3.distribution.IntegerDistribution.cumulativeProbability()
    For a random variable {@code X} whose values are distributed accordingto this distribution, this method returns {@code P(X <= x)}. In other words, this method represents the (cumulative) distribution function (CDF) for this distribution. @param x the point at which the CDF is evaluated @return the probability that a random variable with thisdistribution takes a value less than or equal to {@code x}
  • org.apache.commons.math3.distribution.NormalDistribution.cumulativeProbability()
    {@inheritDoc}If {@code x} is more than 40 standard deviations from the mean, 0 or 1is returned, as in these cases the actual value is within {@code Double.MIN_VALUE} of 0 or 1.
  • org.apache.commons.math3.distribution.PoissonDistribution.cumulativeProbability()
    {@inheritDoc}
  • org.apache.commons.math3.distribution.RealDistribution.cumulativeProbability()
    For a random variable {@code X} whose values are distributed accordingto this distribution, this method returns {@code P(x0 < X <= x1)}. @param x0 the exclusive lower bound @param x1 the inclusive upper bound @return the probability that a random variable with this distributiontakes a value between {@code x0} and {@code x1}, excluding the lower and including the upper endpoint @throws NumberIsTooLargeException if {@code x0> x1} @deprecated As of 3.1. In 4.0, this method will be renamed{@code probability(double x0, double x1)}.
  • org.apache.commons.math3.distribution.TDistribution.cumulativeProbability()
    {@inheritDoc}

  • Examples of org.apache.commons.math.distribution.BetaDistributionImpl.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 = randomData.nextInversionDeviate(betaDistribution);
                assertEquals(betaDistribution.cumulativeProbability(value), quantiles[i], 10E-9);
            }
        }
       
        public void testNextBeta() throws Exception {
            double[] quartiles = TestUtils.getDistributionQuartiles(new BetaDistributionImpl(2,5));
    View Full Code Here

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

        double score = 0;
        for(int i=success;i<=trials;i++) {
          score += bd.probability(i);
        }
        //double score = bd.cumulativeProbability(success-1);
        System.out.println("bd:\t" + trials + "\t" + success + "\t" + prob + "\t" + (1.0-score) + "\t" + bd.cumulativeProbability(success-1));
        return 1.0 - score;
      }
     
      /**
       * @param args
    View Full Code Here

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

        double score = 0;
        for(int i=success;i<=trials;i++) {
          score += bd.probability(i);
        }
        //double score = bd.cumulativeProbability(success-1);
        System.out.println("bd:\t" + trials + "\t" + success + "\t" + prob + "\t" + (1.0-score) + "\t" + bd.cumulativeProbability(success-1));
        return 1.0 - score;
      }
     
      /**
       * @param args
    View Full Code Here

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

            double et = (t + f) * ratio;
            double ef = (t + f) * (1.0 - ratio);
            long [] obsArray = new long[]{t, f};
            double [] expectArray = new double[]{et, ef};
            double cs = cst.chiSquare(expectArray, obsArray);
            if(beforeCutOff && ((1.0 - csd.cumulativeProbability(mcNemarScores.get(s))) / foo) > 0.05) {
              System.out.println(count - 1);
              beforeCutOff = false;
              //break;
            }
            System.out.println(s + "\t" + b + "\t" + c + "\t" + t + "\t" + f + "\t" + mcNemarScores.get(s)
    View Full Code Here

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

            double et = (t + f) * ratio;
            double ef = (t + f) * (1.0 - ratio);
            long [] obsArray = new long[]{t, f};
            double [] expectArray = new double[]{et, ef};
            double cs = cst.chiSquare(expectArray, obsArray);
            if(beforeCutOff && ((1.0 - csd.cumulativeProbability(mcNemarScores.get(s))) / foo) > 0.05) {
              System.out.println(count - 1);
              beforeCutOff = false;
              //break;
            }
            System.out.println(s + "\t" + b + "\t" + c + "\t" + t + "\t" + f + "\t" + mcNemarScores.get(s)
    View Full Code Here

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

        final ContinuousDistribution studentT = new TDistributionImpl(n - k);
        for (int i = 0; i < k; i++) {
          standardErrorsOfBeta[i] = Math.sqrt(meanSquareError * covarianceBetas[i][i]);
          tStats[i] = betas[i] / standardErrorsOfBeta[i];
          try {
            pValues[i] = 1 - studentT.cumulativeProbability(Math.abs(tStats[i]));
          } catch (final org.apache.commons.math.MathException e) {
            throw new com.opengamma.analytics.math.MathException(e);
          }
        }
        return new WeightedLeastSquaresRegressionResult(betas, residuals, meanSquareError, standardErrorsOfBeta, rSquared, adjustedRSquared, tStats, pValues,
    View Full Code Here

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

         */
        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);
        }

        /**
         * {@inheritDoc}<p>
         * This implementation uses the
    View Full Code Here

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

         */
        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);
        }

        /**
         * {@inheritDoc}<p>
         * This implementation uses the
    View Full Code Here

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

      private double lognormalCDF(double x, double mu, double sigma) {
        NormalDistributionImpl z = new NormalDistributionImpl();
        double ans;
        try {
          ans = z.cumulativeProbability((Math.log(x)-mu)/sigma);
        } catch (MathException e) {
          if (Math.log(x) < mu) ans = 0;
          else ans = 1;
        }
        return ans;
    View Full Code Here

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

             *  Start with upper and lower tail bins.
             *  Lower bin = [0, lower); Upper bin = [upper, +inf).
             */
            PoissonDistribution poissonDistribution = new PoissonDistributionImpl(mean);
            int lower = 1;
            while (poissonDistribution.cumulativeProbability(lower - 1) * sampleSize < minExpectedCount) {
                lower++;
            }
            int upper = (int) (5 * mean)// Even for mean = 1, not much mass beyond 5
            while ((1 - poissonDistribution.cumulativeProbability(upper - 1)) * sampleSize < minExpectedCount) {
                upper--;
    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.