Skip to content

Latest commit

 

History

History
108 lines (70 loc) · 2.41 KB

File metadata and controls

108 lines (70 loc) · 2.41 KB

betaincinv

Inverse incomplete beta function.

The inverse incomplete beta function is the inverse of the incomplete beta function. It is used in various statistical applications, including hypothesis testing and confidence interval calculations.

Usage

var betaincinv = require( '@stdlib/math/base/special/betaincinv' );

betaincinv( p, a, b )

Evaluates the inverse of the incomplete beta function:

var y = betaincinv( 0.5, 1.0, 1.0 );
// returns 0.5

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

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

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

The function accepts the following parameters:

  • p: probability value (input value for the incomplete beta function).
  • a: first shape parameter (must be positive).
  • b: second shape parameter (must be positive).

The function returns NaN if any of the following conditions are met:

  • p is outside the interval [0,1]
  • a is not positive
  • b is not positive

Examples

var betaincinv = require( '@stdlib/math/base/special/betaincinv' );

var y = betaincinv( 0.5, 1.0, 1.0 );
console.log( y );
// => 0.5

y = betaincinv( 0.2, 3.0, 3.0 );
console.log( y );
// => ~0.327

y = betaincinv( 0.4, 3.0, 3.0 );
console.log( y );
// => ~0.446

y = betaincinv( 0.4, 1.0, 6.0 );
console.log( y );
// => ~0.082