BETIN

This function evaluates the inverse of the beta cumulative distribution function.

Function Return Value

BETIN — Function value. (Output)
The probability that a beta random variable takes a value less than or equal to BETIN is P.

Required Arguments

P — Probability for which the inverse of the beta distribution function is to be evaluated. (Input)
P must be in the open interval (0.0, 1.0).

PIN — First beta distribution parameter. (Input)
PIN must be positive.

QIN — Second beta distribution parameter. (Input)
QIN must be positive.

FORTRAN 90 Interface

Generic: BETIN (P, PIN, QIN)

Specific: The specific interface names are S_BETIN and D_BETIN.

FORTRAN 77 Interface

Single: BETIN (P, PIN, QIN)

Double: The double precision name is DBETIN.

Description

The function BETIN evaluates the inverse distribution function of a beta random variable with parameters PIN and QIN, that is, with P = P, p = PIN, and q = QIN, it determines x (equal to BETIN(P, PIN, QIN)), such that

 

where Γ() is the gamma function. The probability that the random variable takes a value less than or equal to x is P.

Comments

Informational Error

 

Type

Code

Description

3

1

The value for the inverse Beta distribution could not be found in 100 iterations. The best approximation is used.

Example

Suppose X is a beta random variable with parameters 12 and 12. (X has a symmetric distribution.) In this example, we find the value x0 such that the probability that X  x0 is 0.9.

 

USE UMACH_INT

USE BETIN_INT

IMPLICIT NONE

INTEGER NOUT

REAL P, PIN, QIN, X

!

CALL UMACH (2, NOUT)

PIN = 12.0

QIN = 12.0

P = 0.9

X = BETIN(P,PIN,QIN)

WRITE (NOUT,99999) X

99999 FORMAT (' X is less than ', F6.4, ' with probability 0.9.')

END

Output

 

X is less than 0.6299 with probability 0.9.