linear regression and obfuscation matrix - just not clicking for me? Here is the basis of my question.
We have an exercise to take a data set of made up insurance claims and train a linear regression model to predict future claims; however, because it is sensitive data, we want to use an obfuscation matrix to mask the data's values. Again, seemed pretty straight forward.
Now, I "know" that we can multiply the matrix by the obfuscation matrix and it won't have a significant impact on the accuracy of the prediction - but when I say "know" it is because I've done some reading and testing on the subject that says this is so - due to properties of the matrix.
What I don't know is WHY.

As part of our program, we are told properties that we can take on faith as true such as:
prediction of linear regression are given by
$a=Xw$, where $X$ is the feature matrix, and $w$ is our weight vector.
we are also told to assume that the equation for the weight vector is:
$=(^{})−1^{}$
and we are told we can use an invertible matrix to mask (we'll call it $P$) so our new feature matrix becomes:
$X'=XP$
the next step is to plug that in to the formula for our weight vector:
$′=((′)^{}′)^{−1}(′)^{}=(()^{})^{−1}()^{}$
Now is where I get lost - I am supposed to simply the right side of the equation using some properties of invertible matrices:
all invertible matrices   $^{−1}=^{−1}=$
where  $$  is an identity matrix characterized by the fact that $==$ for any matrix  $$
I'm just lost. I don't know where to start. Any input would be greatly appreciated. I've done some reading on the subject but it is just not clicking.
 A: Given $\tilde{X} = XP$ for $P$ an invertible matrix, we have
$$\begin{align}
{\beta}(\tilde{X}) &= (\tilde{X}^T \tilde{X})^{-1}\tilde{X}^T y \\
&= (P^TX^TXP)^{-1}P^TX^T y \\
&= P^{-1}(X^TX)^{-1}P^{-T}P^TX^T y \\
&= P^{-1}(X^TX)^{-1}(PP^{-1})^TX^T y \\
&= P^{-1}(X^TX)^{-1}X^T y \\
&= P^{-1}\beta(X)
\end{align}$$
which uses the facts that $(AB)^{-1}=B^{-1}A^{-1}$ and $(AB)^T=B^T A^T$. This should make it clear that the only difference in the coefficients compared to the usual case is a is a factor $P^{-1}$.
Whether or not this is small or a large difference in the coefficients compared to using $X$ instead of $XP$ depends on the choice of $P$.

*

*As an example, we would expect a diagonal $P$ with diagonal elements close to 1 to be very similar; in the case that all diagonal elements are exactly 1, then $P=I$ and it should be obvious why this special case would result in estimating the same coefficients.

However, looking at the model predictions, we see that the $P^{-1}$ factor must cancel out:
$$\begin{align}
X\beta(X) &= X\beta(X) \\
&=  XPP^{-1}\beta(X) \\
 &=  \tilde{X}\beta(\tilde{X}) \\
\end{align}
$$
