<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sabrine Hamroun, PhD on Medium]]></title>
        <description><![CDATA[Stories by Sabrine Hamroun, PhD on Medium]]></description>
        <link>https://medium.com/@sabrine_48550?source=rss-8f883f9e38f0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*bwaUC8uT4GW-ezCw</url>
            <title>Stories by Sabrine Hamroun, PhD on Medium</title>
            <link>https://medium.com/@sabrine_48550?source=rss-8f883f9e38f0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 04:46:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sabrine_48550/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Between human and artificial decision-making processes]]></title>
            <link>https://medium.com/fifty-five-data-science/between-human-and-artificial-decision-making-processes-106e5da5cd19?source=rss-8f883f9e38f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/106e5da5cd19</guid>
            <category><![CDATA[human-behavior]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[cognitive-science]]></category>
            <category><![CDATA[decision-making]]></category>
            <dc:creator><![CDATA[Sabrine Hamroun, PhD]]></dc:creator>
            <pubDate>Tue, 16 Jul 2024 09:02:59 GMT</pubDate>
            <atom:updated>2024-07-16T09:03:47.201Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n4sMugbfDFIjj9cS9dCEBQ.jpeg" /><figcaption>Photo of <a href="https://unsplash.com/fr/@askkell?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Andy Kelly</a> on <a href="https://unsplash.com/fr/photos/photo-dune-fille-posant-la-main-gauche-sur-un-robot-numerique-blanc-0E_vhMVqL9g?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><p><em>Have you interacted with an artificial intelligence today? The answer is likely yes, and many times over. If you have been on social media, read or wrote an email, checked your weather app, listened to music, or booked a taxi online, then you did interact with an artificial intelligence system. The same goes for this article: unless someone sent you a direct link, you probably found it through a recommender system, a type of AI. One milestone after another, artificial intelligence has become a regular part of our daily lives, even shaping the way we live. Interactions between humans and AIs have known many iterations, some of which will be explored in this article.</em></p><p>‍</p><h4>I- Human and artificial decision-making: first cousins or distant relatives?</h4><p><strong>1- When AI research meets cognitive science</strong></p><p>Artificial intelligence is considered to have been founded after the 1956 <a href="https://en.wikipedia.org/wiki/Dartmouth_workshop">Dartmouth Summer Research project</a>, during which several scientists and mathematicians brainstormed how to create a machine that could think like a human being. Since then (and even before), human and artificial decision-making have long been topics of interest for researchers in multiple fields. Herbert Simon, a Nobel-prize winner scientist, introduced the <em>concept of bounded rationality</em>. His theory states that, as decision-makers, human beings are limited in their rationality and tend not to choose the optimal option but instead the sufficient one in its context. Simon himself was among the first pioneers in the artificial intelligence field. He co-created the<em> Logic Theorist</em>, the computer program considered to be the first AI. Based on a search tree and logical processes, the <em>Logical Theorist</em> was able to prove 38 mathematical theorems.</p><p><strong>2- Biological and artificial neural networks</strong></p><p>The biological structure of the brain has been an inspiration for artificial intelligence development. For instance, the work of two Nobel prize-winning neurophysiologists, Hubel and Wiesel, on the visual cortex of cats inspired the structure of Convolutional Neural Networks (CNN), a type of neural network widely used in image processing for purposes including predicting an image’s content. Their research showed that when presented with various lines, the visual cortex’s cells would fire differently based on their inclination, angles, and colors. CNNs use filters for pattern recognition, i.e., they allow specific neurons to recognize particular patterns (edges, angles, etc) within blocks of pixels.</p><p><strong>3- Evaluating artificial intelligence vs human intelligence</strong></p><p>People have long been interested in creating a system that can think like a human being. But the initial question at the heart of this project, “ Can machines think?”, as controversial as it is complex, was substituted for simpler ones, such as: “ <a href="https://en.wikipedia.org/wiki/Turing_test">Can machines do what we (as thinking entities) can do?</a> “ It was to answer the latter that Alan Turing proposed what later became known as the “Turing test,” a test performed to evaluate whether people could distinguish between human-generated and machine-generated discussions.</p><p>Another way to evaluate an artificial intelligence’s “rational” decision-making is presented <a href="https://arxiv.org/ftp/arxiv/papers/2309/2309.12485.pdf">in this paper</a>. Its authors wanted to determine whether different versions of Large Language Models (LLMs) would be prone to the same irrational decision-making as humans. They presented the algorithms with a set of cognitive tests widely used to evaluate human decision-making, such as the <em>cognitive reflection test</em>, a psychological test used to assess a person’s capacity to override incorrect “gut” responses and engage in further reflection. The results showed that “<em>models of the ‘Da Vinci’ family (GPT-3 and GPT-3.5) displayed signs of bounded or heuristic reasoning, and generally under-performed human participants. On the other hand, more recent models (ChatGPT and GPT-4) displayed super-human performance</em>” when compared to a sample of human participants, as reported in the paper.</p><h4>II- Human-AI interaction: the solution for debiased decision-making?</h4><p><strong>1- AI can help us overcome our decision biases</strong></p><p>AI has been applied in different fields as a promising tool to help decision-makers make better decisions. In other words, this technology can help us make objective decisions based on interpreting data from the environment and, therefore, might assist the human decision-maker in surpassing any heuristics in the decision process.</p><p>Let’s consider the medical field as a use case. Having to process a lot of information and perform several tasks each day — sometimes in parallel — doctors can get mentally exhausted, and <a href="https://www.ama-assn.org/delivering-care/ethics/4-widespread-cognitive-biases-and-how-doctors-can-overcome-them">their analysis can be biased</a>. For instance, they can be subject to <em>confirmation bias</em>. This bias occurs when we select and interpret information in a way that confirms our beliefs.</p><p>This can lead doctors to misinterpret medical analysis and focus on elements that confirm their chosen diagnosis. <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9955430/#:~:text=AI%20can%20analyze%20large%20amounts,history%2C%20and%20laboratory%20test%20results.">Several AI-based solutions have emerged</a> to help with medical diagnosis. With image recognition, classification, and Natural Language processing, to name a few, AI can analyze different medical data points in an attempt to bring a more “objective” medical diagnosis.</p><p><strong>2- But AI can be biased itself</strong></p><p>Although it has been said that AI could perfect the decision-making process as an objective and efficient decision-maker capable of analyzing an enormous amount of data in a short time, everything is not as perfect as it sounds. In fact, artificial intelligence can be biased itself.</p><p>An AI model can be biased through the dataset used for its training, e.g., when the dataset is unbalanced between its predicted classes. Consider a model aimed to predict if a consumer will churn (stop doing business with the company) or not — here, the model needs to predict a binary variable, with 1 if churn and 0 otherwise. A data scientist will train such a model on the history of data available for each client at each time step, indicating whether the client churned or not. By design, the training data contains more zeros than ones, following a customer every day from their subscription day till their churn day. Outside of this churn day, all other days will be flagged as zeros. And if there are many more zeros than ones, i.e., if the model could barely perceive and learn any churn activity behavior, it would struggle to predict when the churn would happen — it might even never predict churn behavior for anyone at any time.</p><p>As solutions exist to help surpass human cognitive biases, there are also good practices to apply to overcome AI biases. One way to debias the algorithm in the example above is by balancing the data, e.g., by selecting only a few observations where the target variable is set to 0 or by creating synthetic observations where the target is set to 1.</p><p>The bias can arise from other aspects as well: the model can be too complicated, leading to overfitting the training dataset, meaning that it learns a lot of specificities about it, “noisy” aspects included, and cannot be expanded to unobserved behaviors. Model regularization is a technique that helps prevent overfitting by penalizing noisy variable weights in regression models and by dropping out or shutting down certain neurons during the training process of a neural network.</p><p><strong>3- If managed improperly, AI might enhance our biases</strong></p><p>One problem with data-based bias is that it can reflect human biases and stereotypes. The model can learn to interpret the world as we do and document it. Natural Language Processing is the machine learning technique for processing and interpreting written content. This technique uses embedding, i.e., transforming words from a document into vectors interpretable by the machine. Once presented with vectors, the machine can learn relationships between different words, creating different contexts. For example, it can learn that Paris holds the same significance for France as Tokyo does for Japan. Word2vec is one popular algorithm that creates such embeddings. <a href="https://proceedings.neurips.cc/paper_files/paper/2016/file/a486cd07e4ac3d270571622f4f316ec5-Paper.pdf">In this paper</a>, researchers used this algorithm to embed a corpus of 3 million words from Google News. Results showed gender-related job bias in the embedding, as shown in the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/0*EZD0UDrYkG-_X34a.png" /><figcaption>The top extreme jobs related to a “he” or “she” gender by the algorithm. Figure from the cited paper.</figcaption></figure><p>‍In other words, the algorithm linked certain jobs to specific genders. If used in a raw manner, such trained algorithms could further enhance gender disparities, for instance, by proposing unequal job offers for people looking for new opportunities. This paper and much of the literature propose techniques to handle human-based biases and stereotypes detected in the algorithms, such as identifying the variables (or dimensions, in the case of the embedding) that capture bias (like gender bias) and eliminate them. Another technique mentioned in the paper cited above is to equalize the gender-specific dimensions, i.e., creating a new dimension of word embeddings that is gender-neutral. Such checks must be performed regularly, especially in sensitive fields, to avoid generating content enhancing these stereotypes.</p><p>Another type of artificial intelligence that humans frequently interact with is recommender systems. As their name implies, recommender systems are algorithms used to recommend new options for a user based on previously consumed content. For instance, on a music platform, based on what I have been listening to as well as my profile, specific titles from the enormous amount of available tracks will be presented to me, likely different from the suggestions another user would get on the same platform.</p><p>The same goes for social media — suggested content fits one’s interests and, therefore, boosts one’s engagement with the platform. However, being constantly exposed to content that fits one’s interests might raise a bias issue, as it could enhance confirmation bias. As mentioned earlier, this bias occurs when we select and interpret information in a way that confirms our previous beliefs. The concern that can be raised here is that as we consume content that fits our prior interests, recommender systems would propose content that aligns with these interests, and though the algorithm might suggest random content for the user to explore, the latter might tend to ignore them to consume the content that fits their prior biases exclusively and therefore reinforces them. This effect is known as an <a href="https://en.wikipedia.org/wiki/Echo_chamber_(media)">echo chamber</a>. Interestingly, the echo chamber effect is the object of fierce debates, as opinions vary on whether the research dedicated to this phenomenon is strong enough to confirm its existence… And whether such behavior is due to the algorithm’s preconceptions or to the very nature of human decision-making.</p><p>‍</p><p>This article concludes our series of articles exploring the decision-making process. We hope you enjoyed your reading and that it helped you understand both how complex and fascinating decision-making can be, and how impactful decision science can prove as well. If you want to read the other articles, please check the links below:</p><p><a href="https://medium.com/@sabrine_48550/how-does-the-context-impact-our-choices-1366200491d7?source=friends_link&amp;sk=af6965bf996fd30f45749adcd14dcfc7"><strong>1- How does the context impact our choices?</strong></a></p><p><a href="https://medium.com/@sabrine_48550/are-you-a-rational-human-being-lets-see-what-cognitive-science-says-about-it-152e3b9dfe2d?source=friends_link&amp;sk=aa03e5cfa9d3ceb73aefedb31579749e"><strong>2- Are you a rational human being? Let’s see what cognitive science says about it</strong></a></p><p><a href="https://medium.com/@sabrine_48550/are-you-a-risk-taker-long-answer-short-it-depends-700076d9db1c?source=friends_link&amp;sk=4827f810fe6e59a10f964ce831f68500"><strong>3- Are you a risk taker? Long answer short: it depends!</strong></a></p><p><a href="https://medium.com/@sabrine_48550/nudging-the-mechanisms-of-influence-e75249a69255?source=friends_link&amp;sk=68c29987a297e32ccb08b7d7371f5462"><strong>4- Nudging: the mechanisms of influence</strong></a></p><p><a href="https://medium.com/@sabrine_48550/why-do-people-harm-the-environment-although-they-try-to-treat-it-well-8fe4a919b6a0?source=friends_link&amp;sk=43bf1cef9111d64ddd39b1ff72900039"><strong>5- Why do people “harm the environment although they try to treat it well”? Sustainability analysis from a cognitive science perspective</strong></a></p><p>‍</p><p>Don’t hesitate to subscribe to our Tea O’Clock newsletter to keep up to date with the release of new articles and the latest market trends → <a href="https://resources.fifty-five.com/subscribe-tea-o-clock?utm_medium=email&amp;_hsmi=2&amp;_hsenc=p2ANqtz-_0I1bbYYhbYbJWNDIUPH_bR_l8jwwLTn_h8qGTew5QTqjH7ZcO172zKai40cf9P064F9aeyWnz8mqle3zMAdUZyIjcDYR2QH5U-3Gw2xjw4U84OYI&amp;utm_content=2&amp;utm_source=hs_email"><strong>the fifty-five newsletter.</strong></a></p><p><em>Originally published at </em><a href="https://www.fifty-five.com/tea-house/the-decision-making-process-an-overview-part-6-between-human-and-artificial-decision-making-processes"><em>https://www.fifty-five.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=106e5da5cd19" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fifty-five-data-science/between-human-and-artificial-decision-making-processes-106e5da5cd19">Between human and artificial decision-making processes</a> was originally published in <a href="https://medium.com/fifty-five-data-science">fifty-five | Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why do people “harm the environment although they try to treat it well”?]]></title>
            <link>https://medium.com/fifty-five-data-science/why-do-people-harm-the-environment-although-they-try-to-treat-it-well-8fe4a919b6a0?source=rss-8f883f9e38f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fe4a919b6a0</guid>
            <category><![CDATA[decision-making]]></category>
            <category><![CDATA[cognitive-science]]></category>
            <category><![CDATA[human-behavior]]></category>
            <category><![CDATA[sustainability]]></category>
            <dc:creator><![CDATA[Sabrine Hamroun, PhD]]></dc:creator>
            <pubDate>Tue, 16 Jul 2024 08:58:17 GMT</pubDate>
            <atom:updated>2024-07-16T08:58:17.626Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why do people “harm the environment although they try to treat it well”? Sustainability analysis from a cognitive science perspective</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hKPYKYVvC6g3J5cJHuvt6g.jpeg" /><figcaption>Photo of <a href="https://unsplash.com/fr/@mischievous_penguins?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Casey Horner</a> on <a href="https://unsplash.com/fr/photos/low-angle-photography-of-trees-at-daytime-4rDCa5hBlCs?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><p><em>Climate change is now undeniable, affecting the entire world on a regular basis. </em><a href="https://www.nasa.gov/press-release/nasa-clocks-july-2023-as-hottest-month-on-record-ever-since-1880"><em>According to Nasa</em></a><em>, last July was the hottest month ever recorded since 1880, and </em><a href="https://www.worldweatherattribution.org/extreme-heat-in-north-america-europe-and-china-in-july-2023-made-much-more-likely-by-climate-change/"><em>the World Weather Attribution</em></a><em> confirmed once again that human intervention is making extreme weather events more frequent. Do our actions match the severity of the situation? Simply put, no. But why are we struggling to react appropriately in the face of this ever-worsening urgency? Perhaps cognitive science holds the answer.‍</em></p><p>Experts have observed a lag between intentional “green” behavior and actual behavior.</p><p>We might be aware of the urgency and importance of the climate crisis, yet our remedial efforts might still be low. Perhaps more strikingly, people might still “harm the environment although they try to treat it well,” as explained <a href="https://www.frontiersin.org/articles/10.3389/fpsyg.2019.00348/full?campaign_id=54&amp;instance_id=10329&amp;segment_id=14453&amp;user_id=433e9be459bf075127afe3455c68c...">in this article</a>. But where does this discrepancy come from? In the next section, we will present some common cognitive biases impacting ecological behavior. Then, we will examine some behavioral-science-based tricks that could enhance sustainable behavior.</p><h3>I- Which biases can slow down sustainable behavior?</h3><h4>1- The negative footprint illusion: when <a href="https://www.frontiersin.org/articles/10.3389/fpsyg.2018.00823/full">A+B&lt;A</a></h4><p>When it comes to estimating our carbon footprint, we tend to make quick approximations: we recall our past actions and roughly estimate their CO2 emissions impact, we compare them by classifying their high emissions or low carbon emissions, and most importantly, we tend to think that our low emissions behaviors compensate for our high emissions ones. In other words, we tend to average our emissions. This heuristic estimation is faulty as every one of the accounted actions contributes to global warming, and therefore,<strong> they should be added up rather than averaged</strong>.</p><p>In a set of experiments, researchers asked participants (many of whom have a degree in energy-related fields) to estimate how many trees should be planted to compensate for the CO2 emissions of constructing:</p><p>A- 150 buildings</p><p>B- 200 buildings: the same 150 buildings as in option A) plus 50 energy-efficient buildings</p><p>Oddly enough (or not), participants wrongly reported that fewer trees were needed to compensate for the second case than for the first. They might have thought that by adding energy-efficient buildings to regular buildings, the overall impact would be reduced when it was, in fact, increasing.</p><p>This false average can be observed in our daily behavior as well. We might believe that going on vacation by train after another trip by plane would compensate for our footprint when it is actually increasing (certainly less than flying again, but still…).</p><h4>2- Resistance to change</h4><p>Human beings tend to resist change (at different levels), especially when it does not suit their immediate needs, regardless of the severity of the situation — CO2 emissions included.</p><p>These past few years, the city of Rome has endured critical pollution levels, threatening its inhabitants’ health and putting its monuments at high risk of deterioration. One major factor for this pollution was the use of diesel cars. <a href="https://thedecisionlab.com/case-study/reducing-smog-in-the-eternal-city">The authorities tried several policies to limit their circulation in the city</a>, but residents usually found a way to circumvent these measures. One policy limited these cars’ circulation based on their numbers: odd-numbered cars would be allowed on odd dates, and even-numbered cars on even dates. Yet, instead of following this new rule, “many families responded by purchasing a second car that they’d be able to use on alternating days,” as reported by The Decision Lab, the company that helped Rome handle this use case.</p><h4>3- People value immediate rewards over long-term rewards</h4><p>When it comes to making choices, time plays a crucial role. Literature has identified that people tend to prefer immediate rewards over delayed ones. They may undervalue a reward if they don’t get it immediately and even prefer a smaller but instant reward over a bigger but delayed one. Such behavior is known as <em>delayed reward discounting</em>, identified as linked to impulsivity and addiction.</p><p>Experts claim that such decision specificity <a href="https://www.frontiersin.org/articles/10.3389/fpsyg.2019.00348/full?campaign_id=54&amp;instance_id=10329&amp;segment_id=14453&amp;user_id=433e9be459bf075127afe3455c68c...">affects ecological decisions</a>. The impact of our choices on minimizing climate change can be perceived as a long-term effect, and therefore, people might not be willing to put in high efforts for such a delayed impact.</p><p>Still, as catastrophic climate change-linked events have now been happening for the past few years, one might wonder if such arguments can stay relevant.</p><h4>4- The Halo effect</h4><p>Consumers are becoming more and more responsible in their purchases. Price and quality are no longer the only criteria for product selection. Other aspects are taken into account: whether an item is ethically produced, healthy, organic, eco-friendly, to name a few. Consumers might confuse these terms. More specifically, we sometimes mistakenly believe that a product’s high marks in one category automatically extend to another. For instance, we might think that what is good for our health is good also for our planet. Such confusion is known as the Halo effect.</p><p>Eating an avocado for brunch brings healthier fat to your body than french fries would, and opting for organic is even better. Yet avocado tree production is water-intensive and becomes challenging under global warming as water resources need accurate management. Moreover, the avocado you ate was likely imported from a faraway country and thus produced higher carbon emissions than fries made with local potatoes. Such confusion between a product’s attributes may lead to involuntarily harmful decisions for the planet.</p><h3>II- How to increase sustainable behavior</h3><p>Several experts have worked on how to increase sustainable behavior, focusing on applying behavioral insights as crucial for this purpose. Steering individual or collective behavior toward sustainability can be a matter of subtle communication and request framing.</p><h4>1- Loss-aversion techniques</h4><p>As decision-makers, we are more afraid of losing something we already have than happy with gaining something new. This disproportion in gain/loss impact on choice is known as loss aversion, which is widely studied in cognitive science literature and one of the main aspects of the Prospect Theory.</p><p>In order to decrease the use of disposable cups in coffee shops, researchers conducted a <a href="https://www.researchgate.net/publication/323891613_Promoting_the_Use_of_Reusable_Coffee_Cups_through_Environmental_Messaging_the_Provision_of_Alternatives_and_Financial_Incentives">series of experiments</a> in several establishments. In some of them, a discount was offered to customers who bought a reusable cup. In other shops, customers were charged extra when purchasing coffee in a disposable cup. And just as the theory would have predicted, people used reusable cups more often in the second set, loss aversion proving to be an effective tool to boost environmentally-friendlier behavior.</p><h4>2- Default bias</h4><p>Setting an option as default is a powerful tool when promoting a specific option in a choice context. When making a choice, we usually tend to make little effort to choose another alternative: it is the <em>default bias</em>.</p><p>What if this default bias was used as an efficient tool to nudge sustainable behavior? After all, it worked in other cases: for instance, countries where citizens are organ donors by default have <a href="https://www.researchgate.net/publication/8996952_Medicine_Do_defaults_save_lives">higher donation rates</a> than those where citizens need to opt-in for organ donation.</p><p>To promote sustainable behavior, small default policies can be implemented: have printer settings set to “two-sided” by default instead of one-sided, serve sustainable food in the workplace, do not give <a href="https://www.service-public.fr/particuliers/actualites/A16120">payment receipts</a> unless asked by the customer, and many other ideas listed <a href="https://drjohnizzo.com/purpose-blog/sustainability/good-by-default-making-sustainability-the-easiest-choice/">here</a>.</p><p>Finally, it is worth noting that using cognitive biases as a “one size fits all” solution to enhance sustainable behavior (because it worked in other situations) is not sufficient. Driving sustainable behavior implies deeper consideration of context and targeted populations to avoid “projecting” policies that do not fit them.</p><p>For further reading about concrete behavioral science projects in sustainability, read <a href="https://www.oecd.org/environment/tools-evaluation/Policy-Highlights-Behavioural-Insights.pdf">this report</a> by the OECD.</p><p>Don’t hesitate to subscribe to our Tea O’Clock newsletter to keep up to date with the release of new articles and the latest market trends → <a href="https://resources.fifty-five.com/subscribe-tea-o-clock?utm_medium=email&amp;_hsmi=2&amp;_hsenc=p2ANqtz-_0I1bbYYhbYbJWNDIUPH_bR_l8jwwLTn_h8qGTew5QTqjH7ZcO172zKai40cf9P064F9aeyWnz8mqle3zMAdUZyIjcDYR2QH5U-3Gw2xjw4U84OYI&amp;utm_content=2&amp;utm_source=hs_email"><strong>the fifty-five newsletter.</strong></a></p><p>‍</p><p><em>Originally published at </em><a href="https://www.fifty-five.com/tea-house/the-decision-making-process-an-overviewpart-5-cognitive-science-and-sustainability"><em>https://www.fifty-five.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fe4a919b6a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fifty-five-data-science/why-do-people-harm-the-environment-although-they-try-to-treat-it-well-8fe4a919b6a0">Why do people “harm the environment although they try to treat it well”?</a> was originally published in <a href="https://medium.com/fifty-five-data-science">fifty-five | Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nudging: the mechanisms of influence]]></title>
            <link>https://medium.com/fifty-five-data-science/nudging-the-mechanisms-of-influence-e75249a69255?source=rss-8f883f9e38f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e75249a69255</guid>
            <category><![CDATA[cognitive-science]]></category>
            <category><![CDATA[behavioral-economics]]></category>
            <category><![CDATA[decision-making]]></category>
            <category><![CDATA[nudge]]></category>
            <category><![CDATA[behavioral-science]]></category>
            <dc:creator><![CDATA[Sabrine Hamroun, PhD]]></dc:creator>
            <pubDate>Tue, 16 Jul 2024 08:55:54 GMT</pubDate>
            <atom:updated>2024-07-16T08:55:54.597Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l--yJo2ZRfaTKXEzk5iQXw.jpeg" /><figcaption>Photo of <a href="https://unsplash.com/fr/@victoriano?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Victoriano Izquierdo</a> on <a href="https://unsplash.com/fr/photos/homme-devant-les-distributeurs-automatiques-la-nuit-JG35CpZLfVs?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><p><em>Have you ever hesitated to buy an item before being immediately convinced by the magic sentence, “I’ll give you a special deal on it” from the vendor? If this situation feels familiar to you, you were probably influenced by a specific technique, nudging. This fourth article of our series of articles on decision making will present a brief introduction to this concept as well as examples of real-world applications.</em></p><h3>What is nudging?</h3><p>Nudging is a concept commonly used in economics and decision-making science. First popularized by the book “Nudge: Improving Decisions About Health, Wealth, and Happiness” written by Richard Thaler and Cass Sustein, it represents the different interventions and mechanisms used to influence decision-making and drive it toward the desired option. These interventions, at once simple and subtle, are meant to influence one’s behavior (sometimes subconsciously) without forcing it. Such techniques do not include law-induced behaviors, such as smoking bans.</p><h3>How does nudging work?</h3><h4>1- Nudging and decision-making mechanisms</h4><p>Nudging mainly works because we tend, as decision-makers, to use heuristics (that are not necessarily thoroughly thought through) that help make choices. These heuristics are called <em>cognitive biases</em>. Among these heuristics, let us cite:</p><ul><li>The Status quo effect: individuals might prefer things to stay as they are and, therefore, avoid trying to move on to a new state, even if said new state could be more beneficial to them. In order to orient a behavior towards a specific choice, nudgers might set the option they want a nudgee to choose as default, with the possibility to opt-out to the alternative option.</li><li>The Anchoring effect: as decision-makers, we don’t evaluate our options in an absolute sense but rather make relative evaluations based on their context. More specifically, we compare the value of an option to a reference point. Such a reference can be an “anchor.” For instance, when buying a T-shirt, you might think that 50€ is a high price. Now imagine that on the t-shirt ‘s tag, the previous price of 62€ is crossed out and changed to 50€. You might now think this is a good deal you should not miss. The previous price worked as an anchor, and your evaluation of the 50€ is now relative to it. Therefore, it switched the price perception from an exaggerated one to an enticing deal.</li></ul><h4>2- Personalize nudging policies for targeted groups</h4><p>Nudge policies may work better when adapted to a targeted group, for instance, customers hesitating to buy a new product. One way to define this targeted group is by using machine-learning techniques like scoring, an algorithm that gives a score to a specific observation based on its criteria. For instance, consider a fashion website. By analyzing visitor activity (items viewed, time spent per item, frequency of visits, purchase history, etc.), we can define a score for a visitor’s likelihood of buying a new item they viewed on the website but have yet to purchase. The score is calculated by comparing the visitor’s navigation criteria to those of others on the website and by determining if other customers with similar profiles bought the product.</p><p>Based on their interest score, a client will be targeted (or not) by marketing campaigns. If their score is very low, the visitor is likely not interested in the item at all, and therefore, there is no need for targeting. Contrastingly, if their score is very high, they will likely purchase without requiring extra marketing actions. Instead, the brand will focus on visitors with medium scores, those who cannot decide whether to buy. These profiles will be targeted by marketing campaigns to nudge their behavior toward making a purchase. The nudging can take the form of personalized emails, including special offers about the item they checked, for instance.</p><h3>What are some examples of nudging?</h3><p>Nudge techniques are widely used in different fields: public policy, health, sustainability, and marketing, to name a few. Below, we will describe a few specific examples.</p><h4>1- Nudging towards healthier food choices</h4><p><a href="https://www.youtube.com/watch?v=LF4ETgw29BA">In a social experiment</a>, the iNudgeYou, a Danish applied behavior science center, helped people eat healthier. In a company restaurant, they noticed that food was presented in consistent quantities: large pieces of cake and whole apples, making people eat too much cake (94 grams on average per person) rather than apples (13 grams on average per person). They decided to cut the food into smaller pieces. As a result, people started to load their plates with a mix of cake and apples, leading to an increase in the quantity of apples (20 grams on average) and a decrease in the quantity of cake consumed (61 grams instead of the original 94 grams). It can, sometimes, be as simple as that!</p><h4>2- The Call-to-action button</h4><p>When browsing a website, people tend to first broadly scan it before going to the section that interests them. In Western cultures, a website is usually scrolled from the top to the bottom, from the left to the right. Therefore, the right-low section is checked last; this is why call-to-action buttons (subscribe, book now, make a reservation…) are typically placed there.</p><h4>3- Default opt-in options</h4><p>Setting the targeted option as default is a commonly used tool for nudging in different fields. For instance, it has been proven to increase organ donation rates among the population. Combining experimental tests and real-world data, <a href="https://www.researchgate.net/publication/8996952_Medicine_Do_defaults_save_lives">this paper</a> highlights the impact of setting the organ donor status as the default option to increase the donation rate. This process was far more effective than other policies experimented with. For instance, in the Netherlands, a massive national educational campaign was conducted to encourage people to register for organ donation, yet, the consent rate remained low (27.5%), much lower than in European countries using the default opt-in option (e.g. &gt;99% in France).</p><p>The UK government used the same technique to <a href="https://ifs.org.uk/publications/who-leaves-their-pension-after-being-automatically-enrolled">enhance employees’ enrollment in the retirement savings program</a>. The effect was particularly remarkable for workers with the lowest income. This category, struggling to be financially stable in the short term, prioritizes immediate financial security over the importance of long-term investment in retirement savings. Consequently, only 22% of this category had a retirement saving program before the default opt-in policy, compared to more than 90% after the default opt-in policy.</p><h3>Are nudge techniques universal?</h3><p>When using nudging techniques, one might tend to rely directly on behavioral science insights. However, these insights themselves can be biased, as they are based on studies and research performed <a href="https://www.apa.org/monitor/2010/05/weird">on WEIRD (Western Educated Industrialized, Rich and Democratic) populations most of the time</a>. This cohort only represents about 12% of the world, yet makes up about 80% of the conducted studies.</p><p>As these cognitive and behavioral mechanisms studies are biased by the restricted population they examined, they cannot be systematically generalized to other populations with different cultural specificities; cultural and socio-demographic specifications must be taken into account. Nudging cannot be efficient by just simply applying behavioral and cognitive findings. Instead, it requires a deeper understanding of the context of its application as well as the targeted group.</p><h3>Applying ethics and regulations to nudging</h3><p>As previously detailed, nudging employs subtle techniques to impact human behavior and drive it toward a targeted choice. As a general tool, it can be employed to benefit the targeted consumer (like the case described above, applied to healthy food consumption). By contrast, it can be used to trick the nudgee into undesired behaviors that primarily benefit the nudger. These techniques are called <em>dark patterns</em>. These patterns include default-ticking automatic renewable subscriptions within forms, for instance, relying on the status-quo bias. Another harmful technique also used in online choice architecture is <em>sludge</em>. The opposite of nudge, sludge aims to develop a complex and exhausting consumer path on a given website to dissuade them from taking an action, e.g., to discourage a visitor from unsubscribing to a program.</p><p>These <em>dark patterns</em> emphasize the ethical and regulatory norms that should be respected when using these techniques. Such a topic is quite controversial, as a nudger’s methods and intentions can be as subtle as they are difficult to define.</p><p>From a regulatory perspective, several countries are working on regulations defining the limits of nudging techniques. For instance, since April 2021, the CNIL states that websites collecting user data through cookies should no longer be the default. Instead, each user must explicitly consent to data collection, ending decades of data collection based on the status-quo effect.</p><p>Although the use of behavioral science and ethical nudging is still being debated, some guidelines exist to help behavioral scientists perform their job ethically, like the “ <a href="https://youtu.be/QM4yFBTxuhw?si=LQrez_ftFjFAXE6x&amp;t=1372">Nudge FORGOOD framework</a>”. As described in this video by its co-designer Liam Delaney, this framework states that nudgers should consider their work’s ethical aspects: <strong>F</strong>airness, <strong>O</strong>penness, <strong>R</strong>espect, <strong>G</strong>oals, <strong>O</strong>pinions, <strong>O</strong>ptions and <strong>D</strong> elegation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/0*btrMQHpKCz2P-MuO.png" /><figcaption>The Nudge “FORGOOD” framework. <a href="https://bsp.ucd.ie/wp-content/uploads/2020/01/Nudge-FORGOOD_-Ethical-Aspects-of-Behavioural-Public-Policy-2.pdf">Source</a></figcaption></figure><p>‍</p><p><em>Originally published at </em><a href="https://www.fifty-five.com/tea-house/the-decision-making-process-an-overview---part-4-nudging-the-mechanisms-of-influence"><em>https://www.fifty-five.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e75249a69255" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fifty-five-data-science/nudging-the-mechanisms-of-influence-e75249a69255">Nudging: the mechanisms of influence</a> was originally published in <a href="https://medium.com/fifty-five-data-science">fifty-five | Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are you a risk taker? Long answer short: it depends!]]></title>
            <link>https://medium.com/fifty-five-data-science/are-you-a-risk-taker-long-answer-short-it-depends-700076d9db1c?source=rss-8f883f9e38f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/700076d9db1c</guid>
            <category><![CDATA[risk]]></category>
            <category><![CDATA[cognitive-science]]></category>
            <category><![CDATA[decision-making]]></category>
            <category><![CDATA[human-behavior]]></category>
            <category><![CDATA[prospect-theory]]></category>
            <dc:creator><![CDATA[Sabrine Hamroun, PhD]]></dc:creator>
            <pubDate>Tue, 16 Jul 2024 08:53:58 GMT</pubDate>
            <atom:updated>2024-07-16T08:53:58.521Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z2scQzKgF_ZvY6Y50fHpDA.jpeg" /><figcaption>Photo of <a href="https://unsplash.com/fr/@edge2edgemedia?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Edge2Edge Media</a> on <a href="https://unsplash.com/fr/photos/2-des-blancs-sur-surface-bleue-uKlneQRwaxY?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><p><a href="https://medium.com/@sabrine_48550/are-you-a-rational-human-being-lets-see-what-cognitive-science-says-about-it-152e3b9dfe2d?source=friends_link&amp;sk=aa03e5cfa9d3ceb73aefedb31579749e"><em>In our previous article</em></a><em>, we explored cognitive biases, the mechanisms underlying these influences, and how to train ouselves to avoid them. Here, we will be presenting three main models of decision-making under risk. One of the exciting aspects of life is uncertainty! While we are constantly faced with various decisions, benign or crucial, most of them are not systematically certain. This is where risk comes into play: the probability of an unexpected outcome is rarely nonexistent. When it comes to risk management, we are not equal: some are more risk-averse than others, while some of us are more risk-seeking. The same person might not be consistent in their risk-averse or risk-seeking behaviors. Our perception of risk may vary depending on the importance of the situation, for example. Economists and psychologists have proposed different models to explain our behaviors when faced with uncertainty.</em></p><h3>Expected value theory</h3><p>This theory states that human decision-makers are perfectly rational individuals and excellent mathematicians, comparing the average outcome of their options using this formula:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/244/0*qi1mg-TH20yQ9jCP.png" /></figure><p>Here, each of the option’s outcome is weighted by the probability of this outcome’s occurrence, where:</p><p>- EV(X): expected value of an option X</p><p>- Xi: ith outcome of the option</p><p>- P(Xi): probability of the ith outcome of the option to occur</p><p>‍</p><p>Consider the following options:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/0*OpdwQeKc_OOROzU8.png" /></figure><p>‍</p><p>According to this theory, we should choose the option on the left as it gives, on average, more reward (24€) than the one on the right (6€). The math behind is this:</p><p>EV left = P(30€) <em>30€+P(0€)0€ = 0.830€+0.2</em> 0€= 24€</p><p>EV right = P(30€) <em>30€+P(0€)0€ = 0.230€+0.8</em> 0€= 6€</p><p>‍</p><p>One major limitation of this approach is that the expected value is objective, while our decisions can be subjective. More specifically, the same outcome can have different effects on different individuals. The same gain (loss) can make a person happier (sadder) than it makes another one. For instance, the option on the left could be less gratifying for someone accustomed to higher rewards (i.e., an 80€ win instead of 30€), whereas the option on the right could still interest a person more used to earning 3€ at best.</p><p>‍</p><h3>Expected utility theory</h3><p>This theory means to overcome the limits of the above theory and better explain human behavior. It states that while we are rational individuals with great mathematical skills who pick an option based on its average outcome, our choices are still subjective rather than objective. This average outcome is not calculated based on actual outcomes but on perceived ones. In other words, the value of an outcome is based on context rather than reality. Therefore, the expected utility is calculated according to this formula:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/0*OTnmWAknBzjozawZ.png" /></figure><p>Where:</p><p>EU(X) = Expected utility of option X</p><p>Xi: ith outcome of option X</p><p>P(Xi): Probability of the occurrence of outcome Xi</p><p>u(Xi): utility of Xi, meaning subjective perception of value Xi</p><p>‍</p><p>Bernoulli defined the utility function as logarithmic or u(x) = log(x). The utility function proposes to explain how people perceive the value of the same option differently. The expected utility of an option increases as the objective value of an option does (earning 10,000€ is better perceived than earning 100€). Yet, the estimated value of a choice depends on its starting point. For instance, when receiving 20€, a billionaire would be far less happy than someone in need. In other words, the psychological impact of the same amount of money decreases as the original value is higher. This behavior is known as the diminishing marginal utility of wealth.</p><p>‍</p><p>The latter helps explain why a consumer is more likely to buy further items if the price for additional units is lower. For instance, a thirsty person can be willing to spend 2€ to buy a bottle of water, but knowing that a bottle is likely sufficient, he is less willing to pay another 2€ for an extra one. Businesses apply the expected utility theory in their marketing campaigns. For instance, they propose a second item for half the price of the first. As they know that consumers are less willing to buy the second item at full price, selling it at a reduced price increases its chance of being purchased.</p><p>‍</p><p>One significant limit of this theory is that it supposes that we are subjective decision-makers regarding outcome evaluation U(Xi) but objective mathematicians when it comes to outcome probability P(Xi). Nonetheless, our perception of an event probability is usually relative, impacted by different factors: whether we experienced a specific outcome in the past, were told about it by a friend, remember having witnessed this outcome before etc. Suppose you are buying plane tickets for a vacation, and the website suggests purchasing extra travel insurance in case of sickness. As you think back on when you or one of your friends got sick abroad, you might overestimate the probability of such an event and therefore be more susceptible to buying insurance.</p><p>‍</p><h3>Prospect theory</h3><p>This theory proposes to overcome the Expected utility theory’s limits and better explain human behavior. It states that:</p><p>1- People are subjective decision-makers regarding outcome estimation and probability evaluation.</p><p>2- Rare events tend to have a stronger impact on our decisions than predicted by classical rational theory. By contrast, common, predictable events will have less impact on our decision-making than classical theories would posit. For instance, when booking a flight, even though the probability of canceling their trip is very low, people can be interested in paying extra fees for cancellation insurance.</p><p>Thus, the choice of an option is based on its utility, defined by:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/268/0*p0m4strueWeuKr3A.png" /></figure><p>Where:</p><p>Xi: ith outcome of the option X</p><p>v(Xi): Subjective evaluation of Xi</p><p>pi: probability of the Xi outcome</p><p>π(pi): the probability weighting function, reflecting the assumption that people overestimate rare events and underestimate common events.</p><p>‍</p><p>A key aspect also introduced by this theory is that our subjective evaluation of outcomes is inconsistent across contexts. Instead, it depends on a reference point in our minds: are we losing or gaining something? In a series of experiments, Daniel Kahneman and Amos Tversky, the authors of this theory, showed that people are more loss-averse than gain-seeking, meaning that our choices are more impacted by the risk of losing something than the possibility of winning something. We can even make the “irrational” choice of a suboptimal option to avoid losses. Consequently, we tend to prefer a guaranteed gain, even if suboptimal, to a risky but superior one. Such behavior can be inverted depending on how likely the loss/gain is to happen. So next time you claim to be a risk-seeking person, think twice and consider the context!</p><p>Loss aversion is widely used in marketing. For instance, in discount offers, companies tend to present an offer as “subscribe and save 100€,” implying a loss of 100€ averted rather than “subscribe and win 100€,” which frames the subscription as a gain-related decision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/0*jfsbUDi7A2p-MJUQ.png" /><figcaption>Table explaining different choice situations based on context (gain/loss) and probability (high/low). Insights taken from the book “Thinking, Fast and Slow” by Daniel Kahneman.</figcaption></figure><p>‍</p><p>Don’t hesitate to subscribe to our Tea O’Clock newsletter to keep up to date with the release of new articles and the latest market trends →<a href="https://resources.fifty-five.com/subscribe-tea-o-clock?utm_medium=email&amp;_hsmi=2&amp;_hsenc=p2ANqtz-_0I1bbYYhbYbJWNDIUPH_bR_l8jwwLTn_h8qGTew5QTqjH7ZcO172zKai40cf9P064F9aeyWnz8mqle3zMAdUZyIjcDYR2QH5U-3Gw2xjw4U84OYI&amp;utm_content=2&amp;utm_source=hs_email&amp;_gl=1*5bq6hf*_gcl_au*NzI1OTYzMjQ1LjE3MDQxOTkzMjA.&amp;_ga=2.192462506.1835719867.1704703327-334357476.1674574248"> the fifty-five newsletter</a></p><p><em>Originally published at </em><a href="https://www.fifty-five.com/tea-house/the-decision-making-process-an-overview---part-3-decision-making-under-risk"><em>https://www.fifty-five.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=700076d9db1c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fifty-five-data-science/are-you-a-risk-taker-long-answer-short-it-depends-700076d9db1c">Are you a risk taker? Long answer short: it depends!</a> was originally published in <a href="https://medium.com/fifty-five-data-science">fifty-five | Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are you a rational human being? Let’s see what cognitive science says about it]]></title>
            <link>https://medium.com/fifty-five-data-science/are-you-a-rational-human-being-lets-see-what-cognitive-science-says-about-it-152e3b9dfe2d?source=rss-8f883f9e38f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/152e3b9dfe2d</guid>
            <category><![CDATA[decision-making]]></category>
            <category><![CDATA[cognitive-bias]]></category>
            <category><![CDATA[cognitive-science]]></category>
            <category><![CDATA[behavioral-science]]></category>
            <category><![CDATA[human-behavior]]></category>
            <dc:creator><![CDATA[Sabrine Hamroun, PhD]]></dc:creator>
            <pubDate>Tue, 16 Jul 2024 08:51:00 GMT</pubDate>
            <atom:updated>2024-07-16T09:33:41.375Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@sabrine_48550/how-does-the-context-impact-our-choices-1366200491d7?source=friends_link&amp;sk=af6965bf996fd30f45749adcd14dcfc7"><em>In our previous article</em></a><em>, we presented an overview of the human decision-making process, highlighting examples of how information representation can alter our ability to evaluate different options and, ultimately, our choices (e.g., yogurt packaging, free shipping). Here, we will explore cognitive biases, the mechanisms underlying these influences, and how to train ourselves to avoid them.</em></p><h3>Cognitive biases</h3><p>Cognitive biases are distortions from norm in our thinking and judgment. They reflect a subjective perception of the world, leading to deviations from logic (from a classical rational choice theory point of view) and erroneous decision-making in some situations.</p><p>Biases are due to several reasons: limited mental resources (in thought or memory), too much information to process, and the need to make fast decisions, leading to not processing all the possible options equivalently.</p><p>Over 200 biases have been identified, encompassing different areas from information hierarchy, mental charge, decision under pressure, etc. Below, we will examine two related biases: the decoy effect and the compromise effect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-oLe8Q4gUXfcWn-x.png" /><figcaption><a href="https://commons.wikimedia.org/w/index.php?title=File:Cognitive_bias_codex_en.svg&amp;oldid=808006377">Source:Cognitive bias codex en.svg.</a></figcaption></figure><p>‍</p><h3>Examples of cognitive biases:</h3><p>‍</p><h4>1- Decoy effect</h4><p>Picture being offered the following options at a coffee shop. Which one would you buy?‍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/0*yRrUzYM7eXT_syAx.png" /><figcaption>Mug picture from Mockup Graphics on Unsplash</figcaption></figure><p>‍‍</p><p>Now, what if you had a choice between these three options instead?‍‍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/0*kE1ShhNzn7GLnvL4.png" /></figure><p>‍</p><p>In the first picture, you might have been tempted to choose the smallest size, then the largest in the second. If so, the availability of a third option (a medium-size coffee for 6€) could have changed your mind. But how?</p><p>Perhaps you found the large size too expensive at first. Yet seeing a medium-sized coffee for 6€ might have increased the large size’s appeal: all this extra coffee for just one more euro? Who doesn’t love a good deal, after all?</p><p>The medium size was introduced precisely to make the larger and more expensive option more tempting. This suboptimal third option introduced is called a <em>decoy</em>, a common tactic in marketing.</p><h3>2- Compromise effect</h3><p>In contrast to the decoy effect, the compromise effect leads a consumer to buy the median option. Consider the same use case (buying a coffee) but with these three options:‍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/0*ueeHbbCHHY6gtnp4.png" /></figure><p>‍‍</p><p>In this case, the medium option looks more appealing, with a medium quantity of coffee for an average price. Compared to more extreme options, we don’t have to pay too much for coffee (7€) or buy what might be too little coffee.</p><p>The difference between the decoy effect (also called the attraction effect) and the compromise effect actually depends on the relative advantage between options.</p><p>The graph below explains the three-set case when the decoy effect drives choice:‍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/0*Hq_iyMBdTGbdBz9P.png" /><figcaption>Diagram of decoy effect. <a href="https://www.scirp.org/journal/paperinformation.aspx?paperid=99534">Source</a></figcaption></figure><p>In our example, attribute 1 would be quantity and attribute 2 price per unit. B is the targeted product (the largest coffee for 7€). As an initial setting, option B is more interesting than A (smallest size) in quantity but much less attractive in price as it is much more expensive. By introducing option C, less interesting than B in both attributes (price per unit and quantity), this elbow settlement switches the advantage to option B, making it look more attractive.</p><p>In the compromise use case, illustrated in the graph below, the targeted option is option B (medium quantity for 5€). Added option C (large coffee for 7€) is more advantageous in terms of quantity but less so in terms of price. Option B becomes a good compromise between two extreme options and is more likely to be chosen.‍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/0*GBVWjaelN_Tb6Ot0.png" /><figcaption>Diagram of compromise effect. <a href="https://www.scirp.org/journal/paperinformation.aspx?paperid=99534">Source</a></figcaption></figure><p>‍</p><h3>Are we all the same when it comes to cognitive biases?</h3><p>Short answer: <a href="https://neuroskoki.pl/en/cognitive-biases-in-different-culture/">no</a>.</p><p>Longer answer:</p><p>Cognitive biases drive many of our choices. Still, how they impact our choices is itself controlled by different factors. <a href="https://www.scirp.org/journal/paperinformation.aspx?paperid=99534">The study from which the diagrams above are taken</a> also shows that choosing to compromise depends on the context: time pressure, the product itself, and whether you buy it for yourself or for someone else, to name a few.</p><p>Moreover, when it comes to ambiguity, we are all different. The ambiguity effect is a well-known bias stating that human decision-makers are uncertainty-averse and would typically favor a more certain option over an uncertain one. Following this logic, one would choose a certain option over a risky one and a risky option over an ambiguous one. Yet studies have shown that younger people tend to be <a href="https://www.pnas.org/doi/abs/10.1073/pnas.1207144109">more ambiguity tolerant than older ones</a>.</p><p>Experts in their fields can be biased as well. <a href="https://www.ama-assn.org/delivering-care/ethics/4-widespread-cognitive-biases-and-how-doctors-can-overcome-them#:~:text=Here%20are%20four%20biases%20that,neglecting%20evidence%20that%20contradicts%20them.">Doctors can be subject to confirmation bias</a>: they might wrongly interpret diagnosis results based on their prior beliefs. In other words, they might focus on the information confirming their prior diagnosis and omit the rest.</p><h3>Can we be “debiased” from cognitive biases?</h3><p>Regarding cognitive biases, we are all vulnerable, even experts, especially when it comes to rapid, intuition-based choices. Knowing the heuristics and recognizing when these techniques are used is a first step to minimize bias. Reducing choice inconsistency requires further steps, such as:</p><ul><li>Watching out for the way options are represented to avoid unwillingly choosing the targeted one, in particular when seeing 3 options on offer;</li><li>Setting needs and limitations before a grocery run to avoid buying unnecessary items;</li><li>Challenging your decision-making process by weighing reasonable thinking vs. impulsivity.</li></ul><h3>Decision biases or practical decision-making?</h3><p>In this article as more broadly in literature, these heuristics have been presented as cognitive biases, in the sense that they lead to non-optimal decisions from a rational point of view. However, are these mechanisms necessarily “bad” for our ability to choose? Do they necessarily lead to irrationality?</p><p>Some posit that absolute rationality might not be applicable to human decision-making, and that rationality itself can be defined in different ways. Perhaps human rationality can be defined as picking the best option, with “best” referring not to the optimal one, but to a sufficient option considering the circumstances that accompany it. This definition of rationality is known as <em>bounded rationality</em>.</p><p>Experts have long debated the concept of rationality. As explored <a href="https://www.cairn.info/dossiers-2023-8-page-1.htm#pa18">in this article</a>, psychologist Pascal Wegner-Egger has identified six different schools of thought, from “hard” irrationalists who consider these mechanisms as total deviation from rationalism to non-rationalists who believe that rationalism is not the adequate norm for evaluating human cognition.</p><p>Click <a href="https://medium.com/@sabrine_48550/are-you-a-risk-taker-long-answer-short-it-depends-700076d9db1c">here</a> for the third part of the article!‍</p><p>Don’t hesitate to subscribe to our Tea O’Clock newsletter to keep up to date with the release of new articles and the latest market trends → <a href="https://resources.fifty-five.com/subscribe-tea-o-clock?utm_medium=email&amp;_hsmi=2&amp;_hsenc=p2ANqtz-_0I1bbYYhbYbJWNDIUPH_bR_l8jwwLTn_h8qGTew5QTqjH7ZcO172zKai40cf9P064F9aeyWnz8mqle3zMAdUZyIjcDYR2QH5U-3Gw2xjw4U84OYI&amp;utm_content=2&amp;utm_source=hs_email">the fifty-five newsletter</a></p><p><em>Originally published at </em><a href="https://www.fifty-five.com/tea-house/the-decision-making-process-an-overview---part-2-human-decision-making-a-rational-process"><em>https://www.fifty-five.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=152e3b9dfe2d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fifty-five-data-science/are-you-a-rational-human-being-lets-see-what-cognitive-science-says-about-it-152e3b9dfe2d">Are you a rational human being? Let’s see what cognitive science says about it</a> was originally published in <a href="https://medium.com/fifty-five-data-science">fifty-five | Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How good are your life choices? The science behind decision making]]></title>
            <link>https://medium.com/fifty-five-data-science/how-does-the-context-impact-our-choices-1366200491d7?source=rss-8f883f9e38f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/1366200491d7</guid>
            <category><![CDATA[neuroscience]]></category>
            <category><![CDATA[decision-making]]></category>
            <category><![CDATA[cognitive-science]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[human-behavior]]></category>
            <dc:creator><![CDATA[Sabrine Hamroun, PhD]]></dc:creator>
            <pubDate>Tue, 16 Jul 2024 08:46:53 GMT</pubDate>
            <atom:updated>2025-01-23T10:48:19.082Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AYHeuoDYhGTjsDneXkYJyg.jpeg" /><figcaption>Photo of <a href="https://unsplash.com/fr/@garri?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Vladislav Babienko</a> on <a href="https://unsplash.com/fr/photos/homme-debout-au-milieu-des-bois-KTpSVEcU0XU?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><p><em>Every day, we make countless decisions; some are crucial, others less so. But how does the brain process these decisions? Are our choices consistent over time and context? What do human decision-making and artificial intelligence programs have in common? How do marketing techniques impact our choices? And why are our actions sometimes not aligned with our principles?</em></p><p>In this series of six articles on cognitive science, we will examine the decision-making process, the economic theories that help explain it, and a few of its business and real-life applications:</p><p><strong>1- How does the context impact our choices?</strong></p><p><a href="https://medium.com/@sabrine_48550/are-you-a-rational-human-being-lets-see-what-cognitive-science-says-about-it-152e3b9dfe2d?source=friends_link&amp;sk=aa03e5cfa9d3ceb73aefedb31579749e"><strong>2- Are you a rational human being? Let’s see what cognitive science says about it</strong></a></p><p><a href="https://medium.com/@sabrine_48550/are-you-a-risk-taker-long-answer-short-it-depends-700076d9db1c?source=friends_link&amp;sk=4827f810fe6e59a10f964ce831f68500"><strong>3- Are you a risk taker? Long answer short: it depends!</strong></a></p><p><a href="https://medium.com/@sabrine_48550/nudging-the-mechanisms-of-influence-e75249a69255?source=friends_link&amp;sk=68c29987a297e32ccb08b7d7371f5462"><strong>4- Nudging: the mechanisms of influence</strong></a></p><p><a href="https://medium.com/@sabrine_48550/why-do-people-harm-the-environment-although-they-try-to-treat-it-well-8fe4a919b6a0?source=friends_link&amp;sk=43bf1cef9111d64ddd39b1ff72900039"><strong>5- Why do people “harm the environment although they try to treat it well”? Sustainability analysis from a cognitive science perspective</strong></a></p><p><a href="https://medium.com/@sabrine_48550/between-human-and-artificial-decision-making-processes-106e5da5cd19?source=friends_link&amp;sk=5c5cabab2094f35e31efca71d785d870"><strong>6- Between human and artificial decision-making processes</strong></a></p><p>Let’s get started!</p><h3>The prefrontal cortex: the bandmaster of our choices</h3><p>The brain is composed of different parts, each responsible for specific cognitive functions; amongst them, the prefrontal cortex is the bandmaster that orchestrates the choices we make, from relatively easy ones (should I continue reading this article, or am I already bored?), to more potentially life-changing decisions (should I buy a house? Should I move to another country?)</p><p>The decision-making process involves different functions: integrating different pieces of information from our environment, comparing the values of available options, anticipating a reward from a specific option, weighing the costs of choosing between different options, etc. Depending on the function, different parts of the prefrontal cortex can be activated.</p><h3>Is all processed information reliable?</h3><p>To make decisions, the brain must process and analyze information. However, it can be tricked into evaluating the received information incorrectly.</p><p>See the example below. At a glance, you think that the middle line is the largest, and the upper is the shortest, although all three have the exact same length (I personally used my pen to make sure all of the edges were aligned when I came across the picture). An optical illusion is created by positioning the arrows either inwards or outwards, altering our perception of the options and leading the viewer to think of the second line as longer than the first one.</p><p>‍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*zwPDhR-8rCgO4KXv.png" /><figcaption>Müller-Lyer illusion, <a href="https://commons.wikimedia.org/wiki/File:M%C3%BCller-Lyer_illusion.svg">source</a></figcaption></figure><p>‍</p><p>K<em>nown as the Müller-Lyer illu</em>sion, this example illustrates how the brain processes information in its specific context rather than at an absolute level. By adding context to options, each option is assigned a greater or smaller value, illusory or not.</p><p>While errors in evaluation are not limited to sensory perception, they can impact decision-making on a broader scale.</p><h3>How can context alter our choices?</h3><p>Consider the questions below:</p><ul><li>A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost?</li><li>If it takes 5 machines 5 minutes to make 5 widgets, how long would it take 100 machines to make 100 widgets?</li><li>In a lake, there is a patch of lily pads. Every day, the patch doubles in size. If it takes 48 days for the patch to cover the entire lake, how long would it take for the patch to cover half of the lake?</li></ul><p>They constitute a classic psychological test known as the Cognitive Reflection Test (CRT).</p><p>These questions share a particularity: they have intuitive wrong answers (100 minutes for question 2, for instance), and require thorough reasoning to give the correct answer (5 minutes for question 2).</p><p>In 2007, Alter &amp; al performed <a href="https://www.researchgate.net/publication/5846532_Overcoming_Intuition_Metacognitive_Difficulty_Activates_Analytic_Reasoning">an experiment</a> where they presented participants with this test. Half were issued a “fluent” version, with questions printed in a clearly readable font, whereas the other half got a “disfluent version,” printed in a smaller, less clear, italicized font. The results may come as a surprise: the “disfluent” version prompted more correct answers!</p><p>The questions were the <strong>same </strong>for everyone, fluent or disfluent versions assignment was random, and yet surprisingly, a simple font manipulation led to different results. This example illustrates how presenting information can easily alter our choices.</p><h3>System 1, System 2: dual system thinking</h3><p>Daniel Kahneman, a Nobel prize-winning economist, defines two modes of thought: System 1 and System 2.</p><p>System 1 thinking is defined as the process by which we make fast, automatic decisions in our everyday lives, mainly driven by the willingness to consume as few cognitive resources as possible (cognitive ease). System 2 thinking, on the contrary, relies on the slow, thorough decision-making process required for more complex and important decisions. In the CRT dual experiment above, the fluent version created a familiar context for participants, leading to cognitive ease and the use of System 1 thinking for many of them. Meanwhile, the disfluent version created a sort of cognitive strain with its unfamiliar, difficult-to-read font. This strain was extrapolated from reading the questions to answering them, and led more people to switch from System 1 to System 2 thinking, thereby answering the test correctly.</p><h3>Framing effect in marketing</h3><p>Brands are well aware of these mechanisms and know-how information presentation can impact our ability to evaluate different options. Therefore, they pay close attention to how their offers are presented to potential customers to ensure a higher <strong>conversion </strong>rate. For instance, <a href="https://www.walkersands.com/wp-content/uploads/2018/07/Walker-Sands_2018-Future-of-Retail-Report.pdf">studies</a> have shown that people are more likely to complete a purchase when shipping is free. Instinctively, buying a $12 t-shirt with free shipping seems more appealing than a 10€ t-shirt with 2€ shipping fees.</p><p>Likewise, dairy companies would rather mention “25% fruit” on a fruit yogurt container than “75%” yogurt, as <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=655245">people would believe the first option to be superior</a>.</p><p>Stay tuned for the second part of the article!</p><p>Don’t hesitate to subscribe to our Tea O’Clock newsletter to keep up to date with the release of new articles and the latest market trends → <a href="https://resources.fifty-five.com/subscribe-tea-o-clock?utm_medium=email&amp;_hsmi=2&amp;_hsenc=p2ANqtz-_0I1bbYYhbYbJWNDIUPH_bR_l8jwwLTn_h8qGTew5QTqjH7ZcO172zKai40cf9P064F9aeyWnz8mqle3zMAdUZyIjcDYR2QH5U-3Gw2xjw4U84OYI&amp;utm_content=2&amp;utm_source=hs_email">the fifty-five newsletter</a></p><p><em>Originally published at </em><a href="https://www.fifty-five.com/tea-house/the-decision-making-process-an-overview---part-1-contextual-impact-and-choice"><em>https://www.fifty-five.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1366200491d7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fifty-five-data-science/how-does-the-context-impact-our-choices-1366200491d7">How good are your life choices? The science behind decision making</a> was originally published in <a href="https://medium.com/fifty-five-data-science">fifty-five | Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On detecting outliers with Alibi Detect]]></title>
            <link>https://medium.com/fifty-five-data-science/on-detecting-outliers-with-alibi-detect-dc96e518908e?source=rss-8f883f9e38f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc96e518908e</guid>
            <category><![CDATA[isolation-forests]]></category>
            <category><![CDATA[mahalanobis]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[outlier-detection]]></category>
            <dc:creator><![CDATA[Sabrine Hamroun, PhD]]></dc:creator>
            <pubDate>Fri, 10 Sep 2021 13:15:47 GMT</pubDate>
            <atom:updated>2021-09-14T09:09:36.924Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*WPKzRIImzBnpnzP6" /></figure><p>Outliers are data points which are abnormally distant from the rest of the observations in a dataset. They are mainly due to data errors (measurement or experimental errors, data collection or processing errors, etc) or naturally very singular and different behavior from the normal one (e.g. very few people aged more than 100 years). Keeping them in the dataset can significantly distort your statistical analysis and modeling conclusions: they can change the mean and standard deviation values, to name a few.</p><p>Thus, it is very important to accurately detect and handle them, either by eliminating outlier input or cutting them to a predefined value.</p><p><a href="https://docs.seldon.io/projects/alibi-detect/en/latest/">Alibi Detect</a> is an open source Python library for outlier, adversarial and drift detection. In this article, we focus on the outlier detection possibilities of the library. As a matter of fact, Alibi Detect covers several outlier detection methods such as Mahalanobis distance, Isolation forest and Seq2seq. The library also handles several types of input data such as tabular, image, text or time series. According to the type of the data, different types of algorithms are required. The table below summarizes the different algorithms and corresponding data types:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*NwkgFTpCV_1HzySPpb8NLA.png" /></figure><p>In this article, we focus on two different algorithms: Isolation Forest and Mahalanobis distance for tabular data treatment. If you want to see further algorithms and examples, I recommend checking the <a href="https://docs.seldon.io/projects/alibi-detect/en/latest/">library’s documentation</a> and <a href="https://towardsdatascience.com/simplifing-image-outlier-detection-with-alibi-detect-6aea686bf7ba">this article</a> about image outlier detection using an autoencoder on Alibi Detect.</p><p><strong>Isolation Forest</strong></p><p>Isolation Forest is an unsupervised outlier detection technique based on decision trees that works on the principle of detecting and isolating the outliers instead of the “normal” observations. It is based on the fact that outliers are distinct from normal observations and thus are easily isolated.</p><p>More specifically:</p><p>1- It recursively and randomly selects one attribute</p><p>2- It splits the data according to a random value between the minimum and maximum values of this attribute</p><p>3- Each observation will have either higher or lower attribute value than the splitting random value</p><p>4- These splitting iterations are repeated until the observation is isolated from the rest of the data points. If the observation is an outlier, it will have attribute values far from the rest of the dataset, and therefore, after only a few splits, we can fully isolate it; whereas an inlier has values close to the dataset distribution, thus if we split only using a few steps, we still have several data points at the same category (higher or lower than the random split value).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/0*38Wt5GwUGzr53dE8" /></figure><p>As you can see in the example above of a 2-D dataset (with two features), the outlier is easily detectable, it only requires two random splits to be isolated compared to the normal data requiring more splits.</p><p>We define:</p><ul><li>An observation x with m features</li><li><em>h(x)</em> as the path length to find the observation x from the root of a tree. It is the number of splits done until the observation x is fully isolated</li><li><em>E(h(x))</em> as the average path length over all the trees of the Isolation Forest to isolate the observation x: it is the average estimation from all the trees of the forest of the number of splits needed to distinguish the observation x</li><li>c(m) estimates the average depth of the forest. As described in Wikipedia, “The algorithm for computing the anomaly score of a data point is based on the observation that the structure of iTrees is equivalent to that of Binary Search Trees (BST): a termination to an external node of the iTree corresponds to an unsuccessful search in the BST. As a consequence, the estimation of average h(x) for external node terminations is the same as that of the unsuccessful searches in BST” ie:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*jbU2bLeHrL_usr3PyNtemQ.png" /></figure><p>Where : <em>H(i) = ln(i) + γ</em> is the harmonic number and γ is the <a href="https://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant">Euler-Mascheroni constant</a>.</p><p>Therefore, mathematically, Isolation Forests isolate outliers using an anomaly score described as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/0*hWq-lIc413LAHYc9" /></figure><p>In other terms, the anomaly score gives an estimation of the number of iterations needed to isolate an observation x compared to the average iterations needed for the dataset of size m. We distinguish different use cases:</p><ul><li>If the observation x is an outlier, then it will need fewer iterations to be isolated compared to normal observations, consequently E(h(x)) will be low compared to c(m) and s(x,m) will be close to 1</li><li>If the observation is an inlier, s(x,m) is close to 0.5</li></ul><p>The Alibi Detect Isolation Forest algorithm modifies the anomaly score to make it easier to interpret: scores close to 0 are related to inliers and close to 0.5 related to outliers.</p><p><strong>Mahalanobis Distance</strong></p><p>Mahalanobis distance is a measure of the distance between an observation and a distribution. More specifically, it gives a measure of how many standard deviations an observation is far from the center of a distribution.</p><p>Consider a set of observations of size N (N columns), a mean value:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/175/1*xMV0m8rlZDEjuLVjR04hjQ.png" /></figure><p>and covariance matrix C. The Mahalanobis distance of an observation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/176/1*RGknvSPSlESjPbvxoNG0Gw.png" /></figure><p>to the distribution is :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*MBXN5SomAK00X5772Bg80w.png" /></figure><p>The advantage of this general formulation compared to the Euclidean distance for which C is the identity matrix, is that it takes into account the distribution of the data using the covariance matrix, as shown in the formula above. The covariance matrix informs how variables evolve together, therefore using it in the distance gives more accurate detection of the outliers. Please see the figure below for a concrete example: the data is 2-D dimensional (it has two features). From the Euclidean point of view, observation A is closer to the center of the data compared to observation B which is relatively far from the center. Thus, using this method, we would classify A as inlier and B as outlier. Nonetheless, we see that the data follows a distribution that presents a correlation between the two features x and y. Thereby, B is generated from the same distribution as the data and is considered an inlier while A does not belong to this distribution and is thus considered an outlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/0*sWNHFQVeBMuGdgny" /></figure><p>In the Alibi Detect library, the algorithm calculates an outlier score, which is the distance from the center of the distribution. Besides, the user defines an outlier threshold, thus, if the score is higher than the threshold, the observation is flagged as an outlier. Note that the method is convenient for low to medium dimensional tabular data.</p><h3><strong>Practice makes perfect: tabular data outlier detection</strong></h3><p>In this section, we’re going to use both algorithms explained above and implemented on Alibi Detect to detect outlier data points in a tabular dataset.</p><p>For this, we create a dataset of 10000 observations, of 2 features “x” and “y” having 2% of outliers data created using a random noise from the original dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*_btTM4ROn10-DkD_Y9uROA.png" /></figure><p><strong>1- Isolation Forest outliers detection:</strong></p><p>We split the dataset into train set and test set, and we train the model on the normal data only, as the purpose is to learn the normal behavior and distinguish it from an outlier behavior.</p><pre>import pandas as pd<br>import numpy as np<br>from sklearn.model_selection import train_test_split</pre><pre># We split data into train test datasets<br>X_train, X_test, y_train, y_test = train_test_split(<br>                                   data[[&quot;x&quot;, &quot;y&quot;]], <br>                                   pd.DataFrame(data[&quot;is_outlier&quot;]),<br>                                   test_size=0.2,<br>                                   random_state=42)</pre><pre># We standardize the data based on the NORMAL points only: the #outliers detection algorithm needs to learn the normal distribution<br># and based on it we detect the abnormal (outlier) values</pre><pre>X_train_normal = X_train.loc[y_train[y_train.is_outlier==0].index]</pre><p>In practice there are two possibilities to define an observation as an outlier:(1) either we fix a threshold score above which an observation is said to be an outlier, or (2) the top <em>epsilon</em> % of the observation are said to be outliers. In both cases, the threshold or the percentage has to be chosen by cross validation. It could also be interesting to perform some exploratory analysis to have a better idea of the values to test.</p><p>In this test, we knew the share of outliers from our dataset (2%), therefore we chose the first solution and tested different percentage scores. The model will flag the <em>epsilon</em>% of the data with the highest outlier scores as outliers.</p><pre>from  alibi_detect.od import IForest<br>from sklearn.metrics import f1_score, precision_score, recall_score</pre><pre>results = []<br>for epsilon in [20., 5., 2., 1.]:</pre><pre>    # Create Isolation Forest model<br>    od = IForest(<br>        max_samples = max_sample<br>    )</pre><pre>    # Fit the model<br>    od.fit(<br>        X_train_normal<br>    )</pre><pre>    od.infer_threshold(<br>        X_train,<br>        threshold_perc = 100 - epsilon # percentage of normal data<br>    )</pre><pre>    # Detect outliers<br>    preds = od.predict(<br>        X_test,<br>        return_instance_score=True<br>    )</pre><pre>    # Check performance<br>    y_pred = preds[&quot;data&quot;][&quot;is_outlier&quot;]<br>    f1 = f1_score(y_test.is_outlier, y_pred)<br>    precision = precision_score(y_test.is_outlier, y_pred)<br>    recall = recall_score(list(y_test.is_outlier), list(y_pred))<br>    results.append([100 - epsilon, f1, precision, recall])<br>        <br>results = pd.DataFrame(results,<br>                       columns = [&quot;percentage_inliers&quot;,<br>                       &quot;f1_score&quot;, &quot;precision&quot;, &quot;recall&quot;])</pre><p><strong>Mahalanobis distance outliers detection:</strong></p><p>For this part, we evaluate the outliers’ detection on the same data used in the Isolation Forest. Unlike the Isolation Forest, the documentation specified that we don’t need to fit the model to the data unless we have categorical data, which is not the case. We therefore predict directly the outliers in our specific dataset using the distance. We mainly precise a threshold distance from the center of the distribution above which the data point is marked as an outlier. For this, we try different threshold values:</p><pre>from  alibi_detect.od import Mahalanobis</pre><pre>results = []<br>for th in [1, 5, 10.0, 15.0, 20.0, 30, 35 ] : </pre><pre>    od = Mahalanobis(<br>        threshold=th<br>    )</pre><pre>    preds = od.predict(<br>        np.array(X_test),<br>        return_instance_score = True<br>    )<br>    y_pred = preds[&quot;data&quot;][&quot;is_outlier&quot;]</pre><pre>    f1 = f1_score(y_test.is_outlier, y_pred)<br>    precision = precision_score(y_test.is_outlier, y_pred)<br>    recall = recall_score(y_test.is_outlier, y_pred)<br>    resultxs.append([th, f1, precision, recall])</pre><pre>results = pd.DataFrame(results,<br>                       columns = [&quot;threshold&quot;, &quot;f1_score&quot;,<br>                       &quot;precision&quot;, &quot;recall&quot;])</pre><p><strong>Results analysis:</strong></p><p>The modeling results in the graph below show that:</p><ul><li>For the Isolation forest model, choosing inliers percentage close to the real threshold considerably improves the ability to detect the outliers (with the higher performance being for the real world share of outliers)</li><li>For the Mahalanobis distance method, if the threshold is very low, most of the normal data points will be detected as outliers, leading to bad performances: in fact, as the distance is low, most of the data points will be detected as outliers, and not only the real outliers (explained in the graph below by a low precision and a high recall). On the other hand, if the threshold is high, only far outliers will be detected correctly whereas closer outliers will be detected as normal data, leading also to a bad performance (explained by high precision and very bad recall in our evaluation process)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*QYR8cHSWb-BXRzOHU5_XRw.png" /></figure><p><strong>Conclusion</strong></p><p>In this article, we presented a practical python library for anomalies detection, Alibi Detect. We deep dived into two main methods: Mahalanobis distance and Isolation Forest. Although it is quite straightforward and easy to manipulate the different algorithms, the library adds hyperparameters to the models (outliers share, outliers score threshold). Therefore, it is important to explore the dataset (for example by plotting the data and using statistical analysis) in order to have an estimation of the inliers and outliers’ distribution (especially that in real world data, data points are not flagged as outliers or inliers as it is the case in our testing dataset).</p><p><strong>References:</strong></p><p>1- <a href="https://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/icdm08b.pdf">https://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/icdm08b.pdf</a></p><p>2- <a href="https://en.wikipedia.org/wiki/Mahalanobis_distance">https://en.wikipedia.org/wiki/Mahalanobis_distance</a></p><p>3- <a href="https://en.wikipedia.org/wiki/Outlier">https://en.wikipedia.org/wiki/Outlier</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc96e518908e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fifty-five-data-science/on-detecting-outliers-with-alibi-detect-dc96e518908e">On detecting outliers with Alibi Detect</a> was originally published in <a href="https://medium.com/fifty-five-data-science">fifty-five | Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>