nag_prob_beta_dist (g01eec) computes the upper and lower tail probabilities and the probability density function of the beta distribution with parameters and .
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
nag_incomplete_beta (s14ccc).
- 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 2.7 in How to Use the NAG Library and its Documentation).
The accuracy is limited by the error in the incomplete beta function. See
Section 7 in nag_incomplete_beta (s14ccc) for further details.
nag_prob_beta_dist (g01eec) is not threaded in any implementation.
None.
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.