t_inverse_cdf

Evaluates the inverse of the Student’s t distribution function.

Synopsis

#include <imsls.h>

float imsls_f_t_inverse_cdf (float p, float df)

The type double function is imsls_d_t_inverse_cdf.

Required Arguments

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.

Return Value

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 imsls_f_t_inverse_cdf is p.

Description

Function imsls_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.

Example

This example finds the 0.05 critical value for a two-sided t test with 6 degrees of freedom.

 

#include <imsls.h>

#include <stdio.h>

 

int main()

{

    float  df = 6.0, p = 0.975, t;

 

    t  = imsls_f_t_inverse_cdf(p,df);

    printf("The two-sided t(%1.0f) %4.2f critical value is "

        "%6.3f\n", df, (1.0-p)*2.0, t);

}

Output

 

The two-sided t(6) 0.05 critical value is 2.447

Informational Errors

IMSLS_OVERFLOW

Function imsls_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.