The distribution has PDF (probability density function)
nag_rand_students_t (g05snc) calculates the values
where the are generated by nag_rand_normal (g05skc) with mean and variance , and the are generated by nag_rand_gamma (g05sjc) with parameters and (i.e., from a -distribution with degrees of freedom).
On exit: the pseudorandom numbers from the specified Student's -distribution.
5:
fail – NagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).
6 Error Indicators and Warnings
NE_BAD_PARAM
On entry, argument had an illegal value.
NE_INT
On entry, .
Constraint: .
On entry, .
Constraint: .
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
NE_INVALID_STATE
On entry, state vector has been corrupted or not initialized.
7 Accuracy
Not applicable.
8 Parallelism and Performance
nag_rand_students_t (g05snc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the Users' Note for your implementation for any additional implementation-specific information.
9 Further Comments
The time taken by nag_rand_students_t (g05snc) increases with .
10 Example
This example prints five pseudorandom numbers from a Student's -distribution with five degrees of freedom, generated by a single call to nag_rand_students_t (g05snc), after initialization by nag_rand_init_repeatable (g05kfc).