All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy