# RE: [R] Re: beta distribution in terms of it's mean and standarddeviation

From: <Bill.Venables_at_csiro.au>
Date: Mon 11 Apr 2005 - 09:53:03 EST

For three of the beta distribution functions in R the parameters defining the distribution are alpha, beta and 'ncp'. Pretty trivially, there is no bijection between these three and the mean and variance, but for the special case of ncp = 0, I think there is.

Rather than just write it down, it's probably a good idea to see how to get it.

Note that

```mu = alpha/(alpha+beta)
s2 = alpha*beta/((alpha+beta)^2*(alpha+beta+1))
= mu*(1-mu)/(alpha+beta+1)

```

So as an intermediate result put

alpha + beta = mu*(1-mu)/s2 - 1 (= ab, say, which must be positive or you are in trouble)

giving

alpha = mu*ab
beta = (1-mu)*ab

Go forth and write your versions of the (central) beta distribution support functions...

Bill Venables.

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch
[mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Tolga Uzuner Sent: Monday, 11 April 2005 9:01 AM
To: tolga@coubros.com
Cc: r-help@stat.math.ethz.ch
Subject: [R] Re: beta distribution in terms of it's mean and standarddeviation

Tolga Uzuner wrote:

> Hi,
>
> Is the beta distribution implemented in terms of it's mean and
> standard deviation, as opposed to alpha and beta, in any R package ?
>
> Thanks
> Tolga
>
Hmm... answering my own question... guess there is no bijection between {alpha,beta} and {mean,variance} which is why... ocurred to me after I sent the question, unless someone disagrees.

R-help@stat.math.ethz.ch mailing list