Topic 5: Basic Concepts of Probability

Fei Ye

November 2024

1 Learning Goals


2 Experiments, Sample Spaces, and Events


3 Example: Chance Event

Source: https://seeing-theory.brown.edu/basic-probability/index.html#section1


4 Complement, Intersection and Union


5 Venn Diagrams

Venn Diagrams


6 Classical Definition of Probability


7 Example: Flipping a Coin

Imagine flipping one fair coin (which means the chance of a head and the chance of a tail are the same). What is the probability of getting the head.

Solution: There are two possible outcomes: Head or Tail.

So the sample space is the set $$S = \{\text{Head}, \text{Tail}\}.$$

The event \(E\) of getting a head is the subset $$E=\{\text{Head}\}.$$

The probability \(P(E)=\dfrac{1}{2}=0.5\).


8 Empirical Probability

An empirical (or a statistical) probability is the relative frequency of occurrence of outcomes from observations in repeated experiments: $$ \begin{aligned} P(E)=&\dfrac{\text{number of occurrence of event } E}{\text{total number of observations}}\\[0.5em] =&\dfrac{\text{frequency in }E}{\text{total frequency}}. \end{aligned} $$


9 Example: Chance of Selecting a Math Major

A statistics class has 5 math majors and 20 other majors. If a students was randomly select from the class, what’s the probability that the selected students is a math major?

Solution: The sample space is the set of all students in the statistics class. The event is the set of the 5 math majors. Then the probability is $$ P(E)=\dfrac{\text{frequency of math majors}}{\text{total frequency of students}}=\dfrac{5}{25}=0.2. $$


10 Theoretical Probability


11 Example: Flipping a Coin Twice

Find the probability of getting two heads when flipping a fair coins twice.

Solution: In the first time, the coin has two possible outcomes. The second time, the coin still has two possible outcomes. By the fundamental counting principle, we know that the sample space \(S\) contains \(2\cdot 2=4\) possible outcomes.

A tree demonstrating outcomes of flipping a coin twice.

The event \(E\) of getting 2 heads contains only one outcome: head and head. So the probability of getting two head when flipping a fair coin twice is \(P(E)=\frac{1}{4}.\)


12 Empirical vs Theoretical: Coin Flip Simulation

Source: GeoGebra License: CC BY SA


13 Law of Large Numbers


14 Law of Large Numbers by a Coin Flipping Simulation

Source: http://digitalfirst.bfwpub.com/stats_applet/stats_applet_10_prob.html


Practice: Red Light Runner


Practice: Flipping a Fair Coin Twice

Flipping a fair coin twice, find the probabilities of getting exactly one head.


15 Fundamental Properties (that Define Probability)

When an event \(E\) consists of infinitely many outcomes, the right-hand side of the equality in Property 3 will be an infinite sum.


16 Two Easy Consequences


17 Example: Rolling a Six-sided Die (1 of 2)

A six-sided fair die is rolled. Denote by \(E\) the event of getting a number less than \(3\).

  1. Find the probability \(P(E)\) of the event \(E\).
  2. Find the probability \(P(E^c)\) of the complement \(E^c\) of the event \(E\).
  3. Verify that \(P(E)+P(E^c)=1\).

18 Example: Rolling a Six-sided Die (2 of 2)

Solution: The sample space of the six-sided die is \(\{1,2,3,4,5,6\}\).

The event \(E\) consists of 2 numbers: \(E=\{1, 2\}\).

The probability is $$ P(E)=\frac26=\frac13. $$

The complement \(E^c=\{3, 4, 5, 6\}\) and the probability is $$ P(E^c)=\frac46=\frac23. $$

Then \(P(E)+P(E^c)=\frac13+\frac23=1.\)


19 Example: Sum of Rolling Two Dice (1 of 2)

Two six-sided fair dice were rolled. Find the probability of getting two numbers whose sum is at least 4.

Solution: The sample space contains \(6\cdot 6=36\) possible out comes.

Possible outcomes of rolling a pair of dice

Source of image: https://sasandr.wordpress.com/2012/05/04/rolling-the-dice-ii/


