Math 132B

Class 10

Chance

  • “What are the chances the Lions will win this weekend?”
  • “What’s the chance of rain tomorrow?”
  • “What is the chance that a patient responds to a new therapy?”
  • “What is the chance that an infant will pick the helper?”
  • “What is the chance a coin will land heads up?”

Randomness

Random does not mean that everything is equally likely, or that there is no law or pattern at all!

Random does mean that we cannot predict the exact outcome for some reason.

  • Truly random (quantum phenomena)

  • Too complicated to predict

Theory of Probability

Way of constructing mathematical models of random phenomena.

What is a Model? (Cell biology)

Image by Science Primer (National Center for Biotechnology Information).

What is a Model? (Atoms)

What is a Model? (Planets)

Geocentric model:

Heliocentric model:

What is a Model? (Geography)

What is a Model? (Free fall)

\[h(t) = h_0 + v_0 t - \frac{1}{2}gt^2\]

  • \(h_0\): initial height
  • \(v_0\): initial velocity
  • \(g\): gravitational constant

What are models good for?

  • To understand how the world works
  • To predict, calculate or plan practical solutions

  Why?  

All models are wrong …

but some are useful.

George Box

Probability Models

  • Experiment
  • Outcome
  • Event
  • Probability

Random Experiments

A random experiment is an action or process that leads to one of several possible outcomes.

  • flipping a coin and observing the side facing up

  • measuring the air temperature at a given location at a given time

  • organizing an election for an office

  • testing 200 patients for Covid-19

These are the things that we are trying to model.

Outcomes

An outcome in an experiment is the observable result after conducting the experiment.

  • One of the two faces on the coin.

  • A number with unit, for example \(21^\circ\mathrm{C}\).

  • The winner of the election.

  • The list of results of the 200 tests performed.

The set of all possible outcomes is called the sample space of the experiment.

Events

An event is a collection of outcomes.

  • A temperature between \(15^\circ\mathrm{C}\) and \(25^\circ\mathrm{C}\).

  • A left-leaning candidate won.

  • 30 out of the 200 patients tested positive.

Events can be referred to by letters.

  • Suppose event \(A\) is the event of rolling a number smaller than 3 on a die. \[A = \{1, 2 \} \]

Probability

The probability of an event tells us how likely is that event to happen.

  • Subjective probability: A number that quantify our belief that the event will occur.

  • Frequency based probability: The proportion of times the event would occur if the random phenomenon could be observed an infinite number of times.

Example: flipping a single coin

Outcomes:

Head and Tail

Example: flipping a single coin

Probabilities:

  • Both outcomes are equally likely

  • Their probabilities have to add to 1.

  • \(\operatorname{P}(\text{Head}) = \operatorname{P}(\text{Tail}) = \frac{1}{2}\)

Parameters

Mathematical models often have parameters.

\[h(t) = {\color{red} h_0} + {\color{green} v_0} t - \frac{1}{2}{\color{blue}g}t^2\]

  • \(\color{red}h_0\): initial height
  • \(\color{green}v_0\): initial velocity
  • \(\color{blue}g\): gravitational constant

The probability of Head and the probability of Tail

The Law of Large Numbers

When repeating an experiment many times, the proportion of times a specific outcome is observed converges to the probability of that outcome.

Example: single coin again

Probability Properties

Notation: probability of an event \(A\): \(\operatorname{P}(A)\)

If there are only finitely many possible outcomes, the probability of an event is the sum of the probabilities of all the outcomes of the event.

Disjoint / Mutually Exclusive Events

Two events or outcomes are called disjoint or mutually exclusive if they cannot both happen at the same time.

Addition Rule for Disjoint Events

If \(A\) and \(B\) represent two disjoint events, then the probability that either occurs is \[P(A \cup B) = P(A) + P(B), \]

The \(\cup\) symbol denotes the union of two events; i.e., \(P(A \text{ or } B)\).

If there are \(k\) disjoint events \(A_1,\dots,A_k\), then the probability that one of these outcomes will occur is \[P(A_1) + P(A_2) + \cdots + P(A_k)\]

General Addition Rule

Suppose that we are interested in the probability of drawing a diamond or a face card out of a standard 52-card deck.

Does \(P(\text{diamond or face card}) = 13/52 + 12/52\)?

General Addition Rule…

