<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jonathan kip</title>
    <description>The latest articles on DEV Community by Jonathan kip (@jonathan_kip).</description>
    <link>https://dev.to/jonathan_kip</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3818256%2Fb571412d-15c8-4cfa-97c0-0622f4169297.jpg</url>
      <title>DEV Community: Jonathan kip</title>
      <link>https://dev.to/jonathan_kip</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jonathan_kip"/>
    <language>en</language>
    <item>
      <title>Why Hypothesis Testing is the Backbone of Data Science</title>
      <dc:creator>Jonathan kip</dc:creator>
      <pubDate>Fri, 07 Aug 2026 11:35:44 +0000</pubDate>
      <link>https://dev.to/jonathan_kip/why-hypothesis-testing-is-the-backbone-of-data-science-52io</link>
      <guid>https://dev.to/jonathan_kip/why-hypothesis-testing-is-the-backbone-of-data-science-52io</guid>
      <description>&lt;h2&gt;
  
  
  Why Hypothesis Testing is the Backbone of Data Science
&lt;/h2&gt;

&lt;p&gt;Hypothesis testing is the backbone of data science because it provides a rigorous, structured way to distinguish real patterns from random noise and to make decisions backed by statistical evidence rather than intuition.  It allows data scientists to validate assumptions, quantify uncertainty, and determine whether observed results are genuine or just due to chance—making it essential for trustworthy models, experiments, and business decisions. &lt;a href="https://openstax.org/books/principles-data-science/pages/4-2-hypothesis-testing" rel="noopener noreferrer"&gt;openstax&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Hypothesis Testing?
&lt;/h2&gt;

&lt;p&gt;Hypothesis testing is a statistical method used to evaluate claims about a population using sample data.  It works by setting up two mutually exclusive hypotheses: &lt;a href="https://openstax.org/books/principles-data-science/pages/4-2-hypothesis-testing" rel="noopener noreferrer"&gt;openstax&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Null hypothesis (H₀)&lt;/strong&gt;: The default assumption (e.g., “There is no difference between two groups”). &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alternative hypothesis (H₁)&lt;/strong&gt;: The claim you want to test (e.g., “There is a difference between two groups”). &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By analyzing sample data, you assess the likelihood of observing your results under the assumption that H₀ is true, and decide whether there’s enough evidence to reject it. &lt;a href="https://openstax.org/books/principles-data-science/pages/4-2-hypothesis-testing" rel="noopener noreferrer"&gt;openstax&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Hypothesis Testing Matters in Data Science
&lt;/h2&gt;

&lt;p&gt;Hypothesis testing is not just a math exercise—it’s the foundation of evidence-based decision-making in data science.  Here’s why it’s so critical: &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Separates Signal from Noise
&lt;/h3&gt;

&lt;p&gt;In the era of big data, patterns can appear by pure luck.  Hypothesis testing answers a key question: &lt;strong&gt;“Is this pattern real, or did it happen by chance?”&lt;/strong&gt;  This helps you avoid acting on false positives or misleading trends. &lt;/p&gt;

&lt;h3&gt;
  
  
  2. Validates Assumptions and Models
&lt;/h3&gt;

&lt;p&gt;Data science workflows rely on assumptions—about data distributions, feature importance, or model performance.  Hypothesis testing provides a structured way to: &lt;a href="https://openstax.org/books/principles-data-science/pages/4-2-hypothesis-testing" rel="noopener noreferrer"&gt;openstax&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validate whether a new model or feature actually improves performance. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Confirm that observed differences (e.g., in conversion rates) are statistically significant. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Test assumptions required by statistical methods (e.g., normality, equal variances). &lt;a href="https://www.geeksforgeeks.org/data-science/why-hypothesis-testing-is-important-in-research-/" rel="noopener noreferrer"&gt;geeksforgeeks&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Enables Data-Driven Decision-Making
&lt;/h3&gt;

&lt;p&gt;Instead of relying on gut feelings or anecdotes, hypothesis testing transforms assumptions into evidence.  It allows you to: &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make quantifiable, data-backed decisions. &lt;a href="https://www.linkedin.com/pulse/hypothesis-testing-data-science-complete-guide-mohamed-chizari-azwee" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Support business choices (e.g., launch a feature, change pricing) with statistical rigor. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Build confidence among stakeholders by showing that results are validated, not guessed. &lt;a href="https://www.geeksforgeeks.org/data-science/why-hypothesis-testing-is-important-in-research-/" rel="noopener noreferrer"&gt;geeksforgeeks&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Forms the Foundation of Experimentation
&lt;/h3&gt;

&lt;p&gt;Hypothesis testing is the engine behind A/B testing, clinical trials, and scientific experiments.  It helps you: &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Design experiments in a methodical way. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Determine whether changes in one variable directly impact another (causality, not just correlation). &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Calculate sample sizes and interpret p-values to draw statistically valid inferences. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Quantifies Uncertainty and Risk
&lt;/h3&gt;

&lt;p&gt;Every data-driven decision carries risk.  Hypothesis testing quantifies that uncertainty by: &lt;a href="https://openstax.org/books/principles-data-science/pages/4-2-hypothesis-testing" rel="noopener noreferrer"&gt;openstax&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Providing p-values that measure the strength of evidence against the null hypothesis. &lt;a href="https://openstax.org/books/principles-data-science/pages/4-2-hypothesis-testing" rel="noopener noreferrer"&gt;openstax&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Controlling error rates (Type I and Type II) to balance false positives and false negatives. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Generating confidence intervals that show the range of plausible values for an effect. &lt;a href="https://www.geeksforgeeks.org/data-science/why-hypothesis-testing-is-important-in-research-/" rel="noopener noreferrer"&gt;geeksforgeeks&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Core Concepts in Hypothesis Testing
&lt;/h2&gt;

&lt;p&gt;To use hypothesis testing effectively, you need to understand these key concepts:&lt;/p&gt;

&lt;h3&gt;
  
  
  Null and Alternative Hypotheses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Null hypothesis (H₀)&lt;/strong&gt;: Represents the status quo (e.g., “The new feature has no effect on conversion rate”). &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alternative hypothesis (H₁)&lt;/strong&gt;: Represents the effect you’re testing for (e.g., “The new feature increases conversion rate”). &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  P-Value and Significance Level
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;P-value&lt;/strong&gt;: The probability of observing your data (or more extreme) if H₀ is true. &lt;a href="https://openstax.org/books/principles-data-science/pages/4-2-hypothesis-testing" rel="noopener noreferrer"&gt;openstax&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Significance level (α)&lt;/strong&gt;: A threshold (commonly 0.05) below which you reject H₀. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;If &lt;strong&gt;p &amp;lt; α&lt;/strong&gt;, the result is considered statistically significant, and you reject H₀. &lt;a href="https://openstax.org/books/principles-data-science/pages/4-2-hypothesis-testing" rel="noopener noreferrer"&gt;openstax&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Type I and Type II Errors
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Type I error (false positive)&lt;/strong&gt;: Rejecting H₀ when it’s actually true. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type II error (false negative)&lt;/strong&gt;: Failing to reject H₀ when it’s actually false. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
Balancing these errors is crucial—especially in high-stakes domains like healthcare or finance. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Common Hypothesis Tests
&lt;/h3&gt;

&lt;p&gt;Data scientists frequently use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;t-tests&lt;/strong&gt;: Compare means between two groups (e.g., treatment vs control).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Z-tests&lt;/strong&gt;: Similar to t-tests but for large samples or known variance.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chi-square tests&lt;/strong&gt;: Test relationships between categorical variables.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ANOVA&lt;/strong&gt;: Compare means across three or more groups.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mann-Whitney U / Wilcoxon&lt;/strong&gt;: Non-parametric alternatives when assumptions are violated. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Real-World Applications in Data Science
&lt;/h2&gt;

&lt;p&gt;Hypothesis testing powers decisions across industries and use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A/B Testing&lt;/strong&gt;: Validate whether a new UI, pricing strategy, or marketing campaign actually improves metrics. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature Selection&lt;/strong&gt;: Test whether a new feature significantly improves model performance. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Medical Studies&lt;/strong&gt;: Determine if a new treatment is more effective than a placebo. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manufacturing &amp;amp; Quality Control&lt;/strong&gt;: Verify whether a process change reduces defects.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customer Analytics&lt;/strong&gt;: Test if churn rates differ between user segments. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common Pitfalls and How to Avoid Them
&lt;/h2&gt;

