Package org.apache.commons.math.distribution

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


  }
 
  public static double normalCDF(double x, double mean, double sigma) throws MathException
  {
    NormalDistributionImpl normDist = new NormalDistributionImpl(mean, sigma);
    double ret = normDist.cumulativeProbability(x);
    return ret;
  }
 
  public static double normalInverseCDF(double pValue, double mean, double sigma) throws MathException
  {
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.