Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17,...

60
Assignment #1 Chapter 1: 14, 17, 19, 20 Chapter 2: 25, 32 Due Tomorrow by 2 pm in your TA’s homework box

Transcript of Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17,...

Page 1: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Assignment #1

Chapter 1: 14, 17, 19, 20 Chapter 2: 25, 32 Due Tomorrow by 2 pm in your TA’s homework box

Page 2: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Assignment #2

Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Page 3: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Reading

For Today: Chapter 5 For Tuesday: Chapter 6

Page 4: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Chapter 4 Review

Page 5: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Sampling Distribution

The probability distribution of all values for an estimate that we might obtain when we sample a population

Page 6: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

N

Page 7: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The standard error of an estimate is the standard deviation of its sampling

distribution.

The standard error predicts the sampling error of the

estimate.

Page 8: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Standard error of the mean

σY =σn

Page 9: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Estimate of the standard error of the mean

SEY =sn

This gives us some knowledge of the likely difference between our sample mean and the true population mean.!

Page 10: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

95% Confidence Interval

If you took 1000 independent samples and calculated the 95% confidence

interval of your estimate from each, ~950 of them would contain the true population

parameter

Page 11: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The 2SE rule-of-thumb

The interval from - 2 to + 2 provides a rough estimate of the 95% confidence interval for the mean. "

SEY

SEY

Y

Y

(Assuming normally distributed population and/or sufficiently large sample size.)!

Page 12: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Pseudoreplication

The error that occurs when samples are not "independent, but they are treated as though they are."

Page 13: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Probability

Page 14: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The probability of an event is its true relative frequency; the proportion of times the event would occur if we repeated the

same process over and over again.""

Page 15: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Two events are mutually exclusive if they cannot both be true. "

Page 16: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Mutually exclusive

Page 17: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Mutually exclusive

Heads, Tails Boy, Girl Ace, King Apple, Orange

Page 18: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Mutually exclusive

Pr(A and B) = 0

Page 19: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Not mutually exclusive

Pr(A and B) ≠ 0 Pr(purple AND square) ≠ 0

Page 20: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Not mutually exclusive

Heads 1st flip, Tails 2nd flip Boy, Green eyes Ace, Hearts Apple, Red

Page 21: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

For example

Event A: First child is female Event B: Second child is female P(A) = 0.48 P(B) = 0.48 But P(A and B) ≠ 0, so these events are NOT mutually exclusive.

Page 22: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Probability distribution

A probability distribution describes the true relative frequency (a.k.a. the probability) of all

possible values of a random variable.

Page 23: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Probability distribution for the outcome of a roll of a die

Number rolled"

Frequency"

Page 24: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Probability distribution for the sum of a roll of two dice

Sum of two dice"

Frequency"

Page 25: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The addition principle

If two events A and B are mutually exclusive, then

Pr[A OR B] = Pr[A] + Pr[B]

Page 26: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The addition principle

P[1st or 2nd roll is 3] = 1/6 + 1/6 = 1/3"

Page 27: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The probability of a range

Pr[Number of boys ≥ 6] = Pr[6] + Pr[7] + Pr[8]....

Page 28: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The probabilities of all possibilities add to 1.

Page 29: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Probability of Not

Pr[NOT rolling a 2] = 1 – Pr[Rolling a 2] = 5/6

Page 30: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

General Addition Principle

Page 31: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

General Addition Principle Pr[A OR B] = Pr[A] + Pr[B] - Pr[A AND B].

Page 32: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

General addition principle Pr[A OR B] = Pr[A] + Pr[B] - Pr[A AND B].

If two events A and B are mutually exclusive, then Pr[A AND B] = 0,

therefore:

Pr[A OR B] = Pr[A] + Pr[B]

Page 33: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Independence

Two events are independent if the occurrence of one gives no information about whether the second will

occur.

Page 34: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The multiplication principle

The multiplication principle: If two events A and B are independent, then

Pr[A AND B] = Pr[A] × Pr[B]

Page 35: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The multiplication principle

P[1st and 2nd roll is 3] = 1/6 x 1/6 = 1/36"

