Tutorials › VEE Mathematical Statistics › Beta Shape Parameters From Mean And Variance

VEE Mathematical Statistics · Estimators and Moments Methods · Tutorial 445 of 880

Beta Shape Parameters From Mean And Variance

Match the beta distribution’s mean and variance to population or sample moments, solve for both shape parameters, and check whether the resulting estimates are feasible.

Intermediate 9 min read

What You'll Learn

  • State the beta distribution’s support and shape-parameter assumptions.
  • Derive its mean and variance from its first two raw moments.
  • Solve the moment equations for both beta shape parameters.
  • Calculate method-of-moments estimates from sample values in the unit interval.
  • Check feasibility and identify the effect of using the wrong sample-variance divisor.

Why Two Moments Determine the Beta Shape

The beta distribution is a flexible model for a random quantity that lies between zero and one. It can describe, for example, a hypothetical proportion of claims in a portfolio that meet a specified condition, or a hypothetical rate measured on a unit interval. Its two shape parameters control both the mean and the spread. In the method of moments, matching those two features gives two equations that can be solved for the parameters.

The key is to solve for the sum of the shape parameters first. Once that sum is known, the mean determines how it is divided between the two parameters. This approach is useful in actuarial modeling when a proportion-valued quantity is summarized by its mean and variance.

Definition: A random variable \(X\) has a beta distribution with shape parameters \(\alpha>0\) and \(\beta>0\), written \(X\sim\operatorname{Beta}(\alpha,\beta)\), if its density is $$ f_X(x)=\frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha,\beta)},\qquad 0<x<1, $$ and is zero outside that interval. Here \(B(\alpha,\beta)=\int_0^1 x^{\alpha-1}(1-x)^{\beta-1}\,dx\) is the beta function. The parameters must both be positive.

Mean and Variance of a Beta Random Variable

Write \(\kappa=\alpha+\beta\) for the sum of the shape parameters. The beta distribution’s first two raw moments are

$$ E[X]=\frac{\alpha}{\kappa}, \qquad E[X^2]=\frac{\alpha(\alpha+1)}{\kappa(\kappa+1)}. $$

Subtracting the square of the mean from the second raw moment gives the variance:

$$ \operatorname{Var}(X) =E[X^2]-\{E[X]\}^2 =\frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}. $$

These formulas follow from the beta-function integral. For a positive integer \(r\), integrating \(x^r\) against the beta density gives \(E[X^r]=B(\alpha+r,\beta)/B(\alpha,\beta)\). The beta-function recurrence \(B(a+1,b)=\frac{a}{a+b}B(a,b)\) then gives the first and second raw moments above. To see the variance simplification, let \(\kappa=\alpha+\beta\):

$$ \begin{aligned} \operatorname{Var}(X) &=\frac{\alpha(\alpha+1)}{\kappa(\kappa+1)}-\frac{\alpha^2}{\kappa^2}\\ &=\frac{\alpha\kappa(\alpha+1)-\alpha^2(\kappa+1)} {\kappa^2(\kappa+1)}\\ &=\frac{\alpha\beta}{\kappa^2(\kappa+1)}. \end{aligned} $$

The last equality uses \(\kappa-\alpha=\beta\). Equivalently, if \(\mu=E[X]\), then \(\alpha=\mu\kappa\) and \(\beta=(1-\mu)\kappa\), so the variance can also be written as \(\mu(1-\mu)/(\kappa+1)\). This form makes inversion especially direct.

Theorem: If a beta distribution has mean \(\mu\) and variance \(\sigma^2\), with \(0<\mu<1\) and \(0<\sigma^2<\mu(1-\mu)\), then its shape parameters are $$ \kappa=\alpha+\beta=\frac{\mu(1-\mu)}{\sigma^2}-1,\qquad \alpha=\mu\kappa,\qquad \beta=(1-\mu)\kappa. $$ The strict variance inequality ensures \(\kappa>0\), and therefore both shape parameters are positive.

Solving the Moment Equations

The method of moments sets theoretical population moments equal to the corresponding sample moments. For this two-parameter beta model, use the sample mean and the sample second central moment with divisor \(n\). If the observations are \(x_1,\ldots,x_n\), define

$$ \bar{x}=\frac{1}{n}\sum_{j=1}^{n}x_j,\qquad m_2=\frac{1}{n}\sum_{j=1}^{n}(x_j-\bar{x})^2. $$

The method-of-moments estimates are obtained by substituting \(\bar{x}\) for \(\mu\) and \(m_2\) for \(\sigma^2\) in the population formulas. The divisor is \(n\), not \(n-1\), because \(m_2\) is the empirical-distribution moment used for moment matching. This method does not guarantee valid beta parameters for every possible sample: the sample mean and variance must satisfy the corresponding feasibility conditions.

1
Calculate the moments.
Find the sample mean and the central second moment using divisor \(n\), or use supplied population moments if the task is to solve the population equations.
2
Find the parameter sum.
Calculate \(\widehat{\kappa}=\bar{x}(1-\bar{x})/m_2-1\).
3
Split the sum using the mean.
Set \(\widehat{\alpha}=\bar{x}\widehat{\kappa}\) and \(\widehat{\beta}=(1-\bar{x})\widehat{\kappa}\).
4
Check the result.
Both estimates must be positive. Substituting them into the beta mean and variance formulas should recover the moments that were matched.

Worked Applications

Worked Example: Solve from a Specified Mean and Variance

A hypothetical proportion \(X\) is modeled by a beta distribution. Its specified mean is \(0.4\) and its variance is \(0.04\). Find the two shape parameters and verify the result.

Method. Use the inverted beta moment equations. The required conditions hold: \(0<0.4<1\), and \(0.04<0.4(0.6)=0.24\).

First find the sum of the parameters:

$$ \kappa=\frac{\mu(1-\mu)}{\sigma^2}-1 =\frac{0.4(1-0.4)}{0.04}-1 =\frac{0.24}{0.04}-1 =6-1=5. $$

Then divide this sum according to the mean:

$$ \alpha=\mu\kappa=0.4(5)=2,\qquad \beta=(1-\mu)\kappa=0.6(5)=3. $$

Check. The implied mean is \(2/(2+3)=0.4\). The implied variance is \(2(3)/\{5^2(6)\}=6/150=0.04\), as required. A common mistake is to use \(\mu(1-\mu)/\sigma^2\) as \(\kappa\) without subtracting \(1\); that would give \(6\), and parameters \(2.4\) and \(3.6\), whose variance is \(0.24/(7)=0.0343\), not \(0.04\).

Worked Example: Estimate Both Parameters from Sample Values

In a hypothetical study, five observed proportions are \(0.2, 0.2, 0.4, 0.6, 0.6\). Treat them as observations from a beta distribution and find the method-of-moments estimates.

Method. Calculate the sample mean and the central second moment with divisor \(n=5\), then apply the beta inversion formulas.

The sum is \(0.2+0.2+0.4+0.6+0.6=2.0\), so

$$ \bar{x}=\frac{2.0}{5}=0.4. $$

The deviations from \(0.4\) are \(-0.2,-0.2,0,0.2,0.2\). Their squared values sum to \(0.04+0.04+0+0.04+0.04=0.16\). Thus

$$ m_2=\frac{0.16}{5}=0.032. $$

Now calculate the estimated parameter sum and shapes:

$$ \widehat{\kappa} =\frac{0.4(0.6)}{0.032}-1 =\frac{0.24}{0.032}-1 =7.5-1=6.5, $$ $$ \widehat{\alpha}=0.4(6.5)=2.6,\qquad \widehat{\beta}=0.6(6.5)=3.9. $$

Check. The estimated mean is \(2.6/(2.6+3.9)=2.6/6.5=0.4\). The estimated variance is \(2.6(3.9)/\{6.5^2(7.5)\}=10.14/316.875=0.032\). A common mistake is to divide the sum of squared deviations by \(n-1=4\); that gives \(0.04\), a different variance estimate and different moment estimates. For this method-of-moments calculation, use divisor \(n\).

