Here you can find the source of gauss(double mean, double deviation, double x)
public static double gauss(double mean, double deviation, double x)
//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; } }