&lt;p&gt;Even with its power, hypothesis testing can be misused. Watch out for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;P-hacking&lt;/strong&gt;: Running many tests until you find a “significant” result by chance.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ignoring effect size&lt;/strong&gt;: A tiny effect can be statistically significant with a large sample but meaningless in practice. &lt;a href="https://www.geeksforgeeks.org/data-science/why-hypothesis-testing-is-important-in-research-/" rel="noopener noreferrer"&gt;geeksforgeeks&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Misinterpreting p-values&lt;/strong&gt;: A p-value is not the probability that H₀ is true—it’s the probability of your data under H₀. &lt;a href="https://www.geeksforgeeks.org/data-science/why-hypothesis-testing-is-important-in-research-/" rel="noopener noreferrer"&gt;geeksforgeeks&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overlooking assumptions&lt;/strong&gt;: Many tests assume normality, equal variance, or independence—violating these can invalidate results. &lt;a href="https://openstax.org/books/principles-data-science/pages/4-2-hypothesis-testing" rel="noopener noreferrer"&gt;openstax&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Bottom Line
&lt;/h2&gt;

&lt;p&gt;Hypothesis testing is the powerful backbone of modern data science because it turns observations into evidence and assumptions into validated insights.  It enables data scientists to: &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Distinguish real patterns from random noise.
&lt;/li&gt;
&lt;li&gt;Make decisions with quantified uncertainty. &lt;a href="https://openstax.org/books/principles-data-science/pages/4-2-hypothesis-testing" rel="noopener noreferrer"&gt;openstax&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Build trustworthy models and experiments. &lt;a href="https://www.dasca.org/world-of-data-science/article/hypothesis-testing-in-data-science-validating-decisions-with-data" rel="noopener noreferrer"&gt;dasca&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without hypothesis testing, data science would rely on guesswork and anecdote—undermining the credibility, reliability, and impact of every analysis.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>datascience</category>
      <category>machinelearning</category>
      <category>analytics</category>
    </item>
    <item>
      <title>Understanding Statistical Distributions and Their Impact on Data Science</title>
      <dc:creator>Jonathan kip</dc:creator>
      <pubDate>Fri, 07 Aug 2026 11:31:13 +0000</pubDate>
      <link>https://dev.to/jonathan_kip/understanding-statistical-distributions-and-their-impact-on-data-science-nh1</link>
      <guid>https://dev.to/jonathan_kip/understanding-statistical-distributions-and-their-impact-on-data-science-nh1</guid>
      <description>&lt;h2&gt;
  
  
  Understanding Statistical Distributions and Their Impact on Data Science
&lt;/h2&gt;

&lt;p&gt;Statistical distributions are the backbone of data science—they describe how data values are spread, how likely certain outcomes are, and how uncertain our measurements really are.  Misunderstanding or misapplying a distribution can lead to invalid tests, biased models, and poor business decisions, while using the right one improves accuracy, interpretability, and model robustness. &lt;a href="https://www.sciencedirect.com/topics/computer-science/statistical-distribution" rel="noopener noreferrer"&gt;sciencedirect&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is a Statistical Distribution?
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;statistical distribution&lt;/strong&gt; is a mathematical function that assigns probabilities to possible outcomes of a random variable.  It describes how values are spread across a dataset—where most observations cluster, how much variation exists, and whether extreme values (outliers) are common or rare. &lt;a href="https://www.sciencedirect.com/topics/computer-science/statistical-distribution" rel="noopener noreferrer"&gt;sciencedirect&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Distributions answer key questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How likely is a particular event?
&lt;/li&gt;
&lt;li&gt;What values are typical or extreme?
&lt;/li&gt;
&lt;li&gt;How uncertain is our data? &lt;a href="https://www.sciencedirect.com/topics/computer-science/statistical-distribution" rel="noopener noreferrer"&gt;sciencedirect&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Types of Distributions
&lt;/h2&gt;

&lt;p&gt;Distributions are broadly categorized by the type of data they model. &lt;a href="https://www.sciencedirect.com/topics/computer-science/statistical-distribution" rel="noopener noreferrer"&gt;sciencedirect&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Discrete vs Continuous
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Discrete distributions&lt;/strong&gt;: Model countable outcomes (e.g., number of purchases, clicks, defects). Examples: Binomial, Poisson, Bernoulli. &lt;a href="https://www.sciencedirect.com/topics/computer-science/statistical-distribution" rel="noopener noreferrer"&gt;sciencedirect&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Continuous distributions&lt;/strong&gt;: Model measurable quantities (e.g., height, temperature, time). Examples: Normal, Uniform, Exponential, Log-Normal. &lt;a href="https://www.sciencedirect.com/topics/computer-science/statistical-distribution" rel="noopener noreferrer"&gt;sciencedirect&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Distributions in Data Science
&lt;/h3&gt;

&lt;p&gt;Here are some of the most important distributions and their typical use cases:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Distribution&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Key Parameters&lt;/th&gt;
&lt;th&gt;Typical Use Cases&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Normal (Gaussian)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Continuous&lt;/td&gt;
&lt;td&gt;Mean (μ), Standard Deviation (σ)&lt;/td&gt;
&lt;td&gt;Residuals in regression, many natural phenomena, Z-tests, confidence intervals  &lt;a href="https://www.sciencedirect.com/topics/computer-science/statistical-distribution" rel="noopener noreferrer"&gt;sciencedirect&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Uniform&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Continuous or Discrete&lt;/td&gt;
&lt;td&gt;Min, Max&lt;/td&gt;
&lt;td&gt;Random sampling, baseline models, Monte Carlo simulations  &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Binomial&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Discrete&lt;/td&gt;
&lt;td&gt;Trials (n), Success probability (p)&lt;/td&gt;
&lt;td&gt;Binary outcomes (e.g., click/no-click, defect/no defect)  &lt;a href="https://www3.cs.stonybrook.edu/~skiena/data-manual/lectures/pdf/L9.pdf" rel="noopener noreferrer"&gt;www3.cs.stonybrook&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Poisson&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Discrete&lt;/td&gt;
&lt;td&gt;Rate (λ)&lt;/td&gt;
&lt;td&gt;Count of events in fixed time (e.g., calls per hour, arrivals)  &lt;a href="https://www3.cs.stonybrook.edu/~skiena/data-manual/lectures/pdf/L9.pdf" rel="noopener noreferrer"&gt;www3.cs.stonybrook&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Exponential&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Continuous&lt;/td&gt;
&lt;td&gt;Rate (λ)&lt;/td&gt;
&lt;td&gt;Time between events (e.g., time between customer arrivals)  &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Log-Normal&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Continuous&lt;/td&gt;
&lt;td&gt;Mean, Std Dev (in log scale)&lt;/td&gt;
&lt;td&gt;Right-skewed data (e.g., income, time-to-failure)  &lt;a href="https://arounddatascience.com/blog/mathematics-and-statistics/the-complete-guide-to-statistical-distributions-for-data-science/" rel="noopener noreferrer"&gt;arounddatascience&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Student’s t&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Continuous&lt;/td&gt;
&lt;td&gt;Degrees of freedom&lt;/td&gt;
&lt;td&gt;Small-sample inference, hypothesis testing when variance is unknown  &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Why Distributions Matter in Data Science
&lt;/h2&gt;

&lt;p&gt;Understanding the underlying distribution of your data is critical because it affects nearly every stage of analysis and modeling. &lt;a href="https://github.com/stephenomengo/Understanding-Data-Distributions-and-Their-Impact-on-Data-Science" rel="noopener noreferrer"&gt;github&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Guides Exploratory Data Analysis (EDA)
&lt;/h3&gt;

&lt;p&gt;Distributions help you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spot patterns that simple summary statistics (mean, median) might hide. &lt;a href="https://dev.to/tom_chege/understanding-data-distributions-and-their-importance-in-data-science-j1a"&gt;dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Detect outliers, data entry errors, and unexpected observations. &lt;a href="https://github.com/stephenomengo/Understanding-Data-Distributions-and-Their-Impact-on-Data-Science" rel="noopener noreferrer"&gt;github&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Choose the right summary measures (mean vs median, standard deviation vs IQR). &lt;a href="https://www.linkedin.com/posts/sivaganesh-m-38806a2b1_datascience-statistics-machinelearning-activity-7445868026593460224-6HSf" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Determines Statistical Assumptions
&lt;/h3&gt;

