Chapter 9: Special Functions

t_cdf

Evaluates the Student’s t distribution function.

Synopsis

#include <imsl.h>

float imsl_f_t_cdf (float t, float df)

The type double function is imsl_d_t_cdf.

Required Arguments

float t   (Input)
Argument for which the Student’s t distribution function is to be evaluated.

float df   (Input)
Degrees of freedom. Argument df must be greater than or equal to 1.0.

Return Value

The probability that a Student’s t random variable takes a value less than or equal to the input t.

Description

The function imsl_f_t_cdf evaluates the distribution function of a Student’s t random variable with ν1 = df degrees of freedom. If the square of t is greater than or equal to ν, the relationship of a t to an F random variable (and subsequently, to a beta random variable) is exploited, and percentage points from a beta distribution are used. Otherwise, the method described by Hill (1970) is used. If ν is not an integer, if ν is greater than 19, or if ν is greater than 200, a Cornish-Fisher expansion is used to evaluate the distribution function. If ν is less than 20 and |t| is less than 2.0, a trigonometric series (see Abramowitz and Stegun 1964, equations 26.7.3 and 26.7.4, with some rearrangement) is used. For the remaining cases, a series given by Hill (1970) that converges well for large values of t is used.

Example

This example finds the probability that a t random variable with six degrees of freedom is greater in absolute value than 2.447. The fact that t is symmetric about zero is used.

#include <imsl.h>

main ()
{
    float       p;
    float       t = 2.447;
    float       df = 6.0;

    p  = 2.0*imsl_f_t_cdf(-t,df);
    printf("Pr(|t(6)| > 2.447) = %6.4f\n", p);
}

Output

Pr(|t(6)| > 2.447) = 0.0500

Figure 9-2   Plot of Ft(t, 6.0)


Visual Numerics, Inc.
Visual Numerics - Developers of IMSL and PV-WAVE
http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260