Tutorials › Statistical Theory I - Probability and Distribution Theory › Scaling and Standardization of Gamma Variables

Uniform, Beta, and Gamma Laws · Tutorial 168 of 994

Scaling and Standardization of Gamma Variables

Learn how gamma laws transform under scaling, including reflection onto negative support, and how to center and scale gamma variables to mean zero and variance one.

Beginner 10 min read

What You'll Learn

  • Derive the density of a constant multiple of a gamma variable for either sign of the constant.
  • Track how scaling changes the gamma rate and scale parameters.
  • Identify the support and density when a gamma variable is reflected onto the negative half-line.
  • Standardize a gamma variable using its mean and standard deviation.
  • Check how scaling affects the mean and variance in worked examples.
  • Distinguish a standardized gamma variable from a standard normal variable.

Why Scaling a Gamma Variable Takes Care

A gamma variable takes positive values, but a scaled version need not: multiplying it by a negative constant reflects its distribution onto the negative half-line. Even when the multiplier is positive, it changes the rate and scale parameters. Keeping track of the support as well as the parameters prevents errors in densities, means, variances, and standardized values.

We use the shape-rate parameterization to derive the transformations, then translate the result into the scale parameterization. We also distinguish two useful operations: rescaling a gamma variable to have unit rate, and centering and scaling it to have mean zero and variance one. The latter does not generally produce a standard normal distribution.

Definition: For shape \(\alpha>0\) and rate \(\lambda>0\), \(X\) has a gamma distribution with shape \(\alpha\) and rate \(\lambda\) if its density is $$ f_X(x)=\frac{\lambda^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\lambda x},\qquad x>0, $$ and \(f_X(x)=0\) for \(x\leq 0\). Its scale parameter is \(\theta=1/\lambda\); in shape-scale notation its density is \(x^{\alpha-1}e^{-x/\theta}/(\Gamma(\alpha)\theta^\alpha)\) for \(x>0\).

The gamma moment formulas give \(E[X]=\alpha/\lambda=\alpha\theta\) and \(\operatorname{Var}(X)=\alpha/\lambda^2=\alpha\theta^2\). These formulas will make it possible to check scaling and standardization by two routes: from the transformed density and from the rules for expectation and variance.

Scaling by a Positive Constant

Let \(c>0\) and set \(Y=cX\). Since \(X>0\), the support of \(Y\) is also positive. The density transformation uses \(x=y/c\) and the Jacobian \(dx/dy=1/c\). Substitution into the density of \(X\) gives

$$ f_Y(y)=f_X(y/c)\frac{1}{c} =\frac{(\lambda/c)^\alpha}{\Gamma(\alpha)}y^{\alpha-1}e^{-(\lambda/c)y},\qquad y>0. $$

Thus the shape remains \(\alpha\), the rate becomes \(\lambda/c\), and the scale becomes \(c\theta\). In particular, multiplying by a number greater than one increases the scale and decreases the rate. The transformed moments agree: \(E[Y]=c\alpha\theta\) and \(\operatorname{Var}(Y)=c^2\alpha\theta^2\).

Worked Example: Increasing the Scale by a Positive Multiplier

Suppose \(X\) has shape \(3\) and rate \(2\), and let \(Y=2X\). Find the distribution, support, mean, and variance of \(Y\).

The multiplier is positive, so the support stays \(y>0\). The shape is unchanged, while the rate becomes \(2/2=1\). Therefore \(Y\) has shape \(3\), rate \(1\), and density

$$ f_Y(y)=\frac{1^3}{\Gamma(3)}y^2e^{-y} =\frac{1}{2}y^2e^{-y},\qquad y>0. $$

For a gamma variable with shape \(3\) and rate \(1\), the mean is \(3/1=3\), and the variance is \(3/1^2=3\). As a check, \(X\) has mean \(3/2\) and variance \(3/2^2=3/4\); hence \(E[2X]=2(3/2)=3\) and \(\operatorname{Var}(2X)=2^2(3/4)=3\).

Scaling by a Negative Constant

If \(c<0\), then \(Y=cX\) is negative whenever \(X>0\). Write \(a=|c|>0\), so \(Y=-aX\). For \(y<0\), the inverse transformation is \(x=-y/a\), and the absolute Jacobian is \(1/a\). This gives

