|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.probdist.ContinuousDistribution umontreal.iro.lecuyer.probdist.PiecewiseLinearEmpiricalDist
public class PiecewiseLinearEmpiricalDist
Extends the class ContinuousDistribution
for a piecewise-linear
approximation of the empirical distribution function,
based on the observations
X(1),..., X(n) (sorted by increasing order),
and defined as follows (e.g.,).
The distribution function starts at X(1) and climbs linearly by 1/(n - 1)
between any two successive observations. The density is
F(x) = | 0 | for x < X(1), |
F(x) = | (i - 1)/(n - 1) + (x - X(i))/[(n - 1)(X(i+1) - X(i))] | for X(i) <= x < X(i+1), |
F(x) = | 1 | elsewhere, |
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution |
---|
decPrec |
Constructor Summary | |
---|---|
PiecewiseLinearEmpiricalDist(double[] obs)
Constructs a new piecewise-linear distribution using all the observations stored in obs. |
|
PiecewiseLinearEmpiricalDist(Reader in)
Constructs a new empirical distribution using the observations read from the reader in. |
Method Summary | |
---|---|
double |
barF(double x)
Returns the complementary distribution function. |
double |
cdf(double x)
Returns the distribution function F(x). |
double |
density(double x)
Returns f (x), the density evaluated at x. |
double |
getMean()
Returns the mean. |
int |
getN()
Returns n, the number of observations. |
double |
getObs(int i)
Returns the value of X(i). |
double[] |
getParams()
Return a table containing parameters of the current distribution. |
double |
getSampleMean()
Returns the sample mean of the observations. |
double |
getSampleStandardDeviation()
Returns the sample standard deviation of the observations. |
double |
getSampleVariance()
Returns the sample variance of the observations. |
double |
getStandardDeviation()
Returns the standard deviation. |
double |
getVariance()
Returns the variance. |
double |
inverseF(double u)
Returns the inverse distribution function x = F-1(u). |
String |
toString()
Returns a String containing information about the current distribution. |
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 PiecewiseLinearEmpiricalDist(double[] obs)
public PiecewiseLinearEmpiricalDist(Reader in) throws IOException
IOException
Method Detail |
---|
public double density(double x)
ContinuousDistribution
density
in class ContinuousDistribution
x
- value at which the density is evaluated
public double cdf(double x)
Distribution
x
- value at which the distribution function is evaluated
public double barF(double x)
ContinuousDistribution
barF
in interface Distribution
barF
in class ContinuousDistribution
x
- value at which the complementary distribution function is evaluated
public double inverseF(double u)
ContinuousDistribution
inverseF
in interface Distribution
inverseF
in class ContinuousDistribution
u
- value at which the inverse distribution function is evaluated
public double getMean()
ContinuousDistribution
getMean
in interface Distribution
getMean
in class ContinuousDistribution
public double getVariance()
ContinuousDistribution
getVariance
in interface Distribution
getVariance
in class ContinuousDistribution
public double getStandardDeviation()
ContinuousDistribution
getStandardDeviation
in interface Distribution
getStandardDeviation
in class ContinuousDistribution
public int getN()
public double getObs(int i)
public double getSampleMean()
public double getSampleVariance()
public double getSampleStandardDeviation()
public double[] getParams()
public String toString()
toString
in class Object
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |