1. Home
  2. Explore
  3. Statistics
  4. Sample Spaces and Events

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Sample Spaces and Events

Probability Foundations and Counting

Sample Spaces and Events

A probability model begins with an experiment, a process that produces an outcome.

  • The sample space, denoted by SSS, is the collection of all possible outcomes of an experiment.

  • An event is any collection, or subset, of outcomes in the sample space. Events are usually denoted by capital letters such as AAA, BBB, and CCC.

  • An event can contain:

    • A single outcome

    • Several outcomes

    • Every outcome in the sample space

    • No outcomes, represented by the empty or null set, ∅\varnothing∅

An event occurs when the actual outcome of the experiment belongs to that event.

For example, when rolling a die:

  • The sample space is S={1,2,3,4,5,6}S = \{1,2,3,4,5,6\}S={1,2,3,4,5,6}.

  • The event A={2,4,6}A = \{2,4,6\}A={2,4,6} represents rolling an even number.

  • The event occurs if the die actually shows 222, 444, or 666.

Because events are sets, probability uses many ideas and rules from set theory, including associativity, commutativity, and distributivity.


Set Notation and Operations

Containment

The notation A⊆BA \subseteq BA⊆B means that event AAA is contained in event BBB. Every outcome in AAA is also an outcome in BBB.

If A⊆BA \subseteq BA⊆B, then:

  • AAA is a subset of BBB.

  • Occurrence of AAA guarantees occurrence of BBB.

  • The union of AAA and BBB is simply BBB:

A∪B=BA \cup B = BA∪B=B

If both A⊆BA \subseteq BA⊆B and B⊆AB \subseteq AB⊆A, then the events contain exactly the same outcomes and are equal:

A=BA = BA=B

Union

The union of AAA and BBB, written A∪BA \cup BA∪B, contains every outcome that belongs to AAA, to BBB, or to both.

In probability notation, the union symbol is ∪\cup∪.

Intersection

The intersection of AAA and BBB contains outcomes that belong to both events.

Set theory often denotes an intersection with ∩\cap∩, but probability notation frequently omits the symbol and writes the intersection as ABABAB or, more explicitly, A∩BA \cap BA∩B.

Thus:

AB=A∩BAB = A \cap BAB=A∩B

If A⊆BA \subseteq BA⊆B, then every outcome in AAA is already in BBB, so:

AB=AAB = AAB=A

Complement

The complement of AAA, written AcA^cAc, consists of all outcomes in the sample space that are not in AAA.

An event and its complement together make up the entire sample space:

A∪Ac=SA \cup A^c = SA∪Ac=S

The event AAA and its complement cannot occur simultaneously.


Mutually Exclusive, Exhaustive, and Partitioned Events

Mutually Exclusive Events

Events AAA and BBB are mutually exclusive if they have no outcomes in common. They are also called disjoint.

AB=∅AB = \varnothingAB=∅

If two events are mutually exclusive, they cannot both occur in the same trial.

For example, when rolling one die:

  • A={1,2}A = \{1,2\}A={1,2}

  • B={5,6}B = \{5,6\}B={5,6}

The events are mutually exclusive because no die outcome belongs to both.

Exhaustive Events

Events are exhaustive if their union is the entire sample space:

A∪B=SA \cup B = SA∪B=S

In set theory, events with this property may be called complementary or collectively exhaustive. Probability commonly uses the term exhaustive.

Partitions

A collection of events forms a partition of the sample space when the events are both:

  1. Mutually exclusive

  2. Exhaustive

For events A1,A2,…,AkA_1,A_2,\ldots,A_kA1​,A2​,…,Ak​ to form a partition:

AiAj=∅for i≠jA_iA_j = \varnothing \quad \text{for } i \ne jAi​Aj​=∅for i=j

and

A1∪A2∪⋯∪Ak=SA_1 \cup A_2 \cup \cdots \cup A_k = SA1​∪A2​∪⋯∪Ak​=S

A partition divides the sample space into nonoverlapping pieces. Partitions are especially useful when calculating probabilities by conditioning on different possible cases.


Probability and Its Axioms

Definition of Probability

A probability assigns a real number P(A)P(A)P(A) to every event AAA in a sample space.

The assignment is a valid probability function if it satisfies three axioms.

A probability function is any function defined on the events of a sample space that satisfies nonnegativity, normalization, and countable additivity.

Axiom 1: Nonnegativity

The probability of every event is nonnegative:

P(A)≥0P(A) \ge 0P(A)≥0

No event can have a negative probability.

Axiom 2: Normalization

The probability of the entire sample space is 111:

P(S)=1P(S) = 1P(S)=1

Because the sample space contains every possible outcome, one of its outcomes must occur.

Axiom 3: Additivity for Disjoint Events

For any finite or countably infinite sequence of mutually exclusive events A1,A2,…A_1,A_2,\ldotsA1​,A2​,…:

P(⋃i=1∞Ai)=∑i=1∞P(Ai)P\left(\bigcup_{i=1}^{\infty} A_i\right) = \sum_{i=1}^{\infty}P(A_i)P(⋃i=1∞​Ai​)=∑i=1∞​P(Ai​)

For a finite collection, this becomes:

P(A1∪A2∪⋯∪Ak)=P(A1)+P(A2)+⋯+P(Ak)P(A_1 \cup A_2 \cup \cdots \cup A_k) = P(A_1)+P(A_2)+\cdots+P(A_k)P(A1​∪A2​∪⋯∪Ak​)=P(A1​)+P(A2​)+⋯+P(Ak​)

This rule applies directly only when the events are disjoint. If events overlap, their intersection must be accounted for.

A probability function does not have to be unique. A given sample space may support multiple probability functions, depending on how likely its outcomes are assumed to be.

Different texts may use terms such as probability distribution, probability function, or probability measure for related objects. The essential requirement is that the function satisfies the three probability axioms.


Fundamental Probability Rules

Probability of a Complement

The probability that AAA does not occur is:

P(Ac)=1−P(A)P(A^c)=1-P(A)P(Ac)=1−P(A)

This is useful when computing P(Ac)P(A^c)P(Ac) directly would be difficult but computing P(A)P(A)P(A) is easy.

Probability of the Empty Set

The empty event has probability zero:

P(∅)=0P(\varnothing)=0P(∅)=0

Monotonicity

If A⊆BA \subseteq BA⊆B, then:

P(A)≤P(B)P(A)\le P(B)P(A)≤P(B)

An event contained within another event cannot be more probable than the larger event.

Probability Bounds

Every event has probability between zero and one:

0≤P(A)≤10\le P(A)\le 10≤P(A)≤1

Addition Rule

For any two events, including events that overlap:

P(A∪B)=P(A)+P(B)−P(AB)P(A\cup B)=P(A)+P(B)-P(AB)P(A∪B)=P(A)+P(B)−P(AB)

The intersection is subtracted because outcomes in ABABAB are counted once in P(A)P(A)P(A) and again in P(B)P(B)P(B).

If AAA and BBB are mutually exclusive, then P(AB)=0P(AB)=0P(AB)=0, so the rule simplifies to:

P(A∪B)=P(A)+P(B)P(A\cup B)=P(A)+P(B)P(A∪B)=P(A)+P(B)

Difference Rule

The event ABcAB^cABc consists of outcomes that are in AAA but not in BBB. Its probability is:

P(ABc)=P(A)−P(AB)P(AB^c)=P(A)-P(AB)P(ABc)=P(A)−P(AB)

Simple Sample Spaces

Definition

Suppose the sample space SSS is finite and every outcome is equally likely. This is called a simple sample space.

Let n(A)n(A)n(A) represent the number of outcomes in event AAA. Then the probability of AAA is:

P(A)=n(A)n(S)P(A)=\frac{n(A)}{n(S)}P(A)=n(S)n(A)​

In a simple sample space, probability is calculated by counting:

  • The denominator counts all possible outcomes.

  • The numerator counts the outcomes satisfying the event.

  • The ratio gives the probability.

Why the Formula Is a Probability

