stdrcdf
statistics: p = stdrcdf (x, k, df)
statistics: p = stdrcdf (x, k, df, 'upper')
Studentized range cumulative distribution function (CDF).
For each element of x, compute the cumulative distribution function (CDF) of the studentized range distribution for k groups and df degrees of freedom. The size of p is the common size of x, k and df. A scalar input functions as a constant matrix of the same size as the other inputs.
The studentized range is the range of k independent standard normal
variables divided by an independent sqrt (chi2 / df), where
chi2 has a chi-square distribution with df degrees of
freedom. It is the distribution behind Tukey’s honestly significant
difference and the Tukey-Kramer multiple comparison procedure. k
must be an integer of at least 2 and df positive, Inf
included, which gives the range of k standard normals; otherwise
p is NaN.
p = stdrcdf (x, k, df, "upper") computes the
upper tail probability of the studentized range distribution at the values
in x. Each tail is computed directly, so a small upper tail
probability keeps its relative accuracy.
The distribution is evaluated by numerical integration, accurate to about 1e-13 relative to the tail probability for df up to 1e4, and to about 1e-8 for df of 1e8.
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: stdrinv, stdrpdf, stdrrnd, stdrstat, multcompare
Source Code: stdrcdf
Plot various CDFs from the studentized range distribution
x = 0:0.01:8;
p1 = stdrcdf (x, 2, 5);
p2 = stdrcdf (x, 3, 5);
p3 = stdrcdf (x, 5, 5);
p4 = stdrcdf (x, 5, Inf);
plot (x, p1, '-b', x, p2, '-g', x, p3, '-r', x, p4, '-m')
grid on
ylim ([0, 1])
legend ({'k = 2, df = 5', 'k = 3, df = 5', 'k = 5, df = 5', ...
'k = 5, df = \infty'}, 'location', 'southeast')
title ('Studentized range CDF')
xlabel ('values in x')
ylabel ('probability')