Evaluates the inverse of the Student’s t distribution function.
#include <imsl.h>
float imsl_f_t_inverse_cdf (float p, float df)
The type double function is imsl_d_t_inverse_cdf.
float p
(Input)
Probability for which the inverse of the Student’s t
distribution function is to be evaluated. Argument p must be in the open
interval (0.0, 1.0).
float df
(Input)
Degrees of freedom. Argument df must be greater
than or equal to 1.0.
The inverse of the Student’s t distribution function evaluated at p. The probability that a Student’s t random variable takes a value less than or equal to imsl_f_t_inverse_cdf is p.
The function imsl_f_t_inverse_cdf
evaluates the inverse distribution function of a Student’s t random
variable with ν = df
degrees of freedom. If ν
equals 1 or 2, the inverse can be obtained in closed form. If ν is between 1 and 2, the
relationship of a t to a beta random variable is exploited, and the
inverse of the beta distribution is used to evaluate the inverse; otherwise, the
algorithm of Hill (1970) is used. For small values of ν greater than 2, Hill’s
algorithm inverts an integrated expansion in 1/(1 + t2/ν) of the
t density.
For larger values, an asymptotic inverse Cornish-Fisher type expansion about
normal deviates is used.
This example finds the 0.05 critical value for a two-sided t test with six degrees of freedom.
#include
<imsl.h>
void main()
{
float df = 6.0;
float p = 0.975;
float t;
t =
imsl_f_t_inverse_cdf(p,df);
printf("The two-sided t(6)
0.05 critical value is %6.3f\n", t);
}
The two-sided t(6) 0.05 critical value is 2.447
IMSL_OVERFLOW Function imsl_f_t_inverse_cdf is set to machine infinity since overflow would occur upon modifying the inverse value for the F distribution with the result obtained from the inverse beta distribution.
|
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |