naginterfaces.library.stat.prob_beta_vector¶
- naginterfaces.library.stat.prob_beta_vector(tail, beta, a, b)[source]¶
prob_beta_vector
computes a number of lower or upper tail probabilities for the beta distribution.For full information please refer to the NAG Library document for g01se
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/g01/g01sef.html
- Parameters
- tailstr, length 1, array-like, shape
Indicates whether a lower or upper tail probabilities are required. For , for :
The lower tail probability is returned, i.e., .
The upper tail probability is returned, i.e., .
- betafloat, array-like, shape
, the value of the beta variate.
- afloat, array-like, shape
, the first parameter of the required beta distribution.
- bfloat, array-like, shape
, the second parameter of the required beta distribution.
- Returns
- pfloat, ndarray, shape
, the probabilities for the beta distribution.
- ivalidint, ndarray, shape
indicates any errors with the input arguments, with
No error.
On entry, invalid value supplied in when calculating .
On entry, , or, .
On entry, , or, .
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- Warns
- NagAlgorithmicWarning
- (errno )
On entry, at least one value of , , or was invalid.
Check for more information.
- Notes
The lower tail probability, is defined by
The function , also known as the incomplete beta function is calculated using
specfun.beta_incomplete
.The input arrays to this function are designed to allow maximum flexibility in the supply of vector arguments by re-using elements of any arrays that are shorter than the total number of evaluations required. See the G01 Introduction for further information.
- References
NIST Digital Library of Mathematical Functions
Hastings, N A J and Peacock, J B, 1975, Statistical Distributions, Butterworth
Majumder, K L and Bhattacharjee, G P, 1973, Algorithm AS 63. The incomplete beta integral, Appl. Statist. (22), 409–411