Change of basis problem (as part of chi square goodness of fit proof) I have been working through a proof of the chi-square goodness of fit test proof that involves a change of basis step (proof shown here and a related link here). I am getting stuck at the following point (pg 66/67 in the proof); the relevant context to the problem is as follows:
Let $g_1,\dots , g_r$ be i.i.d. standard normal variables. Consider two vectors:
$$\pmb{g} = (g_1, \dots, g_r)^T$$
$$\pmb{p} = (\sqrt{p_1}, \dots, \sqrt{pr})^T$$
Where $p_1 + \dots + p_r = 1$. Note that $\pmb{p}$ is a unit vector:
$$\mid\mid \pmb{p} \mid \mid  = \sqrt{\pmb{p} \cdot \pmb{p}} = \sqrt{\sqrt{p_1}\sqrt{p_1} + \dots + \sqrt{p_r}\sqrt{p_r}} = \sqrt{p_1 + \dots + p_r} = \sqrt{1} = 1$$
Let us consider a new orthonormal coordinate system with the first basis vector (first axis) equal to $\pmb{p}$. In this new coordinate system vector $\pmb{g}$ will have coordinates: 
$$\pmb{g}' = (g_1', \dots , g_r') = V\pmb{g}$$
obtained from $\pmb{g}$ by orthogonal transformation 
$$V = (\pmb{p}, \pmb{p}_2, \dots, \pmb{p}_r)$$
That maps canonical basis into this new basis. 

Okay, so I am struggling to understand how $V$ (an orthogonal matrix) maps our canonical basis into the new basis. As far as I can understand, $V$ should map from the new coordinate system back to the canonical basis.  
For context I think this because $V$ has columns which correspond to the basis vectors of the new coordinate system (with the first column being the first basis vector, $\pmb{p}$). Hence if we had some vector $a$ described in the new coordinate system, $Va = b$ would yield a vector $b$ described in the canonical system (at least that is how I am understanding change of basis).
However, in the proof it is stated that $V\pmb{g} = \pmb{g}'$ , where $\pmb{g}'$ is supposedly described in the new coordinate system. I would have thought that in order to change basis and describe $\pmb{g}$ in the new coordinate system the inverse of $V$ would be needed:
$$\pmb{g}' =  V^{-1}\pmb{g}$$
But that appears not to be the case. Can anyone help me understand why this is so, and where I appear to be making this mental error? Also if there is any additional context or information I can supply to help clarify things please let me know-thanks!
 A: You might want to consider this as a possible way to work out the various relationships.  Consider a 2D coordinate system that is rotated with respect to another coordinate system.  Take the unprimed to be "canonical" and the primed to be the "new" coordinate system:
Now, in terms of matrices we can write the following for the rotation matrix that transforms coordinates from unprimed to primed:
$$
A=
\begin{bmatrix}
\cos \theta & \sin \theta \\
- \sin \theta & \cos \theta \\
\end{bmatrix}
$$
To see this in action, take the unit vector along the x-direction (in the unprimed canonical system) and see what the result is:
$$
A=
\begin{bmatrix}
\cos \theta & \sin \theta \\
- \sin \theta & \cos \theta \\
\end{bmatrix}
\begin{bmatrix}
1 \\
0 \\
\end{bmatrix}
=
\begin{bmatrix}
\cos \theta \\
- \sin \theta \\
\end{bmatrix}
$$
From the above, we see that the coordinates in the primed-system are 
$$
\begin{bmatrix}
\cos \theta \\
- \sin \theta \\
\end{bmatrix}
$$
If you compare to the figure, you see this is consistent in that the original x-vector projects onto the positive x-prime coordinate (reduced by a cosine factor) and also projects onto the negative y-prime coordinate.
I hope this helps.
