Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "math/base/special/betainc/docs/types/index.d"

Index

Functions

Functions

Export assignment betainc

  • betainc(x: number, a: number, b: number, regularized?: undefined | false | true, upper?: undefined | false | true): number
  • Evaluates the incomplete beta function.

    Notes

    • The regularized and upper parameters specify whether to evaluate the non-regularized and/or upper incomplete beta functions, respectively.
    • If provided x < 0 or x > 1, the function returns NaN.
    • If provided a < 0 or b < 0, the function returns NaN.

    Parameters

    • x: number

      function parameter

    • a: number

      function parameter

    • b: number

      function parameter

    • Optional regularized: undefined | false | true

      boolean indicating if the function should evaluate the regularized or non-regularized incomplete beta function (default: true)

    • Optional upper: undefined | false | true

      boolean indicating if the function should return the upper tail of the incomplete beta function (default: false)

    Returns number

    function value

    Example

    var y = betainc( 0.5, 2.0, 2.0 );
    // returns 0.5

    Example

    var y = betainc( 0.5, 2.0, 2.0, false );
    // returns ~0.083

    Example

    var y = betainc( 0.2, 1.0, 2.0 );
    // returns 0.36