Categories &

Functions List

Function Reference: stdrinv

statistics: x = stdrinv (p, k, df)

Inverse of the studentized range cumulative distribution function (iCDF).

For each element of p, compute the quantile (the inverse of the CDF) of the studentized range distribution for k groups and df degrees of freedom. The size of x is the common size of p, k and df. A scalar input functions as a constant matrix of the same size as the other inputs.

stdrinv (1 - alpha, k, df) is the critical value of Tukey’s honestly significant difference at level alpha. k must be an integer of at least 2 and df positive, Inf included; otherwise x is NaN, as it is for p outside [0, 1]. The quantile is found to about 1e-13 relative accuracy.

MATLAB has no public counterpart of this function.

Further information about the studentized range distribution can be found at https://en.wikipedia.org/wiki/Studentized_range_distribution

Input arguments must be double or single; integer, logical, and character arrays are rejected.

See also: stdrcdf, stdrpdf, stdrrnd, stdrstat, multcompare

Source Code: stdrinv

Plot various iCDFs from the studentized range distribution

 p = 0.01:0.01:0.99;
 x1 = stdrinv (p, 2, 5);
 x2 = stdrinv (p, 3, 5);
 x3 = stdrinv (p, 5, Inf);
 plot (p, x1, '-b', p, x2, '-g', p, x3, '-r')
 grid on
 legend ({'k = 2, df = 5', 'k = 3, df = 5', 'k = 5, df = \infty'}, ...
         'location', 'northwest')
 title ('Studentized range iCDF')
 xlabel ('probability')
 ylabel ('values in x')
plotted figure