public final class RegularizedBeta extends Object
\[ I_x(a,b) = \frac{1}{B(a, b)} \int_0^x t^{a-1}\,(1-t)^{b-1}\,dt \]
where \( B(a, b) \) is the beta function.
This code has been adapted from the Boost
c++
implementation <boost/math/special_functions/beta.hpp>
.
Modifier and Type | Method and Description |
---|---|
static double |
complement(double x,
double a,
double b)
Computes the complement of the
regularized beta function I(x, a, b).
|
static double |
complement(double x,
double a,
double b,
double epsilon,
int maxIterations)
Computes the complement of the
regularized beta function I(x, a, b).
|
static double |
derivative(double x,
double a,
double b)
Computes the derivative of the
regularized beta function I(x, a, b).
|
static double |
value(double x,
double a,
double b)
Computes the value of the
regularized beta function I(x, a, b).
|
static double |
value(double x,
double a,
double b,
double epsilon,
int maxIterations)
Computes the value of the
regularized beta function I(x, a, b).
|
public static double value(double x, double a, double b)
\[ I_x(a,b) = \frac{1}{B(a, b)} \int_0^x t^{a-1}\,(1-t)^{b-1}\,dt \]
where \( B(a, b) \) is the beta function.
x
- Value.a
- Parameter a
.b
- Parameter b
.ArithmeticException
- if the series evaluation fails to converge.public static double value(double x, double a, double b, double epsilon, int maxIterations)
\[ I_x(a,b) = \frac{1}{B(a, b)} \int_0^x t^{a-1}\,(1-t)^{b-1}\,dt \]
where \( B(a, b) \) is the beta function.
x
- the value.a
- Parameter a
.b
- Parameter b
.epsilon
- Tolerance in series evaluation.maxIterations
- Maximum number of iterations in series evaluation.ArithmeticException
- if the series evaluation fails to converge.public static double complement(double x, double a, double b)
\[ 1 - I_x(a,b) = I_{1-x}(b, a) \]
x
- Value.a
- Parameter a
.b
- Parameter b
.ArithmeticException
- if the series evaluation fails to converge.public static double complement(double x, double a, double b, double epsilon, int maxIterations)
\[ 1 - I_x(a,b) = I_{1-x}(b, a) \]
x
- the value.a
- Parameter a
.b
- Parameter b
.epsilon
- Tolerance in series evaluation.maxIterations
- Maximum number of iterations in series evaluation.ArithmeticException
- if the series evaluation fails to converge.public static double derivative(double x, double a, double b)
\[ \frac{\delta}{\delta x} I_x(a,b) = \frac{(1-x)^{b-1} x^{a-1}}{B(a, b)} \]
where \( B(a, b) \) is the beta function.
This function has uses in some statistical distributions.
x
- Value.a
- Parameter a
.b
- Parameter b
.ArithmeticException
- if the series evaluation fails to converge.Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.