Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Change language to: Français - Português - 日本語 - Русский

# cdfbet

cumulative distribution function Beta distribution

### Calling Sequence

[P,Q]=cdfbet("PQ",X,Y,A,B)
[X,Y]=cdfbet("XY",A,B,P,Q)
[A]=cdfbet("A",B,P,Q,X,Y)
[B]=cdfbet("B",P,Q,X,Y,A)

### Arguments

P,Q,X,Y,A,B

five real vectors of the same size.

P,Q (Q=1-P)

The integral from 0 to X of the beta distribution (Input range: [0, 1].)

Q

1-P

X,Y (Y=1-X)

Upper limit of integration of beta density (Input range: [0,1], Search range: [0,1]) A,B : The two parameters of the beta density (input range: (0, +infinity), Search range: [1D-300,1D300] )

### Description

Calculates any one parameter of the beta distribution given values for the others (The beta density is proportional to t^(A-1) * (1-t)^(B-1).

Cumulative distribution function (P) is calculated directly by code associated with the following reference.

DiDinato, A. R. and Morris, A. H. Algorithm 708: Significant Digit Computation of the Incomplete Beta Function Ratios. ACM Trans. Math. Softw. 18 (1993), 360-373.

Computation of other parameters involve a seach for a value that produces the desired value of P. The search relies on the monotinicity of P with the other parameter.

From DCDFLIB: Library of Fortran Routines for Cumulative Distribution Functions, Inverses, and Other Parameters (February, 1994) Barry W. Brown, James Lovato and Kathy Russell. The University of Texas.

### Examples

x  = 0:0.1:1;
y  = 1-x;

A = 2*ones(x);
B = 3*ones(x);

[p,q]=cdfbet('PQ',x,y,A,B);
plot2d2("gnn",[0:10]',p,5,"111","Repartition",[0,0,10,1])