|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uah.math.distributions.Distribution
edu.uah.math.distributions.GammaDistribution
edu.uah.math.distributions.ChiSquareDistribution
public class ChiSquareDistribution
This class defines the chi-square distribution with a specifed degrees of freedom parameter.
| Field Summary |
|---|
| Fields inherited from class edu.uah.math.distributions.Distribution |
|---|
CONTINUOUS, DISCRETE, MIXED |
| Constructor Summary | |
|---|---|
ChiSquareDistribution()
This default constructor creates a new chi-square distribution with 1 degree of freedom. |
|
ChiSquareDistribution(int n)
This general constructor creates a new chi-square distribuiton with a specified degrees of freedom parameter. |
|
| Method Summary | |
|---|---|
int |
getDegrees()
This method returns the degrees of freedom parameter. |
void |
setDegrees(int n)
This method sets the degrees of freedom parameter and computes the defaut domain. |
void |
setParameters(double k,
double b)
This method sets the gamma parameters, which must be related to the degrees of freedom. |
void |
setScale(double b)
This method sets the scale parameter, which must be 2. |
void |
setShape(double k)
This method sets the shape parameter, which must be n/2, where n is the degrees of freedom. |
double |
simulate()
This method simulates a value from the distribuiton, as the sum of squares of independent, standard normal 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.GammaDistribution |
|---|
getCDF, getDensity, getMaxDensity, getMean, getMGF, getMoment, getMoment, getScale, getShape, getVariance |
| Methods inherited from class edu.uah.math.distributions.Distribution |
|---|
getDomain, getFailureRate, getMedian, getPGF, getQuantile, getSD, getType, setDomain, setDomain |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ChiSquareDistribution(int n)
n - the degrees of freedompublic ChiSquareDistribution()
| Method Detail |
|---|
public void setDegrees(int n)
n - the degrees of freedompublic int getDegrees()
public double simulate()
simulate in class GammaDistributionpublic void setShape(double k)
setShape in class GammaDistributionk - the shape parameterpublic void setScale(double b)
setScale in class GammaDistributionb - the scale parameter
public void setParameters(double k,
double b)
setParameters in class GammaDistributionk - the shape parameterb - the scale parameterpublic java.lang.String toString()
toString in class GammaDistribution
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||