invstu(P, df [,upper:T or lower:F]), P and df REAL, elements of P between 0 and 1, those of df > 0 |

invstu(P,df) computes the quantiles (probability points, critical values) of Student's t- distribution with df degrees of freedom corresponding to each element of P. P must be a REAL vector or array with elements between 0 and 1 and df must be a REAL vector or array with positive but not necessarily integral elements. If df is a scalar the result has the same size and shape as P and df is used to compute all the values. If P is a scalar, the result has the same size and shape as df and consists of P-th probability points for the different values of df. If neither P nor df are scalars, they must be the same size and shape and corresponding elements of P and df are used to compute elements of the result. invstu(P,df,upper:T) and invstu(P,df,lower:F) compute upper tail quantiles. The result is mathematically equivalent to invstu(1 - P, df) but may be more accurate for small P. invstu() is the inverse of cumstu() in the sense that, within rounding error, invstu(cumstu(x,df),df) should be the same as x and cumstu(invstu(P,df),df) should be the same as P. A critical value for a two-tail t-test on df degrees of freedom with significance level alpha or for a 1-alpha confidence interval may be computed as invstu(alpha/2,df, upper:T) or invstu(1-alpha/2,df). Critical values for a one-tail t-test on df degrees of freedom with significance level alpha are computed as invstu(alpha,df) (lower tail test) and invstu(alpha,df,upper:T) or invstu(1-alpha,df) (upper tail test). Bonferronized critical values for K simultaneous two-tail t-tests with significance level alpha or K simultaneous 1 - alpha confidence intervals are computed as invstu(.5*alpha/K,df, upper:T). invstu(runi(n),df) will generate a random sample of size n from a Student's t-distribution . See also cumstu(), runi().

Gary Oehlert 2003-01-15