# Algebraic manipulation of probability distributions

If $X_1, \ldots, X_n \sim N(\mu, \sigma^2)$, then $$\frac{n - 1}{\sigma^2}S^2 \sim \chi^2_{n - 1}$$ where $S^2 = \frac{1}{n-1}\sum_{i=1}^n (x_i^2- \bar{x})^2$, and there's a direct relationship between the $\chi^2_p$ and Gamma($\alpha, \beta$) distributions: $$\chi^2_{n - 1} = \text{Gamma}(\tfrac{n-1}{2}, 2).$$ But then why is $$S^2 \sim \text{Gamma}(\tfrac{n-1}{2}, \tfrac{2\sigma^2}{n-1}) \,?$$ And why do we multiply the reciprocal with $\beta$ and not $\alpha$? Is it because $\beta$ is the scale parameter?

In general, are there methods for algebraic manipulation around the "$\sim$" other than the standard transformation procedures? Something that uses the properties of location/scale families perhaps?

-
In the Gamma distribution with parameters $\alpha$ and $\beta$, $\beta$ is the rate i.e. the reciprocal of the scale. –  Henry Dec 27 '12 at 23:30
@Henry : That depends on which of two commonplace parametrizations is chosen. –  Michael Hardy Dec 27 '12 at 23:49
Thanks @MichaelHardy. To clarify, I'm referring to the $\exp\{-x/\beta\}$ version. –  Zoë Clark Dec 27 '12 at 23:54
@Michael: True - I was following the Wikipedia conventions, which uses $\operatorname{Gamma}(\alpha,\beta)$ for shape and rate versus $\operatorname{Gamma}(k,\theta)$ for shape and scale –  Henry Dec 28 '12 at 1:27

Suppose $X\sim \operatorname{Gamma}(\alpha,\beta)$, so that the density is $cx^{\alpha-1} e^{-x/\beta}$ on $x>0$, and $\beta$ is the scale parameter. Let $Y=kX$. The density function of $Y$ is $$\frac{d}{dx} \Pr(Y\le x) = \frac{d}{dx}\Pr(kX\le x) = \frac{d}{dx} \Pr\left(X\le\frac x k\right) = \frac{d}{dx}\int_0^{x/k} cu^{\alpha-1} e^{-u/\beta} \, du$$ $$= c\left(\frac x k\right)^{\alpha-1} e^{-(x/k)/\beta} \cdot\frac1k$$ $$=(\text{constant})\cdot x^{\alpha-1} e^{-x/(k\beta)}.$$

So it's a Gamma distribution with parameters $\alpha$ and $k\beta$.

-
Thanks. I've edited the post to reflect a more general question. Any thoughts on that? –  Zoë Clark Dec 28 '12 at 1:29

It seems you are using the "shape" and "scale" parameters; then it's better to use the notion $\text{Gamma}(k, \theta)$. Here $k$ is the "shape parameter", and $\theta$ is the "scale parameter".

If $X\sim \text{Gamma}(k, \theta)$, then $cX\sim \text{Gamma}(k, c\theta)$ for any $c > 0$.

Multiplying by $c$ (stretching/shrinking) changes the scale, but not the shape.

In your case $X = \frac{(n - 1)}{\sigma^2}S^2$ and $c = \frac{\sigma^2}{(n - 1)}$.

-