Track 4 · Probability · Lesson 1 of 9

Sample spaces and events

Describe a random experiment by its sample space and events, and compute probabilities by counting equally likely outcomes or from long-run relative frequencies.

25 minFoundation8 graded exercisesFree

A quality engineer inspects three parts from a batch, an insurer wonders whether a policy will produce a claim this year, a shop wants to know how likely a visitor is to buy. Before anyone can attach a number to “how likely”, they must be precise about what could happen — and that is exactly what a sample space does.

Probability starts with a random experiment: any process whose result is uncertain before it happens — rolling a die, inspecting a part, waiting to see whether a customer renews.

  • An outcome is one possible, fully specified result (the die shows 4).
  • The sample space SS is the list of all possible outcomes, with nothing missing and nothing listed twice.
  • An event is a set of outcomes we care about (the die shows an even number: {2,4,6}\{2, 4, 6\}). An event happens when the outcome is one of its members.

Worked example

Inspecting three parts

An inspector checks three parts from a production line in order and records each as pass (P) or fail (F). Write down the sample space and the event “exactly one part fails”.

  1. Each part has 2 possible results and there are 3 parts, so there are 2×2×2=82 \times 2 \times 2 = 8 outcomes. Write them as sequences: PPP, PPF, PFP, FPP, PFF, FPF, FFP, FFF.

  2. The event “exactly one fails” collects every sequence with one F: {PPF,PFP,FPP}\{\text{PPF}, \text{PFP}, \text{FPP}\} — three outcomes.

  3. Note what is not the sample space: “0, 1, 2 or 3 failures” is a valid list of results too, but it is coarser. It hides which part failed — and, as we will see, its four results are not equally likely.

SS has 8 outcomes; “exactly one fails” = {PPF, PFP, FPP}.

A probability P(A)P(A) is a number between 0 and 1 attached to each event, with P(S)=1P(S) = 1 (something in the sample space must happen). There are two everyday ways to get the number.

1. Equally likely outcomes. When the experiment is built so that no outcome is favoured — a fair die, a well-shuffled deck, a part chosen at random from a batch — every outcome has the same probability and probability becomes counting:

P(A)=number of outcomes in Anumber of outcomes in S=∣A∣∣S∣P(A) = \frac{\text{number of outcomes in } A}{\text{number of outcomes in } S} = \frac{|A|}{|S|}
Classical probability — valid ONLY when every outcome in S is equally likely
∣A∣|A|
the number of outcomes in the event AA
∣S∣|S|
the number of outcomes in the sample space

2. Long-run relative frequency. For most real questions — will a customer buy? will a policy claim? — nothing guarantees equal likelihood. Instead we observe many repetitions and use the proportion of times the event happened:

P(A)≈number of times A occurrednumber of trials.P(A) \approx \frac{\text{number of times } A \text{ occurred}}{\text{number of trials}}.

The observed proportion wobbles from sample to sample, but with more and more trials it settles down near the true probability. That settling is what a probability means in this view: the proportion of times the event would happen in a very long run of repetitions.

Worked example

The sum of two dice

Roll a red die and a blue die. What is the probability that the sum is 7? Is it the same as the probability that the sum is 2?

  1. List outcomes as ordered pairs (red, blue). There are 6×6=366 \times 6 = 36, all equally likely for fair dice.

  2. Sum 7 comes from (1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1): six outcomes, so P(sum=7)=6/36=1/6P(\text{sum} = 7) = 6/36 = 1/6.

  3. Sum 2 needs (1, 1) only: P(sum=2)=1/36P(\text{sum} = 2) = 1/36.

  4. The eleven possible sums 2, 3, …, 12 are therefore not equally likely, even though the 36 pairs are. Choosing the right sample space is what makes counting work.

P(7)=6/36=1/6P(7) = 6/36 = 1/6, six times more likely than P(2)=1/36P(2) = 1/36.

Loading the interactive…
Simulate rolling two dice and compare the observed frequency of each sum (bars) with the theoretical probabilities from counting the 36 pairs.

Try this

  • With 100 rolls, look at the bar for a sum of 7. How far is its observed proportion from the theoretical 1/6 ≈ 0.167?

  • Increase the number of trials to 1 000 and then 10 000. Do the bars line up more closely with the theoretical values? Which sums still show the biggest relative gaps?

  • Press “Run again” a few times at 100 trials. The observed frequencies change every time — the theoretical probabilities never do.

Dataset

Streaming subscriptions and churn

2,000 rows · one row = one customer · synthetic data

CustomerPlanBilling cycleChurned
C0001StandardMonthly1
C0002PremiumMonthly1
C0003BasicMonthly1
C0004BasicMonthly1
C0005StandardMonthly1

Each row is one customer of a (synthetic) streaming service. Picking a customer at random is a random experiment whose sample space is the 2 000 customers.

When we pick one customer at random from a list, each customer is an equally likely outcome, so the probability of an event equals its proportion in the list. In this synthetic dataset 359 of the 2,000 customers are on the Premium plan, so a randomly chosen customer is Premium with probability 359/2000=0.1795359/2000 = 0.1795. The two views meet: a relative frequency in the data is a probability for a random draw from those data — and an estimate of the probability for a future customer, who was not in the list.

Quick check

A weather service says “the probability of rain tomorrow is 0.3”. Which reading matches the relative-frequency view?

Exercises

The lesson is complete when every exercise is answered correctly. Hints are free; viewing a worked solution before solving means the exercise won't count towards mastery.

0 of 8 exercises correct (not saved — sign in to keep your progress)

Exercise 1 · Guided, difficulty 1 of 3

A sum of two dice

Not started

Two fair dice, one red and one blue, are rolled. What is the probability that the sum is 5? Give the answer as a fraction (for example 5/36) or a decimal to 4 places.

Exercise 2 · Practice, difficulty 1 of 3

How big is the sample space?

Not started

A quality inspector checks 5 circuit boards in sequence and records each one as pass or fail. An outcome is the full sequence of results (for example, the first one fails and the rest pass). How many outcomes are in the sample space?

Exercise 3 · Practice, difficulty 2 of 3

Is equally likely justified?

Not started

For each situation, decide whether treating the listed outcomes as equally likely is justified, or whether the probabilities must come from data or a model.

The suit of a card drawn from a well-shuffled 52-card deck (♠, ♥, ♦, ♣)
Whether a website visitor buys something (buys / does not buy)
Which of 40 employees is picked when a name is drawn at random for a survey
The number of claims a motor policy makes in a year (0, 1, 2, 3 or more)
The sum of two fair dice (2, 3, …, 12)
The face of a fair die after one roll (1 to 6)

Exercise 4 · Interpretation, difficulty 1 of 3

What does 1/6 promise?

Not started

A fair die shows a six with probability 1/6. Which statement is correct?

Choose one

Exercise 5 · Application, difficulty 1 of 3

A customer picked at random

Not started

In the subscriptions dataset (2 000 customers), one customer is chosen at random. Find the probability that the customer is on the Basic plan, and the probability that they are on the Standard plan. Give each to 4 decimal places.

Data: subscriptions · Open in the lab to explore and calculate.

Exercise 6 · Practice, difficulty 1 of 3

One card from a deck

Not started

One card is drawn from a well-shuffled standard deck of 52 cards (4 suits of 13 ranks: A, 2–10, J, Q, K). Find each probability as a fraction or a decimal to 4 places.

Exercise 7 · Challenge, difficulty 2 of 3

Dice that differ

Not started

In a board game you roll two fair dice and move forward by the difference between them (larger minus smaller). What is the probability of moving exactly 1 squares? Give a fraction or a decimal to 4 places.

Exercise 8 · Interpretation, difficulty 2 of 3

“Buy or not: fifty–fifty”

Not started

A new marketing intern writes: “Each visitor to our shop page either buys or doesn't, so the probability that a visitor buys is 1/2.” In two or three sentences, explain what is wrong with this reasoning and how the probability should be found.

0 words

What you can now do

  • Write the sample space of a random experiment and describe events as sets of outcomes
  • Compute probabilities by counting when — and only when — outcomes are equally likely
  • Estimate probabilities as long-run relative frequencies from data or simulation
  • Explain why observed frequencies vary but settle near the theoretical probability