<?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: Wanjiru-Njoroge</title>
    <description>The latest articles on DEV Community by Wanjiru-Njoroge (@wanjirunjoroge).</description>
    <link>https://dev.to/wanjirunjoroge</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1215262%2Ff359f64b-5daf-449e-8363-61bd50605f43.png</url>
      <title>DEV Community: Wanjiru-Njoroge</title>
      <link>https://dev.to/wanjirunjoroge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wanjirunjoroge"/>
    <language>en</language>
    <item>
      <title>Understanding Type I and Type II Errors in a Medical Setting</title>
      <dc:creator>Wanjiru-Njoroge</dc:creator>
      <pubDate>Tue, 12 Aug 2025 16:55:50 +0000</pubDate>
      <link>https://dev.to/wanjirunjoroge/understanding-type-i-and-type-ii-errors-in-a-medical-setting-kdb</link>
      <guid>https://dev.to/wanjirunjoroge/understanding-type-i-and-type-ii-errors-in-a-medical-setting-kdb</guid>
      <description>&lt;p&gt;When it comes to healthcare, accuracy is critical. We rely on doctors and medical tests to give us the right answers about our health. Unfortunately, mistakes do happen. In statistics , these mistakes are often described as &lt;strong&gt;Type I errors&lt;/strong&gt; (false positives) and &lt;strong&gt;Type II errors&lt;/strong&gt; (false negatives). Understanding these errors can help patients and healthcare providers make better decisions and improve testing accuracy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Four Possible Outcomes of a Medical Test
&lt;/h2&gt;

&lt;p&gt;In a hospital scenario, there are four possible outcomes when a patient is tested for a disease:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;You are sick, and the test correctly identifies you as sick.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You are healthy, and the test correctly shows you are healthy.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You are sick, but the test says you are healthy.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You are healthy, but the test says you are sick.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first two outcomes are correct diagnoses, while the last two represent &lt;strong&gt;errors in medical testing&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hypothesis Testing in Healthcare
&lt;/h2&gt;

&lt;p&gt;Before interpreting any medical test, doctors often think in terms of &lt;strong&gt;statistical hypotheses&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Null Hypothesis (H₀):&lt;/strong&gt; The patient does &lt;strong&gt;not&lt;/strong&gt; have the disease.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alternative Hypothesis (H₁):&lt;/strong&gt; The patient &lt;strong&gt;does&lt;/strong&gt; have the disease.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After conducting the test (blood test, an imaging scan, or a lab culture) the results determine whether we &lt;strong&gt;reject&lt;/strong&gt; or &lt;strong&gt;accept&lt;/strong&gt; the null hypothesis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Type I Error (False Positive)
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;Type I error&lt;/strong&gt; occurs when the null hypothesis is rejected even though it is true.&lt;br&gt;&lt;br&gt;
In medical terms, this means the test shows you have the disease when you actually do not have one &lt;/p&gt;

&lt;h3&gt;
  
  
  Example: Cancer Screening
&lt;/h3&gt;

&lt;p&gt;If a cancer test incorrectly says you have cancer, it can cause:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Emotional distress for the patient and family.&lt;/li&gt;
&lt;li&gt;Unnecessary follow-up tests or treatments.&lt;/li&gt;
&lt;li&gt;Potential side effects from treatments that were never needed.&lt;/li&gt;
&lt;li&gt;Financial costs for both the patient and the healthcare system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Possible causes:&lt;/strong&gt; Test contamination, human error, or low test specificity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Type II Error (False Negative)
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;Type II error&lt;/strong&gt; happens when the null hypothesis is accepted even though it is false.&lt;br&gt;&lt;br&gt;
In medical terms, this means the test shows you are healthy when you actually have the disease  a &lt;strong&gt;false negative&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example: Cancer Screening
&lt;/h3&gt;

