Вы находитесь на странице: 1из 3

Linear Correlation Coefficient

The Linear Correlation Coefficient is a number between


-1 and 1 to show the strength and direction of the linear
relation between two quantitative variables.1 Finding the
Correlation can be helpful because it shows how two
separate things in the real world are related to each
X
Y
other. The correlation coefficient is often used in science
Variab Variab
Figure 1 Image from:
to see how variables such as time and change of
http://prometheuswiki.publish.csiro.au/
le
le
temperature are related to each other. To find the Linear
tiki-index.php?page=r+and+R2
5
2
Correlation Coefficient for two variables in a set of data
8
9
you would have to
run it through the equation you see to the
right in
Figure 1.
9
13
13

Average

47
89
While at first the equation can look scary its rather easy if you take it
82
apart and do it step by step. The first step to solve this equation is to
calculate the average of your two sets of variables. To calculate the average, you should
follow these steps.

The first thing you do is add up all the x variables. In the table to the right you would
add up 5, 8, 9, 13, and 47 shown in Yellow. The sum of these numbers comes out to
be 82 shown on the right in light blue.
After you add up the numbers and have your sum you divide that sum by the
quantity of your sample. Since the X Variable contains 5 numbers in its sample (5, 8,
9, 13, and 47) you would divide the sum of 82 by 5 coming out to be 16.4
Your Average for variable x is 16.4
Repeat all the steps above except for the Y Variable. You should come up with a sum
of 118 and an average of 23.6
Figure 2

Standard

Deviation

The second part of the equation you should find is the Standard Deviation for both the X and
Y variable. The Standard Deviation of a variable is what it sounds like, it is how much the
variables in the set of data tend to deviate away from the average of that same set of data.
To find the Standard Deviation you must follow the equation found in Figure 3.

The first thing that you want to do is find the Average for your set of points. We will
use the Average of 16.4 we calculated before for the X variable
above.
Now that we have our Average take every data point in
the X Variable (Highlighted in Yellow in Figure 2) and minus the
average from it. (Keep these numbers because they will be
useful later!)
o
5 - 16.4 = -11.4
Figure 3 Picture From:
o
8 - 16.4 = -8.4
http://www.statisticshowto.c
o
9 16.4 = -7.4
om/what-is-standarddeviation/

1 Sullivan, Michael III. Statistics Informed Decisions Using Data. 3 rd Edition. New
Jersey: Pearson Education, Inc. Pearson Prentice Hall. 2010

o 13 16.4 = -3.4
o 47 16.4 = 30.6
After you found the difference between each data point and the Average, square
them.
o -11.4^2 = 129.96
o -8.4^2 = 70.56
o -7.4^2 = 54.76
o -3.4^2 = 11.56
o 30.6^2 = 936.36
Now that youve squared all the differences, add all your products into one large
number
o 129.96+70.56+54.76+11.56+936.36=1203.2
Divide this number by the amount of data points you had, in this case we already
know that we have 5 so we divide our answer by 5.
o 1203.2/5=240.64
Now that weve completed everything inside the equation all thats left to do is
square root our answer.
o Sqrt (240.64) =15.51
The Standard Deviation for X is 15.51
Repeat all the steps except with Y to find the Standard Deviation for Y, you should get
32.79 as your Standard Deviation

Putting them together


Now that weve found the Average and the Standard Deviation for both the X and Y Variables
we must put them into the equation to find the Correlation Coefficient. The Easiest way to do
this is to use a table such as Figure 4.
X
Variable
5

Y
Variable
2

13

13

47

89

(X-X
average/Sx)
-.7350096711
8
-.5415860735
01
-.4771115409
41
-.2192134107
03
1.9729206963
3

(Y-Y
Average/Sy)
-.65873741994
5
-.44525770051
8
-.32326928941
8
-.56724611161
9
1.9945105215

(X-X average/Sx) (Y-Y


Average/Sy)
.484178374428
.24114536972
.154235508813
.124347954836
3.93501108692
4.93891829472

Figure 4

Make sure you have your averages and standard deviation written down for easy
access. Ours are the following:
o X Average: 16.4 Y Average: 23.6 Sx: 15.51 Sy: 32.79
Another good idea is to keep your (X-X Average) and (Y-Y Average) written down from
when you did it when you were calculating the Standard Deviation so you dont have
to do it again in this step.

If you kept those numbers all you have to do is plug them in and then divide each
one by Sx for the (X-X Average) and Sy for (Y-Y Average). Make sure you plug them
into the 3rd and 4th column in your table.
After finding those values times the 3rd and 4th column and input the product into the
5th column
Finally add up everything in the 5th row.
o .
484178374428+.24114536972+.154235508813+.124347954836+3.9350110
8692= 4.93891829472
After getting the sum of all of that you then divide by the number of data points in
your sample which we already know is 5
o 4.93891829472/5 = .987783658944
Round your Correlation Coefficient to three decimal places to get .988, your answer is
.988

Вам также может понравиться