public class WatsonGDist extends ContinuousDistribution
ContinuousDistribution for the
Watson G distribution (see).
Given a sample of n independent uniforms Ui over [0, 1],
the G statistic is defined by
| Gn | = | (n)1/2max1 <= j <= n{j/n - U(j) + bar(U)n -1/2} | |
| = | (n)1/2(Dn+ + bar(U)n - 1/2), |
decPrec| Constructor and Description |
|---|
WatsonGDist(int n)
Constructs a Watson distribution for a sample of size n.
|
| Modifier and Type | Method and Description |
|---|---|
double |
barF(double x)
Returns the complementary distribution function.
|
static double |
barF(int n,
double x)
Computes the complementary distribution function
bar(F)n(x)
with parameter n.
|
double |
cdf(double x)
Returns the distribution function F(x).
|
static double |
cdf(int n,
double x)
Computes the Watson G distribution function Fn(x), with parameter n.
|
double |
density(double x)
Returns f (x), the density evaluated at x.
|
static double |
density(int n,
double x)
Computes the density function
for a Watson G distribution with parameter n.
|
int |
getN()
Returns the parameter n of this object.
|
double[] |
getParams()
Return an array containing the parameter n of this object.
|
double |
inverseF(double u)
Returns the inverse distribution function
x = F-1(u).
|
static double |
inverseF(int n,
double u)
Computes
x = Fn-1(u), where Fn is the
Watson G distribution with parameter n.
|
void |
setN(int n)
Sets the parameter n of this object.
|
java.lang.String |
toString() |
getMean, getStandardDeviation, getVariance, getXinf, getXsup, inverseBisection, inverseBrent, setXinf, setXsuppublic WatsonGDist(int n)
public 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 static double density(int n,
double x)
public static double cdf(int n,
double x)
public static double barF(int n,
double x)
public static double inverseF(int n,
double u)
public int getN()
public void setN(int n)
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.