&lt;p&gt;Many statistical tests and models assume specific distributions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Normal distribution&lt;/strong&gt;: Assumed by linear regression residuals, t-tests, ANOVA, and many parametric methods. &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Poisson distribution&lt;/strong&gt;: Used for count-based models and event-rate analysis. &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Binomial distribution&lt;/strong&gt;: Underpins binary classification and A/B testing. &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If these assumptions are violated, results can be misleading or invalid. &lt;a href="https://arounddatascience.com/blog/mathematics-and-statistics/the-complete-guide-to-statistical-distributions-for-data-science/" rel="noopener noreferrer"&gt;arounddatascience&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Influences Model Performance
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Choosing the wrong distribution can lead to biased estimators, poor model fit, and inaccurate predictions. &lt;a href="https://arounddatascience.com/blog/mathematics-and-statistics/the-complete-guide-to-statistical-distributions-for-data-science/" rel="noopener noreferrer"&gt;arounddatascience&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Correct distribution choice improves model accuracy, interpretability, and robustness. &lt;a href="https://arounddatascience.com/blog/mathematics-and-statistics/the-complete-guide-to-statistical-distributions-for-data-science/" rel="noopener noreferrer"&gt;arounddatascience&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, applying linear regression to heavily right-skewed data without transformation often produces biased estimates and unreliable confidence intervals. &lt;a href="https://arounddatascience.com/blog/mathematics-and-statistics/the-complete-guide-to-statistical-distributions-for-data-science/" rel="noopener noreferrer"&gt;arounddatascience&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Shapes Feature Engineering and Preprocessing
&lt;/h3&gt;

&lt;p&gt;Understanding distribution helps you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decide whether to apply &lt;strong&gt;log, square root, or Box-Cox transformations&lt;/strong&gt; to normalize skewed data. &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Choose between &lt;strong&gt;standardization&lt;/strong&gt; (mean=0, std=1) and &lt;strong&gt;normalization&lt;/strong&gt; (min–max scaling). &lt;a href="https://www.linkedin.com/posts/sivaganesh-m-38806a2b1_datascience-statistics-machinelearning-activity-7445868026593460224-6HSf" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Handle outliers appropriately (cap, remove, or model with heavy-tailed distributions). &lt;a href="https://www.linkedin.com/posts/sivaganesh-m-38806a2b1_datascience-statistics-machinelearning-activity-7445868026593460224-6HSf" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Analyze Distributions in Practice
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Visualize the Data
&lt;/h3&gt;

&lt;p&gt;Start with simple plots to understand the shape of your data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Histograms&lt;/strong&gt;: Show the frequency of values across bins. &lt;a href="https://www.youtube.com/watch?v=pLQ9RPj6TYE" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Box plots&lt;/strong&gt;: Highlight median, quartiles, and outliers. &lt;a href="https://www.youtube.com/watch?v=pLQ9RPj6TYE" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Q-Q plots&lt;/strong&gt;: Compare your data to a theoretical distribution (e.g., Normal). &lt;a href="https://www.youtube.com/watch?v=pLQ9RPj6TYE" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Compute Descriptive Statistics
&lt;/h3&gt;

&lt;p&gt;Key metrics that describe distribution shape:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Central tendency&lt;/strong&gt;: Mean, median, mode. &lt;a href="https://www.linkedin.com/posts/sivaganesh-m-38806a2b1_datascience-statistics-machinelearning-activity-7445868026593460224-6HSf" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dispersion&lt;/strong&gt;: Variance, standard deviation, interquartile range (IQR). &lt;a href="https://www.linkedin.com/posts/sivaganesh-m-38806a2b1_datascience-statistics-machinelearning-activity-7445868026593460224-6HSf" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shape&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Skewness&lt;/strong&gt;: Measures asymmetry (positive = right tail, negative = left tail). &lt;a href="https://www.linkedin.com/posts/sivaganesh-m-38806a2b1_datascience-statistics-machinelearning-activity-7445868026593460224-6HSf" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kurtosis&lt;/strong&gt;: Measures tail heaviness (high = more outliers, low = flatter distribution). &lt;a href="https://www.linkedin.com/posts/sivaganesh-m-38806a2b1_datascience-statistics-machinelearning-activity-7445868026593460224-6HSf" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Test for Distribution Fit
&lt;/h3&gt;

&lt;p&gt;Use statistical tests to check if your data matches a theoretical distribution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Shapiro-Wilk&lt;/strong&gt;: Tests for normality. &lt;a href="https://www.youtube.com/watch?v=pLQ9RPj6TYE" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kolmogorov-Smirnov&lt;/strong&gt;: Compares data to a reference distribution. &lt;a href="https://www.youtube.com/watch?v=pLQ9RPj6TYE" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anderson-Darling&lt;/strong&gt;: Another normality test, sensitive to tails. &lt;a href="https://www.youtube.com/watch?v=pLQ9RPj6TYE" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tests help you decide whether parametric methods (e.g., t-tests) are appropriate or if non-parametric alternatives are needed. &lt;a href="https://www.youtube.com/watch?v=pLQ9RPj6TYE" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Implications for Data Science Workflows
&lt;/h2&gt;

&lt;h3&gt;
  
  
  A/B Testing
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Conversion rates typically follow a &lt;strong&gt;Binomial distribution&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;Sample size calculations and p-values depend on correct distribution assumptions. &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Regression Models
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Linear regression assumes &lt;strong&gt;normally distributed residuals&lt;/strong&gt; with mean zero.
&lt;/li&gt;
&lt;li&gt;Violations lead to biased coefficients and unreliable confidence intervals. &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Anomaly Detection
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Heavy-tailed or skewed distributions suggest more frequent outliers.
&lt;/li&gt;
&lt;li&gt;Understanding kurtosis helps you choose robust detection methods (e.g., IQR, isolation forests). &lt;a href="https://www.linkedin.com/posts/sivaganesh-m-38806a2b1_datascience-statistics-machinelearning-activity-7445868026593460224-6HSf" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Time-to-Event Modeling
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exponential&lt;/strong&gt; and &lt;strong&gt;Poisson&lt;/strong&gt; distributions model event rates and inter-arrival times.
&lt;/li&gt;
&lt;li&gt;Useful in churn prediction, customer arrivals, or failure analysis. &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Monte Carlo Simulations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Simulations often start by generating random variables from a &lt;strong&gt;Uniform&lt;/strong&gt; or &lt;strong&gt;Normal&lt;/strong&gt; distribution.
&lt;/li&gt;
&lt;li&gt;Accurate simulations depend on realistic distribution choices. &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common Mistakes and How to Avoid Them
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Assuming normality blindly&lt;/strong&gt;: Always check distribution shape with plots and tests before applying parametric methods. &lt;a href="https://www3.cs.stonybrook.edu/~skiena/data-manual/lectures/pdf/L9.pdf" rel="noopener noreferrer"&gt;www3.cs.stonybrook&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ignoring skewness and outliers&lt;/strong&gt;: Skewed data can bias mean and standard deviation; use median and IQR for robust summaries. &lt;a href="https://www.linkedin.com/posts/sivaganesh-m-38806a2b1_datascience-statistics-machinelearning-activity-7445868026593460224-6HSf" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Using the wrong distribution for counts or rates&lt;/strong&gt;: Apply Poisson or Binomial models instead of continuous ones for discrete events. &lt;a href="https://towardsdatascience.com/seven-must-know-statistical-distributions-and-their-simulations-for-data-science-681c5ac41e32/" rel="noopener noreferrer"&gt;towardsdatascience&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overlooking heavy tails&lt;/strong&gt;: High kurtosis means more extreme values—use robust models or transformations. &lt;a href="https://www.linkedin.com/posts/sivaganesh-m-38806a2b1_datascience-statistics-machinelearning-activity-7445868026593460224-6HSf" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Bottom Line
&lt;/h2&gt;

