Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they...

66
Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Transcript of Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they...

Page 1: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where

they become mathematical certainties.

Page 2: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

“You can never foretell what any one man will do,” observed

Holmes, “but you can say with precision what an average number

will be up to.

Page 3: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Individuals vary, but percentages remain constant.

So says the statistician.”

Page 4: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Basic Probability & Discrete Probability Distributions

Why study Probability?

Page 5: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

To infer something about the population based on sample

observations

We use Probability Analysis to measure the chance that something will occur.

Page 6: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

What’s the chance

If I flip a coin it will come up heads?

Page 7: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

50-50

If the probability of flipping a coin is 50-50, explain why when I flipped a coin, six of the tosses were heads and four of the tosses were tails?

Page 8: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Think of probability in the long run:

A coin that is continually flipped, will 50% of the time be heads and 50% of the time be tails

in the long run.

Page 9: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Probability is a proportion or fraction

whose values range between 0 and 1, inclusively.

Page 10: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

The Impossible Event

Has no chance of occurring and has a probability of

zero.

Page 11: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

The Certain Event

Is sure to occur and has a probability of one.

Page 12: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Probability Vocabulary

1) Experiment

2) Events

3) Sample Space

4) Mutually Exclusive

5) Collectively Exhaustive

6) Independent Events

7) Compliment

8) Joint Event

Page 13: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Experiment

An activity for which the outcome is uncertain.

Page 14: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Examples of an Experiment:

• Toss a coin

• Select a part for inspection

• Conduct a sales call

• Roll a die

• Play a football game

Page 15: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Events

Each possible outcome of

the experiment.

Page 16: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Examples of an Event:

• Toss a coin

• Select a part for inspection

• Conduct a sales call

• Roll a die

• Play a football game

• Heads or tails

• Defective or non-defective

• Purchase or no purchase

• 1,2,3,4,5,or 6

• Win, lose, or tie

Page 17: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Sample Space

The set of ALL possible outcomes of an experiment.

Page 18: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Examples of Sample Spaces:

• Toss a coin

• Select a part for inspection

• Conduct a sales call

• Roll a die

• Play a football game

• Heads, tails

• Defective, nondefective

• Purchase, no purchase

• 1,2,3,4,5,6

• Win, lose, tie

Page 19: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Mutually Exclusive Events cannot both occur simultaneously.

Page 20: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Collectively Exhaustive

A set of events is collectively exhaustive if one of the events must occur.

Page 21: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Independent Events

If the probability of one event occurring is unaffected by the occurrence or nonoccurrence of the other event.

Page 22: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Complement

The complement of Event A includes all events that are not part of Event A.

The complement of Event A is denoted by Ā or A’.

Example: The compliment of being male is being female.

Page 23: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Joint Event

Has two or more characteristics. Age (Years)

<30 30-45 >45 Gender (U) (B) (O) Total

Male (M) 60 20 40 120 Female (F) 40 30 10 80

Total 100 50 50 200

Page 24: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Probability Vocabulary

1) Experiment2) Events3) Sample Space4) Mutually Exclusive5) Collectively

Exhaustive 6) Independent Events7) Compliment8) Joint Event

Page 25: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Quiz

What’s the difference between Mutually Exclusive and Collectively Exhaustive?

Page 26: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

When you estimate a probability

You are estimating the probability of an EVENT occurring.

Page 27: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

When rolling two die, the probability of rolling an 11 (Event A) is the probability that Event A occurs.

It is written P(A)

P(A) = probability that event A occurs

Page 28: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

With a sample space of the toss of a fair die being

S = {1, 2, 3, 4, 5, 6}

Page 29: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Find the probability of the following events:

1) An even number

2) A number less than or equal to 4

3) A number greater than or equal to 5.

Page 30: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Answers

1)P(even number) = P(2) + P(4) + P(6)=

1/6 + 1/6 + 1/6 = 3/6 =1/2

2)P(number ≤ 4) = P(1) + P(2) + P(3) + P(4)=

1/6 + 1/6 + 1/6 + 1/6 = 4/6 = 2/3

3)P(number ≥ 5) = P(5) + P(6) =

1/6 + 1/6 = 2/6 = 1/3

Page 31: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Approaches to Assigning Probabilities

• The Relative Frequency

• The Classical Approach

• The Subjective Approach

Page 32: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Classical Approach to Assigning Probability

Probability based on prior knowledge of the process involved with each outcome equally likely to occur in the long-run if the selection process is continually repeated.

