Class GammaRegularizedQ
- java.lang.Object
-
- dev.nm.analysis.function.rn2r1.AbstractRealScalarFunction
-
- dev.nm.analysis.function.rn2r1.AbstractBivariateRealFunction
-
- dev.nm.analysis.function.special.gamma.GammaRegularizedQ
-
- All Implemented Interfaces:
Function<Vector,Double>
,BivariateRealFunction
,RealScalarFunction
public class GammaRegularizedQ extends AbstractBivariateRealFunction
The Regularized Incomplete Gamma Q function is defined as: \[ Q(s,x)=\frac{\Gamma(s,x)}{\Gamma(s)}=1-P(s,x), s \geq 0, x \geq 0 \] The algorithm used for computing the regularized incomplete Gamma Q function depends on the values of s and x.- For \(s > 100\), Q is approximated using the Gauss-Legendre quadrature.
- For \(x < s + 1\), Q is approximated using the Pearson's series representation.
- Otherwise, Q is approximated using the continued fraction expression by Legendre.
pgamma
. E.g.,pgamma(x, s, lower=FALSE)
.- See Also:
- "B Shea." Algorithm AS 239: Chi-squared and Incomplete Gamma Integral," Applied Statistics. Volume 37, Number 3, 1988, pages 466-473."
- Wikipedia: Regularized Gamma functions and Poisson random variables
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dev.nm.analysis.function.Function
Function.EvaluationException
-
-
Constructor Summary
Constructors Constructor Description GammaRegularizedQ()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
evaluate(double s, double x)
Evaluate Q(s,x).-
Methods inherited from class dev.nm.analysis.function.rn2r1.AbstractBivariateRealFunction
evaluate
-
Methods inherited from class dev.nm.analysis.function.rn2r1.AbstractRealScalarFunction
dimensionOfDomain, dimensionOfRange
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dev.nm.analysis.function.Function
dimensionOfDomain, dimensionOfRange
-
-