public final class Normal extends Object implements Distribution
| Constructor and Description |
|---|
Normal()
Create a new standard normal distribution with mean 0 and standard deviation 1.
|
Normal(double mean,
double stdev)
Create a new Normal distribution with the given mean and standard deviation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
double |
quantile(double prob)
Compute the value of the quantile function at the given probability.
|
double |
rand()
Generate a random value from the distribution.
|
String |
toString() |
public Normal(double mean,
double stdev)
mean - the mean of the distribution.stdev - the standard deviation of the distribution.public Normal()
public final double rand()
Distributionrand in interface Distributionpublic final double quantile(double prob)
Distributionquantile in interface Distributionprob - the probability that the random variable X ≤ q, where q is the quantile value.