20 Example: Sum of Rolling Two Dice (2 of 2)

Let \(E\) be the event of the sum is at least 4. Then the complement \(E^c\) consists pairs of numbers whose sum are at most 3. There are 3 such pairs: $$E^c=\{(1, 1), (1, 2), (2, 1)\}.$$

Therefore, $$ \begin{aligned} P(E^c)=&P((1,1))+P((1,2))+P((2,1))\\ =&\frac16\cdot\frac16+\frac16\cdot\frac16+\frac16\cdot\frac16=\frac{1}{12}. \end{aligned} $$

Apply the complement rule, we find $$P(E)=1-P(E^c)=\frac{11}{12}.$$


Practice: Spinner with 12 Numbers


Practice: M&M with a specific color


21 Experiments with Equally Likely Outcomes

When outcomes in the sample spaces are equally likely,


22 The Addition Rule

In general, the probability of the union of two events from a chance experiment is defined by the basic rules and the addition rule.


23 Example: Card drawing (1 of 2)

A card was randomly drawn from a deck of 52 cards. Find the probability of getting each of the following card or combination.

  1. a heart,
  2. a face (that is, a king, queen, or jack)
  3. a face-heart
  4. a heart or a face
  5. a club-spade

A standard deck of 52 cards

Image source: Wikipedia: Standard 52-card deck


24 Example: Card drawing (2 of 2)

Solution: The sample space \(S\) consists of 52 cards. There are 13 hearts and 12 faces. $$P(\text{heart})=\frac{13}{52}=\frac14,\quad P(\text{face})=\frac{12}{52}=\frac3{13}.$$ There are 3 heart face cards. Then $$ P(\text{heart and face})=\frac{3}{52}=\frac{1}{14}. $$ There are \(22\) cards that are either hearts or faces. Then $$ P(\text{heart or face})=\frac{22}{52}=\frac{11}{26}. $$ Since there is no card which is club and spade, we have $$ P(\text{club and spade})=0. $$

Note: From the addition formula, \(P(\text{heart or face})=P(\text{heart})+P(\text{face})-P(\text{heart and face})=\frac{13}{52}+\frac{12}{52}-\frac{3}{52}=\frac{22}{52}=\frac{11}{26}.\)


Practice: Addition Rule


25 The Conditional Probability


26 The Multiplication Rule


27 Independent Events

See https://online.stat.psu.edu/stat414/lesson/3 for more information and examples on counting technique.


28 Example: Conditional Probability

A fair six-sided die is rolled.

Find the probability that the number rolled is a two, given that it is even.

Solution: Let \(A\) be the event of all possible even outcomes and \(B\) the event consisting of the outcome 2. Then \(A=\{2, 4, 6\}\) and \(B=\{2\}\). The intersection event \(A\cap B\) consists of the number \(2\). By the definition of conditional probability, $$P(B|A)=\dfrac{P(A\cap B)}{P(A)}=\dfrac{1}{3}.$$

Note: Since there are 6 possible outcomes in total, \(P(A)=\frac36=\frac12\), \(P(A\cap B)=\frac16\), and then \(P(B|A)=\frac{P(A\cap B)}{P(A)}=\frac16/\frac12=\frac13\).


29 Example: Multiplication Rule (1 of 2)

Consider flipping a fair coin and rolling a fair six-sided die together.

  1. What’s the probability that the coin shows a head?
  2. Given that a head occurs, what’s the probability that the die shows a number bigger than 4?
  3. What’s the probability of getting a head and a number bigger than 4?
  4. Verify that flipping a head and rolling a number bigger than 4 are independent events.

Solution: By the fundamental counting principle, the sample space consists of \(2\times 6=12\) elements. Let \(H\) and \(D\) be the event of getting a head and getting a number bigger than 4 respectively. Then $$ H=\{H1, H2, H3, H4, H5, H6\},\quad D=\{H5,H6,T5,T6\},\quad D\cap H=\{H5, H6\}. $$ Therefore, \(P(H)=\frac{6}{12}=\frac12\) and \(P(D)=\frac{4}{12}=\frac13\)


30 Example: Multiplication Rule (2 of 2)

