Maxima 5.47.0 Manual: Beta Random Variable

Next: Continuous Uniform Random Variable, Previous: Gamma Random Variable, Up: Functions and Variables for continuous distributions [Contents][Index]

#### 52.2.10 Beta Random Variable

The beta distribution is a family of distributions defined over [0,1] parameterized by two positive shape parameters a, and b.

Function: pdf_beta (x,a,b)

  Returns the value at x of the density function of a \({\it Beta}(a,b)\) random variable, with a,b>0. To make use of this function, write first `load("distrib")`.

  The pdf is $$ f(x; a, b) = \cases{ \displaystyle{x^{a-1}(1-x)^{b-1} \over B(a,b)} & for $0 \le x \le 1$ \cr \cr 0 & otherwise } $$

  Categories:Package distrib ·

Function: cdf_beta (x,a,b)

  Returns the value at x of the distribution function of a \({\it Beta}(a,b)\) random variable, with a,b>0.

  The cdf is $$ F(x; a, b) = \cases{ 0 & $x < 0$ \cr I_x(a,b) & $0 \le x \le 1$ \cr 1 & $x > 1$ } $$

      (%i1) load ("distrib")$

      (%i2) cdf_beta(1/3,15,2);
                                     11
      (%o2)                       --------
                                  14348907

      (%i3) float(%);
      (%o3)                 7.666089131388195e-7

  Categories:Package distrib ·

Function: quantile_beta (q,a,b)

  Returns the q-quantile of a \({\it Beta}(a,b)\) random variable, with a,b>0; in other words, this is the inverse of `cdf_beta`. Argument q must be an element of [0,1]. To make use of this function, write first `load("distrib")`.

  Categories:Package distrib ·

Function: mean_beta (a,b)

  Returns the mean of a \({\it Beta}(a,b)\) random variable, with a,b>0. To make use of this function, write first `load("distrib")`.

  The mean is $$ E[X] = {a\over a+b} $$

  Categories:Package distrib ·

Function: var_beta (a,b)

  Returns the variance of a \({\it Beta}(a,b)\) random variable, with a,b>0. To make use of this function, write first `load("distrib")`.

  The variance is $$ V[X] = {ab \over (a+b)^2(a+b+1)} $$

  Categories:Package distrib ·

Function: std_beta (a,b)

  Returns the standard deviation of a \({\it Beta}(a,b)\) random variable, with a,b>0. To make use of this function, write first `load("distrib")`.

  The standard deviation is $$ D[X] = {1\over a+b}\sqrt{ab\over a+b+1} $$

  Categories:Package distrib ·

Function: skewness_beta (a,b)

  Returns the skewness coefficient of a \({\it Beta}(a,b)\) random variable, with a,b>0. To make use of this function, write first `load("distrib")`.

  The skewness coefficient is $$ SK[X] = {2(b-a)\sqrt{a+b+1} \over (a+b+2)\sqrt{ab}} $$

  Categories:Package distrib ·

Function: kurtosis_beta (a,b)

  Returns the kurtosis coefficient of a \({\it Beta}(a,b)\) random variable, with a,b>0. To make use of this function, write first `load("distrib")`.

  The kurtosis coefficient is $$ KU[X] = {3(a+b+1)\left(2(a+b)^2+ab(a+b-6)\right) \over ab(a+b+2)(a+b+3)} - 3 $$

  Categories:Package distrib ·

Function: random_beta (a,b)
`random_beta` (a,b,n)

  Returns a \({\it Beta}(a,b)\) random variate, with a,b>0. Calling `random_beta` with a third argument n, a random sample of size n will be simulated.

  The implemented algorithm is defined in Cheng, R.C.H. (1978). Generating Beta Variates with Nonintegral Shape Parameters. Communications of the ACM, 21:317-322

  To make use of this function, write first `load("distrib")`.

  Categories:Package distrib ·Random numbers ·

Next: Continuous Uniform Random Variable, Previous: Gamma Random Variable, Up: Functions and Variables for continuous distributions [Contents][Index]