com.quantarray.anaheim.numerics.NormalDistribution1.scala Maven / Gradle / Ivy
package com.quantarray.anaheim.numerics
/**
* Univariate normal distribution.
*/
object NormalDistribution1
{
val sqrt2Pi: Double = math.sqrt(2 * math.Pi)
def pdf(x: Double, mean: Double, sd: Double): Double = 1 / (sd * sqrt2Pi) * math.exp(-((x - mean) * (x - mean)) / (2 * sd * sd))
}