Cumulative probability density function (CDF) of a normal distribution.

@param x value to evaluate CDF at
@param mu Mean value
@param sigma Standard deviation.
@return The CDF of the given normal distribution at x.
182332
public static double cdf(double x, double mu, double sigma) {
    if(x <= 0.) {
      return 0.;
    }
    return .5 * (1 + NormalDistribution.erf((FastMath.log(x) - mu) / (MathUtil.SQRT2 * sigma)));
  }
643253
public static double cdf(double val, int v) {
    double x = v / (val * val + v);
    return 1 - (0.5 * BetaDistribution.regularizedIncBeta(x, v * .5, 0.5));
  }
281874
def log10norm(x, mu, sigma=1.0):
    
    return stats.lognorm(sigma * np.log(10), scale=mu).pdf(x)
1106964
public static double cdf(double val, double mu, double beta) {
    return FastMath.exp(-FastMath.exp(-(val - mu) / beta));
  }
1290134
public static double normalDistribution(Double x, AssociativeArray params) {
        double mean= params.getDouble("mean");
        double variance= params.getDouble("variance");

        //standardize the x value
        double z=(x-mean)/Math.sqrt(variance);

        return ContinuousDistributions.gaussCdf(z);
    }
88943
function partial( lambda ) {

	/**
	* FUNCTION: cdf( x )
	*	Evaluates the cumulative distribution function (CDF) for a Poisson distribution.
	*
	* @private
	* @param {Number} x - input value
	* @returns {Number} evaluated CDF
	*/
	return function cdf( x ) {
		if ( x < 0 ) {
			return 0;
		}
		return gammainc( lambda, floor( x ) + 1, {
			'tail': 'upper',
			'regularized': true
		});
	};
}
176207
private double gaussian(double x, double y, double sigma) {
		double sigma2 = sigma * sigma;
		double t = (x * x + y * y) / (2 * sigma2);
		double u = 1.0 / (2 * Math.PI * sigma2);
		double e = u * Math.exp(-t);
		return e;
	}
1236354
public static double quantile(double val, double mu, double sigma, double xi) {
    if(val < 0.0 || val > 1.0) {
      return Double.NaN;
    }
    if(xi == 0.) {
      return mu - sigma * FastMath.log(1 - val);
    }
    return mu - sigma / xi * (1 - FastMath.pow(1 - val, -xi));
  }
1249996
function rnorm(mu, sigma) {
      return function() {
         var v1, v2, rsq;

         do {
            v1 = 2 * rgen.random() - 1;
            v2 = 2 * rgen.random() - 1;
            rsq = v1 * v1 + v2 * v2;
         } while (rsq >= 1);
         return mu + sigma * v1 * Math.sqrt(-2 * Math.log(rsq) / rsq);
      };
   }
780473
def pdf_new(self, x, mu, sigma, skw):
        
        if skw > 1 or skw < -1:
            print("skewness %s out of range" % skw)
            skw = 1.
        e, w, a = self.map_mu_sigma_skw(mu, sigma, skw)
        pdf = self.pdf(x, e, w, a)
        return pdf
435746
public static double quantile(double x, double mu, double sigma) {
    return FastMath.exp(mu + sigma * NormalDistribution.standardNormalQuantile(x));
  }
607121
def gauss_pdf(x, mu, sigma):
    """"""
    return 1 / np.sqrt(2 * np.pi) / sigma * np.exp(-(x - mu) ** 2 / 2. / sigma ** 2)
392283
def funcGauss1D(x, mu, sig):
    
    arrOut = np.exp(-np.power((x - mu)/sig, 2.)/2)
    # normalize
#    arrOut = arrOut/(np.sqrt(2.*np.pi)*sig)
    # normalize (laternative)
    arrOut = arrOut/np.sum(arrOut)
    return arrOut
1321484
def rand_student_t(df, mu=0, std=1):
    

    x = random.gauss(0, std)
    y = 2.0*random.gammavariate(0.5 * df, 2.0)
    return x / (math.sqrt(y / df)) + mu
784740
def cdf(self, x):
        
        t = 0
        N = float(self.n)

        if len(self) == 1:  # only one centroid
            return int(x >= self.C.min_key())

        for i, key in enumerate(self.C.keys()):
            c_i = self.C[key]
            if i == len(self) - 1:
                delta = (c_i.mean - self.C.prev_item(key)[1].mean) / 2.
            else:
                delta = (self.C.succ_item(key)[1].mean - c_i.mean) / 2.
            z = max(-1, (x - c_i.mean) / delta)

            if z < 1:
                return t / N + c_i.count / N * (z + 1) / 2

            t += c_i.count
        return 1
676676
def lognormal(mu, sigma, random_state):
    '''
    
    '''
    return np.exp(normal(mu, sigma, random_state))
546764
def cumulative_distribution(self, X):
        
        self.check_fit()

        U, V = self.split_matrix(X)

        if (V == 0).all() or (U == 0).all():
            return np.zeros(V.shape[0])

        else:
            cdfs = [
                np.power(
                    np.power(U[i], -self.theta) + np.power(V[i], -self.theta) - 1,
                    -1.0 / self.theta
                )
                if (U[i] > 0 and V[i] > 0) else 0
                for i in range(len(U))
            ]

            return np.array([max(x, 0) for x in cdfs])