&lt;p&gt;Statistical distributions are not just theoretical—they’re the foundation of every model, test, and insight in data science.  They guide how you explore data, which methods you use, how you preprocess features, and how you interpret results. &lt;a href="https://arounddatascience.com/blog/mathematics-and-statistics/the-complete-guide-to-statistical-distributions-for-data-science/" rel="noopener noreferrer"&gt;arounddatascience&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before building any model or running any test, always ask: &lt;strong&gt;“What is my data really telling me about its distribution?”&lt;/strong&gt; &lt;a href="https://www.linkedin.com/posts/sivaganesh-m-38806a2b1_datascience-statistics-machinelearning-activity-7445868026593460224-6HSf" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>analytics</category>
      <category>machinelearning</category>
      <category>python</category>
    </item>
    <item>
      <title>Python for Data Analytics: A Beginner’s Complete Guide</title>
      <dc:creator>Jonathan kip</dc:creator>
      <pubDate>Fri, 07 Aug 2026 11:28:07 +0000</pubDate>
      <link>https://dev.to/jonathan_kip/python-for-data-analytics-a-beginners-complete-guide-jod</link>
      <guid>https://dev.to/jonathan_kip/python-for-data-analytics-a-beginners-complete-guide-jod</guid>
      <description>&lt;h2&gt;
  
  
  Python for Data Analytics: A Beginner’s Complete Guide
&lt;/h2&gt;

&lt;p&gt;Python has become the go-to language for data analytics because it’s easy to learn, has powerful libraries, and works well with data of all sizes.  This guide walks you through everything you need to know to get started—from setting up your environment to building your first data analysis project. &lt;a href="https://realpython.com/python-for-data-analysis/" rel="noopener noreferrer"&gt;realpython&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Python for Data Analytics?
&lt;/h2&gt;

&lt;p&gt;Python is popular for data analytics because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simple syntax&lt;/strong&gt;: It’s beginner-friendly and reads like plain English. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rich ecosystem&lt;/strong&gt;: Libraries like pandas, NumPy, and Matplotlib handle everything from data cleaning to visualization. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community and resources&lt;/strong&gt;: Millions of tutorials, courses, and free projects make it easy to learn and troubleshoot. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration&lt;/strong&gt;: Works well with databases, Excel, APIs, and big data tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Set Up Your Python Environment
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Option A: Anaconda (Recommended for Beginners)
&lt;/h3&gt;

&lt;p&gt;Anaconda bundles Python, Jupyter, and data science libraries in one installer. &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Download Anaconda&lt;/strong&gt; from &lt;a href="https://anaconda.com/download" rel="noopener noreferrer"&gt;anaconda.com/download&lt;/a&gt;. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run the installer&lt;/strong&gt; and follow the default steps. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open Anaconda Navigator&lt;/strong&gt; and launch &lt;strong&gt;Jupyter Notebook&lt;/strong&gt;. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Option B: Python + VS Code + Jupyter
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install Python&lt;/strong&gt; from &lt;a href="https://www.python.org/downloads" rel="noopener noreferrer"&gt;python.org/downloads&lt;/a&gt;. &lt;a href="https://www.youtube.com/watch?v=r-uOLxNrNk8" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Install VS Code&lt;/strong&gt; from &lt;a href="https://code.visualstudio.com" rel="noopener noreferrer"&gt;code.visualstudio.com&lt;/a&gt;. &lt;a href="https://www.youtube.com/watch?v=r-uOLxNrNk8" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add the Python and Jupyter extensions&lt;/strong&gt; in VS Code. &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create a virtual environment&lt;/strong&gt; to keep your packages organized. &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Install Essential Libraries
&lt;/h3&gt;

&lt;p&gt;If you’re not using Anaconda, install key packages with pip: &lt;a href="https://realpython.com/python-for-data-analysis/" rel="noopener noreferrer"&gt;realpython&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;pandas numpy matplotlib seaborn jupyter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Learn Python Basics
&lt;/h2&gt;

&lt;p&gt;Before diving into data analysis, get comfortable with Python fundamentals. &lt;a href="https://www.w3resource.com/python/python-for-data-analysis-the-complete-guide.php" rel="noopener noreferrer"&gt;w3resource&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Variables and data types&lt;/strong&gt;: Numbers, strings, booleans. &lt;a href="https://www.w3resource.com/python/python-for-data-analysis-the-complete-guide.php" rel="noopener noreferrer"&gt;w3resource&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data structures&lt;/strong&gt;: Lists, dictionaries, tuples, sets. &lt;a href="https://www.w3resource.com/python/python-for-data-analysis-the-complete-guide.php" rel="noopener noreferrer"&gt;w3resource&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control flow&lt;/strong&gt;: &lt;code&gt;if&lt;/code&gt; statements, &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt; loops. &lt;a href="https://www.youtube.com/watch?v=SSeFPWNl-Hw" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Functions&lt;/strong&gt;: Reusable blocks of code with &lt;code&gt;def&lt;/code&gt;. &lt;a href="https://www.w3resource.com/python/python-for-data-analysis-the-complete-guide.php" rel="noopener noreferrer"&gt;w3resource&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;List comprehensions&lt;/strong&gt;: Compact way to create lists. &lt;a href="https://www.youtube.com/watch?v=SSeFPWNl-Hw" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Practice by writing small scripts—like a grade calculator or a text analyzer. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Core Libraries for Data Analytics
&lt;/h2&gt;

&lt;h3&gt;
  
  
  NumPy: Numerical Computing
&lt;/h3&gt;

&lt;p&gt;NumPy is the foundation for numerical operations in Python. &lt;a href="https://realpython.com/python-for-data-analysis/" rel="noopener noreferrer"&gt;realpython&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates and manipulates arrays (vectors and matrices).
&lt;/li&gt;
&lt;li&gt;Performs fast mathematical operations.
&lt;/li&gt;
&lt;li&gt;Used by pandas and other libraries under the hood.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;

&lt;span class="n"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;  &lt;span class="c1"&gt;# 2.5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  pandas: Data Manipulation
&lt;/h3&gt;

&lt;p&gt;pandas is the most important library for data analysis. &lt;a href="https://realpython.com/python-for-data-analysis/" rel="noopener noreferrer"&gt;realpython&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loads data from CSV, Excel, SQL, and more.
&lt;/li&gt;
&lt;li&gt;Cleans, filters, and transforms data using DataFrames.
&lt;/li&gt;
&lt;li&gt;Summarizes and aggregates data with groupby operations.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;

&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;sales.csv&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;head&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;          &lt;span class="c1"&gt;# First 5 rows
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;      &lt;span class="c1"&gt;# Summary statistics
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isnull&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;  &lt;span class="c1"&gt;# Missing values per column
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key pandas skills:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data loading&lt;/strong&gt;: &lt;code&gt;read_csv()&lt;/code&gt;, &lt;code&gt;read_excel()&lt;/code&gt;, &lt;code&gt;read_sql()&lt;/code&gt;. &lt;a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC7983091/" rel="noopener noreferrer"&gt;pmc.ncbi.nlm.nih&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inspection&lt;/strong&gt;: &lt;code&gt;head()&lt;/code&gt;, &lt;code&gt;info()&lt;/code&gt;, &lt;code&gt;describe()&lt;/code&gt;. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cleaning&lt;/strong&gt;: &lt;code&gt;dropna()&lt;/code&gt;, &lt;code&gt;fillna()&lt;/code&gt;, &lt;code&gt;drop_duplicates()&lt;/code&gt;. &lt;a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC7983091/" rel="noopener noreferrer"&gt;pmc.ncbi.nlm.nih&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filtering&lt;/strong&gt;: Boolean masks, &lt;code&gt;loc&lt;/code&gt;, &lt;code&gt;iloc&lt;/code&gt;. &lt;a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC7983091/" rel="noopener noreferrer"&gt;pmc.ncbi.nlm.nih&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aggregation&lt;/strong&gt;: &lt;code&gt;groupby()&lt;/code&gt;, &lt;code&gt;pivot_table()&lt;/code&gt;. &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Matplotlib &amp;amp; Seaborn: Data Visualization
&lt;/h3&gt;

&lt;p&gt;Matplotlib and Seaborn help you create charts and graphs. &lt;a href="https://realpython.com/python-for-data-analysis/" rel="noopener noreferrer"&gt;realpython&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Matplotlib&lt;/strong&gt;: Basic plotting (line, bar, scatter, histograms).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seaborn&lt;/strong&gt;: Beautiful statistical plots with less code.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;matplotlib.pyplot&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;seaborn&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;sns&lt;/span&gt;

