hudm4122 probability and statistical inference february 2, 2015

92
HUDM4122 Probability and Statistical Inference February 2, 2015

Upload: shon-richards

Post on 17-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HUDM4122 Probability and Statistical Inference February 2, 2015

HUDM4122Probability and Statistical Inference

February 2, 2015

Page 2: HUDM4122 Probability and Statistical Inference February 2, 2015

In the last class

• Covariance• Correlation• Scatterplots• Simple linear regression

Page 3: HUDM4122 Probability and Statistical Inference February 2, 2015

Questions? Comments?

Page 4: HUDM4122 Probability and Statistical Inference February 2, 2015

Today

• Ch. 4.1-4.3 in Mendenhall, Beaver, & Beaver

Page 5: HUDM4122 Probability and Statistical Inference February 2, 2015

Today

• Probability in Statistics• Events and the Sample Space• Calculating Probabilities Using Simple Events

Page 6: HUDM4122 Probability and Statistical Inference February 2, 2015

I have a coin in my hand

• What is the probability that I will get heads?

Page 7: HUDM4122 Probability and Statistical Inference February 2, 2015

I have a coin in my hand

• What is the probability that I will get heads?– 50%

Page 8: HUDM4122 Probability and Statistical Inference February 2, 2015

I have a coin in my hand

• What is the probability that I will get tails?

Page 9: HUDM4122 Probability and Statistical Inference February 2, 2015

I have a coin in my hand

• What is the probability that I will get tails?– 50%

Page 10: HUDM4122 Probability and Statistical Inference February 2, 2015

Flipping the Coin

Page 11: HUDM4122 Probability and Statistical Inference February 2, 2015

Now that I’ve flipped the coin

• What is the probability that I will get heads if I flip it again?

Page 12: HUDM4122 Probability and Statistical Inference February 2, 2015

Flipping the coin 10 times

Page 13: HUDM4122 Probability and Statistical Inference February 2, 2015

Flipping the coin 10 times

• What are the odds that I will get heads the next time?

Page 14: HUDM4122 Probability and Statistical Inference February 2, 2015

Flipping the coin 10 times

• What are the odds that I will get heads the next time?

• It depends on whether it’s a fair coin– E.g. a coin where the probability of heads is

exactly 50%

Page 15: HUDM4122 Probability and Statistical Inference February 2, 2015

But if you get heads 10 times in a row

• It’s probably not a fair coin

Page 16: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 1 time, if it’s a fair coin

• ½, or 50%, or 0.5

Page 17: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 2 times, if it’s a fair coin

Page 18: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 2 times, if it’s a fair coin

• 4 cases

• T, H• H, T• T, T• H, H

Page 19: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 2 times, if it’s a fair coin

• 4 cases

• T, H• H, T• T, T• H, H

Page 20: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 2 times, if it’s a fair coin

• 4 cases

• T, H• H, T• T, T• H, H

• ¼ , or 25%, or 0.25

Page 21: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 3 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

Page 22: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 3 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

• 1/8 , or 12.5%, or 0.125

Page 23: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 4 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

Page 24: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 4 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

• 1/16 , or 0.0625

Page 25: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 5 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

Page 26: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 5 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

• 1/32, or 0.03125

Page 27: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 6 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

Page 28: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 6 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

• 1/64, or 0.015065

Page 29: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 7 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

Page 30: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 7 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

• 1/128, or 0.0075325

Page 31: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 8 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

Page 32: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 8 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

• 1/256, or about 0.0038

Page 33: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 9 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

Page 34: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 9 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

• 1/512, or about 0.002

Page 35: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 10 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

Page 36: HUDM4122 Probability and Statistical Inference February 2, 2015

Probability of heads 10 times, if it’s a fair coin

• How many cases?• How many of these cases are heads?

• 1/1024, or about 0.001

Page 37: HUDM4122 Probability and Statistical Inference February 2, 2015

Who thinks this is a fair coin?

Page 38: HUDM4122 Probability and Statistical Inference February 2, 2015

Who thinks this is a fair coin?

• It’s really improbable that it is

• About 1 in 1000

Page 39: HUDM4122 Probability and Statistical Inference February 2, 2015

Who thinks this is a fair coin?

• It’s really improbable that it is

• About 1 in 1000

• Of course, weirder things have happened…– My daughter is 1 in 10,000,000,000, so…

Page 40: HUDM4122 Probability and Statistical Inference February 2, 2015

Questions? Comments?

Page 41: HUDM4122 Probability and Statistical Inference February 2, 2015

Quick non-on-the-test digression

Page 42: HUDM4122 Probability and Statistical Inference February 2, 2015

We just did our first statistical test of the semester…

• The sign test

Page 43: HUDM4122 Probability and Statistical Inference February 2, 2015

We just did our first statistical test of the semester…

• The sign test– A special case of it, anyways

Page 44: HUDM4122 Probability and Statistical Inference February 2, 2015

The Sign Test