&lt;p&gt;If the test misses cancer, it can lead to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Missed opportunity for early treatment.&lt;/li&gt;
&lt;li&gt;Disease progression, possibly worsening the prognosis.&lt;/li&gt;
&lt;li&gt;Increased long-term healthcare costs due to late-stage treatment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Possible causes:&lt;/strong&gt; Low test sensitivity, poor sample quality, or inadequate detection technology.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Is “Better”?
&lt;/h2&gt;

&lt;p&gt;For me, a false negative feels better than a false positive because at least I wouldn’t have to deal with the anxiety and financial strain of unnecessary treatment. However, I also recognize that the risks of delayed diagnosis are far too high to ignore. That’s why I believe the ultimate goal in healthcare should always be to  &lt;strong&gt;improve accuracy, reduce error rates, and ensure that patients receive timely and correct diagnoses&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>stastistics</category>
      <category>python</category>
    </item>
    <item>
      <title>Understanding Measures of Central Tendency and Their Importance in Data Science</title>
      <dc:creator>Wanjiru-Njoroge</dc:creator>
      <pubDate>Tue, 22 Jul 2025 20:09:16 +0000</pubDate>
      <link>https://dev.to/wanjirunjoroge/understanding-measures-of-central-tendency-and-their-importance-in-data-science-1e98</link>
      <guid>https://dev.to/wanjirunjoroge/understanding-measures-of-central-tendency-and-their-importance-in-data-science-1e98</guid>
      <description>&lt;p&gt;In the dynamic field of data science, interpreting data is fundamental to success. Whether predicting customer behavior, analyzing sales performance, or designing machine learning algorithms, understanding your data's characteristics is crucial. One of the primary tools for summarizing data is &lt;strong&gt;measures of central tendency&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Are Measures of Central Tendency?
&lt;/h2&gt;

&lt;p&gt;Measures of central tendency are statistical techniques used to determine the center or typical value of a dataset. They provide a single value that represents the entire distribution of data. The three main types are:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Mean (Average)
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;mean&lt;/strong&gt; is calculated by summing all values and dividing by the number of values. It is the most commonly used measure and is particularly effective for normally distributed data.&lt;/p&gt;

&lt;p&gt;Mean = ∑x_i / n&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Median
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;median&lt;/strong&gt; is the middle value when the data is arranged in order. If there is an even number of observations, it is the average of the two middle numbers. This measure is especially useful when the data contains outliers or is skewed.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Mode
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;mode&lt;/strong&gt; is the most frequently occurring value in a dataset. It is particularly valuable for categorical data and for identifying common trends.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Are They Important in Data Science?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Data Summarization
&lt;/h3&gt;

&lt;p&gt;Measures of central tendency enable data scientists to quickly grasp the general pattern of a dataset. This is essential during &lt;strong&gt;Exploratory Data Analysis (EDA)&lt;/strong&gt;, which aims to familiarize analysts with the data before conducting deeper modeling or analysis.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Identifying Data Distribution
&lt;/h3&gt;

&lt;p&gt;Understanding the mean, median, and mode helps determine if the data is &lt;strong&gt;normally distributed&lt;/strong&gt; or &lt;strong&gt;skewed&lt;/strong&gt;. This knowledge informs the selection of appropriate models and algorithms.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For normally distributed data:&lt;br&gt;&lt;br&gt;
mean ≈ median ≈ mode.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In skewed data:&lt;br&gt;&lt;br&gt;
The mean is influenced by the direction of the skew.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Outlier Detection
&lt;/h3&gt;

&lt;p&gt;Significant discrepancies between the mean and median may indicate the presence of &lt;strong&gt;outliers&lt;/strong&gt;. Identifying these is crucial, as outliers can distort models and predictions.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Modeling and Machine Learning
&lt;/h3&gt;

&lt;p&gt;Many algorithms, particularly &lt;strong&gt;linear regression&lt;/strong&gt;, assume data is normally distributed. Measures of central tendency help verify these assumptions and facilitate necessary data preprocessing.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Communication and Reporting
&lt;/h3&gt;