The counting formula satisfies the three probability axioms:

  1. Nonnegativity: Counts cannot be negative, so P(A)≥0P(A)\ge 0P(A)≥0.

  2. Normalization:

P(S)=n(S)n(S)=1P(S)=\frac{n(S)}{n(S)}=1P(S)=n(S)n(S)​=1
  1. Additivity: If AAA and BBB are mutually exclusive, then:

n(A∪B)=n(A)+n(B)n(A\cup B)=n(A)+n(B)n(A∪B)=n(A)+n(B)

Therefore:

P(A∪B)=n(A)+n(B)n(S)=P(A)+P(B)P(A\cup B) = \frac{n(A)+n(B)}{n(S)} = P(A)+P(B)P(A∪B)=n(S)n(A)+n(B)​=P(A)+P(B)

The power of a simple sample space is that probability calculations reduce to counting when all outcomes are equally likely.


Example: Rolling Two Fair Dice

Two fair dice are rolled, and the probability that their sum equals 444 is required.

The ordered outcome is written as an ordered pair:

(first die,second die)(\text{first die},\text{second die})(first die,second die)

Each die has six possible values, so the sample space contains:

6⋅6=366\cdot 6=366⋅6=36

equally likely outcomes.

The outcomes producing a sum of 444 are:

(1,3), (2,2), (3,1)(1,3),\ (2,2),\ (3,1)(1,3), (2,2), (3,1)

There are three favorable outcomes. Therefore:

P(sum=4)=336=112P(\text{sum}=4)=\frac{3}{36}=\frac{1}{12}P(sum=4)=363​=121​

The order matters because (1,3)(1,3)(1,3) and (3,1)(3,1)(3,1) are distinct outcomes when the dice are identified by position.


Example: License Plates With Replacement

A license plate contains six characters. Each character can be one of:

  • 262626 letters

  • 101010 digits

Thus, there are:

26+10=3626+10=3626+10=36

possibilities for each character.

If characters may be reused, the total number of plates is:

36636^6366

For an all-digit plate, each of the six positions has 101010 choices, so the number of favorable plates is:

10610^6106

Therefore:

P(all digits)=106366≈0.0005P(\text{all digits}) = \frac{10^6}{36^6} \approx 0.0005P(all digits)=366106​≈0.0005

This is an example of sampling with replacement, because a character selected for one position remains available for later positions.


Example: License Plates Without Replacement

Suppose characters cannot be reused.

  • The first character has 363636 choices.

  • The second has 353535 choices.

  • The third has 343434 choices.

  • This continues until six positions are filled.

The total number of plates is:

36⋅35⋅34⋅33⋅32⋅3136\cdot35\cdot34\cdot33\cdot32\cdot3136⋅35⋅34⋅33⋅32⋅31

Using factorial notation, this is:

36!30!\frac{36!}{30!}30!36!​

For an all-digit plate:

  • The first position has 101010 choices.

  • The second has 999 choices.

  • This continues through six positions.

The number of all-digit plates is:

10⋅9⋅8⋅7⋅6⋅5=10!4!10\cdot9\cdot8\cdot7\cdot6\cdot5 = \frac{10!}{4!}10⋅9⋅8⋅7⋅6⋅5=4!10!​

Thus:

P(all digits without replacement)=10!/4!36!/30!≈0.0001P(\text{all digits without replacement}) = \frac{10!/4!}{36!/30!} \approx 0.0001P(all digits without replacement)=36!/30!10!/4!​≈0.0001

This is sampling without replacement, because each selected character is removed from future consideration.

Factorial Notation

For a nonnegative integer nnn:

n!=n(n−1)(n−2)⋯2⋅1n!=n(n-1)(n-2)\cdots 2\cdot1n!=n(n−1)(n−2)⋯2⋅1

By convention:

0!=10!=10!=1

Factorials are useful for counting ordered arrangements.


Counting Rules and Combinatorics

Combinatorics is the study of counting possible arrangements and selections.

Multiplication Rule

