When computing the Pearson correlation coefficient between a vector $X = \{x_1,...,x_n\}$ and a vector $Y = \{y_1,...,y_n\}$, we need to compute it as
$$\frac{1}{n}\sum_{i=1}^{i=n}(x_i-\bar{x})(y_i-\bar{y}).$$
Here $\bar{x} = (1/n)*\sum_{i=1}^{i=n}x_i$.
My question concerns the case where $x_i$'s, $i=1\dots,n$, are in different order of magnitude. For instance, when $x_1 = 1000$, and $x_2 = 1$ is there any specific procedure to preprocess these different $x_i$'s? Or can we directly compute $\bar{x}$ as the above? Is there any article or book discussing this topic?