1

How can I calculate the α and β parameters for a Beta distribution if I know the mode and variance that I want the distribution to have? Examples of an R command to do this would be very helpful.

Yan Mu
  • 11
  • 4
  • 1
    Are you saying you ONLY know the mode and variance ... and nothing else??... i.e. you have NO raw data, and you have NO other moments? And what happens if your Beta distribution has more than 1 mode (by which I mean it is U shaped)? – wolfies Jan 31 '17 at 14:46
  • See http://stats.stackexchange.com/questions/12232/calculating-the-parameters-of-a-beta-distribution-using-the-mean-and-variance the answers can be easily applied to using mode instead of mean since the formulas for mean and mode in case of beta distribution are very similar. – Tim Jan 31 '17 at 14:48
  • How perfect do the parameters have to be? Are you just wondering how to find a distribution that fits an image you have in your mind or for generating data? – gung - Reinstate Monica Jan 31 '17 at 14:58
  • @Tim Actually I have first gone through the same post and tried to solve for α and β, but it is not as easy as with mean and variance. I am struggling to solve it analytically. Are you 100% sure that it is solvable analytically? then I would give some extra effort. – Yan Mu Jan 31 '17 at 15:01
  • @wolfies Please note that here α>=1 and β>1, then the bi-modality is avoided. – Yan Mu Jan 31 '17 at 15:08
  • @gung I am trying to understand if solving analytically is possible (100% accuracy). Otherwise numerical solving can provide sufficient accuracy. The distribution would be used to draw samples from. – Yan Mu Jan 31 '17 at 15:12
  • 2
    Of course there are exact formulas: the solutions are intersections of a linear and a cubic curve in the parameters. They are so messy that for practical purposes you might as well use numerical solutions and for theoretical purposes you are better off using the implicit formulas rather than the explicit solutions. Even the formula for $\alpha\gt 1$ and $\beta \gt 1$ is messy: $\alpha$ is a root of $$v x^3 +x^2 \left(m^3-m^2+7 m v-3 v\right)+x \left(-2 m^3+16 m^2 v+m^2-14 m v+3 v\right)+ \left(12 m^3 v-16 m^2 v+7 m v-v\right)$$ for instance (where $m$ is the mode and $v$ the variance). – whuber Jan 31 '17 at 16:41
  • @whuber Do you have a hint how to get the (exact) solution for $\alpha$ using this formula? I tried Wolfram Alpha, but was not able get to a usable real-value solution that would make sense (although this is likely due to me not being familiar with it). – monade Sep 17 '20 at 09:19
  • @Monade Even cubics are best solved numerically. Consider a starting value of $\alpha\approx 1 + m^2(1-m)/v$ and applying a few Newton-Raphson iterations. – whuber Sep 17 '20 at 13:34
  • Thanks! Though for my use case an exact solution is preferable since it is vecorizable and thus usually faster if a large number of (mode, variance) pairs have to be evaluated. – monade Sep 17 '20 at 14:50

0 Answers0