Probability (Part 2)

M. Drew LaMar
February 8, 2017

“I know too well that these arguments from probabilities are imposters, and unless great caution is observed in the use of them, they are apt to be deceptive.”

- Plato

Course Announcements

  • Solutions for Homeworks #1 and 2 are on Blackboard!!!

Mosaic plots are awesome!

Totally, dude...

Definition: The probability of an event not occurring is one minus the probability that it occurs. \[ \mathrm{Pr[{\it not}\ A]} = 1-\mbox{Pr[A]} \]

Definition: The law of total probability is given by \[ \begin{align*} \mathrm{Pr[A]} & = \sum_{B\ \mathrm{in} \ \mathcal{M}}\mathrm{Pr[A \ and \ B]} \\ & = \sum_{B\ \mathrm{in} \ \mathcal{M}} \mathrm{Pr[B]}\ \mathrm{Pr[A\ | \ B]}, \end{align*} \] where \( \mathcal{M} \) is a set of mutually exclusive events such that \[ \sum_{B\ \mathrm{in} \ \mathcal{M}}\mathrm{Pr[B]} = 1 \]

Law of total probability and mosaic plots

alt text

Visualizing probability - Probability trees

alt text

alt text

Probability distributions

Definition: A probability distribution is a list of the probabilities of all mutually exclusive outcomes of a random trial.

Compare to:

Definition: A probability distribution (or relative frequency distribution) is a list of the probabilities of all values of a random variable in a sample or population.

Discrete probability distributions

alt text

alt text

How is this different? same?

Continuous probability distributions

Probability densities alt text

Tips for Solving Probability Problems

  1. Write out the probability that you're are being asked to find. Is it a conditional probability? AND? OR?
  2. Identify probabilities that you are given (again, are these conditionals? ANDs? ORs?)
  3. Draw a probability tree (if appropriate)

Practice: Contingency tables

Smoking and cancer contingency table

            health
status       cancer not cancer    Sum
  smoker       8944      43056  52000
  not smoker    624      47376  48000
  Sum          9568      90432 100000

Question: What is Pr[smoker]?

Answer: 52000/100000 = 0.52

Question: What is Pr[cancer]?

Answer: 9568/100000 = 0.09568

Practice: Contingency tables

Smoking and cancer contingency table

            health
status       cancer not cancer    Sum
  smoker       8944      43056  52000
  not smoker    624      47376  48000
  Sum          9568      90432 100000

Question: What is Pr[cancer | smoker]?

Answer: 8944/52000 = 0.172

Question: What is Pr[smoker | cancer]?

Answer: 8944/9568 = 0.9347826

Practice: Contingency tables

Smoking and cancer contingency table

            health
status       cancer not cancer    Sum
  smoker       8944      43056  52000
  not smoker    624      47376  48000
  Sum          9568      90432 100000

Question: What is Pr[smoker AND cancer]?

Answer: 8944/100000 = 0.08944

Visualizing probability - Mosaic plots

plot of chunk unnamed-chunk-4

plot of chunk unnamed-chunk-5

Visualizing probability - Probability trees

alt text

Visualizing probability - Probability trees

plot of chunk unnamed-chunk-6

alt text

Visualizing probability - Probability trees

alt text

Visualizing probability - Probability trees

plot of chunk unnamed-chunk-7

alt text