{"id":1277,"date":"2021-07-03T11:49:56","date_gmt":"2021-07-03T15:49:56","guid":{"rendered":"https:\/\/openbooks.macewan.ca\/rcommander\/?post_type=chapter&#038;p=1277"},"modified":"2025-06-17T17:36:44","modified_gmt":"2025-06-17T21:36:44","slug":"13-5-correlation-coefficient-r","status":"publish","type":"chapter","link":"https:\/\/openbooks.macewan.ca\/introstats\/chapter\/13-5-correlation-coefficient-r\/","title":{"raw":"13.5 Correlation Coefficient <em>r<\/em>","rendered":"13.5 Correlation Coefficient <em>r<\/em>"},"content":{"raw":"The correlation coefficient [latex]r[\/latex]\u00a0is calculated by\r\n<p style=\"text-align: center;\">[latex]r = \\frac{S_{xy}}{\\sqrt{S_{xx} \\times S_{yy}}}[\/latex]<\/p>\r\nwhere\r\n\r\n[latex]S_{xy} = \\sum x_i y_i - \\frac{\\left( \\sum x_i \\right) \\left( \\sum y_i \\right)}{n}, S_{xx} = \\sum x_i^2 - \\frac{\\left( \\sum x_i \\right)^2}{n}, S_{yy} = \\sum y_i^2 - \\frac{\\left( \\sum y_i \\right)^2}{n}.[\/latex]\r\n\r\nThe correlation coefficient [latex]r[\/latex] measures the association between the response variable [latex]y[\/latex] and the predictor variable [latex]x[\/latex] in the following three aspects:\r\n<ul>\r\n \t<li>Pattern:\u00a0The correlation coefficient\u00a0[latex]r[\/latex]\u00a0measures\u00a0<strong>linear<\/strong> association. Do NOT use the correlation coefficient [latex]r[\/latex]\u00a0to describe non-linear association.<\/li>\r\n \t<li>Strength: The closer [latex]r[\/latex] is to either +1 or -1, the stronger the linear association. When [latex]r = \\pm 1[\/latex], [latex]y[\/latex] and [latex]x[\/latex] have a perfect linear association. That is, all the data points in the scatter plot of [latex]x[\/latex]\u00a0versus [latex]y[\/latex]\u00a0fall in a straight line.<\/li>\r\n \t<li>Direction: Positive or negative. Positive association [latex](r &gt; 0)[\/latex] means that [latex]y[\/latex] and [latex]x[\/latex] change in the same direction. That is [latex]y[\/latex] increases (decreases) if [latex]x[\/latex] increases (decreases). Negative association [latex](r &lt; 0)[\/latex] means that [latex]y[\/latex] and [latex]x[\/latex] change in the opposite direction, that is, [latex]y[\/latex] increases (decreases) if [latex]x[\/latex] decreases (increases).<\/li>\r\n<\/ul>\r\n<div style=\"height: 55px; margin-top: 5px;\"><img class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png\" alt=\"\" width=\"250\" height=\"50\" \/><\/div>\r\n<div><\/div>\r\n<div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Exercise: Correlation Coefficient<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nMatch the following correlation coefficients with the scatter plots.\r\n(1) 0.989 (2) 0.697 (3) -0.887 (4) -0.020<a id=\"retfig13.7\"><\/a>\r\n\r\n[caption id=\"attachment_5553\" align=\"aligncenter\" width=\"1024\"]<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/Figure-13.7-1.png\"><img class=\"wp-image-5553 size-large\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/Figure-13.7-1-1024x288.png\" alt=\"Four scatter plots are shown in a row. Image description available.\" width=\"1024\" height=\"288\" \/><\/a> <strong>Figure 13:7<\/strong>: Match Correlation Coefficients and Scatter Plots. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig13.7\">Image Description (See Appendix D Figure 13.7)<\/a>][\/caption]\r\n<details><summary>Show\/Hide Answer<\/summary><strong>Answers:<\/strong>\r\n<ol type=\"a\">\r\n \t<li>[latex]r=-0.020[\/latex]. There is no linear association between [latex]y[\/latex] and [latex]x[\/latex], [latex]r[\/latex] should be close to 0.<\/li>\r\n \t<li>[latex]r=0.697[\/latex]. When [latex]x[\/latex] increases, [latex]y[\/latex] also increases. There should be a positive linear association between [latex]y[\/latex] and [latex]x[\/latex], i.e., [latex]r &gt; 0[\/latex]. But it is not extremely strong since the points show little semblance of a straight line.<\/li>\r\n \t<li>[latex]r=-0.887[\/latex]. When [latex]x[\/latex] increases, [latex]y[\/latex] decreases. There should be a negative linear association between [latex]y[\/latex] and [latex]x[\/latex], i.e., [latex]r &lt; 0[\/latex]. The association is quite strong since the points are starting to resemble the rough appearance of a straight line.<\/li>\r\n \t<li>[latex]r=0.989[\/latex]. When [latex]x[\/latex] increases, [latex]y[\/latex] also increases. There should be a positive linear association between [latex]y[\/latex] and [latex]x[\/latex], i.e., [latex]r &gt; 0 [\/latex]. The association is extremely strong since the points are basically on a straight line.<\/li>\r\n<\/ol>\r\n<\/details><\/div>\r\n<\/div>\r\n&nbsp;\r\n\r\n<\/div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Exercise: Concepts on Correlation Coefficient<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nExplain whether the following statements are true or false. Correct them if they are false.\r\n<ol>\r\n \t<li>If [latex]r \\approx 0[\/latex], there is no association between [latex]y[\/latex]\u00a0and [latex]x[\/latex].<\/li>\r\n \t<li>The larger the value of [latex]r[\/latex], the stronger the association between [latex]y[\/latex]\u00a0and [latex]x[\/latex].<\/li>\r\n<\/ol>\r\n<details><summary>Show\/Hide Answer<\/summary>\r\n<ol>\r\n \t<li>False. If [latex]r \\approx 0[\/latex], there is no <strong>linear<\/strong> association between[latex]y[\/latex]\u00a0and [latex]x[\/latex].<\/li>\r\n \t<li>False. The larger the <strong>absolute<\/strong> value of [latex]r[\/latex], the stronger the <strong>linear<\/strong> association. Or the closer [latex]r[\/latex]\u00a0is to +1 or -1, the stronger the <strong>linear<\/strong> association.<\/li>\r\n<\/ol>\r\n<\/details><\/div>\r\n<\/div>","rendered":"<p>The correlation coefficient [latex]r[\/latex]\u00a0is calculated by<\/p>\n<p style=\"text-align: center;\">[latex]r = \\frac{S_{xy}}{\\sqrt{S_{xx} \\times S_{yy}}}[\/latex]<\/p>\n<p>where<\/p>\n<p>[latex]S_{xy} = \\sum x_i y_i - \\frac{\\left( \\sum x_i \\right) \\left( \\sum y_i \\right)}{n}, S_{xx} = \\sum x_i^2 - \\frac{\\left( \\sum x_i \\right)^2}{n}, S_{yy} = \\sum y_i^2 - \\frac{\\left( \\sum y_i \\right)^2}{n}.[\/latex]<\/p>\n<p>The correlation coefficient [latex]r[\/latex] measures the association between the response variable [latex]y[\/latex] and the predictor variable [latex]x[\/latex] in the following three aspects:<\/p>\n<ul>\n<li>Pattern:\u00a0The correlation coefficient\u00a0[latex]r[\/latex]\u00a0measures\u00a0<strong>linear<\/strong> association. Do NOT use the correlation coefficient [latex]r[\/latex]\u00a0to describe non-linear association.<\/li>\n<li>Strength: The closer [latex]r[\/latex] is to either +1 or -1, the stronger the linear association. When [latex]r = \\pm 1[\/latex], [latex]y[\/latex] and [latex]x[\/latex] have a perfect linear association. That is, all the data points in the scatter plot of [latex]x[\/latex]\u00a0versus [latex]y[\/latex]\u00a0fall in a straight line.<\/li>\n<li>Direction: Positive or negative. Positive association [latex](r > 0)[\/latex] means that [latex]y[\/latex] and [latex]x[\/latex] change in the same direction. That is [latex]y[\/latex] increases (decreases) if [latex]x[\/latex] increases (decreases). Negative association [latex](r < 0)[\/latex] means that [latex]y[\/latex] and [latex]x[\/latex] change in the opposite direction, that is, [latex]y[\/latex] increases (decreases) if [latex]x[\/latex] decreases (increases).<\/li>\n<\/ul>\n<div style=\"height: 55px; margin-top: 5px;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png\" alt=\"\" width=\"250\" height=\"50\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png 250w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity-65x13.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity-225x45.png 225w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/div>\n<div><\/div>\n<div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Exercise: Correlation Coefficient<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Match the following correlation coefficients with the scatter plots.<br \/>\n(1) 0.989 (2) 0.697 (3) -0.887 (4) -0.020<a id=\"retfig13.7\"><\/a><\/p>\n<figure id=\"attachment_5553\" aria-describedby=\"caption-attachment-5553\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/Figure-13.7-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5553 size-large\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/Figure-13.7-1-1024x288.png\" alt=\"Four scatter plots are shown in a row. Image description available.\" width=\"1024\" height=\"288\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/Figure-13.7-1-1024x288.png 1024w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/Figure-13.7-1-300x85.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/Figure-13.7-1-768x216.png 768w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/Figure-13.7-1-65x18.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/Figure-13.7-1-225x63.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/Figure-13.7-1-350x99.png 350w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/Figure-13.7-1.png 1491w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption id=\"caption-attachment-5553\" class=\"wp-caption-text\"><strong>Figure 13:7<\/strong>: Match Correlation Coefficients and Scatter Plots. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig13.7\">Image Description (See Appendix D Figure 13.7)<\/a>]<\/figcaption><\/figure>\n<details>\n<summary>Show\/Hide Answer<\/summary>\n<p><strong>Answers:<\/strong><\/p>\n<ol type=\"a\">\n<li>[latex]r=-0.020[\/latex]. There is no linear association between [latex]y[\/latex] and [latex]x[\/latex], [latex]r[\/latex] should be close to 0.<\/li>\n<li>[latex]r=0.697[\/latex]. When [latex]x[\/latex] increases, [latex]y[\/latex] also increases. There should be a positive linear association between [latex]y[\/latex] and [latex]x[\/latex], i.e., [latex]r > 0[\/latex]. But it is not extremely strong since the points show little semblance of a straight line.<\/li>\n<li>[latex]r=-0.887[\/latex]. When [latex]x[\/latex] increases, [latex]y[\/latex] decreases. There should be a negative linear association between [latex]y[\/latex] and [latex]x[\/latex], i.e., [latex]r < 0[\/latex]. The association is quite strong since the points are starting to resemble the rough appearance of a straight line.<\/li>\n<li>[latex]r=0.989[\/latex]. When [latex]x[\/latex] increases, [latex]y[\/latex] also increases. There should be a positive linear association between [latex]y[\/latex] and [latex]x[\/latex], i.e., [latex]r > 0[\/latex]. The association is extremely strong since the points are basically on a straight line.<\/li>\n<\/ol>\n<\/details>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Exercise: Concepts on Correlation Coefficient<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Explain whether the following statements are true or false. Correct them if they are false.<\/p>\n<ol>\n<li>If [latex]r \\approx 0[\/latex], there is no association between [latex]y[\/latex]\u00a0and [latex]x[\/latex].<\/li>\n<li>The larger the value of [latex]r[\/latex], the stronger the association between [latex]y[\/latex]\u00a0and [latex]x[\/latex].<\/li>\n<\/ol>\n<details>\n<summary>Show\/Hide Answer<\/summary>\n<ol>\n<li>False. If [latex]r \\approx 0[\/latex], there is no <strong>linear<\/strong> association between[latex]y[\/latex]\u00a0and [latex]x[\/latex].<\/li>\n<li>False. The larger the <strong>absolute<\/strong> value of [latex]r[\/latex], the stronger the <strong>linear<\/strong> association. Or the closer [latex]r[\/latex]\u00a0is to +1 or -1, the stronger the <strong>linear<\/strong> association.<\/li>\n<\/ol>\n<\/details>\n<\/div>\n<\/div>\n","protected":false},"author":19,"menu_order":5,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1277","chapter","type-chapter","status-publish","hentry"],"part":1246,"_links":{"self":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1277","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/users\/19"}],"version-history":[{"count":42,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1277\/revisions"}],"predecessor-version":[{"id":5323,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1277\/revisions\/5323"}],"part":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/parts\/1246"}],"metadata":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1277\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/media?parent=1277"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapter-type?post=1277"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/contributor?post=1277"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/license?post=1277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}