<?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 Soumabrata Sarkar on Medium]]></title>
        <description><![CDATA[Stories by Soumabrata Sarkar on Medium]]></description>
        <link>https://medium.com/@soumabrata.skr?source=rss-d88b78172a17------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YAbKQPn6iS5uyTtZTNs3qw.jpeg</url>
            <title>Stories by Soumabrata Sarkar on Medium</title>
            <link>https://medium.com/@soumabrata.skr?source=rss-d88b78172a17------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 11:38:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@soumabrata.skr/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[How Unlikely Is Unlikely Enough? The P-Value and the Art of Calling Someone’s Bluff]]></title>
            <link>https://medium.com/@soumabrata.skr/how-unlikely-is-unlikely-enough-the-p-value-and-the-art-of-calling-someones-bluff-2ae2935202bf?source=rss-d88b78172a17------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ae2935202bf</guid>
            <category><![CDATA[hypothesis-testing]]></category>
            <category><![CDATA[ab-testing]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Soumabrata Sarkar]]></dc:creator>
            <pubDate>Sun, 01 Nov 2026 17:58:58 GMT</pubDate>
            <atom:updated>2026-11-01T17:58:58.509Z</atom:updated>
            <content:encoded><![CDATA[<p>I was travelling for a few days and taking care of a few things, so my statistics side quest got paused. But I’m back now, and I didn’t come back empty-handed. I came back with answers, a few new questions, and one fact I can’t stop thinking about.</p><p>The answers didn’t come easy. I cross-examined our future robot overlords like a lawyer with too much free time: p-values, one-tailed vs. two-tailed tests, alpha, and a few other things. Every answer got the same reply from me: “But why?” I’m fairly sure the next T-800 will be sent back in time not to stop John Connor, but to stop me from asking one more question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*LoFArUMmFlhdlpPfoKJ67Q.gif" /></figure><p>Last time, my research took me down a rabbit hole. This time, it took me to the rabbit’s basement. Articles, videos, research papers, and when those ran out, research papers about research papers. Yes, that’s a thing, and yes, I had fun reading them.</p><p>And that’s where I found the fact I can’t stop thinking about. In 2015, a team of about 270 researchers picked 100 studies published in top psychology journals and tried to repeat them, following the original methods as closely as they could. In the original papers, <strong>97%</strong> had reported a “significant” result (in plain words: the result passed the standard bar for “this probably isn’t just luck”, so the effect was reported as real). When repeated, only <strong>36%</strong> did. And even when the effect did show up again, it was, on average, only about <strong>half as big</strong> as first claimed. Before you blame the psychologists: in 2012, scientists at the biotech company <strong>Amgen tried to confirm 53 landmark cancer research studies and managed just 6</strong>.</p><p>So how does a study get to call its result “significant” in the first place? Mostly, it comes down to one number, called the <strong>p-value</strong> (short for “probability value”). Don’t worry about what it means yet; that’s what this whole article is for. For now, just know this: the original studies got a p-value good enough to say “it works,” and when other researchers repeated the same experiments, many of them simply didn’t get that result again.</p><p>Now you might be thinking: didn’t anyone check these studies before they were published? They did. Other experts reviewed them, and nothing obviously wrong stood out. And yet, when the experiments were repeated, the results fell apart.</p><p>How is that even possible? By the end of this article, you’ll know exactly how.</p><h3>Weighing the Evidence: Meet the P-Value</h3><p>In the last article, we met the null hypothesis and the alternative hypothesis, and we learned that a trial can end in only two ways: we either <strong>reject</strong> the null hypothesis or <strong>fail to reject</strong> it.</p><p>But how do we decide which one? With evidence, of course. The trouble is, evidence doesn’t come with a label saying “strong” or “weak.” We need a way to <strong>measure</strong> it.</p><p>That’s the p-value’s job. It measures <strong>how surprising the evidence would be if nothing were going on.</strong> (How surprising is surprising enough to reject the null? That’s a separate decision, and we’ll get to it right after.)</p><p>Remember the one thing I asked you to remember from the last article?</p><blockquote><strong>Statistics starts by assuming nothing happened, and only changes its mind when the evidence makes “it was just luck” hard to believe.</strong></blockquote><p>The null hypothesis imagines a <strong>boring world</strong>, where nothing has changed and nothing interesting is going on. When we run a real experiment and get a result, we compare it with what the boring world would produce. If our result looks perfectly normal for the boring world, luck is a fine explanation. If it looks really out of place, maybe something more than luck is going on.</p><h4>Meet the Suspect: A “Lucky” Coin</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JlwR5GAthbh294I0p-ZiGg.png" /><figcaption>Jai (Amitabh Bachchan) rejecting the null hypothesis since 1975</figcaption></figure><p>Remember Jai’s coin in <em>Sholay</em>? Every big decision in the film came down to a toss, and the coin always seemed to land the way Jai wanted. Then came the reveal (spoiler alert, for a 1975 film): it had <strong>heads on both sides</strong>. So much for luck.</p><p>Now, your friend has a coin too. He calls it his “lucky coin” and swears it’s perfectly normal, nothing Jai-like about it. To prove it, he tosses it 100 times.</p><p>If the coin really is fair (the boring world), you’d expect <strong>about 50 heads</strong>. Well, not exactly 50 every time, but somewhere around there.</p><p>He gets <strong>70 heads</strong>.</p><p>He grins: <em>“See? Just luck.”</em> That’s the null hypothesis talking: the coin is fair, and 70 heads is just a lucky streak.</p><p>It’s not 100 heads, so it’s clearly not a two-headed Jai special. But it’s not exactly 50 either. Maybe the coin is just slightly tilted toward heads. Or maybe your friend really did just get lucky.</p><p>So we have a gap: the boring world expected about <strong>50</strong>, and he got <strong>70</strong>. That’s a gap of <strong>20 heads</strong>. Now it’s your job to call his bluff, or admit he might be telling the truth. The question is: <strong>can luck reasonably explain a gap that big?</strong></p><h4>Enter the P-Value</h4><p>Here’s the definition of a p-value you’ll find in most textbooks:</p><blockquote><strong><em>“The p-value is the probability of obtaining a result at least as extreme as the observed result, assuming the null hypothesis is true.”</em></strong></blockquote><p>When I was new to statistics, this definition drove me up the wall. <em>“At least as extreme”?</em> Extreme how? Extreme compared to what? I did figure it out eventually, but explaining a simple idea in words this complicated really used to get on my nerves.</p><p>Turns out I’m in very good company. In 2015, science journalist <strong>Christie Aschwanden</strong> went to METRICS, a gathering of researchers who literally study how science is done, and asked them to explain p-values simply. They could all recite the textbook definition. But in her words, “almost no one could translate that into something easy to understand.”</p><p>It’s not a one-off, either. Stanford researcher <strong>Steven Goodman</strong> wrote an entire paper on p-value misunderstandings, cheerfully titled <em>“A Dirty Dozen: Twelve P-Value Misconceptions.”</em> And in 2016, the <strong>American Statistical Association</strong> published an official statement explaining what a p-value does and doesn’t mean, because the misunderstandings had become a real problem in science.</p><p>So if the definition made your head spin, relax. You’re in the same boat as a room full of scientists.</p><p>Let’s break it down, starting with the trickiest part: <strong>“at least as extreme.”</strong></p><p>In statistics, “extreme” doesn’t mean “at the very end of the scale.” It means <strong>far from what the boring world expects</strong>. A fair coin should give about 50 heads. Your friend got 70, a gap of 20. That gap is what makes his result “extreme.”</p><p>So “at least as extreme” simply means a gap of 20 or more. With that, we can rewrite the textbook definition in plain English: <strong>If nothing is going on, the p-value is the chance of seeing a gap between what you expected and what you got that’s as big as yours, or bigger.</strong></p><p>For your friend’s coin, that boils down to one question: <em>if the coin really is fair, what’s the chance of getting 70 heads or more?</em></p><p>(We’ll talk about the other side, 30 heads or fewer, a little later.)</p><h4>Wait, Why Count Results That Never Happened?</h4><p>Here’s the part that bugged me the most when I first learned this. Your friend got <strong>exactly 70 heads</strong>. Not 71. Not 85. So why does the p-value add up the chances of results that never even happened? It feels a bit like getting a speeding ticket for 70 km/h, plus every speed you <em>could</em> have been doing.</p><p>There are two good reasons.</p><p><strong>Reason 1: “Exactly 70” can’t tell us if 70 is surprising.</strong></p><p>Picture 100,000 people, each tossing a perfectly fair coin 100 times. Most of them will land somewhere around 50 heads, and a few will drift further away. But how many land on any one <em>exact</em> number? We can actually work this out, and this is where those permutations and combinations from school finally pay rent:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lAdYIhJCuDpJn_-l-cedcA.png" /></figure><p>Look at the first row. Even <strong>exactly 50 heads</strong>, the most boring, most expected result a fair coin can give, happens only about 8% of the time. That’s because there are 101 possible results (0 to 100 heads), and the chances get spread across all of them. So <em>every</em> exact result looks fairly unlikely. If we judged “suspicious” by the chance of an exact number, we’d end up side-eyeing even perfectly fair coins. The problem isn’t that exact chances are low. It’s that they’re low for <em>everything</em>, so they can’t tell a weird result from a normal one.</p><p><strong>Reason 2: Suspicion is a rule, not a single number.</strong></p><p>When you see 70 heads and think “this coin is rigged,” you’re not really reacting to the number 70. You’re quietly using a rule: <em>anything 70 or higher is fishy.</em> After all, if 70 makes you suspicious, 85 would have you calling the cops.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*27hCogFJgb8vU5bUWRWQ6g.gif" /><figcaption>Cops: “What’s the emergency?” Me: “85 heads out of 100.”</figcaption></figure><p>Now go back to our 100,000 honest people with perfectly fair coins. Your rule doesn’t just catch the ~2 who got exactly 70. It also catches everyone who got 71, 72, all the way up to 100. Add them up, and about <strong>4 innocent people</strong> get accused.</p><p>That’s the number we actually care about: <em>how often would this rule blame a fair coin?</em> About 4 times in 100,000, or 0.0039%. And that, ladies, gentlemen, and distinguished guests of all genders, is the p-value for your friend’s coin.</p><p>So the p-value isn’t adding up results that never happened just for fun. It’s counting every honest coin your suspicion would have caught.</p><h3>Where to Draw the Line: Meet Alpha</h3><p>So the p-value has done its job. It told us that if the coin were fair, it would land 70 or more heads only about 4 times in 100,000. That’s very unlikely. But “very unlikely” is a description, not a verdict. How unlikely is unlikely enough to call the bluff?</p><p>You’ve seen this problem before, probably in an exam hall. Someone asks to go to the washroom once during a three-hour paper? Nobody blinks. Twice? Long exam, fair enough. But by the fourth trip, the invigilator is quietly following them down the corridor. Somewhere in their head there’s a line: <em>this many trips is normal, more than this is suspicious.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*SK2Ls-B8SBpC-18HNsur8g.jpeg" /></figure><p>And every now and then, that line catches someone whose only crime is a weak bladder.</p><p>Statistics needs exactly this kind of line. The p-value can’t draw it. It’s the dealer, not the player: it shows you the cards, but it doesn’t tell you when to call. That decision is yours, and you have to make it <strong>before</strong> the cards are dealt (more on why in a moment). That threshold is called <strong>alpha (α)</strong>.</p><h4>The deal behind the line</h4><p>Here’s the thing about that invigilator. Their goal is to catch cheaters, but cheaters don’t wear name tags, and nobody knows exactly how a cheater behaves. Some sneak out once, some four times. What the invigilator <em>does</em> know is what normal looks like, because they’ve watched thousands of honest students. So they set the line using the only thing they can be sure about: <em>“Honest students rarely go this many times. If I draw the line here, I’ll occasionally side-eye an innocent weak bladder, and I’m OK with that price.”</em></p><p>Why accept any price at all? Because the only way to <em>never</em> wrongly accuse an honest student is to never accuse anyone, and then every cheater walks out with full marks. Any line that can catch cheats will occasionally catch an innocent. The trick is to make that risk <strong>small, known, and chosen in advance</strong>, instead of a mystery.</p><p>Our coin works exactly the same way. We have no idea how a rigged coin behaves: it could be slightly tilted, or it could be Jai’s two-headed special. But we know <em>exactly</em> how a fair coin behaves. Remember our 100,000 people tossing fair coins? Their results pile up into a hill: tall around 50 heads, thinning out as you move away in either direction. That hill is the boring world, everything a fair coin does and how often it does it.</p><p>So we draw our line on that hill. We pick a small slice at the far ends, results a fair coin is highly unlikely to give, and accept the price upfront: some honest coins will land there anyway, purely by luck. If the slice covers 5% of the hill, then about 5% of fair coins land in it. Out of our 100,000 honest people, about 5,000 would get called out by mistake.</p><p>The size of that slice is alpha. The textbook definition:</p><blockquote><strong><em>“Alpha (α) is the probability of rejecting the null hypothesis when it is actually true.”</em></strong></blockquote><p>In plain English: <strong>alpha is the price you agree to pay, before the experiment, for drawing your line: the chance of calling the bluff on an honest coin.</strong> That’s why it’s often called the<strong> <em>false alarm rate</em></strong>.</p><h4>What the line actually does</h4><p>If the result lands in the slice, we call the bluff. In statistics-speak, we <strong>reject the null hypothesis</strong> and go with the alternative: this coin isn’t fair. We haven’t proven it beyond all doubt (we just agreed luck sometimes lands honest coins there), but “it’s just a fair coin” has become too hard to believe.</p><p>If the result lands anywhere else, we don’t call the bluff. But that doesn’t mean we’ve declared the coin fair; we just don’t have enough evidence to say it isn’t.</p><h4>Why the line has to be drawn before the toss</h4><p>Imagine a teacher who decides the pass mark <em>after</em> checking the answer sheets. Their favourite student scored 38, so the pass mark is suddenly 35. Even if the teacher swears it was a fair decision, would you trust it? The moment they saw the marks, their choice stopped being neutral.</p><p>Same with our coin. If you see the result first and <em>then</em> decide where the line goes, the result can influence the line, even if you don’t mean it to. Want to call the bluff? You’ll be tempted to draw the line just inside the result. Want to let your friend off? You’ll push it just outside. Either way, the line isn’t judging the evidence anymore; the evidence is picking the line.</p><p>Drawing it in advance keeps you honest. You commit to “this is how surprising a result has to be” <em>before</em> you know what’s coming, so nobody, including you, can accuse you of bending the rules to get the answer you wanted.</p><p>Statisticians have a name for this family of tricks, <em>p-hacking</em>, and we’ll come back to it later.</p><h4>Why 5%? The Most Popular Line in Science</h4><p>You might have noticed I used 5% as the slice size in the example above. That wasn’t random. I picked it on purpose, because 5% is the number you’ll find in almost every textbook, research paper and A/B testing tool. It’s the default choice for alpha: we accept calling the bluff on an honest coin about 1 in 20 times.</p><p>So why 5%? Was it derived from some deep mathematical truth? Not really. The statistician Ronald Fisher called it a “convenient” cut-off back in 1925, and the world went “yeah, sounds good” for the next hundred years. George Cobb summed up the logic perfectly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aEmr-haiCxUZ0P-OSxE7Rg.png" /></figure><p>So yes, one of the most important numbers in science is basically a family recipe: nobody remembers why, but everyone follows it.</p><p>That doesn’t make 5% wrong, just not sacred. The right line really depends on what a mistake would cost you: wrongly accusing someone of a crime deserves a much stricter line than wrongly crowning a new website button. 5% is just the default people reach for when they haven’t thought about it.</p><h3>Watching Both Ends: One-Tailed vs. Two-Tailed Tests</h3><p>So here’s where we are. Your friend tossed his coin 100 times and got 70 heads. Very unlikely for a fair coin, sure. But we’ve agreed that “unlikely” isn’t a verdict; we need a line, drawn before the toss. So let’s draw one: a 5% slice of the boring-world hill. (Textbooks call this slice the <strong>rejection region</strong>: land in it, and we reject the null.)</p><p>But wait, <em>where</em> on the hill does that slice go? The right end? The left end? Both?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*J8GbjKx2G5f7h8GGijSdzg.gif" /><figcaption>Kermit, searching for the rejection region</figcaption></figure><p>Here’s the neat part: <strong>alpha decides how big the slice is. Your alternative hypothesis decides where it goes.</strong> Remember our hypotheses from the last article? This is where the wording of the alternative actually matters.</p><p><strong>“The coin isn’t fair.”</strong> A coin can fail this in two ways: too many heads <em>or</em> too many tails. A coin that keeps landing tails is just as rigged; it’s simply bluffing in the other direction. So we split our 5% across both ends, 2.5% on each side. Statisticians call the far ends of the hill its <em>tails</em>, so this is a <strong>two-tailed test</strong>. For 100 tosses, the lines sit at <strong>61 heads or more</strong> and <strong>39 heads or fewer</strong>.</p><p><strong>“The coin favours heads.”</strong> Now only one direction matters, so the whole 5% goes on the right end: a <strong>right-tailed test</strong>, with the line moving in to <strong>59 heads</strong>.</p><p><strong>“The coin favours tails.”</strong> Same idea, flipped. The whole 5% goes on the left: a <strong>left-tailed test</strong>, with the line at <strong>41 heads</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*07wVt6J1r3a4k-zSMAhHMQ.png" /></figure><p>(Fun fact: in the last article, our engineers-turning-farmers alternative was “the rate <em>increased</em>”. That was a right-tailed test all along.)</p><p>The invigilator from earlier? Also running a one-tailed test. Nobody gets suspicious when a student goes to the washroom <em>too few</em> times.</p><p><strong>So why not always go one-tailed?</strong> It <em>does</em> make it a little easier to catch a cheat in the direction you’re watching. But it makes you completely blind in the other direction. Say you’re testing a new checkout page and only check whether it <em>increased</em> sales. If it actually tanked them, your test will never flag it, because it isn’t watching that end. You’d ship a disaster with a clean conscience.</p><p>That’s why two-tailed is the safe default, and why drug regulators don’t let anyone use one-tailed tests as a shortcut: the international clinical-trial guideline asks that one-sided tests use half the usual alpha, 2.5%, so they’re no easier to pass. Use one-tailed only when the other direction genuinely doesn’t matter, and decide that before you look.</p><p><strong>One last thing: the p-value changes too.</strong> Back when we met the p-value, I said, “We’ll talk about the other side, 30 heads or fewer, a little later.” Here it is.</p><p>Remember, the p-value counts how many honest coins would land as far from 50 as your friend did, or farther. Earlier, we only looked at one side: 70 heads or more, which was about <strong>4 out of our 100,000 honest people</strong>.</p><p>But now our question is “is this coin fair?”, and a coin can be unfair in either direction. So a gap of 20 or more counts on <em>both</em> sides. On the left, 30 heads or fewer is just as far from 50 as 70 is, and it catches about <strong>4 more honest people</strong>.</p><p>So the total is about <strong>8 out of 100,000, or 0.008%</strong>. That’s our new p-value: the question changed, so the outcomes we count changed with it.</p><h3>Call or Fold: P-Value Meets Alpha</h3><p>Let’s put the two numbers side by side, using our 100,000 honest people:</p><ul><li><strong>Alpha (5%):</strong> we agreed, before the toss, to tolerate wrongly accusing up to <strong>5,000</strong> of them</li><li><strong>P-value (0.008%):</strong> only about <strong>8</strong> of them would get a result as extreme as your friend’s</li></ul><p>8 is way below 5,000!</p><p>So the rule, after all that build-up, is this short:<br><strong>p ≤ α → reject the null<br>p &gt; α → fail to reject</strong></p><p>When p ≤ α, the result earns a shiny badge: <strong>statistically significant</strong>. That’s the word from the start of this article. It doesn’t mean “important” or “proven”. It just means “past the line we drew”.</p><p>Your friend’s coin? <strong>Null rejected. Bluff called.</strong> Even Jai’s coin would be sweating.</p><h4>Same thing at work</h4><p>Swap the coin for an A/B test. You launch a new checkout button, and your testing tool reports <strong>p = 0.03</strong>. That’s below 0.05, so it’s statistically significant: if the button really did nothing, a difference this big would be rare. Ship it? Probably. (Whether the lift is big enough to <em>matter</em> is a different question. We’ll get there.)</p><p>But if the tool says <strong>p = 0.20</strong>, you fail to reject. That does <strong>not</strong> mean “the button doesn’t work”. It might just mean you didn’t collect enough data to tell. Before you kill the idea, check whether the test was big enough.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*89sRRCW_Glm0cgkwfjb5Og.png" /></figure><h4>The two ways to get it wrong</h4><p>Even playing by the rules, mistakes happen:</p><ul><li><strong>Type I error:</strong> rejecting the null when it’s true. You celebrate a “winning” button that actually does nothing. (Our weak bladder.) <strong>Alpha is the rate of this mistake.</strong></li><li><strong>Type II error:</strong> failing to reject when something really changed. You kill a button that actually worked. (The cheat who slips past.) More on this one in the next article.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y5e5EMsWLSSEDhD7X4nhYQ.png" /></figure><h3>P-Hacking: Torturing the Data Until It Confesses</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*egOrKBKS0BlmnwvXyyl5pA.jpeg" /><figcaption>Ronald Coase, economist</figcaption></figure><p>I’ve been telling people this for ages: data is like that friend who’ll agree with anything if you ask nicely enough, and often enough. You don’t have to lie. You just have to keep rephrasing the question until it finally says, “Yeah, sure, the button works.”</p><p>In statistics, this has a name: <strong>p-hacking</strong>. You keep bending the process, often without even meaning to, until p slips under 0.05.</p><p>Remember alpha’s deal? <strong>Every test (one full experiment, like our 100 tosses) has a 5% chance of a false alarm</strong>, about 1 in 20, even when nothing is going on.</p><p>So when you run a test once and get a result, you never know for sure whether <em>this</em> is the fluke. But you do know the odds: only 1 in 20 tests like yours would fool you. You keep both possibilities open and trust the result accordingly.</p><p>P-hacking breaks that deal in sneaky little ways:</p><ul><li><strong>Test everything, report the winner.</strong> Your new button didn’t move conversion. Or revenue. Or order value. But iPhone users in California on Tuesdays? <em>Significant!</em> <br>Here’s the issue. You didn’t run one test; you ran twenty. And with a 1-in-20 false-alarm rate, twenty tests on a button that does nothing will usually throw up one “winner” by pure luck. So that iPhone result isn’t a discovery. It’s exactly what luck would hand you. <br>But in the meeting, you only show that one. The room sees “statistically significant” and lights up: <em>“Great, the button works!”</em> Nobody asks how many other things you checked. And the 19 tests that found nothing, the ones that would have told everyone this was probably just luck, never leave your laptop.</li><li><strong>Peek until it looks good.</strong> You planned a two-week test, but you check the results every day. On day 6, p dips below 0.05. Ship it! The problem: results wobble up and down as data comes in, and every peek is another chance to catch a lucky wobble. It’s like running a fresh test every day and stopping at the first win. Peek 10 times like this, and your chance of a false alarm jumps from 1 in 20 to about <strong>1 in 5</strong>.</li></ul><blockquote><strong><em>One test: “I might be wrong, and here are the honest odds.” <br>P-hacking: “I’m probably wrong, but I’m quoting the odds for being right.”</em></strong></blockquote><p>My favourite explanation of all this is a comic. You test 20 jelly bean colours for a link to acne, one comes back significant, and the headline writes itself:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*zt-iPVjBwsPsNGyCEwVPKg.png" /><figcaption>Comic: “Significant” by Randall Munroe, xkcd #882 (xkcd.com/882)</figcaption></figure><p>Honestly, I’d planned to write about p-hacking in much more detail, as a separate article of its own. Then I came across <a href="https://www.datacamp.com/tutorial/p-hacking">P-Hacking: How to (Not) Manipulate the P-Value</a> by Islam Salahuddin on DataCamp, and I genuinely couldn’t do a better job explaining it. It covers the many other tricks (dropping “inconvenient” outliers, switching analyses, even rounding 0.051 down to “0.05”), how to spot a p-hacked result in the wild, and how to protect yourself from accidentally doing it. If this section made you even slightly suspicious of your last A/B test readout, give it a read.</p><p>And the short version of how not to p-hack? Decide your metric, sample size and test length <strong>before</strong> you start, and then stick to it. Sound familiar? It’s the same rule as drawing the line before the toss. And if a result looks surprisingly good, run it again before you celebrate. Real effects show up twice. Flukes usually don’t.</p><h3>So, How Did 97% Become 36%?</h3><p>Remember the fact from the start? 97% of those psychology studies were “significant”, but when repeated, only 36% held up. You now have everything you need to see how.</p><p>Mix three ingredients:</p><ol><li><strong>A 1-in-20 false alarm rate.</strong> Even honest research gets fooled sometimes. That’s the deal we signed with alpha.</li><li><strong>P-hacking.</strong> Test enough things and peek often enough, and that 1 in 20 quietly becomes much more.</li><li><strong>Journals love a winner.</strong> Significant results get published; studies that found nothing tend to stay in a drawer.</li></ol><p>Together, they fill the published pile with lucky hits. Repeat those experiments honestly, without the luck and without the hacking, and many “discoveries” simply vanish. <strong>And the ones that survived often shrank, because the original only crossed the line thanks to a lucky boost.</strong> Nobody needed to commit fraud. The system just rewarded luck.</p><h3>Coming Up Next</h3><p>So far, we’ve been obsessed with one kind of mistake: accusing the innocent. The honest coin that got unlucky. The weak bladder that got the side-eye. The button that “worked” for iPhone users in California on Tuesdays.</p><p>But there’s a second villain we’ve barely met: the <strong>Type II error</strong>. That’s the real cheat who strolls right past us. Maybe your friend’s coin <em>is</em> slightly rigged, just not enough for 100 tosses to catch it. Maybe your new feature <em>does</em> work, but your test was too small to notice. No alarm, no verdict, and the culprit walks out whistling.</p><p>Next time, we’ll go after him: why some real effects slip right through, and how many tosses (or users) you actually need before you can trust a “no”.</p><p>Until then, if your friend offers to settle something with a coin toss, ask to see both sides first. Jai would understand.</p><p>If you remember only one thing from this post, make it this:</p><blockquote><strong><em>A p-value tells you how surprising your result would be if nothing were going on. It’s evidence, not proof, and it’s only as honest as the person holding the coin.</em></strong></blockquote><p>Phew! This one took a while, and honestly, I learned a lot more writing it than I expected. I hope it makes statistics feel a little less scary, and maybe you like it a little more today than you did yesterday. (If not, blame the T-800. He tried to stop me.)</p><p>As always: read it, let it sink in, and if anything still feels fuzzy, drop your doubts in the comments or reach out. No question is too basic. Trust me, I’ve asked “but why?” at least 99 times.</p><p>Adiós!</p><h3>References &amp; Further Reading</h3><ol><li>Open Science Collaboration (2015). <em>Estimating the reproducibility of psychological science.</em> Science, 349(6251) <a href="https://doi.org/10.1126/science.aac4716">https://doi.org/10.1126/science.aac4716</a></li><li>Begley, C. G. &amp; Ellis, L. M. (2012). <em>Raise standards for preclinical cancer research</em> (the Amgen study). Nature, 483, 531–533 <a href="https://doi.org/10.1038/483531a">https://doi.org/10.1038/483531a</a></li><li>Lown Institute: Why can’t we reproduce so many scientific findings <a href="https://lowninstitute.org/why-cant-we-reproduce-so-many-scientific-findings/">https://lowninstitute.org/why-cant-we-reproduce-so-many-scientific-findings/</a></li><li>Goodman, S. (2008). <em>A Dirty Dozen: Twelve P-Value Misconceptions.</em> Seminars in Hematology, 45(3), 135–140 <a href="https://doi.org/10.1053/j.seminhematol.2008.04.003">https://doi.org/10.1053/j.seminhematol.2008.04.003</a></li><li>Wasserstein, R. L. &amp; Lazar, N. A. (2016). <em>The ASA’s Statement on p-Values: Context, Process, and Purpose</em>. The American Statistician, 70(2), 129–133 <a href="https://doi.org/10.1080/00031305.2016.1154108">https://doi.org/10.1080/00031305.2016.1154108</a></li><li>Fisher, R. A. (1925). <em>Statistical Methods for Research Workers.</em> Full text: <a href="https://psychclassics.yorku.ca/Fisher/Methods/">https://psychclassics.yorku.ca/Fisher/Methods/</a></li><li>ICH E9 (1998). <em>Statistical Principles for Clinical Trials</em>, section 5.5. FDA PDF: <a href="https://www.hhs.gov/guidance/sites/default/files/hhs-guidance-documents/FDA/E9-Statistical-Principles-for-Clinical-Trials.pdf">https://www.hhs.gov/guidance/sites/default/files/hhs-guidance-documents/FDA/E9-Statistical-Principles-for-Clinical-Trials.pdf</a></li><li>Salahuddin, I. (2025). <em>P-Hacking: How to (Not) Manipulate the P-Value.</em> DataCamp. <a href="https://www.datacamp.com/tutorial/p-hacking">https://www.datacamp.com/tutorial/p-hacking</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ae2935202bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Innocent Until Proven Significant: A Gentle Intro to Null and Alternative Hypotheses]]></title>
            <link>https://medium.com/@soumabrata.skr/innocent-until-proven-significant-a-gentle-intro-to-null-and-alternative-hypotheses-7c006663b5cd?source=rss-d88b78172a17------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c006663b5cd</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[a-b-testing]]></category>
            <category><![CDATA[null-hypotheses]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[hypothesis-testing]]></category>
            <dc:creator><![CDATA[Soumabrata Sarkar]]></dc:creator>
            <pubDate>Fri, 16 Oct 2026 11:24:21 GMT</pubDate>
            <atom:updated>2026-10-16T11:27:12.278Z</atom:updated>
            <content:encoded><![CDATA[<p>Statistics is a field I genuinely love. Unfortunately, the feeling isn’t always mutual. Every now and then, it acts like that one professor who says “this is trivial,” fills three blackboards with Greek letters, and turns around to find the entire class silently questioning their life choices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/0*k4JbYzx0VUTG35fI.jpg" /></figure><p>Thankfully, there are people like Josh Starmer, whose YouTube videos make statistics far less scary (BAM!). But I’m the kind of person who asks “why?” and “how?” so often that even I find it annoying, and high-level videos weren’t enough to keep my inner toddler quiet.</p><p>So when I recently found some downtime, I decided to give statistics another shot, and this time do it properly. No more nodding along to videos. I went down the rabbit hole of articles and research papers, armed with coffee and a dangerous amount of curiosity.</p><p>Somewhere along the way, I ran into an old enemy: the null hypothesis. The first time I met it, I read the definition, understood nothing, and confidently rejected the null hypothesis, with zero evidence. (If you just laughed, you already know your stats. If you didn’t, perfect. By the end of this post, you will.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*_-rV0jKKmljfag3DSbqxfA.gif" /></figure><p>So I did what any sore loser would do: I studied the enemy. I pulled up every reference I could find, connected the dots, and realized two things. First, the concept is actually pretty simple. Second, plenty of people have explained it well, but the pieces are scattered all over the internet, and most of them tell you <strong>what</strong> to do without ever explaining <strong>why</strong>.</p><p>Here it is: my attempt to make the null hypothesis (and its partner in crime, the alternative hypothesis) easier for you than it was for me. Why do we need them? What are they? How do they help? When do we use them? And, if you stick around, a sneak peek at the villain of my next post: the p-value.</p><h3>It All Starts With a Sample</h3><p>Before we meet the null hypothesis, we need to understand the problem it was invented to solve. And that problem starts with a sample. Most research, whether in statistics, psychology, or medicine, follows the same basic recipe: pick a group, measure something about them, and summarize what you found.</p><p>That group is called a <strong>sample</strong>, a smaller, manageable slice of the bigger group you actually care about. The bigger group is called the <strong>population</strong>.</p><h4>Why Not Just Ask Everyone?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*iTA6Yw5dO4-uPPC31_zv4g.gif" /><figcaption>The Colgate reporter, India’s OG statistician. Her sample size was small, but her confidence was population-level</figcaption></figure><p>Fair question. Well, if you have infinite money, infinite time, and an unhealthy love for spreadsheets, be my guest. For the rest of us, it’s practically impossible. India alone has roughly 1.48 billion people. Imagine asking every single one of them whether their toothpaste has salt in it. Even the lady from that famous toothpaste commercial didn’t try that. She just asked a handful of people near the billing counter. (Congratulations to her, by the way. She was doing sampling.)</p><h4>From 500 Engineers to All of India</h4><p>Once you’ve collected data from your sample, you summarize it. That summary is called <strong>descriptive statistics</strong>: numbers that describe your sample, like an average, a percentage, or how spread out the values are. For example, let’s say 8% of the 500 engineers we surveyed quit their jobs to become farmers. That 8% is a descriptive statistic.</p><p>But here’s the thing: serious researchers don’t really care about those 500 engineers. (Sure, the internet is full of <em>“I had coffee with 3 founders and here’s why the economy is doomed”</em> posts. That’s not research. That’s just coffee.) The real goal is to take what we learn from the sample and use it to say something about the entire population. That leap from sample to population is called <strong>inference</strong>.</p><p><strong>Inference</strong> is the process of using what you observed in a sample to draw conclusions about the whole population. Think of it as an educated guess, one backed by data instead of vibes. Going back to our engineers: if 8% of the 500 engineers we surveyed became farmers, we infer that roughly 8% of all engineers in India have made the same switch. We never spoke to every engineer in the country, but our sample lets us make a reasonable claim about all of them.</p><p>Our engineers are fictional, but this process isn’t. It’s exactly how India estimated that about 1 in 9 adults has diabetes: researchers in the <a href="https://doi.org/10.1016/S2213-8587(23)00119-5"><em>ICMR-INDIAB study</em></a> tested around 113,000 adults across the country and inferred the number for all of India.</p><p>So, in short: descriptive statistics tells you about your sample. Inference is how you go beyond it.</p><h4>Read the Fine Print</h4><p>There’s a bit of fine print: this only works if your sample actually looks like the population. That means two things. First, it needs to be big enough, because 3 people can’t speak for millions. Second, it needs to come from the right group. Survey 500 engineers who all live in Bengaluru, and you’ve learned a lot about Bengaluru engineers, but not much about the rest of India. (This is also why our coffee-with-3-founders friend fails twice: too few people, and founders aren’t the whole economy.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bJVOSI_J6LYqJ6Ej.jpg" /></figure><p>Tick both boxes, and your sample will get you close to the truth. But close isn’t exact. Think of tasting soup: take a decent spoonful (big enough) from a well-stirred pot (right group), and your spoon will taste a lot like the whole pot. Just not exactly like it. Maybe a little extra salt landed in your spoon. Your sample works the same way. So is 8% the true number for all engineers in India? Probably not, but it shouldn’t be far off. And that small gap between “close” and “exact” has a name: <strong>sampling error</strong>.</p><h3>Sampling Error: Nobody Messed Up, It’s Just Luck</h3><p>First, a quick clarification: sampling error doesn’t mean someone messed up. (People do pick terrible samples in real life, like surveying people at a Starbucks to estimate India’s average income. But that’s a different problem.) In statistics, sampling error is simply the difference between what your sample says and what’s true for the whole population, caused purely by the luck of who ended up in your sample.</p><p>Let’s go back to our engineers. Say you survey a fresh batch of 500 engineers, just as carefully as before. This time, 7.6% have become farmers. (Remember, the first batch gave us 8%.) Try again with another 500: 8.3%. Same country, same careful method, different answers. Nobody made a mistake. Statistics just likes to keep you humble. You got a slightly different spoonful each time.</p><p>The good news: bigger samples shrink this wobble. Survey 5,000 engineers instead of 500, and your results will land much closer to each other, and to the true number. The bad news: it never fully disappears unless you survey everyone, and we’ve already established that you don’t love spreadsheets that much.</p><h4>So Why Is This a Problem?</h4><p>Now, remember our 8%? Imagine a study from a few years ago had found that only 6% of engineers had switched to farming. Put the two together, and you get a headline: <em>“More engineers than ever are turning to farming! It was 6%, now it’s 8%.”</em> (Somewhere, a parent who paid for four years of engineering just fainted. Me? I’m low-key jealous.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*Wwj4rqx7ODxwdvTK.jpg" /></figure><p>Sounds dramatic. But you now know something the headline writer may have forgotten: every sample wobbles. So there are two ways to read this:</p><ol><li><strong>Something real happened.</strong> More engineers really are becoming farmers, and our 8% reflects that.</li><li><strong>Nothing changed.</strong> Engineers are switching to farming at the same rate as before, and our sample just happened to catch a few extra farmer-engineers. Pure sampling error. (The headline writer would hate this option.)</li></ol><p>Both stories explain the same jump from 6% to 8%. It’s like a courtroom where two lawyers point at the same evidence and tell completely different stories. And just by looking at the numbers, you can’t tell who’s right.</p><p>And this isn’t just about engineers. Any time you see a difference in a sample, whether it’s a new app feature that seems to boost sign-ups, a medicine that seems to work better, or students who seem to score higher after a new teaching method, the same two explanations are on the table: a real effect, or the luck of the draw. Statisticians have fancy names for these two stories, and you’re about to meet them.</p><h3><strong>The Null Hypothesis: The “Nothing Changed” Story</strong></h3><p>Meet the null hypothesis: statistics’ way of settling the “real or luck?” debate fairly, the same way every time. Remember story #2, the one where nothing changed and our 8% was just sampling error? That’s the null hypothesis.</p><p>Let’s break down the name. A <strong>hypothesis</strong> is simply a claim you can test, an educated guess like “more engineers are becoming farmers” or “this new feature boosts sign-ups.”</p><p>Now add <strong>“null,”</strong> which means zero, nothing, nada. So the <strong>null hypothesis</strong> (written as <strong>H₀</strong>) is the claim that <em>nothing interesting is going on</em>: no change, no difference, no effect. Whatever pattern you spotted in your sample is just sampling error playing tricks on you. Think of it as statistics’ resident party pooper: <em>“Relax, it’s probably nothing.”</em></p><p>In our example, the old study said 6% and our sample says 8%. The null hypothesis says: <em>“The share of engineers becoming farmers hasn’t changed. That jump? Just the luck of the draw.”</em></p><h4>Why Start With the Boring Story?</h4><p>You might wonder why statistics starts with the party pooper instead of the exciting claim. Two reasons:</p><ol><li><strong>It’s specific.</strong> “Nothing changed” points to one clear number: 6%. That gives us something concrete to test against. “Something changed” could mean 1%, 4%, 8%, 15%, or literally any number that isn’t 6%, which is much harder to pin down.</li><li><strong>It keeps us honest.</strong> Humans love finding patterns, even in random noise. Starting from “it’s probably nothing” forces us to show real evidence before getting excited, like that one uncle in the family WhatsApp group who doesn’t believe a single forward without a source. (Okay, that uncle doesn’t exist. But he should.)</li></ol><h4>Innocent Until Proven Significant</h4><p>And here’s where the courtroom comes in. We start by <strong>assuming the null hypothesis is true</strong>. Innocent until proven guilty. Our job isn’t to prove it right. It’s to check whether the evidence is strong enough to say otherwise.</p><p>Notice something sneaky here: the trial only ever examines the null. We never try to prove directly that something changed. We just ask one question: <strong>“If nothing changed, how likely is it that we’d see evidence like this?”</strong></p><p>If you have a sibling, you’ve already run this test. You just didn’t know it.</p><p>The last slice of cake, the one you’d been saving all day, goes missing from the fridge. Your sibling swears they didn’t touch it. Let’s assume they’re innocent. That’s our null hypothesis. (Unlike most parents, statistics actually presumes innocence.) But then the evidence rolls in: frosting on their fingers, a trail of crumbs leading to their room, an empty plate hidden under their bed, and they’ve been suspiciously quiet for twenty minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*ymNaknp2dhngkg7E" /><figcaption>Null hypothesis: “I didn’t eat the cake.” Exhibit A: everything else in this photo</figcaption></figure><p>Now ask the question: if they really are innocent, how likely is it that all of this would show up together? Frosting on their fingers alone could be anything. Maybe they had a cupcake at school or licked a spoon while baking. But the crumbs, the plate, the silence, all at once? Very unlikely. Unlikely enough that “they’re innocent” stops sounding believable.</p><p>That’s exactly what we do with our engineers. If nothing changed and the true rate is still 6%, how likely is it that a sample would show 8% just by luck?</p><h4>The Verdict: Reject or Fail to Reject</h4><p>A trial can end in only two ways.</p><p><strong>1. We reject the null hypothesis.</strong><br> The evidence is so unlikely that “it’s just luck” no longer sounds believable. This is the full crime scene: frosting, crumbs, plate, silence. For our engineers, it would mean that if nothing had changed, getting 8% would be really unlikely, so something real probably happened. Note the word <em>probably</em>: rejecting the null isn’t absolute proof. It means the evidence is strong enough that we’re willing to bet against luck.</p><p><strong>2. We fail to reject the null hypothesis.</strong><br> The evidence isn’t unlikely enough. This is just frosting on the fingers, which could easily have an innocent explanation. For our engineers, it would mean a jump from 6% to 8% could reasonably happen by chance, so we can’t rule out luck. The null survives, for now.</p><h4>Why We Never “Accept” the Null</h4><p>Here’s the part that trips everyone up. If the null survives, why not just say we <em>accept</em> it?</p><p>Because a court never declares anyone <strong>“innocent.”</strong> It declares them <strong>“not guilty.”</strong> That difference matters. “Not guilty” means there wasn’t enough evidence to convict, not that the person definitely didn’t do it. (Your sibling knows this. That smug look when your parents say “fine, I can’t prove it” is not the look of an innocent person.)</p><p>Same with the null. Failing to reject it doesn’t prove nothing changed. Maybe something did change, but our sample was too small to catch it. It’s like losing your keys, checking one room, and declaring “my keys don’t exist.” You didn’t prove they’re gone. You just didn’t look hard enough.</p><p>Absence of evidence isn’t evidence of absence. So statisticians stay humble and say “<strong>we fail to reject the null</strong>,” which is a fancy way of saying “we couldn’t prove anything happened.”</p><p>But wait: if the null gets rejected, what exactly are we left believing? That’s the other story, and it has a name too.</p><h3>The Alternative Hypothesis: The “Something Changed” Story</h3><p>Remember story #1, where more engineers really are becoming farmers? That’s the <strong>alternative hypothesis</strong>, written as <strong>H₁</strong> (or sometimes Hₐ). It’s usually the claim the researcher actually cares about, the one that would make the headline.</p><p>If the null is your sibling saying “I didn’t eat the cake,” the alternative is you pointing at the empty plate.</p><h4>Two Stories, Written Together</h4><p>H₀ and H₁ are a pair, so you write them down <strong>together, before you look at any data</strong>. They’re usually written so that, between them, they cover every possible outcome. Whatever the truth turns out to be, it falls under one of the two stories.</p><p>The simplest pair looks like this: if H₀ says “the rate is 6%,” then H₁ says “the rate is <strong>not</strong> 6%.” Between them, every possible number is covered.</p><h4>Three Flavors of “Something Changed”</h4><p>“Something changed” sounds simple, but you have to decide upfront what kind of change counts. And whichever you pick, the null quietly adjusts so the two stories still cover everything:<br> 1.<strong> Changed in either direction.</strong> H₁: the rate is not 6%. H₀: the rate is 6%.<br> 2. <strong>Increased.</strong> H₁: the rate is higher than 6%. H₀: the rate is 6% or lower.<br> 3. <strong>Decreased.</strong> H₁: the rate is lower than 6%. H₀: the rate is 6% or higher.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wm_9MJbxFxolNw5TQlJ9_g.png" /></figure><p>Notice the null is still the party pooper in every case. It just means “nothing happened <em>in the direction we care about</em>.”</p><p>Our headline claimed engineers are turning to farming “more than ever,” so that’s flavor #2.</p><p>Why does this matter? Because it decides which evidence counts. If you bet on “it increased” and your sample comes back at 4%, that lands squarely in the null’s territory (“6% or lower”), and you can’t suddenly switch to “well, it changed!” That’s like calling heads, seeing tails, and announcing you meant tails all along. The rule is simple: <strong>pick your alternative before you peek at the data.</strong></p><h4>Two Stories, But Not Equal Treatment</h4><p>Here’s the twist: the two stories aren’t treated equally. If the evidence is strong enough to reject the null, we side with the alternative. But if it isn’t, we don’t side with the null. We just say “not enough evidence,” the same “not guilty, not innocent” logic from before.<br>The alternative has to earn its win. The null just has to survive!</p><h3>So We Failed to Reject. Now What?</h3><p>This is the question that bugged me the most. We wrote two stories, ran the trial, and the null survived. But it didn’t win either. So… who’s right?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*JAqa6pNAgvOwQkjKTvidsA.gif" /></figure><p><strong>Honest answer:</strong> we don’t know yet. Both stories are still standing.</p><p>Back to the cake. Say the only clue you found was a little frosting on your sibling’s finger. That fits “innocent” (they licked the spoon while someone was baking) and “guilty” (they ate the cake and wiped the plate clean) equally well. You can’t convict. But you also can’t declare them innocent and apologize for accusing them. The case just stays open.</p><p>So what do you do with an open case?</p><ol><li><strong>Collect more evidence.</strong> Check the dustbin. Question the other sibling. In statistics, that means a bigger sample. Bigger samples shrink the wobble, so if a real change exists, it becomes easier to spot. Survey 5,000 engineers instead of 500, and if the jump from 6% to 8% is real, luck will have a much harder time explaining it.</li><li><strong>Ask whether you ever stood a chance.</strong> Remember, small samples wobble a lot. Survey only 50 engineers, and 6% means 3 people while 8% means 4 people. The entire “jump” comes down to one extra farmer. That could easily be luck, so the test was never going to call it real, even if the change actually happened. In other words, a tiny sample can hide a real change inside its wobble. Failing to reject in that situation tells you almost nothing. It’s like searching for your keys with the lights off and concluding they don’t exist. (Statisticians call a test’s ability to catch a real change its “<strong>power</strong>,” if you ever want to look it up.)</li><li><strong>Make a practical call.</strong> Sometimes “we couldn’t detect a change” is enough to move on. If a new app feature showed no clear effect on sign-ups, a product team might shelve it. Just remember to say “no clear effect,” not “no effect.”</li></ol><p>What you should <em>not</em> do: keep re-running tests on the same data until something comes out significant. That’s like asking your sibling the same question 47 times until they finally say “fine, I ate it.” You got an answer, just not one you can trust. (This has a name too, <strong>p-hacking</strong>, and yes, it’s coming up in a future post.)</p><h4>And If We Do Reject?</h4><p>Then the alternative wins, with an asterisk. We say something <em>probably</em> changed, not that it’s proven. A good researcher’s next questions are “by how much?” and “does it show up again in a fresh sample?” One trial gives you a verdict. Getting the same verdict a second time is much harder to argue with.</p><h3>The Whole Trial in One Place</h3><p>Verdicts, open cases, asterisks… that’s a lot of courtroom drama for one missing slice of cake. So let’s zoom out and put the whole trial on a single page, using our engineers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BJOH2LmwDJR0L5N5Ejwlnw.png" /></figure><p>Five steps. Two stories, one assumption, one question, and a verdict that either knocks down the boring story or sends you back to collect more evidence.</p><p>And this same courtroom runs everywhere: a shopping site testing whether a new “Buy Now” button really boosts sales, a drug trial checking whether patients really recover faster, or a cricket fan wondering whether a batter’s home average is real or just a few lucky innings. Different worlds, same trial.</p><h4>The One Piece We Haven’t Measured</h4><p>Look at the flowchart again, though. There’s one step we’ve been a little vague about: step 4. We keep saying “very unlikely” and “not unlikely enough,” but where exactly is the line?</p><p>Picture a football match between two sections of the same class, teams that are supposed to be evenly matched. If Section A wins 3-2, nobody blinks. Close games happen. If Section A wins 10-0, you start wondering whether someone quietly stacked their team with the school’s best players.</p><p>But what about 5-2? Or 6-1? Where does “probably luck” end and “something’s off” begin?</p><p>Statistics has a number for exactly that, called the <strong>p-value</strong>. Here’s the sneak peek.</p><p>The p-value answers the same question we’ve been asking all along: <strong>if the boring story (H₀) is true, how likely is it that we’d see a result like ours, or something even more extreme, just by luck?</strong></p><p>In football terms: if the two sections really are evenly matched, how often would a game end 10-0, or something even more lopsided? Almost never. That’s a tiny p-value, and luck becomes hard to believe. A 3-2 result? That happens all the time between equal teams, so the p-value is large, and luck is a perfectly good explanation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/0*SEWaJXqVYfvn06SQ.png" /></figure><h3>Before You Go</h3><p>If you remember only one thing from this post, make it this:</p><blockquote><strong><em>Statistics starts by assuming nothing happened, and only changes its mind when the evidence makes “it was just luck” hard to believe.</em></strong></blockquote><p>Okay, that’s enough statistics for one day. Read it, let it sink in, and if anything still feels fuzzy, drop your doubts in the comments or reach out. I’ll be more than happy to help (asking “why?” is my favorite hobby, remember?).</p><p>See you in the next one!</p><h3>References &amp; Further Reading</h3><ol><li><strong>Josh Starmer (StatQuest), “Hypothesis Testing and the Null Hypothesis, Clearly Explained!!!”</strong> The video that made statistics feel less scary for me. BAM!<br> <a href="https://www.youtube.com/watch?v=0oc49DyA3hU">youtube.com/watch?v=0oc49DyA3hU</a></li><li><strong>Price, Jhangiani &amp; Chiang, <em>Research Methods in Psychology</em> (2nd Canadian Edition), “Understanding Null Hypothesis Testing.”</strong> A free, open textbook with a clear walkthrough of the null hypothesis testing logic.<br> <a href="https://opentextbc.ca/researchmethods/chapter/understanding-null-hypothesis-testing/">opentextbc.ca/researchmethods/chapter/understanding-null-hypothesis-testing</a></li><li><strong>Anjana et al. (2023), ICMR-INDIAB study, <em>The Lancet Diabetes &amp; Endocrinology</em>.</strong> The real-world study behind the “1 in 9 adults” inference example.<br> <a href="https://doi.org/10.1016/S2213-8587(23)00119-5">doi.org/10.1016/S2213–8587(23)00119–5</a></li><li><strong>“A logical analysis of null hypothesis significance testing using popular terminology,” <em>BMC Medical Research Methodology</em> (2022).</strong> For the curious: how textbooks differ in writing H₀ and H₁.<br> <a href="https://bmcmedresmethodol.biomedcentral.com/articles/10.1186/s12874-022-01696-5">bmcmedresmethodol.biomedcentral.com/articles/10.1186/s12874–022–01696–5</a></li><li><strong>Wasserstein &amp; Lazar (2016), “The ASA’s Statement on p-Values: Context, Process, and Purpose,” <em>The American Statistician</em>.</strong> Homework for the next post, straight from the American Statistical Association.<br> <a href="https://doi.org/10.1080/00031305.2016.1154108">doi.org/10.1080/00031305.2016.1154108</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c006663b5cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Guide to building a tokenized data pipeline in Azure — Part 1: The Why]]></title>
            <link>https://medium.com/@soumabrata.skr/guide-to-building-a-tokenized-data-pipeline-in-azure-part-1-the-why-9064105bc372?source=rss-d88b78172a17------2</link>
            <guid isPermaLink="false">https://medium.com/p/9064105bc372</guid>
            <category><![CDATA[pseudonymization]]></category>
            <category><![CDATA[tokenization]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Soumabrata Sarkar]]></dc:creator>
            <pubDate>Thu, 05 Feb 2026 20:31:22 GMT</pubDate>
            <atom:updated>2026-02-05T20:31:22.573Z</atom:updated>
            <content:encoded><![CDATA[<h3>Guide to building a tokenized data pipeline in Azure — Part 1: The Why</h3><h3>1. Why daily data pipelines matter (and how not having one quietly sabotages analytics)</h3><p>Most teams <em>have data</em>.</p><p>What they often don’t have is a <strong>data pipeline designed for analytics consumption</strong>.</p><p>Data arrives opportunistically — events here, logs there, connector-driven tables somewhere else. It flows when systems emit it, not when analysts need it. And crucially, there’s rarely a single system responsible for saying:</p><blockquote><em>“This is yesterday’s data. It’s complete. And it’s safe to analyze.”</em></blockquote><p>When data isn’t shaped around a daily contract, analytics slowly drifts into a fragile state — usable, but unreliable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*IxQD4_lCCAascjarRmsjrA.png" /></figure><h4>What this looks like in practice</h4><p>When there’s no daily pipeline in place, a few patterns tend to emerge:</p><ul><li><strong>Inconsistent metrics: </strong>Numbers exist, but confidence doesn’t. The same metric can mean different things depending on <em>when</em> you query it.</li><li><strong>Fragmented data access: </strong>Some datasets live in raw storage, some in warehouses, and some only exist behind service boundaries — accessible mainly through engineers.</li><li><strong>No clear analytics boundary: </strong>Operational data and analytics data blur into the same layer. Ownership becomes unclear, and every query carries hidden assumptions.</li></ul><p>Analytics <em>works</em>, but only reactively. It works — until it doesn’t.</p><h4>What a daily pipeline changes</h4><p>A daily pipeline introduces <strong>structure and predictability</strong>.</p><p>It creates a time-partitioned flow of data — one clean slice per day, clearly labeled and consistently available. It establishes a shared understanding of:</p><ul><li>when data arrives</li><li>what schema it follows</li><li>which identifiers are allowed to exist</li><li>and what “complete” actually means</li></ul><p>Instead of chasing data, analytics starts operating on <strong>stable ground</strong>. That’s the real shift — not more data, but <strong>data with a contract</strong>.</p><h3><strong>2. The hidden challenges of a daily data pipeline: compliance &amp; data retention</strong></h3><p>A daily analytics pipeline does exactly what it’s designed to do: <strong>it accumulates data over time.</strong></p><p>This introduces a major challenge: <br><em>By design, a daily pipeline means we are intentionally storing historical customer data every single day. From an analytics perspective, that’s a feature. From a compliance and privacy perspective, it’s a responsibility that can’t be hand-waved away.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*CBpdcNQ7bndj0pYwnpF8og.png" /></figure><h4>Why this matters</h4><p>Most organizations operate under some form of data-retention expectation:</p><ul><li>Customer data should not live forever</li><li>Once a customer churns, their data must be deleted—or transformed so it can no longer identify them</li><li>There needs to be a clear, enforceable retention window (for example, 90 days post-churn)</li></ul><p>The challenge isn’t understanding <em>what</em> to do.</p><p>It’s making sure you can actually do it <strong>at scale</strong>, <strong>retroactively</strong>, and <strong>with confidence</strong>.</p><h4>Why naïve deletion doesn’t work</h4><p>If analytics datasets store raw identifiers directly — organization IDs, user IDs, emails, profile URLs — then “delete customer data” becomes deceptively hard.</p><p>Deletion no longer means removing a single record.</p><p>It means:</p><ul><li>Finding that identifier across every historical day the pipeline has ever produced</li><li>Rewriting or deleting files across partitions</li><li>Fixing downstream tables, dashboards, and extracts</li><li>Hoping nothing was cached, exported, or copied elsewhere</li></ul><p>This approach is:</p><ul><li>Expensive to run</li><li>Easy to get wrong</li><li>Extremely difficult to verify end-to-end</li></ul><p>Even when everything <em>looks</em> clean, there’s no strong way to prove that every trace of the data is truly gone.</p><h4>The uncomfortable truth</h4><p>A daily analytics pipeline <strong>without a privacy strategy</strong> isn’t just incomplete. It’s a <strong>compliance liability</strong> waiting to surface.</p><h3>3. How pseudonymization/tokenization makes daily analytics compliant (without killing insights)</h3><p>To make a daily analytics pipeline viable, tokenization — also known as <strong>pseudonymization</strong> — is treated as a first-class design choice.</p><p><strong>Note:</strong> Pseudonymization is not the only option; hashing identifiers is another common approach. The two serve different purposes. Hashing is irreversible, while tokenization allows controlled reversibility through a secure mapping, which makes it more suitable for long-term analytics and compliance-driven retention.</p><h4>What tokenization means in practice</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-M4GapgAUlDHUzmRpeCKQ.png" /><figcaption><em>This mapping is stored in a secure vault so secretive that even the data doesn’t know where it lives</em></figcaption></figure><p>Instead of storing real identifiers in analytics data, the system stores <strong>tokens</strong>.</p><p>In simple terms:</p><ul><li>Real identifiers are replaced with random tokens</li><li>Tokens are meaningless on their own</li><li>Tokens are stable enough for joins, aggregations, and long-term trend analysis</li><li>The <strong>identifier-to-token mapping</strong> lives in a <strong>secure vault</strong>, isolated from analytics systems</li></ul><h4>How this changes the compliance story</h4><p>This changes compliance from a hard problem into a simple one.</p><p>When analytics data contains only tokens, historical datasets can’t be tied back to a customer without the mapping. So when a client churns, compliance doesn’t mean rewriting months of data or chasing down every partition. We <strong>delete the token mapping, and every historical record linked to that customer becomes permanently non-identifiable</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*1XbAY9uccY8R6Qus1tJypQ.png" /></figure><p>The key outcome:</p><blockquote><em>We get long-term, high-quality analytics without long-term retention of customer identity — compliance enforced by design, not cleanup.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9064105bc372" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Data to Retention: Cracking the Cohort Retention Analysis Puzzle]]></title>
            <link>https://medium.com/@soumabrata.skr/from-data-to-retention-cracking-the-cohort-retention-analysis-puzzle-bd962eff9012?source=rss-d88b78172a17------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd962eff9012</guid>
            <category><![CDATA[acquisition]]></category>
            <category><![CDATA[predictive-analytics]]></category>
            <category><![CDATA[retention-strategies]]></category>
            <category><![CDATA[cohort-analysis]]></category>
            <category><![CDATA[retention]]></category>
            <dc:creator><![CDATA[Soumabrata Sarkar]]></dc:creator>
            <pubDate>Wed, 21 May 2025 20:15:50 GMT</pubDate>
            <atom:updated>2025-05-22T05:37:05.231Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pTJ-a3TGYmeCeCexIEBAjA.png" /><figcaption>Rise of the Planet of the Metrics: Teaching Caesar why monkey churn is bananas.</figcaption></figure><p>After diving deep into the world of <strong>cohort retention analysis</strong> and wading through countless resources, I realized one thing: there’s a lot of noise out there. So, I decided to distill everything I’ve learned into one clear guide. In this article, we’ll break down the retention puzzle piece by piece — what it is, why it matters, and how to decode it using real data, real visuals, and real SQL. Whether you’re a data nerd or product strategist, you’ll find something here to sharpen your retention game.</p><p><strong>Ready to turn data into decisions? Let’s dive in!</strong></p><h3>What is Retention Rate?</h3><p>In simple terms, <strong>retention rate</strong> is the percentage of customers who continue to engage with a product or service over a certain period. It’s a key metric for businesses that rely on repeat customers or ongoing subscriptions — think streaming services like Netflix or Spotify, where customers renew their subscriptions regularly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bx3zWw9KXbI1M3i6myGiUw.png" /></figure><p>But retention doesn’t stop at subscription models. Consider your favorite online clothing store — those loyal customers who return season after season, or even a fitness app that keeps users active long after they’ve started using it. For companies that sell durable products, like furniture or electronics, retention rate can also track the success of extended warranties or service agreements, ensuring customers keep coming back for maintenance or upgrades.</p><h3>Why customer Retention Rate is a game-changer for business</h3><p>Customer retention isn’t just a metric — it’s a <strong>powerful predictor of long-term success</strong>. Here’s why every smart business is obsessed with it:</p><h4>1. Small Gains, Big Profits</h4><p>A <strong>mere 5% boost in retention</strong> can drive profits up by <strong>25% or more</strong> (Bain &amp; Company). Why? Loyal customers <strong>trust your brand</strong>, spend more over time, and are more likely to explore your other products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*XiNZHJJnO-Rx6ZCHA1NSag.png" /><figcaption>Research done by Frederick Reichheld of Bain &amp; Company (Loyalty Rules!)</figcaption></figure><h4>2. It’s the ultimate product reality check</h4><p>Acquisition can bring in short-term wins, but <strong>retention proves value</strong>. If customers keep coming back, it means your product is truly solving their problems — <strong>not just once, but consistently</strong>.</p><h4>3. It’s cheaper to keep them</h4><p>Acquiring a new customer can cost <strong>up to 7x more</strong> than retaining an existing one. Your current users already know you. Skip the expensive ad campaigns — just <strong>keep adding value</strong> and they’ll stay.</p><h4>Bottom Line:</h4><p>Retention is your <strong>fastest route to growth</strong>, your <strong>cheapest strategy</strong>, and your <strong>clearest signal of product-market fit</strong>. Don’t just chase new users — <strong>nurture the ones you have.</strong></p><h3><strong>How to calculate customer Retention Rate?</strong></h3><p>To measure retention over a specific period, you’ll need just three numbers:</p><ol><li>Customers at the <strong>start</strong> of the period (or at the <strong>end of a ‘previous period’</strong>)</li><li><strong>New</strong> customers acquired during the period</li><li>Customers remaining at the <strong>end</strong> of the period</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pl9CkiPp5WBpr5jvSiWyVQ.jpeg" /><figcaption>Retention Rate Formula</figcaption></figure><p>Note: Period could be a day, a month or a year</p><h4>Real-World Example</h4><p>Let’s say you’re running a SaaS company and want to evaluate your customer retention for the past year. Here’s what the data shows:</p><ul><li>You started the year with <strong>521</strong> customers</li><li>You acquired <strong>66</strong> new customers throughout the year</li><li>You ended the year with <strong>490</strong> total customers</li></ul><p>Now plug that into the formula:</p><pre>Retention Rate = ((490 - 66) / 521) × 100 = 81.3%</pre><p><strong>Result:</strong> Your customer retention rate is <strong>81%</strong>. That’s a solid number! Most industries consider <strong>anything above 75% a strong sign of customer satisfaction, loyalty, and long-term growth potential</strong>.</p><h3>Why just knowing the Retention Rate isn’t enough?</h3><p>While the retention rate formula gives a quick snapshot of how many users are sticking around, it <strong>doesn’t show <em>who</em> is staying, <em>when</em> people are dropping off, or <em>why</em></strong>. It treats all users as one homogenous group — and that’s where valuable insights can get lost.</p><p>To dig deeper into user behavior and make more strategic product decisions, we need to <strong>segment users based on shared characteristics and track how their engagement evolves over time</strong>. That’s where <strong>cohort analysis</strong> becomes incredibly powerful.</p><p>At a high level, <strong>cohort analysis helps answer questions like:</strong></p><ul><li>How do users who signed up in January behave vs. those in March?</li><li>Are users who completed onboarding more likely to stick around?</li><li>Which features actually contribute to long-term retention?</li></ul><p>By breaking down behavioral data into distinct <strong>user cohorts</strong>, teams can uncover <strong>patterns of retention and churn</strong> that aren’t visible in overall metrics. This technique — especially when used for <strong>cohort-based retention analysis</strong> — allows product teams to <strong>pinpoint what keeps users engaged and where the drop-offs begin</strong>.</p><h3>What is a Cohort &amp; What exactly is Cohort Analysis?</h3><p>Before we dive into different types of cohort analysis, let’s first break down what a <strong>cohort</strong> really is and how <strong>cohort analysis</strong> helps us understand user behavior more meaningfully.</p><p><strong>What Is a Cohort?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tKnyKdjXEOuHX60-ZU1SMw.png" /></figure><p>A <strong>cohort</strong> is simply a group of users who share a common characteristic or behavior within a specific time frame. These shared traits could be:</p><ul><li>Users who signed up in the same week or month</li><li>Users using iOS devices</li><li>Or even users who completed a key action, like sharing a song or finishing onboarding</li></ul><p>In short, cohorts help you segment your user base into more meaningful, behavior-driven groups.</p><p><strong>What Is Cohort Analysis?<br>Cohort analysis</strong> is the practice of studying these groups over time to understand how they interact with your product — and more importantly, how that interaction evolves. It’s a powerful method of uncovering patterns around:</p><ul><li><strong>Engagement</strong>: What actions are users taking inside the app? Are they completing levels, sharing content, or returning daily?</li><li><strong>Conversion</strong>: Are different cohorts responding better to certain features or offers?</li><li><strong>Retention</strong>: Which groups continue to use your product over time, and which ones drop off?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IxgEIC2DOW9xIt5FG1ObTg.png" /><figcaption>Power Users consistently show stronger conversion across the funnel, especially at the add-to-cart stage</figcaption></figure><p>In the above chart, while both cohorts engage with product details similarly, the final step highlights Power Users as more decisive.</p><p>This gap reveals actionable insights — and more importantly, the <strong>value of cohort analysis</strong> in identifying behavioral drop-offs. By addressing these gaps, product teams can take <strong>targeted steps to reduce churn and drive better retention outcomes</strong>.</p><h3>So, What kind of cohorts should you track?</h3><p>There are many ways to slice and analyze your user base, but when it comes to understanding retention, <strong>three cohort types stand out as especially powerful</strong>. They’re not the only ones you can explore — but they form the core foundation for meaningful, actionable retention analysis:</p><ol><li><strong>Acquisition cohorts</strong> — When users signed up</li><li><strong>Behavioral cohorts</strong> — What users did</li><li><strong>Predictive cohorts</strong> — What users are likely to do next</li></ol><h3>1. Acquisition Cohorts: Tracking retention over time</h3><p>Acquisition cohorts help answer a fundamental retention question: <strong>How long do users stick around after signing up?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p2-16UKVbMwvoaIj" /><figcaption><strong>Retention curve patterns:</strong> Declining shows steady churn, Flattening indicates stable users, and Smiling reflects re-engagement over time</figcaption></figure><p>By grouping users based on their sign-up date, acquisition cohorts give you a clear view of your users’ lifecycle — especially <strong>when they tend to churn</strong>. This is incredibly valuable for spotting patterns and assessing the impact of specific marketing campaigns or onboarding efforts. The best way to visualize this information is to <a href="https://help.amplitude.com/hc/en-us/articles/360050153151"><strong>turn it into a retention analysis curve</strong></a>, which shows your retention for these cohorts over time.</p><p>In this context, let’s look at <strong>Lockly</strong> — a mobile lockscreen app that turns the lockscreen into a dynamic canvas of rotating wallpapers, subtle ads, and personalized content. Every swipe becomes an opportunity for engagement and monetization.</p><p>Now, let’s dive into what the acquisition retention curve reveals about Lockly’s user journey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*9y6kooAsFj53iwegC41yuQ.png" /><figcaption>This ‘acquisition retention curve’ shows how users acquired on Jan 21, 2025, engaged with <strong>Lockly</strong>, a mobile lockscreen ad monetization app</figcaption></figure><p>The retention curve above tells a familiar story: <strong>user drop-off is steepest in the first few days after sign-up</strong>. For Lockly, most users churn between <strong>Day 0 and Day 3</strong>, with retention stabilizing around <strong>40–45% by Day 30</strong>. This early drop indicates that <strong>users are not experiencing the app’s core value quickly enough</strong>.</p><p>Improving this Day 0–Day 3 experience — through faster onboarding, personalized lockscreen content, or interactive features — can have a meaningful impact on long-term retention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xmwjnP9BQ8kkWO8v8UNVSw.png" /><figcaption>Acquisition Cohort Analysis (SQL Code 1) — Identify Cohorts and Compute Day-level User Retention</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AAZkae-y7zFA4rFin8rZug.png" /><figcaption>Acquisition Cohort Analysis (SQL Code 2) — Summarize Retention % by Key Post-Signup Days</figcaption></figure><h4>The limitation of Acquisition Cohorts</h4><p>While acquisition cohorts are powerful for <strong>spotting when users churn</strong>, they fall short of telling you <strong>why</strong>.</p><p>You can see trends — for example, one cohort performing worse than others — but you can’t pinpoint whether it was due to a broken feature, confusing UX, or missing content. There’s <strong>no behavioral context</strong>, making it hard to act on the insight.</p><p>To go deeper, we now need to turn to <strong>behavioral cohort analysis</strong> — where we group users not just by <em>when</em> they arrived, but by <em>what they did</em>. This opens up a world of actionable insights.</p><h3>2. Behavioral Cohorts: Uncover what drives retention</h3><p>Behavioral cohorts help answer a deeper retention question: <strong>What actions do users take that make them stick around?</strong><br>Retention behavior patterns: Some actions drive engagement, others signal drop-off — identifying the right ones is key to growth.</p><p>By grouping users based on <strong>in-app behavior</strong> rather than signup date, behavioral cohorts allow you to understand <strong>how user engagement influences retention</strong>. Whether it’s favoriting songs, joining communities, or completing onboarding steps, these cohorts highlight which actions correlate with long-term stickiness.</p><p>This analysis helps product teams move beyond “when” users churn to <strong>“why” they churn</strong> — making it an essential tool for refining onboarding, nudging feature adoption, and crafting personalized experiences. The best way to leverage this insight is to <strong>compare retention curves across behavioral cohorts </strong>— showing how users who take specific actions (or don’t) retain differently over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*iVU3kAdLt8cFoeAfDQjYnw.png" /><figcaption>User Retention by Wallpaper Behavior Cohorts</figcaption></figure><p>This behavioral cohort analysis highlights the impact of wallpaper engagement on user retention in Lockly. Users who retain the <strong>default wallpaper</strong> consistently demonstrate the <strong>highest retention rates</strong>, maintaining above <strong>30% by Day 30</strong> and showing strong long-term stability.</p><p>The <strong>Personal Wallpaper Users</strong> (gray line), who opt out of Lockly’s content entirely, show the <strong>lowest retention</strong>, with nearly 70% churn by Day 2 and under <strong>20% by Day 30</strong>. This steep drop suggests weaker engagement with the app’s core experience.</p><p>This analysis indicates that users who engage with Lockly’s visual content ecosystem are more likely to stay retained. Encouraging interaction with Lockly-provided wallpapers during onboarding may help strengthen early user retention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QXQPVAqpRO-OKyMninb22A.png" /><figcaption>Behavioral Cohort Analysis (SQL Code 1) — Identify Cohorts and Compute Day-level User Retention</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xelXaw8aOrJzrsY3D-dH2Q.png" /><figcaption>Behavioral Cohort Analysis (SQL Code 2) — Summarize Retention % by Key Cohort/Behavior Type</figcaption></figure><h4>The limitation of Behavioral Cohorts</h4><p>While behavioral cohort analysis helps uncover <strong>what engaged users do</strong>, it doesn’t necessarily explain <strong>why</strong> those actions improve retention.</p><p>You might find that users who keep the <strong>default Lockly wallpaper</strong> or occasionally switch between <strong>default and personal wallpapers</strong> tend to stick around longer. But that doesn’t mean nudging every user to avoid personalizing their wallpaper will automatically improve retention.</p><p>That’s because <a href="https://amplitude.com/blog/causation-correlation"><strong>correlation does not imply causation</strong></a><strong>. </strong>Users who stick with the default setup may already be more engaged or easier to retain for other reasons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/0*o75WLbn2n8zCARyo.png" /></figure><p>To know whether encouraging default wallpaper usage truly drives retention, you’d need to validate it through <strong>experiments like A/B testing</strong>, not assumptions.</p><h3><strong>3. Predictive Cohort Experiment: Who’s likely to stay or churn?</strong></h3><p>Predictive cohorts help answer a forward-looking retention question: <strong>Which users are most likely to stick around, and which are at risk of churning?</strong></p><p>Prediction models surface at-risk users early, enabling timely interventions — but require volume and experimentation to be truly effective. Whether it’s sending the right nudge, personalizing incentives, or reducing acquisition waste, predictive cohort analysis helps you move from <strong>reactive to proactive retention strategy</strong>.</p><p>For example, you could target a <strong>personalization campaign</strong> to the <strong>top 5% of users most likely to remain engaged for 30+ days</strong> — these are likely <strong>Default Wallpaper Users</strong> or <strong>Mixed Users</strong> who interact regularly with Lockly’s wallpapers. A subtle push notification encouraging them to “Try Lockly’s new premium wallpapers” or “Unlock a curated daily visual” could deepen their engagement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*2_By1JCuo8mizEvKT_kCOw.png" /><figcaption>Action Plan: Campaign Based on Predictions</figcaption></figure><p>At the same time, you could identify the <strong>bottom 20% of users</strong>, such as <strong>Personal Wallpaper Users</strong>, who are <strong>least likely to retain</strong> based on predictive signals. For this group, it might not make sense to invest in standard engagement campaigns. Instead, you could test <strong>stronger incentives</strong>, like offering an <strong>exclusive animated wallpaper pack</strong> or a <strong>limited-time free premium trial</strong> — something compelling enough to reintroduce them to Lockly’s ecosystem and reignite usage.</p><h4>The limitation of Predictive Cohorts</h4><p>While predictive cohorts can forecast which users are likely to stick around or convert, they come with two key challenges: <strong>data volume</strong> and <strong>lack of interpretability</strong>.</p><p>First, predictive models need a <strong>large dataset</strong> to be effective — often tens or hundreds of thousands of users. If your product doesn’t have enough active users or historical behavior data, the insights may be unreliable or too generalized to act on.</p><p>Second, the predictions are <strong>opaque</strong>. Machine learning models can identify high-retention or high-churn users, but they won’t tell you <em>why</em> those users behave the way they do. You might know who is likely to churn — but not what changes will move someone from the “at-risk” group into “likely to retain.”</p><p>This makes predictive cohorts ideal for <strong>targeting</strong>, but limited when it comes to <strong>understanding</strong> or <strong>shaping behavior</strong>. To turn predictions into impact, you’ll still need <strong>experiments</strong> and <strong>behavioral analysis</strong> to guide your next steps.</p><h3>That’s a Wrap!</h3><p>If you’ve made it this far — thank you.<br>This guide was born out of countless hours spent digging through blogs, docs, dashboards, and data rabbit holes, just trying to make sense of what <em>actually</em> drives retention. I’ve done my best to pull all those threads together into something clear, honest, and actionable.</p><p>Retention isn’t just numbers on a chart. It’s about understanding people — their behavior, their needs, their journey. And cohort analysis, when done right, is one of the sharpest tools we’ve got to do that.</p><p>If anything felt unclear, if you have thoughts, questions, or even just want to jam on ideas — <strong>my DMs are open</strong>. I’d genuinely love to hear from you.</p><p><strong>Hope you found value here and that you enjoyed the read.</strong><br>And most of all, <strong>happy learning</strong>.</p><h3>References &amp; Sources</h3><ol><li><strong>Bain &amp; Company</strong> — <em>Loyalty Rules!</em> by Frederick Reichheld</li><li><strong>Amplitude Cohort Analysis Blog</strong> — <a href="https://amplitude.com/blog/cohorts-to-improve-your-retention#how-to-build-a-retention-strategy-using-cohort-analysis">https://amplitude.com/blog/cohorts-to-improve-your-retention#how-to-build-a-retention-strategy-using-cohort-analysis</a></li><li><strong>Retention and Cohort Analysis with Bei Lu</strong> (<a href="https://www.youtube.com/watch?v=VvYV0V-kxr0">https://www.youtube.com/watch?v=VvYV0V-kxr0</a>)</li><li><strong>ProductPlan Resources</strong> — <a href="https://www.productplan.com/glossary/retention-rate/">https://selectfrom.dev/performing-cohort-retention-analysis-using-sql-afe1b268dbf9</a></li><li><a href="https://canonicalized.com/cohort-analysis/?section=cohorts">https://canonicalized.com/cohort-analysis/?section=cohorts</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd962eff9012" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>