{"id":497,"date":"2020-03-03T10:58:52","date_gmt":"2020-03-03T09:58:52","guid":{"rendered":"https:\/\/www.statsimprove.com\/en\/?p=497"},"modified":"2020-03-03T10:58:52","modified_gmt":"2020-03-03T09:58:52","slug":"linear-regression-should-dependent-and-independent-variables-be-distributed-normally","status":"publish","type":"post","link":"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/","title":{"rendered":"Linear regression: should dependent and independent variables be distributed normally?"},"content":{"rendered":"<h3>When fitting a linear regression model is it necessary to have normally distributed variables?<\/h3>\n<p>Let\u2019s see.<\/p>\n<p>One of the most common questions asked by a researcher who wants to analyse their data through a linear regression model is: <strong>must variables, both dependent and predictors, be distributed normally to have a correct model? So if they are not, should I normalize them through a transformation, for example the logarithmic one?<\/strong><\/p>\n<p>The answer is <strong>no<\/strong>: the estimation method used in linear regression, ordinary least squares (OLS) method, doesn\u2019t not require the normality assumption.<\/p>\n<p>So, if you see that a variable is not distributed normally, don&#8217;t be upset and go ahead: it is absolutely useless trying to normalize everything.<\/p>\n<p><strong>The only test of normality that you will need to perform, after fitting your regression model, is that of the residuals<\/strong> (i.e. the difference between estimated by the regression and the observed values of the dataset).<\/p>\n<p>How can you do it? Let your statistical program <strong>calculate the residuals and show their distribution<\/strong> (as if they were some variable).<\/p>\n<p>Alternatively, you can <strong>build an ad hoc plot to test normality<\/strong> (for example a qq-plot).<\/p>\n<p>If, on the other hand, you really want to use a more objective decision criterion,<strong> that is not based on the plot interpretation, then you can do a normality test (for example Shapiro-Wilk Test).<\/strong><\/p>\n<p>Many statistical programs do almost all of this by default (for example SAS, via the PROC REG command).<\/p>\n<p>However, there are at least a couple of reasons why you should take a look at the distribution of your &#8220;Y&#8221; and of all your &#8220;X&#8221;:<\/p>\n<ul>\n<li>the presence of highly skewed variables can, more likely, influence the distribution of residuals making them, in turn, non-normal;<\/li>\n<li>the presence of variables with very large tails of outliers could require a complex analysis of leverage (i.e. how much these outliers impact on the estimate of the regression coefficients).<\/li>\n<\/ul>\n<p>Thus, for very skewed variables it might be a good idea to transform the data to eliminate the harmful effects.<\/p>\n<blockquote><p>In summary: it is a good habit to check graphically the distributions of all variables, both dependent and independent.<\/p>\n<p>If some of them are slightly skewed, keep them as they are.<\/p>\n<p>On the other hand, highly skewed variables should be normalized before fitting the model.<\/p>\n<p>After fitting the model, it is necessary to make sure that the residuals are distributed normally, to ascertain its technical correctness.<\/p><\/blockquote>\n<p>I assume that you will check all other assumptions of linear regression then: linearity, homoscedasticity, absence of autocorrelation and multicollinearity.<\/p>\n<p>Before concluding, one more thing to note: checking the normality of the residuals is necessary not only for estimating the regression coefficients, but also for calculating confidence intervals and p-values \u200b\u200bthat you will get in your output (which interests you in most cases).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When fitting a linear regression model is it necessary to have normally distributed variables? Let\u2019s see. One of the most common questions asked by a researcher who wants to analyse their data through a linear regression model is: must variables, both dependent and predictors, be distributed normally to have a correct model? So if they&hellip;&nbsp;<a href=\"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Linear regression: should dependent and independent variables be distributed normally?<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","_themeisle_gutenberg_block_has_review":false,"_ti_tpc_template_sync":false,"_ti_tpc_template_id":""},"categories":[2,6],"tags":[],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linear regression: should dependent and independent variables be distributed normally? - StatsImprove<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linear regression: should dependent and independent variables be distributed normally? - StatsImprove\" \/>\n<meta property=\"og:description\" content=\"When fitting a linear regression model is it necessary to have normally distributed variables? Let\u2019s see. One of the most common questions asked by a researcher who wants to analyse their data through a linear regression model is: must variables, both dependent and predictors, be distributed normally to have a correct model? So if they&hellip;&nbsp;Read More &raquo;Linear regression: should dependent and independent variables be distributed normally?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/\" \/>\n<meta property=\"og:site_name\" content=\"StatsImprove\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-03T09:58:52+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"gianfranco\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.statsimprove.com\/en\/#website\",\"url\":\"https:\/\/www.statsimprove.com\/en\/\",\"name\":\"StatsImprove\",\"description\":\"Low Cost and Highly Professional Statistical Consultancy\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.statsimprove.com\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/#webpage\",\"url\":\"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/\",\"name\":\"Linear regression: should dependent and independent variables be distributed normally? - StatsImprove\",\"isPartOf\":{\"@id\":\"https:\/\/www.statsimprove.com\/en\/#website\"},\"datePublished\":\"2020-03-03T09:58:52+00:00\",\"dateModified\":\"2020-03-03T09:58:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.statsimprove.com\/en\/#\/schema\/person\/914fc4bf93820662fc24f6ed5fe66da6\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.statsimprove.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linear regression: should dependent and independent variables be distributed normally?\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.statsimprove.com\/en\/#\/schema\/person\/914fc4bf93820662fc24f6ed5fe66da6\",\"name\":\"gianfranco\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.statsimprove.com\/en\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5e17e118aa99660d02d82ded19b4f3b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5e17e118aa99660d02d82ded19b4f3b5?s=96&d=mm&r=g\",\"caption\":\"gianfranco\"},\"description\":\"Specialista in Statistica Medica\",\"url\":\"https:\/\/www.statsimprove.com\/en\/author\/gianfranco\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linear regression: should dependent and independent variables be distributed normally? - StatsImprove","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/","og_locale":"en_US","og_type":"article","og_title":"Linear regression: should dependent and independent variables be distributed normally? - StatsImprove","og_description":"When fitting a linear regression model is it necessary to have normally distributed variables? Let\u2019s see. One of the most common questions asked by a researcher who wants to analyse their data through a linear regression model is: must variables, both dependent and predictors, be distributed normally to have a correct model? So if they&hellip;&nbsp;Read More &raquo;Linear regression: should dependent and independent variables be distributed normally?","og_url":"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/","og_site_name":"StatsImprove","article_published_time":"2020-03-03T09:58:52+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"gianfranco","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.statsimprove.com\/en\/#website","url":"https:\/\/www.statsimprove.com\/en\/","name":"StatsImprove","description":"Low Cost and Highly Professional Statistical Consultancy","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.statsimprove.com\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/#webpage","url":"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/","name":"Linear regression: should dependent and independent variables be distributed normally? - StatsImprove","isPartOf":{"@id":"https:\/\/www.statsimprove.com\/en\/#website"},"datePublished":"2020-03-03T09:58:52+00:00","dateModified":"2020-03-03T09:58:52+00:00","author":{"@id":"https:\/\/www.statsimprove.com\/en\/#\/schema\/person\/914fc4bf93820662fc24f6ed5fe66da6"},"breadcrumb":{"@id":"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.statsimprove.com\/en\/linear-regression-should-dependent-and-independent-variables-be-distributed-normally\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.statsimprove.com\/en\/"},{"@type":"ListItem","position":2,"name":"Linear regression: should dependent and independent variables be distributed normally?"}]},{"@type":"Person","@id":"https:\/\/www.statsimprove.com\/en\/#\/schema\/person\/914fc4bf93820662fc24f6ed5fe66da6","name":"gianfranco","image":{"@type":"ImageObject","@id":"https:\/\/www.statsimprove.com\/en\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/5e17e118aa99660d02d82ded19b4f3b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5e17e118aa99660d02d82ded19b4f3b5?s=96&d=mm&r=g","caption":"gianfranco"},"description":"Specialista in Statistica Medica","url":"https:\/\/www.statsimprove.com\/en\/author\/gianfranco\/"}]}},"_links":{"self":[{"href":"https:\/\/www.statsimprove.com\/en\/wp-json\/wp\/v2\/posts\/497"}],"collection":[{"href":"https:\/\/www.statsimprove.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.statsimprove.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.statsimprove.com\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.statsimprove.com\/en\/wp-json\/wp\/v2\/comments?post=497"}],"version-history":[{"count":1,"href":"https:\/\/www.statsimprove.com\/en\/wp-json\/wp\/v2\/posts\/497\/revisions"}],"predecessor-version":[{"id":499,"href":"https:\/\/www.statsimprove.com\/en\/wp-json\/wp\/v2\/posts\/497\/revisions\/499"}],"wp:attachment":[{"href":"https:\/\/www.statsimprove.com\/en\/wp-json\/wp\/v2\/media?parent=497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.statsimprove.com\/en\/wp-json\/wp\/v2\/categories?post=497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.statsimprove.com\/en\/wp-json\/wp\/v2\/tags?post=497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}