Studentized range distribution quantile function.
var quantile = require( '@stdlib/stats/base/dists/studentized-range/quantile' );Evaluates the quantile function for a studentized range distribution with sample size r and v degrees of freedom. Optionally. Optionally, the number of groups whose maximum range is considered can be specified via the nranges parameter.
var y = quantile( 0.5, 3.0, 2.0 );
// returns ~0.0644
y = quantile( 0.9, 17.0, 2.0 );
// returns ~0.913
y = quantile( 0.5, 3.0, 2.0, 2 );
// returns ~0.01If provided a probability p outside the interval [0,1], the function returns NaN.
var y = quantile( 1.9, 3.0, 2.0 );
// returns NaN
y = quantile( -0.1, 3.0, 2.0 );
// returns NaNIf provided NaN as any argument, the function returns NaN.
var y = quantile( NaN, 2.0, 2.0 );
// returns NaN
y = quantile( 0.0, NaN, 2.0 );
// returns NaNIf provided v < 2 or r < 2, the function returns NaN.
var y = quantile( 0.4, -1.0, 3.0 );
// returns NaN
y = quantile( 0.4, 3.0, 1.5 );
// returns NaNReturns a function for evaluating the quantile function of an studentized range distribution with sample size r and v degrees of freedom. Optionally, the number of groups whose maximum range is considered can be specified via the nranges parameter.
var myquantile = quantile.factory( 4.0 );
var y = myquantile( 0.2 );
// returns ~-0.941
y = myquantile( 0.9 );
// returns ~1.533var uniform = require( '@stdlib/random/array/uniform' );
var logEachMap = require( '@stdlib/console/log-each-map' );
var quantile = require( '@stdlib/stats/base/dists/studentized-range/quantile' );
var opts = {
'dtype': 'float64'
};
var p = uniform( 10, 0.0, 1.0, opts );
var r = uniform( 10, 2.0, 20.0, opts );
var v = uniform( 10, 2.0, 20.0, opts );
logEachMap( 'p: %0.4f, r: %0.4f, v: %0.4f, Q(p;r,v): %0.4f', p, r, v, quantile );