1.1 — Sample Spaces and Events
1.1 — Sample Spaces and Events#
Probability theory begins with understanding what can happen and what we’re interested in. This lesson introduces the fundamental concepts of sample spaces and events, which form the foundation for all probability calculations.
What is a Sample Space?#
A sample space, denoted by (omega), is the set of all possible outcomes of a random experiment. Learn more: Sample Space
Key Points:
- Each outcome is a single element of the sample space
- The sample space must be exhaustive (cover all possibilities)
- Outcomes must be mutually exclusive (only one can occur)
Examples of Sample Spaces#
Example 1: Coin Toss
- Sample space: where H = heads, T = tails
- Two possible outcomes
Example 2: Rolling a Die
- Sample space:
- Six possible outcomes
Example 3: Stock Price Movement
- Sample space:
- Three possible outcomes for a single trading day
Example 4: Portfolio Return
- Sample space: (all real numbers)
- Continuous sample space for percentage returns
Types of Sample Spaces#
Discrete Sample Spaces#
A discrete sample space has a finite or countably infinite number of outcomes.
- Finite: Coin toss (), die roll ()
- Countably Infinite: Number of trades in a day ()
Continuous Sample Spaces#
A continuous sample space has uncountably infinite outcomes, typically intervals of real numbers.
- Stock price:
- Portfolio return:
- Time to execution:
What is an Event?#
An event is a subset of the sample space. An event occurs if the outcome of the experiment is in that subset. Learn more: Event (Probability Theory)
Notation: Events are typically denoted by capital letters: , , , etc.
Examples of Events#
Example 1: Die Roll
- Sample space:
- Event = “Roll an even number” =
- Event = “Roll a number greater than 4” =
- Event = “Roll a 6” = (simple event)
Example 2: Stock Price
- Sample space:
- Event = “Price increases” =
- Event = “Price doesn’t decrease” =
Example 3: Portfolio Return
- Sample space:
- Event = “Positive return” =
- Event = “Return between -5% and +5%” =
Types of Events#
Simple Events#
A simple event (or elementary event) contains exactly one outcome.
- Rolling a 6:
- Coin showing heads:
Compound Events#
A compound event contains more than one outcome.
- Rolling an even number:
- Stock price up or unchanged:
Certain Event#
The certain event is the entire sample space . It always occurs.
- “Roll a number between 1 and 6” = =
Impossible Event#
The impossible event is the empty set . It never occurs.
- “Roll a 7” = (for a standard die)
Set Operations on Events#
Since events are sets, we can use set operations:
Union ()#
The union of events and occurs if either or (or both) occurs.
Definition: Union (): All elements in or (or both).
Example:
Intersection ()#
The intersection of events and occurs if both and occur.
Example:
- = “Roll an even number” =
- = “Roll a number greater than 4” =
Complement ( or )#
The complement of event occurs if does not occur.
Example:
- = “Roll an even number” =
Mutually Exclusive Events#
Events and are mutually exclusive (or disjoint) if .
They cannot both occur simultaneously.
Example:
- = “Roll a 1” =
- = “Roll a 6” =
- (mutually exclusive)
Financial Applications#
Portfolio Analysis#
Sample Space: All possible portfolio returns
- Event : “Portfolio return > 10%”
- Event : “Portfolio return < -5%”
- Event : “Portfolio return > 10% OR < -5%” (extreme outcomes)
Risk Management#
Sample Space: All possible loss scenarios
- Event : “Loss exceeds VaR threshold”
- Event : “Loss exceeds stress test limit”
- Event : “Loss exceeds both thresholds”
Trading Signals#
Sample Space: All possible market conditions
- Event : “Bull market”
- Event : “High volatility”
- Event : “Bull market with high volatility”
Python Example#
Let’s represent sample spaces and events in Python:
import numpy as np
# Sample space for die roll
sample_space = {1, 2, 3, 4, 5, 6}
# Events
event_even = {2, 4, 6} # Even numbers
event_greater_4 = {5, 6} # Numbers greater than 4
# Set operations
union = event_even | event_greater_4 # {2, 4, 5, 6}
intersection = event_even & event_greater_4 # {6}
complement_even = sample_space - event_even # {1, 3, 5}
print(f"Union: {union}")
print(f"Intersection: {intersection}")
print(f"Complement of even: {complement_even}")
# Check if events are mutually exclusive
are_mutually_exclusive = len(event_even & event_greater_4) == 0
print(f"Are mutually exclusive? {are_mutually_exclusive}")
Key Takeaways#
- Sample Space (): The set of all possible outcomes
- Event: A subset of the sample space
- Simple Event: Contains exactly one outcome
- Compound Event: Contains multiple outcomes
- Set Operations: Union (or), Intersection (and), Complement (not)
- Mutually Exclusive: Events that cannot occur simultaneously
Next Steps#
In the next lesson, we’ll learn how to assign probabilities to events using probability axioms and rules. This will allow us to quantify how likely events are to occur.