\Header{Beta}{The Beta Distribution}
\alias{dbeta}{Beta}
\alias{pbeta}{Beta}
\alias{qbeta}{Beta}
\alias{rbeta}{Beta}
\keyword{distribution}{Beta}
\begin{Description}\relax
Density, distribution function, quantile function and random
generation for the Beta distribution with parameters \code{shape1} and
\code{shape2} (and optional non-centrality parameter \code{ncp}).\end{Description}
\begin{Usage}
\begin{verbatim}
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)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x, q}] vector of quantiles.
\item[\code{p}] vector of probabilities.
\item[\code{n}] number of observations. If \code{length(n) > 1}, the length
is taken to be the number required.
\item[\code{shape1, shape2}] positive parameters of the Beta distribution.
\item[\code{ncp}] non-centrality parameter.
\item[\code{log, log.p}] logical; if TRUE, probabilities p are given as log(p).
\item[\code{lower.tail}] logical; if TRUE (default), probabilities are
\eqn{P[X \le x]}{P[X <= x]}, otherwise, \eqn{P[X > x]}{P[X > x]}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The Beta distribution with parameters \code{shape1} \eqn{= a}{} and
\code{shape2} \eqn{= b}{} has density
\deqn{f(x)=\frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}{x}^{a} {(1-x)}^{b}
}{Gamma(a+b)/(Gamma(a)Gamma(b))x^(a-1)(1-x)^(b-1)}
for \eqn{a > 0}{}, \eqn{b > 0}{} and \eqn{0 < x < 1}{}.\end{Details}
\begin{Value}
\code{dbeta} gives the density, \code{pbeta} the distribution
function, \code{qbeta} the quantile function, and \code{rbeta}
generates random deviates.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{beta}} for the Beta function, and \code{\Link{dgamma}} for
the Gamma distribution.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x <- seq(0, 1, length=21)
dbeta(x, 1, 1)
pbeta(x, 1, 1)
\end{ExampleCode}
\end{Examples}

