BETPR

This function evaluates the beta probability density function.

Function Return Value

BETPR — Function value, the value of the probability density function. (Output)

Required Arguments

X — Argument for which the beta probability density function is to be evaluated. (Input)

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

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

FORTRAN 90 Interface

Generic: BETPR (X, PIN, QIN)

Specific: The specific interface names are S_BETPR and D_BETPR.

FORTRAN 77 Interface

Single: BETPR (X, PIN, QIN)

Double: The double precision name is DBETPR.

Description

The function BETPR evaluates the beta probability density function with parameters PIN and QIN. Using x = X, a = PIN and b = QIN, the beta distribution is defined as

 

where beta function B(a, b) is computed using IMSL function BETA (see the Special Functions book, Chapter 4, Gamma and Related Functions).

Example

In this example, we evaluate the probability function at X = 0.75, PIN = 2.0, QIN = 0.5.

 

USE UMACH_INT

USE BETPR_INT

IMPLICIT NONE

INTEGER NOUT

REAL X, PIN, QIN, PR

CALL UMACH(2, NOUT)

X = .75

PIN = 2.0

QIN = 0.5

PR = BETPR(X, PIN, QIN)

WRITE (NOUT, 99999) X, PIN, QIN, PR

99999 FORMAT (' BETPR(', F4.2, ', ', F4.2, ', ', F4.2, ') = ', F6.4)

END

Output

 

BETPR(0.75, 2.00, 0.50) = 1.1250