If an experiment has two stages:

  • The first stage has mmm possible outcomes.

  • For each first-stage outcome, the second stage has nnn possible outcomes.

Then the complete experiment has:

m⋅nm\cdot nm⋅n

possible outcomes.

For more stages, the same logic extends:

n1n2⋯nkn_1n_2\cdots n_kn1​n2​⋯nk​

The multiplication rule applies whenever a complete outcome is formed by making several choices in sequence.


Permutations

A permutation is an ordered arrangement of objects.

Arranging All Objects

The number of permutations of nnn distinct objects is:

n!n!n!

For example, nnn people can be arranged in a line in n!n!n! ways.

Selecting and Arranging Some Objects

The number of ordered arrangements of nnn objects selected from NNN objects is:

N!(N−n)!\frac{N!}{(N-n)!}(N−n)!N!​

Order matters in a permutation. Selecting AAA followed by BBB is different from selecting BBB followed by AAA.


Combinations

A combination is an unordered selection of objects.

The number of combinations of nnn objects selected from NNN objects is:

(Nn)=N!n!(N−n)!\binom{N}{n} = \frac{N!}{n!(N-n)!}(nN​)=n!(N−n)!N!​

This is read as “NNN choose nnn.”

The factor n!n!n! in the denominator removes the repeated counting caused by different orderings of the same selected objects.

Permutations Versus Combinations

  • Permutation: Order matters.

  • Combination: Order does not matter.

For example:

  • A license plate uses permutations because ABC123 differs from BCA231.

  • A handshake uses combinations because person A shaking person B’s hand is the same handshake as person B shaking person A’s hand.


Example: Handshakes

Suppose nine candidates all shake hands with each other exactly once.

Each handshake involves selecting two people from nine, and order does not matter. Therefore, the number of handshakes is:

(92)=9!2!7!=36\binom{9}{2} = \frac{9!}{2!7!} = 36(29​)=2!7!9!​=36

The combination rule is appropriate because each pair produces one handshake.


Example: Two Faculty Members Adjacent in a Line

Suppose 404040 faculty members are randomly assigned to 404040 offices arranged in one continuous line. The probability that two particular faculty members are next to each other is required.

Total Arrangements

The 404040 faculty members can be arranged in:

40!40!40!

ways.

Arrangements With the Two Faculty Members Together

Treat the two specified faculty members as one combined unit. This produces:

  • One combined unit

  • The remaining 383838 individual faculty members

Thus, there are 393939 units to arrange, which can be done in:

39!39!39!

ways.

The two faculty members can be ordered within their combined unit in two ways:

  • First person on the left and second person on the right

  • Second person on the left and first person on the right

Therefore, the number of favorable arrangements is:

2⋅39!2\cdot39!2⋅39!

The probability is:

P(adjacent)=2⋅39!40!=240=120P(\text{adjacent}) = \frac{2\cdot39!}{40!} = \frac{2}{40} = \frac{1}{20}P(adjacent)=40!2⋅39!​=402​=201​

This “tie objects together as one unit” method is useful whenever particular objects must appear consecutively.


Example: Selecting Pizza Toppings

Suppose a pizza shop offers:

  • 666 vegetarian toppings

  • 555 nonvegetarian toppings

Two toppings are selected without regard to order. The probability of selecting one topping from each category is required.

Total Number of Selections

There are 111111 total toppings, and two are selected:

(112)=66\binom{11}{2}=66(211​)=66

Favorable Selections

One vegetarian topping can be selected in (61)\binom{6}{1}(16​) ways, and one nonvegetarian topping can be selected in (51)\binom{5}{1}(15​) ways:

(61)(51)=6⋅5=30\binom{6}{1}\binom{5}{1}=6\cdot5=30(16​)(15​)=6⋅5=30

Therefore:

P(one of each type)=(61)(51)(112)=3066=511P(\text{one of each type}) = \frac{\binom{6}{1}\binom{5}{1}}{\binom{11}{2}} = \frac{30}{66} = \frac{5}{11}P(one of each type)=(211​)(16​)(15​)​=6630​=115​

An equivalent sequential approach is:

P(vegetarian first, nonvegetarian second)+P(nonvegetarian first, vegetarian second)P(\text{vegetarian first, nonvegetarian second}) + P(\text{nonvegetarian first, vegetarian second})P(vegetarian first, nonvegetarian second)+P(nonvegetarian first, vegetarian second)

The combination method is often simpler because the selection is naturally unordered.

Generalization

Suppose nnn toppings are selected, with n1n_1n1​ vegetarian toppings and n2n_2n2​ nonvegetarian toppings, where:

n1+n2=nn_1+n_2=nn1​+n2​=n

The number of favorable selections is:

(6n1)(5n2)\binom{6}{n_1}\binom{5}{n_2}(n1​6​)(n2​5​)

The total number of selections is:

(11n)\binom{11}{n}(n11​)

Therefore:

P(n1 vegetarian and n2 nonvegetarian)=(6n1)(5n2)(11n)P(n_1\text{ vegetarian and }n_2\text{ nonvegetarian}) = \frac{\binom{6}{n_1}\binom{5}{n_2}}{\binom{11}{n}}P(n1​ vegetarian and n2​ nonvegetarian)=(n11​)(n1​6​)(n2​5​)​

This structure forms the basis of the hypergeometric distribution, which describes sampling without replacement from categories.


Independence

Definition

Events AAA and BBB are independent if the occurrence of one does not change the probability of the other.

The formal definition is:

P(AB)=P(A)P(B)P(AB)=P(A)P(B)P(AB)=P(A)P(B)

Equivalently:

P(A∩B)=P(A)P(B)P(A\cap B)=P(A)P(B)P(A∩B)=P(A)P(B)

Independence is a probabilistic relationship, not simply a statement that two events come from physically separate experiments.

The proper intuition for independence is that knowing whether one event occurred provides no information about whether the other occurred.


Example: Events From a Single Die Roll

A die is rolled once.

  • AAA: rolling a number less than 555

  • BBB: rolling an even number

The probabilities are:

P(A)=46=23P(A)=\frac{4}{6}=\frac{2}{3}P(A)=64​=32​
P(B)=36=12P(B)=\frac{3}{6}=\frac{1}{2}P(B)=63​=21​

The intersection consists of the even numbers less than 555:

AB={2,4}AB=\{2,4\}AB={2,4}

Thus:

P(AB)=26=13P(AB)=\frac{2}{6}=\frac{1}{3}P(AB)=62​=31​

The product of the individual probabilities is:

P(A)P(B)=23⋅12=13P(A)P(B) = \frac{2}{3}\cdot\frac{1}{2} = \frac{1}{3}P(A)P(B)=32​⋅21​=31​

Since:

P(AB)=P(A)P(B)P(AB)=P(A)P(B)P(AB)=P(A)P(B)

the events are independent, even though both are based on the same die roll.

Independence and Mutual Exclusivity

Independence and mutual exclusivity are different concepts.

  • Mutually exclusive events cannot occur together.

  • Independent events do not affect each other’s probabilities.

If two events have positive probability and are mutually exclusive, then:

P(AB)=0P(AB)=0P(AB)=0

But independence would require:

P(AB)=P(A)P(B)>0P(AB)=P(A)P(B)>0P(AB)=P(A)P(B)>0

Therefore, two positive-probability events cannot be both mutually exclusive and independent.


Complements and Independence

If AAA and BBB are independent, then AAA and BcB^cBc are also independent:

P(ABc)=P(A)P(Bc)P(AB^c)=P(A)P(B^c)P(ABc)=P(A)P(Bc)

Similarly, the corresponding combinations involving complements are independent as well.

For more than two events, a collection is mutually independent when the probability of every relevant intersection equals the product of the corresponding individual probabilities. For three events, this requires, among other relationships:

P(ABC)=P(A)P(B)P(C)P(ABC)=P(A)P(B)P(C)P(ABC)=P(A)P(B)P(C)

The multi-event definition is stronger than merely requiring each pair of events to be independent.


Example: Independent Basketball Shots

Suppose a basketball player makes a three-point shot with probability 0.440.440.44 and misses with probability:

1−0.44=0.561-0.44=0.561−0.44=0.56

Assume:

  • Every shot has the same make probability.

  • The outcomes of different shots are independent.

A Specific Sequence

The probability of missing the next three shots and making the following three is:

0.563⋅0.4430.56^3\cdot0.44^30.563⋅0.443

This equals approximately:

0.0150.0150.015

The multiplication arises from independence.

Any particular sequence containing exactly three misses and three makes has the same probability, regardless of order.

Exactly Three Makes in Six Shots

The probability of obtaining exactly three makes in six shots requires two components:

  1. The probability of any one particular sequence of three makes and three misses.

  2. The number of distinct sequences with three makes.

The three makes can occupy any three of the six shot positions:

(63)\binom{6}{3}(36​)

Therefore:

P(exactly three makes)=(63)(0.44)3(0.56)3P(\text{exactly three makes}) = \binom{6}{3}(0.44)^3(0.56)^3P(exactly three makes)=(36​)(0.44)3(0.56)3

This is approximately:

0.300.300.30

This structure forms the basis of the binomial distribution.

At Least One Make

“At least one make” is most easily computed using the complement.

The complement of making at least one shot is missing all six shots:

P(at least one make)=1−P(six misses)P(\text{at least one make}) = 1-P(\text{six misses})P(at least one make)=1−P(six misses)

Therefore:

P(at least one make)=1−(0.56)6P(\text{at least one make}) = 1-(0.56)^6P(at least one make)=1−(0.56)6

Using the complement avoids separately adding the probabilities of one make, two makes, three makes, and so forth.

The assumptions of constant shot probability and independence are simplifying assumptions. In reality, shot difficulty, fatigue, strategy, game context, and temporary variation in performance can change the probability from shot to shot.


Conditional Probability

Definition

Conditional probability describes the probability of one event after information about another event is known.

The probability of AAA conditional on BBB is written P(A∣B)P(A\mid B)P(A∣B) and defined by:

P(A∣B)=P(AB)P(B)P(A\mid B)=\frac{P(AB)}{P(B)}P(A∣B)=P(B)P(AB)​

This definition requires:

P(B)>0P(B)>0P(B)>0

Conditional probability is not defined in this form when the conditioning event has probability zero.


Interpreting Conditional Probability

Knowing that BBB occurred changes the relevant sample space.

  • The relevant portion of event AAA is the intersection ABABAB.

  • The relevant portion of the sample space is now BBB itself.

Thus:

P(A∣B)=probability of the part of A inside Bprobability of BP(A\mid B) = \frac{\text{probability of the part of }A\text{ inside }B} {\text{probability of }B}P(A∣B)=probability of Bprobability of the part of A inside B​

Conditional probability can be understood as an update based on new information.


Relationship Between Independence and Conditional Probability

If AAA and BBB are independent and P(B)>0P(B)>0P(B)>0, then:

P(A∣B)=P(AB)P(B)=P(A)P(B)P(B)=P(A)P(A\mid B) = \frac{P(AB)}{P(B)} = \frac{P(A)P(B)}{P(B)} = P(A)P(A∣B)=P(B)P(AB)​=P(B)P(A)P(B)​=P(A)

Therefore:

A and B independent⟹P(A∣B)=P(A)A\text{ and }B\text{ independent} \quad\Longrightarrow\quad P(A\mid B)=P(A)A and B independent⟹P(A∣B)=P(A)

The converse also holds when P(B)>0P(B)>0P(B)>0:

P(A∣B)=P(A)⟹A and B are independentP(A\mid B)=P(A) \quad\Longrightarrow\quad A\text{ and }B\text{ are independent}P(A∣B)=P(A)⟹A and B are independent

In words, BBB does not change the probability of AAA precisely when AAA and BBB are independent.


The Law of Total Probability

Suppose A1,A2,…,AkA_1,A_2,\ldots,A_kA1​,A2​,…,Ak​ form a partition of the sample space. For any event WWW:

