<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Zun Khet Wai on Medium]]></title>
        <description><![CDATA[Stories by Zun Khet Wai on Medium]]></description>
        <link>https://medium.com/@zunkhetwai?source=rss-a55edb26da81------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*C8JOkHUkNnJzKu12RruLlw@2x.jpeg</url>
            <title>Stories by Zun Khet Wai on Medium</title>
            <link>https://medium.com/@zunkhetwai?source=rss-a55edb26da81------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 11:12:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zunkhetwai/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Can AI Learn by Dreaming?]]></title>
            <link>https://medium.com/@zunkhetwai/can-ai-learn-by-dreaming-777b720fd191?source=rss-a55edb26da81------2</link>
            <guid isPermaLink="false">https://medium.com/p/777b720fd191</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[ai-education]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Zun Khet Wai]]></dc:creator>
            <pubDate>Tue, 21 Jul 2026 17:38:09 GMT</pubDate>
            <atom:updated>2026-07-21T17:38:09.494Z</atom:updated>
            <content:encoded><![CDATA[<p>How AI learns from imagined futures before they happen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YUMQ8lKS52-S_44TK46yvg.png" /></figure><h3>Can You Learn Without Doing?</h3><blockquote>“Some of our best lessons happen only in our minds.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YpMkCgQ5T6KqxRzOy0M2Rw.png" /></figure><p>Have you ever replayed a conversation in your head and thought,</p><p>“I should have said that instead?”</p><p>Or perhaps you’ve imagined tomorrow’s presentation, carefully thinking through what you’ll say before you even step into the room.</p><p>Nothing has happened yet. You haven’t spoken a single word or taken a single action. Yet somehow, you already feel more prepared than you did a moment ago.</p><p>How is that possible?</p><p>Because your brain has already been there — not in reality, but in imagination. Every day, our minds quietly replay the past, explore different choices, and mentally rehearse possible futures. In doing so, we learn from experiences that never actually occurred.</p><p>We call this <strong>imagination</strong>. It’s one of the most remarkable abilities of the human mind.</p><p>This leads to an intriguing question:</p><p><strong>If humans can learn through imagination, can AI do the same?</strong></p><h3>Before You Can Dream, You Need a World</h3><blockquote>“You can’t imagine a world you don’t understand.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tAkuzMig9yYEm1TTnSEyyg.png" /></figure><p>At first glance, imagination seems limitless. But is it?</p><p>Imagine asking someone who has never seen snow to picture a snowstorm.</p><p>They might imagine white rain or tiny white feathers drifting from the sky. They can certainly imagine <em>something</em>, but without understanding what snow is, that imagination is unlikely to resemble reality.</p><p>Our imagination is only as good as our understanding of the world.</p><p>Think about your own mind for a moment.</p><p>If someone asks,</p><p><em>“What happens if you drop a glass?”</em></p><p>you don’t actually drop one to find out. You already know what is likely to happen. Somewhere inside your mind, a tiny simulation has already played out. Without realizing it, you predicted the future before it happened.</p><p>That ability comes from an internal understanding of how the world works. AI researchers call this a <strong>world model</strong>.</p><p>A world model isn’t a perfect copy of reality. It’s simply the AI’s internal understanding of how the world works.</p><p>Before an AI can imagine possible futures, it must first build its own understanding of the world.</p><p>Only then can it begin to dream.</p><h3>Teaching AI to Dream</h3><blockquote>“Reality teaches one lesson at a time. Imagination can teach thousands.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*19qju6K6pfQek4Y_lQZwOA.png" /></figure><p>A world model allows an AI to ask a simple question:</p><p><em>“What might happen next?”</em></p><p>But what if it didn’t stop at just one possible future?</p><p>What if it imagined another? And another.</p><p>Imagine an AI standing at a crossroads. It hasn’t taken a single step yet. Instead of choosing immediately, it quietly explores different possibilities inside its world model.</p><p><em>“What if I go left?”</em></p><p>One possible future unfolds.</p><p><em>“What if I go right instead?”</em></p><p>Another future appears.</p><p>The AI hasn’t taken a single step. Yet it has already explored several possible futures.</p><p>Researchers gave this simple but powerful idea a fitting name: <strong>Dreamer</strong>. In Dreamer, “dreaming” doesn’t mean sleeping. It means imagining possible futures inside a learned model of the world.</p><p>Rather than learning only from real experiences, Dreamer also learns from imagined ones generated by its world model. These imagined futures aren’t perfect predictions of reality. They’re simply the AI’s best guesses based on everything it has learned so far.</p><p>The more accurately the AI understands the world, the more useful those imagined futures become.</p><h3>Why Imagine Before Acting?</h3><blockquote>“Reality gives us one future. Imagination lets us explore many.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eHy36h1gNsi3zL1l27_oQA.png" /></figure><p>Every decision we make in the real world has only one outcome.</p><p>Once we choose a path, every alternative disappears. We eventually learn whether it was the right decision, but we never get to experience what would have happened had we chosen differently.</p><p>Imagination gives us something reality never can: the chance to explore possibilities before committing to one.</p><p>Instead of depending entirely on real-world experience, Dreamer first explores many possible futures inside its world model. Some imagined choices quickly reveal themselves to be poor decisions. Others suggest a better path forward.</p><p>Of course, imagination isn’t perfect.</p><p>If the AI misunderstands the world, its imagined futures will also be misleading. That’s why reality remains essential. Every real experience helps improve the world model, making future imagination more accurate.</p><p>In the end, reality and imagination are partners. Reality teaches the AI how the world works. Imagination helps it make better use of what it has learned.</p><p>Perhaps that’s the greatest strength of Dreamer. It doesn’t replace learning from reality. It makes every real experience more valuable.</p><h3>So… Can AI Learn by Dreaming?</h3><blockquote>“Perhaps intelligence isn’t just about collecting experiences. It’s about making the most of them.”</blockquote><p>Can AI learn by dreaming?</p><p>Not in the way humans do. But it can imagine possible futures before they happen and learn from those possibilities before taking its next step.</p><p>That’s the beautiful idea behind Dreamer.</p><p>It reminds us that intelligence isn’t measured only by how much experience we collect. It’s also measured by how well we use those experiences to imagine what comes next.</p><p>That’s why imagination is such a powerful teacher.</p><p>It doesn’t replace experience. It expands what experience can teach us.</p><p>Sometimes, the smartest lesson comes from a future that never happened.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=777b720fd191" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Makes a Good Dataset?]]></title>
            <link>https://medium.com/@zunkhetwai/what-makes-a-good-dataset-c6558df211bd?source=rss-a55edb26da81------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6558df211bd</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[dataset]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Zun Khet Wai]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 18:42:18 GMT</pubDate>
            <atom:updated>2026-06-29T18:42:18.228Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How do you know whether a dataset is good enough to train an AI model?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wTw8wzNQdAPs9jk1dTRy3Q.png" /></figure><h3>Introduction</h3><p>Imagine you’re preparing for an important exam. A friend hands you two study books. The first contains only 200 carefully written pages. Every topic is accurate, well-organized, and directly related to the exam. The second contains 2,000 pages. Some chapters are outdated. Others repeat the same ideas. A few even contain incorrect information.</p><p>Which book would you choose?</p><p>Most people would choose the first one without hesitation because we naturally understand that quality matters more than quantity when it comes to learning.</p><p>Interestingly, many people forget this principle when building AI systems. When discussing machine learning, we often focus on questions like:</p><ul><li>Which model should I use?</li><li>Should I use the latest architecture?</li><li>How can I improve my model’s accuracy?</li></ul><p>These are important questions. But they all assume one thing:</p><blockquote><strong><em>The model has something worth learning from.</em></strong></blockquote><p>Every machine learning model learns by discovering patterns in data. If the dataset is incomplete, inaccurate, or unrepresentative of the real world, even the most sophisticated model has limited opportunity to learn the right patterns. In other words, before asking how good the model is, we should first ask:</p><blockquote><strong><em>How good is the dataset?</em></strong></blockquote><p>Many people assume that a good dataset is simply a large dataset. That assumption is often wrong. Imagine you’re building an AI system to detect defective products on a manufacturing line.</p><p>Now compare these two datasets.</p><ul><li><strong>Dataset A</strong> contains one million high-quality images collected from the internet. Most have nothing to do with manufactured products.</li><li><strong>Dataset B</strong> contains only ten thousand images collected directly from the production line where the model will eventually be deployed.</li></ul><p>Although Dataset B is much smaller, it is clearly the better dataset because it represents the problem the model is expected to solve. This leads us to a simple definition.</p><blockquote><strong><em>A good dataset faithfully represents the real-world problem your AI model is expected to solve.</em></strong></blockquote><h3>A Different Way to Think About a Dataset</h3><p>Instead of thinking of a dataset as rows in a spreadsheet or thousands of images…</p><p><strong>Think of it as a miniature version of the real world.</strong></p><p>Every sample is one observation from that world. Together, those observations teach the model what that world looks like. If this miniature world is incomplete, the model learns an incomplete understanding of reality. If it contains mistakes, the model learns mistaken relationships. If it no longer reflects today’s world, the model learns a world that no longer exists.</p><blockquote><strong><em>A model never learns directly from the real world. It learns from the world you build for it.</em></strong></blockquote><p>Once you see a dataset this way, evaluating its quality becomes much more intuitive. Instead of asking whether the dataset is large enough, we can ask a much better question:</p><blockquote><strong><em>How faithfully does this miniature world represent reality?</em></strong></blockquote><p>Figure 1 illustrates this idea. The model never learns directly from the real world. Instead, it learns from the miniature world created by the dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IDjziAGT0Yqg086pxuRzew.png" /><figcaption><em>Figure 1. A Dataset as a Miniature Version of the Real World</em></figcaption></figure><h3>A Framework for Evaluating Datasets</h3><p>Once we see a dataset as a miniature version of the real world, evaluating its quality becomes much more intuitive.</p><p>The question is no longer:</p><blockquote><em>“Is my dataset large enough?”</em></blockquote><p>Instead, it becomes:</p><blockquote><strong><em>“How good is the miniature world I’ve built for my model?”</em></strong></blockquote><p>I like to answer that question using six simple questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*kW1y-kAfMCKdL7unZj82FQ.png" /></figure><p>These questions naturally fall into three areas:</p><ol><li>Representation</li><li>Reliability</li><li>Freshness</li></ol><p>Notice that the framework doesn’t ask,</p><ul><li>How large is the dataset?</li><li>Which model should I use?</li><li>Which algorithm performs best?</li></ul><p>Instead, it asks whether the dataset itself provides an accurate and trustworthy representation of reality.</p><p>As you read the rest of this article, try evaluating your own dataset using these six questions. By the end, you’ll have a practical framework that you can apply to almost any dataset, whether it contains images, text, audio, tabular data, or time-series data.</p><p>Let’s begin with the first dimension: <strong>Representation</strong>.</p><h3>1. Does Every Sample Belong?</h3><p>Imagine you’re building an AI system to detect defective products on a manufacturing line. Most of your dataset contains images of products moving along the production line, which are clearly relevant. However, you also discover images of factory cafeterias, office meeting rooms, parking lots, and employees during lunch breaks. Although these images were collected inside the same factory, they contribute little to identifying defective products.</p><p>Simply collecting more data does not improve a dataset. Collecting the <strong>right</strong> data does. This idea is known as <strong>relevance</strong>. A relevant dataset contains information that directly contributes to the target task. Every sample should help the model learn patterns that are useful for solving the intended problem.</p><h3>Questions to Ask</h3><p>When evaluating relevance, ask yourself:</p><ul><li>Does every sample contribute to solving the target problem?</li><li>Are there samples unrelated to the task?</li><li>Does the dataset come from the same environment where the model will be deployed?</li><li>Would removing certain samples make the dataset more focused?</li></ul><p>If the answer to the last question is <strong>yes</strong>, those samples probably do not belong in the dataset.</p><h3>How to Improve It</h3><p>Improving relevance usually means removing unnecessary information.</p><p>Consider:</p><ul><li>removing unrelated samples,</li><li>collecting data directly from the deployment environment,</li><li>defining clear data collection criteria,</li><li>periodically reviewing newly collected data.</li></ul><blockquote><strong><em>Key Takeaway</em></strong></blockquote><blockquote><em>A better dataset isn’t always a larger dataset.</em></blockquote><blockquote><em>Sometimes it’s simply a more relevant one.</em></blockquote><h3>2. Is Anything Important Missing?</h3><p>Once we’ve confirmed that every sample belongs, the next question becomes:</p><blockquote><strong><em>Does the dataset represent the entire problem?</em></strong></blockquote><p>Suppose you’ve collected 20,000 traffic sign images. After reviewing the dataset, you discover that nearly every image was captured:</p><ul><li>during the daytime,</li><li>under sunny weather,</li><li>on clear roads,</li><li>using the same camera.</li></ul><p>Although the dataset contains thousands of images, many important situations are missing. For example:</p><ul><li>nighttime driving,</li><li>rainy weather,</li><li>foggy conditions,</li><li>partially occluded traffic signs,</li><li>signs viewed from unusual angles.</li></ul><p>When the model is deployed, it may struggle — not because the model failed to learn, but because those situations were never represented in its miniature world.</p><blockquote><strong><em>Coverage is about making sure that your miniature world is complete enough to represent reality.</em></strong></blockquote><p>Missing information isn’t limited to environmental conditions.</p><p>Suppose your traffic sign recognition system is expected to recognize regulatory signs, warning signs, and guide signs. If the dataset contains only regulatory signs, then the model has no opportunity to learn the other categories. Likewise, some events occur infrequently but remain important. Manufacturing defects, fraudulent transactions, and rare diseases are relatively uncommon, but they should still be represented if the model is expected to recognize them.</p><h3>Questions to Ask</h3><p>When evaluating coverage, ask yourself:</p><ul><li>Are any important situations missing?</li><li>Does the dataset represent the environments where the model will operate?</li><li>Have all important classes been included?</li><li>Are rare but important events represented?</li><li>If the model were deployed today, what situations might it encounter that are absent from the dataset?</li></ul><h3>How to Improve It</h3><p>Improving coverage means identifying what is missing. Depending on the application, this may involve:</p><ul><li>collecting data under different environmental conditions,</li><li>including missing classes,</li><li>gathering data from multiple locations or devices,</li><li>capturing rare but important events,</li><li>extending data collection across different time periods.</li></ul><blockquote><strong><em>Key Takeaway</em></strong></blockquote><blockquote><em>A dataset with good coverage doesn’t just contain more data.</em></blockquote><blockquote><em>It contains the missing pieces of the real world.</em></blockquote><h3>Can You Trust Your Dataset?</h3><p>So far, we’ve focused on whether the dataset represents the right problem. But representation alone isn’t enough. Imagine creating a miniature world that perfectly reflects reality — but many of its observations are incorrect, incomplete, or inconsistent. Even though the right situations are represented, the model would still learn unreliable patterns.</p><p>This brings us to the second part of our framework.</p><blockquote><strong><em>Can you trust your dataset?</em></strong></blockquote><p>Trust comes from three different sources:</p><ul><li>Can you trust the samples?</li><li>Can you trust the labels?</li><li>Can you trust the way the dataset was created?</li></ul><p>Let’s answer them one by one.</p><h3>3. Can You Trust the Samples?</h3><p>Imagine you’re studying for an important exam. Your textbook covers every topic that will appear on the exam. However,</p><ul><li>several pages are missing,</li><li>some diagrams are blurred,</li><li>a few chapters contain incorrect information,</li><li>and some pages are duplicated multiple times.</li></ul><p>Although the book covers the right subject, its poor quality makes learning much more difficult. The same principle applies to datasets. Even if a dataset represents the correct problem, poor-quality samples reduce its reliability. Poor data quality can appear in many forms, including:</p><ul><li>blurry or low-resolution images,</li><li>corrupted audio recordings,</li><li>missing values,</li><li>incomplete sensor measurements,</li><li>damaged files,</li><li>incorrect timestamps,</li><li>inconsistent units,</li><li>duplicate records.</li></ul><p>Instead of learning meaningful patterns, the model may learn from the errors themselves. This idea is known as <strong>Data Quality</strong>.</p><h3>Questions to Ask</h3><ul><li>Are any samples corrupted or unreadable?</li><li>Are there missing values or incomplete records?</li><li>Are duplicate samples present?</li><li>Are measurements accurate?</li><li>Are values stored using consistent formats and units?</li><li>Does every sample contain sufficient information?</li></ul><h3>How to Improve It</h3><p>Improving data quality focuses on increasing the reliability of the existing data. Consider:</p><ul><li>removing corrupted samples,</li><li>correcting obvious errors,</li><li>handling missing values,</li><li>removing unnecessary duplicates,</li><li>standardizing formats and units,</li><li>validating measurements,</li><li>introducing quality checks during data collection.</li></ul><blockquote><strong><em>Key Takeaway</em></strong></blockquote><blockquote><em>Good models are built on trustworthy data.</em></blockquote><blockquote><em>Before collecting more samples, make sure you can trust the ones you already have.</em></blockquote><h3>4. Can You Trust the Labels?</h3><p>Now consider another problem. You’re creating a dataset to classify cats and dogs. Every image is clear, relevant, and high quality. However, some cats are labeled as dogs, while some dogs are labeled as cats. The images themselves are perfectly correct. The labels are not. As a result, the model receives contradictory information during training. Similar images are assigned different labels, making it difficult to learn the correct relationship between the data and its labels.</p><p>This idea is known as <strong>Label Quality</strong>.</p><p>Remember:</p><blockquote><strong><em>A supervised learning model learns from both the data and its labels.</em></strong></blockquote><p>If either one is wrong, learning is affected.</p><h3>Questions to Ask</h3><ul><li>Are the labels correct?</li><li>Are annotation guidelines clearly defined?</li><li>Would different annotators assign the same label?</li><li>Are ambiguous samples reviewed consistently?</li><li>Have labels been validated?</li></ul><h3>How to Improve It</h3><p>Improving label quality starts with improving the annotation process.</p><p>Consider:</p><ul><li>creating clear annotation guidelines,</li><li>training annotators,</li><li>reviewing ambiguous samples,</li><li>using multiple annotators,</li><li>auditing labeled data,</li><li>correcting mislabeled samples.</li></ul><blockquote><strong><em>Key Takeaway</em></strong></blockquote><blockquote><em>High-quality data cannot compensate for poor labels.</em></blockquote><blockquote><em>The model can only learn as accurately as it is taught.</em></blockquote><h3>5. Was the Dataset Created Consistently?</h3><p>Reliable datasets are not created by chance. They are created through consistent standards. Imagine three annotators labeling vehicles. One labels pickup trucks as <strong>“Truck.” </strong>Another labels similar vehicles as <strong>“Pickup.” </strong>A third labels them as <strong>“Pickup Truck.” </strong>Although they refer to the same vehicle, the annotations are inconsistent. The same issue can occur during data collection. One team records temperatures in Celsius. Another records them in Fahrenheit. One sensor stores timestamps in UTC. Another stores them in local time. These inconsistencies introduce unnecessary variation that has nothing to do with the real-world problem.</p><p>This idea is known as <strong>Consistency</strong>. Consistency doesn’t mean every sample should look the same. It means every sample should be collected and annotated using the same standards.</p><h3>Questions to Ask</h3><ul><li>Were all samples collected using the same procedures?</li><li>Were annotation guidelines applied consistently?</li><li>Are naming conventions, formats, and units standardized?</li><li>Would different annotators produce similar results?</li><li>Are the collection procedures clearly documented?</li></ul><h3>How to Improve It</h3><p>Consistency begins with establishing standards before data collection starts.</p><p>Consider:</p><ul><li>defining annotation guidelines,</li><li>standardizing formats and units,</li><li>documenting collection procedures,</li><li>training annotators,</li><li>reviewing the dataset regularly,</li><li>performing quality audits.</li></ul><blockquote><strong><em>Key Takeaway</em></strong></blockquote><blockquote><em>A trustworthy dataset doesn’t happen by accident.</em></blockquote><blockquote><em>It is built through consistent processes.</em></blockquote><h3>6. Does It Still Represent Today’s World?</h3><p>Suppose you’ve answered <strong>yes</strong> to the previous five questions.</p><p>Does that mean your dataset is ready to use forever?</p><p>Not necessarily.</p><p>The world changes.</p><p>Products evolve.</p><p>Customer behavior shifts.</p><p>New technologies emerge.</p><p>As the real world changes, a dataset that was once representative may gradually become outdated.</p><p>This idea is known as <strong>freshness</strong>.</p><h3>Why It Matters</h3><p>Consider a spam email detection system.</p><p>Several years ago, spam emails often contained poor grammar, suspicious links, and obvious promotional language.</p><p>Today, many spam emails are generated using advanced language models and closely resemble legitimate business emails.</p><p>Although an older dataset may still be accurate, it no longer represents the emails the model is expected to classify today.</p><p>The same challenge appears in many other applications.</p><p>Traffic patterns change.</p><p>Manufacturing processes evolve.</p><p>Customer preferences shift.</p><p>Medical knowledge advances.</p><p>A dataset should evolve as the real world evolves.</p><h3>Questions to Ask</h3><ul><li>When was the dataset collected?</li><li>Has the problem changed since then?</li><li>Does the dataset still resemble today’s deployment environment?</li><li>Are important new situations missing?</li><li>Would newly collected data look noticeably different?</li></ul><p>If the answer to the last question is <strong>yes</strong>, it may be time to update the dataset.</p><h3>How to Improve It</h3><p>Maintaining freshness requires treating dataset creation as an ongoing process.</p><p>Consider:</p><ul><li>collecting new data periodically,</li><li>replacing outdated samples,</li><li>monitoring changes in the deployment environment,</li><li>updating labels when necessary,</li><li>retraining models with more recent data.</li></ul><blockquote><strong><em>Key Takeaway</em></strong></blockquote><blockquote><em>A good dataset doesn’t remain good forever.</em></blockquote><blockquote><em>It should evolve as the world evolves.</em></blockquote><h3>Conclusion</h3><p>At the beginning of this article, we imagined choosing between two books for an important exam. One book was carefully written, accurate, and directly related to the exam. The other was much larger but contained outdated, repetitive, and incorrect information. Most people naturally chose the first book because we understand that <strong>the quality of what we learn from matters more than the quantity. </strong>The same principle applies to machine learning. Before comparing model architectures, tuning hyperparameters, or collecting more data, it is worth asking a much simpler question:</p><blockquote><strong><em>Is my dataset worth learning from?</em></strong></blockquote><p>Throughout this article, we’ve looked at datasets from a different perspective. A dataset isn’t just a collection of images, rows in a spreadsheet, or hours of recorded audio. It is a <strong>miniature version of the real world</strong>.</p><p>Every sample contributes to the world’s representation.</p><p>Every label helps explain that world. Every mistake distorts it.</p><p>Every missing situation leaves part of it unexplored.</p><p>Every outdated sample causes it to drift further away from reality.</p><p>When your model learns from a dataset, it is really learning from that miniature world. The closer that world is to reality, the better your model can understand reality itself. Your model never learns directly from the real world. It learns from the world you build for it. The better that world represents reality, the better your model can understand reality itself.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6558df211bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Statistical Paradox That Tricks Researchers]]></title>
            <link>https://medium.com/@zunkhetwai/the-statistical-paradox-that-tricks-researchers-a04ae5913620?source=rss-a55edb26da81------2</link>
            <guid isPermaLink="false">https://medium.com/p/a04ae5913620</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[simpsons-paradox]]></category>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Zun Khet Wai]]></dc:creator>
            <pubDate>Mon, 15 Jun 2026 12:02:19 GMT</pubDate>
            <atom:updated>2026-06-15T12:02:19.091Z</atom:updated>
            <content:encoded><![CDATA[<p>Understanding Simpson’s Paradox: Why Combining Data Can Reverse the Truth</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dnR3tB_JqsrjIkx4INXa3Q.png" /></figure><p>Imagine two students, Alice and Bob, taking quizzes throughout a semester. The quizzes are divided into two categories:</p><ul><li>Easy quizzes</li><li>Hard quizzes</li></ul><p>Let’s compare their performance.</p><p><strong>Easy Quizzes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5PFxTBAYeNcN_P7kU0jLig.png" /></figure><p><strong>Hard Quizzes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*76dgrHioAKZqjT4jIX0XgQ.png" /></figure><p>Alice performs better again.</p><p>At this point, the conclusion seems obvious. Alice scored higher on the easy quizzes. Alice also scored higher on the hard quizzes. So Alice should have a higher overall score. Right?</p><p>Let’s combine all of their results.</p><h3>Overall Performance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j91b4Si5fcKPQruHwP5ZCA.png" /></figure><p>Suddenly, Bob appears to be the better student.</p><p>How is that possible? How can Alice outperform Bob in both categories but still end up with a lower overall score?</p><p>This is not a calculation mistake. It is not a data entry error. It is a real statistical phenomenon known as <strong>Simpson’s Paradox</strong> — a paradox that has confused researchers, scientists, economists, and data analysts for decades.</p><p>In this article, we’ll explore why this happens and what it teaches us about interpreting data.</p><h3>Where Did Our Intuition Go Wrong?</h3><p>At first glance, the result seems impossible. Alice scored higher on the easy quizzes. Alice also scored higher on the hard quizzes. How can Bob still end up with a better overall score?</p><p>The answer lies in something we haven’t paid attention to yet: <strong>the number of questions each student answered in each category.</strong> Let’s look again.</p><h3>Alice</h3><ul><li>Easy quizzes: 10 questions</li><li>Hard quizzes: 100 questions</li></ul><p>Most of Alice’s score comes from the hard quizzes.</p><h3>Bob</h3><ul><li>Easy quizzes: 100 questions</li><li>Hard quizzes: 10 questions</li></ul><p>Most of Bob’s score comes from the easy quizzes.</p><p>This changes everything. Although Alice performed better than Bob in both categories, she answered most of her questions in the harder category, where scores are naturally lower. Bob, on the other hand, answered most of his questions in the easier category, where scores are naturally higher.</p><p>As a result, the overall score is heavily influenced by where each student spent most of their attempts. The hidden factor is not intelligence. The hidden factor is <strong>quiz difficulty</strong>. Once we account for that factor, the paradox begins to make sense.</p><h3>Introducing Simpson’s Paradox</h3><p>This phenomenon is known as <strong>Simpson’s Paradox</strong>.</p><blockquote>Simpson’s Paradox occurs when a trend that appears within multiple groups disappears or reverses when those groups are combined.</blockquote><p>In our example:</p><ul><li>Alice performs better on easy quizzes.</li><li>Alice performs better on hard quizzes.</li></ul><p>But after combining both groups:</p><ul><li>Bob appears to perform better overall.</li></ul><p>The conclusion has completely reversed. This reversal is what makes Simpson’s Paradox so surprising. The data itself is not wrong. The calculations are correct. The problem is that combining the groups hides an important piece of information.</p><h3>Why Does Simpson’s Paradox Happen?</h3><p>At this point, you might wonder whether Simpson’s Paradox is just a strange coincidence. It isn’t. There is a reason behind it. The key insight is that not all groups contribute equally to the final result.</p><p>Alice answered:</p><ul><li>10 easy questions</li><li>100 hard questions</li></ul><p>Bob answered:</p><ul><li>100 easy questions</li><li>10 hard questions</li></ul><p>Most of Alice’s score came from the harder category. Most of Bob’s score came from the easier category. In other words, the two students were not being compared under the same mix of conditions. The overall score was not simply averaging performance. It was averaging performance <strong>and</strong> the distribution of questions.</p><p>This is the heart of Simpson’s Paradox.</p><blockquote>The paradox occurs when hidden groups have different sizes or different weights.</blockquote><p>The hidden factor changes how much influence each group has on the final result. In our example, that hidden factor was quiz difficulty. In other situations, it might be:</p><ul><li>Age</li><li>Experience</li><li>Income</li><li>Location</li><li>Weather conditions</li><li>Disease severity</li></ul><p>The names change, but the mechanism remains the same.</p><h3>The Hidden Danger of Averages</h3><p>We often trust averages because they simplify information. Instead of looking at hundreds or thousands of observations, we reduce everything to a single number. Sometimes this is useful. But sometimes important details disappear in the process.</p><p>In <a href="https://medium.com/@zunkhetwai/why-the-average-never-tells-the-whole-story-6b3e6e918d72">a previous article</a>, we learned that averages can hide variability. Two students may have the same average score while having completely different levels of consistency.</p><p>Simpson’s Paradox reveals something even more surprising.</p><blockquote>Sometimes an average doesn’t just hide information — it can reverse the conclusion entirely.</blockquote><p>The overall statistic may suggest one story. The group-level statistics may suggest the opposite story. Neither calculation is wrong.</p><p>The challenge is deciding which story better reflects reality.</p><h3>A Visual Way to Think About It</h3><p>Imagine comparing two runners.</p><ul><li>One runner spends most of the race running uphill.</li><li>The other spends most of the race running downhill.</li></ul><p>Even if the first runner is faster on both uphill and downhill sections, the second runner might still record a better overall time simply because they spent more time on the easier part of the course. The overall result is influenced not only by performance, but also by where that performance occurred.</p><p>Simpson’s Paradox works in exactly the same way. The hidden groups quietly influence the final outcome.</p><h3>Where Researchers Get Tricked</h3><p>Simpson’s Paradox is not merely a classroom curiosity. It appears in real-world research more often than you might expect.</p><p>Imagine a researcher comparing two medical treatments.</p><ul><li>Suppose Treatment A works better than Treatment B among younger patients.</li><li>Suppose Treatment A also works better than Treatment B among older patients.</li></ul><p>Most people would conclude that Treatment A is the better treatment overall. But if younger and older patients are distributed unevenly between the treatments, the combined results may tell a completely different story.</p><p>Similar issues can arise in education, economics, business analytics, and machine learning whenever data from different groups is combined into a single summary statistic.</p><p>This is one reason why researchers often analyze results across multiple groups rather than relying solely on a single aggregate metric.</p><h3>The Real Lesson</h3><p>The next time you encounter a surprising statistic, don’t immediately ask whether the data is wrong. Ask a different question:</p><blockquote>What groups might be hiding underneath this average?</blockquote><p>Sometimes the overall result tells the truth. Sometimes the subgroup results tell the truth. And sometimes the answer only becomes clear after looking at both.</p><p>Simpson’s Paradox reminds us that the story told by the whole is not always the story told by its parts.</p><h3>Conclusion</h3><p>At first, Simpson’s Paradox feels impossible. How can Alice perform better on both easy and hard quizzes, yet still end up with a lower overall score?</p><p>The answer is that the overall result depends not only on performance, but also on how the data is distributed across different groups. When those groups have different sizes or different levels of difficulty, combining them can produce a conclusion that looks very different from the conclusions within each group.</p><p>That is why researchers, analysts, and decision-makers must be careful when interpreting aggregated data. A single number can be useful. But sometimes it hides an important part of the story. The next time you encounter a surprising statistic, don’t immediately trust the overall average. Instead, ask:</p><blockquote>What happens if I look at the groups separately?</blockquote><p>You might discover that the data is telling a completely different story. And that is the lesson of Simpson’s Paradox:</p><blockquote>The story told by the whole is not always the story told by its parts.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a04ae5913620" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why a Coin Toss Contains More Information Than a Sunrise]]></title>
            <link>https://medium.com/@zunkhetwai/why-a-coin-toss-contains-more-information-than-a-sunrise-5b124d360e46?source=rss-a55edb26da81------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b124d360e46</guid>
            <category><![CDATA[entropy]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[information-theory]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Zun Khet Wai]]></dc:creator>
            <pubDate>Fri, 12 Jun 2026 17:26:56 GMT</pubDate>
            <atom:updated>2026-06-12T17:26:56.084Z</atom:updated>
            <content:encoded><![CDATA[<p>Understanding entropy through surprise, probability, and uncertainty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TdbwqvckTWA_P_345qiCtQ.png" /></figure><h3>A Question That Sounds Wrong</h3><p>Which of these events contains more <strong>information</strong>?</p><ul><li>The Sun rises tomorrow morning.</li><li>A fair coin lands Heads.</li></ul><p>Most people would probably choose the sunrise. A sunrise is the result of an entire planet rotating through space. A coin toss is just a small piece of metal flipping through the air. Intuitively, the sunrise seems far more informative.</p><p>Yet <strong>information theory</strong> gives the opposite answer. According to the mathematics that powers modern communication systems, data compression, and artificial intelligence, a fair coin toss contains more information than a sunrise.</p><p>How can that possibly be true?</p><p>To answer that question, we need to rethink what “information” actually means.</p><h3>Why Our Intuition Gets It Wrong</h3><p>The problem is that we often use the word “information” in a very different way from mathematicians. In everyday life, information usually means something important. A scientific breakthrough feels informative. A major news headline feels informative. A life-changing message feels informative. The more significant an event seems, the more information we assume it contains.</p><p>However, information theory takes a different perspective.</p><p>It doesn’t ask:</p><blockquote><em>How important is this event?</em></blockquote><p>Instead, it asks:</p><blockquote><em>How surprising is this event?</em></blockquote><p>That single shift changes everything.</p><ul><li>A lottery win is surprising.</li><li>A coin toss is somewhat surprising.</li><li>A sunrise is not.</li></ul><p>And as we will see, surprise turns out to be the key ingredient behind information itself.</p><h3>What Makes News Informative?</h3><p>Imagine your friend sends you a message tomorrow morning:</p><blockquote><em>The Sun rose today.</em></blockquote><p>How would you react? Probably with:</p><blockquote><em>Well… of course it did.</em></blockquote><p>The message doesn’t feel particularly informative because it tells you something you already expected.</p><p>Now imagine a different message:</p><blockquote><em>I just won the national lottery.</em></blockquote><p>That would get your attention. You would probably ask questions, share the news, or even wonder whether your friend was joking.</p><p>Why do these two messages feel so different? The answer isn’t importance. Both events could be important in different ways. The difference is <strong>expectation</strong>.</p><p>Before reading the first message, you already expected the Sun to rise. Before reading the second, you almost certainly did not expect your friend to win the lottery.</p><p>The second message changes your understanding of the world far more than the first. And that is exactly what information theory is trying to measure.</p><h3>Where Does Surprise Come From?</h3><p>Let’s look at three events:</p><p><strong>Event 1</strong></p><blockquote><em>The Sun rises tomorrow.</em></blockquote><p><strong>Event 2</strong></p><blockquote><em>A fair coin lands Heads.</em></blockquote><p><strong>Event 3</strong></p><blockquote><em>You win the national lottery.</em></blockquote><p>Most people would agree that these events are not equally surprising.</p><ul><li>A sunrise is hardly surprising at all.</li><li>A coin toss is somewhat surprising because either Heads or Tails could appear.</li><li>A lottery win would be astonishing.</li></ul><p>So what makes them feel different? The answer is <strong>probability</strong>. The sunrise feels unsurprising because we expect it to happen. A fair coin toss feels more surprising because there are two equally possible outcomes. A lottery win feels extraordinary because it is extremely unlikely.</p><p>In other words, surprise is closely tied to probability. The less likely an event is, the more surprising it becomes when it occurs. And this idea leads to a fascinating question:</p><p>Can surprise be measured mathematically?</p><h3>Measuring Surprise</h3><p>In the 1940s, mathematician Claude Shannon faced a remarkable challenge. If surprise is so important, can we actually measure it? To answer that question, let’s think about a fair coin.</p><p>Before the coin lands, there are two possible outcomes:</p><ul><li>Head</li><li>Tail</li></ul><p>When the result is revealed, one uncertainty disappears. We learn something we did not know before.</p><p>Now imagine a coin that lands Heads 99% of the time. If it lands Heads again, would you be surprised? Probably not. You already expected that outcome. On the other hand, if the coin lands Tails, you would be much more surprised because that outcome was unlikely.</p><p>This observation led Shannon to a simple idea:</p><blockquote>The less likely an event is, the more information it provides when it occurs.</blockquote><p>To turn that intuition into mathematics, he defined a quantity called <strong>self-information</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L2_XJoDbiTvtD47-4op0Uw.png" /></figure><p>The equation may look intimidating, but its behavior is simple. As probability decreases, information increases. As probability increases, information decreases.</p><p>In other words:</p><p><em>Rare events teach us more than predictable ones.</em></p><h3>From Information to Entropy</h3><p>So far, we have been talking about individual events.</p><ul><li>A sunrise.</li><li>A coin toss.</li><li>A lottery win.</li></ul><p>For each event, we can measure how much information it provides when it occurs. But Shannon wanted to answer a bigger question:</p><p><em>How much uncertainty exists before an event happens?</em></p><p>To see the difference, imagine two coins.</p><h4>Coin A: A perfectly fair coin.</h4><ul><li>Heads: 50%</li><li>Tails: 50%</li></ul><p>Before the toss, you genuinely do not know what will happen. Either outcome seems equally possible.</p><h4>Coin B: A heavily biased coin.</h4><ul><li>Heads: 99%</li><li>Tails: 1%</li></ul><p>Before the toss, you already have a very good idea of what the outcome will be. Most of the uncertainty is gone before the coin is even flipped.</p><p>Even though both coins have the same possible outcomes, they do not feel equally unpredictable.</p><ul><li>Coin A feels uncertain.</li><li>Coin B feels predictable.</li></ul><p>This difference is exactly what <strong>entropy</strong> measures.</p><blockquote><strong>Entropy </strong>tells us how much uncertainty exists before reality reveals the answer.</blockquote><p>The more uncertainty there is, the higher the entropy. The less uncertainty there is, the lower the entropy.</p><ul><li>A fair coin has high entropy because both outcomes remain plausible.</li><li>A heavily biased coin has low entropy because one outcome dominates the other.</li><li>And a completely certain event has zero entropy because there is nothing left to discover.</li></ul><p>In other words:</p><blockquote><strong>Entropy </strong>is the average amount of surprise we expect before an outcome is revealed.</blockquote><h3>Shannon’s Entropy Equation</h3><p>Claude Shannon took the idea of surprise and turned it into a mathematical measure of uncertainty:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_peqIW_4_QwI5PNvMBIYWQ.png" /></figure><p>At first glance, the equation looks intimidating. Fortunately, we already understand the intuition behind it. Each possible outcome has:</p><ul><li>A probability, which tells us how likely it is.</li><li>An information value, which tells us how surprising it would be if that outcome occurred.</li></ul><p>Entropy combines these possibilities into a single number that measures the system’s overall uncertainty before the outcome is revealed.</p><p>Let’s revisit our coin examples.</p><h4>Fair Coin</h4><ul><li>Heads: 50%</li><li>Tails: 50%</li></ul><p>Before the toss, neither outcome is favored. The result could reasonably be either Heads or Tails. Because the uncertainty is as high as it can be for a coin toss, the entropy is:</p><p><strong>1 bit</strong></p><h4>Biased Coin</h4><ul><li>Heads: 99%</li><li>Tails: 1%</li></ul><p>Before the toss, we already have a strong expectation that the outcome will be Heads. There is still some uncertainty, but much less than before. As a result, the entropy is much lower. The exact number is not important.</p><p>What matters is the pattern:</p><ul><li>Balanced probabilities lead to higher entropy.</li><li>Uneven probabilities lead to lower entropy.</li><li>Complete certainty leads to zero entropy.</li></ul><p>In other words, entropy grows when multiple outcomes remain plausible and shrinks when one outcome becomes predictable. The equation simply gives us a way to measure that uncertainty precisely.</p><h3>The Coin Toss vs Sunrise Revisited</h3><p>Let’s return to the question that started this article.</p><p>Which contains more information?</p><ul><li>Tomorrow’s sunrise</li><li>A fair coin toss</li></ul><p>At first, the sunrise seems like the obvious answer. It is a planetary-scale event that has shaped life on Earth for billions of years. A coin toss, by comparison, feels insignificant.</p><p>But information theory is not concerned with importance. It is concerned with uncertainty. Before tomorrow’s sunrise, there is very little uncertainty about what will happen. We already expect the Sun to appear above the horizon. The event is highly predictable. A fair coin toss is different. Before the coin lands, there are two equally plausible outcomes. We genuinely do not know which one reality will choose. When the result is revealed, more uncertainty disappears. And because more uncertainty disappears, more information is gained. That is why a fair coin toss contains more information than a sunrise. Not because it is more meaningful. Not because it is more important. But because it is less predictable.</p><h3>Why AI Cares About Entropy</h3><p>At this point, entropy may sound like an abstract mathematical concept. In reality, modern AI systems use it all the time. Imagine an image classification model that is trying to determine whether a photo contains a cat or a dog.</p><h4><strong>Scenario 1</strong></h4><p>The model predicts:</p><ul><li>Cat: 50%</li><li>Dog: 50%</li></ul><p>The model is highly uncertain. Both outcomes seem equally plausible. This prediction has high entropy.</p><h4>Scenario 2</h4><p>The model predicts:</p><ul><li>Cat: 99%</li><li>Dog: 1%</li></ul><p>The model is highly confident. One outcome clearly dominates the other. This prediction has low entropy.</p><p>Notice how similar this is to our coin examples.</p><p>A 50–50 prediction resembles a fair coin. A 99–1 prediction resembles a heavily biased coin. In both cases, entropy measures how uncertain the system is before a final decision is made.</p><p>This idea appears throughout artificial intelligence. Machine learning models use entropy to measure uncertainty in their predictions. Decision trees use entropy to determine which questions best separate data. Language models assign probabilities to possible next words and continuously manage uncertainty as they generate text.</p><p>Although the applications differ, the underlying idea remains the same:</p><blockquote><strong>Entropy </strong>measures how many plausible possibilities remain before an answer is revealed.</blockquote><h3>Final Thought</h3><p>A sunrise may be more beautiful than a coin toss. It may be more meaningful. It may even change the course of someone’s day. But information theory is not about beauty, meaning, or importance. It is about uncertainty. The sunrise tells us what we already expected. The coin toss reveals something we genuinely did not know. And that simple idea gave rise to one of the most influential concepts in mathematics, computer science, and artificial intelligence:</p><p><strong>Entropy — the measure of uncertainty before reality reveals the answer.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b124d360e46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why the Average Never Tells the Whole Story]]></title>
            <link>https://medium.com/@zunkhetwai/why-the-average-never-tells-the-whole-story-6b3e6e918d72?source=rss-a55edb26da81------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b3e6e918d72</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Zun Khet Wai]]></dc:creator>
            <pubDate>Tue, 09 Jun 2026 13:40:44 GMT</pubDate>
            <atom:updated>2026-06-09T13:40:44.439Z</atom:updated>
            <content:encoded><![CDATA[<p>Building intuition for expectation, variance, and covariance through a simple student story.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_SqA5Cuu6LGrzKqcgHmcig.png" /></figure><h3>Opening Story</h3><p>Imagine you’re selecting a teammate for an important group project. Two students have volunteered to join your team, but there is only one spot available. To help make your decision, you look at their scores from the past four practice exams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y2ESWk1IPkQlmDIyB1Vw6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fnZbls0x8sHJ2Rq5xFN61g.png" /></figure><p><em>Figure 1. The performance patterns of the two students across four practice exams.</em></p><p>Without calculating any statistics, which student would you choose?</p><p>Many people instinctively choose Student A. Others might choose Student B because of the higher peak scores. Now let’s calculate the average score.</p><p>Student A’s average score: 90</p><p>Student B’s average score: 90</p><p><strong>Same average. Different story.</strong></p><p>This is where things become interesting.</p><p>If the average score is exactly the same, why do these students feel so different? What’s fascinating is that most people’s decisions are based on information that isn’t captured by the average alone. The average tells us something important, but it doesn’t tell us the whole story.</p><p>To understand why, we need to explore three fundamental ideas that appear throughout statistics, machine learning, and data science:</p><p><strong>Expectation</strong>, <strong>Variance</strong>, and <strong>Covariance</strong>.</p><h3>Why the Average Is Not Enough</h3><p>If we focus only on the average score, the two students appear identical.</p><p>Student A has an average score of 90.</p><p>Student B also has an average score of 90.</p><p>Based on this information alone, it would be reasonable to conclude that they perform equally well.</p><p>Yet most people hesitate to stop there. Why?</p><p>Let’s look at the scores again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y2ESWk1IPkQlmDIyB1Vw6w.png" /></figure><p>Student A is remarkably consistent. No matter which exam we look at, the score stays close to 90. Student B tells a different story. Some exams are excellent, while others are much lower. Even though both students have the same average score, they do not behave in the same way.</p><p>This reveals an important lesson:</p><p><strong>The average describes the center of the data, but it does not describe the whole picture.</strong></p><p>Whenever we analyze data, we usually want answers to at least three questions:</p><ol><li>What outcome should we typically expect?</li><li>How much does that outcome fluctuate?</li><li>What factors influence that outcome?</li></ol><p>These three questions lead us directly to three fundamental concepts in statistics:</p><ul><li>Expectation</li><li>Variance</li><li>Covariance</li></ul><p>Let’s begin with the first question:</p><p><strong>What should we expect?</strong></p><h3>Expectation: What Should We Expect?</h3><p>Suppose a friend asks:</p><blockquote>“If Student A takes another exam next week, what score would you expect?”</blockquote><p>Most people would answer:</p><blockquote>“Probably around 90.”</blockquote><p>Now imagine the same question for Student B. The answer is surprisingly similar.</p><blockquote>“Probably around 90.”</blockquote><p>Even though the two students behave differently, our best guess for the next score is still centered around 90. This idea lies at the heart of <strong>Expectation</strong>. Expectation is simply a way of answering the question:</p><blockquote><em>What outcome should we typically expect?</em></blockquote><p>It represents the long-term average of a variable. For our two students:</p><ul><li>Expected score of Student A ≈ 90</li><li>Expected score of Student B ≈ 90</li></ul><p>Expectation helps us summarize the central tendency of the data with a single number. That’s why averages are so popular. They provide a quick answer to the question:</p><blockquote>“What’s typical?”</blockquote><p>But as we already noticed, something is missing. If expectation tells the whole story, then Student A and Student B should feel identical. Clearly they don’t.</p><p>One student is remarkably predictable. The other is much less predictable. To understand that difference, we need another concept.</p><h3>Variance: How Much Does It Fluctuate?</h3><p>Let’s look at the scores one more time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y2ESWk1IPkQlmDIyB1Vw6w.png" /></figure><p>Both students have the same expectation: 90. Yet most people would not describe them in the same way.</p><blockquote>Student A appears reliable.</blockquote><blockquote>Student B appears unpredictable.</blockquote><p>Why?</p><p>The answer lies in how far their scores tend to move away from the expectation.</p><p>Student A stays very close to 90:</p><ul><li>89</li><li>90</li><li>91</li><li>90</li></ul><p>Student B swings much more dramatically:</p><ul><li>70</li><li>100</li><li>90</li><li>100</li></ul><p>Even though both students average 90, Student B’s performance varies much more from exam to exam.</p><p>This idea is captured by <strong>Variance</strong>. Variance measures how much values tend to spread out around their expectation. In simple terms:</p><blockquote><em>Expectation tells us what is typical.</em></blockquote><blockquote><em>Variance tells us how much reality deviates from that typical value.</em></blockquote><p>A low variance means outcomes stay close to what we expect. A high variance means outcomes can be very different from what we expect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tyYfaJ8PeEzdf2YImX-uwA.png" /></figure><p><em>Figure 2. Student A’s scores stay close to the expectation, while Student B’s scores spread much farther away.</em></p><p>You can think of variance as a measure of predictability. For example, imagine two relationships.</p><p>In the first, every week is calm, supportive, and drama-free.</p><p>In the second, one week you’re discussing future plans together, and the next week you’re wondering whether you’ve been ghosted.</p><p>Even if the average happiness somehow turns out to be the same, most people would agree that these relationships feel very different.</p><p>That’s variance.</p><p>This concept appears everywhere in daily life. The same principle applies to investments, business revenue, weather forecasts, and machine learning models.</p><p>When we say something is “stable” or “consistent,” we are often talking about low variance.</p><p>When we say something is “risky” or “unpredictable,” we are often talking about high variance.</p><p>Variance answers our second question:</p><blockquote><em>How much does the outcome fluctuate?</em></blockquote><h3>Covariance: What Moves Together?</h3><p>So far, we’ve focused on a single variable: exam scores. Expectation helped us understand what score we should typically expect. Variance helped us understand how much those scores fluctuate.</p><p>But in the real world, outcomes rarely exist in isolation. A student’s score may depend on many factors:</p><ul><li>Study hours</li><li>Sleep quality</li><li>Class attendance</li><li>Stress level</li></ul><p>Let’s focus on study hours.</p><p>Imagine we observe the following pattern:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qrnXLu4just3lds0dEQNoQ.png" /></figure><p><em>Figure 3. As study hours increase, exam scores tend to increase as well. The two variables move together.</em></p><p>Most people would not be surprised by this pattern. As study hours increase, exam scores also increase. Most people would not be surprised by this relationship. In fact, we naturally expect these two variables to move together.</p><p>This idea lies at the heart of <strong>Covariance</strong>. Covariance helps us answer the question:</p><blockquote><em>When one variable changes, what tends to happen to another?</em></blockquote><p>If two variables tend to increase together, their covariance is positive. If one tends to increase while the other decreases, their covariance is negative.</p><p>For example:</p><ul><li>Study hours and exam scores often move together.</li><li>Cloud coverage and sunshine often move in opposite directions.</li><li>Temperature and ice cream sales often move together.</li></ul><p>Covariance doesn’t tell us why a relationship exists. It simply tells us whether two variables tend to move together. This makes covariance incredibly useful whenever we want to understand relationships hidden within data.</p><p>Another example comes from a familiar student experience. For many students, coffee consumption and assignment deadlines seem to move together. As deadlines approach, coffee intake mysteriously increases. Whether the coffee actually improves productivity is a separate question, but the two variables certainly appear to move together.</p><h3>Why This Matters in AI and Data Science</h3><p>At this point, you might be wondering:</p><blockquote><em>“These examples make sense, but what do they have to do with AI and data science?”</em></blockquote><p>As it turns out, these three ideas appear almost everywhere. When evaluating a machine learning model, data scientists ask the same three questions:</p><ol><li>What performance should we expect?</li><li>How much does performance vary?</li><li>Which features are related to the prediction?</li></ol><p>A model that achieves an average accuracy of 90% may seem impressive at first glance. But just as we learned from our two students, the average doesn’t tell the whole story. We also care about consistency.</p><p>Does the model perform similarly across different datasets?</p><p>Does it remain reliable when the data changes slightly?</p><p>These questions are closely related to the idea of variance. A model with high variance may perform extremely well in some situations and poorly in others. Understanding variance helps us think about reliability, uncertainty, and risk.</p><p>Covariance appears whenever we want to understand relationships within data.</p><p>For example:</p><ul><li>Do study hours relate to exam scores?</li><li>Does temperature affect electricity consumption?</li><li>Does cloud coverage influence solar power generation?</li><li>Does a particular feature help predict a target variable?</li></ul><p>Data scientists spend much of their time exploring these kinds of relationships.</p><p>In many ways, expectation, variance, and covariance are not just statistical concepts. They are different ways of asking questions about data:</p><ul><li>What should we expect?</li><li>How uncertain is it?</li><li>What factors are related?</li></ul><p>Whether you’re analyzing student performance, building a machine learning model, forecasting the weather, or conducting research, these questions appear again and again.</p><h3>Final Thoughts</h3><p>Let’s return to our two students. At the beginning of this article, we saw two students with exactly the same average score. At first glance, they appeared equally strong. But after looking more closely, we discovered that the average was only part of the story.</p><p>Expectation helped us understand what score we should typically expect.</p><p>Variance helped us understand how much the scores fluctuated.</p><p>Covariance helped us understand how scores might relate to other factors, such as study hours.</p><p>Together, these three concepts reveal something important:</p><blockquote><em>Data is not just about what happens.</em></blockquote><blockquote><em>It’s also about how consistently it happens and what influences it.</em></blockquote><p>This idea extends far beyond exam scores.</p><p>Whether we’re evaluating a machine learning model, forecasting tomorrow’s weather, analyzing business performance, or conducting scientific research, we often ask the same three questions:</p><ol><li>What should we expect?</li><li>How much uncertainty is there?</li><li>What variables move together?</li></ol><p>Expectation, variance, and covariance provide a way to answer those questions.</p><p>The next time you see a single average reported in a study, article, or dashboard, pause for a moment and ask:</p><blockquote><em>Is there more to the story?</em></blockquote><p>And if someone tells you that two things have the same average, don’t be too quick to conclude that they are the same. As our two students demonstrated, identical averages can hide very different stories.</p><p>More often than not, there is.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b3e6e918d72" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>