&lt;p&gt;Stakeholders often prefer simplified insights. For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The average sales this quarter were $5,000”  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;is much clearer than presenting raw data.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-Life Examples
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Healthcare:&lt;/strong&gt; In analyzing patient wait times, the &lt;strong&gt;median&lt;/strong&gt; is often more meaningful than the mean, as outliers (e.g., emergencies) can skew the average.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Retail:&lt;/strong&gt; The &lt;strong&gt;mode&lt;/strong&gt; helps identify the most sold product in a store.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Finance:&lt;/strong&gt; Investment analysts frequently report &lt;strong&gt;average returns&lt;/strong&gt; but must also consider &lt;strong&gt;median returns&lt;/strong&gt; to understand skewed distributions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




</description>
    </item>
    <item>
      <title>🔗 Understanding Relationships in Power BI</title>
      <dc:creator>Wanjiru-Njoroge</dc:creator>
      <pubDate>Sun, 22 Jun 2025 13:58:20 +0000</pubDate>
      <link>https://dev.to/wanjirunjoroge/understanding-relationships-in-power-bi-2pjm</link>
      <guid>https://dev.to/wanjirunjoroge/understanding-relationships-in-power-bi-2pjm</guid>
      <description>&lt;p&gt;&lt;strong&gt;👥 What Is a Relationship in Power BI?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A relationship informs Power BI how tables are connected, typically through a shared column such as CustomerID, ProductID, or Date.&lt;/p&gt;

&lt;p&gt;Without these relationships, Power BI cannot match data between tables, leading to blank entries or inaccurate totals in your reports.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔄 The 3 Types of Relationships&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;1. One-to-One (1:1)&lt;/em&gt;&lt;br&gt;
Rare but useful when both tables contain unique values.&lt;br&gt;
For example, the Employee table and the EmployeeDetails table.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2. One-to-Many (1:*)&lt;/em&gt;&lt;br&gt;
The most common type of relationship.&lt;br&gt;
For example, one product can have many sales.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;3. Many-to-Many (:)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Challenging to manage.&lt;br&gt;
For example, sales territories with multiple representatives in each region.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🛠️ How to Build a Relationship&lt;/strong&gt;&lt;br&gt;
Open Model view.&lt;br&gt;
Drag a column from one table to the corresponding column in another table.&lt;br&gt;
Select the appropriate cardinality (1:1, 1:*, etc.).&lt;br&gt;
Choose a filter direction (typically single).&lt;br&gt;
Now, the tables are connected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;⚠️ Factors That Break Relationships&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lack of unique values on one side (Power BI requires this).&lt;br&gt;
Ambiguous filter paths.&lt;br&gt;
Relationships established in the wrong direction.&lt;br&gt;
Failing to create a relationship altogether 😅.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ Pro Tips&lt;/strong&gt;&lt;br&gt;
Maintain clean and unique lookup tables (Customers, Products, Dates).&lt;br&gt;
Avoid circular relationships.&lt;br&gt;
Always review your model diagram—it serves as your map 🗺️.&lt;br&gt;
Test relationships using simple visuals, such as slicers.&lt;/p&gt;

</description>
      <category>powerbi</category>
      <category>relationships</category>
    </item>
    <item>
      <title>Getting started with Excel for Data Analysis: What I have learned so far</title>
      <dc:creator>Wanjiru-Njoroge</dc:creator>
      <pubDate>Tue, 10 Jun 2025 19:29:51 +0000</pubDate>
      <link>https://dev.to/wanjirunjoroge/getting-started-with-excel-for-data-analysis-what-i-have-learned-so-for-l3j</link>
      <guid>https://dev.to/wanjirunjoroge/getting-started-with-excel-for-data-analysis-what-i-have-learned-so-for-l3j</guid>
      <description>&lt;p&gt;In the past, when I opened Excel, it just looked like an empty grid — rows, columns, cells, and tables. It felt dry and technical, like a digital notebook without much purpose.&lt;/p&gt;

&lt;p&gt;But once I began learning data analysis, I quickly realized Excel is far more than a basic spreadsheet tool. It's one of the most accessible and powerful platforms for working with data — especially when you're just starting out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, What Is Excel Really?&lt;/strong&gt;&lt;br&gt;
At first glance, Excel might seem simple. But in reality, it's a blank canvas for all kinds of data work. Whether you're analyzing finances, organizing surveys, managing inventory, or tracking student performance, Excel allows you to store, structure, and explore your data — all in one place.&lt;/p&gt;

&lt;p&gt;It’s part calculator, part notebook, part detective. And with just a few key skills, Excel becomes your go-to tool for understanding what your data is really saying.&lt;/p&gt;

&lt;p&gt;💼 &lt;strong&gt;Real-World Uses of Excel in Data Analysis&lt;/strong&gt;&lt;br&gt;
Here are just a few ways Excel is used across different industries to support data-driven decisions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
📋 &lt;em&gt;HR Analytics&lt;/em&gt;: Understanding People Through Data
HR teams do more than just handle hiring paperwork. They use data to improve employee experiences and workplace performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
An HR manager can use Excel to track employee attendance over time. With conditional formatting, they might highlight departments with the highest absence rates — helping leadership address burnout or workflow issues.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
📦_ Inventory and Supply Chain_: Staying on Top of Stock
In retail and logistics, inventory accuracy is everything. Excel helps businesses track stock levels, monitor supplier performance, and forecast restocking needs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
A small business owner might use Excel to log incoming shipments and daily sales. With a few formulas, they can easily see which products are running low and spot delays from suppliers — before it impacts the bottom line.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
🏥 &lt;em&gt;Healthcare Data&lt;/em&gt;: Improving Efficiency
While Excel doesn’t replace hospital systems, it’s incredibly useful for managing non-sensitive healthcare data like appointments, staff schedules, or treatment plans.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
A local clinic uses Excel to record weekly patient visits. By grouping the data by condition and visualizing trends, they can adjust staff availability and reduce wait times during peak hours.&lt;/p&gt;

&lt;p&gt;🔍 &lt;strong&gt;Excel Features I’ve Come to Love&lt;/strong&gt;&lt;br&gt;
Learning Excel has also introduced me to a few powerful tools and formulas. These are some of my go-to favorites:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VLOOKUP&lt;/strong&gt;: A lifesaver when combining datasets. I’ve used it to match product names with IDs or to connect survey results with demographic info.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conditional Formatting&lt;/strong&gt;: This makes patterns jump off the page — like highlighting overdue tasks, duplicate entries, or high scores.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IF Statements&lt;/strong&gt;: Great for applying logic and flagging data — for example, labeling rows as “Pass” or “Fail” based on a score.&lt;/p&gt;

&lt;p&gt;💭 &lt;strong&gt;How Excel Changed the Way I See Data&lt;/strong&gt;&lt;br&gt;
Before I learned Excel, data felt like noise — just numbers in rows and columns that didn’t mean much until someone else interpreted them.&lt;/p&gt;

&lt;p&gt;But now? I see data as a conversation.&lt;/p&gt;

&lt;p&gt;When I open a dataset, I instinctively ask:&lt;br&gt;
Are there patterns? Outliers? Is something missing?&lt;br&gt;
I use Excel to explore these questions — almost like interviewing the data. And in return, it gives me answers through charts, summaries, and calculated fields.&lt;/p&gt;

&lt;p&gt;More importantly, Excel has made me more careful. I’ve learned to look twice before jumping to conclusions, and I’ve gained a deep appreciation for how a simple tool can surface powerful insights.&lt;/p&gt;

</description>
      <category>dataanalysis</category>
      <category>excel</category>
    </item>
  </channel>
</rss>
