Click or drag to resize
RandomNextStudentsT Method
Generate a pseudorandom number from a Student's t distribution.

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
public virtual double NextStudentsT(
	double df
)

Parameters

df
Type: SystemDouble
A double which specifies the number of degrees of freedom. It must be positive.

Return Value

Type: Double
A double which specifies a pseudorandom number from a Student's t distribution.
Remarks

NextStudentsT generates pseudo-random numbers from a Student's t distribution with df degrees of freedom, using a method suggested by Kinderman, Monahan, and Ramage (1977). The method ("TMX" in the reference) involves a representation of the t density as the sum of a triangular density over (-2, 2) and the difference of this and the t density. The mixing probabilities depend on the degrees of freedom of the t distribution. If the triangular density is chosen, the variate is generated as the sum of two uniforms; otherwise, an acceptance/rejection method is used to generate a variate from the difference density.

For degrees of freedom less than 100, NextStudentsT requires approximately twice the execution time as NextNormalAR, which generates pseudorandom normal deviates. The execution time of NextStudentsT increases very slowly as the degrees of freedom increase. Since for very large degrees of freedom the normal distribution and the t distribution are very similar, the user may find that the difference in the normal and the t does not warrant the additional generation time required to use NextStudentsT instead of NextNormalAR.

See Also