Java Gauss gauss(double mean, double deviation, double x)

Here you can find the source of gauss(double mean, double deviation, double x)

Description

Returns value of Normal/Gaussian distribution for .

License

Open Source License

Declaration

public static double gauss(double mean, double deviation, double x) 

Method Source Code

//package com.java2s;
/**/*from www . j  av a2  s .  co m*/
*   Utils.java
*
*   Copyright (c) 2013 Vladimir Brigant
*   This software is distributed under the terms of the GNU General Public License.
*/

public class Main {
    /**
    * Returns value of Normal/Gaussian distribution for <x>.
    */
    public static double gauss(double mean, double deviation, double x) {
        double exp = (x - mean) * (x - mean) * (-1) / (2 * deviation * deviation);
        double denom = deviation * Math.sqrt(2 * Math.PI);
        return Math.exp(exp) / denom;
    }
}

Related

  1. gauss(double[] A, int m, int n)
  2. gauss(final double mean, final double sigma, final double x)
  3. gauss(int N, long seed)
  4. GaussElimination(double a[][])