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

1. ## 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

2. 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 \displaystyle \mu = \frac{a}{a + b}$ .... (1)

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

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

Is that so?

3. 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

4. WolframAlpha was able to solve this system of equations.

5. ## Thanks

Thanks a lot for the help!