ParaMonte Fortran 2.0.0 Parallel Monte Carlo and Machine Learning LibrarySee the latest version documentation.
pm_mathBeta Module Reference

This module contains classes and procedures for computing the mathematical Beta Function and its inverse. More...

## Data Types

interface  getBetaInc
Generate and return the regularized Incomplete Beta Function $$I_x(\alpha, \beta)$$ as defined in the details section of pm_mathBeta. More...

interface  getBetaInv
Generate and return the regularized Inverse Incomplete Beta Function $$I_x(\alpha, \beta)$$ as defined in the details section of pm_mathBeta. More...

interface  getLogBeta
Generate and return the natural logarithm of the Beta Function $$\mathrm{B}(\alpha, \beta)$$ as defined in the details section of pm_mathBeta. More...

interface  setBetaInc
Return the regularized Incomplete Beta Function $$I_x(\alpha, \beta)$$ as defined in the details section of pm_mathBeta. More...

interface  setBetaInv
Return the regularized Inverse Incomplete Beta Function $$I_x(\alpha, \beta)$$ as defined in the details section of pm_mathBeta. More...

## Variables

character(*, SK), parameter MODULE_NAME = "@pm_mathBeta"

## Detailed Description

This module contains classes and procedures for computing the mathematical Beta Function and its inverse.

The Beta Function is defined by the integral,

\begin{eqnarray} \mathrm{B}(\alpha, \beta) &=& \int_{0}^{1} ~ t^{\alpha-1} (1-t)^{\beta-1}~\mathrm{d}t \\ &=& \frac{\Gamma(\alpha) \Gamma(\beta)}{\Gamma(\alpha + \beta)} ~, \end{eqnarray}

where $$\alpha$$ and $$\beta$$ are complex numbers such that $$\Re \alpha > 0$$ and $$\Re \beta > 0$$.

The incomplete beta function is a generalization of the beta function defined as,

\begin{eqnarray} \mathrm{B}(x; \alpha, \beta) = \int_{0}^{x} ~ t^{\alpha-1} (1-t)^{\beta-1}~\mathrm{d}t ~,~ x \in [0, 1] \end{eqnarray}

where for $$x = 1$$ becomes the same as the equation for the (complete) beta function, that is, $$\mathrm{B}(x = 1;\alpha, \beta) = \mathrm{B}(\alpha, \beta)$$.
Note that the relationship between the complete and the incomplete beta function is similar to the relationship between the complete and incomplete gamma function.

The regularized incomplete beta function (or Beta Function Ratio or regularized beta function for short) is defined in terms of the incomplete beta function and the complete beta function as,

\begin{eqnarray} I_x(\alpha, \beta) = \frac{\mathrm{B}(x; \alpha, \beta)}{\mathrm{B}(\alpha, \beta)} ~. \end{eqnarray}

Note the regularized beta function has the limiting values,

\begin{eqnarray} I_0(\alpha, \beta) &=& 0 \\ I_1(\alpha, \beta) &=& 1 ~. \end{eqnarray}

The regularized incomplete beta function is the cumulative distribution function of the beta distribution, and is related to the cumulative distribution function of a random variable $$X$$ following a binomial distribution with probability of single success $$p$$ and number of Bernoulli trials $$n$$.

The Regularized Inverse Incomplete Beta Function $$I_y(I_x; \alpha, \beta)$$ is defined such that,

$$I_y\left(I_x(x; \alpha, \beta); \alpha, \beta\right) = x ~.$$

The Regularized Inverse Incomplete Beta Function is also the quantile function of the Beta distribution.

pm_mathGamma
pm_distBeta
pm_distBeta
Newby, 1991, The incomplete Beta Integral, TH Eindhoven. THE/BDK/ORS, Vakgroep ORS: rapporten, Volume 9106.
Majumder and Bhattacharjee, 1973, Algorithm AS 63: The incomplete Beta Integral, Applied Statistics, Volume 22, Number 3, pages 409-411.
Test:
test_pm_mathBeta

Final Remarks

If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.

1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, Oct 16, 2009, 11:14 AM, Michigan

## ◆ MODULE_NAME

 character(*, SK), parameter pm_mathBeta::MODULE_NAME = "@pm_mathBeta"

Definition at line 90 of file pm_mathBeta.F90.