<?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 Sai Mounica Gudimella on Medium]]></title>
        <description><![CDATA[Stories by Sai Mounica Gudimella on Medium]]></description>
        <link>https://medium.com/@mounicag?source=rss-1655d347051e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7auoQJAOUwy2glTlK8Z0Mg.jpeg</url>
            <title>Stories by Sai Mounica Gudimella on Medium</title>
            <link>https://medium.com/@mounicag?source=rss-1655d347051e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 08:41:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mounicag/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[Sampling Distributions and the Central Limit Theorem: Why Bigger Samples Make Us Smarter]]></title>
            <link>https://mounicag.medium.com/sampling-distributions-and-the-central-limit-theorem-why-bigger-samples-make-us-smarter-18e4842bdb7e?source=rss-1655d347051e------2</link>
            <guid isPermaLink="false">https://medium.com/p/18e4842bdb7e</guid>
            <category><![CDATA[central-limit-theorem]]></category>
            <category><![CDATA[application]]></category>
            <category><![CDATA[expected-value]]></category>
            <category><![CDATA[sampling]]></category>
            <category><![CDATA[law-of-large-number]]></category>
            <dc:creator><![CDATA[Sai Mounica Gudimella]]></dc:creator>
            <pubDate>Wed, 09 Jul 2025 21:31:42 GMT</pubDate>
            <atom:updated>2025-07-09T21:31:42.051Z</atom:updated>
            <content:encoded><![CDATA[<p>We know about using data from a <strong>sample</strong> to understand a larger <strong>population</strong>. But what happens when you take multiple samples? How consistent are those sample estimates?</p><p>Welcome to the world of <strong>sampling distributions</strong>, <strong>standard error</strong>, and the powerful <strong>Central Limit Theorem (CLT)</strong> — concepts that explain why we can trust our sample-based estimates if done right.</p><h3>Parameters vs. Statistics: The Foundation</h3><p>Let’s start with two essential terms:</p><ul><li>A <strong>parameter</strong> is a fixed (but usually unknown) number that describes a <strong>population</strong> — e.g., the <strong>population mean μ</strong> or <strong>standard deviation σ</strong>.</li><li>A <strong>statistic</strong> is a number calculated from a <strong>sample</strong> — like the <strong>sample mean x</strong> or <strong>sample standard deviation s</strong>.</li></ul><p>We use statistics as <strong>estimates</strong> of parameters.</p><p>But here’s the catch: if we draw different samples, the statistic (like x) will vary. This variation is captured by the <strong>sampling distribution</strong>.</p><h3>Expected Value and Standard Error</h3><ul><li>The <strong>expected value</strong> of a statistic is the long-run average value we would get if we took <strong>infinitely many samples</strong>.<br>For sample means:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*2AFhInDfTranoPK3FtJzhg.png" /></figure><ul><li>The <strong>Standard Error (SE)</strong> measures <strong>how much a sample statistic is expected to vary</strong> from sample to sample. For the sample mean:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/226/1*gZBPH0ktan87qY82Tn7lzA.png" /></figure><p>where:</p><ul><li>σ : population standard deviation</li><li>n: sample size</li></ul><p><em>The larger the sample size, the </em><strong><em>smaller</em></strong><em> the standard error — meaning the estimate is more precise.</em></p><h3>Square Root Law</h3><p>The <strong>variability of the sum of n</strong> independent random draws increases at a rate of sqrt(n).</p><p>This helps explain why <strong>SE decreases with larger sample size</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/167/1*LgO4vvKAejJgkEL9gVD0ZA.png" /></figure><p>Importantly, <strong>standard error does not depend on the size of the population</strong>, only on the size of the sample.</p><h3>Simulating Sampling Distributions</h3><p>When we simulate repeated random sampling from a population (or from a probability histogram), we get a <strong>sampling distribution</strong> of the statistic — a new histogram showing:</p><ol><li>How often each value of the statistic appears</li><li>How spread out or clustered those values are</li><li>The shape — which becomes more bell-shaped as the sample size increases</li></ol><h3>Law of Large Numbers</h3><p>This is one of the most intuitive but important statistical principles:</p><p><em>As the </em><strong><em>sample size increases</em></strong><em>, the </em><strong><em>sample mean</em></strong><em> gets closer to the </em><strong><em>population mean</em></strong><em>.</em></p><p>But note:</p><ul><li>It applies only to <strong>averages and percentages</strong>, <strong>not</strong> to sums.</li><li>It assumes <strong>sampling with replacement</strong> or from simulated data.</li></ul><h3>The Central Limit Theorem (CLT)</h3><p>The <strong>Central Limit Theorem</strong> is one of the most powerful ideas in statistics. It says:</p><blockquote><em>Regardless of the shape of the population distribution, the </em><strong><em>sampling distribution of the sample mean</em></strong><em> becomes approximately </em><strong><em>normal</em></strong><em> as the sample size increases.</em></blockquote><p>If you take <strong>many samples</strong> and calculate the <strong>mean of each</strong>, then:</p><ul><li>The distribution of those sample means will look more and more like a <strong>bell curve (normal distribution)</strong> as your sample size increases.</li></ul><h3>Conditions for CLT to apply:</h3><ul><li>The sample size n is <strong>reasonably large</strong> (typically n≥30 is considered sufficient)</li><li>Samples are <strong>independent</strong></li><li>Data is <strong>randomly drawn</strong> (ideally with replacement or from a large population)</li></ul><h3>Example: Applying CLT</h3><p>Suppose:</p><ul><li>Population mean height μ=170 cm</li><li>Population SD σ=10 cm</li><li>Sample size n=100</li></ul><p>then:</p><ul><li>Sampling distribution of sample mean x will be approximately normal</li><li>Mean of the distribution = 170 cm</li><li>SE = 10/sqrt(100) ​= 1 cm</li></ul><p>So, the chance that x falls within 2 SEs of the mean:</p><ul><li>95% of sample means will fall between <strong>168 cm and 172 cm</strong></li></ul><p>Even if the original height distribution is skewed or irregular, the <strong>sampling distribution</strong> of x will still look like a normal curve — that’s the magic of CLT.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18e4842bdb7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Binomial Probability and Normal Approximation]]></title>
            <link>https://mounicag.medium.com/understanding-binomial-probability-and-normal-approximation-4fc05c74d4b0?source=rss-1655d347051e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fc05c74d4b0</guid>
            <category><![CDATA[binomial-distribution]]></category>
            <category><![CDATA[binomial-probability]]></category>
            <category><![CDATA[discrete]]></category>
            <category><![CDATA[normal-distribution]]></category>
            <category><![CDATA[probability]]></category>
            <dc:creator><![CDATA[Sai Mounica Gudimella]]></dc:creator>
            <pubDate>Sat, 05 Jul 2025 13:41:40 GMT</pubDate>
            <atom:updated>2025-07-05T13:41:40.911Z</atom:updated>
            <content:encoded><![CDATA[<p>In the previous post, we explored the normal curve and how it helps us understand continuous data. Now, let’s switch gears to a distribution that deals with discrete outcomes — the binomial distribution.</p><p>Think of flipping a coin, taking a test, or checking whether an email is spam or not. These are all examples of binary outcomes: success or failure, yes or no, 1 or 0.</p><p>Let’s break down what a binomial setting looks like, how to compute binomial probabilities, and when we can approximate them using the normal curve.</p><h3>The Binomial Setting</h3><p>A scenario follows a binomial setting if it satisfies all four of these conditions:</p><ul><li>Binary: Each trial results in a success or a failure.</li><li>Independent: Each trial does not affect the next.</li><li>Number: The number of trials, 𝑛, is fixed in advance.</li><li>Same Probability: The probability of success, 𝑝, stays the same for each trial.</li></ul><p><strong>Example:</strong><br>Suppose you flip a fair coin 10 times and count how many times you get heads. This is a binomial setting because:</p><ul><li>There are 10 fixed trials (flips).</li><li>Each flip is independent.</li><li>Each outcome is either a success (heads) or failure (tails).</li><li>The probability of success (heads) is 0.5 each time</li></ul><p><strong>The Binomial Probability Formula</strong><br>To calculate the probability of getting exactly 𝑘 successes in 𝑛 trials, we use:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*uaXyje6noYqTRyzvR6c8XQ.png" /></figure><p>where:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/226/1*6E_GYCU8OR_mVPcpvpABRQ.png" /></figure><p><strong>Example:</strong><br>What’s the probability of getting exactly 6 heads in 10 flips of a fair coin?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*OgY5DCVYQc8b6e16YrmjKg.png" /></figure><p>So, there’s about a 20.5% chance of getting exactly 6 heads in 10 flips.</p><p><strong>When Can We Use a Normal Approximation?</strong><br>Calculating binomial probabilities by hand gets hard quickly as 𝑛 increases. That’s where the normal approximation to the binomial comes in.</p><p>Conditions for using normal approximation:</p><p>n⋅p ≥ 10 ; n⋅(1−p) ≥ 10</p><p>If both are true, the binomial distribution is approximately normal.</p><p><strong>Applying the Normal Approximation to the Binomial</strong><br><br>1. Check conditions (above)</p><p>2. Compute the mean and standard deviation: μ=n⋅p ; σ = n⋅p⋅(1−p)</p><p>3. Apply a continuity correction: Use P(X ≤ k+0.5) or P(X ≥ k−0.5)</p><p>4. Standardize with Z-score: Z = (X−μ)/σ<br>​<br>5. Use a Z-table or calculator to find probabilities.</p><p><strong>Example:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*jZBRjUlbl1O69XfDBkkPUw.png" /></figure><p>What’s the probability of getting at most 65 successes?</p><p>Apply continuity correction: use 𝑋 = 65.5<br>Z = (65.5−60)/4.9 ≈1.12<br>From the Z-table: P(Z≤1.12) ≈ 0.8686<br>So, the probability of getting 65 or fewer successes is about 86.9%.</p><h3>Final Thoughts</h3><p>The binomial distribution is ideal for modeling scenarios with clear-cut outcomes like clicks vs. no clicks, pass vs. fail, or spam vs. not spam.</p><p>When the sample size is large enough, we can simplify calculations using the normal approximation — blending the power of discrete and continuous probability.</p><p>By understanding both, you’re well-equipped to handle uncertainty whether it shows up in user behavior analysis, A/B tests, or algorithm design.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fc05c74d4b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Normal Curve: How Bell-Shaped Distributions Make Data Predictable]]></title>
            <link>https://mounicag.medium.com/the-normal-curve-how-bell-shaped-distributions-make-data-predictable-66918a899f44?source=rss-1655d347051e------2</link>
            <guid isPermaLink="false">https://medium.com/p/66918a899f44</guid>
            <category><![CDATA[bell-curve]]></category>
            <category><![CDATA[normalization]]></category>
            <category><![CDATA[z-score]]></category>
            <category><![CDATA[percentiles]]></category>
            <category><![CDATA[normal-curve]]></category>
            <dc:creator><![CDATA[Sai Mounica Gudimella]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 16:40:02 GMT</pubDate>
            <atom:updated>2025-07-04T16:40:02.021Z</atom:updated>
            <content:encoded><![CDATA[<p>One concept that keeps showing up in Statistics is — the Normal Curve. Also known as the bell curve, it plays a foundational role in everything from understanding natural variation to calculating probabilities in machine learning models.</p><p>In this post, let’s go through the normal distribution, the empirical rule, and how to use Z-scores to find percentages and percentiles — all without needing a PhD in math.</p><p><strong>What is the Normal Curve?</strong><br>The normal distribution is a symmetrical, bell-shaped curve that shows how data tends to cluster around a central value (the mean) and taper off as you move away from it.</p><p>It’s common in real-world data: heights, test scores, measurement errors — all often follow this pattern.</p><h3>The Empirical Rule (68–95–99.7 Rule)</h3><p>If a dataset is normally distributed, we can make the following conclusions:</p><ul><li>68% of data lies within 1 standard deviation (SD) of the mean</li><li>95% lies within 2 SDs</li><li>99.7% lies within 3 SDs</li></ul><p><strong>Example:</strong><br>Let’s say the average adult height is: Mean = 170 cm, SD = 10 cm</p><p>According to the empirical rule: 95% of people are between:</p><p>170 − 2(10) = 150 cm and 170 + 2(10) = 190 cm<br>So, 95% of adults are between 150 cm and 190 cm tall, assuming the data follows a normal distribution.</p><h3><strong>Standardizing Data: The Z-Score</strong></h3><p>To compare values from different distributions (or find probabilities under the normal curve), we use Z-scores.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/207/1*mo0ifbat8Ml1tDO5ndliVA.png" /><figcaption>Z score</figcaption></figure><p>where:</p><p>X = observed value<br>μ = mean<br>σ = standard deviation</p><p>The Z-score tells you how many SDs a value is from the mean.</p><p><strong>Example:</strong><br>If someone is 190 cm tall:</p><p>Z = (190−170)/10 = 2<br>This means the person is 2 standard deviations above the mean.</p><h3>The Standard Normal Curve</h3><p>When we standardize data, we convert it to the standard normal distribution, which always has:</p><p>Mean = 0 ; Standard deviation = 1</p><p>Once standardized, we can use Z-tables or software to find areas under the curve (i.e., probabilities or percentiles).</p><h4>Normal Approximation: Step-by-Step</h4><p>To find the percentage of a population within a range:</p><ol><li>Standardize the values using the Z-score formula</li><li>Sketch or visualize the standard normal curve</li><li>Determine the area under the curve between the Z-scores</li><li>Use a Z-table or calculator to get the values</li></ol><p><strong>Example:</strong><br>If we want to know what percent of people are between 160 cm and 180 cm:</p><p>𝑍1 = (160−170)/10 = −1 and 𝑍2 = (180 − 170)/10 = 1<br>from the Z-table: Area between -1 and 1 = 68%</p><p>So, 68% of the population is between 160 cm and 180 cm in height.</p><h4>Computing Percentiles from Normal Data</h4><p>If you’re given a Z-score and asked to find the corresponding value (X), use:</p><p>X=μ+Z⋅σ</p><p><strong>Example:</strong><br>What height corresponds to the 90th percentile in our height example?<br>From the Z-table:</p><p>90th percentile → 𝑍 ≈ 1.28 then:</p><p>X=170+1.28⋅10=182.8 cm<br>So, someone at the 90th percentile is about 182.8 cm tall.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66918a899f44" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Is Data Produced? Understanding the Role of Statistics in Drawing Meaningful Conclusions]]></title>
            <link>https://mounicag.medium.com/how-is-data-produced-understanding-the-role-of-statistics-in-drawing-meaningful-conclusions-37f3ce244fd1?source=rss-1655d347051e------2</link>
            <guid isPermaLink="false">https://medium.com/p/37f3ce244fd1</guid>
            <category><![CDATA[bias]]></category>
            <category><![CDATA[causation]]></category>
            <category><![CDATA[statistical-inference]]></category>
            <category><![CDATA[experimental-design]]></category>
            <category><![CDATA[sampling]]></category>
            <dc:creator><![CDATA[Sai Mounica Gudimella]]></dc:creator>
            <pubDate>Mon, 30 Jun 2025 16:49:07 GMT</pubDate>
            <atom:updated>2025-06-30T16:49:07.388Z</atom:updated>
            <content:encoded><![CDATA[<p>As someone diving deeper into data science, I’ve realized that <strong>producing data</strong> isn’t just about collecting numbers. It’s about doing it in a smart, unbiased, and statistically sound way so that the conclusions we draw actually reflect reality.</p><p>Whether we’re trying to understand if a new product feature is being adopted or exploring which marketing campaign performed better, <strong>statistics gives us the power to answer big questions with small, well-collected samples</strong>.</p><p>Let me break down how data is produced and why <strong>statistical thinking is essential</strong> for making sense of it.</p><h3>The Power of Statistics: From Sample to Population</h3><p>Imagine trying to find out whether users like a new app feature. Surveying every single user (the entire <strong>population</strong>) would be costly and time-consuming. That’s where statistics comes in.</p><p>Instead, we take a <strong>sample</strong> — a smaller, manageable group — and make inferences about the broader population. This process hinges on four key concepts:</p><ol><li><strong>Population</strong> — The full group we want to learn about.</li><li><strong>Parameter</strong> — The actual value or metric we’re trying to measure in the population (like adoption rate).</li><li><strong>Sample</strong> — A subset of the population we actually collect data from.</li><li><strong>Statistic (Estimate)</strong> — The measurement we compute from the sample, used as an estimate for the population parameter.</li></ol><p>This approach allows us to <strong>make well-informed decisions without needing data from everyone</strong>, as long as we sample correctly.</p><h3>Sampling: Getting It Right Matters</h3><p>How we select our sample can make or break the validity of our conclusions. Poor sampling introduces <strong>bias</strong>, which distorts the truth. Here are some common types:</p><ul><li><strong>Selection Bias</strong>: Favoring a particular group, such as only sampling from urban areas in a country-wide survey.</li><li><strong>Non-Response Bias</strong>: If surveys sent in the evening are mostly answered by singles and not by parents, the results will skew.</li><li><strong>Voluntary Response Bias</strong>: When only people with strong opinions (positive or negative) choose to respond, like in product reviews.</li></ul><h3>So, how do we avoid bias?</h3><p>The answer lies in using <strong>chance</strong> to drive sample selection. Two common strategies are:</p><ol><li><strong>Simple Random Sampling</strong>: Every subject has an equal chance of being selected. It’s straightforward and powerful.</li><li><strong>Stratified Random Sampling</strong>: The population is divided into meaningful groups (e.g., age groups or income brackets), and samples are randomly selected within each. This ensures representation across key segments.</li></ol><h3>Bias vs. Chance Error: What’s the Difference?</h3><p>Even with random sampling, <strong>estimates will rarely match the true population parameter exactly</strong> — that’s called <strong>chance error</strong> or <strong>sampling error</strong>.</p><p>There’s a simple formula:<br><strong>Estimate = Parameter + Bias + Chance</strong></p><ul><li><strong>Chance error</strong> can be reduced by increasing the <strong>sample size</strong>. It’s random and often measurable.</li><li><strong>Bias</strong>, however, is systematic and harder to detect. If your sampling method is flawed, collecting more data just amplifies the error — not fix it.</li></ul><h3>Association vs. Causation: Why Experiments Matter</h3><p>Just because two variables move together doesn’t mean one causes the other. That’s where <strong>confounding factors</strong>, or <strong>lurking variables</strong>, come in. They might explain away what seems like a causal relationship.</p><p>To truly establish <strong>causation</strong>, we need to go beyond observation and conduct <strong>experiments</strong>.</p><p>The gold standard? A <strong>randomized controlled experiment</strong>, where:</p><ul><li>Participants are <strong>randomly assigned</strong> to either a <strong>treatment group</strong> (receives the intervention) or a <strong>control group</strong> (does not).</li><li>The setup is <strong>double-blind</strong>, meaning neither participants nor evaluators know who’s in which group.</li><li>The control group may receive a <strong>placebo</strong>, simulating the experience of the treatment without any real effect.</li></ul><p>This helps ensure <strong>everything else is held constant</strong>, and any observed difference can confidently be attributed to the treatment itself.</p><h3>Final Thoughts</h3><p>Producing data isn’t just about logging events or recording survey responses — it’s about <strong>designing how we collect it</strong> so the insights we derive are reliable, accurate, and actionable.</p><p>By understanding concepts like <strong>sampling, bias, statistical inference, and experimental design</strong>, we can move from simply describing what’s happening to understanding <strong>why</strong> it’s happening — and what to do next.</p><p>Data science may be powered by algorithms, but it’s <strong>guided by statistics</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37f3ce244fd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Do We Need Statistics in Data Science?]]></title>
            <link>https://mounicag.medium.com/why-do-we-need-statistics-in-data-science-ec822387179e?source=rss-1655d347051e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec822387179e</guid>
            <category><![CDATA[standard-deviation]]></category>
            <category><![CDATA[summary-statistics]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[descriptive-statistics]]></category>
            <dc:creator><![CDATA[Sai Mounica Gudimella]]></dc:creator>
            <pubDate>Fri, 27 Jun 2025 00:20:11 GMT</pubDate>
            <atom:updated>2025-06-27T00:20:11.040Z</atom:updated>
            <content:encoded><![CDATA[<p>When I first stepped into the world of data science, I was fascinated by the buzz around machine learning algorithms, predictive models, and artificial intelligence. But the deeper I ventured, the clearer it became - <strong>statistics is the bedrock</strong> of everything we do with data.</p><p>In this article, I want to share <strong>why statistics is crucial in data science</strong>, and how even the most powerful models rely on solid statistical foundations to make sense of the world.</p><h3>Statistics Is More Than Just Numbers</h3><p>At its core, statistics does three incredibly important things for data scientists:</p><ol><li><strong>It helps us assess if our data is sufficient</strong> to answer the questions we’re asking. Without this step, we might end up drawing conclusions from weak or biased samples.</li><li><strong>It provides a framework to quantify uncertainty.</strong> In real-world data, there’s almost never a single clear answer. Statistical tools help us communicate how confident we are in our findings.</li><li><strong>It guides how we communicate results effectively.</strong> Using the right statistical summaries and visualizations makes our insights digestible to stakeholders, clients, or even other data scientists.</li></ol><h3>Descriptive Statistics and Visualizing Data</h3><p>Before diving deep into models, descriptive statistics allow us to <strong>understand our data’s basic features</strong> and <strong>tell its story visually.</strong> Here are some tools and concepts I found particularly useful:</p><h3>Visual Tools:</h3><ul><li><strong>Pie charts &amp; dot plots</strong>: Best for <strong>categorical data</strong>, where we’re comparing proportions.</li><li><strong>Histograms</strong>: Look like bar charts, but the <strong>bar widths vary</strong> based on frequency. Ideal for showing distributions.</li><li><strong>Bar graphs</strong>: Typically used for <strong>numerical data</strong>, showing comparisons across categories.</li><li><strong>Box plots (or box-and-whisker plots)</strong>: Provide a <strong>five-number summary</strong> (minimum, Q1, median, Q3, maximum). The <strong>interquartile range (IQR)</strong> — the distance between Q1 and Q3 — shows how spread out the data is.</li><li><strong>Scatterplots</strong>: Help us <strong>visualize relationships between two variables</strong>. Great for spotting correlations or patterns.</li></ul><p>These visual tools help us <strong>summarize massive datasets</strong> quickly and give intuitive insights that numbers alone can’t always offer.</p><h3>Numerical Summary Measures</h3><p>When we need to boil data down to a few key values, numerical summaries come into play:</p><ul><li><strong>Mean (average)</strong>: The sum divided by the count.</li><li><strong>Median</strong>: The middle value in a sorted list.</li><li><strong>Mode</strong>: The most frequently occurring value.</li></ul><p>Here’s a useful tip:</p><ul><li>If the <strong>histogram is symmetric</strong>, mean ≈ median.</li><li>If the <strong>histogram is right-skewed</strong> (a long tail to the right), the mean is greater than the median — use the <strong>median</strong> here.</li><li>If the <strong>histogram is left-skewed</strong>, the mean is less than the median — again, <strong>median</strong> is more representative.</li></ul><h3>Percentiles:</h3><p>These help divide the data into chunks:</p><ul><li>25th percentile = 1st quartile (Q1)</li><li>50th percentile = 2nd quartile = median</li><li>75th percentile = 3rd quartile (Q3)</li></ul><h3>Standard Deviation:</h3><p>This measures <strong>how spread out the data is around the mean</strong>. It’s great for normally distributed data. But because it’s sensitive to outliers, if the data is skewed, we should rely more on <strong>median and IQR</strong>.</p><h3>Final Thoughts</h3><p>You don’t need to be a statistician to be a data scientist, but you do need to <strong>think like one</strong>. Whether you’re building machine learning models or presenting business insights, statistics helps you <strong>ask better questions, understand your data deeply, and explain your findings clearly</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec822387179e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Scientist Interview Guide]]></title>
            <link>https://mounicag.medium.com/data-scientist-interview-guide-11637d499696?source=rss-1655d347051e------2</link>
            <guid isPermaLink="false">https://medium.com/p/11637d499696</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[ab-testing]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Sai Mounica Gudimella]]></dc:creator>
            <pubDate>Thu, 05 Dec 2024 00:39:55 GMT</pubDate>
            <atom:updated>2024-12-05T00:39:55.064Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, I’ve compiled an exhaustive list of essential questions that serve as the foundation for data science interviews. This isn’t just a checklist; it’s an exploration of core concepts that, when deeply understood, equip you to tackle not only the questions commonly asked but also the new, complex ones that may arise. By grasping the nuances of statistics, machine learning algorithms, and model evaluation, you’ll be better prepared to handle system design and case study interviews as well. The goal is to help you build a solid conceptual framework that enables you to think critically and solve problems effectively, no matter the challenge.</p><p>Good luck!</p><h3>1. Data Science Fundamentals</h3><ul><li>What is the difference between descriptive, inferential, and predictive statistics?</li><li>Can you explain the difference between correlation and causation?</li><li>What is a confounding variable, and how do you deal with it?</li><li>What are the steps involved in a data science project from start to finish?</li><li>How do you approach problem-solving when you’re given a business problem and a dataset?</li><li>What is the role of exploratory data analysis (EDA) in a data science project?</li><li>What is the difference between a population and a sample? Why is it important to understand this in data science?</li><li>Explain the concept of sampling bias and how it can affect model performance.</li><li>What are the main differences between the different types of machine learning (supervised, unsupervised, semi-supervised, reinforcement learning)?</li></ul><h3>2. Probability and Statistics</h3><ul><li>What is a Bernoulli distribution, and when would you use it?</li><li>Explain the concept of conditional probability.</li><li>What is the difference between frequentist and Bayesian statistics?</li><li>How do you test the validity of a statistical model?</li><li>Can you explain the Law of Large Numbers and its importance in data science?</li><li>What is the difference between Type I and Type II errors?</li><li>What is a p-value? How do you interpret it in the context of hypothesis testing?</li><li>Explain what is meant by the power of a test. How can you increase it?</li><li>What is the concept of statistical significance?</li><li>What is the difference between a t-distribution and a normal distribution?</li><li>How do you calculate the variance and standard deviation of a dataset?</li><li>Explain the concept of a Bayesian prior and likelihood in Bayesian inference.</li><li>What is Monte Carlo simulation, and when would you use it?</li></ul><h3>3. Machine Learning Algorithms</h3><ul><li>Explain how k-means clustering works and how you would choose the optimal number of clusters (k).</li><li>What are decision trees, and what are some advantages and disadvantages of using them?</li><li>What is the difference between bagging and boosting? Can you give examples of algorithms that use each?</li><li>What is the Random Forest algorithm, and why is it used in practice?</li><li>Explain gradient boosting and how it differs from regular decision trees.</li><li>What is the difference between L1 and L2 regularization?</li><li>What is the difference between a linear model and a non-linear model?</li><li>What are support vector machines (SVMs), and how do they work?</li><li>Explain the concept of a kernel in SVM and give an example of when you would use a non-linear kernel.</li><li>How does a naive Bayes classifier work, and when is it appropriate to use it?</li><li>What is the concept of nearest neighbors in KNN? How does KNN differ from other classification algorithms?</li><li>What is the difference between a shallow neural network and a deep neural network?</li><li>How does a Convolutional Neural Network (CNN) work, and where is it typically used?</li><li>What is a recurrent neural network (RNN), and how is it different from a CNN?</li><li>Explain how backpropagation works in neural networks.</li><li>What is the role of activation functions in neural networks?</li><li>What are hyperparameters in machine learning, and how do you optimize them?</li></ul><h3>4. Data Preprocessing and Feature Engineering</h3><ul><li>How do you handle missing data in a dataset?</li><li>What is the difference between imputation and deletion for handling missing values?</li><li>What are some methods to handle categorical variables in machine learning models?</li><li>Explain the concept of one-hot encoding and label encoding.</li><li>How do you deal with multicollinearity in your data?</li><li>What are feature scaling and normalization? How do you perform them?</li><li>What are the advantages of using PCA (Principal Component Analysis)?</li><li>What are some common feature engineering techniques?</li><li>How would you encode a date-time column in a way that a machine learning model can understand?</li><li>What is feature selection, and why is it important?</li><li>How do you handle outliers in a dataset?</li><li>What are interaction features, and why might they be useful in a model?</li><li>How do you determine which features are the most important for a given model?</li><li>How would you deal with an imbalanced dataset?</li><li>What is the curse of dimensionality, and how do you avoid it?</li></ul><h3>5. A/B Testing and Experimental Design</h3><ul><li>How would you design an A/B test for a new feature on a website?</li><li>What is the significance of control and treatment groups in A/B testing?</li><li>How do you calculate the sample size required for an A/B test?</li><li>What are the main challenges in conducting A/B testing?</li><li>How would you ensure that your A/B test results are statistically valid?</li><li>What is statistical power, and how do you ensure that your test has enough power?</li><li>How do you interpret the results of an A/B test with multiple variations (multi-arm bandit problem)?</li><li>What are some pitfalls to avoid when running an A/B test?</li><li>How would you handle a situation where the A/B test results show no significant difference between groups?</li><li>Explain the difference between a one-tailed and a two-tailed test in hypothesis testing.</li><li>How do you mitigate the risk of “false positives” in an experiment?</li><li>What is the difference between a p-value and a confidence interval in experimental analysis?</li><li>How do you design an experiment when you have a small sample size?</li></ul><h3>6. Model Evaluation and Metrics</h3><ul><li>What metrics would you use to evaluate a classification model?</li><li>What is a confusion matrix, and how do you interpret it?</li><li>What is the difference between precision, recall, and F1-score?</li><li>What is ROC-AUC, and how do you use it to evaluate model performance?</li><li>How would you evaluate the performance of a regression model?</li><li>What is R-squared, and what does it tell you about a regression model?</li><li>What is mean squared error (MSE) and mean absolute error (MAE)?</li><li>How do you evaluate model performance in the context of imbalanced data?</li><li>What are the trade-offs between precision and recall?</li><li>How would you use cross-validation to evaluate model performance?</li><li>What is k-fold cross-validation, and how does it help with model selection?</li><li>How do you interpret and compare multiple models using metrics like AUC, precision, recall, etc.?</li><li>What is the significance of learning curves in machine learning?</li><li>What is early stopping in the context of model training?</li><li>How do you interpret the bias-variance tradeoff in model evaluation?</li></ul><h3>7. System Design for Data Scientists</h3><ul><li>How would you design a recommendation system for an e-commerce platform?</li><li>What are the key considerations when designing a large-scale data pipeline?</li><li>How would you design a system to process real-time streaming data?</li><li>What would your approach be to building a fraud detection system?</li><li>How would you design a model to handle millions of daily users and make recommendations in real time?</li><li>How would you scale a machine learning model that is working on small datasets but needs to process much larger volumes of data in production?</li><li>Explain how you would handle a situation where your machine learning model needs to serve millions of users simultaneously.</li><li>What are some approaches to building a data pipeline for training and deploying models in the cloud (AWS, GCP, Azure)?</li><li>How would you design a system to track and evaluate multiple machine learning models over time?</li><li>How would you handle version control and model retraining in production?</li><li>What is the importance of monitoring and logging when deploying machine learning models into production?</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11637d499696" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Confusion matrix — Why so confusing?]]></title>
            <link>https://mounicag.medium.com/confusion-matrix-why-so-confusing-18e52a9910ac?source=rss-1655d347051e------2</link>
            <guid isPermaLink="false">https://medium.com/p/18e52a9910ac</guid>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[classification-metrics]]></category>
            <category><![CDATA[precision]]></category>
            <category><![CDATA[confusion-matrix]]></category>
            <category><![CDATA[classification-algorithms]]></category>
            <dc:creator><![CDATA[Sai Mounica Gudimella]]></dc:creator>
            <pubDate>Wed, 30 Oct 2024 18:33:22 GMT</pubDate>
            <atom:updated>2024-10-30T18:33:22.357Z</atom:updated>
            <content:encoded><![CDATA[<h3>Confusion matrix — Why so confusing?</h3><p>I’ve read numerous books and articles about classification metrics, especially the confusion matrix, but I still struggle to remember them. Whenever I try to recall the formula for recall, I get confused. That’s why I’m writing this article — my goal is to create some examples that will help me (and hopefully others) quickly understand and derive these metrics with ease.</p><blockquote>Let’s say we have a classification problem — We want to classify if a patient has heart disease based on a scan. Since this is the group of our interest, we label it as 1. Patients who do not have heart disease will be labeled as 0.</blockquote><p>Confusion Matrix is constructed with actual values on the rows and predicted values tracked in columns. Let’s say we recorded 1000 cases as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*1o68uqZZD70TsBMx79JuPA.png" /><figcaption>Confusion Matrix</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*n5CXpVQ7HKpYv-GYRyx-ZA.png" /></figure><p><strong>TP: True Positive</strong> — We predict presence of heart disease, and this prediction is accurate.</p><p><strong>TN: True Negative</strong> — We predict that there is no heart disease, and this prediction is accurate.</p><p><strong>FP: False Positive</strong> — We predict presence of heart disease, and this prediction is <strong>not</strong> accurate.</p><p><strong>FN: False Negative</strong> — We predict that there is no heart disease, and this prediction is <strong>not</strong> accurate.</p><p>Let’s deconstruct this table: There are a total of 600 cases of heart disease that were predicted correctly. (300 + 300 = 600)</p><ol><li>There are a total of 400 cases of heart disease that were predicted <strong>in</strong>correctly. (200 + 200 = 400)</li><li>Of these 400, 200 cases where heart disease is present but was predicted as ‘no heart disease’ (This the bottom-left 200 in the matrix).</li><li>Similarly, there are 200 cases where individuals without heart disease were incorrectly notified that they do have it.</li></ol><p>The reason for using health hazard as an example is to illustrate the importance of having multiple error metrics in the first place. In the above example, classifying 600 cases correctly helps in understanding the accuracy of the algorithm. That is out of 1000 cases 600 are correctly classified. Therefore, accuracy is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*f_cc6D3r9oBtyg_VGh0gVw.png" /><figcaption>Accuracy</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*vQCt4idzw_xyZ2iktMLGRA.png" /></figure><p>The model is able to predict 60% of cases correctly, which is good. What if we now focus on the remaining 400 cases.</p><ol><li>The 200 individuals with heart disease who were predicted as ‘no heart disease’ are missing crucial information that could lead to additional screenings or treatments, potentially preventing further harm or even death. If we’re satisfied with a 60% accuracy in classification, what about these 200 cases? This is <strong>False Negative</strong> — Predicting ‘no disease’ when there is a heart disease.</li><li>Similarly, the other 200 individuals with no heart disease who were predicted as having a ‘heart disease’ are given incorrect information leading to stress and unnecessary trauma. This is <strong>False Positive</strong>— Predicting a condition when there is nothing to worry about.</li></ol><p>This leads to two metrics related to False Positive and False Negative.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*ajRnnkhPPb-0w9Z9gpfURw.png" /><figcaption>False Positive</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*XMBLljp0SUaJUGnSPr6pVg.png" /><figcaption>False Negative</figcaption></figure><p><strong>Precision</strong>: The percent of predicted 1’s that are actually 1’s. It measures the accuracy of predicted positive outcomes.</p><p>Why do we need this? A high value for Precision means, the model makes fewer False Positive (FP) predictions which is good or favorable outcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*NUV9Q57n7L8g6g5VoHr4kA.png" /><figcaption>Precision</figcaption></figure><p><strong>Recall</strong>: Total number of positive cases that are correctly classified as positive (Total of all 1’s that are correctly predicted as 1&#39;s). This measures the strength of how well a model is able to predict all the positive cases.</p><p>This is also called <strong>Sensitivity</strong>.</p><p>Why do we need this? This is to understand how many heart disease cases (which is our group of interest) are we able to correctly predict? By recording this metric and trying to optimize it will help correctly identify as many such cases correctly as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*6_xPGv7QnzGHH54K15z7TA.png" /><figcaption>Recall</figcaption></figure><p><strong>Specificity</strong>: The total of all 0’s that are predicted as 0’s. The total number of negative cases that are actually negative.</p><p>A high specificity value indicates that the model successfully classifies most of the data points with actual negative labels, <strong>minimizing the number of false positives</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*CgDy23CpKHRigrCwyFSsHQ.png" /><figcaption>Specificity</figcaption></figure><p><strong>ROC curve</strong>: <strong>Receiver Operating Characteristic</strong></p><p>This is a curve capturing the tradeoff between Sensitivity (on y-axis) and 1- Specificity (on x-axis).</p><p>When we focus on optimizing positive predictions (that is correctly predicting heart disease), then it may happen we fail to capture the negative prediction correctly. For example, think about a case, where we try to classify all 1000 cases without any scan that they all have heart disease. What does this mean? All the 500 individuals who have heart disease are notified that they have heart disease. Recall in this case is 100%, but accuracy drops to 50% and more importantly, there are 500 individuals who are being wrongly notified that they have heart disease.</p><p>This is the concept behind the ROC curve. When we try optimizing positive’s, there is an impact on negative predictions and vice-versa. The goal is to optimize the balance to avoid misclassifying any one group to extremes and be optimal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*7gcaWu0fv-RYO08iC6fITQ.png" /><figcaption>ROC Curve — AUC</figcaption></figure><p><strong>AUC: Area under the curve</strong></p><p>The Area under the curve signifies how well the model classifies 1’s and 0’s. The higher the value, the better the classifier in predicting 1’s correctly and predicting 0’s correctly.</p><p>Value of AUC lies between 0 and 1. The value 1 signifies perfect classifier.</p><p><strong>The Rare class problem:</strong></p><p>In many real-world cases, the data is highly imbalanced. Example, in a loan default prediction, the class of interest is being able to identify defaults correctly. However, there are fewer records to act as example for default.</p><p>A regular model will classify all records as not-default, since this is the majority class. In this case, none of the defaults will be identified. If these classes are not separable, the easiest solution is to classify everything as not-default and avoid missing the defaults.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18e52a9910ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A/B test — Product analytics case study — Small sample size]]></title>
            <link>https://mounicag.medium.com/a-b-test-product-analytics-case-study-small-sample-size-d5ad85e48b9d?source=rss-1655d347051e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5ad85e48b9d</guid>
            <category><![CDATA[click-through-rate]]></category>
            <category><![CDATA[t-test]]></category>
            <category><![CDATA[hypothesis-testing]]></category>
            <category><![CDATA[ab-test]]></category>
            <category><![CDATA[conversion-rate]]></category>
            <dc:creator><![CDATA[Sai Mounica Gudimella]]></dc:creator>
            <pubDate>Thu, 03 Oct 2024 22:13:30 GMT</pubDate>
            <atom:updated>2024-10-03T22:13:30.064Z</atom:updated>
            <content:encoded><![CDATA[<h3>A/B test — Product analytics case study — Small sample size</h3><p>You are a Data Scientist, and your task is to run an A/B test to determine if a new <strong>feature on a product </strong>(Feature B) improves the <strong>click-through rate (CTR)</strong> and <strong>conversion rate</strong> compared to the current version (Feature A).</p><h3>Step 1: Define metrics</h3><p><strong>Click through rate:</strong> Percentage of users who clicked a link</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/0*hY5SGvODl0mtV_tH.png" /></figure><p><strong>Conversion rate:</strong> Percentage of users who completed a desired action (Ex: Purchase, Signup, Subscribe)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/0*K7lFFj2l1jxe_Jxk.png" /></figure><h3>Step 2: Formulate Hypothesis</h3><p><strong>Null Hypothesis: (Ho)</strong> The click-through rate and conversion rate for Feature A and Feature B is same.</p><p><strong>Alternate Hypothesis: (Ha)</strong> The click-through rate and conversion rate for Feature B is higher than Feature A.</p><p><strong>Significance level — Alpha:</strong> <strong>0.05</strong> (This is also <strong>Type 1 error</strong>). This value signifies that there is 5% chance that we incorrectly reject null hypothesis when it is true. In other words, it also means, there is 95% confidence that we correctly reject null hypothesis.</p><p>We reject null hypothesis if p-value &lt; Alpha. p-value will be calculated in the next step. In some cases, Alpha=0.01, when we want to minimize Type 1 errors.</p><p><strong>Power: 0.80 (1- Beta):</strong> This is the Type 2 error. Probability of correctly detecting the difference. By setting it to 0.8, we are 80% correctly predicting the difference.</p><h3>Step 3: Run experiment and collect data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*2sFYh2B7m9_b08T0wl2Eaw.png" /></figure><p>Let’s assume our data team ran the experiment by ensuring all the validity checks and collect this data.</p><h3>Step 4: Perform Hypothesis testing (p-value calculation)</h3><p>We will calculate the t-score first, to calculate the p-value. We will use t-test since the sample size is small.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*s54uMqrCQQPWDwXfOtA0KQ.png" /></figure><p>where,</p><p>p1: proportion of feature A; p2: proportion of feature B</p><p>p: combined proportion; n1=n2 = sample size</p><p><strong>i) </strong>Calculate<strong> individual proportions:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*xFLrN_RIt9TE1NkzCd1uRA.png" /></figure><p>Next, calculate<strong> combined proportions:</strong></p><p><strong>CTR:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*RfmHiySlHTtSLo65Lto1ZA.png" /></figure><p><strong>CR:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*SNhmjdzBD4Zo0EmrEAGskw.png" /></figure><p><strong>ii) </strong>Calculate <strong>standard error:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/0*yqp3V-4RsADAO9Sj.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*RL-Bn3waQY2MCPyohxB1qg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*M3iy6sMqkR0Tc6-KYd2nCA.png" /></figure><p><strong>iii) </strong>Calculate <strong>t-score</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*8nIEW335S7WjCwdZGM8bTg.png" /></figure><p><strong>iv)</strong> Calculate <strong>p-value</strong>:</p><p><strong>Degree of freedom: df </strong>= 100+100−2 = 198</p><p>p-value is calculated from <a href="https://www.sjsu.edu/faculty/gerstman/StatPrimer/t-table.pdf">t-score table</a>.</p><p>p-value for <strong>CTR</strong>: &gt;1</p><p>p-value for <strong>CR</strong>: &gt;1</p><h3>Step 5: Conclusion</h3><p><strong>Since p-values for both CTR and CR is &gt; 0.05, we fail to reject the null hypothesis. This suggests that there is not enough evidence to conclude that Feature B significantly outperforms Feature A.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5ad85e48b9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A/B test — Product analytics case study — Large sample size]]></title>
            <link>https://mounicag.medium.com/a-b-test-product-analytics-case-study-large-sample-size-1d2b5eb75f8d?source=rss-1655d347051e------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d2b5eb75f8d</guid>
            <category><![CDATA[click-through-rate]]></category>
            <category><![CDATA[conversion-rate]]></category>
            <category><![CDATA[ab-test]]></category>
            <category><![CDATA[hypothesis-testing]]></category>
            <category><![CDATA[z-test]]></category>
            <dc:creator><![CDATA[Sai Mounica Gudimella]]></dc:creator>
            <pubDate>Thu, 03 Oct 2024 21:50:56 GMT</pubDate>
            <atom:updated>2024-10-03T21:52:51.871Z</atom:updated>
            <content:encoded><![CDATA[<h3>A/B test — Product analytics case study — Large sample size</h3><p>You are a Data Scientist, and your task is to run an A/B test to determine if a new <strong>feature on a product </strong>(Feature B) improves the <strong>click-through rate (CTR)</strong> and <strong>conversion rate</strong> compared to the current version (Feature A).</p><h3>Step 1: Define metrics</h3><p><strong>Click through rate:</strong> Percentage of users who clicked a link</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*DiAr0eAafvh1t2EDXznbnQ.png" /></figure><p><strong>Conversion rate:</strong> Percentage of users who completed a desired action (Ex: Purchase, Signup, Subscribe)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*hF5igNxlHa3z1prFOk_LlA.png" /></figure><h3><strong>Step 2: Formulate Hypothesis</strong></h3><p><strong>Null Hypothesis: (Ho)</strong> The click-through rate and conversion rate for Feature A and Feature B is same.</p><p><strong>Alternate Hypothesis: (Ha)</strong> The click-through rate and conversion rate for Feature B is higher than Feature A.</p><p><strong>Significance level — Alpha:</strong> <strong>0.05</strong> (This is also <strong>Type 1 error</strong>). This value signifies that there is 5% chance that we incorrectly reject null hypothesis when it is true. In other words, it also means, there is 95% confidence that we correctly reject null hypothesis.</p><p>We reject null hypothesis if p-value &lt; Alpha. p-value will be calculated in the next step. In some cases, Alpha=0.01, when we want to minimize Type 1 errors.</p><p><strong>Power: 0.80 (1- Beta):</strong> This is the Type 2 error. Probability of correctly detecting the difference. By setting it to 0.8, we are 80% correctly predicting the difference.</p><h3><strong>Step 3: Run experiment and collect data</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*IPrzej9EI7om9YDjg9NpDw.png" /></figure><p>Let’s assume our data team ran the experiment by ensuring all the validity checks and collect this data.</p><h3>Step 4: Perform Hypothesis testing (p-value calculation)</h3><p>We will calculate the z-score first, to calculate the p-value. We will use Z-test since the sample size is large.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*SAznjhLrxLUWai5JXgi46g.png" /></figure><p>where,</p><p>p1: proportion of feature A; p2: proportion of feature B</p><p>p: combined proportion; n1=n2 = sample size</p><p><strong>i) </strong>Calculate<strong> individual proportions:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*UIVZQuVPgdbpBFrQIp9hFA.png" /></figure><p>Next, calculate<strong> combined proportions:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*n5XL-UAjs2QCon8JiprJIw.png" /></figure><p><strong>ii) </strong>Calculate <strong>standard error:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*wa2pUpk3Q_UpWoVVg14ejg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*miHO42XVsUEn_PaYk9EwTA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*ZRdRv4_UEo0Qt_vrCuwzfw.png" /></figure><p><strong>iii) </strong>Calculate <strong>Z-score</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*1lRRR1dWigLTZqaPOPbi8A.png" /></figure><p><strong>iv)</strong> Calculate <strong>p-value</strong>:</p><p>p-value is calculated from <a href="https://byjus.com/maths/z-score-table/">z-score table</a>.</p><p>p-value for <strong>CTR</strong>: is extremely low as z-score is much lesser than 0.</p><p>p-value for <strong>CR</strong>: is 0.0045.</p><h3>Step 5: Conclusion</h3><p><strong>Since p-values for both CTR and CR is &lt; 0.05, we reject the null hypothesis and conclude that feature B is better than feature A.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d2b5eb75f8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>