{"id":616,"date":"2015-07-20T13:29:32","date_gmt":"2015-07-20T17:29:32","guid":{"rendered":"http:\/\/sites.berry.edu\/vbissonnette\/?page_id=616"},"modified":"2016-06-24T08:16:08","modified_gmt":"2016-06-24T12:16:08","slug":"spearman-correlation","status":"publish","type":"page","link":"https:\/\/sites.berry.edu\/vbissonnette\/spearman-correlation\/","title":{"rendered":"Spearman 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>Note that these are the same data that we worked with when you were working with the <a href=\"http:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/correlation\/\">Pearson correlation procedure<\/a>. This will allow you to compare and contrast the results of the two procedures.<\/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\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-650\" 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 <b>Non-Parametric Tests<\/b>, and then choose <b>Spearman Correlation<\/b>. You will be presented with this dialog:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1044\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman1.png\" alt=\"spearman1\" width=\"491\" height=\"365\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman1.png 491w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman1-300x223.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman1-260x193.png 260w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/a><\/p>\n<p>Select horsepower and gas mileage as your variables. Check the option to output our difference scores to your data, and click\u00a0<strong>Compute<\/strong>.<\/p>\n<p>Before we look at the output produced by this procedure, let&#8217;s take a look at the variables that have been created by it and written back into your data:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1045\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman2.png\" alt=\"spearman2\" width=\"614\" height=\"463\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman2.png 614w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman2-300x226.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman2-260x196.png 260w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/a><\/p>\n<p>Note that the Spearman procedure has ranked each of your variables and has put these ranks into two new variables, Rank_X and Rank_Y. Also, it has computed the difference between each pair of ranks (Diff), and the squares of these differences (Diff\u00b2).<\/p>\n<p>We use the sum of the squared differences (\u03a3D\u00b2) to compute the Spearman correlation. Now, the output will be easy to figure out:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1046\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman3.png\" alt=\"spearman3\" width=\"554\" height=\"274\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman3.png 554w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman3-300x148.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/spearman3-260x129.png 260w\" sizes=\"auto, (max-width: 554px) 100vw, 554px\" \/><\/a><\/p>\n<p><b>Rank Statistics<\/b>.<\/p>\n<ul>\n<li>n (10): this is the number of pairs of scores.<\/li>\n<li>\u03a3D\u00b2 (292.00): this is the sum of the squared differences between the ranks of the scores.<\/li>\n<li>Tied Ranks? (No): this tells you whether or not the procedure found any ties in the ranks of the scores. This is an important consideration when computing the Spearman Correlation.<\/li>\n<li>Spearman&#8217;s rho (-.77): this is the value of the Spearman correlation.<\/li>\n<li>exact p (2-tail) (.011): this is the exact significance level of the Spearman correlation when you are conducting a two-tailed \/ non-directional test.<\/li>\n<li>exact p (1-tail) (.005): this is the exact significance level of the Spearman correlation when you are conducting a one-tailed \/ directional test.<\/li>\n<\/ul>\n<p><b>Pearson Correlation of the ranks<\/b>.<\/p>\n<ul>\n<li>r (-0.77): this is the Pearson correlation between the ranks of your scores.<\/li>\n<li>r\u00b2 (.59): r\u00b2 describes the effect size in terms of the proportion of variance accounted for in the ranks.<\/li>\n<li>t (-3.41): 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>df (8): this is 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) (.009): this is the significance level of <i>t<\/i> if you are conducting a two-tailed or non-directional hypothesis test.<\/li>\n<li>p (1-tail) (.005): this is the significance level of <i>t<\/i> if you are conducting a one-tailed or directional hypothesis test.<\/li>\n<\/ul>\n<hr \/>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/\">\u00a0Return to Table of Contents<\/a><\/p>\n","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":0,"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-616","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/616","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=616"}],"version-history":[{"count":5,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/616\/revisions"}],"predecessor-version":[{"id":1048,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/616\/revisions\/1048"}],"wp:attachment":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/media?parent=616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}