To correct the double counting of the three cards that are in both events, subtract the probability that both events occur… \[\begin{align*} P(\text{diamond or face card}) =& P(\text{diamond}) + P(\text{face card}) - P(\text{diamond and face card}) \\ =& 13/52 + 12/52 - 3/52 \\ =& 22/52 \end{align*}\]

For any two events \(A\) and \(B\), the probability that either occurs is \[P(A \cup B) = P(A) + P(B) - P(A \cap B).\]

The \(\cap\) symbol denotes the intersection of two events; i.e., \(P(A \text{ and }B)\).

Complement of an Event

Let \(D = \{2, 3\}\) represent the event that the outcome of a die roll is 2 or 3.

The complement of \(D\) represents all outcomes in the sample space that are not in \(D\).

Complement of an Event…

The complement of an event \(A\) is denoted by \(A^C\).

An event and its complement are mathematically related:

\[P(A) + P(A^C) = 1 \qquad P(A) = 1 - P(A^C)\]

Independent Events

Two events \(A\) and \(B\) are independent if the occurrence or non-occurrence of \(A\) does not affect the probability of \(B\) and vice versa.

  • Two infants choosing a helper without communicating with each other
  • Tossing H on a coin and rolling 5 on a die
  • Rolling 5 on the first roll and then rolling an even number on the second roll.

Probability of independent events

If two events \(A\) and \(B\) are independent then the probability that both \(A\) and \(B\) occur equal the product of their separate probabilities.

\[P(A \cap B) = P(A)P(B) \]

Couple of experiments

  1. I flip a coin. If it lands heads up, I roll a regular die. If it lands tails up, I roll a die with three 2s and there 6s.

  2. I remove two tokens from a bag that contains 3 blue and 2 yellow tokens.

Conditional Probability: Intuition

Consider height in the US population.

What is the probability that a randomly selected individual in the population is taller than 6 feet, 4 inches?

  • Suppose you learn that the individual is a professional basketball player.
  • Does this change the probability that the individual is taller than 6 feet, 4 inches?

Conditional Probability: Concept

The conditional probability of an event \(A\), given a second event \(B\), is the probability of \(A\) happening, knowing that the event \(B\) has happened.

  • This conditional probability is denoted \(P(A|B)\).

Couple of experiments again

  1. I flip a coin. If it lands heads up, I roll a regular die. If it lands tails up, I roll a die with three 2s and there 6s.

    Find \(P(6|T)\)

  2. I remove two tokens from a bag that contains 3 blue and 2 yellow tokens.

    Find \(P(\text{second yellow}|\text{first yellow})\)

Another example

Toss a fair coin three times. Let \(A\) be the event that exactly two heads occur, and \(B\) the event that at least two heads occur.

  • \(P(A|B)\) is the probability of having exactly two heads among the outcomes that have at least two heads.

  • Conditioning on \(B\) means that the sample space consists of \(\{HHH, HHT, HTH, THH\}\), all possible sets of three tosses where at least two heads occurred.

  • In this set of outcomes, \(A\), consists of the last three, so \(P(A|B) = 3/4\).

Conditional Probability: Formula

As long as \(P(B) > 0\), \[P(A|B) = \dfrac{P(A \cap B)}{P(B)}. \]

\[\begin{align*} P(A|B) =& \dfrac{P(\text{at least two heads and exactly two heads})}{P(\text{at least two heads})} \\ =& \dfrac{P(\text{exactly two heads})}{P(\text{at least two heads})} \\ =& \dfrac{(3/8)}{(4/8)} = 3/4 \end{align*}\]

Independence, Again…

A consequence of the formula for conditional probability:

  • If \(P(A|B) = P(A)\), then \(A\) and \(B\) are independent; knowing \(B\) offers no information about whether \(A\) occurred.

Couple of experiments one more time

  1. I flip a coin. If it lands heads up, I roll a regular die. If it lands tails up, I roll a die with three 2s and there 6s.

    Find \(P(T \text{ and } 6)\)

  2. I remove two tokens from a bag that contains 3 blue and 2 yellow tokens.

    Find \(P(\text{both tokens are yellow})\)

General Multiplication Rule

If \(A\) and \(B\) represent two outcomes or events, then \[P(A \cap B) = P(A|B)P(B).\]

This follows from rearranging the formula for conditional probability: \[P(A|B) = \frac{P(A \cap B)}{P(B)} \rightarrow P(A|B)P(B) = P(A \cap B)\]

Unlike the previously mentioned multiplication rule, this is valid for events that might not be independent.