public interface RealDistribution
Modifier and Type | Method and Description |
---|---|
double |
cumulativeProbability(double x)
For a random variable
X whose values are distributed according
to this distribution, this method returns P(X <= x) . |
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.
|
double |
probability(double x)
For a random variable
X whose values are distributed according
to this distribution, this method returns P(X = x) . |
double |
probability(double x0,
double x1)
For a random variable
X whose values are distributed according
to this distribution, this method returns P(x0 < X <= x1) . |
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.
|
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 evaluatedx
double probability(double x0, double x1)
X
whose values are distributed according
to this distribution, this method returns P(x0 < X <= x1)
.x0
- Lower bound (excluded).x1
- Upper bound (included).x0
and x1
, excluding the lower
and including the upper endpoint.NumberIsTooLargeException
- if x0 > x1
.
The default implementation uses the identity P(x0 < X <= x1) = P(X <= x1) - P(X <= x0)
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 evaluatedx
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 evaluatedx
double inverseCumulativeProbability(double p)
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 probabilityp
-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 isSupportConnected()
void reseedRandomGenerator(long seed)
seed
- the new seeddouble sample()
double[] sample(int sampleSize)
sampleSize
- the number of random values to generateNotStrictlyPositiveException
- if sampleSize
is not positiveCopyright © 2018 CNES. All Rights Reserved.