Page 36: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Offspring of two "carriers":

Pr[congenital nightblindness]=0.25

Pr[ (first child has nightblindness) AND

(second child has nightblindness)] = 0.25 × 0.25 = 0.0625. "

What is the probability that two kids from this family both have nightblindedness?"

Page 37: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box
Page 38: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Probability trees

Page 39: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Phenotypes in two-child family

Page 40: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Phenotypes in two-child family

Page 41: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The probability of A OR B involves addition. Pr(A or B) = Pr(A) + Pr(B) if the two are mutually

exclusive. The probability of A AND B involves multiplication

Pr(A and B) = Pr(A) Pr(B) if the two are independent "

Short summary

Page 42: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Dependent events

Variables are not always independent.""The probability of one event may depend on the "outcome of another event"

Page 43: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Washing hands

Page 44: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Freq

uenc

y"

Page 45: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Hand washing after using the restroom

•  Pr[male] = 0.495

•  Pr[male washes his hands] = 0.74

•  Pr[female washes her hands] = 0.83

Page 46: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Hand washing

Page 47: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Are sex and hand washing independent? Pr(male) = 0.495 Pr(hand washing) = 0.366 + 0.419 = 0.785 Pr(male AND hand washing) = 0.366 ≠ Pr(male) × Pr(hand washing) = 0.495 × 0.785 = 0.389 So these two events are NOT independent.

Page 48: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Freq

uenc

y"

Page 49: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Conditional probability

Pr[A|B]"

The conditional probability of an event is the probability of that event occurring given that a

condition is met.

Page 50: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Pr(hand washing | male) = 0.74.

Pr(A | B) means the probability of A if B is true. It is read as "the probability of A given B." "

Page 51: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Pr A[ ] = Pr A | B[ ]All valuesof B∑ Pr B[ ]

Law of total probability

Page 52: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Freq

uenc

y"

Page 53: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The probability of hand washing is Pr[hand washing] =

Pr(hand washing | male) Pr(male) + Pr(hand washing | female) Pr(female)

= 0.74 (0.495) + 0.83 (0.505) = 0.785

Page 54: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The general multiplication rule

Pr[A AND B] = Pr[A] Pr[B | A]

Page 55: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The general multiplication rule

Pr[A AND B] = Pr[A] Pr[B | A]

If two events A and B are independent, then Pr[B|A] = Pr[B], therefore:

Pr[A AND B] = Pr[A] × Pr[B]

Page 56: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

The general multiplication rule

Pr[A AND B] = Pr[A] Pr[B | A] Pr[A AND B] = Pr[B] Pr[A | B] Therefore Pr[B] Pr[A | B] = Pr[A] Pr[B | A]

Page 57: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Bayes' theorem

Pr A |B[ ] =Pr B |A[ ]Pr[A]

Pr[B]

Page 58: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

In class exercise Using data collected in 1975, the probability of women had cervical cancer was 0.0001. The probability that a biopsy would correctly identify these women as having cancer was 0.90. The probabilities of a “false positive” (the test saying there was cancer when there was not) was 0.001. What is the probability that a woman with a positive result actually has cancer?

Page 59: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Pr[cancer | positive result] = ???

Using data collected in 1975, the probability of women had cervical cancer was 0.0001. The probability that a biopsy would correctly identify these women as having cancer was 0.90. The probabilities of a “false positive” (the test saying there was cancer when there was not) was 0.001. What is the probability that a woman with a positive result actually has cancer?

Page 60: Assignment #1 - zoology.ubc.camfscott/lectures/05_Probability.pdf · Assignment #2 Chapter 3: 17, 21 Chapter 4: 18, 20 Due Next Friday, Oct. 2nd by 2pm in your TA’s homework box

Pr[cancer | positive result] = ?

Using data collected in 1975, the probability of women had cervical cancer was 0.0001. The probability that a biopsy would correctly identify these women as having cancer was 0.90. The probabilities of a “false positive” (the test saying there was cancer when there was not) was 0.001. What is the probability that a woman with a positive result actually has cancer?

Pr A |B[ ] =Pr B |A[ ]Pr[A]

Pr[B]