# What is the correct definition of correlation?

According to [2008, Grewal M S, Andrews A P, sec. 3.4] the correlation of two vector-valued process $\vec{x}(t)$ and $\vec{y}(t)$ is defined by $$\text{corr}[\vec{x}(t_1),\vec{y}(t_2)]=E\langle \vec{x}(t_1)\cdot\vec{y}^T(t_2) \rangle = \left[ {\begin{array}{ccc} E\langle x_1(t_1)\cdot y_1(t_2) \rangle & \cdots & E\langle x_1(t_1)\cdot y_n(t_2) \rangle \\ \vdots & \ddots & \vdots \\ E\langle x_n(t_1)\cdot y_1(t_2) \rangle & \cdots & E\langle x_n(t_1)\cdot y_n(t_2) \rangle \end{array} } \right]$$

where $$E\langle x_i(t_1)\cdot y_j(t_2) \rangle = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} x_i(t_1)\cdot y_j(t_2)\cdot p[x_i(t_1), y_j(t_2)] \quad dx_i(t_1) dy_j(t_2) \\ \vec{x}(t) = [x_1(t), \cdots, x_n(t)]^T$$ in which $p$ is the probability density function and $E$ is the expectation operator.

In the above formula if I put a scalar-valued process namely $x(t)$ and $y(t)$ then I got this:

$$\text{corr}[x(t_1),y(t_2)] = E\langle x(t_1) \cdot y(t_2) \rangle$$

Howewer in other papers and website (for example Wikipedia) the correlation of two scalar-valued two random process $x(t)$ and $y(t)$ is defined by $$\text{corr}[x(t_1),y(t_2)] = \frac{ \text{cov} [x(t_1),y(t_2)]}{\text{std}[x(t_1)]\cdot\text{std}[y(t_2)]} = \frac{E\langle x(t_1)\cdot y(t_2) \rangle - E\langle x(t_1)\rangle\cdot E\langle y(t_2)\rangle}{\text{std}[x(t_1)]\cdot\text{std}[y(t_2)]}$$

My questions are the followings: (1) Which is the correct definition of the correlation? (2) If the wikipedia definition is the correct, is it possible two generalized this definition to for two vector-valued random variables?

Any advice and help will be greatly appreciated.

## 1 Answer

There is a discrepancy on the definition of correlation; science people tend to use your first definition (this is what Physicists do, if I'm not mistaken) and math people tend to use the second. The benefit of the second is that the number is between $0$ and $1$ (this can be seen by Cauchy-Schwarz), so it measures how much two random variables depend on each other ($1$ means a whole lot, $0$ means not at all, and $-1$ means a whole lot but in the opposite direction) while the benefit of the first takes into account how big each can be since it isn't normalized or centered.

There is a higher dimensional analog of the second one, called the correlation matrix. Basically, you just break down the vectors into its components, and in the $i,j$th entry, you have the correlation of $x_i$ and $y_j$.