W=WS=W(A1∪A2∪⋯∪Ak)W=WS=W(A_1\cup A_2\cup\cdots\cup A_k)W=WS=W(A1​∪A2​∪⋯∪Ak​)

Using distributivity and the fact that the partition events are mutually exclusive:

P(W)=P(WA1)+P(WA2)+⋯+P(WAk)P(W) = P(WA_1)+P(WA_2)+\cdots+P(WA_k)P(W)=P(WA1​)+P(WA2​)+⋯+P(WAk​)

Applying the definition of conditional probability gives:

P(W)=∑i=1kP(W∣Ai)P(Ai)P(W) = \sum_{i=1}^{k}P(W\mid A_i)P(A_i)P(W)=∑i=1k​P(W∣Ai​)P(Ai​)

This is the law of total probability.

For two complementary events, AAA and AcA^cAc, it becomes:

P(B)=P(B∣A)P(A)+P(B∣Ac)P(Ac)P(B) = P(B\mid A)P(A) + P(B\mid A^c)P(A^c)P(B)=P(B∣A)P(A)+P(B∣Ac)P(Ac)

The law is useful when an event can occur through several mutually exclusive cases and the probabilities of those cases are known.


Example: Nomination and General Election Outcomes

Suppose four candidates have mutually exclusive and exhaustive events:

  • A1A_1A1​: candidate 1 wins the nomination

  • A2A_2A2​: candidate 2 wins the nomination

  • A3A_3A3​: candidate 3 wins the nomination

  • A4A_4A4​: candidate 4 wins the nomination

Suppose WWW is the event that the party wins the general election.

The probability of a party win is:

P(W)=P(W∣A1)P(A1)+P(W∣A2)P(A2)+P(W∣A3)P(A3)+P(W∣A4)P(A4)P(W) = P(W\mid A_1)P(A_1) + P(W\mid A_2)P(A_2) + P(W\mid A_3)P(A_3) + P(W\mid A_4)P(A_4)P(W)=P(W∣A1​)P(A1​)+P(W∣A2​)P(A2​)+P(W∣A3​)P(A3​)+P(W∣A4​)P(A4​)

Each term represents one possible route to a general-election victory:

  1. Candidate 111 wins the nomination and then the party wins.

  2. Candidate 222 wins the nomination and then the party wins.

  3. Candidate 333 wins the nomination and then the party wins.

  4. Candidate 444 wins the nomination and then the party wins.

The overall probability is a weighted average of the conditional general-election probabilities, with the nomination probabilities serving as weights.

A candidate who is most likely to win the nomination need not be the candidate with the highest conditional probability of winning the general election.


Bayes’ Theorem

Derivation

The definition of conditional probability gives:

P(AB)=P(B∣A)P(A)P(AB)=P(B\mid A)P(A)P(AB)=P(B∣A)P(A)

It also gives:

P(AB)=P(A∣B)P(B)P(AB)=P(A\mid B)P(B)P(AB)=P(A∣B)P(B)

Equating these expressions:

P(A∣B)P(B)=P(B∣A)P(A)P(A\mid B)P(B) = P(B\mid A)P(A)P(A∣B)P(B)=P(B∣A)P(A)

Therefore:

P(A∣B)=P(B∣A)P(A)P(B)P(A\mid B) = \frac{P(B\mid A)P(A)}{P(B)}P(A∣B)=P(B)P(B∣A)P(A)​

This is the basic form of Bayes’ theorem.

The terms have common interpretations:

  • P(A)P(A)P(A): the prior probability of AAA

  • P(B∣A)P(B\mid A)P(B∣A): the probability of observing evidence BBB if AAA is true

  • P(B)P(B)P(B): the overall probability of the evidence

  • P(A∣B)P(A\mid B)P(A∣B): the updated or posterior probability of AAA after observing BBB

Using the law of total probability with AAA and AcA^cAc:

P(B)=P(B∣A)P(A)+P(B∣Ac)P(Ac)P(B) = P(B\mid A)P(A) + P(B\mid A^c)P(A^c)P(B)=P(B∣A)P(A)+P(B∣Ac)P(Ac)

