In the previous chapter, we looked at ways to describe and summarize data we already have. Now, we shift our focus to dealing with uncertainty. Many situations in machine learning, like predicting future outcomes or understanding model behavior, involve processes where the result isn't known in advance. Probability provides the tools to think about and quantify this uncertainty. Let's start with the basic building blocks.
In probability, an experiment (or trial) refers to any process or action that has an observable result, but where the specific result cannot be predicted with certainty beforehand. Think of it as a procedure that can be repeated and has a well-defined set of possible results.
Some simple examples include:
Each potential result of an experiment is called an outcome.
Outcomes are the most basic, individual results we can observe from an experiment.
While knowing the possible outcomes is useful, we often need a complete picture of all possibilities. The sample space of an experiment is the set of all possible distinct outcomes. It represents the entire universe of what could happen in a single trial of the experiment. We usually denote the sample space with the capital letter S.
Let's define the sample spaces for our examples:
The sample space must be exhaustive, meaning it includes every possible outcome. It must also consist of outcomes that are mutually exclusive, meaning that only one outcome can occur in a single trial of the experiment (e.g., a single coin flip cannot be both Heads and Tails). Defining the sample space correctly is a fundamental first step in solving any probability problem.
Often, we are interested not just in a single outcome, but in a specific collection or subset of outcomes. An event is any subset of the sample space. It represents a particular result or group of results that we might care about. Events are usually denoted by capital letters like A, B, E, etc.
Consider rolling a standard six-sided die, where the sample space is S={1,2,3,4,5,6}. Here are some possible events:
Understanding these terms is essential:
In machine learning, we often deal with data points. You can think of observing a single data point (like a customer's purchase amount or whether an email is spam) as an outcome of an experiment. The sample space represents all possible observations, and an event might correspond to observing a data point with specific characteristics (e.g., purchase amount over $100, or email classified as spam).
With these foundational concepts of sample spaces and events defined, we can now move on to actually calculating the probabilities associated with these events.
© 2025 ApX Machine Learning