Probability Basics

The foundations of probability for data science: defining events, the addition and multiplication rules, conditional probability, independence and Bayes.

7 free lessons available

Start here

Defining Probability & Events

A product manager is presenting a new feature launch to key stakeholders. Their market research team has estimated a "70% chance of user adoption" within the first month. This figure is crucial for setting expectations and planning resources.

However, the CEO, a seasoned veteran, raises an eyebrow, asking, "What exactly does 70% mean for our bottom line? And how did we arrive at that specific number?" The manager realizes that "chance" isn't just a vague feeling or a hopeful guess; it needs to be a precise, quantifiable measure to inform critical business decisions. Understanding the fundamentals of probability allows us to precisely define, measure, and interpret these "chances" in any scenario, moving beyond intuition to data-driven insights.

Quantifying the Unknown: What is Probability?

In our daily lives and professional roles, we constantly encounter situations where outcomes are uncertain. From predicting market trends to assessing project risks, we need a way to measure how likely something is to happen. This is where probability comes in.

Probability provides a numerical measure of the likelihood of an event occurring. It allows us to express uncertainty in a standardized, objective way, moving beyond subjective guesses. By assigning a value, we can compare different potential outcomes and make more informed decisions, much like the product manager needs to do.

Probability
A numerical measure of the likelihood that an event will occur. It is expressed as a number between 0 and 1, inclusive.
Example: The probability of flipping a fair coin and getting heads is 0.5 (or 50%), meaning it is equally likely to land on heads or tails.

Deconstructing Uncertainty: Outcomes and Sample Spaces

Before we can calculate probabilities, we need to clearly define what can possibly happen in a given situation. Every probabilistic experiment or observation has a set of potential results. Each of these individual results is a fundamental building block of probability.

Understanding these basic components allows us to systematically analyze any scenario, no matter how complex. By breaking down the possibilities, we can then begin to quantify the likelihood of specific occurrences.

Outcome
A single possible result of a probability experiment or observation.
Example: When rolling a standard six-sided die, rolling a '3' is a single outcome.
Sample Space
The set of all possible outcomes of a probability experiment. It is typically denoted by SS.
Example: For rolling a standard six-sided die, the sample space is S={1,2,3,4,5,6}S = \{1, 2, 3, 4, 5, 6\}.
Sample Space for Rolling a Six-Sided Die
Loading diagram...
This diagram illustrates the sample space $S$ for rolling a standard die, showing each individual outcome as a distinct possibility.
Check Your Understanding
When flipping two distinct coins (e.g., a penny and a nickel), what is the sample space?

Focusing on What Matters: Defining Events

While the sample space lists all possible outcomes, we are often interested in a specific collection of these outcomes. For instance, a product manager might not care about every single user's adoption journey, but rather the overall percentage of users who adopt the feature.

This specific collection of outcomes that we are interested in is called an event. An event allows us to group relevant outcomes together to answer a particular question within a probabilistic context. It's a subset of the larger sample space.

Event
A subset of the sample space; a collection of one or more outcomes.
Example: When rolling a standard six-sided die, the event 'rolling an even number' corresponds to the set of outcomes E={2,4,6}E = \{2, 4, 6\}.
Event as a Subset of the Sample Space
Loading diagram...
This diagram shows the sample space for a die roll, with the event 'rolling an even number' highlighted as a subset containing outcomes 2, 4, and 6.
Check Your Understanding
For the experiment of rolling a standard six-sided die, which of the following sets of outcomes represents the event 'rolling a number greater than 4'?

Calculating the Odds: The Classical Approach

With a clear understanding of outcomes, sample spaces, and events, we can now move to calculating probabilities. The classical approach is one of the most straightforward methods for determining the likelihood of an event. It's particularly useful for experiments where all outcomes are equally likely.

This approach is foundational and applies to many common scenarios, such as rolling dice, flipping coins, or drawing cards from a well-shuffled deck. It provides a simple, intuitive way to quantify the chances of a specific event occurring.

📐 Classical Probability Formula

The probability of an event AA, denoted P(A)P(A), is calculated as:

P(A)=Number of favorable outcomes for ATotal number of outcomes in the sample spaceP(A) = \frac{\text{Number of favorable outcomes for A}}{\text{Total number of outcomes in the sample space}}

Let's apply the classical probability formula to our die roll example. Suppose we want to find the probability of the event EE, "rolling an even number" on a standard six-sided die. First, we identify the total number of outcomes in the sample space S={1,2,3,4,5,6}S = \{1, 2, 3, 4, 5, 6\}, which is 6.

Next, we identify the number of favorable outcomes for event E={2,4,6}E = \{2, 4, 6\}, which is 3. Using the formula, P(E)=36=0.5P(E) = \frac{3}{6} = 0.5. This means there is a 50% chance of rolling an even number, assuming the die is fair and each outcome is equally likely.

Try It Yourself
What is the probability of drawing a red card from a standard, well-shuffled deck of 52 playing cards?
python
Key Takeaways
  • Probability quantifies uncertainty, providing a numerical measure (0 to 1) of an event's likelihood.

  • An Outcome is a single, distinct result of a probabilistic experiment.

  • The Sample Space (SS) is the complete set of all possible outcomes for an experiment.

  • An Event is a specific collection of one or more outcomes, forming a subset of the sample space.

  • The Classical Approach calculates probability by dividing the number of favorable outcomes for an event by the total number of equally likely outcomes in the sample space.

  • Precisely defining outcomes, sample spaces, and events is crucial before calculating probabilities.

  • These foundational concepts allow us to move beyond vague 'chances' to provide concrete, defensible numbers, helping the product manager answer the CEO's critical questions with data.

Try it yourself

Law of Large Numbers

Flip a coin thousands of times and watch the running proportion get reeled in. Chance doesn't correct itself — it gets outvoted by volume.

Open the lab

Open this lesson on its own page →

Ready to keep this from fading?

Bitelrn turns lessons like this into a full course — quizzes, a knowledge map, and spaced review.

Get started free