Substitution produces the two-case form of Bayes’ theorem:

P(A∣B)=P(B∣A)P(A)P(B∣A)P(A)+P(B∣Ac)P(Ac)P(A\mid B) = \frac{P(B\mid A)P(A)} {P(B\mid A)P(A)+P(B\mid A^c)P(A^c)}P(A∣B)=P(B∣A)P(A)+P(B∣Ac)P(Ac)P(B∣A)P(A)​

More generally, if A1,…,AkA_1,\ldots,A_kA1​,…,Ak​ form a partition:

P(Aj∣B)=P(B∣Aj)P(Aj)∑i=1kP(B∣Ai)P(Ai)P(A_j\mid B) = \frac{P(B\mid A_j)P(A_j)} {\sum_{i=1}^{k}P(B\mid A_i)P(A_i)}P(Aj​∣B)=∑i=1k​P(B∣Ai​)P(Ai​)P(B∣Aj​)P(Aj​)​

Bayes’ theorem can therefore update probabilities using any partition of the sample space, not only an event and its complement.


Example: Medical Testing and the Zika Virus

Suppose:

  • The prior probability that a person has the virus is:

P(Z)=0.001P(Z)=0.001P(Z)=0.001
  • Therefore, the probability of not having it is:

P(Zc)=0.999P(Z^c)=0.999P(Zc)=0.999
  • The probability of a positive test given that the person has the virus is:

P(+∣Z)=0.99P(+\mid Z)=0.99P(+∣Z)=0.99
  • The probability of a positive test given that the person does not have the virus is:

P(+∣Zc)=0.05P(+\mid Z^c)=0.05P(+∣Zc)=0.05

The goal is to calculate the probability that a person has the virus given a positive test:

P(Z∣+)P(Z\mid +)P(Z∣+)

Applying Bayes’ theorem:

P(Z∣+)=P(+∣Z)P(Z)P(+∣Z)P(Z)+P(+∣Zc)P(Zc)P(Z\mid +) = \frac{P(+\mid Z)P(Z)} {P(+\mid Z)P(Z)+P(+\mid Z^c)P(Z^c)}P(Z∣+)=P(+∣Z)P(Z)+P(+∣Zc)P(Zc)P(+∣Z)P(Z)​

Substituting:

P(Z∣+)=0.99(0.001)0.99(0.001)+0.05(0.999)P(Z\mid +) = \frac{0.99(0.001)} {0.99(0.001)+0.05(0.999)}P(Z∣+)=0.99(0.001)+0.05(0.999)0.99(0.001)​

This gives approximately:

P(Z∣+)≈0.0194P(Z\mid +)\approx 0.0194P(Z∣+)≈0.0194

Thus, even after a positive test, the probability of actually having the virus is less than 2%2\%2%.

Why the Posterior Probability Remains Low

The result is driven by the base rate, or prior probability.

  • The virus is initially very rare: only 111 person in 1,0001{,}0001,000 has it.

  • The test is useful but imperfect.

  • The false-positive rate is 5%5\%5%.

Because the virus is rare, false positives among people without the virus can outnumber true positives among people with the virus.

For every 1,0001{,}0001,000 people:

  • Approximately 111 person has the virus, and about 0.990.990.99 of those people test positive.

  • Approximately 999999999 people do not have the virus, and about 49.9549.9549.95 of those people test positive falsely.

Therefore, among all positive tests, true positives make up only a small proportion.

The example illustrates that a positive test result cannot be interpreted without considering both:

  1. The reliability of the test.

  2. The prior prevalence of the condition.


Updating With Multiple Pieces of Information

Bayesian updating can incorporate several observations, such as:

  • A positive test

  • A fever

  • Other symptoms

  • Additional test results

The information can be incorporated:

  • Sequentially, updating the probability after each new observation

  • Simultaneously, using a conditional-probability expression involving all observations

Both approaches produce the same result when the probabilities are specified consistently. Bayes’ theorem provides the mathematical basis for updating beliefs or probabilities in response to evidence.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent