Unit 1, lesson 2

Sample Spaces and Events

How to build a finite sample space of recorded outcomes, describe events with union, intersection, complement and set difference, use De Morgan’s laws, and recognize disjoint events and partitions.

  • Video 2
  • Probability Models and Events

A parcel service flags packages with two rules, one about the destination zone and one about the size. A parcel that matches both rules should not be counted twice, and a parcel that matches neither needs a precise description too. Before any probability can be assigned, the possible results have to be listed as a sample space and each condition written as a set of outcomes. This lesson builds that language, with the operations that combine events and the identities that keep the combinations straight.

Key terms

Sample space

Definition The sample space Ω\Omega of an experiment is the set of all its possible outcomes, described at the level of detail the experiment records. An event is a subset of Ω\Omega, and it occurs when the observed outcome is one of its elements. The number of elements of a finite set AA is its cardinality ∣A∣\lvert A \rvert. In a finite sample space every subset can be taken as an event, including the empty event ∅\varnothing and the certain event Ω\Omega. Some infinite sample spaces need more care about which subsets count as events, and later lessons take that up.

In plain words Write down every result the experiment could record, with nothing missing and nothing listed twice. Conditions then become sets of those results. A count of outcomes is only a count, not a probability.

Example A constructed routing record notes a parcel’s zone, North, East, South or West, followed by its size, small, medium or large. Each outcome is an ordered pair such as (N,s)(N, s), zone first and size second. Every combination is possible, so the sample space Ω\Omega consists of the 12 pairs in the grid below, and ∣Ω∣=4×3=12\lvert \Omega \rvert = 4 \times 3 = 12.

Zonesmallmediumlarge
North(N,s)(N, s)(N,m)(N, m)(N,l)(N, l)
East(E,s)(E, s)(E,m)(E, m)(E,l)(E, l)
South(S,s)(S, s)(S,m)(S, m)(S,l)(S, l)
West(W,s)(W, s)(W,m)(W, m)(W,l)(W, l)

Let AA be the event “North or East” and BB the event “large”. Then AA consists of the 6 outcomes in the North and East rows, and BB of the 4 outcomes in the large column. The outcome (E,m)(E, m) is an element of AA, while {(E,m)}\{(E, m)\} is the event that contains only that outcome.

The level of detail is a choice. A roll of a red die and a blue die can be recorded as an ordered pair, which gives 36 outcomes, or as the sum, which gives the 11 outcomes 2 to 12. The sum record discards information. The pairs (1,2)(1, 2) and (2,1)(2, 1) both give the sum 3, so a recorded sum of 3 does not say which face the red die showed. A list of the 11 sums also says nothing about whether they are equally likely. In the usual model for two fair dice, where all 36 ordered pairs are equally likely, the sum 2 arises only from the pair (1,1)(1, 1) and the sum 7 from six pairs, so those two sums are not equally likely.

Union and intersection

Definition For events AA and BB in Ω\Omega, the union A∪BA \cup B is the set of outcomes that are in AA, in BB or in both, and the intersection A∩BA \cap B is the set of outcomes that are in both AA and BB. The union is the event ”AA or BB” with the inclusive or, and the intersection is the event ”AA and BB”. For finite sets the sizes satisfy

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣.\begin{aligned} \lvert A \cup B \rvert &= \lvert A \rvert + \lvert B \rvert \\[0.4em] &\quad - \lvert A \cap B \rvert. \end{aligned}

In plain words The word “or” keeps the overlap. Adding the two sizes counts the shared outcomes twice, so they are subtracted once.

Example In the routing record both conditions hold only for North-large and East-large, so A∩B={(N,l),(E,l)}A \cap B = \{(N, l), (E, l)\}. The union starts with the 6 outcomes of AA and adds the two large outcomes that are not already there, (S,l)(S, l) and (W,l)(W, l). This gives 8 outcomes, in agreement with 6+4−2=86 + 4 - 2 = 8. The count does not make the probability of A∪BA \cup B equal to 8/128/12. That value would follow from the counts in a model that makes the 12 outcomes equally likely, and nothing in the list of outcomes says they are.

Complement and set difference

Definition The complement of an event AA is Ac=Ω∖AA^{c} = \Omega \setminus A, the set of outcomes of Ω\Omega that are not in AA. It is always taken relative to the stated sample space. The set difference A∖BA \setminus B is the set of outcomes that are in AA but not in BB, so

A∖B=A∩Bc.A \setminus B = A \cap B^{c}.

The order matters, and B∖AB \setminus A is in general a different set.

In plain words The complement means “not AA”, everything else the experiment could have recorded. The difference ”AA minus BB” means that AA happens and BB does not.

Example In the routing record the complement AcA^{c} is “South or West”, the 6 outcomes with zone SS or WW. If the record allowed a fifth zone, the same condition “neither North nor East” would pick out a larger set. The two differences are

A∖B={(N,s),(N,m),(E,s),(E,m)},B∖A={(S,l),(W,l)}.\begin{aligned} A \setminus B &= \{(N, s), (N, m), \\ &\qquad (E, s), (E, m)\}, \\[0.4em] B \setminus A &= \{(S, l), (W, l)\}. \end{aligned}

Their union is the event “exactly one of AA and BB”, called the symmetric difference A△BA \mathbin{\triangle} B, and it has 4+2=64 + 2 = 6 outcomes. Ordinary “or” includes the overlap, while “exactly one” leaves it out.

De Morgan’s laws

Definition For any events AA and BB in a sample space Ω\Omega,

(A∪B)c=Ac∩Bc,(A∩B)c=Ac∪Bc.\begin{aligned} (A \cup B)^{c} &= A^{c} \cap B^{c}, \\[0.4em] (A \cap B)^{c} &= A^{c} \cup B^{c}. \end{aligned}

The first law holds because an outcome lies outside A∪BA \cup B exactly when it lies outside AA and outside BB. The second holds because an outcome lies outside A∩BA \cap B exactly when it lies outside at least one of the two events. The same laws hold for any number of events. The complement of a union is the intersection of the complements, and the complement of an intersection is the union of the complements.

In plain words Neither is the opposite of at least one, and not both is the opposite of both. Taking the complement of a union gives an intersection of complements, and the other way around.

Example In the routing record, “neither AA nor BB” means that the zone is neither North nor East and the size is not large. That leaves (S,s)(S, s), (S,m)(S, m), (W,s)(W, s) and (W,m)(W, m). Removing the 8 outcomes of A∪BA \cup B from all 12 gives the same 4 outcomes, as the first law says. The event “not both” removes only the 2 outcomes of A∩BA \cap B, so it is the set Ac∪BcA^{c} \cup B^{c} with 10 outcomes. Four outcomes against ten shows how much the exact wording matters.

Disjoint events

Definition Events AA and BB are disjoint, or mutually exclusive, if A∩B=∅A \cap B = \varnothing. Then no outcome belongs to both, and the two events cannot occur on the same trial. Events A1,…,AkA_1, \dots, A_k are pairwise disjoint if every two of them are disjoint. A collection of events is exhaustive if their union is Ω\Omega, so that every outcome belongs to at least one of them.

In plain words Disjoint events never happen together. Disjointness is a fact about which outcomes the events share, and it needs no probabilities. Independence, defined later in the course, is a statement about probabilities and a different idea. In fact two disjoint events that both have positive probability are never independent.

Example In the routing record the events “small” and “large” are disjoint, because every parcel has exactly one size. The events AA and BB are not disjoint, since (N,l)(N, l) belongs to both. The events “small or medium” and “medium or large” are exhaustive, since every size is covered, but they are not disjoint, since they share all four medium outcomes.

Partition

Definition Events A1,…,AkA_1, \dots, A_k form a partition of Ω\Omega if each AiA_i is nonempty, the events are pairwise disjoint and their union is Ω\Omega. Every outcome then belongs to exactly one of the events, and for a finite sample space

∣A1∣+⋯+∣Ak∣=∣Ω∣.\lvert A_1 \rvert + \cdots + \lvert A_k \rvert = \lvert \Omega \rvert.

This count is a consequence of a partition, not a test for one. Sets whose sizes add to ∣Ω∣\lvert \Omega \rvert can still overlap and miss outcomes.

In plain words A partition sorts every outcome into exactly one nonempty group. It is the setup that later lets the probabilities of the groups add up to 1.

Example The size events “small”, “medium” and “large” partition the routing sample space into three sets of 4 outcomes, and 4+4+4=124 + 4 + 4 = 12. Any two events also split Ω\Omega into four pairwise disjoint pieces, AA only, BB only, both and neither. For the events AA and BB above these pieces have 4, 2, 2 and 4 outcomes, which add to 12, and since none of them is empty they form a partition. By contrast, “North or East” and “North or South” have 6+6=126 + 6 = 12 outcomes between them, but they are not a partition, because both contain the three North outcomes and the West outcomes are in neither.

Check yourself

  1. In the routing record, let CC be the event “East or West” and DD the event “medium or large”. List the outcomes of C∩DC \cap D and find the number of outcomes in C∪DC \cup D.
Show the answer

Both conditions hold when the zone is East or West and the size is medium or large, so

C∩D={(E,m),(E,l),(W,m),(W,l)}.\begin{aligned} C \cap D = \{&(E, m), (E, l), \\ &(W, m), (W, l)\}. \end{aligned}

The event CC has 2×3=62 \times 3 = 6 outcomes and DD has 4×2=84 \times 2 = 8, so the union has 6+8−4=106 + 8 - 4 = 10 outcomes.

  1. With the same events, list the outcomes in neither CC nor DD, and the outcomes in exactly one of them. Use a De Morgan law to check the first answer.
Show the answer

Not CC means North or South, and not DD means small. Both must hold, so

(C∪D)c=Cc∩Dc={(N,s),(S,s)}.\begin{aligned} (C \cup D)^{c} &= C^{c} \cap D^{c} \\[0.4em] &= \{(N, s), (S, s)\}. \end{aligned}

As a check, removing the 10 outcomes of C∪DC \cup D from the 12 leaves 2. For exactly one, the difference C∖DC \setminus D is {(E,s),(W,s)}\{(E, s), (W, s)\} and the difference D∖CD \setminus C is {(N,m),(N,l),(S,m),(S,l)}\{(N, m), (N, l), (S, m), (S, l)\}. Together they give 6 outcomes.

  1. Do the three events “both”, “neither” and “exactly one” from questions 1 and 2 form a partition of Ω\Omega? Do the events CC and DD themselves form one?
Show the answer

The three events do form a partition. Each is nonempty, with 4, 2 and 6 outcomes. Every outcome satisfies a definite number of the two conditions, either 2, 0 or 1, and the three events collect exactly the outcomes with 2, 0 and 1 conditions met. So no outcome lies in two of the events, and every outcome lies in one of them. The sizes agree, since 4+2+6=124 + 2 + 6 = 12.

The events CC and DD do not form a partition. They overlap in the 4 outcomes of C∩DC \cap D, and they miss (N,s)(N, s) and (S,s)(S, s). Either failure alone would be enough.

How this lesson connects