Algebraic calculation steps.

103 Views Asked by At

Can somebody explain how the coefficients $a_{11}, a_{12}, a_{22}$ are derived after rotating the ellipse below ??

$\widetilde{s_{11}} = \frac{\sum_{j=1}^n(x_{jk} - \bar{x_k})}{n}$

enter image description here

Thank you in advance.

1

There are 1 best solutions below

1
On BEST ANSWER

First, lets assume that the data are mean-centered so that the rotation is about the origin. If the data are not in this condition we can always do the centering before we proceed. This simplifies the path to the result we're looking for, since we can now assume that $\bar{x_.1}$ and $\bar{x_.2}$ are $0$.

Next, you'll want your variance (covariance) calculations to be based on a sum of squared deviations so that

$$\widetilde{s_{11}} = \frac{\sum_{j=1}^n(x_{j1} - \bar{x_{.1}})^2}{n} = \frac{\sum_{j=1}^nx_{j1}^2}{n}$$

since we are assuming the means are zero. Similarly, define $\widetilde{s_{22}}$ and $\widetilde{s_{12}}$ as $$ \widetilde{s_{22}} = \frac{\sum_{j=1}^nx_{j2}^2}{n}$$ and $$\widetilde{s_{12}} = \frac{\sum_{j=1}^nx_{j1}x_{j2}}{n}$$ where $\widetilde{s_{12}}$ is the sample covariance.

Using the relations between rotated and original coordinates shown above we see for a rotated point $\widetilde{P_k}$ that
$$\widetilde{x_{k1}}^2 = (x_{k1}cos\theta + x_{k2}sin\theta)^2 $$ $$= x_{k1}^2cos^2\theta + 2x_{k1}x_{k2}cos\theta sin\theta + x_{k2}^2sin^2\theta$$ and that $\widetilde{x_{k2}}^2 = x_{k1}^2sin^2\theta - 2x_{k1}x_{k2}sin\theta cos\theta + x_{k2}^2cos^2\theta$.

We can expand $\widetilde{s_{11}}$ in the same way giving $$\widetilde{s_{11}} = \frac{\sum_{j=1}^nx_{j1}^2}{n}$$ $$= \frac{\sum_{j=1}^n(x_{j1}cos\theta + x_{j2}sin\theta)^2}{n}$$ $$= \frac{\sum_{j=1}^n(x_{j1}^2cos^2\theta + 2x_{j1}x_{j2}cos\theta sin\theta +x_{j2}^2sin^2\theta)}{n}$$ $$=cos^2\theta s_{11} + 2cos\theta sin\theta s_{12} + sin^2\theta s_{22}$$ by regrouping and simply noticing that we're now talking about variances and the covariance in terms of the original $x$ values. Similarly, we can show that $$ \widetilde{s_{22}} = sin^2\theta s_{11} - 2sin\theta cos\theta s_{12} + cos^2\theta s_{22}$$

Finally, putting it all together we have that

$$\frac{\widetilde{x_{k1}}^2}{\widetilde{s_{11}}} + \frac{\widetilde{x_{k2}}^2}{\widetilde{s_{22}}}$$ $$=\frac{x_{k1}^2cos^2\theta + 2x_{k1}x_{k2}cos\theta sin\theta + x_{k2}^2sin^2\theta}{cos^2\theta s_{11} + 2cos\theta sin\theta s_{12} + sin^2\theta s_{22}} + \frac{x_{k1}^2sin^2\theta - 2x_{k1}x_{k2}sin\theta cos\theta + x_{k2}^2cos^2\theta}{sin^2\theta s_{11} - 2sin\theta cos\theta s_{12} + cos^2\theta s_{22}}.$$

If you rearrange terms in this sum you should easily be able to get to the definitions of $a_{11}, a_{12}$, and $a_{22}$ as shown above. Take its square root and you'll have your statistical distance $d(O,P_k)$ from the unrotated point $P_k$ to the origin, taking in to account the covariance between $x_1$ and $x_2$.