&lt;span class="n"&gt;sns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;histplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;salary&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;bins&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Common chart types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Histograms&lt;/strong&gt;: Distribution of a single variable.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bar charts&lt;/strong&gt;: Compare categories.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scatter plots&lt;/strong&gt;: Relationship between two variables.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Box plots&lt;/strong&gt;: Show median, quartiles, and outliers. &lt;a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC7983091/" rel="noopener noreferrer"&gt;pmc.ncbi.nlm.nih&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 4: The Data Analysis Workflow
&lt;/h2&gt;

&lt;p&gt;A typical data analysis project in Python follows these steps: &lt;a href="https://realpython.com/python-for-data-analysis/" rel="noopener noreferrer"&gt;realpython&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Define Your Objective
&lt;/h3&gt;

&lt;p&gt;Ask a clear question: “What are the top-selling products?” or “Which factors affect customer churn?” &lt;a href="https://realpython.com/python-for-data-analysis/" rel="noopener noreferrer"&gt;realpython&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Load and Inspect the Data
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;data.csv&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;head&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check for missing values, data types, and overall structure. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Clean the Data
&lt;/h3&gt;

&lt;p&gt;Data cleaning often takes the most time. &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Handle missing values&lt;/strong&gt;: Remove or fill with mean/median.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove duplicates&lt;/strong&gt;: &lt;code&gt;df.drop_duplicates()&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix data types&lt;/strong&gt;: Convert strings to dates, numbers to categories.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat outliers&lt;/strong&gt;: Filter or cap extreme values. &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Explore and Analyze (EDA)
&lt;/h3&gt;

&lt;p&gt;Use summary statistics and visualizations to understand patterns. &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Univariate analysis&lt;/strong&gt;: Distribution of one variable.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bivariate analysis&lt;/strong&gt;: Relationships between two variables.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correlation analysis&lt;/strong&gt;: Which variables move together?
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GroupBy operations&lt;/strong&gt;: Compare metrics by category. &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Visualize Insights
&lt;/h3&gt;

&lt;p&gt;Create charts that tell a clear story. &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use Seaborn for clean, publication-ready plots.
&lt;/li&gt;
&lt;li&gt;Label axes, add titles, and keep charts simple.
&lt;/li&gt;
&lt;li&gt;Highlight key findings (e.g., top categories, trends over time).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Draw Conclusions and Communicate
&lt;/h3&gt;

&lt;p&gt;Summarize your findings in a Jupyter notebook or report. &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What did you discover?
&lt;/li&gt;
&lt;li&gt;What business decisions could be made?
&lt;/li&gt;
&lt;li&gt;What are the limitations or next steps?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 5: Build a Beginner Project
&lt;/h2&gt;

&lt;p&gt;Here’s a simple end-to-end project to add to your portfolio: &lt;a href="https://www.youtube.com/watch?v=SSeFPWNl-Hw" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Find a dataset&lt;/strong&gt; on Kaggle (e.g., sales, salaries, or customer reviews). &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load and explore&lt;/strong&gt; the data with &lt;code&gt;head()&lt;/code&gt;, &lt;code&gt;describe()&lt;/code&gt;, and &lt;code&gt;isnull()&lt;/code&gt;. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean the data&lt;/strong&gt;: Remove or fill missing values, fix data types, drop duplicates. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analyze&lt;/strong&gt;: Calculate averages, medians, and distributions. Identify outliers. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visualize&lt;/strong&gt;: Create at least 3 charts that tell a clear story. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conclude&lt;/strong&gt;: Write a short summary of your findings and potential business actions. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 6: Learning Roadmap (2026)
&lt;/h2&gt;

&lt;p&gt;If you’re planning your learning path, here’s a suggested timeline: &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Month 1–2&lt;/strong&gt;: Python basics + NumPy + pandas fundamentals
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Month 3&lt;/strong&gt;: Data cleaning, EDA, and visualization (Matplotlib/Seaborn/Plotly)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Month 4&lt;/strong&gt;: Advanced pandas (merge, pivot, groupby) + performance tools like Polars/DuckDB
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Month 5&lt;/strong&gt;: Statistics, hypothesis testing, and basic Scikit-learn
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Month 6+&lt;/strong&gt;: Build end-to-end projects, integrate SQL, and create a portfolio &lt;a href="https://www.ibm.com/think/topics/machine-learning-use-cases" rel="noopener noreferrer"&gt;ibm&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With 1–2 hours of daily practice, you can reach a functional level in 3–4 months and be job-ready in 6–12 months. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Follow free courses on YouTube (e.g., freeCodeCamp, Simplilearn, Luke Barousse). &lt;a href="https://www.w3resource.com/python/python-for-data-analysis-the-complete-guide.php" rel="noopener noreferrer"&gt;w3resource&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Practice on real datasets from Kaggle or Google Dataset Search. &lt;a href="https://www.tableau.com/learn/articles/machine-learning-examples" rel="noopener noreferrer"&gt;tableau&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Share your projects on GitHub and LinkedIn to build a portfolio. &lt;a href="https://www.youtube.com/watch?v=SSeFPWNl-Hw" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>datascience</category>
      <category>beginners</category>
      <category>python</category>
      <category>ai</category>
    </item>
    <item>
      <title>SQL Subqueries vs CTEs: Types, Differences, Performance, and When to Use Each</title>
      <dc:creator>Jonathan kip</dc:creator>
      <pubDate>Fri, 07 Aug 2026 11:18:21 +0000</pubDate>
      <link>https://dev.to/jonathan_kip/sql-subqueries-vs-ctes-types-differences-performance-and-when-to-use-each-ock</link>
      <guid>https://dev.to/jonathan_kip/sql-subqueries-vs-ctes-types-differences-performance-and-when-to-use-each-ock</guid>
      <description>&lt;h2&gt;
  
  
  SQL Subqueries vs CTEs: Types, Differences, Performance, and When to Use Each
&lt;/h2&gt;

&lt;p&gt;Subqueries and Common Table Expressions (CTEs) are two of the most common ways to break complex SQL logic into smaller, reusable pieces.  While they often produce the same results, they differ in readability, reusability, and—in some cases—performance. &lt;a href="https://learnsql.com/blog/cte-vs-subquery/" rel="noopener noreferrer"&gt;learnsql&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Subqueries?
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;subquery&lt;/strong&gt; is a query nested inside another query.  It can appear in the &lt;code&gt;SELECT&lt;/code&gt;, &lt;code&gt;FROM&lt;/code&gt;, &lt;code&gt;WHERE&lt;/code&gt;, or &lt;code&gt;HAVING&lt;/code&gt; clauses. &lt;a href="https://learnsql.com/blog/cte-vs-subquery/" rel="noopener noreferrer"&gt;learnsql&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Types of Subqueries
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Non-correlated subqueries&lt;/strong&gt;: Run independently once, then return results to the outer query. &lt;a href="https://dev.to/k1gen_/subqueries-vs-ctes-in-sql-a-complete-guide-for-beginners-49mf"&gt;dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correlated subqueries&lt;/strong&gt;: Reference columns from the outer query and run once per row—often slower on large datasets. &lt;a href="https://dev.to/k1gen_/subqueries-vs-ctes-in-sql-a-complete-guide-for-beginners-49mf"&gt;dev&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Non-correlated: find employees earning more than average salary&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;-- Correlated: find employees earning more than their department average&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;department&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;department&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;department&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What Are CTEs?
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;Common Table Expression (CTE)&lt;/strong&gt; is a named temporary result set defined using the &lt;code&gt;WITH&lt;/code&gt; clause.  It exists only for the duration of the query and can be referenced multiple times. &lt;a href="https://learnsql.com/blog/cte-vs-subquery/" rel="noopener noreferrer"&gt;learnsql&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="n"&gt;avg_salary&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;avg_sal&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;avg_salary&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;avg_sal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Key Differences Between Subqueries and CTEs
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Subqueries&lt;/th&gt;
&lt;th&gt;CTEs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Definition location&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Inline, inside the main query&lt;/td&gt;
&lt;td&gt;Defined at the top with &lt;code&gt;WITH&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Naming&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Not required (except in PostgreSQL)&lt;/td&gt;
&lt;td&gt;Must be named&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Reusability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Can be used only once per occurrence&lt;/td&gt;
&lt;td&gt;Can be referenced multiple times in the same query&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Readability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Can become hard to read when deeply nested&lt;/td&gt;
&lt;td&gt;Breaks logic into named, readable steps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Use in &lt;code&gt;WHERE&lt;/code&gt; with &lt;code&gt;IN&lt;/code&gt;/&lt;code&gt;EXISTS&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No (CTEs must be joined or referenced differently)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Recursive queries&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Not supported&lt;/td&gt;
&lt;td&gt;Supported via recursive CTEs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Performance (modern DBs)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Often identical to CTEs&lt;/td&gt;
&lt;td&gt;Often identical to subqueries; older PostgreSQL materialized CTEs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Performance: Subqueries vs CTEs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Short Answer
&lt;/h3&gt;

