Skip to content

betaCDF

Fabian Kindermann edited this page Apr 2, 2021 · 10 revisions
function betaCDF(x, p, q)

Description:

Calculates the cumulative distribution function

of the beta distribution with shape parameters and . denotes the beta function

Input arguments:

  • real*8 :: x
    The point where to evaluate the cumulative distribution function of the beta distribution.

Optional arguments:

  • real*8 :: p
    Shape parameter. If not present, the function uses p = 1. Note that this input variable needs to be strictly greater than zero.
  • real*8 :: q
    Shape parameter. If not present, the function uses q = 1. Note that this input variable needs to be strictly greater than zero.

Return Value:

  • real*8 :: betaCDF
    The value of the cumulative distribution function at x.

References

  • Parts of this routine were copied and adapted from:
  • For further reading refer to:
    • Toral, R. & Colet, P. (2014). Stochastic Numerical Methods: An Introduction for Students and Scientists. Weinheim: Wiley.
    • Majumder, K.L. & Bhattacharjee, G.P. (1973). Algorithm AS 63: The incomplete Beta Integral, Applied Statistics, 22(3), 409-411.
    • Macleod, A.J. (1989). Algorithm AS 245: A Robust and Reliable Algorithm for the Logarithm of the Gamma Function. Applied Statistics, 38(2), 397-402.
  • This routine is used in the following programs:
    • prog02_15.f90
Clone this wiki locally