Correlation Angles and Inner Products: Application to a Problem from Physics

Covariance is used as an inner product on a formal vector space built on n random variables to define measures of correlation Md across a set of vectors in a d-dimensional space. For d = 1, one has the diameter; for d = 2, one has an area. These concepts are directly applied to correlation studies in climate science.


Introduction
In a study of the earth's climate system, Douglass 1 considered the correlation among a set of N climate indices. A distance d between two indices i and j was defined as where ϕ ij is the Pearson correlation coefficient. It was stated that d satisfies the conditions to be a metric. The measure of correlation, or closeness, among the N indices was taken to be the diameter D 1.2 Equation 1.2 was applied to the data from a global set of four climate indices to determine the correlation among them minimum in D and to infer 18 changes in the state since 1970 see Section 8 . It was pointed out that the topological diameter D, as a measure of phase locking among the indices, is convenient for computation but was probably not the 2 ISRN Applied Mathematics best measure. It was suggested that a better measure of correlation among the N indices could be based upon the area of the spherical triangles created by the N vectors on the unit sphere. This paper gives a proof that d ij is a metric and generalizes the diameter to higher dimensions. In addition, the data of 1 are analyzed using this generalization to areas see Section 8 , and many new abrupt climate changes are identified.

Probability
Let X and Y be random variables with expected values E X μ and E Y ν. With these values, we make several standard definitions.
We now list a few basic properties of variance and covariance found in 2 .

Properties 2.3
For X and Y as above.
i Covar is symmetric.
iii Var − is a quadratic form.
v Covar X, X Var X , the variance of X.

Vector Spaces
The first way most students learn to compare two vectors is through the dot product. The dot product is one example of the more general idea of an inner product. Here we define an inner product and prove that covariance is an inner product. that satisfies the following properties for every u, v, w ∈ V , and a ∈ R: We will now construct a vector space for which covariance is an inner product. Let {X 1 , X 2 , . . . , X n } be a set of n random variables. Also let V Span R X 1 , X 2 , . . . , X n , the formal R-vector space with basis elements {X 1 , X 2 , . . . , X n }. We must put one mild hypothesis upon V in order for it to have the desired properties. The hypothesis is that the vectors must be "probabilistically independent." That is, for any c 1 , . . . , c n ∈ R, we have that Var c 1 X 1 · · · c n X n 0 if and only if c 1 · · · c n 0. It should be noted that this independence is in no way related to the linear independence of the random variables.

Proposition 3.2. Let V
Span R X 1 , X 2 , . . . , X n , the formal R-vector space generated by the random variables {X 1 , X 2 , . . . , X n } which are probabilistically independent, then covariance is an inner product on V .
Proof. We must prove the four properties from Definition 3.1.
i , ii , and iii follow immediately from Properties 2.3. iv Covar X, X E x − μ 2 ≥ 0. The nonnegativity is obvious as we are squaring a real number. The condition that Covar X, X 0 ⇔ X 0 follows from the probabilistic independence of {X 1 , . . . , X n }.
The proposition implies that V is an inner product space a vector space equipped with an inner product , and as such it has a norm defined by X Covar X, X SD X , where SD X is the standard deviation of X. Additionally it follows from the Cauchy-Schwartz inequality 3 that |Covar X, Y | ≤ SD X SD Y .
Using the inner product on V , we are able to define an angle between two vectors. To do this, we first define a new map ρ : By the Cauchy-Schwartz inequality, we can easily see that |ρ X, Y | ≤ 1, as such we implicitly define Γ, the angle between X and Y , as follows: Therefore, ρ X, Y Covar X, Y /SD X SD Y cos Γ . Definition 3.3. Γ X, Y cos −1 ρ X, Y is the "Correlation Angle" of X and Y .

ISRN Applied Mathematics
Our definition of Γ is the standard method of defining an angle from the covariance or any other inner product. We will show that Γ is a "metric" on the unit sphere of V .
Definition 3.4. For any set S, a map d : S×S → R is a metric if for any x, y, z ∈ S the following properties are satisfied: Proof. We must prove that Γ satisfies the 3 conditions in Definition 3.4. a cos −1 : −1, 1 → 0, π so the nonnegativity is satisfied trivially. It remains to show that Γ X, Y 0 ⇔ X Y . This is true because if the angle between two vectors is zero, then they are positive scalar multiples of each other. Thus since X and Y are c To prove the triangle inequality, a geometric idea in itself, we delve into the geometry being defined. We will complete this part of the proof in Section 4.
Our metric Γ allows us to measure the correlation between two vectors.
Definition 3.6. For X, Y , Γ, and ρ as above: i if Γ 0 ρ 1 , then X and Y are maximally positively correlated.
It should be noted that cases i and ii are both considered to be "maximally correlated."

A Geometric Interpretation
The vector space V with inner product Covar lends itself nicely to a geometric interpretation. First we must establish a small amount of background.
Consider S, the standard unit sphere in Euclidean n-space R n . Great circles are the intersection of a plane through the origin and S. They share many properties with the standard idea of lines in Euclidean space, including the property that they define the shortest path between any two points. For a thorough treatment of great circles as lines on a sphere, see 4-6 or 7 .
For any two nonzero vectors v 1 and v 2 in R n , let θ be the minimal angle formed by v 1 and v 2 . The unit vectors v 1 and v 2 , corresponding to v 1 and v 2 , define two points p 1 and p 2 on S. In order to measure the distance from p 1 to p 2 along S, we take the length of the arc on great circle between the two points. By definition, this is the radian measure of θ.
If V , the vector space considered in Section 3, is thought of as R n with v 1 and v 2 any two vectors, then we can compute the spherical distance between v 1 and v 2 , namely, the distance between p 1 and p 2 on S. We call this quantity Γ Thus far we have identified the inner product space V, Covar as R n . We solidify this intuition with the following proposition. First we define A A i,j Covar X i , X j , a real valued symmetric matrix. As in 3 , we use A to create the inner product on R n . Proposition 4.1. The inner product space Span R X 1 , . . . , X n , Covar ∼ R n , · A , where · A is a "twisted dot product" defined for two vectors c 1 , . . . , c n and d 1 , . . . , d n as Proof. This follows from the standard method of representing an inner product by a matrix see 3, chapter 8.1 .
Now we return to our proof of Theorem 3.5.
Because X and Z are unit vectors, Γ X, Z is the geodesic distance between X and Z. Since geodesic distance satisfies the triangle inequality, Γ must as well.

Projective Metric
For scientists, ρ ±1 equivalently Γ 0 or Γ π are often both considered to be "maximally correlated," for example, see 1 . To take this into account, we modify our metric on the unit sphere of V . We think of V as a projective space, the space of lines through the origin of V . We denote this space as P V .
Our original correlation angle Γ is modified to be Proposition 5.1. Γ X, Y is a metric on P R n .
Proof. We must show that the three conditions of Definition 3.4 are met.
i Γ 0 corresponds to a correlation angle of 0 or π. The two vectors are either in the same direction or opposite direction. In either case, they determine the same line through the origin and hence correspond to the same point in projective space.
ii As in Definition 3.4, the symmetry of Γ follows from the symmetry of ρ.
iii As before, the triangle inequality follows as Γ is the geodesic distance for a projective space.
The metric Γ X, Y gives the angular distance between X and Y . If ρ X, Y ±1 what we called a "maximal correlation" then Γ 0, however, if ρ X, Y 0, which we called orthogonality or noncorrelation, then Γ π/2. Proposition 5.2. Let Γ be the metric cos −1 ρ X, Y , then the pair P V , Γ is a projective metric space.
Proof. This is by construction.

Time Dependence
Until this point, we have treated our random variables {X 1 , . . . , X n } as being time independent. However, random variables often depend on time. Therefore, we will now consider each random variable as depending discretely on time. It should be noted that what follows is essentially a replication of what has come before, however, X and Y are now treated as vectors instead of singleton points. Vectors, however, are just points of V . The additional theory and notation is simply a means of dealing with the additional information.
To make our n random variables time dependent, they will now be given as X n {X n t , X n t 1 , X n t 2 , . . .}.

6.1
We must now redefine the covariance. We do this by looking at a time window starting at time t with a duration of K, where K is called the summation window where μ and ν are the sample means in the summation window of X i and X j , respectively.
If we think of X i and X j as the vectors X i X i t , . . . , X i t K − 1 resp., for X j , then we get that where "·" is the standard Euclidean dot product, and μ is the length K vector μ, . . . , μ resp., for ν . This is called the "Pearson Covariance." In other words, if we define the vectors X i X i t − μ / √ K, and X j X j t − μ / √ K, then we define the Pearson Correlation as follows.
Definition 6.1. Covar Pearson X i , X j X i · X j , where "·" is the usual Euclidean inner product.

Now we define the Pearson Correlation as
Here again Γ corresponds to the standard Euclidean angle, known as the Pearson Correlation Angle, and the resulting metric is the standard metric studied in classical spherical geometry see 4-6 or 7 .
Remark 6.2. The angle Γ between X i and X j is the same as the angle between X i and X j , the unit vectors corresponding to X i and X j .

Correlation Measures: M n and M n,a
To this point, we have developed a method that will numerically tell us the correlation between two vectors. In this section, we will create two sets of functions that allow us to measure the correlation across a set of vectors. The first set, {M i,a }, is based upon taking the volumes of i-simplices a 1-simplex is a line, a 2-simplex a triangle, a 3-simplex is a tetrahedron, etc. . The set of M i,a benefits from computability but is not as precise as the second set of measures {M i }, that measure the volume of i-dimensional convex hulls. Given a set of vectors {X 1 , . . . , X m } ⊆ V , let U {U 1 , . . . , U m } be the set of corresponding unit vectors. We will define a way to measure the closeness of the U i to each other using the metric Γ. To do this, we define the diameter of U as If all of the vectors are taken in the standard way to be points on the unit sphere, then the diameter is a measure of the overall spread of the points. If the diameter is small, then the vectors are all close together, hence highly correlated. Whereas if the diameter is large at least some of the points are far apart, hence not highly correlated. The benefit of the diameter is that it is an easy quantity to calculate; however, it can be somewhat misleading. If, for instance, 8 ISRN Applied Mathematics a large number of points are clustered together and there is one outlying point, the diameter can be quite large despite the fact that the points are generally quite correlated. We now proceed to generalize the correlation measure defined by D. Let T be a collection of t points on the n-sphere, and let D be the set of n-simplices made up of points in T .
This maximum is taken over the C C T, n 1 t n 1 different n-simplices made of points in T .

