<?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 Rishika Singh on Medium]]></title>
        <description><![CDATA[Stories by Rishika Singh on Medium]]></description>
        <link>https://medium.com/@rishikasingh3789?source=rss-61b05fa3f05d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YFGmg97PAsv6tE3OuaSuHA.jpeg</url>
            <title>Stories by Rishika Singh on Medium</title>
            <link>https://medium.com/@rishikasingh3789?source=rss-61b05fa3f05d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 05:54:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rishikasingh3789/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[Top 20 SQL Commands Every Beginner Must Know (Ultimate Guide for 2026)]]></title>
            <link>https://medium.com/@rishikasingh3789/top-20-sql-commands-every-beginner-must-know-ultimate-guide-for-2026-b0fb2e7dce5e?source=rss-61b05fa3f05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0fb2e7dce5e</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Rishika Singh]]></dc:creator>
            <pubDate>Mon, 15 Jun 2026 03:40:24 GMT</pubDate>
            <atom:updated>2026-06-15T03:40:24.908Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Quick Story…</h3><p>When Alex graduated, he thought learning Excel and a bit of Python would be enough to land a data job. But in every interview, one question kept coming back:</p><p><strong>“How comfortable are you with SQL?”</strong></p><p>He realized something important — <strong>SQL isn’t optional, it’s essential.</strong></p><p>Instead of trying to learn everything at once, Alex focused on mastering just the <strong>most important SQL commands</strong>.</p><p>Within weeks, he started clearing interviews.</p><p>This guide is exactly what Alex used — and what you need</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gFDQE95t7LLEzGCJq3ViBA.png" /></figure><h3>What is SQL?</h3><p>SQL (Structured Query Language) is used to interact with databases. It allows you to:</p><ul><li>Retrieve data</li><li>Insert new records</li><li>Update existing data</li><li>Delete unwanted data</li></ul><p>In short, <strong>SQL is the language of data.</strong></p><h3>Top 20 SQL Commands Every Beginner Must Know</h3><h3>1. SELECT — Retrieve Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CbooSZ7m96yGl-6taVkK4g.png" /></figure><h3>2. INSERT — Add New Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4kvxDa345D45OaUHu0HYig.png" /></figure><h3>3. UPDATE — Modify Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gr9kT6C5LZN_9bO-jEWnkA.png" /></figure><h3>4. DELETE — Remove Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aQUsjYG3lyAIjTnTeAtM2A.png" /></figure><h3>5. CREATE TABLE — Create a Table</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*zNvO8uD8lLIABWc8WjMbiw.png" /></figure><h3>6. DROP TABLE — Delete Table</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*FXvhd8tmSeBILXfsC1RlJA.png" /></figure><h3>7. ALTER TABLE — Modify Structure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*hAZ8qayZhJLHItgs9FmE4Q.png" /></figure><h3>8. WHERE — Filter Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*EDesJup5TJdw-TnCQpw65A.png" /></figure><h3>9. ORDER BY — Sort Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*cvSP3WptCNAr_33M-w2RwQ.png" /></figure><h3>10. GROUP BY — Group Records</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*tlQyZqYjL3zPdRnChLFjkg.png" /></figure><h3>11. HAVING — Filter Groups</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WaOf387oGbs4usF8Kc9X5g.png" /></figure><h3>12. JOIN — Combine Tables</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SLadCtjW3woBFl5KjEOkaQ.png" /></figure><h3>13. INNER JOIN — Matching Records Only</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*WmPqe8dXSAayNZ7IfajAcA.png" /></figure><h3>14. LEFT JOIN — All Left + Matching Right</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*PH4oeY6SojCZj-P8yl099w.png" /></figure><h3>15. RIGHT JOIN — All Right + Matching Left</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4-AEpB9psPP0aGmyXfwglg.png" /></figure><h3>16. DISTINCT — Remove Duplicates</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*igWqd8RYWvx_21djxt_USg.png" /></figure><h3>17. LIMIT — Restrict Output</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q3pmdTNbiSsETFud_Xtm-w.png" /></figure><h3>18. COUNT() — Count Rows</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*24hrhV4xJjCWfiXT62ap0A.png" /></figure><h3>19. AVG() — Average Value</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LnHmE_Ue1e5hOWOOAFB9AA.png" /></figure><h3>20. MAX() / MIN() — Highest &amp; Lowest</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*vXWMQM6LFXH-cyiMmId_mw.png" /></figure><h3>Why These Commands Matter</h3><p>Mastering these commands means you can:</p><ul><li>Crack SQL interviews</li><li>Build real-world data projects</li><li>Work with tools like MySQL, PostgreSQL, and SQL Server</li><li>Step into Data Analyst or Data Scientist roles</li></ul><h3>Final Thoughts</h3><p>SQL is not just another skill — it’s your <strong>entry ticket into the data world</strong>.</p><p>If you focus on these 20 commands and practice consistently,<br>you’ll be ahead of 80% of beginners.</p><h3>Call to Action</h3><p>Start practicing today<br>Build 1 small project<br>Apply for internships</p><p><strong>Your data career starts now.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0fb2e7dce5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Probability Distribution Graphs Explained with Python Code (A Visual & Practical Guide)]]></title>
            <link>https://medium.com/@rishikasingh3789/probability-distribution-graphs-explained-with-python-code-a-visual-practical-guide-d024946fcee6?source=rss-61b05fa3f05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d024946fcee6</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[probability]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-analytics]]></category>
            <dc:creator><![CDATA[Rishika Singh]]></dc:creator>
            <pubDate>Wed, 25 Mar 2026 03:05:25 GMT</pubDate>
            <atom:updated>2026-03-25T03:05:25.962Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Beginner-friendly guide with stories, graphs, and Python code to truly understand probability distributions</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fx7rLbHU8T9H5j8KOunspA.jpeg" /></figure><p><strong>When most people start learning probability, they learn formulas.</strong></p><p>They calculate numbers.<br>They solve questions.<br>They pass exams.</p><p>But when real data appears — everything changes.</p><p><strong>Suddenly questions sound like:</strong></p><ul><li>Why do exam marks look like a bell?</li><li>Why do customer visits spike randomly?</li><li>Why does waiting time keep decreasing?</li><li>Which graph should I use for my data?</li></ul><p>At this moment, one truth becomes clear:</p><blockquote><strong><em>Probability is not about formulas — it’s about patterns.</em></strong><em><br>And patterns are best understood through </em><strong><em>graphs</em></strong><em>.</em></blockquote><p>This blog will help you <strong>see probability</strong>, not just calculate it.</p><h3>What Is a Probability Distribution Graph?</h3><p>A <strong>probability distribution graph</strong> shows:</p><ul><li>all possible values of a variable</li><li>how likely each value is</li></ul><p><strong>In simple words:</strong></p><blockquote><em>It visually answers<br></em><strong><em>“What can happen?”</em></strong><em><br></em><strong><em>“How often does it happen?”</em></strong></blockquote><h3>Two Types of Probability Distributions</h3><p>Before choosing a graph, always ask:</p><h3>Is my data countable or measurable?</h3><h3>1.Discrete Distributions</h3><p>Used when values are <strong>countable</strong></p><ul><li>0, 1, 2, 3…</li></ul><p>Graph type: <strong>Bar graph</strong></p><h3>2.Continuous Distributions</h3><p>Used when values are <strong>measured</strong></p><ul><li>time, height, weight</li></ul><p>Graph type: <strong>Smooth curve</strong></p><h3>DISCRETE PROBABILITY DISTRIBUTIONS (WITH CODE)</h3><h3>1.Bernoulli Distribution (Yes / No)</h3><h3>When to Use:</h3><ul><li>Only two outcomes</li><li>Success / Failure</li></ul><h3>Example:</h3><ul><li>Coin toss</li><li>Email opened or not</li></ul><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zoz_R0FnaiNeRY92xRBnlg.png" /></figure><p><strong>Visual Insight:</strong> Only two bars — nothing in between.</p><h3>2.Binomial Distribution (Fixed Trials)</h3><h3>When to Use:</h3><ul><li>Fixed number of trials</li><li>Same probability each time</li></ul><h3>Example:</h3><ul><li>Number of heads in 10 tosses</li></ul><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*IXJY5LaanpTtLa0mEHQmOw.png" /></figure><p><strong>Shape:</strong> Bars rise, peak, then fall.</p><h3>3.Poisson Distribution (Rare Events)</h3><h3>When to Use:</h3><ul><li>Events counted per unit time</li><li>Average rate known</li></ul><h3>Example:</h3><ul><li>Calls per hour</li><li>Accidents per day</li></ul><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*N7MK9VQDJaxyyOvmv1HpkA.png" /></figure><p><strong>Key Idea:</strong> Best for <strong>random event counts</strong>.</p><h3>CONTINUOUS PROBABILITY DISTRIBUTIONS (WITH CODE)</h3><h3>4.Normal Distribution (Bell Curve)</h3><h3>When to Use:</h3><ul><li>Data is symmetric</li><li>Mean ≈ Median ≈ Mode</li></ul><h3>Example:</h3><ul><li>Heights</li><li>Exam scores</li></ul><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*97W-VPUxN3ypOdpXP76lnA.png" /></figure><p><strong>Most common real-world distribution</strong>.</p><h3>5.Uniform Distribution (Equal Probability)</h3><h3>When to Use:</h3><ul><li>All outcomes equally likely</li></ul><h3>Example:</h3><ul><li>Dice roll</li></ul><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*HqxnU3VGAD0qPiciXpLu2Q.png" /></figure><p><strong>Flat graph = equal chance</strong>.</p><h3>6️⃣ Exponential Distribution (Waiting Time)</h3><h3>When to Use:</h3><ul><li>Time until an event occurs</li><li>No memory of past</li></ul><h3>Example:</h3><ul><li>Waiting for next customer</li></ul><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*rjVKMpOVl7sUprxqWLa3Ow.png" /></figure><p><strong>Starts high, decreases fast</strong>.</p><h3>7.Gamma Distribution (Multiple Waiting Events)</h3><h3>When to Use:</h3><ul><li>Time until multiple events occur</li></ul><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*V_GpU0j9KOwuUAS1nNIeNw.png" /></figure><h3>8.Beta Distribution (Probabilities Between 0 and 1)</h3><h3>When to Use:</h3><ul><li>Modeling probabilities</li></ul><h3>Example:</h3><ul><li>Conversion rate</li></ul><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*zAkVtmhmhPaDefn6T_OkJQ.png" /></figure><h3>9.Log-Normal Distribution (Growth Data)</h3><h3>When to Use:</h3><ul><li>Multiplicative growth</li></ul><h3>Example:</h3><ul><li>Income</li><li>Stock prices</li></ul><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*MsjvvXVlRQ85u_iIAEhFZQ.png" /></figure><h3>10.Chi-Square Distribution (Hypothesis Testing)</h3><h3>When to Use:</h3><ul><li>Independence tests</li><li>Variance analysis</li></ul><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*BN3PYtVIWEF9h0bCXQ6Gnw.png" /></figure><h3>11.Weibull Distribution (Reliability)</h3><h3>When to Use:</h3><ul><li>Product life &amp; failure analysis</li></ul><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*_dIfBHLOYlj20WLk1lJQxQ.png" /></figure><h3>Quick Cheat Sheet</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*20nsR5bbrHO_rdBjOCrhOw.png" /></figure><h3>Final Words</h3><p>Probability distribution graphs are not just curves and bars.</p><p>They are <strong>visual explanations of uncertainty</strong>.</p><p>Once you understand:</p><ul><li>the shape</li><li>the story</li><li>the code</li></ul><p>Statistics stops being scary.</p><p>It starts making sense.</p><h3>If this blog helped you:</h3><ul><li>Save it</li><li>Share it</li><li>Follow for more <strong>visual, code-based statistics content</strong></li></ul><p><strong>Because real understanding begins when you can see the data.</strong> 📊💙</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d024946fcee6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Z Test vs T Test: Key Differences, Examples & Python Code.]]></title>
            <link>https://medium.com/@rishikasingh3789/z-test-vs-t-test-key-differences-examples-python-code-dfb728d422ce?source=rss-61b05fa3f05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfb728d422ce</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[hypothesis-testing]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Rishika Singh]]></dc:creator>
            <pubDate>Tue, 03 Mar 2026 13:08:29 GMT</pubDate>
            <atom:updated>2026-03-03T13:08:29.919Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Confused between Z Test and T Test?</strong><br>This beginner-friendly guide explains the key differences, formulas, real-life examples, Python code, and graphs to help you choose the right statistical test.</p><p>Imagine this situation.</p><p>You analyze a dataset, calculate a mean, and suddenly a big question appears:</p><p><strong>Is this difference real… or just due to random chance?</strong></p><p>This is exactly where <strong>hypothesis testing</strong> enters the picture — and two of its most powerful tools are the <strong>Z-Test</strong> and the <strong>T-Test</strong>.</p><p>If you are a statistics student, data analyst, or beginner in data science, understanding <em>when</em> and <em>why</em> to use these tests is non-negotiable.</p><p>Let’s break it down — <strong>clearly, practically, and without confusion...</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*zH7zjIq5WvspGK1sXz6wMA.png" /></figure><h3>Why Do We Even Need Statistical Tests?</h3><p>In real life, data always varies.</p><ul><li>Marks differ</li><li>Heights differ</li><li>Sales fluctuate</li></ul><p>So, the real question is:</p><blockquote>Is the observed difference meaningful, or could it happen just by chance?</blockquote><p>Statistical tests help us answer this question <strong>objectively</strong> instead of guessing.</p><h3>What is a Z-Test?</h3><p>A <strong>Z-Test</strong> is a statistical test used to determine whether a sample mean is significantly different from a <strong>known population mean</strong>, assuming the <strong>population standard deviation is known</strong>.</p><h3>Key Idea</h3><p>Z-Test works best when you already know a lot about the population.</p><h3>When to Use a Z-Test</h3><p>Use a Z-Test when:</p><p>✔ Population mean (μ) is known<br>✔ Population standard deviation (σ) is known<br>✔ Sample size is <strong>large (n ≥ 30)</strong><br>✔ Data follows <strong>normal distribution</strong></p><h3>Z-Test Formula</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/221/1*yaxfOsc_MENWUvPr7Cjpyw.png" /></figure><p><strong>Where:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*iPRdUHEdjzELS5hCl6CmqQ.png" /></figure><h3>Real-Life Example (Z-Test)</h3><p>An exam board claims the <strong>average score is 70</strong> with a known standard deviation of <strong>8</strong>.<br>You take a sample of <strong>50 students</strong> and find the mean score is <strong>73</strong>.</p><p>Z-Test helps decide:<br><strong>Is 73 significantly higher, or just sampling variation?</strong></p><p><strong>Python Example: Z-Test:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*BGLJRmptoAcOujHZo8XOkQ.png" /></figure><h3>Interpretation</h3><ul><li><strong>Small p-value (&lt; 0.05)</strong> → Reject null hypothesis</li><li><strong>Large p-value</strong> → Difference is likely due to chance</li></ul><h3>What Is a T-Test?</h3><p>A <strong>T-Test</strong> is used when the <strong>population standard deviation is unknown</strong>, which is extremely common in real-world data.</p><p>Instead of the normal distribution, it uses the <strong>t-distribution</strong>, which adjusts for small sample sizes.</p><h3>Types of T-Tests You Must Know</h3><h3>1️️. One-Sample T-Test</h3><h4>Purpose</h4><p>Compares the <strong>mean of one sample</strong> to a <strong>known or hypothesized value</strong>.</p><h4>Use When</h4><p>✔ One group<br> ✔ Population standard deviation unknown<br> ✔ Sample size small (n &lt; 30)</p><h4>Formula</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/168/1*Dj5WGfaJcB3e4oVuVftREw.png" /></figure><p><strong>Where:</strong></p><ul><li>s = sample standard deviation</li></ul><h4>Python Example: One-Sample T-Test:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*O4S59EJbXGYbQMhXsScs6A.png" /></figure><h3>2️. Two-Sample T-Test (Independent / Unpaired)</h3><p>This is the <strong>most commonly used t-test</strong>.</p><p><strong>Purpose</strong><br>Compares the means of <strong>two independent groups</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*CagpYhP1HkYgW_PyJtV-gw.png" /></figure><h3>Where:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*mWxMwjhNcTZHTksyCcIn2Q.png" /></figure><h3>Common Case (Most Questions)</h3><p>Usually,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/165/1*8uCs5pSlc1kCVxyl6m4ETA.png" /></figure><p><strong>So the formula becomes:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/235/1*xKnGbT0p9vW6rbd2j0iSLA.png" /></figure><h3>When to Use Two-Sample T-Test</h3><p>✔ Two independent groups<br> ✔ Population SD unknown<br> ✔ Comparing means (boys vs girls, before product A vs product B)</p><h3>Example (Two-Sample T-Test)</h3><p>A teacher compares <strong>average marks of boys and girls</strong>.</p><p>Two-Sample T-Test checks whether the difference is <strong>statistically significant</strong>.</p><p><strong>Python Example: Two-Sample T-Test:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*VW1wYAkUQpOm2ykersKXcw.png" /></figure><h3>3️️. Paired Sample T-Test</h3><h3>Purpose</h3><p>Used when the <strong>same subjects</strong> are measured twice.</p><h4>Formula: —</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/179/1*GcBnB-l_88-mVgL3YLlJaw.png" /></figure><h4>Use When</h4><ul><li>Before–after experiments</li><li>Same group under two conditions</li></ul><h3>Example (Paired T-Test)</h3><p>Weights of people <strong>before and after a fitness program</strong>.</p><p><strong>Python Example: Paired T-Test:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*O3nURqHh5fiqpTxna5RSwA.png" /></figure><h3>Graphs Section: Visualizing Hypothesis Testing</h3><p>Graphs make statistical concepts <strong>intuitive and powerful</strong>.</p><p><strong>Example 1: Distribution of Sample Mean (Z-Test)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*8uRRQ3mjkgsN3xfdaH_Fng.png" /></figure><h4><strong>Output: —</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*7gAeBBiCL1kCiIugE6Ivqw.png" /></figure><p>The histogram represents the sample distribution, while the smooth curve shows the assumed normal distribution.<br>The distance between the sample mean and population mean visually explains the logic behind the Z-Test.</p><p><strong>Example 2: Comparing Two Groups (Two-Sample T-Test)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K6FOoAp4QqaXlogvwwgbYA.png" /></figure><h3>Why Graphs Matter</h3><p>✔ Help detect mean differences visually<br>✔ Reveal spread and outliers<br>✔ Strengthen interpretation of test results</p><h3>Z-Test vs T-Test: Clear Comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*6mRBEDGqh2A1lYpiMaEoWg.png" /></figure><h3>The Biggest Mistake Students Make</h3><p>Using Z-Test just because “sample is big”<br> Ignoring whether population SD is known<br> Confusing paired and unpaired T-Tests</p><p><strong>Choosing the wrong test = wrong conclusion.</strong></p><h3>Final Takeaway</h3><ul><li><strong>Z-Test</strong> → When population parameters are known and sample is large</li><li><strong>T-Test</strong> → When population information is limited (most real cases)</li></ul><blockquote><em>In practice, </em><strong><em>T-Tests are used far more often than Z-Tests</em></strong><em>.</em></blockquote><h3>Why This Matters in Data Analytics</h3><p>Hypothesis testing is the foundation of:</p><p>A/B testing<br>Business decisions<br>Experiments<br>Risk analysis</p><p>Mastering Z-Test and T-Test is not just academic — <br> it’s a <strong>real-world decision-making skill</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfb728d422ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[UDF in Python Explained Simply: How User Defined Functions Make Your Code Clean, Reusable &…]]></title>
            <link>https://medium.com/@rishikasingh3789/udf-in-python-explained-simply-how-user-defined-functions-make-your-code-clean-reusable-2711da18bf14?source=rss-61b05fa3f05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2711da18bf14</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-beginner]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Rishika Singh]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 04:03:27 GMT</pubDate>
            <atom:updated>2026-02-19T04:03:27.931Z</atom:updated>
            <content:encoded><![CDATA[<h3>UDF in Python Explained Simply: How User Defined Functions Make Your Code Clean, Reusable &amp; Professional Python: A Complete Beginner’s Guide</h3><p><em>(Complete Guide with Arguments, Docstrings &amp; Data Science Examples)</em></p><p><strong>Every Python learner starts the same way.</strong></p><p>You open <strong>Jupyter Notebook</strong>.<br>You clean a dataset.<br>You write 5 lines of code.</p><p>Then again…<br>Same logic.<br>Same calculation.<br>Same conditions.</p><p>So, you <strong>copy-paste</strong>.</p><p>At first, it feels normal into:</p><ul><li>Endless scrolling</li><li>Hard-to-find bugs</li><li>Confusing logic</li><li>Zero reusability</li></ul><p>And then one line hits you hard:</p><blockquote><strong><em>“Why didn’t you write a function?”</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XrTbbQV3-MpUnMCkIKEwkQ.jpeg" /></figure><p>That single question introduces you to <strong>UDF — User Defined Function</strong>.<br>And trust me — this is the moment where <strong>real Python learning begins</strong>.</p><h3>What is a UDF (User Defined Function)?</h3><p>A <strong>User Defined Function (UDF)</strong> is a function written by the user to perform a specific task.</p><h3>In simple words:</h3><p>A UDF helps you <strong>write logic once and reuse it anywhere</strong>.</p><p>Instead of rewriting code again and again, you:</p><ul><li>Write once</li><li>Reuse everywhere</li><li>Fix once</li><li>Improve forever</li></ul><p><strong>This is why professionals rely heavily on functions.</strong></p><h3>Why UDF is a BIG Deal in Data Science: —</h3><p>If you are learning:</p><ul><li>Python</li><li>Pandas</li><li>Data Analysis</li><li>Machine Learning</li></ul><p>Then <strong>UDFs are non-negotiable</strong>.</p><p><strong>They help you:</strong></p><ul><li>Avoid repetitive code (DRY principle)</li><li>Keep notebooks clean &amp; readable</li><li>Debug faster</li><li>Reuse logic across projects</li><li>Apply custom logic to Pandas columns</li><li>Write interview-ready code</li></ul><p><strong>Truth:</strong><br> Beginners know Python syntax.<br> Professionals know how to structure logic using functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*t-oNnTojPNxmqP4lZC8gOA.png" /></figure><h3>Basic Structure of a UDF: —</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*EP9iLlTPAFOcwhHNz_5GHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*60sTWPYGBwHrt8rI4ZH16A.jpeg" /></figure><p>This simple structure hides <strong>huge power</strong>.</p><h3>Positional Arguments (Order Matters)</h3><p>In <strong>positional arguments</strong>, Python assigns values <strong>based on position</strong>.</p><h3>Example:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*G4QxbIMpcDjQu8AGC3HK7Q.png" /></figure><p><strong>f = fill the values inside </strong><strong>{}</strong></p><p>✔ Correct output</p><p>But if you change the order:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*tm_b3nhzkau2KL3BFvUB4w.png" /></figure><p>Wrong result — because <strong>position matters</strong>.</p><p><strong>Rule:</strong><br>Positional arguments depend strictly on order.</p><h3>Keyword Arguments (Readable &amp; Safe )</h3><p>Keyword arguments remove confusion by explicitly naming parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*SHQBstN3iLeO6IoLXmp9kQ.png" /></figure><p>✔ Order doesn’t matter<br>✔ Code becomes self-explanatory<br>✔ Widely used in real projects</p><p><strong>Best practice:</strong><br>Use keyword arguments when functions have many parameters.</p><h3>Default Arguments (Flexibility at Its Best)</h3><p>Default arguments allow parameters to have <strong>predefined values</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*I88nmhuHjTcA8t2LQxi2DQ.png" /></figure><p>Default arguments make functions:</p><ul><li>Flexible</li><li>Cleaner</li><li>Easier to use</li></ul><h3>Mixing Positional, Keyword &amp; Default Arguments (Real-World Pattern)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*m3VZJvyVsKwthC-YueRd-A.png" /></figure><p>This pattern is <strong>very common in analytics &amp; business logic</strong>.</p><h3>__doc__ : — The Most Ignored Professional Skill</h3><p>Every good function should explain:</p><ul><li>What it does</li><li>Inputs</li><li>Outputs</li></ul><p>Python supports this using <strong>docstrings</strong>, accessible via __doc__.</p><h3>Example:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*QjCAGLHpyalrUKPApUBCLw.png" /></figure><p><strong>Why this matters:</strong></p><ul><li>Improves readability</li><li>Helps teammates</li><li>Helps interviewers</li><li>Makes you look professional</li></ul><h3>Local vs Global Variables (Clear Once, Confusing Never)</h3><h3>Global Variable: —</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/197/1*5kmJgKW7DDq0k7NYC3ziZA.png" /></figure><p>Accessible everywhere.</p><h3>Local Variable: —</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*lNZM0Eu6R-kQIPccFqx4Pg.png" /></figure><p>Accessible <strong>only inside the function</strong>.</p><p>Rule to remember:<br><strong>Functions protect their internal data.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BpYbbxR_n7jD_bHB5ivY8Q.jpeg" /></figure><h3>Return vs Print (Classic Beginner Mistake )</h3><p>print() → shows value<br> return → sends value back for reuse</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/271/1*LwqXHVvR7d_3SdcXPw-8-w.png" /></figure><p>✔<strong> Required for:</strong></p><ul><li>Data Science</li><li>Machine Learning</li><li>Further calculations</li></ul><h3>UDF + Pandas = Real Data Science Power</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*LxAyH7BL89UgDCgUU1qCZQ.png" /></figure><p>This is where UDFs become <strong>indispensable</strong>.</p><h3>Common Mistakes Beginners Make</h3><p>Writing repeated logic<br>Forgetting return<br>Confusing positional &amp; keyword arguments<br>Ignoring docstrings<br>Overloading one function with many tasks</p><h3>Best Practices for Writing Clean UDFs</h3><p>✔ One function → one responsibility<br>✔ Use meaningful names<br>✔ Prefer keyword arguments<br>✔ Always add docstrings<br>✔ Keep functions short</p><h3>Final Thoughts: Why UDF Changes Everything</h3><p>UDFs don’t just improve your code — <br>they <strong>change how you think</strong>.</p><p><strong>Once you master:</strong></p><ul><li>Positional arguments</li><li>Keyword arguments</li><li>Default arguments</li><li>__doc__</li></ul><p>You move from:<br> ❌ “I know Python”<br> to<br> ✅ “I can build logic using Python”</p><blockquote><em>If this article helped you move one step closer to writing cleaner Python code, show some love by liking the post and following me on Medium for more such practical learning content.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2711da18bf14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Merge vs Join vs Concat in Pandas — Explained Simply with Examples (With Visuals)]]></title>
            <link>https://medium.com/@rishikasingh3789/merge-vs-join-vs-concat-in-pandas-explained-simply-with-examples-with-visuals-a95b4ea4d414?source=rss-61b05fa3f05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a95b4ea4d414</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Rishika Singh]]></dc:creator>
            <pubDate>Wed, 11 Feb 2026 13:54:17 GMT</pubDate>
            <atom:updated>2026-02-11T13:54:17.887Z</atom:updated>
            <content:encoded><![CDATA[<p>In this beginner-friendly guide, you’ll learn the difference between <strong>merge, join, and concat in Pandas</strong> with simple examples and visuals.</p><h3>A Story Every Data Analyst Lives Through</h3><p>On my first real data project, I received three files:</p><ul><li>customers.csv</li><li>orders.csv</li><li>payments.csv</li></ul><p>Individually, everything looked perfect.</p><p>But then my manager asked:</p><blockquote>“Can you tell me which customer ordered what?”</blockquote><p>That’s when reality hit.</p><p>The data wasn’t <strong>connected</strong>.</p><p>This is the exact moment when every beginner meets three powerful Pandas tools:</p><p><strong>Merge · Join ·Concatenate</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WnPmXylWAtfhTQVdg_vLcA.jpeg" /></figure><p>They sound similar.<br>They look confusing.<br>But once you understand them visually — everything clicks.</p><p>Let’s break them down <strong>simply</strong>, <strong>visually</strong>, and <strong>clearly</strong>.</p><h3>The Big Picture: How Pandas Combines DataFrames</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QgjaSDtJylk0-us0a3PyYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*reE-9dFMiwkB0v127PFh8A.png" /></figure><blockquote><em>Pandas gives us </em><strong><em>three different ways</em></strong><em> to bring DataFrames together — depending on </em>how<em> the data is related.</em></blockquote><h3>1️️. merge() — When DataFrames Share a Common Column</h3><p>Think of merge() like a <strong>database join</strong>.</p><p>You have:</p><ul><li>One table with customer details</li><li>Another table with orders</li><li>Both share a <strong>common column</strong> (like customer_id()</li></ul><p>That’s exactly where merge() is used.</p><h3>Example: Basic Merge</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zeO91yjWdgpF9j5aTyyEGg.png" /></figure><p>Only <strong>matching customer_id values</strong> appear.<br>This is called an <strong>Inner Join</strong>.</p><h3>Visual: How merge() Works</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gmhJY8AD63RohV8N72gRVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2SOhIccPcWDfzONeVjE5iQ.png" /></figure><h3>Types of Merge : —</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*mvqgCgyUBUT3MY8ZeF89Ng.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*z3VYYIFihqDl15n0KmTr9w.png" /></figure><h3>2️. join() — When Index Does the Matching</h3><p>Now imagine this:</p><p>Your DataFrames already use <strong>indexes</strong> to represent relationships.<br>There’s no need to match columns.</p><p>This is where join() is perfect.</p><h3>Example: Index-Based Join : —</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1QPfHFm5QIM_l_OSWkrjnA.png" /></figure><h3>Visual: How join() Works</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gmhJY8AD63RohV8N72gRVw.png" /></figure><h3>When to Use join()</h3><p>✔ When indexes already match<br> ✔ Cleaner syntax<br> ❌ Not ideal if your key is a column</p><h3>3️. concat() — When You Just Want to Stack Data</h3><p>Sometimes, you don’t want to match anything.</p><p>You just want to <strong>append data</strong>.</p><p><strong>Example:</strong></p><ul><li>January sales</li><li>February sales</li></ul><p>Same structure.<br>Different rows.</p><p>This is not a merge problem — it’s a <strong>concat problem</strong>.</p><h3>Row-wise Concat</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*eQK_zyiOI_0U42McGHZwJA.png" /></figure><h3>Column-wise Concat</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*O52YQiFvZ2RFw5fRct6YNw.png" /></figure><h3>Visual: How concat() Works: —</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-_pc293rHRRBS0Dq.png" /></figure><h3>Merge vs Join vs Concat — One Visual to Remember</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*BL-dpqvdAWwso8T7b4bLcg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*fT07NUwDU2Bw-imNSrfjng.png" /></figure><h3>Which One Should You Use?</h3><p>✔ Use <strong>merge()</strong> → when combining related tables<br>✔ Use <strong>join()</strong> → when indexes already represent relationships<br>✔ Use <strong>concat()</strong> → when stacking similar datasets</p><h3>A Real Analyst Rule</h3><p>In real projects:</p><ul><li>Most problems are <strong>merge problems</strong></li><li>Many are <strong>concat problems</strong></li><li>Very few truly need join()</li></ul><p>Understanding <strong>why</strong> you’re combining data matters more than memorizing syntax.</p><h3>Final Thoughts</h3><p>Every strong data analyst knows this:</p><blockquote><strong><em>Data analysis doesn’t start with charts.<br> It starts with connected data.</em></strong></blockquote><p>If you master merge, join, and concat, Pandas stops being confusing — and starts feeling powerful.</p><blockquote>Learning Pandas becomes easy once you understand <em>why</em> data is combined — not just <em>how</em>. Follow for more beginner-friendly data science guides.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a95b4ea4d414" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Can Data Prove a Claim? The Story Behind H₀ (Null Hypothesis) and Hₐ (Alternative Hypothesis)”]]></title>
            <link>https://medium.com/@rishikasingh3789/can-data-prove-a-claim-the-story-behind-h%E2%82%80-null-hypothesis-and-h%E2%82%90-alternative-hypothesis-a7460a9efacd?source=rss-61b05fa3f05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7460a9efacd</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[hypothesis-testing]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data-scientist]]></category>
            <dc:creator><![CDATA[Rishika Singh]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 04:49:02 GMT</pubDate>
            <atom:updated>2026-02-01T07:05:28.294Z</atom:updated>
            <content:encoded><![CDATA[<p>One morning, a school received an official notice.</p><p>The <strong>Education Ministry</strong> was visiting.</p><p>During the inspection, the principal confidently said:</p><blockquote><em>“The average height of students in Class 10A is </em><strong><em>5.5 feet</em></strong><em>.”</em></blockquote><p>The officers paused.</p><p>They didn’t argue.<br>They didn’t agree.<br>They simply asked one question:</p><p><strong>“Can you prove it with data?” </strong>And just like that, a <strong>statistical investigation</strong> began.</p><p>This is exactly how <strong>hypothesis testing</strong> works — <br>and this is where <strong>H₀ (Null Hypothesis)</strong> and <strong>Hₐ (Alternative Hypothesis)</strong> are born.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*zhPSOiroxScK2SC4kxjcYQ.jpeg" /></figure><h3>What Is a Hypothesis in Statistics?</h3><p>A <strong>hypothesis</strong> is a statement about a population that we want to test using sample data.</p><p>In statistics, we never test just one statement.<br>We always create <strong>two opposite claims</strong>:</p><ol><li><strong>Null Hypothesis (H₀)</strong></li><li><strong>Alternative Hypothesis (Hₐ)</strong></li></ol><p>Together, they help us make <strong>logical, unbiased decisions</strong>.</p><h3>What Is the Null Hypothesis (H₀)?</h3><p>Imagine a courtroom.</p><p>The accused person is assumed <strong>innocent</strong> until proven guilty.</p><p>That assumption of innocence is exactly what <strong>H₀</strong> represents.</p><h3>Definition</h3><p>The <strong>Null Hypothesis (H₀)</strong> states that:</p><blockquote><strong><em>There is no change, no effect, and no difference.</em></strong></blockquote><p>It is the <strong>default belief</strong> that things are normal.</p><h3>Example from the Story</h3><p>The principal’s claim becomes:</p><p><strong>H₀: Average height of Class 10A students = 5.5 ft</strong></p><h3>Common Forms of H₀</h3><ul><li>H₀: μ = 50</li><li>H₀: μ₁ = μ₂</li><li>H₀: p = 0.40</li></ul><p>Notice something important:<br><strong>H₀ always includes an equality sign (=, ≤, ≥)</strong></p><h3>The Alternative Hypothesis (Hₐ): The Challenger</h3><p>Now comes the ministry’s doubt.</p><p>They are not saying the principal is wrong —</p><p>they are saying:</p><blockquote><em>“Let’s see if the data tells a different story.”</em></blockquote><p>That doubt becomes the <strong>Alternative Hypothesis (Hₐ)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iA1nACS9_O3E_3hGWggdYw.jpeg" /></figure><h3>Definition</h3><p>The <strong>Alternative Hypothesis (Hₐ)</strong> states that:</p><blockquote><strong><em>There is a real effect, difference, or change.</em></strong></blockquote><p>It is what the researcher is trying to <strong>find evidence for</strong>.</p><h3>Example from the Story: —</h3><p><strong>Hₐ: Average height of Class 10A students ≠ 5.5 ft</strong></p><p>This means the height could be <strong>higher or lower</strong>.</p><h3><strong>*Difference Between Null Hypothesis (H₀) and Alternative Hypothesis (Hₐ): —</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*zKqpn_1XScyaWZj6T4jA-g.png" /></figure><h3>Why We Always Start with H₀</h3><p>This is a powerful idea.</p><p>We do <strong>not</strong> start by assuming something has changed.<br>We start by assuming <strong>nothing has changed</strong>.</p><p>Only when the data provides <strong>strong evidence</strong>,<br>do we reject that assumption.</p><p>That’s why:</p><blockquote><strong><em>H₀ is tested, not Hₐ.</em></strong></blockquote><h3>Types of Alternative Hypotheses (With Meaning)</h3><h3>1. Two-Tailed Hypothesis</h3><p>Used when we are checking for <strong>any difference</strong>.</p><h3>Example/Hypotheses</h3><ul><li><strong>H₀:</strong> μ = 5.5</li><li><strong>Hₐ:</strong> μ ≠ 5.5</li></ul><p>Question asked:<br>“Is the value different?”</p><h3>Graph 1: Two-Tailed Test (Most Common Case)</h3><p>Now suppose the ministry is unsure whether height is <strong>higher or lower</strong>.</p><h3>Python Code:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*yrCHmP1jc6D1EI0hGeJB-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*k4ivEhFtfolxFlTRhkexcg.png" /></figure><h3>Interpretation</h3><ul><li>Two shaded regions → left and right</li><li>If test statistic lies in <strong>either region</strong><br> <strong>Reject H₀</strong></li></ul><h3>2. Right-Tailed Hypothesis</h3><p>Used when we expect an <strong>increase</strong>.</p><h3>Example/Hypotheses (Right-Tailed Test)</h3><ul><li><strong>H₀:</strong> μ ≤ 5.5</li><li><strong>Hₐ:</strong> μ &gt; 5.5</li><li>Here, we are only interested in values <strong>greater than</strong> the claimed mean.</li></ul><p>Question asked:<br>“Has it increased?”</p><h3>Graph 2: Right-Tailed Test (Rejection Region)</h3><p>Let’s extend our story one step further.</p><p>Now assume the ministry believes that<br>the <strong>average height is greater than 5.5 ft</strong>.</p><p>This belief leads to a <strong>right-tailed test</strong>.</p><p><strong>Python Code: Right-Tailed Test Graph:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*LLsMm-IwNjwW1ULDsU5A3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*1JAve9zgYtNyEoeHZ-Q5hg.png" /></figure><h3>3. Left-Tailed Hypothesis</h3><p>Used when we expect a <strong>decrease</strong>.</p><h3><strong>Example/Hypotheses</strong></h3><ul><li><strong>H₀:</strong> μ ≥ 5.5</li><li><strong>Hₐ:</strong> μ &lt; 5.5</li></ul><p>Question asked:<br>“Has it decreased?”</p><h3>Graph 1: Left-Tailed Test (Rejection Region)</h3><p>Suppose the ministry believes the average height is <strong>less than 5.5 ft</strong>.</p><h3>Python Code (Normal Distribution Graph):</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*NxVsZfdvx1kmdsWLX9OKyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*1DhBMGdmnilyFWhvpds2qw.png" /></figure><h3>How to Read This Graph</h3><ul><li>The bell curve shows <strong>normal distribution</strong></li><li>The shaded area is the <strong>rejection region</strong></li><li>If the calculated Z-value falls here → <strong>Reject H₀</strong></li><li>Otherwise → <strong>Fail to reject H₀</strong></li></ul><h3>How the Decision Is Made</h3><p>After defining H₀ and Hₐ:</p><ol><li>A <strong>sample</strong> is selected</li><li>A <strong>test statistic</strong> is calculated (Z or t)</li><li>A <strong>critical value or p-value</strong> is found</li><li>A decision is taken</li></ol><h3><strong>A Simple Numeric Example: —</strong></h3><p><strong>Q1. During an inspection, the Education Ministry of India questioned the claim made by the principal of Class 10A that the average height of students is 5.5 feet.</strong></p><p><strong>To verify this claim, a random sample of 22 students from Class 10A was selected.<br>The following information was obtained from the sample:</strong></p><ul><li><strong>Sample size (n) = 22</strong></li><li><strong>Sample mean height = 5.7 ft</strong></li><li><strong>Claimed population mean (μ) = 5.5 ft</strong></li><li><strong>Level of significance (α) = 0.05</strong></li></ul><p><strong>Assume that the population standard deviation is known and the data follows a normal distribution.<br>The calculated Z-value is 2.10.</strong></p><h4><strong>Tasks:</strong></h4><ol><li><strong>State the Null Hypothesis (H₀) and Alternative Hypothesis (Hₐ).</strong></li><li><strong>Identify whether this is a one-tailed or two-tailed test (with reason).</strong></li><li><strong>Find the critical Z-value at α = 0.05.</strong></li><li><strong>Using the critical value approach, decide whether to reject or accept H₀.</strong></li><li><strong>Give a clear statistical interpretation of the result.</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*C_AWMEXs-k8TEveJDKGxCg.png" /></figure><h3>Final Outcomes:</h3><ul><li><strong>Reject H₀</strong> → Strong evidence for Hₐ</li><li><strong>Fail to reject H₀</strong> → Not enough evidence against H₀</li></ul><p><strong>Important Rule:</strong><br> We <strong>never say “H₀ is accepted”</strong><br> We say <strong>“H₀ is not rejected.”</strong></p><h3>Why H₀ and Hₐ Matter in Real Life</h3><p>These hypotheses are used everywhere:</p><ul><li>Data Science &amp; Analytics</li><li>Medical Research</li><li>Business &amp; Marketing</li><li>Education Studies</li><li>Quality Control</li></ul><p>Every data-driven decision starts with <strong>H₀ vs Hₐ</strong>.</p><h3>Final Thought</h3><p>Statistics doesn’t jump to conclusions.</p><p>It listens.<br>It observes.<br>It tests.</p><p>H₀ and Hₐ give data a <strong>voice</strong> — <br> so decisions are based on <strong>evidence</strong>, not assumptions.</p><blockquote>If this explanation helped you understand hypothesis testing clearly, consider highlighting or sharing it — it helps more learners find it.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7460a9efacd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Correlation in Data Analytics: The Hidden Relationships That Drive Every Business Decision.]]></title>
            <link>https://medium.com/@rishikasingh3789/correlation-in-data-analytics-the-hidden-relationships-that-drive-every-business-decision-f3c7c6f082ff?source=rss-61b05fa3f05d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3c7c6f082ff</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Rishika Singh]]></dc:creator>
            <pubDate>Mon, 26 Jan 2026 13:10:30 GMT</pubDate>
            <atom:updated>2026-03-30T23:24:14.714Z</atom:updated>
            <content:encoded><![CDATA[<p>Last month, an e-commerce company noticed something strange.</p><p>They increased their advertising budget — and suddenly their sales jumped.<br> They reduced ads — and revenue dropped again.</p><h4>Was it luck?<br> Or was there a deeper connection?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QBtRCToBxBwE1U70u5Vqlw.jpeg" /></figure><p><strong>This is exactly where correlation enters the world of data.</strong></p><h3>What is Correlation?</h3><p>In statistics, correlation measures how strongly two variables move together relative to their average values.</p><p><strong>In simple words: - <em>Correlation tells us whether two variables change together in a similar pattern or not.</em></strong></p><blockquote>It does <strong>not</strong> explain <em>why</em> they are related — <br>It only tells <strong>how strongly</strong> they are related.</blockquote><h3>Types of Correlation: —</h3><h3>1. Positive Correlation: -</h3><p>Both variables increase or decrease together.</p><p><strong>Example: — Advertising spend ↑ → Sales ↑</strong></p><h3>2. Negative Correlation: -</h3><p>One variable increases while the other decreases.</p><p><strong>Example: — Product price ↑ → Customer demand ↓</strong></p><h3>3. Zero Correlation: -</h3><p>No statistical relationship exists.</p><p><strong>Example: — Shoe size and exam marks</strong></p><p>This simple concept controls how modern businesses make million-dollar decisions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LpahaFhu6j26xMzUxzj-hw.jpeg" /></figure><h3>Correlation Is More Than Just a Number: —</h3><p>In real data science, correlation is a <strong>signal</strong>.</p><p><strong>It helps analysts:</strong></p><ul><li>Identify important variables</li><li>Generate hypotheses</li><li>Improve predictions</li><li>Discover business drivers</li></ul><p>High correlation may indicate useful features.<br> Low correlation does not always mean no relationship — it may be non-linear or noisy data.</p><h3>Correlation Formula (Statistics Perspective)</h3><p>Statistically, correlation is calculated using the <strong>Pearson Correlation Coefficient</strong>.</p><p>Instead of focusing on math, let’s understand the meaning.</p><ul><li><strong>Cov (X, Y)</strong> shows whether X and Y move together or in opposite directions</li><li><strong>Standard deviations</strong> show how much each variable varies</li></ul><p>Correlation is simply <strong>standardized covariance</strong>, which makes it:</p><ul><li>Scale-free</li><li>Comparable</li><li>Easy to interpret</li></ul><p>That is why correlation values always lie between <strong>–1 and +1...</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*MfZM6XIZYOTcKpB3XX3h6Q.png" /></figure><h3>Why Not Just Use Covariance?</h3><p><strong>Covariance:</strong></p><ul><li>Shows direction</li><li>But depends on units (₹, kg, meters, etc.)</li></ul><p><strong>Correlation:</strong></p><ul><li>Removes unit dependency</li><li>Shows both <strong>strength and direction</strong> clearly</li></ul><p><strong>That is why statisticians prefer correlation over covariance.</strong></p><h3>Visual Patterns of Correlation (Understanding Through Scatter Plots)</h3><p>Correlation is not only calculated using formulas.<br> Very often, you can <strong>see the relationship visually</strong> using scatter plots.</p><p>Let us understand the common patterns.</p><h3>Python Example — Scatter Plot</h3><p>Let us demonstrate correlation with a small dataset df.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*ICnC7T9OcdCHRb0jshgnLA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*O1IDHJF4GTHqdO8SL1Ux4A.png" /></figure><p>“The scatter plot clearly shows a strong positive correlation between advertising spend and sales. As advertising investment increases, sales also tend to rise, indicating that higher marketing efforts lead to better business performance.”</p><h3>1. Strong Positive Correlation: -</h3><p>As one variable increases, the other also increases.<br><strong> Example: Experience → Salary</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*FCEDk3UeQgj_GDlH-PrslA.jpeg" /></figure><h3>2. Weak Positive Correlation: -</h3><p>Points move upward but not perfectly.</p><blockquote><strong>Meaning: The relationship exists, but it is weak.</strong></blockquote><p><strong>Example: Advertising Budget vs Brand Awareness</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bk604tPTRCu94S_wfBuseA.jpeg" /></figure><h3>3. Strong Negative Correlation: -</h3><p>As one variable increases, the other decreases.<br><strong> Example: Price → Demand</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*YyTBp4vUPhapsY96p-OhQA.jpeg" /></figure><h3>4. Weak Negative Correlation: -</h3><p>A downward trend exists, but with more scatter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*NN-fEnKR5uOt9uFhHm63oQ.jpeg" /></figure><h3>5. Zero Correlation: -</h3><p>Random scatter with no clear pattern.<br><strong> Example: Shoe size → Intelligence</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xmph_u8R6DXMZmxBfHcSkQ.jpeg" /></figure><h3>6. Non-Linear Correlation: -</h3><p>Curved relationship instead of straight line.<br><strong> Example: Temperature → Ice-cream sales</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LvFcK36F2Kcxha0FL2kuBQ.jpeg" /></figure><h3>7. Clustered Patterns: -</h3><p><strong>Multiple groups or hidden variables appear.<br> Common in customer segmentation and behavioral data.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TlQuwYbky-nyDjSHzvkBCg.jpeg" /></figure><h3>Outliers in Correlation (Extreme Points Matter)</h3><p>Sometimes, a few points lie far away from the main cluster.<br> These are called <strong>outliers</strong>.</p><p>Outliers can:</p><ul><li>Create false correlation</li><li>Increase or reduce correlation artificially</li><li>Even change the direction of correlation</li></ul><p>That is why:</p><blockquote><strong><em>Never trust correlation without visually checking the data first.</em></strong></blockquote><p>This step is a core part of <strong>Exploratory Data Analysis (EDA)</strong>.</p><h3>Correlation Heatmap: — Understanding Multiple Relationships</h3><p><strong>When working with many variables, correlation tables become difficult to read.</strong></p><p>This is where <strong>heatmaps</strong> are extremely useful.</p><p><strong>A heatmap represents correlation using colors:</strong></p><ul><li>Dark color → Strong correlation</li><li>Light color → Weak correlation</li></ul><p><strong>Heatmaps are widely used in:</strong></p><ul><li>Feature selection</li><li>Detecting multicollinearity</li><li>Financial forecasting</li><li>Customer behavior analysis</li></ul><h3>Python Example — Correlation Heatmap</h3><p>Let us demonstrate correlation with a small dataset df.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*gVQzTU8UgJlNhAL-6lC-bw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y8xWt0jgRQ0gEqPfSQKxyw.png" /></figure><h3>What this shows?</h3><ul><li>Red color → Strong positive correlation</li><li>Blue color → Negative correlation</li><li>Values near <strong>1</strong> → Strong relation</li><li>Values near <strong>0</strong> → Weak relation</li></ul><h3>Use of Correlation in the Field of Analytics and Data Science</h3><p>The <strong>use of correlation in the field of analytics and data science</strong> is fundamental.</p><h4>It helps professionals:</h4><ul><li>Identify key drivers of business growth</li><li>Select important features for machine learning models</li><li>Remove redundant variables</li><li>Detect risky relationships</li><li>Improve prediction accuracy</li></ul><p><strong>In almost every data science project, correlation analysis is one of the first and most important steps.</strong></p><h3>Why Correlation is So Powerful</h3><p><strong>Every company tracks:</strong></p><ul><li>Sales</li><li>Website visits</li><li>Advertising spends</li><li>Customer behavior</li><li>App downloads</li></ul><p>But data is useless unless we understand <strong>how these numbers are connected</strong>.</p><h4>Correlation helps us:</h4><ul><li>Find what truly drives growth</li><li>Detect patterns early</li><li>Build better models</li><li>Reduce business risk</li></ul><p><strong>Without correlation, analytics becomes guesswork</strong>.</p><h3>A Real-World Example</h3><p>Suppose an online learning platform analyzes:</p><p>Metric Correlation with Revenue Website traffic 0.89 Ad spend 0.82 social media likes 0.20</p><p>Interpretation:</p><p>Website traffic and ads strongly affect revenue.<br> Social media likes do not.</p><p>So, the company invests in traffic and ads — not vanity metrics.</p><p>This is the <strong>power of correlation</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9p8mTrU9FuV1rWEr5FwlDA.png" /></figure><h3>Correlation Coefficient — The Relationship Meter</h3><p>Correlation is measured using a value between -1 and +1<br>ValueMeaning+1Perfect positive relationship0No relationship-1 Perfect negative relationship<br>The closer the number is to +1 or -1, the stronger the relationship.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*DlDgBRpSXmseRDpxdTxHtQ.jpeg" /></figure><h3>Correlation is Not Causation</h3><p>Ice-cream sales and drowning cases both increase in summer.<br> But ice-cream does not cause drowning.</p><p>The hidden factor is <strong>heat</strong>.</p><p>Good analysts never stop at correlation — they investigate deeper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ayqd8JIZkjDKKyjuhprHgg.jpeg" /></figure><p>Good analysts never stop at correlation — they investigate deeper before making conclusions.</p><h3>Python Example: Finding Correlation</h3><p>Let’s calculate correlation using Python.</p><h3>Step 1 — Sample Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*RqybWDgiKPPGTYBVsCNSaQ.png" /></figure><h3>Step 2 — Calculate Correlation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*D0jb2XJTenZ4wjHP4xHyNA.png" /></figure><h3>Common Beginner Mistakes</h3><p>Assuming correlation implies causation<br> Ignoring outliers<br> Trusting correlation blindly<br> Skipping visualization</p><p>✔ Good analysts always combine:<br> <strong>Correlation + Visualization + Logic</strong></p><h3>Final Thought</h3><p>Correlation is not just a mathematical concept.<br> It is how data reveals its secrets.</p><p>If you want to become a strong data analyst or data scientist, mastering correlation is one of the smartest moves you can make.</p><p>Because in data — <strong>everything is connected.</strong></p><p>If you enjoyed this article, follow me on Medium for more beginner-friendly data science tutorials.<br> Part 2 of this series is coming soon — where we dive deeper into correlation methods and real-world use cases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3c7c6f082ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>