{"id":6012,"date":"2021-12-22T13:39:48","date_gmt":"2021-12-22T12:39:48","guid":{"rendered":"https:\/\/joapen.com\/blog\/?p=6012"},"modified":"2021-12-22T13:39:52","modified_gmt":"2021-12-22T12:39:52","slug":"box-cox-transformation","status":"publish","type":"post","link":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/","title":{"rendered":"Box-cox transformation"},"content":{"rendered":"\n<p>These are reminder notes about Box-cox transformation.<\/p>\n\n\n\n<p>One of the problems that box-cox transformation tries to solve is \u201cheteroscedasticity\u201d (non-constant variance). This article explains the problem where you can apply box-cox transformation to solve it:<\/p>\n\n\n\n<p><a href=\"https:\/\/blog.minitab.com\/en\/applying-statistics-in-quality-projects\/how-could-you-benefit-from-a-box-cox-transformation\">https:\/\/blog.minitab.com\/en\/applying-statistics-in-quality-projects\/how-could-you-benefit-from-a-box-cox-transformation<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.minitab.com\/hubfs\/Imported_Blog_Media\/race.jpg\" alt=\"\"\/><figcaption>Variations are not constant<\/figcaption><\/figure>\n\n\n\n<p>SciPy has added an inverse Box-Cox transformation: <a href=\"https:\/\/docs.scipy.org\/doc\/scipy\/reference\/generated\/scipy.special.inv_boxcox.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/docs.scipy.org\/doc\/scipy\/reference\/generated\/scipy.special.inv_boxcox.html<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from scipy.special import boxcox, inv_boxcox\r\ny = boxcox(&#91;1, 4, 10], 2.5)\r\ninv_boxcox(y, 2.5)\r\narray(&#91;1., 4., 10.])<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Does Box-cox always work?<\/h2>\n\n\n\n<p>The answer is NO. Box-cox does not guarantee normality because it never checks for the normality which is necessary to be foolproof that it has correctly transformed the non-normal distribution or not. It only checks for the smallest Standard deviation.<\/p>\n\n\n\n<p>Therefore, it is absolutely necessary to always check the transformed data for normality using a probability plot.<\/p>\n\n\n\n<p>Source: <a href=\"https:\/\/www.geeksforgeeks.org\/box-cox-transformation-using-python\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.geeksforgeeks.org\/box-cox-transformation-using-python\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>These are reminder notes about Box-cox transformation. One of the problems that box-cox transformation tries to solve is \u201cheteroscedasticity\u201d (non-constant variance). This article explains the problem where you can apply box-cox transformation to solve it: https:\/\/blog.minitab.com\/en\/applying-statistics-in-quality-projects\/how-could-you-benefit-from-a-box-cox-transformation SciPy has added an inverse Box-Cox transformation: https:\/\/docs.scipy.org\/doc\/scipy\/reference\/generated\/scipy.special.inv_boxcox.html Does Box-cox always work? The answer is NO. Box-cox does not &#8230; <a title=\"Box-cox transformation\" class=\"read-more\" href=\"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/\" aria-label=\"Read more about Box-cox transformation\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[151],"tags":[],"class_list":["post-6012","post","type-post","status-publish","format-standard","hentry","category-machine-learning"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Box-cox transformation -<\/title>\n<meta name=\"description\" content=\"These are reminder notes about Box-cox transformation. One of the problems that box-cox transformation tries to solve is \u201cheteroscedasticity\u201d - joapen projects\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Box-cox transformation -\" \/>\n<meta property=\"og:description\" content=\"These are reminder notes about Box-cox transformation. One of the problems that box-cox transformation tries to solve is \u201cheteroscedasticity\u201d - joapen projects\" \/>\n<meta property=\"og:url\" content=\"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/\" \/>\n<meta property=\"og:site_name\" content=\"joapen projects\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-22T12:39:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-22T12:39:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.minitab.com\/hubfs\/Imported_Blog_Media\/race.jpg\" \/>\n<meta name=\"author\" content=\"joapen\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"joapen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/\"},\"author\":{\"name\":\"joapen\",\"@id\":\"http:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\"},\"headline\":\"Box-cox transformation\",\"datePublished\":\"2021-12-22T12:39:48+00:00\",\"dateModified\":\"2021-12-22T12:39:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/\"},\"wordCount\":135,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\"},\"image\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.minitab.com\\\/hubfs\\\/Imported_Blog_Media\\\/race.jpg\",\"articleSection\":[\"Machine Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/\",\"url\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/\",\"name\":\"Box-cox transformation -\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/joapen.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.minitab.com\\\/hubfs\\\/Imported_Blog_Media\\\/race.jpg\",\"datePublished\":\"2021-12-22T12:39:48+00:00\",\"dateModified\":\"2021-12-22T12:39:52+00:00\",\"description\":\"These are reminder notes about Box-cox transformation. One of the problems that box-cox transformation tries to solve is \u201cheteroscedasticity\u201d - joapen projects\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/#primaryimage\",\"url\":\"https:\\\/\\\/blog.minitab.com\\\/hubfs\\\/Imported_Blog_Media\\\/race.jpg\",\"contentUrl\":\"https:\\\/\\\/blog.minitab.com\\\/hubfs\\\/Imported_Blog_Media\\\/race.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/12\\\/22\\\/box-cox-transformation\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/joapen.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Box-cox transformation\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/joapen.com\\\/blog\\\/#website\",\"url\":\"http:\\\/\\\/joapen.com\\\/blog\\\/\",\"name\":\"joapen projects\",\"description\":\"Just a place to write\",\"publisher\":{\"@id\":\"http:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/joapen.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\",\"name\":\"joapen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\",\"url\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\",\"contentUrl\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\",\"width\":400,\"height\":400,\"caption\":\"joapen\"},\"logo\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\"},\"sameAs\":[\"http:\\\/\\\/www.joapen.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Box-cox transformation -","description":"These are reminder notes about Box-cox transformation. One of the problems that box-cox transformation tries to solve is \u201cheteroscedasticity\u201d - joapen projects","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:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/","og_locale":"en_US","og_type":"article","og_title":"Box-cox transformation -","og_description":"These are reminder notes about Box-cox transformation. One of the problems that box-cox transformation tries to solve is \u201cheteroscedasticity\u201d - joapen projects","og_url":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/","og_site_name":"joapen projects","article_published_time":"2021-12-22T12:39:48+00:00","article_modified_time":"2021-12-22T12:39:52+00:00","og_image":[{"url":"https:\/\/blog.minitab.com\/hubfs\/Imported_Blog_Media\/race.jpg","type":"","width":"","height":""}],"author":"joapen","twitter_misc":{"Written by":"joapen","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/#article","isPartOf":{"@id":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/"},"author":{"name":"joapen","@id":"http:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217"},"headline":"Box-cox transformation","datePublished":"2021-12-22T12:39:48+00:00","dateModified":"2021-12-22T12:39:52+00:00","mainEntityOfPage":{"@id":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/"},"wordCount":135,"commentCount":0,"publisher":{"@id":"http:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217"},"image":{"@id":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.minitab.com\/hubfs\/Imported_Blog_Media\/race.jpg","articleSection":["Machine Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/","url":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/","name":"Box-cox transformation -","isPartOf":{"@id":"http:\/\/joapen.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/#primaryimage"},"image":{"@id":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.minitab.com\/hubfs\/Imported_Blog_Media\/race.jpg","datePublished":"2021-12-22T12:39:48+00:00","dateModified":"2021-12-22T12:39:52+00:00","description":"These are reminder notes about Box-cox transformation. One of the problems that box-cox transformation tries to solve is \u201cheteroscedasticity\u201d - joapen projects","breadcrumb":{"@id":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/#primaryimage","url":"https:\/\/blog.minitab.com\/hubfs\/Imported_Blog_Media\/race.jpg","contentUrl":"https:\/\/blog.minitab.com\/hubfs\/Imported_Blog_Media\/race.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/joapen.com\/blog\/2021\/12\/22\/box-cox-transformation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/joapen.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Box-cox transformation"}]},{"@type":"WebSite","@id":"http:\/\/joapen.com\/blog\/#website","url":"http:\/\/joapen.com\/blog\/","name":"joapen projects","description":"Just a place to write","publisher":{"@id":"http:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/joapen.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"http:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217","name":"joapen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg","url":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg","contentUrl":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg","width":400,"height":400,"caption":"joapen"},"logo":{"@id":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg"},"sameAs":["http:\/\/www.joapen.com"]}]}},"_links":{"self":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts\/6012","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/comments?post=6012"}],"version-history":[{"count":1,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts\/6012\/revisions"}],"predecessor-version":[{"id":6013,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts\/6012\/revisions\/6013"}],"wp:attachment":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/media?parent=6012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/categories?post=6012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/tags?post=6012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}