JMSLTM Numerical Library 6.0

com.imsl.stat
Class NormalDistribution

java.lang.Object
  extended by com.imsl.stat.NormalDistribution
All Implemented Interfaces:
Distribution, ProbabilityDistribution, Serializable

public class NormalDistribution
extends Object
implements ProbabilityDistribution, Serializable

Evaluates a normal (Gaussian) probability distribution.

The NormalDistribution evaluates the normal probability distribution of a given set of data, xData. If parameters are not supplied, the eval method first calculates the mean and standard deviation. The normal probability distribution is defined as:

f(x) = frac{1}{sigma sqrt{2pi}} e^{frac{{-(x - mu)}_2}{{2 sigma}_2}}

where mu and sigma are the conditional mean and standard deviation.

See Also:
Serialized Form

Constructor Summary
NormalDistribution()
           
 
Method Summary
 double[] eval(double[] xData)
          Evaluates a normal (Gaussion) probability distribution from a given set of data.
 double[] eval(double[] xData, Object[] parameters)
          Evaluates a normal (Gaussion) probability distribution from a given set of data.
 double eval(double x, Object[] parameters)
          Evaluates a normal (Gaussion) probability distribution at a given point x.
 double getMean()
          Returns the population mean of xData.
 Object[] getParameters()
          Returns the Parameters used to evaluate the distribution.
 double getStandardDeviation()
          Returns the population standard deviation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NormalDistribution

public NormalDistribution()
Method Detail

eval

public double[] eval(double[] xData)
Evaluates a normal (Gaussion) probability distribution from a given set of data.

Specified by:
eval in interface Distribution
Parameters:
xData - a double array representing the points the normal probability distribution function is to evaluate.
Returns:
a double array representing the normal probability distribution of xData.

eval

public double[] eval(double[] xData,
                     Object[] parameters)
Evaluates a normal (Gaussion) probability distribution from a given set of data.

Specified by:
eval in interface ProbabilityDistribution
Parameters:
xData - a double array representing the points the normal probability distribution function is to evaluate
parameters - an Object array representing the parameters used to evaluate the normal distribution, see method getParameters.
Returns:
a double array representing the normal probability distribution of xData.

eval

public double eval(double x,
                   Object[] parameters)
Evaluates a normal (Gaussion) probability distribution at a given point x.

Specified by:
eval in interface ProbabilityDistribution
Parameters:
x - a double containing the point the normal probability distribution function is to evaluate.
parameters - an Object array representing the parameters used to evaluate the normal distribution, see method getParameters.
Returns:
a double representing the normal probability distribution of x.

getMean

public double getMean()
Returns the population mean of xData.

Returns:
a double representing the population mean of xData.

getParameters

public Object[] getParameters()
Returns the Parameters used to evaluate the distribution.

Specified by:
getParameters in interface ProbabilityDistribution
Returns:
an Object array representing the parameters used to evaluate the distribution. This Object array can be retrieved after invoking the eval method with the following signature, double[] eval(double[] xData). This Object array can be used as input later with another set of data to the eval methods that require an Object array of distribution parameters as input.

getStandardDeviation

public double getStandardDeviation()
Returns the population standard deviation.

Returns:
a double representing the population standard devation of xData.

JMSLTM Numerical Library 6.0

Copyright © 1970-2009 Visual Numerics, Inc.
Built September 1 2009.