|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uah.math.distributions.Distribution edu.uah.math.distributions.NormalDistribution
public class NormalDistribution
This class encapsulates the normal distribution with specified parameters.
Field Summary | |
---|---|
static double |
SQRT2PI
|
Fields inherited from class edu.uah.math.distributions.Distribution |
---|
CONTINUOUS, DISCRETE, MIXED |
Constructor Summary | |
---|---|
NormalDistribution()
This default constructor creates a new standard normal distribution (with location parameter 0 and scale parameter 1). |
|
NormalDistribution(double m,
double s)
This general constructor creates a new normal distribution with specified parameter values. |
Method Summary | |
---|---|
double |
getCDF(double x)
This method computes the cumulative distribution function. |
double |
getCentralMoment(int n)
This method computes the central moment of a specifed order. |
double |
getDensity(double x)
This method defines the probability density function. |
double |
getLocation()
This method returns the location parameter. |
double |
getMaxDensity()
This method returns the maximum value of the density function. |
double |
getMean()
This method returns the mean, which is the same as the location parameter. |
double |
getMedian()
This method returns the median, which is the same as the location parameter. |
double |
getMGF(double t)
This method returns the moment generating function. |
double |
getMoment(double a,
int n)
This method computes the moment of a specified order about a specified point. |
double |
getScale()
This method gets the scale parameter. |
double |
getVariance()
This method returns the variance of the distribution. |
void |
setLocation(double m)
This method sets the location parameter. |
void |
setParameters(double m,
double s)
This method sets the parameters and defines the default domain. |
void |
setScale(double s)
This method sets the scale parameter. |
double |
simulate()
This method simulates a value from the distribution. |
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of the parameters. |
Methods inherited from class edu.uah.math.distributions.Distribution |
---|
getDomain, getFailureRate, getMoment, getPGF, getQuantile, getSD, getType, setDomain, setDomain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double SQRT2PI
Constructor Detail |
---|
public NormalDistribution(double m, double s)
m
- the location parameters
- the scale parameterpublic NormalDistribution()
Method Detail |
---|
public void setParameters(double m, double s)
m
- the location parameters
- the scale parameterpublic double getDensity(double x)
getDensity
in class Distribution
x
- a number in the domain of the distribution
public double getMaxDensity()
getMaxDensity
in class Distribution
public double getMedian()
getMedian
in class Distribution
public double getMean()
getMean
in class Distribution
public double getVariance()
getVariance
in class Distribution
public double getCentralMoment(int n)
n
- the order
public double getMoment(double a, int n)
getMoment
in class Distribution
a
- the centern
- the order
public double getMGF(double t)
getMGF
in class Distribution
t
- a real number
public double simulate()
simulate
in class Distribution
public double getLocation()
public void setLocation(double m)
m
- the location parameterpublic double getScale()
public void setScale(double s)
s
- the scale parameterpublic double getCDF(double x)
getCDF
in class Distribution
x
- a number in the domain of the distribution
public java.lang.String toString()
toString
in class Distribution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |