COMPLEMENTARY_T_CDF Function
Evaluates the complement of the Student’s t distribution.
Usage
result = COMPLEMENTARY_T_CDF (t, deg_freedom)
Input Parameters
t—Scalar float value for which Pr(x > t) is to be evaluated.
deg_freedom—Scalar float value indicating the degrees of freedom. Argument deg_freedom must be greater than 1.0.
Returned Value
result—The probability that a Student’s t random variable takes a value greater than t.
Input Keywords
Double—If present and nonzero, then double precision is used.
Discussion
COMPLEMENTARY_T_CDF evaluates one minus the distribution function of a Student’s t random variable with n = Deg_freedom degrees of freedom. If the square of t is greater than n, 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 n is not an integer, is greater than 19, or is greater than 200, a Cornish-Fisher expansion is used to evaluate the distribution function. If n is less than 20 and |t| is less than 2.0, a trigonometric series is used (see Abramowitz and Stegun 1964, Equations 26.7.3 and 26.7.4 with some rearrangement). For the remaining cases, a series given by Hill (1970) that converges well for large values of t is used.
This function provides higher right tail accuracy for the Student's t distribution.
|
Example
This example finds the 2-tail probability that a Student’s t random variable exceeds 2.447.
PRO t_complementary_t_cdf_ex1
t = 2.447
df = 6.0
p = 2.0*COMPLEMENTARY_T_CDF(t,df)
PRINT,"Pr(|t(",STRTRIM(STRING(df,Format="(I)"),2),")| > ",$
STRING(t,FORMAT="(f5.3)"),") = ",$
STRING(p,Format="(f6.4)")
END
Output
Pr(|t(6)| > 2.447) = 0.0500