Pré. | Proc. |
stdtr
Student's t distribution.SYNOPSIS:
double t, stdtr();
short k;
y = stdtr(k, t);
DESCRIPTION:
Computes the integral from minus infinity to t of the Student t distribution with integer k > 0 degrees of freedom:
t
-
| |
- | 2 -(k+1)/2
| ((k+1)/2) | ( x )
----------------- | ( 1 + --- ) dx
- | ( k )
sqrt(k pi) | (k/2) |
| |
-
-inf.
Relation to incomplete beta integral:
1 - stdtr(k,t) = 0.5 * incbet(k/2, 1/2, z)
where
z = k/(k + t**2).
For t < -2, this is the method of computation.
For higher t, a direct method is derived from integration by parts.
Since the function is symmetric about t=0, the area under the right tail of the density is found by calling the function with -t instead of t.
ACCURACY:
Tested at random 1 <= k <= 25. The 'domain' refers to t.
Relative error:
arithmetic domain # trials peak rms
IEEE -100,-2 50000 5.9e-15 1.4e-15
IEEE -2,100 500000 2.7e-15 4.9e-17