&lt;p&gt;In modern databases (PostgreSQL 12+, MySQL 8+, SQL Server 2019+, Snowflake, BigQuery), &lt;strong&gt;there is typically no performance difference&lt;/strong&gt; between equivalent subqueries and CTEs.  The query optimizer treats them similarly and often generates identical execution plans. &lt;a href="https://dev.to/k1gen_/subqueries-vs-ctes-in-sql-a-complete-guide-for-beginners-49mf"&gt;dev&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  When Performance Can Differ
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Older PostgreSQL versions (&amp;lt;12)&lt;/strong&gt;: CTEs were always materialized (computed once and stored), which could make them slower than inlined subqueries. &lt;a href="https://dev.to/k1gen_/subqueries-vs-ctes-in-sql-a-complete-guide-for-beginners-49mf"&gt;dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repeated logic&lt;/strong&gt;: If the same subquery appears multiple times, the database may recompute it each time, whereas a CTE is computed once and reused. &lt;a href="https://dev.to/wambuijoan/ctes-subqueries-and-query-optimisation-in-sql-3fin"&gt;dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correlated subqueries&lt;/strong&gt;: These can be slow on large tables because they run once per row, but modern optimizers sometimes rewrite them as joins. &lt;a href="https://dev.to/k1gen_/subqueries-vs-ctes-in-sql-a-complete-guide-for-beginners-49mf"&gt;dev&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What Actually Affects Performance
&lt;/h3&gt;

&lt;p&gt;Performance depends more on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Indexing and join conditions
&lt;/li&gt;
&lt;li&gt;Data size and distribution
&lt;/li&gt;
&lt;li&gt;Execution plan chosen by the optimizer
&lt;/li&gt;
&lt;li&gt;Partitioning and statistics
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;—not just whether you use a subquery or CTE. &lt;a href="https://www.linkedin.com/posts/sreerag-cr_dataengineering-sql-cte-activity-7429365220063592449-Z-ry" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Use Subqueries
&lt;/h2&gt;

&lt;p&gt;Use a &lt;strong&gt;subquery&lt;/strong&gt; when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need a single value or quick filter (e.g., &lt;code&gt;WHERE salary &amp;gt; (SELECT AVG(salary) ...)&lt;/code&gt;). &lt;a href="https://learnsql.com/blog/cte-vs-subquery/" rel="noopener noreferrer"&gt;learnsql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The logic is short, simple, and used only once. &lt;a href="https://datawithsarah.com/post/sql-subqueries-vs-ctes-explained/" rel="noopener noreferrer"&gt;datawithsarah&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You’re using &lt;code&gt;IN&lt;/code&gt; or &lt;code&gt;EXISTS&lt;/code&gt; in a &lt;code&gt;WHERE&lt;/code&gt; clause. &lt;a href="https://learnsql.com/blog/cte-vs-subquery/" rel="noopener noreferrer"&gt;learnsql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You’re writing a quick ad-hoc query where readability isn’t critical. &lt;a href="https://dev.to/ericmwaimiri/a-practical-guide-to-subqueries-and-ctes-in-sql-3574"&gt;dev&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When to Use CTEs
&lt;/h2&gt;

&lt;p&gt;Use a &lt;strong&gt;CTE&lt;/strong&gt; when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your query is long or has multiple logical steps. &lt;a href="https://learnsql.com/blog/cte-vs-subquery/" rel="noopener noreferrer"&gt;learnsql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You need to reference the same intermediate result multiple times. &lt;a href="https://learnsql.com/blog/cte-vs-subquery/" rel="noopener noreferrer"&gt;learnsql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You want to improve readability by naming each step. &lt;a href="https://datawithsarah.com/post/sql-subqueries-vs-ctes-explained/" rel="noopener noreferrer"&gt;datawithsarah&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You’re writing recursive queries (e.g., hierarchical data like org charts). &lt;a href="https://learnsql.com/blog/cte-vs-subquery/" rel="noopener noreferrer"&gt;learnsql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You’re building production-level queries or ETL pipelines where maintainability matters. &lt;a href="https://datawithsarah.com/post/sql-subqueries-vs-ctes-explained/" rel="noopener noreferrer"&gt;datawithsarah&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Example: Subquery vs CTE
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Subquery version:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;department&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;department&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;departments&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;location&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'New York'&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CTE version (more readable):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="n"&gt;avg_salary&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;avg_sal&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;
&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="n"&gt;ny_departments&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;department&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;departments&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;location&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'New York'&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;ny_departments&lt;/span&gt; &lt;span class="n"&gt;nd&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;department&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;department&lt;/span&gt;
&lt;span class="k"&gt;CROSS&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;avg_salary&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;avg_sal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Bottom Line
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Subqueries&lt;/strong&gt; are great for simple, one-off logic and inline filters. &lt;a href="https://datawithsarah.com/post/sql-subqueries-vs-ctes-explained/" rel="noopener noreferrer"&gt;datawithsarah&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CTEs&lt;/strong&gt; shine when queries get complex, need multiple steps, or require reuse. &lt;a href="https://learnsql.com/blog/cte-vs-subquery/" rel="noopener noreferrer"&gt;learnsql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt; is usually similar in modern databases—focus on readability and maintainability. &lt;a href="https://dev.to/k1gen_/subqueries-vs-ctes-in-sql-a-complete-guide-for-beginners-49mf"&gt;dev&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Choose the tool that makes your SQL clearer and easier to maintain, and always check the execution plan if performance is a concern. &lt;/p&gt;

</description>
      <category>sql</category>
      <category>datascience</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Publish a Power BI Report and Embed it into a Website</title>
      <dc:creator>Jonathan kip</dc:creator>
      <pubDate>Fri, 07 Aug 2026 11:10:32 +0000</pubDate>
      <link>https://dev.to/jonathan_kip/how-to-publish-a-power-bi-report-and-embed-it-into-a-website-51o1</link>
      <guid>https://dev.to/jonathan_kip/how-to-publish-a-power-bi-report-and-embed-it-into-a-website-51o1</guid>
      <description>&lt;h2&gt;
  
  
  How to Publish a Power BI Report and Embed It into a Website
&lt;/h2&gt;

&lt;p&gt;Publishing a Power BI report and embedding it on a website is a straightforward process that lets you share interactive dashboards with anyone online.  Below is a step-by-step guide covering both public and secure embedding options. &lt;a href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-embed-secure" rel="noopener noreferrer"&gt;learn.microsoft&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Prepare and Publish Your Report to Power BI Service
&lt;/h2&gt;

&lt;p&gt;Before you can embed a report, it must be published to the Power BI cloud service.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open your report in Power BI Desktop&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Make sure your &lt;code&gt;.pbix&lt;/code&gt; file is complete and saved. &lt;a href="https://dev.to/blinton_kiarie_906fad362c/how-to-publish-and-embed-a-power-bi-report-into-a-website-412"&gt;dev&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Click Publish&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In the Home tab, click the &lt;strong&gt;Publish&lt;/strong&gt; button. &lt;a href="https://dev.to/blinton_kiarie_906fad362c/how-to-publish-and-embed-a-power-bi-report-into-a-website-412"&gt;dev&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sign in and select a workspace&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
If prompted, sign in to your Power BI account, then choose the workspace where you want to publish the report. &lt;a href="https://dev.to/blinton_kiarie_906fad362c/how-to-publish-and-embed-a-power-bi-report-into-a-website-412"&gt;dev&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Confirm the upload&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Once published, you’ll see a success message with a link to open the report in the Power BI service. &lt;a href="https://dev.to/blinton_kiarie_906fad362c/how-to-publish-and-embed-a-power-bi-report-into-a-website-412"&gt;dev&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 2: Generate the Embed Code
&lt;/h2&gt;

&lt;p&gt;You have two main options depending on whether you want the report to be publicly accessible or restricted to authenticated users.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option A: Publish to Web (Public)
&lt;/h3&gt;

&lt;p&gt;Use this if you’re okay with anyone on the internet viewing your report—ideal for portfolios, blogs, or public dashboards. &lt;a href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-publish-to-web" rel="noopener noreferrer"&gt;learn.microsoft&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open your report in Power BI Service&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Go to &lt;a href="https://app.powerbi.com" rel="noopener noreferrer"&gt;app.powerbi.com&lt;/a&gt;, navigate to your workspace, and open the report. &lt;a href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-embed-secure" rel="noopener noreferrer"&gt;learn.microsoft&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Click File &amp;gt; Embed report &amp;gt; Publish to web (public)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This opens the embed dialog. &lt;a href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-publish-to-web" rel="noopener noreferrer"&gt;learn.microsoft&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review the warning&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Power BI will warn you that the report will be public. Confirm only if your data is safe to share. &lt;a href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-publish-to-web" rel="noopener noreferrer"&gt;learn.microsoft&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create embed code&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Click &lt;strong&gt;Create embed code&lt;/strong&gt;, then copy the &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; HTML snippet provided. &lt;a href="https://dev.to/blinton_kiarie_906fad362c/how-to-publish-and-embed-a-power-bi-report-into-a-website-412"&gt;dev&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Option B: Secure Embed (Website or Portal)
&lt;/h3&gt;

&lt;p&gt;Use this for internal dashboards where viewers must log in to Power BI. &lt;a href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-embed-secure" rel="noopener noreferrer"&gt;learn.microsoft&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open your report in Power BI Service&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Navigate to your workspace and open the report. &lt;a href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-embed-secure" rel="noopener noreferrer"&gt;learn.microsoft&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Click File &amp;gt; Embed report &amp;gt; Website or portal&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This opens the secure embed dialog. &lt;a href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-embed-secure" rel="noopener noreferrer"&gt;learn.microsoft&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Copy the link or iframe code&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
You can either copy the embed link or the &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; HTML snippet to paste into your site. &lt;a href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-embed-secure" rel="noopener noreferrer"&gt;learn.microsoft&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 3: Embed the Report on Your Website
&lt;/h2&gt;

&lt;p&gt;Now that you have the embed code, you can add it to your website.&lt;/p&gt;

&lt;h3&gt;
  
  
  For Custom HTML Sites
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open your HTML file&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Use a code editor like VS Code or your CMS editor. &lt;a href="https://dev.to/blinton_kiarie_906fad362c/how-to-publish-and-embed-a-power-bi-report-into-a-website-412"&gt;dev&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Paste the iframe code&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Insert the &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; snippet inside the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; section where you want the report to appear. &lt;a href="https://dev.to/blinton_kiarie_906fad362c/how-to-publish-and-embed-a-power-bi-report-into-a-website-412"&gt;dev&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Save and publish&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Upload the updated file to your web server or publish the changes in your CMS. &lt;a href="https://dev.to/blinton_kiarie_906fad362c/how-to-publish-and-embed-a-power-bi-report-into-a-website-412"&gt;dev&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  For WordPress or Other CMS Platforms
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open the page editor&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Go to the page where you want the report. &lt;a href="https://dev.to/billymuli/how-to-publish-a-power-bi-report-and-embed-it-into-a-website-3ng3"&gt;dev&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add a Custom HTML block&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In WordPress, insert a “Custom HTML” block. &lt;a href="https://dev.to/billymuli/how-to-publish-a-power-bi-report-and-embed-it-into-a-website-3ng3"&gt;dev&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Paste the iframe code&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Drop the code into the block and update or publish the page. &lt;a href="https://dev.to/billymuli/how-to-publish-a-power-bi-report-and-embed-it-into-a-website-3ng3"&gt;dev&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Important Considerations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data privacy&lt;/strong&gt;: Only use “Publish to web” if your report contains no sensitive or confidential data. &lt;a href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-publish-to-web" rel="noopener noreferrer"&gt;learn.microsoft&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Admin settings&lt;/strong&gt;: Your organization’s Power BI admin may need to enable “Publish to web” in the admin portal. &lt;a href="https://www.youtube.com/watch?v=Txm76K8mt6U" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsiveness&lt;/strong&gt;: You can adjust the &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; attributes in the iframe to fit your site’s layout. &lt;a href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-publish-to-web" rel="noopener noreferrer"&gt;learn.microsoft&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With these steps, your Power BI report will be live and interactive on your website, letting visitors explore your data in real time. &lt;a href="https://dev.to/blinton_kiarie_906fad362c/how-to-publish-and-embed-a-power-bi-report-into-a-website-412"&gt;dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>devto</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Machine Learning: The Invisible Helper</title>
      <dc:creator>Jonathan kip</dc:creator>
      <pubDate>Fri, 07 Aug 2026 10:55:37 +0000</pubDate>
      <link>https://dev.to/jonathan_kip/machine-learning-the-invisible-helper-in-your-daily-life-540l</link>
      <guid>https://dev.to/jonathan_kip/machine-learning-the-invisible-helper-in-your-daily-life-540l</guid>
      <description>&lt;h2&gt;
  
  
  Machine Learning: The Invisible Helper
&lt;/h2&gt;

&lt;p&gt;You probably use machine learning dozens of times a day without even realizing it.  From unlocking your phone with your face to getting uncannily accurate music recommendations, machine learning is the quiet intelligence powering the apps and devices you rely on every day. &lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Machine Learning
&lt;/h2&gt;

&lt;p&gt;Machine learning is a type of artificial intelligence that lets computers learn from experience instead of being programmed with rigid rules.  Instead of giving the computer step-by-step instructions, we feed it lots of examples—like photos, emails, or songs—and let it figure out the patterns on its own. &lt;a href="https://www.youtube.com/watch?v=vJLyQahV65c" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Machine Learning Works: A Simple Breakdown
&lt;/h2&gt;

&lt;p&gt;You can think of machine learning as a four-step process that happens behind the scenes of your favorite apps. &lt;a href="https://www.youtube.com/watch?v=vJLyQahV65c" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Collect and Prepare Data
&lt;/h3&gt;

&lt;p&gt;Everything starts with data—numbers, photos, text, or sensor readings.  For example, Netflix gathers data on what you watch, when you pause, and what you rate.  This data is cleaned and organized so the computer can learn from it. &lt;a href="https://www.youtube.com/watch?v=vJLyQahV65c" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Train the Model
&lt;/h3&gt;

&lt;p&gt;A “model” is the brain the computer builds from the data.  Programmers choose an algorithm (a learning method) and feed it the training data.  The algorithm sifts through the examples, looking for patterns—like which words often appear in spam emails or which movies people who like action films also enjoy. &lt;a href="https://www.youtube.com/watch?v=vJLyQahV65c" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Test and Improve
&lt;/h3&gt;

&lt;p&gt;Before using the model in real life, it’s tested on new data it hasn’t seen before.  If it makes mistakes, engineers tweak it—adjusting settings or feeding it more data—until it gets better.  This is why your recommendations get smarter the more you use an app. &lt;a href="https://medium.com/@piyushacademypune/machine-learning-explained-in-simple-words-a-beginner-friendly-guide-3d7d8c14815a" rel="noopener noreferrer"&gt;medium&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Make Predictions
&lt;/h3&gt;

