The Pearson product moment ( r ) is the standard statistical measurement to represent the degree of correlation between two variables It is named for its English inventor, Karl Pearson, who was born in 1857.
If the two variables are co linear, or lie on a straight line when plotted, they are said to have an r of 1. Conversely, if they are inversely related, they have an r of -1. If two variables are statistically uncorrelated, or no relation is apparent, we expect the value of r will be near 0.
The term product moment is a term borrowed from math and physics. In order to help visualize r, we will step through a simple example from physics. One of the simplest concepts in physics is the amount of angular force, or torque, which is generated when a force is applied to an arm in a perpendicular direction to the length of the arm. The simplest example, of course is a torque wrench. As an example, lets consider a wrench of length 1 which is in a horizontal position and a vertical force of 5 pounds is applied at a distance of 1 from the nut. The resulting torque is the product of the arm length and the force, and is in this case, 5 foot-pounds. If for example, the arm length were two and we applied the same force, the resultant torque would be 10 foot-pounds.
Now suppose instead of a wrench and bolt, we are talking about the steering wheel of a car. If we have one hand each on opposite sides of the wheel and we give a positive ( clockwise ) force with both hands of 3 pounds each, the resultant torque will be (2) X 0.5 X 3 = 3 foot-pounds total torque. When we have a summation of torques, as in this example, we call it a “moment” in math and physics terminology.
Notice that in the steering wheel example, the forces are applied in opposite directions in rectangular coordinates. In our example, we would actually choose a negative arm length for one side of the wheel, and apply a negative force to achieve a 2X resultant moment. We also notice that in this example, if we apply force in the same direction on both side of the axis, or 0 point, the torques cancel each other out and the resulting moment is 0 . Note, if we provide opposite forces on both sides of the wheel, the forces “cancel” each other out and sum to zero.
Now we are going to generalize this example. Instead of arm length and force we are going to choose any two variables x and y. We will assume that they can be plotted in a plane in a rectilinear coordinate system. If we want to calculate the moment for x and y we first must find a mean value for each variable, and then subtract the mean from each variable. This has the affect of distributing the transformed points around 0, much like we distribute our hands around the center of the steering wheel, which is considered the zero point in our previous example.
When once each value has been transformed, we calculate the moment, or sum of products of the transformed value. This appears as the numerator in the definition of the Pearson Product Moment.
Thus we have one more step. We don’t want an arbitrary number as a representative of our correlation, but a value scaled between 1 and -1. We must choose a number that will “normalize” our numerator. We know from our physics ( steering wheel) example that a moment reaches its maximum value when the variables are collinear, or lie on a single line when plotted. Knowing this we can substitute a constant times x ( y = cx ) in to our expression for the moment. This will give us a theoretical maximum value. When we do, we get a constant times the sum of differences from the mean squared.
In fact this looks very much like our other statistics “friend” the standard deviation. In fact using the sigma value or standard deviation of each variable in the denominator will scale our correlation between 1 and -1 as we wish.
In conclusion, we say that to measure the correlation between two variables, we first “transform” them do distribute them around 0 by subtracting the mean of each variable from each of the values. The transformed values are then used to calculate a product moment or sum of products. We then normalize the moment to a value of magnitude less than or equal to 1 using the standard deviation of each variable in the denominator.
Further reading
A public domain statistics book is available online which contains a nice Java based animation of a set of bivariate data and a Pearson Product Moment ( r ) calculation