Probability Foundations II

STAT 20: Introduction to Probability and Statistics

Agenda

  • Lecture, Combinatorics and Computing Probabilities
  • WS Part 1
  • Lecture, Simulating Code in R
  • WS Part 2
  • Fun Live Experiment: The Birthday Problem!

Lecture Part 1

Combinatorics and Computing Probabilities

60:00

Break

05:00

Worksheet Part 1

25:00

Lecture Part 2

Simulation Code in R

25:00

Break

05:00

Worksheet Part 2

20:00

Fun Experiment, The Birthday Problem!

  • Here is a question: How many people do you need in a room before there is a 50% chance at least 2 of them share a birthday. Guesses?

-Let’s see if we can work it out with probability, and then see if anyone in the room shares a birthday (don’t check yet!)

Setting Up the Problem

  • Say we have \(K\) people in a room

  • Define the event \(A = \{\text{At least two people in a room share a birthday}\}\)

  • Consider the complement event, \(A^{C} = \{\text{no one in the room shares a birthday}\}\)

  • In this case, computing \(P(A^{C})\) seems like the easier route, so we will do that

Two People In a Room

  • Consider two people in a room. Total number of birthdays possible is \(365^2\).
  • For them NOT to share a birthday, \(365 \times 364\). Person 1 can have any day of the year, person 2 has to have not that day.

\[P(\text{2 people don't share birthday out of 2}) = \frac{365 \times 364}{365 \times 365}\]

\[P(\text{At least 2 people share a birthday out of 2}) = 1- \frac{365 \times 364}{365 \times 365}\]

Three People In a Room

  • Now consider a third person, total birthdays possible \(365^3\)
  • Yet third person cannot share first or second’s birthday, so only 363 days left for them

\[P(\text{2 people don't share birthday out of 3}) = \frac{365 \times 364 \times 363}{365 \times 365 \times 365}\]

  • Notice numbers on top are getting smaller, on bottom staying same size.

\[P(\text{At least 2 people share a birthday out of 3}) = 1-\frac{365 \times 364 \times 363}{365 \times 365 \times 365}\]

K People In a Room

  • Recognizing the pattern here, we see that with \(K\) people in a room, the probability no one shares a birthday is

\[P(\text{K people don't share birthday}) = \frac{365}{365} \times \frac{364}{364}\times \frac{363}{365} \times \cdots \frac{(365-K+1)}{365}\] \[P(\text{At least 2 people share a birthday out of K}) = 1-\frac{365}{365} \times \frac{364}{364}\times \frac{363}{365} \times \cdots \frac{(365-K+1)}{365}\]

  • It turns out, this equals 0.5 at 23 people! Not really that many at all!

  • Let’s test it out, make (hopefully 2) groups of 23 and lets see if anyone in those groups shares a birthday!