Skip to main content
Home
Pimath

Main navigation

  • Home
User account menu
  • Log in

Breadcrumb

  1. Home

Variance of the gamma distribution

Profile picture for user Pimath
By Pimath, 3 June 2025

In this section, we will examine the steps for calculating the variance of a random variable that follows a Gamma distribution. Computing the variance requires determining certain moments of the distribution, particularly the second moment \(\mathbb{E}(X^2)\) and the first moment \(\mathbb{E}(X)\).

Initially, we will calculate the second moment \(\mathbb{E}(X^2)\) by solving an integral involving the probability density function of the Gamma distribution. Subsequently, we will simplify the calculation through a change of variables and use the properties of the Gamma function to obtain an explicit expression. Finally, we will compute the variance using the definition \(\text{Var}(X) = \mathbb{E}(X^2) - \left[\mathbb{E}(X)\right]^2\), once we have established the value of the first moment.


Table of Contents

  • Calculation of the Second Moment
  • Change of Variables
  • Using the Gamma Function
  • Calculation of the Variance
  • Meaning of the Parameters
  • Numerical Example for Expected Value and Variance

Calculation of the Second Moment

To calculate the variance of a random variable \(X\), the first step consists of determining the expected value of \(X^2\), denoted by \(\mathbb{E}(X^2)\). This value can be expressed through the following integral:

\[ \mathbb{E}(X^2) = \int_{0}^{+\infty} x^2 f_X(x) \, dx \]

Substituting the probability density function \(f_X(x)\) of the Gamma distribution, we obtain:

\[ \mathbb{E}(X^2) = \frac{1}{\lambda^a \Gamma(a)} \int_{0}^{+\infty} x^{a+1} e^{-\frac{x}{\lambda}} \, dx \]

Change of Variables

To simplify the calculation, we perform a change of variables \(y = \frac{x}{\lambda}\), which implies \(x = \lambda y\) and \(dx = \lambda \, dy\). Substituting into the previous integral, we obtain:

\[ \mathbb{E}(X^2) = \frac{1}{\lambda^a \Gamma(a)} \int_{0}^{+\infty} \lambda^{a+1} y^{a+1} e^{-y} \, \lambda \, dy \]

Grouping the terms, we get:

\[ \mathbb{E}(X^2) = \frac{\lambda^{a+2}}{\lambda^a \Gamma(a)} \int_{0}^{+\infty} y^{(a+2)-1} e^{-y} \, dy \]

Using the Gamma Function

The resulting integral corresponds to the definition of the Gamma function:

\[ \int_{0}^{+\infty} y^{k-1} e^{-y} \, dy = \Gamma(k) \]

Substituting \(k = a+2\), we obtain:

\[ \mathbb{E}(X^2) = \frac{\lambda^2}{\Gamma(a)} \Gamma(a+2) \]

Using the property \(\Gamma(a+2) = (a+1)a\Gamma(a)\), we conclude that:

\[ \mathbb{E}(X^2) = (a+1)a\lambda^2 \]

Calculation of the Variance

The variance is defined by:

\[ \text{Var}(X) = \mathbb{E}(X^2) - \left[\mathbb{E}(X)\right]^2 \]

For a random variable that follows a Gamma distribution, the definition of the distribution gives us:

\[ \mathbb{E}(X) = a\lambda \]

Squaring this, we obtain:

\[ \left[\mathbb{E}(X)\right]^2 = (a\lambda)^2 = a^2\lambda^2 \]

Substituting these results:

\[ \text{Var}(X) = (a+1)a\lambda^2 - a^2\lambda^2 \]

Simplifying, we obtain:

\[ \text{Var}(X) = a\lambda^2 \]

Thus, we have derived the analytical expression for the variance of a random variable \(X\) that follows a Gamma distribution:

\[ \text{Var}(X) = a\lambda^2 \]

Meaning of the Parameters

The parameter \(a\) (also called the "shape parameter") determines the shape of the Gamma distribution. In particular, it controls the behavior of the tail and the general dispersion of the distribution. Higher values of \(a\) tend to concentrate the distribution around the mean.

The parameter \(\lambda\) (also known as the "scale parameter") regulates the degree of dispersion of the Gamma distribution. Larger values of \(\lambda\) produce a more dispersed distribution, thus increasing the variance of the random variable \(X\).

Consequently, the variance \(\text{Var}(X) = a\lambda^2\) highlights how the dispersion of \(X\) is influenced by both the parameter \(a\) and the parameter \(\lambda\), making the analysis of moments fundamental for understanding the statistical properties of the Gamma distribution.

Numerical Example for Expected Value and Variance

Suppose that a random variable \(X\) follows a Gamma distribution with parameters \(a = 3\) (shape parameter) and \(\lambda = 2\) (scale parameter). The objective is to calculate the variance of \(X\).

We begin by calculating the expected value \(\mathbb{E}(X)\). For a random variable with a Gamma distribution, the expected value is given by the relation: \[ \mathbb{E}(X) = a \cdot \lambda \] Substituting the values of parameters \(a\) and \(\lambda\), we get: \[ \mathbb{E}(X) = 3 \cdot 2 = 6 \] Therefore, the expected value of the random variable \(X\) is equal to 6.

Next, we calculate the second moment \(\mathbb{E}(X^2)\). This can be determined using the relation: \[ \mathbb{E}(X^2) = (a+1) \cdot a \cdot \lambda^2 \] Substituting the parameter values, we have: \[ \mathbb{E}(X^2) = (3+1) \cdot 3 \cdot 2^2 = 4 \cdot 3 \cdot 4 = 48 \] Therefore, the second moment of the random variable \(X\) is equal to 48.

Finally, we calculate the variance \(\text{Var}(X)\) using the definition: \[ \text{Var}(X) = \mathbb{E}(X^2) - \left[\mathbb{E}(X)\right]^2 \] Substituting the values calculated previously, we obtain: \[ \text{Var}(X) = 48 - 6^2 = 48 - 36 = 12 \] Therefore, the variance of the random variable \(X\) is equal to 12.

In conclusion, for a random variable \(X\) with a Gamma distribution and parameters \(a = 3\) and \(\lambda = 2\), the expected value turns out to be \(6\) and the variance turns out to be \(12\). These results indicate that the values of \(X\) tend, on average, to concentrate around 6, while the dispersion of values with respect to the mean is moderate, with a variance equal to 12.


Your feedback is important to us! Leave a comment and help us improve this content. Thank you!

Feedback

Support us with a Like:
Or, share:

Tags

  • Inferential Statistics

Support us with a Like:
Or, share:

Copyright © 2025 | Pimath | All Rights Reserved