public class ChiDist extends ContinuousDistribution
ContinuousDistribution for the chi
distribution with shape parameter
v > 0, where the number of degrees of freedom
v is a positive integer.
The density function is given by
GammaDist.
The distribution function is
decPrec| Constructor and Description |
|---|
ChiDist(int nu)
Constructs a ChiDist object.
|
| Modifier and Type | Method and Description |
|---|---|
double |
barF(double x)
Returns the complementary distribution function.
|
static double |
barF(int nu,
double x)
Computes the complementary distribution.
|
double |
cdf(double x)
Returns the distribution function F(x).
|
static double |
cdf(int nu,
double x)
Computes the distribution function by using the
gamma distribution function.
|
double |
density(double x)
Returns f (x), the density evaluated at x.
|
static double |
density(int nu,
double x)
Computes the density function.
|
static ChiDist |
getInstanceFromMLE(double[] x,
int n)
Creates a new instance of a chi distribution with parameter ν estimated using
the maximum likelihood method based on the n observations x[i],
i = 0, 1,…, n - 1.
|
static double[] |
getMaximumLikelihoodEstimate(double[] x,
int n)
Deprecated.
|
double |
getMean()
Returns the mean.
|
static double |
getMean(int nu)
Computes and returns the mean
of the chi distribution with parameter ν.
|
static double[] |
getMLE(double[] x,
int n)
Estimates the parameter ν of the chi distribution
using the maximum likelihood method, from the n observations
x[i],
i = 0, 1,…, n - 1.
|
int |
getNu()
Returns the value of ν for this object.
|
double[] |
getParams()
Return a table containing parameters of the current distribution.
|
double |
getStandardDeviation()
Returns the standard deviation.
|
static double |
getStandardDeviation(int nu)
Computes and returns the standard deviation of the chi distribution
with parameter ν.
|
double |
getVariance()
Returns the variance.
|
static double |
getVariance(int nu)
Computes and returns the variance
of the chi distribution with parameter ν.
|
double |
inverseF(double u)
Returns the inverse distribution function
x = F-1(u).
|
static double |
inverseF(int nu,
double u)
Returns the inverse distribution function computed
using the gamma inversion.
|
void |
setNu(int nu)
Sets the value of ν for this object.
|
java.lang.String |
toString() |
getXinf, getXsup, inverseBisection, inverseBrent, setXinf, setXsuppublic double density(double x)
ContinuousDistributiondensity in class ContinuousDistributionx - value at which the density is evaluatedpublic double cdf(double x)
Distributionx - value at which the distribution function is evaluatedpublic double barF(double x)
ContinuousDistributionbarF in interface DistributionbarF in class ContinuousDistributionx - value at which the complementary distribution function is evaluatedpublic double inverseF(double u)
ContinuousDistributioninverseF in interface DistributioninverseF in class ContinuousDistributionu - value at which the inverse distribution function is evaluatedpublic double getMean()
ContinuousDistributiongetMean in interface DistributiongetMean in class ContinuousDistributionpublic double getVariance()
ContinuousDistributiongetVariance in interface DistributiongetVariance in class ContinuousDistributionpublic double getStandardDeviation()
ContinuousDistributiongetStandardDeviation in interface DistributiongetStandardDeviation in class ContinuousDistributionpublic static double density(int nu,
double x)
public static double cdf(int nu,
double x)
public static double barF(int nu,
double x)
public static double inverseF(int nu,
double u)
public static double[] getMLE(double[] x,
int n)
x - the list of observations to use to evaluate parametersn - the number of observations to use to evaluate parameters@Deprecated
public static double[] getMaximumLikelihoodEstimate(double[] x,
int n)
getMLE.public static ChiDist getInstanceFromMLE(double[] x, int n)
x - the list of observations to use to evaluate parametersn - the number of observations to use to evaluate parameterspublic static double getMean(int nu)
public static double getVariance(int nu)
public static double getStandardDeviation(int nu)
public int getNu()
public void setNu(int nu)
public double[] getParams()
public java.lang.String toString()
toString in class java.lang.ObjectTo submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.