$$ f_Y(y)=\frac{\lambda^\alpha}{\Gamma(\alpha)a^\alpha}(-y)^{\alpha-1}e^{\lambda y/a},\qquad y<0. $$

The density is zero for \(y\geq0\). Equivalently, \(-Y=aX\) is gamma with shape \(\alpha\) and scale \(a\theta\), while \(Y\) has that positive gamma distribution reflected across zero. The reflected variable is not a gamma variable under the usual definition, because its support is negative. Its mean and variance are \(E[Y]=c\alpha\theta\) and \(\operatorname{Var}(Y)=c^2\alpha\theta^2\).

Theorem: Suppose \(X\) has shape \(\alpha>0\) and rate \(\lambda>0\), and \(c\neq0\). If \(Y=cX\), then \(Y\) has support \(y>0\) when \(c>0\), and \(y<0\) when \(c<0\). For \(c>0\), \(Y\) is gamma with shape \(\alpha\), rate \(\lambda/c\), and scale \(c/\lambda\). For \(c<0\), \(-Y\) is gamma with shape \(\alpha\), rate \(\lambda/|c|\), and scale \(|c|/\lambda\). In both cases, \(E[Y]=c\alpha/\lambda\) and \(\operatorname{Var}(Y)=c^2\alpha/\lambda^2\).

Proof. If \(c>0\), the change of variables \(x=y/c\), with absolute Jacobian \(1/c\), gives the positive-support density derived above. If \(c<0\), then \(x=y/c=-y/|c|>0\) exactly when \(y<0\). Substituting this inverse and its absolute Jacobian \(1/|c|\) into \(f_X(x)\) gives the negative-support density. Applying the gamma moment formulas to \(X\), and using \(E[cX]=cE[X]\) and \(\operatorname{Var}(cX)=c^2\operatorname{Var}(X)\), yields the stated moments. \(\square\)

Worked Example: Reflecting a Gamma Variable

Let \(X\) have shape \(3\) and rate \(2\), and set \(Y=-2X\). Find the support, density, mean, and variance.

Here \(|c|=2\), so the support is \(y<0\). The reflected positive variable \(-Y=2X\) has shape \(3\) and rate \(2/2=1\). Reflecting its density gives

$$ f_Y(y)=\frac{1}{2}(-y)^2e^{y},\qquad y<0. $$

The original mean and variance are \(E[X]=3/2\) and \(\operatorname{Var}(X)=3/4\). Therefore

$$ E[Y]=-2\left(\frac{3}{2}\right)=-3,\qquad \operatorname{Var}(Y)=(-2)^2\left(\frac{3}{4}\right)=3. $$

The variance stays positive: a negative multiplier changes the sign of the mean, but variance uses the square of the multiplier.

Standardizing a Gamma Variable

For a variable with finite mean \(\mu\) and positive standard deviation \(\sigma\), mean-zero, variance-one standardization is \(Z=(X-\mu)/\sigma\). For a gamma variable with shape \(\alpha\) and scale \(\theta\), its mean is \(\alpha\theta\) and its standard deviation is \(\theta\sqrt{\alpha}\). Its standardized form is therefore

$$ Z=\frac{X-\alpha\theta}{\theta\sqrt{\alpha}}. $$

Because \(X>0\), this transformation has support \(z>-\sqrt{\alpha}\). The lower endpoint follows by solving \(x=\alpha\theta+\theta\sqrt{\alpha}\,z>0\). The density follows by applying the change of variables \(x=\theta(\alpha+\sqrt{\alpha}\,z)\) and \(dx/dz=\theta\sqrt{\alpha}\):

$$ f_Z(z)=\frac{\sqrt{\alpha}}{\Gamma(\alpha)} (\alpha+\sqrt{\alpha}\,z)^{\alpha-1} e^{-(\alpha+\sqrt{\alpha}\,z)},\qquad z>-\sqrt{\alpha}. $$

The standardization has \(E[Z]=0\) and \(\operatorname{Var}(Z)=1\), but its shape still depends on \(\alpha\), and it is bounded below. It is not generally standard normal. A different, simpler rescaling is \(W=\lambda X\), which has gamma shape \(\alpha\) and unit rate; that operation changes the scale but does not center the variable or give it variance one.

Worked Example: Standardizing a Gamma Variable

Let \(X\) have shape \(4\) and rate \(2\). Find the mean-zero, variance-one variable \(Z\), its support, and its density.