• Formulas and theory are out of this class’s scope

Page 45: HUDM4122 Probability and Statistical Inference February 2, 2015

The Sign Test

• Formulas and theory are out of this class’s scope

• But the big idea is• You have an event that you think happens 50%

of the time• But does it really occur 50% of the time?

Page 46: HUDM4122 Probability and Statistical Inference February 2, 2015

End quick non-on-the-test digression

Page 47: HUDM4122 Probability and Statistical Inference February 2, 2015

So, that coin

• Every time you flipped that coin it was a simple event– An outcome that is received on a single repetition

of an experiment

Page 48: HUDM4122 Probability and Statistical Inference February 2, 2015

So, that coin

• Every time you flipped that coin it was a simple event– An outcome that is received on a single repetition

of an experiment

• So when I flipped the coin ten times, it represented 10 simple events

Page 49: HUDM4122 Probability and Statistical Inference February 2, 2015

So, that coin

• Every time you flipped that coin it was a simple event– An outcome that is received on a single repetition

of an experiment

• So when I flipped the coin ten times, it represented 10 simple events

• An event is a set of connected simple events

Page 50: HUDM4122 Probability and Statistical Inference February 2, 2015

Mutual exclusivity

• When you and your significant other decide not to date anyone else?

Page 51: HUDM4122 Probability and Statistical Inference February 2, 2015

Mutual exclusivity

• When you and your significant other decide not to date anyone else?

• No.

Page 52: HUDM4122 Probability and Statistical Inference February 2, 2015

Mutual exclusivity

• When you and your significant other decide not to date anyone else?

• No. Not in stats class, anyways.

Page 53: HUDM4122 Probability and Statistical Inference February 2, 2015

Mutual exclusivity

• Mutual Exclusivity is when two events cannot both occur together

• A coin cannot be both heads and tails at the same time

Page 54: HUDM4122 Probability and Statistical Inference February 2, 2015

Mutual exclusivity

• Mutual Exclusivity is when two events cannot both occur together

• A coin cannot be both heads and tails at the same time

• Can you think of other examples of mutual exclusivity?

Page 55: HUDM4122 Probability and Statistical Inference February 2, 2015

Questions? Comments?

Page 56: HUDM4122 Probability and Statistical Inference February 2, 2015

Sample space

• The sample space is the set of all possible simple events

• So for a fair coin, it’s {T, H}

Page 57: HUDM4122 Probability and Statistical Inference February 2, 2015

What if you have a 6-sided die?

Page 58: HUDM4122 Probability and Statistical Inference February 2, 2015

What if you have a 6-sided die?

• Sample space = {1, 2, 3, 4, 5, 6}

Page 59: HUDM4122 Probability and Statistical Inference February 2, 2015

So if I have a six-sided die

• What is the probability that I roll a 6?

Page 60: HUDM4122 Probability and Statistical Inference February 2, 2015

So if I have a six-sided die

• What is the probability that I roll a 6?– 1/6 or 0.17

Page 61: HUDM4122 Probability and Statistical Inference February 2, 2015

So if I have a six-sided die

• What is the probability that I roll an odd number?

Page 62: HUDM4122 Probability and Statistical Inference February 2, 2015

So if I have a six-sided die

• What is the probability that I roll an odd number?– 1, 3, 5– Out of– {1, 2, 3, 4, 5, 6}

Page 63: HUDM4122 Probability and Statistical Inference February 2, 2015

So if I have a six-sided die

• What is the probability that I roll an odd number?– 1/2 or 0.5

Page 64: HUDM4122 Probability and Statistical Inference February 2, 2015

So if I have a six-sided die

• What is the probability that if I roll the die twice, I get 1 both times?

Page 65: HUDM4122 Probability and Statistical Inference February 2, 2015

So if I have a six-sided die

• What is the probability that if I roll the die twice, I get 1 both times?– 1/36

Page 66: HUDM4122 Probability and Statistical Inference February 2, 2015

Questions? Comments?

Page 67: HUDM4122 Probability and Statistical Inference February 2, 2015

Compound events

• Multiple simple events, one after another

Page 68: HUDM4122 Probability and Statistical Inference February 2, 2015

What is the probability of getting 2 heads in a row

• T, T• H, H• T, H• H, T

• 1 out of 4

Page 69: HUDM4122 Probability and Statistical Inference February 2, 2015

More complex combinations possible too

Page 70: HUDM4122 Probability and Statistical Inference February 2, 2015

Let’s look at another example

• Let’s say I flip a coin 4 times• And I get 3 heads and 1 tail– We don’t care about the order

• What is the probability of that?

Page 71: HUDM4122 Probability and Statistical Inference February 2, 2015

3 heads, 1 tail

• How many cases are there?

Page 72: HUDM4122 Probability and Statistical Inference February 2, 2015

3 heads, 1 tail

• How many cases are there?

• 16– HHHH, HHHT, HHTH, HHTT, – HTHH, HTHT, HTTH, HTTT, – THHH, THHT, THTH, THTT, – TTHH, TTHT, TTTH, TTTT,

