Documentation/Calc Functions/BETA.DIST

    From The Document Foundation Wiki

    Function name:

    BETA.DIST

    Category:

    Statistical Analysis

    Summary:

    Calculates beta distribution values from either the probability density function or the cumulative distribution function.

    The beta distribution is a family of continuous probability distributions that can be used to model random variables that lie within finite bounds. The distribution has two characteristic positive real numbers, usually denoted as alpha (α) and beta (β), that control its shape. In many cases the beta distribution is defined on the range [0, 1] but in the more general case can be defined on a range [a, b], where a and b are the lower and upper bounds of the distribution (a < b).

    Syntax:

    BETA.DIST(Number; Alpha; Beta; Cumulative [; Start [; End]])

    Returns:

    Returns a non-negative real number, which is the beta distribution value for the given arguments. For the probability density function, the value returned lies in the range [0, +∞). For the cumulative distribution function, the value returned lies in the range [0, 1].

    Arguments:

    Number is a real number, or a reference to a cell containing that number, which is the value of the random variable that is to be used in the calculation. Number must lie in the range [Start, End].

    Alpha is a positive real number, or a reference to a cell containing that number, which is the value of one of the two parameters that control the shape of the beta distribution.

    Beta is a positive real number, or a reference to a cell containing that number, which is the value of the second of the two parameters that control the shape of the beta distribution.

    Cumulative is a logical value, or a reference to a cell containing that value, that determines whether the required probability is taken from the probability density function or the cumulative distribution function. If Cumulative is set to 0 or FALSE, a value from the probability density function is calculated. For any other values of Cumulative, a value from the cumulative distribution function is calculated.

    Start is a real number, or a reference to a cell containing that number, which is the lower bound of the distribution. If omitted, the default value of 0.0 is used.

    End is a real number, or a reference to a cell containing that number, which is the upper bound of the distribution. If omitted, the default value of 1.0 is used.

    • If any of Number, Alpha, Beta, Start, or End is non-numeric, then BETA.DIST reports a #VALUE! error.
    • If either Alpha or Beta is less than or equal to 0.0, then BETA.DIST reports an invalid argument error (Err:502).
    • If Number is less than Start or greater than End, then BETA.DIST reports an invalid argument error (Err:502).
    • Other errors may arise depending on the exact combination of values passed as arguments to BETA.DIST.

    Additional details:

    • Calc's BETADIST and BETA.DIST functions perform similar calculations. However, there are differences between the two functions with respect to the order of their arguments and the conditions placed on argument values. The requirements for BETADIST are specified in ODF 1.2; BETA.DIST is provided for interoperability with Microsoft Excel.
    • The main differences between BETADIST and BETA.DIST are as follows:
    • The order of the Start, End, and Cumulative arguments is not consistent.
    • The Cumulative argument is optional for BETADIST and required for BETA.DIST.
    • For BETA.DIST the Number argument must lie within the [Start, End] interval, while BETADIST accepts and handles out of range values.
    • The formula for the probability density function of the beta distribution can be written as:
    [math]\displaystyle{ \text{PDF}_{beta}(x)~=~\frac{1}{\text{B}(\alpha,\:\beta)}\:\times\:x^{\alpha-1}\:\times\:(1\:-\:x)^{\beta-1} }[/math]
    where [math]\displaystyle{ \text{B}(\alpha, \beta) }[/math] is the beta function, [math]\displaystyle{ x }[/math] lies in the range [0, 1], and both α and β are greater than 0. Note also that the beta function is closely related to the gamma function:
    [math]\displaystyle{ \text{B}(\alpha,\:\beta)~=~\frac{\Gamma(\alpha)\:\Gamma(\beta)}{\Gamma(\alpha\:+\:\beta)} }[/math]
    • The formula for the cumulative distribution function of the beta distribution can be written as:
    [math]\displaystyle{ \text{CDF}_{beta}(x)~=~\frac{1}{\text{B}(\alpha,\:\beta)}\:\times\int_{0}^{x}\:t^{\alpha-1}\times(1\:-\:t)^{\beta-1}~dt }[/math]
    where [math]\displaystyle{ x }[/math] again lies in the range [0, 1] and both α and β are greater than 0.
    • The above formulas relate to a beta distribution that is bounded on the [0, 1] interval and this is a common scenario. In more general cases when the lower bound is not 0 and / or the upper bound is not 1, then equivalent formulas are obtained by linear transformation.
    • The following figure shows four sample probability density function plots for the beta distribution.
    Beta distribution PDF plots.png
    • The following figure shows four sample cumulative distribution function plots for the beta distribution.
    Beta distribution CDF plots.png
    • The name space for BETA.DIST is COM.MICROSOFT.BETA.DIST.
    • For more information on the beta distribution, visit Wikipedia's Beta distribution page.

    Examples:

    Formula Description Returns
    =BETA.DIST(A1; A2; A3; A4; A5; A6) where cells A1:A6 contain the numbers 0, 1, 2, 0, 0, and 1 respectively. Here the function calculates the value of the beta probability distribution function defined on the range [0, 1] for the parameters x=0; α=1; β=2. 2
    =BETA.DIST(0.5, 1, 2, FALSE(), 0, 1) Similar to the previous example, except that here x=0.5 and the function returns 1. Note that the formula =BETA.DIST(1, 1, 2, FALSE(), 0, 1) returns 0 – the probability distribution function in this case is a straight line that goes from (0, 2) to (1, 0). 1
    =BETA.DIST(0.25; 1; 2; 1) Here the function calculates the value of the beta cumulative distribution function defined on the range [0, 1] for the parameters x=0.25; α=1; β=2. The Start and End arguments are omitted and assume the default values of 0 and 1 respectively. 0.4375
    =BETA.DIST(1.1; 6.2; 4.3; 1; -2.4; 6.5) Here the function calculates the value of the beta cumulative distribution function defined on the range [-2.4, 6.5] for the parameters x=1.1; α=6.2; β=4.3. 0.0975038972564338

    Related LibreOffice functions:

    BETADIST

    BETA.INV

    BETAINV

    ODF standard:

    None

    Related (or similar) Excel functions:

    BETA.DIST