Page 33: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Relative Frequency (Empirical) Approach to Assigning Probability

Probability of an event occurring based on observed data.

By observing an experiment n times, if Event A occurs m times of the n times, the probability that A will occur in the future is

P(A) = m /n

Page 34: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Example of Relative Frequency Approach

1000 students take a probability exam.

200 students score an A.

P(A) = 200/1000 = .2 or 20%

Page 35: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

The Relative Frequency Approach assigned

probabilities to the following simple events

What is the probability a student will pass the course with a C or better?

P(A) = .2P(B) = .3P(C) = .25P(D) = .15P(F) = .10

Page 36: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Subjective Approach to Assigning Probability

Probability based on individual’s past experience, personal opinion, analysis of situation. Useful if probability cannot be determined empirically.

Page 37: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

We leave Base Camp; the Ascent for the Summit Begins!

Page 38: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

From a survey of 200 purchasers of a laptop computer, a gender-age profile is

summarized below:

CLASS FREQUENCY CLASS FREQUENCY Male 120 Under 30 100 Female 80 30 -45 50 Total 200 Over 45 50 Total 200

Page 39: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

These two categories (gender and age) can be summarized

together in a contingency or cross-tab table which allows

the viewer to see how these two categories interact

Page 40: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

CLASS FREQUENCY CLASS FREQUENCY Male 120 Under 30 100 Female 80 30 -45 50 Total 200 Over 45 50 Total 200

Age (Years)

<30 30-45 >45 Gender (U) (B) (O) Total

Male (M) 60 20 40 120 Female (F) 40 30 10 80

Total 100 50 50 200

Page 41: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Marginal Probability

The probability that any one single event will occur.

Example: P(M) = 120/200 = .6 Age (Years)

<30 30-45 >45 Gender (U) (B) (O) Total

Male (M) 60 20 40 120 Female (F) 40 30 10 80

Total 100 50 50 200

Page 42: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

What’s the probability of being under 30?What’s the probability of being female?

What’s the probability of being either under 30 or over 45?

Age (Years)

<30 30-45 >45 Gender (U) (B) (O) Total

Male (M) 60 20 40 120 Female (F) 40 30 10 80

Total 100 50 50 200

Page 43: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

What is the complement of being male? P(MC) or P(M’)

Age (Years)

<30 30-45 >45 Gender (U) (B) (O) Total

Male (M) 60 20 40 120 Female (F) 40 30 10 80

Total 100 50 50 200

Page 44: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Joint Probability

The probability that both Events A and B will occur.

This is written as P(A and B)

Age (Years)

<30 30-45 >45 Gender (U) (B) (O) Total

Male (M) 60 20 40 120 Female (F) 40 30 10 80

Total 100 50 50 200

Page 45: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

What is the probability of selecting a purchaser who is female and under age 30?

P(F and U) = 40/200 = .2 or 20%

Age (Years)

<30 30-45 >45 Gender (U) (B) (O) Total

Male (M) 60 20 40 120 Female (F) 40 30 10 80

Total 100 50 50 200

Page 46: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Probability of A or B

The probability that either of two events will occur.

This is written as P(A or B).

Use the General Addition Rule which eliminates double-counting.

Page 47: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

General Addition Rule

P(A or B) = P(A) + P(B) – P(A and B)

Page 48: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

What is the probability of selecting a purchaser who is male OR under 30 years of age?

P(M or U) = P(M) + P(U) – P(M and U)=(120 + 100 – 60) / 200 = 160 / 200= .8 or 80%

Age (Years)

<30 30-45 >45 Gender (U) (B) (O) Total

Male (M) 60 20 40 120 Female (F) 40 30 10 80

Total 100 50 50 200

Page 49: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

We can use raw data

Northeast

D

Southeast

E

Midwest

F

West

G

Finance

A24 10 8 14 56

Manufacturing B 30 6 22 12 70

Communication C 28 18 12 16 74

82 34 42 42 200

Page 50: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Or we can convert our contingency table into percentages

Northeast

D

Southeast

E

Midwest

F

West

G

Finance

A.12 .05 .04 .07 .28

Manufacturing B .15 .03 .11 .06 .35

Communication C .14 .09 .06 .08 .37

.41 .17 .21 .21 1.00

Page 51: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

P(Midwest) = ? P(C or D) = ? P(E or A) =?

Northeast

D

Southeast

E

Midwest

F

West

G

Finance

A24 10 8 14 56

Manufacturing B

30 6 22 12 70

Communication

C

28 18 12 16 74

82 34 42 42 200

Northeast

D

Southeast

E

Midwest

F

West

G

Finance

A.12 .05 .04 .07 .28

Manufacturing B

.15 .03 .11 .06 .35

Communication

C

.14 .09 .06 .08 .37

.41 .17 .21 .21 1.00

Page 52: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Solution

Northeast

D

Southeast

E

Midwest

F

West

G

Finance

A.12 .05 .04 .07 .28

Manufacturing B

.15 .03 .11 .06 .35

Communication C

.14 .09 .06 .08 .37

.41 .17 .21 .21 1.00

P(F) = .21

P(C or D) =

P(C) + P(D) – P(C & D)

= .37 + .41 - .14

= .64 or 64%

P(E or A) =

.17 + .28 - .05

= .40 or 40%

Page 53: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Addition Rule for Mutually Exclusive Events:

P(A or B) = P(A) + P(B)

Page 54: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Frequently, we need to know how two events are related.

Page 55: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Conditional Probability

We would like to know the probability of one event occurring given the occurrence of another related event.

Page 56: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Conditional Probability

The probability that Event A occurs GIVEN that Event B occurs.

P (A | B)

B is the event known to have occurred and A is

the uncertain event whose probability you seek, given that Event B has occurred.

Page 57: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

What is the probability of selecting a female purchaser given the selected individual is under 30 years of age?

P(F | U) = 40 / 100 = .4

Interpretation:There is a 40% probability of selecting a female given the

selected individual is under 30 years of age.

Age (Years)

<30 30-45 >45 Gender (U) (B) (O) Total

Male (M) 60 20 40 120 Female (F) 40 30 10 80

Total 100 50 50 200

Page 58: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Hypoxia Question 1:

How is P(F|U) different than the P(F)?

Page 59: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

There is a 40% chance of selecting a female purchaser given no prior information about U. P(F)= .4

This means that being given the information that the person selected is

under 30 has no effect on the probability that a female is selected.

Page 60: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

In other words, U has no effect on whether F occurs. Such events are

said to be INDEPENDENT

Events A and B are independent if the probability of Event A is unaffected by the occurrence or non-occurence of

Event B

Page 61: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Statistical Independence

• Events A and B are independent if and only if:

• P(A | B) = P(A) {assuming P(B) ≠ 0}, or

• P(B | A) = P(B) {assuming P(A) ≠ 0}, or

• P(A and B) = P(A) ∙ P(B).

Page 62: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

Age (Years)

<30 30-45 >45 Gender (U) (B) (O) Total

Male (M) 60 20 40 120 Female (F) 40 30 10 80

Total 100 50 50 200

What is the probability of selecting a female purchaser given the selected individual is between 30-45 years of age?

Are the events independent?

Page 63: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

P(F | B) = 30/50 = .6

Test for independence:P(F | B) = P(F)30/50 = 80/200

.6 ≠ .4The events are not independent.

Page 64: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

1) Suppose we have the following joint probabilities.

A1 A2 A3 B1 .15 .20 .10 B2 .25 .25 .05

1) Compute the marginal probabilities. 2) Compute P(A2 | B2) 3) Compute P(B2 | A2) 4) Compute P(B1 | A2) 5) Compute P( A1 or A2) 6) Compute P(A2 | or B2) 7) Compute P(A3 or B1)

Page 65: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

1) The female instructors at a large university recently lodged a complaint about the most recent round of promotions from assistant professor to associate professor. An analysis of the relationship between gender and promotion was undertaken with the joint probabilities in the following table being produced.

Promoted Not Promoted Female .03 .12 Male .17 .68

• What is the rate of promotion among female assistant professors?

• What is the rate of promotion among male assistant professors?

• Is it reasonable to accuse the university of gender bias?

Page 66: Sherlock Holmes once observed that men are insoluble puzzles except in the aggregate, where they become mathematical certainties.

1) To determine whether drinking alcoholic beverages has an effect on the bacteria that cause ulcers, researchers developed the following table of joint probabilities.

i) What proportion of people have ulcers? ii) What is the probability that a teetotaler (no alcoholic beverages) develops an ulcer? iii) What is the probability that someone who has an ulcer does not drink alcohol? iv) Are ulcers and the drinking of alcohol independent? Explain.

Number of alcoholic drinks per day

Ulcer No Ulcer

None .01 .22 One .03 .19 Two .03 .32 More than two .04 .16