|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RealDistribution
Base interface for distributions on the reals.
Method Summary | |
---|---|
double |
cumulativeProbability(double x)
For a random variable X whose values are distributed according
to this distribution, this method returns P(X <= x) . |
double |
cumulativeProbability(double x0,
double x1)
Deprecated. As of 3.1. In 4.0, this method will be renamed probability(double x0, double x1) . |
double |
density(double x)
Returns the probability density function (PDF) of this distribution evaluated at the specified point x . |
double |
getNumericalMean()
Use this method to get the numerical value of the mean of this distribution. |
double |
getNumericalVariance()
Use this method to get the numerical value of the variance of this distribution. |
double |
getSupportLowerBound()
Access the lower bound of the support. |
double |
getSupportUpperBound()
Access the upper bound of the support. |
double |
inverseCumulativeProbability(double p)
Computes the quantile function of this distribution. |
boolean |
isSupportConnected()
Use this method to get information about whether the support is connected, i.e. |
boolean |
isSupportLowerBoundInclusive()
Deprecated. to be removed in 4.0 |
boolean |
isSupportUpperBoundInclusive()
Deprecated. to be removed in 4.0 |
double |
probability(double x)
For a random variable X whose values are distributed according
to this distribution, this method returns P(X = x) . |
void |
reseedRandomGenerator(long seed)
Reseed the random generator used to generate samples. |
double |
sample()
Generate a random value sampled from this distribution. |
double[] |
sample(int sampleSize)
Generate a random sample from the distribution. |
Method Detail |
---|
double probability(double x)
X
whose values are distributed according
to this distribution, this method returns P(X = x)
. In other
words, this method represents the probability mass function (PMF)
for the distribution.
x
- the point at which the PMF is evaluated
x
double density(double x)
x
. In general, the PDF is
the derivative of the CDF
.
If the derivative does not exist at x
, then an appropriate
replacement should be returned, e.g. Double.POSITIVE_INFINITY
,
Double.NaN
, or the limit inferior or limit superior of the
difference quotient.
x
- the point at which the PDF is evaluated
x
double cumulativeProbability(double x)
X
whose values are distributed according
to this distribution, this method returns P(X <= x)
. In other
words, this method represents the (cumulative) distribution function
(CDF) for this distribution.
x
- the point at which the CDF is evaluated
x
@Deprecated double cumulativeProbability(double x0, double x1) throws NumberIsTooLargeException
probability(double x0, double x1)
.
X
whose values are distributed according
to this distribution, this method returns P(x0 < X <= x1)
.
x0
- the exclusive lower boundx1
- the inclusive upper bound
x0
and x1
,
excluding the lower and including the upper endpoint
NumberIsTooLargeException
- if x0 > x1
double inverseCumulativeProbability(double p) throws OutOfRangeException
X
distributed according to this distribution, the
returned value is
inf{x in R | P(X<=x) >= p}
for 0 < p <= 1
,inf{x in R | P(X<=x) > 0}
for p = 0
.
p
- the cumulative probability
p
-quantile of this distribution
(largest 0-quantile for p = 0
)
OutOfRangeException
- if p < 0
or p > 1
double getNumericalMean()
Double.NaN
if it is not defineddouble getNumericalVariance()
Double.POSITIVE_INFINITY
as
for certain cases in TDistribution
) or Double.NaN
if it
is not defineddouble getSupportLowerBound()
inverseCumulativeProbability(0)
. In other words, this
method must return
inf {x in R | P(X <= x) > 0}
.
Double.NEGATIVE_INFINITY
)double getSupportUpperBound()
inverseCumulativeProbability(1)
. In other words, this
method must return
inf {x in R | P(X <= x) = 1}
.
Double.POSITIVE_INFINITY
)boolean isSupportLowerBoundInclusive()
getSupporLowerBound()
is finite and
density(getSupportLowerBound())
returns a non-NaN, non-infinite
value.
boolean isSupportUpperBoundInclusive()
getSupportUpperBound()
is finite and
density(getSupportUpperBound())
returns a non-NaN, non-infinite
value.
boolean isSupportConnected()
void reseedRandomGenerator(long seed)
seed
- the new seeddouble sample()
double[] sample(int sampleSize)
sampleSize
- the number of random values to generate
NotStrictlyPositiveException
- if sampleSize
is not positive
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |