In an increasingly data-driven world, it is more important than ever for students as well as professionals to better understand basic statistical concepts. 100 Questions (and Answers) About Statistics addresses the essential questions that students ask about statistics in a concise and accessible way. It is perfect for instructors, students, and practitioners as a supplement to more comprehensive materials, or as a desk reference with quick answers to the most frequently asked questions.

# How Do I Compute a Correlation Coefficient?

### How Do I Compute a Correlation Coefficient?

A correlation coefficient is computed by inserting the proper values into a simple question.

The formula is as follows:

${r}_{xy}=\frac{n\sum XY-\sum X\sum Y}{\sqrt{\left[n\sum {X}^{2}-{\left(\sum X\right)}^{2}\right]\left[n\sum {Y}^{2}-{\left(\sum Y\right)}^{2}\right]},}$

where

• rxy is the correlation coefficient between X and Y;
• n is the size of the sample;
• X is the individual’s score on the X variable;
• Y is the individual’s score on the Y variable;
• XY is the product of each X score times its corresponding Y score;
• X2 is the individual’s X score, squared; and
• Y2 is the individual’s Y score, squared.

For example, let’s compute the correlation coefficient, represented as a lowercase rxy for the the variables X and Y, using the following data:

X

Y

X2

Y2

XY

1

3

1

9

3

4

7

16

49

28

5

8

25

64

40

3

9

9

81

27

5

6

25

36

30

6

9

36

81

54

7

8

49

64

56

5

8

25

64

40

6

9

36

81

54

4

7

16

49

28

Sum

46

74

238

578

360

With the values substituted, the equation looks like this:

${r}_{xy}=\frac{10\left(360\right)-\left(46\right)\left(74\right)}{\sqrt{\left[10\left(238\right)-{\left(46\right)}^{2}\right]\left[10\left(578\right)-{\left(74\right)}^{2}\right]}}=.69$

And the result is that rxy equals .69, a positive or direct correlation.

More questions? See ...

• • • 