# Rearrange terms in two equations: Beta distribution mean/var

• December 15th 2010, 09:24 AM
FishSqueezer
Rearrange terms in two equations: Beta distribution mean/var
Hello,

The beta distribution has
mean = a/(a+b)
variance = ab/((a+b)^2 * (a+b+1))
where a and b are shape parameters
I want to solve for a and b in terms of the mean and variance.

For example, I want an answer that looks like this
a = var*mean^2
b = mean*var
except I made up these expressions and I want the real ones.

Thanks a lot for any help.
J
• December 15th 2010, 11:57 AM
mr fantastic
Quote:

Originally Posted by FishSqueezer
Hello,

The beta distribution has
mean = a/(a+b)
variance = ab/((a+b)^2 * (a+b+1))
where a and b are shape parameters
I want to solve for a and b in terms of the mean and variance.

For example, I want an answer that looks like this
a = var*mean^2
b = mean*var
except I made up these expressions and I want the real ones.

Thanks a lot for any help.
J

You have:

$\displaystyle \mu = \frac{a}{a + b}$ .... (1)

$\displaystyle \sigma^2 = \frac{ab}{(a + b)^2(a + b + 1)}$ .... (2)

and you want to solve a and b in terms of $\mu$ and $\sigma^2$.

Is that so?
• December 15th 2010, 12:13 PM
FishSqueezer
Yeah, that's what I was hoping to do. This would allow me to calculate the parameters needed to produce a desired mean and variance in the distribution. I'm just hung up on the Algebra.

Thanks
• December 15th 2010, 02:22 PM
emakarov
WolframAlpha was able to solve this system of equations.
• December 15th 2010, 03:10 PM
FishSqueezer
Thanks
Thanks a lot for the help!