{"id":1467,"date":"2022-10-24T09:00:00","date_gmt":"2022-10-24T07:00:00","guid":{"rendered":"https:\/\/www.manuelmontanari.com\/blog\/?p=1467"},"modified":"2022-10-24T09:03:07","modified_gmt":"2022-10-24T07:03:07","slug":"selection-bias","status":"publish","type":"post","link":"https:\/\/www.manuelmontanari.com\/blog\/selection-bias\/","title":{"rendered":"Cognitive and data biases &#8211; the selection bias"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">When analyzing a dataset sometimes we are working with data that does not represent the reality but it&#8217;s the result of a seleciton. This means that the seleciton made before the analysis is already creating a data bias.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image-33.png\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image-33.png\" alt=\"\" class=\"wp-image-1470\" srcset=\"https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image-33.png 750w, https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image-33-300x169.png 300w, https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image-33-297x167.png 297w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">For example if we work with panel data we must make sure that the panelist represent a balanced sample of the population. Hence, if the population we want to represent is 55% male and 45% female, we need to make sure our panel has the same distribution (55\/45). It is not that simple (usually the sample will never be exactly representing the reality, determined with an establishment survey, and weighting factors are also applied) but for the sake of this explenation let&#8217;s keep it simple.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another example: if we analyze an NPS score, we should make sure that the data was collected with an unbiased sample. How can a sample be biased? well, one example is very clear: if we collect an NPS score from a specific page, we need to make sure we select a proper page. For example a page that everyone has the chance to see, regardless if they purchase or not. So, placing the NPS survey on the Confirmation page of your ecommerce site, will collect biased data. Why? Because you are implicitely making a selection: you are asking the NPS survey only to people (customers) that have succesfully completed a purchase. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s take a look at the two NPS score analysis below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps1-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"990\" height=\"244\" src=\"https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps1-1.png\" alt=\"\" class=\"wp-image-1881\" srcset=\"https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps1-1.png 990w, https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps1-1-300x74.png 300w, https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps1-1-768x189.png 768w, https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps1-1-297x73.png 297w\" sizes=\"auto, (max-width: 990px) 100vw, 990px\" \/><\/a><figcaption>1 &#8211; NPS score survey &#8211; Mapp Intelligence<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps2-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"992\" height=\"258\" src=\"https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps2-1.png\" alt=\"\" class=\"wp-image-1882\" srcset=\"https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps2-1.png 992w, https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps2-1-300x78.png 300w, https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps2-1-768x200.png 768w, https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/10\/nps2-1-297x77.png 297w\" sizes=\"auto, (max-width: 992px) 100vw, 992px\" \/><\/a><figcaption>2 &#8211; NPS score survey &#8211; Mapp Intelligence<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Those are both the results of a survey asked to the customers of an ecommerce retail website. The <strong>first one<\/strong> being delivered on the exit intent action from any page of the site except the cart page and the thankyou page. The <strong>second one<\/strong> was delivered on the ThankYou page post-purchase. We can clearly spot the difference in the results. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is a clear example of how different results can get if your sample does not represent the entire population but just a biased sample of it. And yes, it is not just a selection bias itself. It becomes a selection bias if we cherry-pick the results we like (and, for example, internally to our organization we circulate the second NPS results instead of the first one).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now you know it! Happy analysis!<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/imgs.xkcd.com\/comics\/selection_bias.png\" alt=\"Selection Bias\"\/><figcaption>Copyright https:\/\/xkcd.com\/2618\/<\/figcaption><\/figure>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>When analyzing a dataset sometimes we are working with data that does not represent the reality but it&#8217;s the result of a seleciton. This means that the seleciton made before the analysis is already creating a data bias. For example if we work with panel data we must make sure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1470,"comment_status":"closed","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[180,30],"tags":[173,296,299,298,209,206],"class_list":["post-1467","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cognitive-and-data-biases","category-digital-analytics","tag-cognitive-bias","tag-nps","tag-population","tag-sample","tag-selection-bias","tag-xkcd","post-with-thumbnail","post-with-thumbnail-icon"],"jetpack-related-posts":[{"id":1139,"url":"https:\/\/www.manuelmontanari.com\/blog\/cognitive-biases-survivorship-bias\/","url_meta":{"origin":1467,"position":0},"title":"Cognitive and data biases: Survivorship Bias","author":"Manuel","date":"12 September 2022","format":false,"excerpt":"What\u2019s a data bias? Why one of the most common one is called \u201csurvivor bias\u201d? what\u2019s a romanic bridge? And what does it have to do with WWII allies planes?","rel":"","context":"In &quot;Cognitive and Data Biases&quot;","block_context":{"text":"Cognitive and Data Biases","link":"https:\/\/www.manuelmontanari.com\/blog\/category\/digital-analytics\/cognitive-and-data-biases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image.jpeg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image.jpeg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image.jpeg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image.jpeg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image.jpeg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image.jpeg?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":1947,"url":"https:\/\/www.manuelmontanari.com\/blog\/examples-of-correlations-that-have-nothing-to-do-with-causation\/","url_meta":{"origin":1467,"position":1},"title":"Examples of correlations that have nothing to do with causation","author":"Manuel","date":"22 November 2022","format":false,"excerpt":"in this post and this one I described a couple of nice examples of correlation vs. causation cognitive biases. There are litterally hundreds out there that can be added. By doing a little search i came across a few nice examples using charts, here is a collection of my faourite\u2026","rel":"","context":"In &quot;Cognitive and Data Biases&quot;","block_context":{"text":"Cognitive and Data Biases","link":"https:\/\/www.manuelmontanari.com\/blog\/category\/digital-analytics\/cognitive-and-data-biases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2023\/02\/img_9821.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2023\/02\/img_9821.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2023\/02\/img_9821.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2023\/02\/img_9821.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1421,"url":"https:\/\/www.manuelmontanari.com\/blog\/cognitive-bias-confiramtion-bias\/","url_meta":{"origin":1467,"position":2},"title":"Cognitive and data biases: the Confiramtion Bias","author":"Manuel","date":"10 October 2022","format":false,"excerpt":"\u201cif you torture the data long enough, it will confess to anything\u201d.Ronald H. Coase, British Economist When working with a big dataset it's easy to fall into the confirmation bias. We are looking for some insights, and usually what happens is that even before looking at the data we have\u2026","rel":"","context":"In &quot;Cognitive and Data Biases&quot;","block_context":{"text":"Cognitive and Data Biases","link":"https:\/\/www.manuelmontanari.com\/blog\/category\/digital-analytics\/cognitive-and-data-biases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/whatyousee.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/whatyousee.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/whatyousee.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/whatyousee.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/whatyousee.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/whatyousee.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":1427,"url":"https:\/\/www.manuelmontanari.com\/blog\/cognitive-bias-survivorship-bias-part-2\/","url_meta":{"origin":1467,"position":3},"title":"Cognitive Bias &#8211; Survivorship Bias &#8211; Part 2","author":"Manuel","date":"3 October 2022","format":false,"excerpt":"In Turin there is an ancient church named Santuario della Consolata (its full name is \"Chiesa di Santa Maria della Consolazione\"), it's origin dates back to the XVII century. The interior is very rich, with gold inlays everywhere on the walls and arches, and wonderful frescoes surrounded by pink carrara\u2026","rel":"","context":"In &quot;Cognitive and Data Biases&quot;","block_context":{"text":"Cognitive and Data Biases","link":"https:\/\/www.manuelmontanari.com\/blog\/category\/digital-analytics\/cognitive-and-data-biases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image-24.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image-24.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image-24.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image-24.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image-24.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":1368,"url":"https:\/\/www.manuelmontanari.com\/blog\/the-causality-bias-the-bananas-diet\/","url_meta":{"origin":1467,"position":4},"title":"The Causality Bias &#8211; The Bananas diet","author":"Manuel","date":"19 September 2022","format":false,"excerpt":"What does Bananas and Black cars have in common? why correlation does not imply causality?","rel":"","context":"In &quot;Cognitive and Data Biases&quot;","block_context":{"text":"Cognitive and Data Biases","link":"https:\/\/www.manuelmontanari.com\/blog\/category\/digital-analytics\/cognitive-and-data-biases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/icecream-sales.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/icecream-sales.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/icecream-sales.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/icecream-sales.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/icecream-sales.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/icecream-sales.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":2690,"url":"https:\/\/www.manuelmontanari.com\/blog\/data-vs-insights\/","url_meta":{"origin":1467,"position":5},"title":"Data Vs. Insights","author":"Manuel","date":"27 February 2023","format":false,"excerpt":"In today's data-driven world, we often hear terms like data and insights used interchangeably. However, there is a fundamental difference between these two concepts. In simple terms, data refers to raw facts and figures, while insights are meaningful interpretations and conclusions derived from data. I recently came across this article\u2026","rel":"","context":"In &quot;Cognitive and Data Biases&quot;","block_context":{"text":"Cognitive and Data Biases","link":"https:\/\/www.manuelmontanari.com\/blog\/category\/digital-analytics\/cognitive-and-data-biases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2023\/02\/image-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2023\/02\/image-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2023\/02\/image-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2023\/02\/image-1.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2023\/02\/image-1.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2023\/02\/image-1.png?resize=1400%2C800&ssl=1 4x"},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/www.manuelmontanari.com\/blog\/wp-content\/uploads\/2022\/08\/image-33.png","_links":{"self":[{"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/posts\/1467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/comments?post=1467"}],"version-history":[{"count":10,"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/posts\/1467\/revisions"}],"predecessor-version":[{"id":1889,"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/posts\/1467\/revisions\/1889"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/media\/1470"}],"wp:attachment":[{"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/media?parent=1467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/categories?post=1467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.manuelmontanari.com\/blog\/wp-json\/wp\/v2\/tags?post=1467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}