Logo

BETADIST

Updated 2024-03-07 19:37:32.763000

Syntax

SELECT [westclintech].[wct].[BETADIST] (
  <@X, float,>
 ,<@P, float,>
 ,<@Q, float,>
 ,<@A, float,>
 ,<@B, float,>)

Description

Use the scalar function BETADIST to calculate the beta cumulative probability density function.

F(x;\alpha,\beta)=\frac{\text{B}_x(\alpha,\beta)}{\text{B}(\alpha,\beta)}=I_x(\alpha,\beta)

WhereBx(α,ß) is the incomplete beta function andIx(α,ß) is the regularized incomplete beta function.

Arguments

@A

is any real number. @A is an expression of type float or of a type that can be implicitly converted to float. @A is the lower bound to the distribution. If you enter NULL, @A defaults to zero.

@P

is any real number. @P is an expression of type float or of a type that can be implicitly converted to float. @A is a parameter to the distribution.

@B

is any real number. @B is an expression of type float or of a type that can be implicitly converted to float. @B is the upper bound to the distribution. If you enter NULL @B defaults to to zero.

@X

is any real number. @X is an expression of type float or of a type that can be implicitly converted to float. @X is the value between @P and @Q at which to evaluate the function.

@Q

is any real number. @Q is an expression of type float or of a type that can be implicitly converted to float. @Q is a parameter to the distribution.

Return Type

float

Remarks

If @X = 0, BETADIST will return an error.

If @P = 0 or @Q = 0, BETADIST will return an error.

If @X< @A or @X > @B or @A = @B, BETADIST will return an error.

If you enter NULL for @A and @B, BETADIST will use zero and one.

Examples

select wct.BETADIST(7, 5, 10, 6, 8);

This produces the following result.

{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"0.91021728515625"}]}