The scale is \(\theta=1/2\). Thus \(E[X]=4(1/2)=2\) and \(\operatorname{Var}(X)=4(1/2)^2=1\), so the standard deviation is \(1\). Consequently \(Z=(X-2)/1=X-2\), with support \(z>-2\). Substituting \(x=z+2\) into the density of \(X\) gives

$$ f_Z(z)=f_X(z+2) =\frac{2^4}{\Gamma(4)}(z+2)^3e^{-2(z+2)} =\frac{8}{3}(z+2)^3e^{-2(z+2)},\qquad z>-2. $$

Here \(\Gamma(4)=3!=6\), so \(2^4/\Gamma(4)=16/6=8/3\). The centering and scaling give mean \(0\) and variance \(1\), but the support \(z>-2\) shows that this is not a standard normal distribution.

Worked Example: Checking Variance After Positive Scaling

Let \(X\) have shape \(5/2\) and scale \(1/2\), and let \(Y=(3/2)X\). Find the distribution and check its mean and variance using both parameter formulas and scaling rules.

The original rate is \(2\). The new scale is \((3/2)(1/2)=3/4\), equivalently the new rate is \(2/(3/2)=4/3\). Thus \(Y\) has shape \(5/2\), scale \(3/4\), and support \(y>0\). Its mean from the new parameters is

$$ E[Y]=\frac{5}{2}\frac{3}{4}=\frac{15}{8}. $$

Its variance from those parameters is

$$ \operatorname{Var}(Y)=\frac{5}{2}\left(\frac{3}{4}\right)^2 =\frac{5}{2}\frac{9}{16}=\frac{45}{32}=1.40625. $$

Check the same result from \(X\): \(E[X]=(5/2)(1/2)=5/4\) and \(\operatorname{Var}(X)=(5/2)(1/2)^2=5/8\). Therefore \(E[Y]=(3/2)(5/4)=15/8\), while

$$ \operatorname{Var}(Y)=\left(\frac{3}{2}\right)^2\frac{5}{8} =\frac{9}{4}\frac{5}{8}=\frac{45}{32}=1.40625. $$

The square of the multiplier is \(9/4\), not \(9/2\); retaining that factor is essential for the variance calculation.

Common Mistakes and Practical Checks

Scaling formulas are easy to remember incorrectly if rate, scale, and support are not tracked together. The following checks help catch the most common errors.

  • Changing the rate in the wrong direction. Multiplying by \(c>0\) makes the scale \(c\theta\) and the rate \(\lambda/c\); rate and scale are reciprocals.
  • Leaving the support positive after a negative multiplier. If \(c<0\) and \(X>0\), then \(cX<0\). The transformed density must be placed on \(y<0\).
  • Using \(c\) instead of \(c^2\) for variance. The correct rule is \(\operatorname{Var}(cX)=c^2\operatorname{Var}(X)\). A negative \(c\) cannot produce negative variance.
  • Calling a standardized gamma variable standard normal. Centering and scaling set the mean and variance, not the distributional shape.

These transformations are useful for simplifying gamma probabilities and checking calculations. For instance, multiplying by the rate converts a gamma variable to unit rate, while reflecting a scaled variable can describe a signed quantity whose magnitude has a gamma law. In either case, first determine the support, then transform the density, and finally verify moments using the scaling rules.

Key takeaway: For \(Y=cX\), the shape of a gamma variable is unchanged. A positive multiplier changes its scale to \(c\theta\); a negative multiplier gives a reflected gamma law on the negative half-line with magnitude scale \(|c|\theta\). Mean-zero, variance-one standardization is a separate affine transformation and does not make the gamma shape normal.

Check Your Understanding

Use the support, transformed parameters, and moment formulas to check each answer.

  1. If \(X\) has shape \(2\) and rate \(5\), what are the shape, rate, and support of \(3X\)?
  2. If \(X\) has shape \(4\) and scale \(2\), what are the support and mean of \(-X\)?
  3. A gamma variable has shape \(\alpha\) and rate \(\lambda\). What is the distribution of \(\lambda X\), and what are its mean and variance?
  4. For a gamma variable with shape \(9\) and scale \(1/3\), find its mean, standard deviation, and the lower endpoint of its mean-zero, variance-one standardized support.
  5. Why does a gamma variable standardized to mean zero and variance one not generally have a standard normal distribution?