public class NormalDistribution extends Object implements ProbabilityDistribution<Double>
| Constructor and Description |
|---|
NormalDistribution(double mean,
double standardDeviation) |
NormalDistribution(double mean,
double standardDeviation,
RandomEngine randomEngine) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getCDF(Double x)
Returns the cumulative distribution function for a value
|
double |
getInverseCDF(Double p)
Given a probability, return the value that returns this cdf
|
double |
getMean() |
double |
getPDF(Double x)
Return the probability density function for a value
|
double |
getStandardDeviation() |
int |
hashCode() |
double |
nextRandom() |
public NormalDistribution(double mean,
double standardDeviation)
mean - The mean of the distributionstandardDeviation - The standard deviation of the distribution, not negative or zeropublic NormalDistribution(double mean,
double standardDeviation,
RandomEngine randomEngine)
mean - The mean of the distributionstandardDeviation - The standard deviation of the distribution, not negative or zerorandomEngine - A generator of uniform random numbers, not nullpublic double getCDF(Double x)
getCDF in interface ProbabilityDistribution<Double>x - The value, not nullpublic double getPDF(Double x)
getPDF in interface ProbabilityDistribution<Double>x - The value, not nullpublic double nextRandom()
nextRandom in interface ProbabilityDistribution<Double>public double getInverseCDF(Double p)
getInverseCDF in interface ProbabilityDistribution<Double>p - The probability, not null. $0 \geq p \geq 1$public double getMean()
public double getStandardDeviation()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.