Page 73: HUDM4122 Probability and Statistical Inference February 2, 2015

3 heads, 1 tail

• How many cases have 3 heads, 1 tail?

• 16– HHHH, HHHT, HHTH, HHTT, – HTHH, HTHT, HTTH, HTTT, – THHH, THHT, THTH, THTT, – TTHH, TTHT, TTTH, TTTT,

Page 74: HUDM4122 Probability and Statistical Inference February 2, 2015

3 heads, 1 tail

• How many cases have 3 heads, 1 tail?

• 16– HHHH, HHHT, HHTH, HHTT, – HTHH, HTHT, HTTH, HTTT, – THHH, THHT, THTH, THTT, – TTHH, TTHT, TTTH, TTTT,

Page 75: HUDM4122 Probability and Statistical Inference February 2, 2015

3 heads, 1 tail

• How many cases have 3 heads, 1 tail?

• 4/16 = 0.25– HHHH, HHHT, HHTH, HHTT, – HTHH, HTHT, HTTH, HTTT, – THHH, THHT, THTH, THTT, – TTHH, TTHT, TTTH, TTTT,

Page 76: HUDM4122 Probability and Statistical Inference February 2, 2015

This is an illustration of probability

• To quote the book

• The probability of an event A is equal to the sum of the probabilities of the simple events contained in A

Page 77: HUDM4122 Probability and Statistical Inference February 2, 2015

Example with 1 head out of 2 flips

• 4 cases– HH– HT (1/4)– TH (1/4)– TT

• ¼ + ¼ = ½

Page 78: HUDM4122 Probability and Statistical Inference February 2, 2015

Example with 3 heads out of 4 flips

• 16 cases– HHHH, HHHT, HHTH, HHTT, – HTHH, HTHT, HTTH, HTTT, – THHH, THHT, THTH, THTT, – TTHH, TTHT, TTTH, TTTT,

• 1/16 + 1/16 + 1/16 + 1/16 = 4/16 = 1/4

Page 79: HUDM4122 Probability and Statistical Inference February 2, 2015

Questions? Comments?

Page 80: HUDM4122 Probability and Statistical Inference February 2, 2015

Probabilities don’t have to be equal for all examples in the sample space

Page 81: HUDM4122 Probability and Statistical Inference February 2, 2015

Probabilities don’t have to be equal for all examples in the sample space

• For example, let’s say that you have made a new friend, randomly sampled from the population of New York City residents

Page 82: HUDM4122 Probability and Statistical Inference February 2, 2015

Probabilities don’t have to be equal for all examples in the sample space

• For example, let’s say that you have made a new friend, randomly sampled from the population of New York City residents– That’s how I make friends

Page 83: HUDM4122 Probability and Statistical Inference February 2, 2015

Probabilities don’t have to be equal for all examples in the sample space

• For example, let’s say that you have made a new friend, randomly sampled from the population of New York City residents– That’s how I make friends

• 56% of NYC residents take mass transit to work

• 28% of NYC residents drive to work

Page 84: HUDM4122 Probability and Statistical Inference February 2, 2015

Probabilities don’t have to be equal for all examples in the sample space

• For example, let’s say that you have made a new friend, randomly sampled from the population of New York City residents– That’s how I make friends

• 56% of NYC residents take mass transit to work• 28% of NYC residents drive to work

• What is the probability that your friend either takes mass transit or drives to work?

Page 85: HUDM4122 Probability and Statistical Inference February 2, 2015

Probabilities don’t have to be equal for all examples in the sample space

• For example, let’s say that you have made a new friend, randomly sampled from the population of New York City residents– That’s how I make friends

• 56% of NYC residents take mass transit to work• 28% of NYC residents drive to work

• What is the probability that your friend either takes mass transit or drives to work?– 84%

Page 86: HUDM4122 Probability and Statistical Inference February 2, 2015

Questions? Comments?

Page 87: HUDM4122 Probability and Statistical Inference February 2, 2015

If we have time

• Left-over from previous class

Page 88: HUDM4122 Probability and Statistical Inference February 2, 2015

If we have time

• Demo finding A and B for Y = A + Bx

• In Excel

• Using Sum of Squared Residuals– Residual = Difference Between Predicted Y and

Actual Y

Page 89: HUDM4122 Probability and Statistical Inference February 2, 2015

Questions? Comments?

Page 90: HUDM4122 Probability and Statistical Inference February 2, 2015

Upcoming Classes

• 2/9 No class• 2/11 Permutations, Combinations, Unions, and

Complements– Ch. 4.4– HW2 due

• 2/13 Independence and Conditional Probability– Ch. 4.5, 4.6

Page 91: HUDM4122 Probability and Statistical Inference February 2, 2015

Homework 2

• Due in 7 days• In the ASSISTments system

Page 92: HUDM4122 Probability and Statistical Inference February 2, 2015

Questions? Comments?