&lt;p&gt;Once trained, the model is deployed to make predictions or decisions on new inputs.  When a new email arrives, the spam filter uses its learned patterns to guess if it’s junk.  When you open Spotify, the recommendation engine predicts which songs you’ll like next. &lt;a href="https://www.youtube.com/watch?v=vJLyQahV65c" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Everyday Things You Use That Rely on Machine Learning
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Your Smartphone
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Face unlock&lt;/strong&gt;: The phone learns your facial features from many photos to securely unlock when it sees you.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Photo organization&lt;/strong&gt;: Apps like Google Photos group pictures by person or pet by learning visual patterns.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Predictive text and autocorrect&lt;/strong&gt;: Your keyboard learns your typing style to suggest words and fix mistakes.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Voice assistants&lt;/strong&gt;: Siri and Google Assistant use ML to understand your spoken commands and respond. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Streaming and Entertainment
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Netflix and YouTube recommendations&lt;/strong&gt;: These platforms analyze your watch history and compare it to millions of other users to suggest content. &lt;a href="https://medium.com/@amitvsolutions/machine-learning-101-the-complete-beginners-guide-to-machine-learning-686a30cbcf6b" rel="noopener noreferrer"&gt;medium&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spotify and Apple Music playlists&lt;/strong&gt;: “Discover Weekly” and “For You” mixes are built using ML that learns your listening habits.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Social media feeds&lt;/strong&gt;: Facebook, Instagram, and TikTok use ML to decide which posts and ads appear in your feed. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Email and Messaging
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Spam filters&lt;/strong&gt;: Gmail learns from emails labeled as “spam” or “not spam” to spot suspicious messages. &lt;a href="https://medium.com/@amitvsolutions/machine-learning-101-the-complete-beginners-guide-to-machine-learning-686a30cbcf6b" rel="noopener noreferrer"&gt;medium&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart replies&lt;/strong&gt;: Gmail suggests quick responses like “Thanks!” or “Sounds good” based on the email’s content.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-transcription&lt;/strong&gt;: Apps like Slack and YouTube generate captions and transcriptions of spoken words. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Shopping and Online Services
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Product recommendations&lt;/strong&gt;: Amazon suggests items based on your browsing and purchase history.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delivery time estimates&lt;/strong&gt;: Apps predict when your food or package will arrive using traffic and order data.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chatbots&lt;/strong&gt;: Customer service bots on websites handle routine questions using ML-powered natural language processing. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Maps and Navigation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google Maps and Waze&lt;/strong&gt;: These apps predict traffic jams, estimate travel times, and suggest the fastest routes.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ride-hailing apps&lt;/strong&gt;: Uber and Lyft use ML to match drivers with riders and set dynamic pricing. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Banking and Payments
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fraud alerts&lt;/strong&gt;: Your bank flags unusual transactions by learning your normal spending patterns.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Credit card approvals&lt;/strong&gt;: ML models assess risk when you apply for loans or credit cards. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Health and Fitness
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Step and workout tracking&lt;/strong&gt;: Fitness apps learn your activity patterns to give personalized goals.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Health insights&lt;/strong&gt;: Wearables detect irregular heartbeats or sleep issues using ML on sensor data. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why It Matters to You
&lt;/h2&gt;

&lt;p&gt;Machine learning makes your devices smarter, your apps more personalized, and your daily tasks easier.  It’s the reason your phone recognizes your face, your music app knows your mood, and your bank stops fraud before it hits your account.  In short, machine learning is the invisible helper that quietly powers the technology you use every single day.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Understanding Data Modeling in Power BI: Joins, Relationships, and Schemas</title>
      <dc:creator>Jonathan kip</dc:creator>
      <pubDate>Sun, 29 Mar 2026 11:59:55 +0000</pubDate>
      <link>https://dev.to/jonathan_kip/understanding-data-modeling-in-power-bi-joins-relationships-and-schemas-106c</link>
      <guid>https://dev.to/jonathan_kip/understanding-data-modeling-in-power-bi-joins-relationships-and-schemas-106c</guid>
      <description>&lt;p&gt;&lt;strong&gt;Power BI&lt;/strong&gt; is a platform that enables users to connect to various data sources, transform data, create interactive visualizations, and share insights through dashboards and reports.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data modeling&lt;/strong&gt;  refers to the process of defining how tables connect, interact, and filter each other to enable accurate calculations, fast performance, and intuitive reporting.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;SQL JOINS&lt;/strong&gt;     &lt;/u&gt;                                                   &lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;INNER JOIN&lt;/strong&gt;&lt;/em&gt;-Returns matching rows from both tables.&lt;br&gt;
&lt;em&gt;&lt;strong&gt;LEFT JOIN&lt;/strong&gt;&lt;/em&gt;-All rows from left table, matching from right, NULLs for no match. &lt;br&gt;
&lt;em&gt;&lt;strong&gt;RIGHT JOIN&lt;/strong&gt;&lt;/em&gt;-All rows from right table, matching from left, NULLs for no match.&lt;br&gt;
&lt;em&gt;&lt;strong&gt;FULL OUTER&lt;/strong&gt;&lt;/em&gt;-All rows from both, NULLs where no match.&lt;br&gt;
&lt;em&gt;&lt;strong&gt;LEFT ANTI&lt;/strong&gt;&lt;/em&gt;-Rows in left table with no match in right.&lt;br&gt;
&lt;em&gt;&lt;strong&gt;RIGHT ANTI&lt;/strong&gt;&lt;/em&gt;-Rows in right table with no match in left. &lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;POWERBI RELATIONSHIP&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
Power BI relationships connect tables in the data model to enable dynamic filtering and accurate aggregations across visuals without physically merging data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Relationship Cardinality&lt;/strong&gt;&lt;br&gt;
Cardinality defines how many rows in one table match rows in another.&lt;/p&gt;

&lt;p&gt;1:1 (One-to-One): Each row in Table A matches exactly one row in Table B (e.g., Employee to EmployeeDetails via unique EmployeeID); rare, used for normalized data or security filtering.&lt;/p&gt;

&lt;p&gt;1:M (One-to-Many): One row in Table A matches multiple in Table B (e.g., Product to Sales via ProductID); standard for star schemas.&lt;/p&gt;

&lt;p&gt;M:M (Many-to-Many): Multiple rows in both tables match (e.g., Students to Classes); avoid direct M:M—instead use a bridge table for performance and clarity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Active vs Inactive Relationships&lt;/strong&gt;&lt;br&gt;
Active: Default, single relationship per table pair; filter context propagates automatically in visuals and DAX (solid line).&lt;/p&gt;

&lt;p&gt;Inactive: Additional relationships (dashed line); ignored by default—activate via USERELATIONSHIP() DAX function for specific measures (e.g., role-playing dates).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cross-Filter Direction&lt;/strong&gt;&lt;br&gt;
Controls filter propagation:&lt;/p&gt;

&lt;p&gt;Single: Filters flow one way (default for 1:M, e.g., Dimension → Fact).&lt;/p&gt;

&lt;p&gt;Both: Bi-directional (e.g., Fact ↔ Dimension); use cautiously to avoid ambiguity or performance hits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The difference between joins and relationships&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F41vtf35tezifk3vadtql.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F41vtf35tezifk3vadtql.png" alt="The difference between joins and relationships" width="688" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fact vs Dimension Tables&lt;/strong&gt;&lt;br&gt;
Fact tables store quantitative metrics (e.g., SalesAmount, Quantity) with foreign keys to dimensions; they grow vertically with transactions.&lt;/p&gt;

&lt;p&gt;Dimension tables hold descriptive attributes (e.g., ProductName, CustomerCity) with hierarchies; they grow horizontally and less frequently.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Star Schema&lt;/em&gt;: Central fact table surrounded by denormalized dimension tables; simplest and fastest for Power BI queries.&lt;br&gt;
Use Case: Sales dashboards needing quick slicing by product/customer.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Snowflake Schema&lt;/em&gt;: Dimensions normalized into sub-tables (e.g., Product → Category); saves storage but slower joins.&lt;br&gt;
Use Case: Data warehouses with complex hierarchies; avoid in pure Power BI models.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Flat Table (DLAT)&lt;/em&gt;: Single denormalized table blending facts/dimensions; easy but inefficient for filtering.&lt;br&gt;
Use Case: Small, simple datasets before unpivoting into star schema.&lt;/p&gt;

&lt;p&gt;Role-Playing Dimensions&lt;br&gt;
A single dimension (e.g., Date table) connects to a fact table multiple times for different roles (OrderDate, ShipDate). Use inactive relationships + USERELATIONSHIP() DAX to activate contextually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Modeling Issues&lt;/strong&gt;&lt;br&gt;
Circular dependencies: Resolved by star schema or inactive relationships.&lt;br&gt;
Bi-directional filter loops: Set single direction.&lt;br&gt;
Wrong cardinality: Causes incorrect aggregations; verify in properties.&lt;br&gt;
Ambiguous paths: Hide unused columns or use bridge tables.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>sql</category>
      <category>tutorial</category>
      <category>powebi</category>
    </item>
  </channel>
</rss>
