NAG Library Routine Document
G01HCF returns probabilities for the bivariate Student's -distribution, via the routine name.
|REAL (KIND=nag_wp) G01HCF
||A(2), B(2), RHO
Let the vector random variable
follow a bivariate Student's
-distribution with degrees of freedom
, then the probability density function is given by
The lower tail probability is defined by:
The upper tail probability is defined by:
The central probability is defined by:
Calculations use the Dunnet and Sobel (1954)
method, as described by Genz (2004)
Dunnet C W and Sobel M (1954) A bivariate generalization of Student's -distribution, with tables for certain special cases Biometrika 41 153–169
Genz A (2004) Numerical computation of rectangular bivariate and trivariate Normal and probabilities Statistics and Computing 14 151–160
- 1: TAIL – CHARACTER(1)Input
: indicates which probability is to be returned.
- The lower tail probability is returned.
- The upper tail probability is returned.
- The central probability is returned.
, or .
- 2: A() – REAL (KIND=nag_wp) arrayInput
, the lower bounds
is not referenced.
- 3: B() – REAL (KIND=nag_wp) arrayInput
, the upper bounds
is not referenced.
if , , for .
- 4: DF – INTEGERInput
On entry: , the degrees of freedom of the bivariate Student's -distribution.
- 5: RHO – REAL (KIND=nag_wp)Input
On entry: , the correlation of the bivariate Student's -distribution.
- 6: IFAIL – INTEGERInput/Output
must be set to
. If you are unfamiliar with this parameter you should refer to Section 3.3
in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
. When the value is used it is essential to test the value of IFAIL on exit.
unless the routine detects an error or a warning has been flagged (see Section 6
6 Error Indicators and Warnings
If on entry
, explanatory error messages are output on the current error message unit (as defined by X04AAF
Errors or warnings detected by the routine:
If on exit, , then G01HCF returns zero.
On entry, TAIL
is not valid.
On entry, for central probability, for some .
On entry, .
On entry, or .
Accuracy of the algorithm implemented here is discussed in comparison with algorithms based on a generalized Placket formula by Genz (2004)
, who recommends the Dunnet and Sobel method. This implementation should give a maximum absolute error of the order of
This example calculates the bivariate Student's probability given the choice of tail and degrees of freedom, correlation and bounds.
9.1 Program Text
Program Text (g01hcfe.f90)
9.2 Program Data
Program Data (g01hcfe.d)
9.3 Program Results
Program Results (g01hcfe.r)