    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class JSci.maths.statistics.NormalDistribution

    java.lang.Object
       |
       +----JSci.maths.statistics.ProbabilityDistribution
               |
               +----JSci.maths.statistics.NormalDistribution

public final class NormalDistribution
extends ProbabilityDistribution
implements NumericalConstants

The NormalDistribution class provides an object for encapsulating normal distributions.

##

NormalDistribution()
  Constructs a normal distribution with zero mean and unity variance.
NormalDistribution(double, double)
  Constructs a normal distribution.
NormalDistribution(double[])
  Constructs a normal distribution from a dataset.

##

cumulative(double)
  Cumulative normal distribution function.
getMean()
  Returns the mean.
getVariance()
  Returns the variance.
inverse(double)
  Inverse of the cumulative normal distribution function.
probability(double)
  Probability density function of a normal (Gaussian) distribution.

##

NormalDistribution

     public NormalDistribution()

  Constructs a normal distribution with zero mean and unity variance.

NormalDistribution

     public NormalDistribution(double mu,
                               double var)

  Constructs a normal distribution.

  Parameters:
    mu - the mean
    var - the variance

NormalDistribution

     public NormalDistribution(double array[])

  Constructs a normal distribution from a dataset.

  Parameters:
    array - a sample

##

getMean

     public double getMean()

  Returns the mean.

getVariance

     public double getVariance()

  Returns the variance.

probability

     public double probability(double X)

  Probability density function of a normal (Gaussian) distribution.

  Returns:
    the probability that a stochastic variable x has the value X, i.e. P(x=X)
  Overrides:
    probability in class ProbabilityDistribution

cumulative

     public double cumulative(double X)

  Cumulative normal distribution function.

  Returns:
    the probability that a stochastic variable x is less then X, i.e. P(x<X)
  Overrides:
    cumulative in class ProbabilityDistribution

inverse

     public double inverse(double probability)

  Inverse of the cumulative normal distribution function.

  Returns:
    the value X for which P(x<X)
  Overrides:
    inverse in class ProbabilityDistribution

    All Packages  Class Hierarchy  This Package  Previous  Next  Index