<?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 Getting Better on Medium]]></title>
        <description><![CDATA[Stories by Getting Better on Medium]]></description>
        <link>https://medium.com/@amolgupta21k?source=rss-815704690c99------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Getting Better on Medium</title>
            <link>https://medium.com/@amolgupta21k?source=rss-815704690c99------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 19:56:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amolgupta21k/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[Bayes Theorem — Montey Hall]]></title>
            <link>https://medium.com/@amolgupta21k/bayes-theorem-montey-hall-6762b36b5d43?source=rss-815704690c99------2</link>
            <guid isPermaLink="false">https://medium.com/p/6762b36b5d43</guid>
            <category><![CDATA[monty-hall-problem]]></category>
            <category><![CDATA[bayesian-statistics]]></category>
            <category><![CDATA[bayes-theorem]]></category>
            <dc:creator><![CDATA[Getting Better]]></dc:creator>
            <pubDate>Sat, 06 Jul 2024 17:42:46 GMT</pubDate>
            <atom:updated>2025-01-31T12:55:29.556Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bayes Theorem — Montey Hall</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*suYZRuqwkPYtbxP6" /><figcaption>Photo by <a href="https://unsplash.com/@silvanarnet?utm_source=medium&amp;utm_medium=referral">Silvan Arnet</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Let me illustrate Bayes theorem with some very interesting problem: <em>In 1960’s there was a TV show where Monty (anchor of the show), displayed 3 doors. Behind one of the door, is a Car (Prize) and in others there are Goats. Monty asks you to select a door and then amongst the other 2 left, he opens 1 (that would have a Goat). Then Monty asks you if you would like to switch to another one or keep your original choice. <br>The question is would you be better-off if you switch or stick to your original?<br>The correct answer is: You would be better-off switching to another door. Let’s examine how you came up with this answer through Bayes Theorem.</em></p><p>Let’s understand the situation here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*Ylca7Dnu1Wijb_dWZ87EjA.png" /><figcaption>Bayes Theorem through Montey Hall</figcaption></figure><p>You select Door 1<br>and Montey opens Door 3, behind which is a Goat<br>and Montey asks you if you would like to switch or stick your original door</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*_LibIVZ60Ds74KwRputbvA.png" /></figure><p>Given Monty opens D3, you want to know what is the probability that car is behind D-2 or D-3 because that door you will open. Mathematically,<br>If P(Car is behind D-2 | Monty opens D-3) is more than P(Car is behind D-1 | Monty opens D 3) then you switch to D-2.</p><p><em>(Here P stands for probability, “|” stands for “given” and is called “conditional probability”. These are called “posterior probability” i.e. given some event already happened i.e. Monty opening D3 what is the probability of car behind D1 or D2 or D3).</em></p><p>However, what you have is P(Monty opens D3 | Car is behind D1), P(Monty opens D3 | Car is behind D2), P(Monty opens D3 | Car is behind D2). These are again conditional probability; however, they have a special name called “likelihood” which is P (event | hypothesis).</p><p>Bayes theorem comes to rescue. Bayes theorem is special because it offers us a way to calculate the reverse of conditional probability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*ihScrHJkdi2NXy8TPDGWtA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yOv_ewjJxrp8rkuQy9FjiQ.png" /><figcaption>Bayes Solution to Monty Hall Classical Problem</figcaption></figure><p>Since the posterior probability of D2 is higher. Hence, you are better switching your choice to D2 than sticking with D1.</p><p>This article is based on learnings from Think Bayes 2 (Allen Downey).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6762b36b5d43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hypothesis Testing (Permutation, Statistical testing — Simplified)]]></title>
            <link>https://medium.com/@amolgupta21k/hypothesis-testing-permutation-statistical-testing-simplified-7eea0111a4aa?source=rss-815704690c99------2</link>
            <guid isPermaLink="false">https://medium.com/p/7eea0111a4aa</guid>
            <dc:creator><![CDATA[Getting Better]]></dc:creator>
            <pubDate>Mon, 19 Feb 2024 20:23:01 GMT</pubDate>
            <atom:updated>2024-02-20T04:21:35.006Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hypothesis Testing (Permutation, Statistical testing — Simplified)</h3><p>In the field of statistics, Hypothesis testing is one topic more important than anything else. This post will ensure that you understand from an intuitive and mathematical sense both. We take a toy example and will try to expand to common situations later on.</p><blockquote>The use of hypothesis testing resolves situations like these:<br><strong>Me:</strong> I changed the color of the button on the site, and I see conversion go up by 3%, Lets rollout the changes.<br><strong>My inner voice:</strong> maybe this is just random chance! What if I rollout and conversion dips or may be it remains same !<br>This kind of conflict between Me and My inner voice can be resolved by way of hypothesis testing.</blockquote><p>To understand better, let&#39;s take the example of coin toss. I take a coin and flips coin 100 times and I get 65 times Heads and and 35 Tails. If the coin was unbiased, I should have got equal heads and tails.</p><p>With this, lets introduce some terminology (important):<br>1. <em>The </em><strong><em>test statistic </em></strong><em>is difference between #H, #T. In this case |65–35| = |30|</em></p><p><em>2. Our Ha: will be that: </em><strong><em>Coin is biased </em></strong><em>given my observation.</em></p><p><em>3. Our Ho (Null Hypothesis) is that: </em><strong><em>Coin is fair </em></strong><em>and we have to calculate p-value.</em></p><p><em>4. </em><strong><em>p-value is the probability that you would obtain the effect observed</em></strong><em> (Difference of 30 #H — #T) </em><strong><em>or larger </em></strong><em>i.e 30 or larger, if the null hypothesis is true. The outcome could be:</em></p><p><em>- </em><strong><em>Scenario 1: The probability(p-value) of something like my observation is so low!! </em></strong><em>It means the null hypothesis must not be real. I should reject the null hypothesis.</em></p><p><em>- </em><strong><em>Scenario 2: If the probability (p-value) of something like my observation is quite likely</em></strong><em> given the null hypothesis. Thus: we have no reason to reject Ho. The observation I have made is quite common!</em></p><p><em>(The above points are very fundamental and critical to the rest of the article)</em></p><p>Now, that we are clear about the fundamentals, let&#39;s see how we can calculate these probabilities or <em>p-values.</em></p><p><strong>Part A: The first approach is through simulation: Here we try to generate the distribution of the test statistic by simulation.</strong></p><pre>class CoinToss:<br><br>    def __init__(self,numTrials,numIterations,observation):<br>        self.numTrials = numTrials<br>        self.numIterations=numIterations<br>        self.observation=observation<br>        self.testStats=None<br>        self.pValue=None<br>        self.sorted_pmf=None<br><br>    def doTrials(self):<br>        sample = [random.choice(&#39;HT&#39;) for _ in range(self.numTrials)]<br>        countHeads = len([face for face in sample if face==&#39;H&#39;])<br>        countTails = self.numTrials - countHeads<br><br>        return countHeads,countTails<br><br>    def simulate(self):<br>        self.testStats=[]<br>        for _ in range(self.numIterations):<br>            countHeads,countTails = self.doTrials()<br>            self.testStats.append(abs(countHeads-countTails))<br><br>        higher=len([val for val in self.testStats if val &gt;= self.observation])<br>        self.pValue=higher/len(self.testStats)<br><br>    def calculate_pmf(self):<br>        if self.testStats is None:<br>            print(&quot;Please run simulate() first.&quot;)<br>            return<br><br>        frequencies = Counter(self.testStats)<br>        total_trials = len(self.testStats)<br>        pmf = {value: freq / total_trials for value, freq in frequencies.items()}<br>        self.sorted_pmf = dict(sorted(pmf.items(), key=lambda item: item[1]))  </pre><pre>coinToss=CoinToss(100,10000,30)<br>coinToss.simulate()<br>print(f&quot;p-value:{coinToss.pValue}&quot;)</pre><p>we get p-value of 0.0026 or 0.26% which means there is too less a chance of getting 30 or more Test statistics (i.e. Heads minus Tails). This means that we should reject null hypothesis.</p><p>In part A, we simulated the null hypothesis. The resulted PMF will be:</p><pre>coinToss.calculate_pmf()<br><br>plt.bar(coinToss.sorted_pmf.keys(), coinToss.sorted_pmf.values())<br>plt.xlabel(&#39;Difference between Heads and Tails&#39;)<br>plt.ylabel(&#39;Probability&#39;)<br>plt.title(&#39;Probability Mass Function (PMF)&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*uFwHHj0P7mBYnqRsloatXg.png" /><figcaption>PMF for difference between Heads and Tails</figcaption></figure><p>While the above PMF got generated through simulation, we can also generate the distribution of test statistics mathematically and then use the same approach to calculate the p-value. For e.g. <a href="https://mathworld.wolfram.com/Heads-Minus-TailsDistribution.html">this page</a> shows the PDF derived mathematically and is nearly identical to what we got through simulation.</p><p>In my view, the simulation approach is much simpler to grasp. Simulation-based approach (permutation testing) is often the go-to approach in practice when the sample size is not a problem.</p><p>I have deliberately not brought in the concept of critical value and its interpretation to not confuse the audience. Would urge you to read the article again if there is any confusion as these concepts are not straightforward. Please feel free to comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7eea0111a4aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Becoming In-distractable]]></title>
            <link>https://medium.com/@amolgupta21k/becoming-in-distractable-93639b6b4d7f?source=rss-815704690c99------2</link>
            <guid isPermaLink="false">https://medium.com/p/93639b6b4d7f</guid>
            <category><![CDATA[attention]]></category>
            <category><![CDATA[deep-work]]></category>
            <category><![CDATA[improvement]]></category>
            <dc:creator><![CDATA[Getting Better]]></dc:creator>
            <pubDate>Fri, 05 Aug 2022 17:49:27 GMT</pubDate>
            <atom:updated>2022-08-05T17:49:27.231Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Becoming In-distractable</strong></p><p>The need of ‘deepwork’ was never so much, as now. Much of the mundane jobs are / or will be automated, creating lots of opportunities for Knowledge work. In this article, I am going to summarize <strong>Actionable Insights</strong> that most resonated with me from the books — Hyperfocus: by Chris Bailey, Indistractable: by Nir Eyal, Deep Work: by Cal Newport &amp; Ted talk by Dandapani.</p><p>I will be happy, if by reading till the end, you have an action plan ready for yourself to become a deep work-er. Carve out 2–4 hours of deep (un-distracted) work in an area that you feel will make a huge long-term difference in your career/life.</p><ol><li><strong><em>Accept</em></strong> that it is human nature to look out for distractions in form of: dangers/threats (Early man’s survival depended on looking out for threats) + lookout for new ideas (novelty bias) + escape from painful experiences like feeling bored + look out for pleasurable activities that do not require effort. Acceptance is the beginning well done, now you can evolve!</li><li><strong><em>The ability to focus</em></strong> is not fixed, though some people might have a natural ability (a higher baseline). It is a <strong><em>skill</em> </strong>that needs to be nurtured through <strong><em>technique + practice</em></strong><em>.</em></li><li><strong><em>Meta-awareness</em></strong>: Becoming aware of what you’re thinking about is one of the best practices for managing attention. The more you notice what’s occupying your attentional space, the faster you can get back on track when your mind begins to wander. <strong><em>Meditation</em></strong> and <a href="https://www.mindful.org/meditation/mindfulness-getting-started/"><strong><em>mindfulness </em></strong></a>practices achieve the same thing through slightly different approaches.</li><li>When getting into deep work, <strong><em>remove distractions in advance</em></strong> like the “do not disturb” setting on your phone. This is a nice <a href="https://chrome.google.com/webstore/detail/undistracted-hide-faceboo/pjjgklgkfeoeiebjogplpnibpfnffkng">chrome add-in</a>. Noise proofing with headphones like <a href="https://www.amazon.in/3M-1426-Position-Earmuff-Reduction/dp/B00KTD4HMU/ref=sr_1_1?crid=2C6Y7U7CP2075&amp;keywords=3m+noise+cancelling+headphone&amp;qid=1658424230&amp;sprefix=3m+noise%2Caps%2C215&amp;sr=8-1">this</a>. And the music that a) sounds familiar b) relatively simple like <a href="https://open.spotify.com/playlist/1cfmSjhCWvLeciBDhCLkKU?si=87fbd5947b424f98">this</a> or <a href="https://open.spotify.com/playlist/6iXy73MQao6ensvMYTemBv?si=a2060aadfa314a1f">this</a></li><li>Time flows into the space available. <strong><em>Set a deadline/objective before</em></strong> your deep work session.</li><li>The <strong><em>first 40 seconds </em></strong>are the key. Consciously ensure that you are not distracted in the first 40 seconds. Scientifically studies prove that the resistance we feel towards complex and productive tasks isn’t evenly distributed across working time — its usually concentrated at the beginning of when we start these tasks. A technique particularly technique is the “ten-minute rule.” If you find yourself wanting to check your phone as a pacification device when you can’t think of anything better to do, tell yourself that it’s fine to give in, but not right now.</li><li><strong><em>Do not give up</em></strong> to the other pressing priorities. Keep a pad with you where you write the pending tasks that come in your mind so that the mind is relaxed/assured.</li><li><strong><em>Self-compassion</em></strong>: A big problem is negative self-talk. Most people label themselves as “I can not focus” , however, what they need is self-compassion. “This is what it’s like to get better at something” and “You’re on your way” are healthier ways to handle self-doubt.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93639b6b4d7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>