Package org.apache.commons.numbers.gamma
Class IncompleteBeta
java.lang.Object
org.apache.commons.numbers.gamma.IncompleteBeta
Incomplete Beta function.
\[ B_x(a,b) = \int_0^x t^{a-1}\,(1-t)^{b-1}\,dt \]
This code has been adapted from the Boost
c++ implementation <boost/math/special_functions/beta.hpp>.
- Since:
- 1.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic doublecomplement(double x, double a, double b) Computes the complement of the incomplete beta function B(x, a, b).static doublecomplement(double x, double a, double b, double epsilon, int maxIterations) Computes the complement of the incomplete beta function B(x, a, b).static doublevalue(double x, double a, double b) Computes the value of the incomplete beta function B(x, a, b).static doublevalue(double x, double a, double b, double epsilon, int maxIterations) Computes the value of the incomplete beta function B(x, a, b).
-
Method Details
-
value
Computes the value of the incomplete beta function B(x, a, b).\[ B_x(a,b) = \int_0^x t^{a-1}\,(1-t)^{b-1}\,dt \]
- Parameters:
x- Value.a- Parametera.b- Parameterb.- Returns:
- the incomplete beta function \( B_x(a, b) \).
- Throws:
ArithmeticException- if the series evaluation fails to converge.
-
value
Computes the value of the incomplete beta function B(x, a, b).\[ B_x(a,b) = \int_0^x t^{a-1}\,(1-t)^{b-1}\,dt \]
- Parameters:
x- the value.a- Parametera.b- Parameterb.epsilon- Tolerance in series evaluation.maxIterations- Maximum number of iterations in series evaluation.- Returns:
- the incomplete beta function \( B_x(a, b) \).
- Throws:
ArithmeticException- if the series evaluation fails to converge.
-
complement
Computes the complement of the incomplete beta function B(x, a, b).\[ B(a, b) - B_x(a,b) = B_{1-x}(b, a) \]
where \( B(a, b) \) is the beta function.
- Parameters:
x- Value.a- Parametera.b- Parameterb.- Returns:
- the complement of the incomplete beta function \( B(a, b) - B_x(a, b) \).
- Throws:
ArithmeticException- if the series evaluation fails to converge.
-
complement
Computes the complement of the incomplete beta function B(x, a, b).\[ B(a, b) - B_x(a,b) = B_{1-x}(b, a) \]
where \( B(a, b) \) is the beta function.
- Parameters:
x- the value.a- Parametera.b- Parameterb.epsilon- Tolerance in series evaluation.maxIterations- Maximum number of iterations in series evaluation.- Returns:
- the complement of the incomplete beta function \( B(a, b) - B_x(a, b) \).
- Throws:
ArithmeticException- if the series evaluation fails to converge.
-