Beta                  package:stats                  R Documentation

_T_h_e _B_e_t_a _D_i_s_t_r_i_b_u_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Density, distribution function, quantile function and random
     generation for the Beta distribution with parameters 'shape1' and
     'shape2' (and optional non-centrality parameter 'ncp').

_U_s_a_g_e:

     dbeta(x, shape1, shape2, ncp=0, log = FALSE)
     pbeta(q, shape1, shape2, ncp=0, lower.tail = TRUE, log.p = FALSE)
     qbeta(p, shape1, shape2,        lower.tail = TRUE, log.p = FALSE)
     rbeta(n, shape1, shape2)

_A_r_g_u_m_e_n_t_s:

    x, q: vector of quantiles.

       p: vector of probabilities.

       n: number of observations. If 'length(n) > 1', the length is
          taken to be the number required.

shape1, shape2: positive parameters of the Beta distribution.

     ncp: non-centrality parameter.

log, log.p: logical; if TRUE, probabilities p are given as log(p).

lower.tail: logical; if TRUE (default), probabilities are P[X <= x],
          otherwise, P[X > x].

_D_e_t_a_i_l_s:

     The Beta distribution with parameters 'shape1' = a and 'shape2' =
     b has density

           Gamma(a+b)/(Gamma(a)Gamma(b))x^(a-1)(1-x)^(b-1)

     for a > 0, b > 0 and 0 <= x <= 1 where the boundary values at x=0
     or x=1 are defined as by continuity (as limits). 
      The mean is a/(a+b) and the variance is ab/((a+b)^2 (a+b+1)).

     'pbeta' is closely related to the incomplete beta function.  As
     defined by Abramowitz and Stegun 6.6.1

           B_x(a,b) = integral_0^x t^(a-1) (1-t)^(b-1) dt,

     and 6.6.2 I_x(a,b) = B_x(a,b) / B(a,b) where B(a,b) = B_1(a,b) is
     the Beta function ('beta').

     I_x(a,b) is 'pbeta(x,a,b)'.

_V_a_l_u_e:

     'dbeta' gives the density, 'pbeta' the distribution function,
     'qbeta' the quantile function, and 'rbeta' generates random
     deviates.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

     Abramowitz, M. and Stegun, I. A. (1972) _Handbook of Mathematical
     Functions._ New York: Dover. Chapter 6: Gamma and Related
     Functions.

_S_e_e _A_l_s_o:

     'beta' for the Beta function, and 'dgamma' for the Gamma
     distribution.

_E_x_a_m_p_l_e_s:

     x <- seq(0, 1, length=21)
     dbeta(x, 1, 1)
     pbeta(x, 1, 1)

