Discussion 4: Probability#

STATS 60 / STATS 160 / PSYCH 10

Today’s section

  • Recap of lecture material.

  • Week 4 practice quiz 1.

  • (Mis)calculating probabilities with Andrew Huberman.

  • Week 4 practice quiz 2.

Recap#

Probability definitions#

  • A random process is something that results in a random outcome.

  • The set of possible outcomes is called the sample space.

  • An event is a collection of some of the possible outcomes.

  • If all outcomes are equally likely, then the probability of an event is equal to the number of outcomes in the event divided by the total number of possible outcomes.

Probability definitions#

Probability calculations#

  • You can use the multiplication rule to calculate the number of outcomes in the sample space or in an event.

  • The complement of an event is the collection of all outcomes not in the original event.

  • The probability of a complement is one minus the probability of the original event.

  • If two events A and B are exclusive, then

    \[\mathrm{Pr}[\text{A or B}] = \mathrm{Pr}[A] + \mathrm{Pr}[B]\]

Practice quiz 1#

Question 1#

  • There is a class with 30 students. Suppose a professor randomly selects one student and then randomly selects a second, different student.

    • What is the size of the sample space? In other words, what is the number of possible outcomes?

    • Give an example of an event for this sample space.

Question 1: solution#

  • The number of possible outcomes is \(30\times 29\).

  • An example of an event is that both the students are first year students.

  • What is another example of an event?

Question 2#

  • Suppose that I flip 5 coins.

  • Which of the follow sequences of heads (H) and tails (T) is more likely? Why? a. HHHHH

    b. HTTHT

Question 2: solution#

  • The two sequences have the same probability.

  • By the multiplication rule, the total number of possible outcomes is \(2^{5}\).

  • This means that any particular outcome has probability \(\frac{1}{2^5}\).

  • The two sequences both have probability \(\frac{1}{2^5}\) and are equally likely.

Question 3#

Suppose I have a bag with 10 balls labeled 1,2,3,…,10.

  • I draw three balls from the bag without replacement.

  • What is the probability that the labels on the balls are increasing by one (for example the first ball could be 1, the second ball 2, and the third ball 3)?

  • Justify your answer.

Question 3: solution#

  • There are 8 outcomes in the event that the labels on the balls are increasing by one.

  • These outcomes correspond to the starting number which could be any number between 1 and 8.

  • By the multiplication rule, the total number of possible outcomes is \(10 \times 9 \times 8\). This means that the probability of the event is

    \[\mathrm{Pr}[\text{labels increasing by one}] = \frac{8}{10 \times 9 \times 8}=0.011\]

Section activity#

Andrew Huberman#

  • Andrew Huberman is a Stanford professor with a very popular health podcast Huberman Labs.

  • Here he “calculates” the probability that a woman who is attempting to get pregnant falls pregnant after 5 to 6 months.

  • Is Andrew Huberman’s calculation correct? What is the actual probability?

  • What assumptions did you make?

Solution#

  • Andrew Huberman cannot be correct because probabilities cannot exceed 100%.

  • The problem is that the event are not exclusive.

  • The probability can be computed using complements:

    • \(\mathrm{Pr}[\text{falls pregnant in 6 months}]\)

    • is equal to

    • \(1-\mathrm{Pr}[\text{does not fall pregnant in 6 months}]\)

    • equals \(1-0.8^6 =0.738\).

Assumptions#

  • We assumed that the probability the woman fell pregnant in a given month is 20%.

  • We also assumed that attempts in different months were independent (this let us use the multiplication rule).

  • The independence assumption might not hold for everyone, but Andrew Huberman is trying to give advice to “typical” women who don’t yet need to see a doctor.

Follow up#

Practice quiz 2#

Question 1#

  • Suppose that you roll two six sided dice.

    • What is the size of the sample space? In other words, what is the number of possible outcomes?

    • Give an example of an event for this sample space.

Question 1: solution#

  • By the multiplication rule, the number of possible outcomes is \(6 \times 6 = 36\).

  • An example of an event is that both die land on 6.

  • What is another example of an event?

Question 2#

  • Suppose I flip 5 coins.

  • What is the probability that I get at least one heads?

  • Justify your answer.

Question 2: solution#

  • The total number of outcomes is \(2^5\) (by the multiplication rule).

  • The compliment of the event “getting at least one head” is “getting no heads”.

  • The event no heads corresponds to exactly one event. This means that \(\mathrm{Pr}[\text{no heads}] = \frac{1}{2^5}\).

  • And by the rule of compliments \(\mathrm{Pr}[\text{at least one head}] = 1-\frac{1}{2^5}\).

Question 3#

  • Suppose you create a new pin by selecting a random number between 0000 and 9999.

  • What is the probability that all the digits are distinct?

  • Justify your answer.

Question 3: solutions#

  • The total number of possible outcomes is \(10,000 = 10^4\).

  • By the multiplication rule, the number of pins with distinct digits is

    \[ 10 \times 9 \times 8 \times 7\]
  • The probability that the pin has all distinct digits is therefore

    \[\mathrm{Pr}[\text{all digits distinct}] = \frac{10 \times 9 \times 8 \times 7}{10^4} =0.504\]