The function may be called by the names: g01eec, nag_stat_prob_beta or nag_prob_beta_dist.
3Description
The probability density function of the beta distribution with parameters and is:
The lower tail probability, is defined by
The function , also known as the incomplete beta function is calculated using s14ccc.
4References
Hastings N A J and Peacock J B (1975) Statistical Distributions Butterworth
5Arguments
1: – doubleInput
On entry: , the value of the beta variate.
Constraint:
.
2: – doubleInput
On entry: , the first parameter of the required beta distribution.
Constraint:
.
3: – doubleInput
On entry: , the second parameter of the required beta distribution.
Constraint:
.
4: – doubleInput
On entry: this argument is no longer referenced, but is included for backwards compatability.
5: – double *Output
On exit: the lower tail probability, .
6: – double *Output
On exit: the upper tail probability, .
7: – double *Output
On exit: the probability density function, .
8: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument had an illegal value.
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.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
NE_REAL_ARG_GT
On entry, .
Constraint: .
NE_REAL_ARG_LE
On entry, and .
Constraint: .
On entry, and .
Constraint: .
NE_REAL_ARG_LT
On entry, .
Constraint: .
7Accuracy
The accuracy is limited by the error in the incomplete beta function. See Section 7 in s14ccc for further details.
8Parallelism and Performance
g01eec is not threaded in any implementation.
9Further Comments
None.
10Example
This example reads values from a number of beta distributions and computes the associated upper and lower tail probabilities and the corresponding value of the probability density function.