Rewriting a density in terms of a new variable

50 Views Asked by At

I am reading an paper (Lieberman & Resnikoff: Sampling Plans for Inspection by Variables), and I have tried to derive many of the results they state in this paper, but there is one result I struggle a bit with.

They consider the following conditional density of $y$ given $\bar{x}$ and $S$ (definition below the density)

$$f(y|\bar{x},S)=\sqrt{\frac{n}{n-1}}\frac{\Gamma\left(\frac{n-1}{2}\right)}{\sqrt{\pi}\Gamma\left(\frac{n-2}{2}\right)}\frac{1}{S}\left[1-\left(\frac{\bar{x}-y}{S}\right)^2\frac{n}{n-1}\right]^{(n-4)/2},$$

where $y$ denotes an observation from a sample $x_1,...,x_n$ of $n$ independent normally distributed numbers where $x_i\sim N(\mu,\sigma^2)$. $\bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_i$ denotes the sample mean, and $S=\sqrt{\sum_{i=1}^{n}(x_i-\bar{x})^2}$ is a scaling of the sample standard deviation.

The authors now introduce the following transformation

$$z=\frac{1}{2}+\frac{1}{2}\frac{\bar{x}-y}{S}\sqrt{\frac{n}{n-1}}$$

in which they now arrive at the following density

$$g(z)=\frac{\Gamma(n-2)}{\Gamma\left(\frac{n-2}{2}\right)\Gamma\left(\frac{n-2}{2}\right)}z^{(n/2-1)-1}(1-z)^{(n/2-1)-1},$$

which is recognised as a beta distribution with both parameters equal to $\frac{n-2}{2}$.

I have struggled trying to obtain this density for $z$ when using the transformation. To spare you from a lot of scribbles on paper, the best I have arrived at is the following:

$$\sqrt{\frac{n}{n-1}}\frac{\Gamma\left(\frac{n-1}{2}\right)}{\sqrt{\pi}\Gamma\left(\frac{n-2}{2}\right)}2^{n-4}\frac{1}{S}z^{(n-2)/2-1}(1-z)^{(n-2)/2-1}.$$

I achieved the above expression by using the substitution to rewrite $(1-2z)^2=\left(\frac{\bar{x}-y}{S}\right)^2\frac{n}{n-1}$, which led me to be able to rewrite the content in the square brackets

$$\left[1-\left(\frac{\bar{x}-y}{S}\right)^2\frac{n}{n-1}\right]^{(n-4)/2}=[1^2-(1-2z)^2]^{(n-4)/2}=[(2z)(2-2z)]^{(n-4)/2}=2^{n-4}[z(1-z)]^{(n-4)/2}.$$

I know I could also substitute in an expression for $\frac{1}{S}$, but it only seems to make it more complicated.

Furthermore, I know I am missing something, since I have made a change of variables, hence I need to include the Jacobian. This is also causing some confusion, as I'm not sure what the Jacobian would be. It seems to me like I'm going from 3 variables to 1, which makes me unsure of the dimension of the Jacobian matrix.

Any help or hints is highly appreciated!

Thanks in advance.

1

There are 1 best solutions below

1
On BEST ANSWER

Let $f_Y(y)$ be the pdf in terms of $y$, and let $f_Z(z)$ be the pdf in terms of $z$. If $y = y(z)$ is a function of $z$, then (as you correctly surmised) you must divide by the Jacobian of the change of variables: \begin{equation} f_Z(z) = {\left|\frac{\partial z}{\partial y}\right|}^{-1} f_Y(y(z)) \end{equation} Here \begin{equation} \left|\frac{\partial z}{\partial y}\right| = \frac{1}{2S}\sqrt{\frac{n}{n-1}} \end{equation} (Note that since the change of variables is from a single scalar variable $y$ to another single scalar variable $z$, the Jacobian is just a scalar, not a matrix.) Combining all of this and making the change of variables yields \begin{equation} f_Z(z) = 2^{n-3}\frac{\Gamma\left(\frac{n-1}{2}\right)}{\sqrt{\pi}\Gamma\left(\frac{n-2}{2}\right)}{\left[z(1-z)\right]}^{(n-4)/2} \end{equation} With the help of the Legendre duplication formula with $z = (n-2)/2$, we can show that the prefactor satisfies: \begin{equation} 2^{n-3}\frac{\Gamma\left(\frac{n-1}{2}\right)}{\sqrt{\pi}\Gamma\left(\frac{n-2}{2}\right)} = \frac{\Gamma(n-2)}{\Gamma{\left(\frac{n-2}{2}\right)}^2} \end{equation} This then gives us the exact expression for $g(z)$ you quoted from their paper.