{"id":18885,"date":"2016-11-25T17:52:46","date_gmt":"2016-11-25T17:52:46","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=18885"},"modified":"2016-11-25T17:58:23","modified_gmt":"2016-11-25T17:58:23","slug":"spreadsheets-linear-regression-in-four-easy-steps-on-excel-or-libreoffice-calc","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/spreadsheets-linear-regression-in-four-easy-steps-on-excel-or-libreoffice-calc\/","title":{"rendered":"Spreadsheets:  linear regression in four easy steps on Excel or LibreOffice Calc"},"content":{"rendered":"<h1>The tutor shows how to get a best-fit line using Excel or LibreOffice Calc.<\/h1>\n<p>Let&#8217;s imagine you want a best fit line of form y=mx + b for the following data:<\/p>\n<table style=\"width:auto;margin:auto\">\n<tr>\n<td>x<\/td>\n<td>y<\/td>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>5<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>10<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>12<\/td>\n<\/tr>\n<\/table>\n<p style=\"white-space:pre-wrap\"><\/p>\n<p>With Excel or LibreOfficeCalc, you do exactly the same steps:<\/p>\n<ol>\n<li>Enter the data in two columns.  Let&#8217;s imagine the x data is in a1:a4, the y, b1:b4.<\/li>\n<li>In a different cell, key in <span style=\"color:#992299\">=slope(b1:b4,a1:a4)<\/span>.  Note that the y range is entered first.  The answer that appears is the slope of the line, or m.  Hopefully, in this case, you get 1.15.<\/li>\n<li>In another cell, key in <span style=\"color:#992299\">=intercept(b1:b4,a1:a4)<\/span>.  The answer returned is the y intercept, or b; in this case, it&#8217;s hopefully 2.9.<\/li>\n<li>For this data, the best-fit line is y=1.15x + 2.9<\/li>\n<\/ol>\n<p>HTH:)<\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The tutor shows how to get a best-fit line using Excel or LibreOffice Calc. Let&#8217;s imagine you want a best fit line of form y=mx + b for the following data: x y 0 3 2 5 6 10 8 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/spreadsheets-linear-regression-in-four-easy-steps-on-excel-or-libreoffice-calc\/\"> <span class=\"screen-reader-text\">Spreadsheets:  linear regression in four easy steps on Excel or LibreOffice Calc<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[371,1583,1951,1065,19],"tags":[2049,2050,2048],"class_list":["post-18885","post","type-post","status-publish","format-standard","hentry","category-business","category-excel","category-libreoffice-calc","category-spreadsheets","category-statistics","tag-data-fitting","tag-easy-best-fit-line","tag-least-squares-line"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=18885"}],"version-history":[{"count":16,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18885\/revisions"}],"predecessor-version":[{"id":18901,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18885\/revisions\/18901"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=18885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=18885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=18885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}