probability value
scale parameter
boolean indicating if the function should invert the upper tail of the incomplete gamma function instead; i.e., compute xr
such that Q(a,xr) = p
(default: false)
function value of the inverse
javascript
var y = gammaincinv( 0.5, 2.0 );
// returns ~1.678
javascript
var y = gammaincinv( 0.1, 10.0 );
// returns ~6.221
javascript
var y = gammaincinv( 0.75, 3.0 );
// returns ~3.92
javascript
var y = gammaincinv( 0.75, 3.0, true );
// returns ~1.727
javascript
var y = gammaincinv( 0.75, NaN );
// returns NaN
var y = gammaincinv( NaN, 3.0 );
// returns NaN
Inverts the lower gamma function; i.e., computes
xr
such thatP(a,xr) = p
.Notes
p
and the second argument is the scale factora
.P(x,a)
. To invert the upper functionQ(x,a)
, set theupper
argument totrue
.p < 0
orp > 1
, the function returnsNaN
.