|
SSJ V. labo. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.probdist.ContinuousDistribution
umontreal.iro.lecuyer.probdist.BetaDist
umontreal.iro.lecuyer.probdist.BetaSymmetricalDist
public class BetaSymmetricalDist
Specializes the class BetaDist to the case of a symmetrical
beta distribution over the interval [0, 1],
with shape parameters
α = β.
Faster methods are implemented here for this special case.
Because of the symmetry around 1/2, four series are used to compute the
cdf, two around x = 0 and two around x = 1/2.
| Field Summary |
|---|
| Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution |
|---|
decPrec |
| Constructor Summary | |
|---|---|
BetaSymmetricalDist(double alpha)
Constructs a BetaSymmetricalDist object with parameters α = β = alpha, over the unit interval (0, 1). |
|
BetaSymmetricalDist(double alpha,
int d)
Same as BetaSymmetricalDist (alpha), but using approximations of roughly d decimal digits of precision when computing the distribution, complementary distribution, and inverse functions. |
|
| Method Summary | |
|---|---|
double |
barF(double x)
Returns the complementary distribution function. |
static double |
barF(double alpha,
int d,
double x)
Returns the complementary distribution function. |
double |
cdf(double x)
. |
static double |
cdf(double alpha,
int d,
double x)
Same as cdf (alpha, alpha, d, x). |
static double |
density(double alpha,
double x)
Returns the density evaluated at x. |
static BetaSymmetricalDist |
getInstanceFromMLE(double[] x,
int n)
Creates a new instance of a symmetrical beta distribution with parameter α estimated using the maximum likelihood method based on the n observations x[i], i = 0, 1,…, n - 1. |
double |
getMean()
Returns the mean. |
static double |
getMean(double alpha)
Computes and returns the mean E[X] = 1/2 of the symmetrical beta distribution with parameter α. |
static double[] |
getMLE(double[] x,
int n)
Estimates the parameter α of the symmetrical beta distribution over the interval [0, 1] using the maximum likelihood method, from the n observations x[i], i = 0, 1,…, n - 1. |
double[] |
getParams()
Return a table containing the parameter of the current distribution. |
double |
getStandardDeviation()
Returns the standard deviation. |
static double |
getStandardDeviation(double alpha)
Computes and returns the standard deviation of the symmetrical beta distribution with parameter α. |
double |
getVariance()
Returns the variance. |
static double |
getVariance(double alpha)
Computes and returns the variance, Var[X] = 1/(8α + 4), of the symmetrical beta distribution with parameter α. |
double |
inverseF(double u)
Returns the inverse distribution function x = F-1(u). |
static double |
inverseF(double alpha,
double u)
Returns the inverse distribution function evaluated at u, for the symmetrical beta distribution over the interval [0, 1], with shape parameters 0 < α = β = alpha. |
void |
setParams(double alpha,
double beta,
double a,
double b,
int d)
|
String |
toString()
|
| Methods inherited from class umontreal.iro.lecuyer.probdist.BetaDist |
|---|
barF, barF, barF, barF, cdf, cdf, cdf, cdf, density, density, density, getA, getAlpha, getB, getBeta, getMean, getMean, getStandardDeviation, getStandardDeviation, getVariance, getVariance, inverseF, inverseF, inverseF, inverseF, setParams |
| Methods inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution |
|---|
getXinf, getXsup, inverseBisection, inverseBrent, setXinf, setXsup |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BetaSymmetricalDist(double alpha)
public BetaSymmetricalDist(double alpha,
int d)
| Method Detail |
|---|
public double cdf(double x)
Distribution
cdf in interface Distributioncdf in class BetaDistpublic double barF(double x)
ContinuousDistribution
barF in interface DistributionbarF in class BetaDistx - value at which the complementary distribution function is evaluated
public double inverseF(double u)
ContinuousDistribution
inverseF in interface DistributioninverseF in class BetaDistu - value at which the inverse distribution function is evaluated
public static double density(double alpha,
double x)
public static double cdf(double alpha,
int d,
double x)
cdf (alpha, alpha, d, x).
public static double barF(double alpha,
int d,
double x)
public static double inverseF(double alpha,
double u)
public double getMean()
ContinuousDistribution
getMean in interface DistributiongetMean in class BetaDistpublic double getVariance()
ContinuousDistribution
getVariance in interface DistributiongetVariance in class BetaDistpublic double getStandardDeviation()
ContinuousDistribution
getStandardDeviation in interface DistributiongetStandardDeviation in class BetaDist
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
public static BetaSymmetricalDist 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(double alpha)
public static double getVariance(double alpha)
public static double getStandardDeviation(double alpha)
public void setParams(double alpha,
double beta,
double a,
double b,
int d)
setParams in class BetaDistpublic double[] getParams()
getParams in interface DistributiongetParams in class BetaDistpublic String toString()
toString in class BetaDist
|
SSJ V. labo. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||