API documentation of the 'jhplot.math.num.pdf.SaddlePoint' Java class
jhplot.math.num.pdf

jhplot.math.num.pdf

• `public final class SaddlePointextends Object`

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:

1. Catherine Loader (2000). "Fast and Accurate Computation of Binomial Probabilities.". http://www.herine.net/stat/papers/dbinom.pdf

Since:
1.2
• ### Constructor Summary

Constructors
Constructor and Description
`SaddlePoint()`
Default constructor.
• ### Method Summary

All Methods
Modifier and TypeMethod and Description
`static double``getDeviancePart(double x, double mu)`
A part of the deviance portion of the saddle point approximation.
`static double``getStirlingError(double z)`
Compute the error of Stirling's series at the given value.
`static double``logBinomialProbability(int x, int n, double p, double q)`
Compute the PMF for a binomial distribution using the saddle point expansion.
• ### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Constructor Detail

`public SaddlePoint()`
Default constructor.
• ### Method Detail

• #### getStirlingError

`public static double getStirlingError(double z)`
Compute the error of Stirling's series at the given value.

References:

1. Eric W. Weisstein. "Stirling's Series." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/StirlingsSeries.html

Parameters:
`z` - the value.
Returns:
the Striling's series error.
• #### getDeviancePart

`public static double getDeviancePart(double x,                                     double mu)`
A part of the deviance portion of the saddle point approximation.

References:

1. Catherine Loader (2000). "Fast and Accurate Computation of Binomial Probabilities.". http://www.herine.net/stat/papers/dbinom.pdf

Parameters:
`x` - the x value.
`mu` - the average.
Returns:
a part of the deviance.
• #### logBinomialProbability

`public static double logBinomialProbability(int x,                                            int n,                                            double p,                                            double q)`
Compute the PMF for a binomial distribution using the saddle point expansion.
Parameters:
`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).
Returns:
log(p(x)).

DMelt 2.0 © DataMelt by jWork.ORG