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:
| Modifier and Type | Field and Description |
|---|---|
| private static final double[] | EXACT_STIRLING_ERRORS
exact Stirling expansion error for certain values. |
| private static final double | HALF_LOG_2_PI
1/2 * log(2 π). |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static double | Returns: a part of the deviance.the x value. x, double the average. mu)A part of the deviance portion of the saddle point approximation. |
| pack-priv static double | Returns: the Striling's series error.the value. z)Compute the error of Stirling's series at the given value. |
| pack-priv static double | Returns: log(p(x)).the value at which the probability is evaluated. x, int the number of trials. n, double the probability of success. p, double the probability of failure (1 - p). q)Compute the logarithm of the PMF for a binomial distribution using the saddle point expansion. |
| EXACT_STIRLING_ERRORS | back to summary |
|---|---|
| private static final double[] EXACT_STIRLING_ERRORS exact Stirling expansion error for certain values. | |
| HALF_LOG_2_PI | back to summary |
|---|---|
| private static final double HALF_LOG_2_PI 1/2 * log(2 π). | |
| SaddlePointExpansion | back to summary |
|---|---|
| private SaddlePointExpansion() Default constructor. | |
| getDeviancePart | back to summary |
|---|---|
| pack-priv static double getDeviancePart(double x, double mu) A part of the deviance portion of the saddle point approximation. References:
| |
| getStirlingError | back to summary |
|---|---|
| pack-priv static double getStirlingError(double z) Compute the error of Stirling's series at the given value. References:
| |
| logBinomialProbability | back to summary |
|---|---|
| pack-priv 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.
| |