Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment betaincinv

  • betaincinv(p: number, a: number, b: number, upper?: undefined | false | true): number
  • Computes the inverse of the lower incomplete beta function.

    Notes

    • In contrast to a more commonly used definition, the first argument is the probability p and the second and third arguments are a and b, respectively.
    • By default, the function inverts the lower regularized incomplete beta function. To invert the upper function, set the upper argument to true.
    • If provided NaN as any argument, the function returns NaN.
    • If provided p < 0 or p > 1, the function returns NaN.
    • If provided a <= 0 or b <= 0, the function returns NaN.

    Parameters

    • p: number

      function parameter

    • a: number

      function parameter

    • b: number

      function parameter

    • Optional upper: undefined | false | true

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

    Returns number

    function value

    Example

    var y = betaincinv( 0.2, 3.0, 3.0 );
    // returns ~0.327

    Example

    var y = betaincinv( 0.4, 3.0, 3.0 );
    // returns ~0.446

    Example

    var y = betaincinv( 0.4, 3.0, 3.0, true );
    // returns ~0.554

    Example

    var y = betaincinv( 0.4, 1.0, 6.0 );
    // returns ~0.082

    Example

    var y = betaincinv( 0.8, 1.0, 6.0 );
    // returns ~0.235