|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uah.math.distributions.Distribution
public abstract class Distribution
This class models an abstract implmentation of a real probability distribution.
Field Summary | |
---|---|
static int |
CONTINUOUS
|
static int |
DISCRETE
|
static int |
MIXED
|
Constructor Summary | |
---|---|
Distribution()
|
Method Summary | |
---|---|
double |
getCDF(double x)
This method returns a default approximate cumulative distribution function. |
abstract double |
getDensity(double x)
This method defines the probability density function of the distribution. |
Domain |
getDomain()
This method returns the domain of the distribution. |
double |
getFailureRate(double x)
This method computes the failure rate function. |
double |
getMaxDensity()
This method returns the largest (finite) value of the probability density function on the finite set of domain values. |
double |
getMean()
This method returns a default approximate mean. |
double |
getMedian()
This method computes a default approximate median. |
double |
getMGF(double t)
This method computes a default approximation to the moment generating function. |
double |
getMoment(double a,
int n)
This method returns a default approximation of the moment of a specified order about a specified point. |
double |
getMoment(int n)
This method returns a default approximation of the moment of a specified order about 0. |
double |
getPGF(double t)
This method computes a default approximation to the probability generating function. |
double |
getQuantile(double p)
This method computes an approximate quantile function. |
double |
getSD()
This method returns the standard deviation, as the square root of the variance. |
int |
getType()
This method returns the type of the distribution (discrete or continuous). |
double |
getVariance()
This method returns a default approximate variance. |
protected void |
setDomain(Domain d)
This method sets the domain of the distribution for purposes of data collection and for default computations. |
void |
setDomain(double a,
double b,
double w,
int t)
This method sets the domain of the distribution for purposes of data collection and for default computations. |
double |
simulate()
This method computes a default simulation of a value from the distribution, as a random quantile. |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DISCRETE
public static final int CONTINUOUS
public static final int MIXED
Constructor Detail |
---|
public Distribution()
Method Detail |
---|
public abstract double getDensity(double x)
x
- a number in the domain of the distributionprotected void setDomain(Domain d)
d
- the domainpublic void setDomain(double a, double b, double w, int t)
a
- lower value or bound of the domainb
- the upper value or bound of the domainw
- the width (step size) of the domaint
- the type of domain (DISCRETE or CONTINUOUS)public Domain getDomain()
public final int getType()
public double getMaxDensity()
public double getMoment(double a, int n)
a
- the centern
- the order
public double getMoment(int n)
n
- the order
public double getMean()
public double getVariance()
public double getSD()
public double getCDF(double x)
x
- a number in the domain of the distribution
public double getQuantile(double p)
p
- a probability in (0, 1)
public double simulate()
public double getMedian()
public double getFailureRate(double x)
x
- a number in the domain of the distribution
public double getMGF(double t)
t
- a real number
public double getPGF(double t)
t
- a real number
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |