# Calculating geometric based test statistic of a sample point

Hello this is my first question on this site, but I frequent in Stack Overflow and Ask Different.

I self-teaching statistics using the book Statistical Methods: The Geometric Approach and I'm having a few difficulties applying geometry to statistical problems, specifically with calculating a test statistic as seen in the book's introduction. For the figure below, the author states that you can calculate the test statistic for a given sample - in this case the point $$P(13,15)$$ - by finding two lengths, A and B, and then finally taking the ratio $$\frac{A}{B}$$ to find your test statistic.

With the given example point, the author finds a ratio of: $$\frac{14\sqrt{2}}{\sqrt{2}} = 14$$. I am stuck on figuring out how the author found the lengths for A and B. I tried obvious tricks like Pythagorean Theorem and Law of Sines but I was not able to get anywhere. A point in the right direction with an explanation would be wonderful.

Context to question: context

Figure in question:

• Always best to put to put all pictures and figures in the question, if you can, rather than use links. Jul 15, 2019 at 22:09
• I apologize, I don’t have enough rep on this site to embed photos. I was forced to post links. Perhaps someone can edit it for me so the pictures are directly embedded in the question. Jul 15, 2019 at 22:10
• Oh, I didn't realize that was a thing. I'll do it for you. One sec. Jul 15, 2019 at 22:36
• I can't find the relevant info in the book (I don't own a copy) nor can I find a pdf after a minute or so of trying, sadly, but perhaps someone has a copy. This seems like a context issue. If you put a link to a picture of the whole page and any other relevant book stuff, I'll put that in for you, too. Or you could just quote the book directly. Jul 15, 2019 at 22:43
• I actually own the PDF, but I'm not sure if I'm "allowed" to upload the entire text. I have 4 pages that provide context to the problem, how would you suggest I upload it? Jul 15, 2019 at 23:45

Considering the vector, $$v=[13\;15]^T$$, which is represented in the 2 space figure in the question as $$P(13,15)$$, the value of A and B can be solved like so:
• $$A=14\sqrt{2}$$ is found by solving for the length of the projection of $$v$$ onto the unit vector $$U_1=\frac{1}{\sqrt{2}}[1\;1]^T$$: $$A=v.U_1=\frac{13+15}{\sqrt{2}}=\frac{28}{\sqrt{2}}=14\sqrt{2}$$
• $$B=\sqrt{2}$$ is found by solving for the length of the projection of $$v$$ onto the unit vector $$U_2=\frac{1}{\sqrt{2}}[-1\;1]^T$$: $$B=v.U_2=\frac{-13+15}{\sqrt{2}}=\frac{2}{\sqrt{2}}=\sqrt{2}$$
In both of these values, $$\frac{1}{\sqrt{2}}[1\;1]^T$$ is the unit vector at $$45^\circ$$ to the x-axis and y-axis - the equiangular line between the two axes. The vector $$\frac{1}{\sqrt{2}}[-1\;1]^T$$ is the perpendicular vector to the unit vector of the equiangular line.