2.1.24.5.1.1 betacdf


Description

beta cumulative distribution function

Syntax

double betacdf( const double x, double a, double b, int iTail = TAILED_TEST_LOWER, int * nFail = NULL )

Parameters

x
[input] value of the x variate, must lie on the interval [0, 1].
a
[input] first shape parameter, a, of the required beta distribution, must be positive( a>0 ).
b
[input] second shape parameter, b, of the required beta distribution, must be positive ( b>0 ) .
iTail
[input] upper tailed, or lower tailed test..
1 = TAILED_TEST_UPPER,
2 = TAILED_TEST_LOWER.
nFail
[output] on successful exit, it returns the NAG error code NE_NOERROR; if an error or
warning has been detected, then it returns the specific error or warning code.

Return

Returns value of cdf of the Beta distribution with parameter a and b, evaluated at the values in x

Examples

EX1

void betacdf_ex1()
{
	double x[]= {0.25, 0.5, 0.75};
	double a = 1.0, b =3;
	for(int ii = 0; ii<3; ii++)
		printf("%f	%f	%f:	%f\n", x[ii], a, b, betacdf(x[ii], a, b));
}

Remark

See Also

Header to Include

origin.h

Reference