Revisiting Single Event Probability

Introduction

Welcome to Sharpening Probability Basics! This is the very first lesson of the course, so you are right at the starting line. Over the coming lessons we will build a strong foundation in probability, one concept at a time, so that every new idea has a solid base to stand on.

In this lesson, we revisit the core idea behind single-event probability: measuring how likely something is to happen by comparing favorable outcomes to total outcomes. Even if this sounds familiar, taking the time to sharpen this skill now will pay off in every topic that follows. Let's get started.

What Does Probability Really Measure?

The Sample Space and Favorable Outcomes

Before we calculate anything, we need two pieces of information:

  • Sample space: the complete set of equally likely outcomes. In the coffee-pod example, the sample space contains all 10 pods.
  • Favorable outcomes: the outcomes that match the event we care about. If we want a decaf pod, the favorable outcomes are the 3 decaf pods.

The phrase equally likely is important. Each pod has the same chance of being grabbed because we are choosing at random. When outcomes are equally likely, counting them is all we need.

Jar of 10 coffee pods showing 7 regular and 3 decaf as an example of sample space and favorable outcomes

The Probability Formula

Expressing the Result Three Ways

A Worked Example: Raffle Tickets

Common Mistakes to Watch For

Even with a straightforward formula, a few errors come up often. Keeping these pitfalls in mind will help you set up every problem correctly from the start.

  • Swapping the counts. Placing the total in the numerator and the favorable count in the denominator flips the meaning entirely. Always remember: favorable on top, total on the bottom.
  • Missing part of the sample space. If a bowl holds red, blue, and green marbles, forgetting to include the green ones in the total will throw off the calculation.
  • Confusing "favorable" with "unfavorable." If someone asks for the probability of drawing a red marble, only the red marbles count as favorable, not every marble that is not red.

Conclusion and Next Steps

Sign up

Join the 1M+ learners on CodeSignal

Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal