|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.distribution.SaddlePointExpansion
final class SaddlePointExpansion
Utility class used by various distributions to accurately compute their respective probability mass functions. The implementation for this class is based on the Catherine Loader's dbinom routines.
This class is not intended to be called directly.
References:
Field Summary | |
---|---|
private static double[] |
EXACT_STIRLING_ERRORS
exact Stirling expansion error for certain values. |
private static double |
HALF_LOG_2_PI
1/2 * log(2 π). |
Constructor Summary | |
---|---|
private |
SaddlePointExpansion()
Default constructor. |
Method Summary | |
---|---|
(package private) static double |
getDeviancePart(double x,
double mu)
A part of the deviance portion of the saddle point approximation. |
(package private) static double |
getStirlingError(double z)
Compute the error of Stirling's series at the given value. |
(package private) static double |
logBinomialProbability(int x,
int n,
double p,
double q)
Compute the logarithm of the PMF for a binomial distribution using the saddle point expansion. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final double HALF_LOG_2_PI
private static final double[] EXACT_STIRLING_ERRORS
Constructor Detail |
---|
private SaddlePointExpansion()
Method Detail |
---|
static double getStirlingError(double z)
References:
z
- the value.
static double getDeviancePart(double x, double mu)
References:
x
- the x value.mu
- the average.
static double logBinomialProbability(int x, int n, double p, double q)
x
- the value at which the probability is evaluated.n
- the number of trials.p
- the probability of success.q
- the probability of failure (1 - p).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |