Guozhen AIGlobal AI field notes and model intelligence

English translation

Define the sample space

Published:

Category: Probability Theory for Beginners

Read time: 4 min

Reads: 0

Lesson #2Views are counted together with the original Chinese articleImages are preserved from the source page

Concept Diagram: Events and Sample Space

The sample space comprises all possible outcomes of an experiment; an event is a subset of that space. For many probability problems, the main difficulty lies not in computation—but in precisely defining the boundaries of the event.

Event and Sample Space Verification Chart

I write events as sets, then determine whether they correspond to unions, intersections, or complements. Word problems are first translated into set relationships.

Having established the definition of probability, we now turn to two foundational concepts in probability theory: events and the sample space. This section builds your conceptual understanding—essential groundwork for mastering conditional probability and independence.

1. Sample Space

The sample space is a core concept in probability theory: it is the set of all possible outcomes of a single trial or experiment. It is conventionally denoted by the symbol SS.

Event and Sample Space Checklist

When learning about events and sample spaces, always begin by explicitly listing all possible outcomes, then clearly identify the specific event(s) of interest. Cultivating this habit directly strengthens your later understanding of probability distributions, conditional probability, and model confidence.

Example

Consider a simple experiment: rolling a fair six-sided die. The sample space for this experiment is:

S={1,2,3,4,5,6}S = \{1, 2, 3, 4, 5, 6\}

Each element represents one distinct possible outcome.

Other Examples

  • Coin toss: For a single fair coin toss, the sample space is S={Heads,Tails}S = \{\text{Heads}, \text{Tails}\}.
  • Drawing a card: When drawing one card at random from a standard 52-card deck, the sample space SS consists of all 52 cards. (Note: The original text mistakenly says “51 cards”; this has been corrected to 52.)

2. Events

An event is a subset of the sample space. We interpret an event as a collection of outcomes we care about—or wish to analyze. Events are typically denoted by letters such as AA, BB, etc.

Core Probability Concept Flowchart

After reading “Foundational Concepts of Probability: Events and Sample Space”, reflect on three questions:
(1) What problem does this concept solve?
(2) At which step is error most likely?
(3) Can I walk through a small, concrete example end-to-end?

Types of Events

Events fall into several categories:

  • Elementary (or Simple) Event: A single outcome from the sample space—for example, rolling a “3” on a die, written as A={3}A = \{3\}.
  • Compound Event: A set containing multiple elementary outcomes—for example, rolling an even number: A={2,4,6}A = \{2, 4, 6\}.
  • Impossible Event: An event with no outcomes in the sample space—for example, drawing a “Wild Card” from a standard 52-card deck.

Example

In the coin-toss experiment:

  • The event “tossing Heads” is represented as A={Heads}A = \{\text{Heads}\}
  • The event “tossing either Heads or Tails” corresponds to the entire sample space: A=SA = S

3. Set Operations on Events

We frequently combine or compare events using set operations: union (\cup), intersection (\cap), and complement (c^c).

3.1 Union of Events

The union of events AA and BB, denoted ABA \cup B, represents the event that either AA or BB (or both) occurs.

Example

In the die-rolling experiment, let

  • A={2,4,6}A = \{2, 4, 6\} (“even number”), and
  • B={1,2,3}B = \{1, 2, 3\} (“1, 2, or 3”).

Then:

AB={1,2,3,4,6}A \cup B = \{1, 2, 3, 4, 6\}

3.2 Intersection of Events

The intersection of events AA and BB, denoted ABA \cap B, represents the event that both AA and BB occur simultaneously.

Example

Using the same AA and BB as above:

AB={2}A \cap B = \{2\}

(since “2” is the only outcome common to both sets).

3.3 Complement of an Event

The complement of event AA, denoted AcA^c, is the set of all outcomes in the sample space not in AA—i.e., the event that AA does not occur.

Example

In the die-rolling experiment, if A={2,4,6}A = \{2, 4, 6\}, then:

Ac={1,3,5}A^c = \{1, 3, 5\}

4. Code Example

Below is a simple Python code snippet demonstrating how to define a sample space, construct events, and perform union, intersection, and complement operations.

# Define the sample space
S = {1, 2, 3, 4, 5, 6}

# Define events A and B
A = {2, 4, 6}
B = {1, 2, 3}

# Union of events
A_union_B = A.union(B)
print("A ∪ B:", A_union_B)

# Intersection of events
A_intersection_B = A.intersection(B)
print("A ∩ B:", A_intersection_B)

# Complement of event A (relative to S)
A_complement = S - A
print("Complement of A:", A_complement)

Output

Running this code yields:

AB: {1, 2, 3, 4, 6}
AB: {2}
Complement of A: {1, 3, 5}

Application Review Card: Events and Sample Space

After completing “Foundational Concepts of Probability: Events and Sample Space”, try adapting the framework to your own scenario. Pay close attention to whether inputs, processing steps, and outputs align coherently.

Application Validation Card: Events and Sample Space

To apply “Foundational Concepts of Probability: Events and Sample Space” to your own task, start by narrowing the scope—focus first on validating just one critical decision point.

Summary

This section introduced the fundamental ideas of sample space and events, including formal definitions, classifications of events, and key set operations (union, intersection, complement). Solid mastery of these concepts is indispensable for progressing to more advanced topics—especially conditional probability and independence. Through illustrative examples and executable code, we hope this material has clarified and reinforced your understanding. If anything remains unclear, feel free to ask!

Continue

Keep reading from here

Browse English site

Reader Messages

Reader messages

Questions, corrections, extra sources, or hands-on results can be left here. No login is required.

Max 800 characters

To reduce spam, each message is checked for length, link count, and posting frequency.

0/800

Messages

0 messages
Loading messages...