public class RayleighDist extends ContinuousDistribution
ContinuousDistribution for
the Rayleigh distribution with
location parameter a, and scale parameter β > 0.
The density function is
decPrec| Constructor and Description |
|---|
RayleighDist(double beta)
Constructs a RayleighDist object with parameters
a = 0 and β = beta.
|
RayleighDist(double a,
double beta)
Constructs a RayleighDist object with parameters
a = a, and β = beta.
|
| Modifier and Type | Method and Description |
|---|---|
double |
barF(double x)
Returns the complementary distribution function.
|
static double |
barF(double beta,
double x)
Same as barF (0, beta, x).
|
static double |
barF(double a,
double beta,
double x)
Computes the complementary distribution function.
|
double |
cdf(double x)
Returns the distribution function F(x).
|
static double |
cdf(double beta,
double x)
Same as cdf (0, beta, x).
|
static double |
cdf(double a,
double beta,
double x)
Computes the distribution function.
|
double |
density(double x)
Returns f (x), the density evaluated at x.
|
static double |
density(double beta,
double x)
Same as density (0, beta, x).
|
static double |
density(double a,
double beta,
double x)
Computes the density function.
|
double |
getA()
Returns the parameter a.
|
static RayleighDist |
getInstanceFromMLE(double[] x,
int n,
double a)
Creates a new instance of a Rayleigh distribution with parameters a and
hat(β).
|
double |
getMean()
Returns the mean.
|
static double |
getMean(double a,
double beta)
Returns the mean
a + β(π/2)1/2 of the
Rayleigh distribution with parameters a and β.
|
static double[] |
getMLE(double[] x,
int n,
double a)
Estimates the parameter β of the Rayleigh distribution
using the maximum likelihood method, assuming that a is known,
from the n observations x[i],
i = 0, 1,…, n - 1.
|
double[] |
getParams()
Return an array containing the parameters of the current distribution
in the order: [a, β].
|
double |
getSigma()
Returns the parameter β.
|
double |
getStandardDeviation()
Returns the standard deviation.
|
static double |
getStandardDeviation(double beta)
Returns the standard deviation
β(2 - π/2)1/2 of
the Rayleigh distribution with parameter β.
|
double |
getVariance()
Returns the variance.
|
static double |
getVariance(double beta)
Returns the variance
of the Rayleigh distribution with parameter β.
|
double |
inverseF(double u)
Returns the inverse distribution function
x = F-1(u).
|
static double |
inverseF(double beta,
double u)
Same as inverseF (0, beta, u).
|
static double |
inverseF(double a,
double beta,
double u)
Computes the inverse of the distribution function.
|
void |
setParams(double a,
double beta)
Sets the parameters a and β for this object.
|
java.lang.String |
toString() |
getXinf, getXsup, inverseBisection, inverseBrent, setXinf, setXsuppublic RayleighDist(double beta)
public RayleighDist(double a,
double beta)
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 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(double a,
double beta,
double x)
a - the location parameterbeta - the scale parameterx - the value at which the density is evaluatedpublic static double density(double beta,
double x)
beta - the scale parameterx - the value at which the density is evaluatedpublic static double cdf(double a,
double beta,
double x)
a - the location parameterbeta - the scale parameterx - the value at which the distribution is evaluatedpublic static double cdf(double beta,
double x)
beta - the scale parameterx - the value at which the distribution is evaluatedpublic static double barF(double a,
double beta,
double x)
a - the location parameterbeta - the scale parameterx - the value at which the complementary distribution is evaluatedpublic static double barF(double beta,
double x)
beta - the scale parameterx - the value at which the complementary distribution is evaluatedpublic static double inverseF(double a,
double beta,
double u)
a - the location parameterbeta - the scale parameteru - the value at which the inverse distribution is evaluatedpublic static double inverseF(double beta,
double u)
beta - the scale parameteru - the value at which the inverse distribution is evaluatedpublic static double[] getMLE(double[] x,
int n,
double a)
x - the list of observations to use to evaluate parametersn - the number of observations to use to evaluate parametersa - the location parameterpublic static RayleighDist getInstanceFromMLE(double[] x, int n, double a)
x - the list of observations to use to evaluate parametersn - the number of observations to use to evaluate parametersa - the location parameterpublic static double getMean(double a,
double beta)
a - the location parameterbeta - the scale parameterpublic static double getVariance(double beta)
beta - the scale parameterpublic static double getStandardDeviation(double beta)
beta - the scale parameterpublic double getA()
public double getSigma()
public void setParams(double a,
double beta)
a - the location parameterbeta - the scale parameterpublic 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.