Probability density function of the normal distribution.

<pre>
1/(SQRT(2*pi)*sigma*x) * e^(-log(x-mu)^2/2sigma^2)
</pre>

@param x The value.
@param mu The mean.
@param sigma The standard deviation.
@return logPDF of the given normal distribution at x.
558668
public static double logpdf(double x, double mu, double sigma) {
    if(x <= 0.) {
      return Double.NEGATIVE_INFINITY;
    }
    final double xrel = (FastMath.log(x) - mu) / sigma;
    return MathUtil.LOG_ONE_BY_SQRTTWOPI - FastMath.log(sigma * x) - .5 * xrel * xrel;
  }
291071
public static double logpdf(double x, double k, double theta, double shift) {
    x = (x - shift);
    if(x <= 0.) {
      return Double.NEGATIVE_INFINITY;
    }
    final double log1px = FastMath.log1p(x);
    return k * FastMath.log(theta) - GammaDistribution.logGamma(k) - (theta + 1.) * log1px + (k - 1) * FastMath.log(log1px);
  }
719203
public static double pdf(double x, double mu, double sigma, double xi) {
    x = (x - mu) / sigma;
    // Check support:
    if(x < 0 || (xi < 0 && x > -1. / xi)) {
      return 0.;
    }
    return ((xi == 0) ? 1. : FastMath.pow(1 + xi * x, -1 / xi - 1)) / sigma;
  }
855525
function partial( sigma ) {
	var s2 = pow( sigma, 2 );
	/**
	* FUNCTION: pdf( x )
	*	Evaluates the probability density function (PDF) for a Rayleigh distribution.
	*
	* @private
	* @param {Number} x - input value
	* @returns {Number} evaluated PDF
	*/
	return function pdf( x ) {
		if ( x < 0 ) {
			return 0;
		}
		return (1/s2) * x * exp( -pow( x, 2 ) / ( 2 * s2 ) );
	};
}
814679
def _log_multivariate_normal_density_diag(X, means, covars):
    """"""
    n_samples, n_dim = X.shape
    lpr = -0.5 * (n_dim * np.log(2 * np.pi) + np.sum(np.log(covars), 1)
                  + np.sum((means ** 2) / covars, 1)
                  - 2 * np.dot(X, (means / covars).T)
                  + np.dot(X ** 2, (1.0 / covars).T))
    return lpr
52675
private double normPDF(double x) {
        return Math.exp(-x*x / 2) / (Math.sqrt(2 * Math.PI));
    }
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
1315840
public static double logpdf(double x, double mu, double sigma, double lambda) {
    final double dx = x - mu;
    final double lss = lambda * sigma * sigma;
    final double erfc = NormalDistribution.erfc((lss - dx) / (sigma * MathUtil.SQRT2));
    return erfc > 0 ? FastMath.log(.5 * lambda * erfc) + lambda * (lss * .5 - dx) : (x == x) ? Double.NEGATIVE_INFINITY : Double.NaN;
  }
281874
def log10norm(x, mu, sigma=1.0):
    
    return stats.lognorm(sigma * np.log(10), scale=mu).pdf(x)
1114579
public static double multinomialGaussianPdf(double[] mean, double[][] covariance, double[] x)  {
        MultivariateNormalDistribution gaussian = new 
            MultivariateNormalDistribution(mean, covariance);
        return gaussian.density(x);
    }
687722
public static double logNormalDistribution(double sigma, double x) {
        return Math.log(1.0 / (sqrt(2.0 * PI) * sigma)) + (-0.5 * pow(x / sigma, 2));
    }
1084462
def funcGauss1D(x, mu, sig):
    
    arrOut = np.exp(-np.power((x - mu)/sig, 2.)/2)
    # normalize
    arrOut = arrOut/(np.sqrt(2.*np.pi)*sig)

    return arrOut
513569
public static double cdf(double x, double sigma) {
    if(x <= 0.) {
      return 0.;
    }
    final double xs = x / sigma;
    return 1. - FastMath.exp(-.5 * xs * xs);
  }
607121
def gauss_pdf(x, mu, sigma):
    """"""
    return 1 / np.sqrt(2 * np.pi) / sigma * np.exp(-(x - mu) ** 2 / 2. / sigma ** 2)
1089626
def log_normal(self, x):
        
        d = self.mu.shape[0]
        xc = x - self.mu
        if len(x.shape) == 1:
            exp_term = numpy.sum(numpy.multiply(xc, numpy.dot(self.inv, xc)))
        else:
            exp_term = numpy.sum(numpy.multiply(xc, numpy.dot(xc, self.inv)), axis=1)

        return -.5 * (d * numpy.log(2 * numpy.pi) + numpy.log(self.det) + exp_term)
854337
def probability_lt(self, x):
        
        if self.mean is None:
            return
        return normdist(x=x, mu=self.mean, sigma=self.standard_deviation)
635035
public static double pdf(double x, double k, double theta, double shift) {
    x = (x - shift);
    return x <= 0. ? 0. : FastMath.pow(theta, k) / GammaDistribution.gamma(k) * FastMath.pow(1 + x, -(theta + 1.)) * FastMath.pow(FastMath.log1p(x), k - 1.);
  }