Worked Example: Convert Raw Moments Before Solving

For a hypothetical unit-interval quantity, the first raw moment is \(E[X]=0.6\) and the second raw moment is \(E[X^2]=0.42\). Find the beta shape parameters that match these moments.

Method. The inversion formula needs the variance, not the second raw moment. Convert using \(\operatorname{Var}(X)=E[X^2]-\{E[X]\}^2\):

$$ \sigma^2=0.42-(0.6)^2=0.42-0.36=0.06. $$

Check feasibility: \(0<0.6<1\) and \(0.06<0.6(0.4)=0.24\). The parameter sum is

$$ \kappa=\frac{0.6(0.4)}{0.06}-1 =\frac{0.24}{0.06}-1=4-1=3. $$

Therefore,

$$ \alpha=0.6(3)=1.8,\qquad \beta=0.4(3)=1.2. $$

Check. The mean is \(1.8/3=0.6\), and the variance is \(1.8(1.2)/\{3^2(4)\}=2.16/36=0.06\). The second raw moment implied by the fitted distribution is \(0.06+0.6^2=0.42\). The common error is to substitute \(0.42\) directly for the variance; it is a raw moment, so the mean squared must first be subtracted.

Feasibility and Common Exam Traps

A beta distribution has positive shape parameters and support strictly between zero and one. Consequently, its mean must be strictly between zero and one, and its variance must be positive but smaller than \(\mu(1-\mu)\). The latter bound follows directly from \(\sigma^2=\mu(1-\mu)/(\kappa+1)\), since \(\kappa>0\). If supplied moments violate either condition, there is no beta distribution with those moments and positive shape parameters.

  • Forgetting the minus one: \(\mu(1-\mu)/\sigma^2\) is \(\kappa+1\), not \(\kappa\).
  • Confusing raw and central moments: the second raw moment is \(E[X^2]\); variance is \(E[X^2]-\{E[X]\}^2\).
  • Using the unbiased sample variance automatically: ordinary method-of-moments matching uses \(m_2\) with divisor \(n\). Do not replace it with the divisor-\(n-1\) variance unless the problem explicitly calls for that alternative.
  • Ignoring feasibility: a negative parameter estimate is not a valid beta fit. Check the mean and variance conditions before interpreting the result.
  • Overlooking endpoints: the continuous beta model has support \(0<x<1\). Data recorded exactly as zero or one may reflect rounding or a different data-generating process; the standard interior beta moment calculation does not resolve that modeling issue.

The shape-parameter sum also has an interpretation: at a fixed mean, a larger \(\kappa\) means a smaller variance. The split between \(\alpha\) and \(\beta\) locates the mean, while their total controls concentration around it. Method-of-moments estimates are a direct way to match these two features, but they are not a guarantee that every sample is well represented by a beta model.

Check Your Understanding

For each item, use the beta moment equations and check feasibility where needed.

  1. A beta model has mean \(0.3\) and second raw moment \(0.11\). Find the variance and both shape parameters. (Answer: variance \(0.02\); \(\alpha=2.85,\ \beta=6.65\))
  2. A beta model has mean \(0.5\) and variance \(0.125\). Find its shape parameters. (Answer: \(\alpha=0.5,\ \beta=0.5\))
  3. For observations \(0.1,0.3,0.5,0.7,0.9\), calculate method-of-moments estimates using the divisor-\(n\) central moment. (Answer: \(\widehat{\alpha}=1.0625,\ \widehat{\beta}=1.0625\))
  4. Can a beta distribution have mean \(0.4\) and variance \(0.25\)? Explain using the feasibility condition. (Answer: No; \(0.25\) is greater than \(0.4(0.6)=0.24\))
  5. For observations \(0.25,0.25,0.5,0.75,0.75\), find the method-of-moments estimates. Also state what parameter sum would result if the divisor-\(n-1\) variance were incorrectly used. (Answer: using \(m_2=0.05\), \(\widehat{\alpha}=\widehat{\beta}=2\); using variance \(0.0625\) incorrectly gives \(\widehat{\kappa}=3\))
Clinical Biostats