How To Calculate Linearity

Being able to calculate linearity (or correlation, as it's often referred to) is a very valuable skill. Linearity is a quantitative assessment of how strongly related a set of data is. Linearity ranges from 0 (not related at all) to 1 (completely related) and gives a useful numerical gauge to be used alongside a numerical plot. For our calculations, the following sample (x, y) pairs will be used: x: 2.4, 3.4, 4.6, 3.7, 2.2, 3.3, 4.0, 2.1
y: 1.33, 2.12, 1.80, 1.65, 2.00, 1.76, 2.11, 1.63

Calculating Sx

Step 1

Add together all of your x-values and you get sum(x) = 25.7.

Step 2

Calculate x^2 by squaring all of your individual x-values. This is done by multiplying each x-value by itself. Your x^2 values will be 5.76, 11.56, 21.16, 13.69, 4.84, 10.89, 16.00, 4.41.

Step 3

Add together all of your x^2 values and you get sum(x^2) = 88.31.

Step 4

Multiply sum(x) by itself to obtain sum(x)^2, which is equal to 660.49.

Step 5

Divide sum(x)^2 by 8 (the total number of data pairs in our sample data). You will get an answer of 82.56.

Step 6

Subtract 82.56 (answer from step 5) from sum(x^2) (answer from step 4). You will get an answer of 5.75, which we refer to as Sx.

Calculating Sy

Step 1

Add together all of your y-values and you get sum(y) = 14.40.

Step 2

Calculate y^2 by squaring all of your individual y-values. This is done by multiplying each y-value by itself. Your y^2 values will be 1.7689, 4.4944, 3.2400, 2.7225, 4.0000, 3.0976, 4.4521, 2.6569.

Step 3

Add together all of your y^2 values and you get sum(y^2) = 26.4324.

Step 4

Multiply sum(y) by itself to obtain sum(y)^2, which is equal to 207.36.

Step 5

Divide sum(y)^2 by 8 (the total number of data pairs in our sample data) and subtract that answer from sum(y^2). You will get an answer of 0.5124, which we refer to as Sy.

Calculating Sxy

Step 1

Calculate xy by multiplying each x-value with its corresponding y-value. Your xy values will be 3.192, 7.208, 8.280, 6.105, 4.400, 5.808, 8.440, 3.423.

Step 2

Add together all of your xy values and you get sum(xy) = 46.856.

Step 3

Multiply sum(x) by sum(y) and you will get an answer of 370.08.

Step 4

Divide 370.08 by 8 (the total number of data pairs in our sample data). You will get an answer of 46.26.

Step 5

Subtract 46.26 from sum(x*y) (from step 2) and you will get an answer of 0.5960, which we refer to as Sxy.

Putting It Together

Step 1

Take the square root of Sx and the answer will be 2.398.

Step 2

Take the square root of Sy and the answer will be 0.716.

Step 3

Multiply your answers from steps 1 and 2 and you will get an answer of 1.717.

Step 4

Divide Sxy by 1.717 (from step 3) to calculate your final linearity of 0.347. A linearity this low suggests the data is loosely related and only slightly linear.

Things Needed

  • Data
  • Calculator

TL;DR (Too Long; Didn't Read)

Write down your answers as you find them for easy access later.

References

  • "Applied Statistics for Engineers and Scientists"; Jay Devore, PhD, Nicholas Farnum, PhD; 2005

Cite This Article

MLA

McGrath, Colin. "How To Calculate Linearity" sciencing.com, https://www.sciencing.com/calculate-linearity-7560898/. 24 April 2017.

APA

McGrath, Colin. (2017, April 24). How To Calculate Linearity. sciencing.com. Retrieved from https://www.sciencing.com/calculate-linearity-7560898/

Chicago

McGrath, Colin. How To Calculate Linearity last modified March 24, 2022. https://www.sciencing.com/calculate-linearity-7560898/

Recommended