What is a deviation vector?

3.5k Views Asked by At

LINEAR ALGEBRA: I've looked online for this and can't find anything... What is a deviation vector and how do I compute them? (specifically how did my teacher get those vectors in part b?) Here is the problem I'm referring to:

  1. [4 points] Suppose we have nonnzero deviation vectors $\vec x,\vec y$ of two characteristics, such that $\vec x=c\vec y$. Show carefully what this implies about the correlation coefficient $r$ between the two characteristics.
  2. [6 points] Find the correlation coefficient between the daily profit and number of paintings inside three CA coffee shops.

$$\begin{array}{|c|c|c|} \hline \text{Shop} & \text{Profit (in 100s)} & \text{Paintings} \\\hline \text{A} & -1 & 1 \\\hline \text{B} & -1 & 2 \\\hline \text{C} & 2 & 3 \\\hline \end{array}$$

Answer.

  1. We have that:

$$r=\frac{\vec x\cdot\vec y}{\|\vec x\|\|\vec y\|}=\frac{c(\vec y\cdot\vec y)}{|c|\|\vec y\|\|\vec y\|}=\frac{c}{|c|}=\begin{cases} 1, & \text{if }c>0, \\ -1, & \text{if }c<0. \end{cases}$$

  1. [6 points] We find deviation vectors $\vec x=(-1,-1,2)^T$ and $\vec y=(-1,0,1)^T$. This gives:

$$r=\frac{\vec x\cdot\vec y}{\|\vec x\|\|\vec y\|}=\frac{3}{\sqrt6\sqrt2}\left(=\frac{\sqrt3}{2}\right).$$

Question image

1

There are 1 best solutions below

0
On

Deviation typically means $X-E(X)$, where $E(X)$ is the expected value/mean.

Notice that in the first column you have values $-1$, $-1$ and $2$. Their average is $0$, so after subtracting the average you get $\vec x=(-1,-1,2)$.

In the second column you have the values $1$, $2$ and $3$. The average of these values is $2$ after subtracting the average you get the values $1-2=-1$, $2-2=0$ and $3-2=1$. Your teacher written them into a single vector $\vec y=(-1,0,1)$.

The formula $$r=\frac{\vec x\cdot\vec y}{\|\vec x\|\|\vec y\|}$$ is then the formula for correlation coefficient. It is just written a bit differently. You can find this formula also in the Wikipedia article I linked above - in the section geometric interpretation. The example given there is very similar to this one. (Basically the only difference is that the Wikipedia article discusses uncentered and centered correlation coefficient.)