Definition 7.2. M n T
Vol H .
The volume used in Definition 7.2 is the spherical volume, and H is the convex hull of the points of T with respect to the spherical measure. That is, it is the smallest geodesically convex set containing T . Geodesically convex means that any two points in the set have the minimal geodesic between them completely in the set as well.
The volume is computed by constructing the convex hull of T , then disregarding all the points of T not contributing to the hull. The hull is then divided into its "essential" nsimplices, and the volumes of these simplices are summed.
M n and M n,a are each measures of n-dimensional volume. M n,a benefits from being easily computable. M n , though harder to compute, gives a better measure of the overall spread of the vectors. However, in the one dimensional case, we have that M 1 M 1,a D, the diameter. The reason for this is that when making the hull to compute M 1 all, but the two furthermost points will be disregarded. This equality is not true in general, a fact which can be easily observed by plotting four points forming a quadrilateral, where M 2,a < M 2 . In the general case, however, we do have the inequality M n,a T ≤ M n T . This follows since the maximal simplex will necessarily be a subset of the convex hull. Since volume is monotonic, we have the inequality.
Assume that s of the t points of T are essential to the convex hull. There is a constant B B s, n defining the number of essential simplices that compose the convex hull. That is, M n T the sum of the volume of B-essential simplices. 7.2 Replacing the volume of each spherical simplex with the maximal one, that is, M n,a T , we get the following inequalities Since B depends only on the number of points in T , we see that, for a fixed data set, M n and M n,a differ by at most a fixed constant.
To relate M n and M n,a to Section 6, we note that when T time-dependent random variables are looked at over a summation window of length K n 1, then we get T points on the n-sphere. In this situation, we can apply the measures of spread given by M n T or M n,a T or M k,a T for k < n.  Table 1.

Topology of Earth's Climate Indices and Phase-Locked States
In this section, we apply our new correlation measure to data from Douglass's paper 1 . In 1 , the diameter M 1 M 1,a is used to analyze a set of climate data; in this section, we use M 2,a to analyze the same data. Comparing the results of the new analysis to Douglass's original analysis shows the increased effectiveness of the new correlation measure. In Section 7 the correlation among a set of indices can be measured, using M i,a by taking the volumes of i-simplices. In 1 , Douglass uses the diameter of the metric space I 0 , Γ , defined as 8.2 In the notation of Section 7, D M 1,a . Geometrically, D selects the largest angle Γ X i , X j among the set. The diameter D may be considered a "dissimilarity" index because large D means weak correlation. Thus, the minima in D are associated with high correlation among the elements of the set. In Douglass, 1 , two cases were considered: 1 the set of 3 Pacific ocean indices and 2 the global set of 4 indices 6 independent pairs . The D of the global set is shown in red in Figure 1.
The maximal area M 2,a , the generalized correlation measure, was computed for the same four indices of 1 . The plot for the calculation is shown blue in Figures 1 a and 1 b . Comparison of the two plots shows that the area measure reveals more minima 30 than the diameter 18 . The various minima are indicated by arrows in Figures 1 a and 1 b , and a list of dates is given in Table 1.

Summary
By using covariance on a set of time-independent random variables or the covariance defined by the Pearson correlation on a set of time-dependent variables, we create metrics Γ and Γ resp. on the unit sphere resp., projective space of the corresponding formal vector spaces. If V is the n-dimensional formal vector space whose basis is the set of random variables {X 1 , . . . , X n }, we use Γ or Γ to create M n or M n,a , two measures of spread on values taken by the X i . In Section 8, we give an explicit example of showing the use of M 2,a on a global set of climate indices.
The two measures of spread differ by at most a fixed multiplicative constant, so for theoretical purposes, they are of equivalent use. However, when applied, they can have different values. The volume of the convex hull created of {X 1 , . . . , X n }, given by M n , is the most precise measure of the correlation of the X i ; however, it is computationally difficult. The maximal volume of all possible n-simplices defined by the X i , given by M n,a , is a rougher measure of correlation. However, M n,a is a simpler computation than M n .
In the 2-dimensional example, where all the vectors lie on the 2-sphere, one can apply M 2,a , M 2 , or M 1,a Diameter. But in general M 1,a is coarser than M 2,a but is significantly easier to compute. For example, in 1 and Section 8, the use of M 2,a yields much finer and cleaner results than the use of M 1,a . More generally in n-dimensions M l and M l,a for any l ≤ n, and one sacrifices accuracy for ease.