Given that a head shows, the change of getting a number bigger than 4 is $$P(D\mid H)=\frac{2}{6}=\frac13.$$

This can also be obtained by the multiplication rule, $$P(D\cap H)=P(H)P(D\mid H)=\frac12\cdot\frac13=\frac16.$$

Since $$P(D)=\frac13=P(D\mid H)\quad\text{and then}\quad P(D\cap H)=P(H)P(D|H)=P(H)P(D),$$ the events \(H\) and \(D\) are independent.


31 Example: Multiplication and Addition (1 of 2)

The probability that a student borrows a statistics book from the library is 0.3. The probability that a student borrows a biology book is 0.4. Given that a student borrowed a biology book, the probability that he/she borrows a statistics book is 0.6.

  1. Find the probability that a student borrows a statistics book and a biology book.
  2. Find the probability that a student barrows a statistics boor or a biology book.

32 Example: Multiplication and Addition (2 of 2)

Solution: Denote by \(S\) the event that a student borrows a statistics book, and \(B\) the event that the student borrows a biology book.

From the given conditions, we know that \(P(S)=0.3\), \(P(B)=0.4\) and \(P(S\mid B)=0.6\).

By the multiplication rule, we know $$ P(S\cap B)=P(B)P(S\mid B)=0.4\cdot 0.6=0.24. $$

By the addition rule, we get $$ \begin{aligned} P(S\cup B)=&P(S)+P(B)-P(S\cap B)\\ =&0.3+0.4-0.24=0.46. \end{aligned} $$


33 Replacement or without Replacement


34 Example: Drawing Cards with Replacement

Two cards were randomly drawn from a standard deck of 52 cards with replacement. Find the probability of getting exactly one club card.

Solution: There are two different pairs with exactly one club card: (club, not club), (not club, club). When drawing with replacement, the events are considered to be independent. Therefore, the probability in those two situations are $$P(\text{(club, not club)})=P(\text{club})\cdot P(\text{not club})=\frac{13}{52}\cdot\frac{39}{52},$$ $$P(\text{(not club, club)})=P(\text{not club})\cdot P(\text{club})=\frac{39}{52}\cdot\frac{13}{52}.$$ Then the probability of getting exactly one club is $$P(\text{exactly one club})=\frac{13}{52}\cdot\frac{39}{52}+\frac{39}{52}\cdot\frac{13}{52}=\frac{3}{8}.$$


35 Example: Drawing Cards without Replacement

Two cards were randomly drawn from a standard deck of 52 cards without replacement, which means the first card will not be put back.

Solution: Let \(S1\) be the event of getting a spade in the first drawing and \(S2\mid S1\) be the event of getting the second spade given the first card is a spade. Then \(P(S1)=\frac{13}{52}=\frac14\), \(P(S2\mid S1)=\frac{12}{51}\), and $$ P(S1 \text{ and } S2)=P(S1)P(S2\mid S1)=\frac{1}{4}\cdot\frac{12}{51}=\frac{4}{51}. $$

Let \(NS1\) and \(NS2\) be events of not getting a spade card in first and second drawing respectively. Then $$ P(S1 \text{ and } NS2)+P(NS1\text{ and } S2)= \frac{13}{52}\cdot \frac{39}{51} + \frac{39}{52}\cdot\frac{13}{51}=\frac{39}{102}. $$


Practice: Guess a Password


Practice: Conditional Probability

A special deck of 16 cards has 4 that are blue, 4 yellow, 4 green, and 4 red. The four cards of each color are numbered from one to four. A single card is drawn at random. Find the following probabilities.

  1. The probability that the card drawn is red.
  2. The probability that the card is red, given that it is not green.
  3. The probability that the card is red, given that it is neither red nor yellow.
  4. The probability that the card is red, given that it is not a four.

Source: https://saylordotorg.github.io/text_introductory-statistics/s07-03-conditional-probability-and-in.html


Practice: Conditional Probability Subject to Complement


Practice: Drawing Pens without Replacement

A box contains 10 pens, 6 black and 4 red. Two pens are drawn without replacement, which means that the first one is not put back.


Practice: Rules of Probability