org.ojalgo.random
Class Normal

java.lang.Object
  extended by java.lang.Number
      extended by org.ojalgo.random.RandomNumber
          extended by org.ojalgo.random.Normal
All Implemented Interfaces:
Serializable, Function<Double>, NullaryFunction<Double>, ContinuousDistribution, Distribution

public class Normal
extends RandomNumber

Under general conditions, the sum of a large number of random variables is approximately normally distributed (the central limit theorem).

Author:
apete
See Also:
Serialized Form

Constructor Summary
Normal()
           
Normal(double aLocation, double aScale)
           
 
Method Summary
 double getDistribution(double aValue)
          In probability theory and statistics, the cumulative distribution function (CDF), or just distribution function, describes the probability that a real-valued random variable X with a given probability distribution will be found at a value less than or equal to x.
 double getExpected()
           
 double getLowerConfidenceQuantile(double aConfidence)
           
 double getProbability(double aValue)
          In probability theory, a probability density function (pdf), or density of a continuous random variable is a function that describes the relative likelihood for this random variable to occur at a given point.
 double getQuantile(double aProbality)
          The quantile function, for any distribution, is defined for real variables between zero and one and is mathematically the inverse of the cumulative distribution function.
 double getStandardDeviation()
          Subclasses must override either getStandardDeviation() or getVariance()!
 double getUpperConfidenceQuantile(double aConfidence)
           
 
Methods inherited from class org.ojalgo.random.RandomNumber
doubleValue, floatValue, getVariance, intValue, invoke, longValue, toString
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ojalgo.random.Distribution
getVariance
 

Constructor Detail

Normal

public Normal()

Normal

public Normal(double aLocation,
              double aScale)
Method Detail

getDistribution

public double getDistribution(double aValue)
Description copied from interface: ContinuousDistribution
In probability theory and statistics, the cumulative distribution function (CDF), or just distribution function, describes the probability that a real-valued random variable X with a given probability distribution will be found at a value less than or equal to x. Intuitively, it is the "area so far" function of the probability distribution. Cumulative distribution functions are also used to specify the distribution of multivariate random variables. WikipediA

Parameters:
aValue - x
Returns:
P(<=x)

getExpected

public double getExpected()

getProbability

public double getProbability(double aValue)
Description copied from interface: ContinuousDistribution
In probability theory, a probability density function (pdf), or density of a continuous random variable is a function that describes the relative likelihood for this random variable to occur at a given point. The probability for the random variable to fall within a particular region is given by the integral of this variable’s density over the region. The probability density function is nonnegative everywhere, and its integral over the entire space is equal to one. WikipediA

Parameters:
aValue - x
Returns:
P(x)

getQuantile

public double getQuantile(double aProbality)
Description copied from interface: ContinuousDistribution
The quantile function, for any distribution, is defined for real variables between zero and one and is mathematically the inverse of the cumulative distribution function. WikipediA The input probability absolutely has to be [0.0, 1.0], but values close to 0.0 and 1.0 may be problematic

Parameters:
aProbality - P(<=x)
Returns:
x

getStandardDeviation

public double getStandardDeviation()
Description copied from class: RandomNumber
Subclasses must override either getStandardDeviation() or getVariance()!

Specified by:
getStandardDeviation in interface Distribution
Overrides:
getStandardDeviation in class RandomNumber
See Also:
Distribution.getStandardDeviation(), Distribution.getVariance()

getLowerConfidenceQuantile

public final double getLowerConfidenceQuantile(double aConfidence)

getUpperConfidenceQuantile

public final double getUpperConfidenceQuantile(double aConfidence)