{"id":548,"date":"2015-07-18T18:19:11","date_gmt":"2015-07-18T22:19:11","guid":{"rendered":"http:\/\/sites.berry.edu\/vbissonnette\/?page_id=548"},"modified":"2023-12-29T09:43:59","modified_gmt":"2023-12-29T14:43:59","slug":"correlation","status":"publish","type":"page","link":"https:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/correlation\/","title":{"rendered":"Correlation"},"content":{"rendered":"<h3>Example homework problem:<\/h3>\n<p>You work for an automotive magazine, and you are investigating the relationship between a car&#8217;s gas mileage (in miles-per-gallon) and the amount of horsepower produced by a car&#8217;s engine. You collect the following data:<\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"border-bottom: 1px solid black\">Automobile:<\/td>\n<td style=\"border-bottom: 1px solid black;width: 60px;text-align: center\">1<\/td>\n<td style=\"border-bottom: 1px solid black;width: 60px;text-align: center\">2<\/td>\n<td style=\"border-bottom: 1px solid black;width: 60px;text-align: center\">3<\/td>\n<td style=\"border-bottom: 1px solid black;width: 60px;text-align: center\">4<\/td>\n<td style=\"border-bottom: 1px solid black;width: 60px;text-align: center\">5<\/td>\n<td style=\"border-bottom: 1px solid black;width: 60px;text-align: center\">6<\/td>\n<td style=\"border-bottom: 1px solid black;width: 60px;text-align: center\">7<\/td>\n<td style=\"border-bottom: 1px solid black;width: 60px;text-align: center\">8<\/td>\n<td style=\"border-bottom: 1px solid black;width: 60px;text-align: center\">9<\/td>\n<td style=\"border-bottom: 1px solid black;width: 60px;text-align: center\">10<\/td>\n<\/tr>\n<tr>\n<td class=\"lf\">Horsepower:<\/td>\n<td style=\"text-align: center\">95<\/td>\n<td style=\"text-align: center\">135<\/td>\n<td style=\"text-align: center\">120<\/td>\n<td style=\"text-align: center\">167<\/td>\n<td style=\"text-align: center\">210<\/td>\n<td style=\"text-align: center\">146<\/td>\n<td style=\"text-align: center\">245<\/td>\n<td style=\"text-align: center\">110<\/td>\n<td style=\"text-align: center\">160<\/td>\n<td style=\"text-align: center\">130<\/td>\n<\/tr>\n<tr>\n<td class=\"lf\">MPG:<\/td>\n<td style=\"text-align: center\">37<\/td>\n<td style=\"text-align: center\">19<\/td>\n<td style=\"text-align: center\">26<\/td>\n<td style=\"text-align: center\">20<\/td>\n<td style=\"text-align: center\">24<\/td>\n<td style=\"text-align: center\">30<\/td>\n<td style=\"text-align: center\">15<\/td>\n<td style=\"text-align: center\">32<\/td>\n<td style=\"text-align: center\">23<\/td>\n<td style=\"text-align: center\">33<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Is there a significant correlation between horsepower and MPG (alpha = .05)?<\/p>\n<p>If you would like some help with the hand-written solution to this problem, then <a href=\"http:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/correlation\/correlation-solution\/\">click here<\/a>.<\/p>\n<hr \/>\n<p>Enter these data into the first two columns of <i>Stats Homework&#8217;s <\/i>data manager and rename the variables. Your screen should look like this:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr6.png\" rel=\"attachment wp-att-650\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-650 aligncenter\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr6.png\" alt=\"corr6\" width=\"917\" height=\"693\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr6.png 917w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr6-300x227.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr6-768x580.png 768w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr6-260x196.png 260w\" sizes=\"auto, (max-width: 917px) 100vw, 917px\" \/><\/a><\/p>\n<p>Make sure to double-check and save your data. To conduct your analysis, pull down the <b>Analyze<\/b> menu, choose <strong>Analysis<\/strong> <b>of Relationship<\/b>, and then choose <b>Pearson Correlation<\/b>. You will be presented with a dialog that will prompt you to choose the variables for this<br \/>analysis.<\/p>\n<p>Select Horsepower and MPG.\u00a0 Also, check all the options on the left so that you can see all the output that is available:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr7.png\" rel=\"attachment wp-att-652\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-652 aligncenter\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr7.png\" alt=\"corr7\" width=\"526\" height=\"365\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr7.png 526w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr7-300x208.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr7-260x180.png 260w\" sizes=\"auto, (max-width: 526px) 100vw, 526px\" \/><\/a><\/p>\n<p>When you have selected your variables and options, click the &#8220;Compute&#8221; button.<\/p>\n<p>Basic Output<br \/><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr8.png\" rel=\"attachment wp-att-653\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-653 aligncenter\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr8.png\" alt=\"corr8\" width=\"560\" height=\"225\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr8.png 560w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr8-300x121.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr8-260x104.png 260w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/a><b>Descriptive Statistics<\/b>. Basic descriptive statistics are covered on the page for the <a href=\"http:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/explore-data\/\">explore procedure<\/a>. This table also includes:<\/p>\n<ul>\n<li>Covariance (-243.47): This is the covariance between X and Y (see hand-written work).<\/li>\n<\/ul>\n<p><b>Inferential Statistics<\/b>:<\/p>\n<ul>\n<li>Pearson r: (-0.75): this is your test statistic &#8212; the Pearson Product Moment Correlation Coefficient.<\/li>\n<li>r\u00b2 (.57): this is the Coefficient of Determination. <i>r<\/i>\u00b2 represents the proportion of variance in the two variables that is shared &#8212; i.e., the proportion of variance in Y that can be accounted for by X.<\/li>\n<li>t (-3.25): this is the value of the <i>t<\/i> test statistic that can be used to test the significance of <i>r<\/i>.<\/li>\n<li>n (10): this is the number of observations &#8212; i.e., the number of pairs of scores.<\/li>\n<li>df (8): this is the <i>df<\/i> of <i>r<\/i> and the <i>df<\/i> of the <i>t<\/i> test. <i>df<\/i> is equal to the number of pairs of scores minus 2.<\/li>\n<li>p (2-tail) (.01): this is the chance probability \/ significance level of <i>r<\/i> if you are conducting a two-tailed or non-directional hypothesis test.<\/li>\n<\/ul>\n<h4>Optional Output<\/h4>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-990\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr9.png\" alt=\"corr9\" width=\"457\" height=\"72\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr9.png 457w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr9-300x47.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr9-260x41.png 260w\" sizes=\"auto, (max-width: 457px) 100vw, 457px\" \/><\/a><\/p>\n<p><b>Confidence Intervals<\/b>. You are given the 95% and 99% confidence intervals for the population correlation (rho), based on your sample <i>r<\/i>. The 95%\u00a0confidence interval tells you that, with 95% certainty, you would\u00a0estimate the population correlation to be between -.94 and -.24.<\/p>\n<p><b><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-991\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr10.png\" alt=\"corr10\" width=\"435\" height=\"112\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr10.png 435w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr10-300x77.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr10-260x67.png 260w\" sizes=\"auto, (max-width: 435px) 100vw, 435px\" \/><\/a><\/b><\/p>\n<p><b>Critical Values<\/b>. These are the values from a statistical <a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/r.pdf\">table of critical values<\/a> for <i>r<\/i>.<br \/>In our case, we are conducting a two-tailed test with alpha = .05. So, we would compare the absolute value of our obtained <i>r<\/i> (.75) to .632.<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-992\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr11.png\" alt=\"corr11\" width=\"482\" height=\"158\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr11.png 482w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr11-300x98.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/corr11-260x85.png 260w\" sizes=\"auto, (max-width: 482px) 100vw, 482px\" \/><\/a><\/p>\n<p><b>Supplemental Statistics Used in Hand Calculations<\/b>. These are statistics that can be helpful if you would like to double check your hand-written computations.<\/p>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"694\" height=\"531\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2019\/06\/corr12.png\" alt=\"\" class=\"wp-image-1489\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2019\/06\/corr12.png 694w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2019\/06\/corr12-300x230.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2019\/06\/corr12-260x199.png 260w\" sizes=\"auto, (max-width: 694px) 100vw, 694px\" \/><\/figure>\n\n\n<p><strong>Scatter Plot<\/strong>. \u00a0Finally, <i>Stats Homework<\/i> now produces a graphical scatter plot of your data.\u00a0 Make sure to explore the options you have here &#8212; e.g., you can change the titles and labels, add a regression line, reverse X and Y, and resize the plot to any dimensions that you would like.<\/p>\n<hr \/>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/correlation\/correlation-solution\/\">See the Hand-Written Work<\/a><\/p>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/\">Return to Table of Contents<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Example homework problem: You work for an automotive magazine, and you are investigating the relationship between a car&#8217;s gas mileage (in miles-per-gallon) and the amount of horsepower produced by a [&hellip;]<\/p>\n","protected":false},"author":34,"featured_media":0,"parent":282,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"class_list":["post-548","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/comments?post=548"}],"version-history":[{"count":17,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/548\/revisions"}],"predecessor-version":[{"id":2242,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/548\/revisions\/2242"}],"up":[{"embeddable":true,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/282"}],"wp:attachment":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/media?parent=548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}