The CORR Procedure

Pearson Product-Moment Correlation

The Pearson product-moment correlation is a parametric measure of association for two variables. It measures both the strength and the direction of a linear relationship. If one variable X is an exact linear function of another variable Y, a positive relationship exists if the correlation is 1 and a negative relationship exists if the correlation is –1. If there is no linear predictability between the two variables, the correlation is 0. If the two variables are normal with a correlation 0, the two variables are independent. However, correlation does not imply causality because, in some cases, an underlying causal relationship might not exist.

The scatter plot matrix in Figure 4 displays the relationship between two numeric random variables in various situations.

Figure 4: Correlations between Two Variables

Correlations between Two Variables


The scatter plot matrix shows a positive correlation between variables Y1 and X1, a negative correlation between Y1 and X2, and no clear correlation between Y2 and X1. The plot also shows no clear linear correlation between Y2 and X2, even though Y2 is dependent on X2.

The formula for the population Pearson product-moment correlation, denoted rho Subscript x y, is

rho Subscript x y Baseline equals StartFraction normal upper C normal o normal v left parenthesis x comma y right parenthesis Over StartRoot normal upper V left parenthesis x right parenthesis normal upper V left parenthesis y right parenthesis EndRoot EndFraction equals StartFraction normal upper E left parenthesis left parenthesis x minus normal upper E left parenthesis x right parenthesis right parenthesis left parenthesis y minus normal upper E left parenthesis y right parenthesis right parenthesis right parenthesis Over StartRoot normal upper E left parenthesis x minus normal upper E left parenthesis x right parenthesis right parenthesis squared normal upper E left parenthesis y minus normal upper E left parenthesis y right parenthesis right parenthesis squared EndRoot EndFraction

The sample correlation, such as a Pearson product-moment correlation or weighted product-moment correlation, estimates the population correlation. The formula for the sample Pearson product-moment correlation is

r Subscript x y Baseline equals StartFraction sigma summation Underscript i Endscripts left parenthesis left parenthesis x Subscript i Baseline minus x overbar right parenthesis left parenthesis y Subscript i Baseline minus y overbar right parenthesis right parenthesis Over StartRoot sigma summation Underscript i Endscripts left parenthesis x Subscript i Baseline minus x overbar right parenthesis squared sigma summation Underscript i Endscripts left parenthesis y Subscript i Baseline minus y overbar right parenthesis squared EndRoot EndFraction

where x overbar is the sample mean of x and y overbar is the sample mean of y. The formula for a weighted Pearson product-moment correlation is

r Subscript x y Baseline equals StartFraction sigma summation Underscript i Endscripts w Subscript i Baseline left parenthesis x Subscript i Baseline minus x overbar Subscript w Baseline right parenthesis left parenthesis y Subscript i Baseline minus y overbar Subscript w Baseline right parenthesis Over StartRoot sigma summation Underscript i Endscripts w Subscript i Baseline left parenthesis x Subscript i Baseline minus x overbar Subscript w Baseline right parenthesis squared sigma summation Underscript i Endscripts w Subscript i Baseline left parenthesis y Subscript i Baseline minus y overbar Subscript w Baseline right parenthesis squared EndRoot EndFraction

where w Subscript i is the weight, x overbar Subscript w is the weighted mean of x, and y overbar Subscript w is the weighted mean of y.

Probability Values

Probability values for the Pearson correlation are computed by treating

t equals left parenthesis n minus 2 right parenthesis Superscript 1 divided by 2 Baseline left parenthesis StartFraction r squared Over 1 minus r squared EndFraction right parenthesis Superscript 1 divided by 2

as coming from a t distribution with left parenthesis n minus 2 right parenthesis degrees of freedom, where r is the sample correlation.

Last updated: April 16, 2025