65
Chapter 3: Chapter 3: Probability Probability One day there was a fire in the wastebasket One day there was a fire in the wastebasket in the Dean’s office. In rushed a in the Dean’s office. In rushed a physicist, a chemist, and a statistician. physicist, a chemist, and a statistician. The physicist immediately started The physicist immediately started calculations to determine how much energy calculations to determine how much energy would have to be removed from the fire to would have to be removed from the fire to stop combustion. stop combustion. The chemist tried to figure out what The chemist tried to figure out what chemical reagent would have to be added to chemical reagent would have to be added to the fire to prevent oxidation. While they the fire to prevent oxidation. While they were doing this, the statistician set fires were doing this, the statistician set fires in all the other wastebaskets in the in all the other wastebaskets in the office. office. What are you doing?” they demanded. What are you doing?” they demanded. “Well, to solve the problem, you obviously “Well, to solve the problem, you obviously need a larger sample size,” the need a larger sample size,” the

Chapter 3: Probability One day there was a fire in the wastebasket in the Dean’s office. In rushed a physicist, a chemist, and a statistician. The physicist

Embed Size (px)

Citation preview

Chapter 3: ProbabilityChapter 3: ProbabilityOne day there was a fire in the wastebasket in the Dean’s One day there was a fire in the wastebasket in the Dean’s office. In rushed a physicist, a chemist, and a statistician. office. In rushed a physicist, a chemist, and a statistician. The physicist immediately started calculations to The physicist immediately started calculations to determine how much energy would have to be removed determine how much energy would have to be removed from the fire to stop combustion. from the fire to stop combustion. The chemist tried to figure out what chemical reagent The chemist tried to figure out what chemical reagent would have to be added to the fire to prevent oxidation. would have to be added to the fire to prevent oxidation. While they were doing this, the statistician set fires in all While they were doing this, the statistician set fires in all the other wastebaskets in the office. the other wastebaskets in the office. ““What are you doing?” they demanded. “Well, to solve the What are you doing?” they demanded. “Well, to solve the problem, you obviously need a larger sample size,” the problem, you obviously need a larger sample size,” the statistician replied.statistician replied.

The Monty Hall ProblemThe Monty Hall Problem In the Game Show, “Let’s Make In the Game Show, “Let’s Make

a Deal,” A contestant was a Deal,” A contestant was presented with three doors. presented with three doors. Behind one door was a prize Behind one door was a prize (often a new car) and behind the (often a new car) and behind the other two were goats. The other two were goats. The contestant would choose a door. contestant would choose a door. Then Monty would open one of Then Monty would open one of the other doors, exposing a the other doors, exposing a goat. The contestant could then goat. The contestant could then switch or stay.switch or stay.

What should the contestant do?What should the contestant do?

Dice SimulationDice Simulation

Do Excel DemoDo Excel Demo Points to be made:Points to be made:

Randomness means unpredictable resultsRandomness means unpredictable results Probability means long run is predictableProbability means long run is predictable We imagine a mechanism, rule, or law that We imagine a mechanism, rule, or law that

produces results with definite probabilitiesproduces results with definite probabilities If we know the “probability law,” we can make If we know the “probability law,” we can make

meaningful predictions about the likelihood of meaningful predictions about the likelihood of various outcomes various outcomes

Why we play silly gamesWhy we play silly games

In the study of probability, we need simple In the study of probability, we need simple examples to learn from. Some of these examples to learn from. Some of these may seem silly or unrealistic, but they are may seem silly or unrealistic, but they are actually actually modelsmodels of “real” problems. If we of “real” problems. If we understand the examples, we can tackle understand the examples, we can tackle real problems by formulating them in terms real problems by formulating them in terms of simple examples like dice games, coin of simple examples like dice games, coin tosses, spinners, etc. Recognizing a tosses, spinners, etc. Recognizing a familiar set-up is often the key to success.familiar set-up is often the key to success.

Counting 3’sCounting 3’s

Another dice game: Roll two dice and Another dice game: Roll two dice and record the number of 3’s. record the number of 3’s.

The possible outcomes are 0, 1, or 2.The possible outcomes are 0, 1, or 2. We will count the frequency of each We will count the frequency of each

outcome as we repeat the process.outcome as we repeat the process. (Excel Simulation) (Excel Simulation)

Properties of this ExperimentProperties of this Experiment

If we continue this experiment indefinitely:If we continue this experiment indefinitely:• The frequencies will have approximately a The frequencies will have approximately a

25:10:1 ratio (we need to find out why)25:10:1 ratio (we need to find out why)• The relative frequencies will The relative frequencies will settle downsettle down..

A computer simulation of experimental outcomes A computer simulation of experimental outcomes is a helpful tool that may lead to important is a helpful tool that may lead to important insights regarding a probability problem. insights regarding a probability problem. But, it is not a substitute for the theoretical But, it is not a substitute for the theoretical development that we will begin now.development that we will begin now.

DefinitionsDefinitions

Probability Experiment: Probability Experiment: A A repeatablerepeatable process process that yields a result or observations.that yields a result or observations.

TrialTrial: One repetition (yielding one observation): One repetition (yielding one observation) OutcomeOutcome: One possible result of an experiment.: One possible result of an experiment. The language of The language of set theoryset theory is used… is used… The set of all possible outcomes is the The set of all possible outcomes is the Sample Sample

SpaceSpace, often denoted by , often denoted by SS.. EventsEvents are subsets of the Sample Space; they are subsets of the Sample Space; they

contain one or more outcomes, and are often contain one or more outcomes, and are often denoted by denoted by AA, , BB, or , or EE..

Some ExamplesSome Examples An ExperimentAn Experiment: Select two students at random and ask : Select two students at random and ask

them if they have cars on campus. Record Y if the them if they have cars on campus. Record Y if the answer is “yes” and N if the answer is “no.”answer is “yes” and N if the answer is “no.”

There are twoThere are two trials trials, because each student yields one , because each student yields one observation. Each observation. Each trialtrial has an outcome of Y or N has an outcome of Y or N

But the outcomes of the But the outcomes of the experimentexperiment are ordered pairs: are ordered pairs: The Sample SpaceThe Sample Space: S={(N,N), (N,Y), (Y,N), (Y,Y)}: S={(N,N), (N,Y), (Y,N), (Y,Y)} One example event: both students have cars.One example event: both students have cars.

A={(Y,Y)}A={(Y,Y)} Another event: only one student has a car.Another event: only one student has a car.

B={(Y,N),(N,Y)} B={(Y,N),(N,Y)} Yet another event: at least one has a car.Yet another event: at least one has a car.

C={(Y,N),(N,Y),(Y,Y)}C={(Y,N),(N,Y),(Y,Y)}

More ExamplesMore Examples Toss one coin, then toss one die.Toss one coin, then toss one die.

S={H1 H2 H3 H4 H5 H6 T1 T2 T3 T4 T5 T6}S={H1 H2 H3 H4 H5 H6 T1 T2 T3 T4 T5 T6} (The notation has been simplified.)(The notation has been simplified.) A={The coin was a head}A={The coin was a head} B={The die toss was an even number}B={The die toss was an even number}

Randomly select three voters and ask if they Randomly select three voters and ask if they favor an increase in property taxes for road favor an increase in property taxes for road construction in the county.construction in the county. S = {NNN, NNY, NYN, NYY, YNN, YNY, YYN, YYY}S = {NNN, NNY, NYN, NYY, YNN, YNY, YYN, YYY} C={At least one voter said yes}C={At least one voter said yes}

Exercise: List the elements of A, B, and C.Exercise: List the elements of A, B, and C.

More TermsMore Terms

Outcomes are also called Outcomes are also called sample points.sample points. n(n(SS)): the number of outcomes in the : the number of outcomes in the

sample space.sample space. Events containing only one outcome are Events containing only one outcome are

called called Simple EventsSimple Events. . Events containing two or more outcomes Events containing two or more outcomes

are called are called Compound EventsCompound Events..

NotesNotes

The The outcomesoutcomes in a sample space can never in a sample space can never overlap (they are overlap (they are mutually exclusivemutually exclusive).).

The sample space must contain The sample space must contain allall possible possible outcomes (relate to outcomes (relate to exhaustive, exhaustive, below).below).

Two Two eventsevents may or may not be mutually may or may not be mutually exclusive.exclusive.

If two or more events together include all If two or more events together include all outcomes, they are called outcomes, they are called exhaustiveexhaustive..

In some cases a collection of events may be In some cases a collection of events may be bothboth mutually exclusive and exhaustivemutually exclusive and exhaustive..

When Events OccurWhen Events Occur Remember, events can contain multiple outcomes.Remember, events can contain multiple outcomes. An event An event occursoccurs if it contains the actual outcome of if it contains the actual outcome of

the experiment.the experiment. More than one event can occur for a single trial (if More than one event can occur for a single trial (if

not mutually exclusive).not mutually exclusive). ExampleExample:: On the way to work, some employees at On the way to work, some employees at

a certain company stop for a bagel and/or a cup of a certain company stop for a bagel and/or a cup of coffee. Possible outcomes for (bagel,coffee) are:coffee. Possible outcomes for (bagel,coffee) are: (n,n): (n,n): Don’t stopDon’t stop (b,n): (b,n): Get only a bagelGet only a bagel (n,c): (n,c): Get only coffeeGet only coffee (b,c): (b,c): Get bagel and coffeeGet bagel and coffee

Example: Not Mutually Exclusive/ExhaustiveExample: Not Mutually Exclusive/Exhaustive

Define event B as “gets bagel”Define event B as “gets bagel” Define event C as “gets coffee”Define event C as “gets coffee” Then BThen B={={(b,n),(b,c)(b,n),(b,c)}} and C and C={={(n,c),(b,c)(n,c),(b,c)}} BB∩C∩C={={(b,c)(b,c)}} so B and C are so B and C are notnot mutually mutually

exclusive.exclusive. If the outcome is If the outcome is (b,c)(b,c),, then both B and C then both B and C

have occurred.have occurred. It is also true that B and C are not It is also true that B and C are not

exhaustive, since BUC≠S.exhaustive, since BUC≠S.

The accompanying The accompanying Venn diagramVenn diagram illustrates the illustrates the choices of the employees for a randomly selected work choices of the employees for a randomly selected work day.day.

Coffee

1832 16

11

Coffee Bagel

ExercisesExercises

For the three dice games that we For the three dice games that we simulated:simulated: Give the Sample SpaceGive the Sample Space Construct several events, demonstrating:Construct several events, demonstrating:

• Simple eventsSimple events• Compound eventsCompound events• Mutually Exclusive eventsMutually Exclusive events• Exhaustive eventsExhaustive events• Mutually Exclusive and Exhaustive eventsMutually Exclusive and Exhaustive events

Find Find n(n(SS)) and and n(n(AA)) for several events. for several events.

Determining ProbabilityDetermining Probability

Probability of an Event:Probability of an Event: The The expectedexpected relative frequency of the eventrelative frequency of the event

Three ways to determine the probability of Three ways to determine the probability of an event:an event: EmpiricallyEmpirically TheoreticallyTheoretically SubjectivelySubjectively

Empirical ProbabilityEmpirical Probability Based on counts of data. It is theBased on counts of data. It is the observed relative observed relative

frequency.frequency. Use prime notation:Use prime notation:

n’n’(A):(A): number of times the event A has occurred number of times the event A has occurred

nn:: number of trials or observations, or sample size. number of trials or observations, or sample size. The Law of Large NumbersThe Law of Large Numbers says the larger the says the larger the

number of experimental trials number of experimental trials nn, the closer the , the closer the empirical probability empirical probability P’P’(A) is expected to be to the true (A) is expected to be to the true probability probability PP(A).(A).

In symbolsIn symbols::AsAs

'(A)(A)

nP

n

, '(A) (A)n P P

Theoretical and SubjectiveTheoretical and Subjective

Theoretical Probability, P(A), Theoretical Probability, P(A), is the is the expected relative frequency (long run)expected relative frequency (long run)

P(A)P(A) is based on knowledge (or is based on knowledge (or assumptions) of the fundamental assumptions) of the fundamental properties of the experiment.properties of the experiment.

Subjective ProbabilitySubjective Probability is based on is based on someone’s opinion and/or experience. It someone’s opinion and/or experience. It is usually just a guess and subject to bias.is usually just a guess and subject to bias.

Theoretical ProbabilityTheoretical Probability Toss a fair coin. Let event H be the occurrence Toss a fair coin. Let event H be the occurrence

of a head. What is of a head. What is PP(H)?(H)? In a single toss of the coin, there are two possible In a single toss of the coin, there are two possible

outcomes.outcomes. Since the coin is Since the coin is fairfair, each outcome is equally likely., each outcome is equally likely. Therefore it follows that Therefore it follows that PP(H) = 1/2.(H) = 1/2.

This doesn’t mean one head occurs in every two This doesn’t mean one head occurs in every two tosses.tosses.

After many trials, the proportion of heads is After many trials, the proportion of heads is expected to be close to half, not based on data, expected to be close to half, not based on data, but by reasoning from the fundamental but by reasoning from the fundamental properties of the experiment.properties of the experiment.

Equally Likely OutcomesEqually Likely Outcomes

The previous example of a coin toss is an The previous example of a coin toss is an example of an experiment in which all example of an experiment in which all outcomes are equally likely.outcomes are equally likely.

Many common problems (coins, dice, cards, Many common problems (coins, dice, cards, SRS) have this property.SRS) have this property.

If this property holds, the probability of an If this property holds, the probability of an event A is the ratio of the number of outcomes event A is the ratio of the number of outcomes in A to the number of outcomes in in A to the number of outcomes in SS..

(A)(A)

( )

nP

n S

ExamplesExamples

A die toss has six equally likely outcomes.A die toss has six equally likely outcomes. S={1,2,3,4,5,6}, thus S={1,2,3,4,5,6}, thus nn(S)=6.(S)=6. Define event E as E={2,4,6}. Then Define event E as E={2,4,6}. Then nn(E)=3.(E)=3. P(E)=3/6=1/2.P(E)=3/6=1/2.

Toss two coins; there are 4 outcomes.Toss two coins; there are 4 outcomes. S={TT,TH,HT,HH}.S={TT,TH,HT,HH}. Define event E as E={at least one head}.Define event E as E={at least one head}. E={TH,HT,HH}E={TH,HT,HH} P(E)=3/4P(E)=3/4

ExampleExample: A fair coin is tossed 5 times, and a head (H) : A fair coin is tossed 5 times, and a head (H) or a tail (T) is recorded each time. What is the or a tail (T) is recorded each time. What is the probability of probability of A = {exactly one head in 5 tosses}, andA = {exactly one head in 5 tosses}, andB = {exactly 5 heads}?B = {exactly 5 heads}?

The outcomes consist of a sequence of 5 H’s and T’sThe outcomes consist of a sequence of 5 H’s and T’s

A typical outcome: HHTTHA typical outcome: HHTTH

There are 32 possible outcomes, all equally likely.There are 32 possible outcomes, all equally likely.

A = {HTTTT, THTTT, TTHTT, TTTHT, TTTTH}A = {HTTTT, THTTT, TTHTT, TTTHT, TTTTH}

B = {HHHHH}B = {HHHHH}

(A) 5(A)

( ) 32

nP

n S

(B) 1(B)

( ) 32

nP

n S

The Monty Hall ProblemThe Monty Hall Problem In the Game Show, “Let’s Make In the Game Show, “Let’s Make

a Deal,” A contestant was a Deal,” A contestant was presented with three doors. presented with three doors. Behind one door was a prize Behind one door was a prize (often a new car) and behind the (often a new car) and behind the other two were goats. The other two were goats. The contestant would choose a door. contestant would choose a door. Then Monty would open one of Then Monty would open one of the other doors, exposing a the other doors, exposing a goat. The contestant could then goat. The contestant could then switch or stay.switch or stay.

What should the contestant do?What should the contestant do?

Solve the Monty Hall ProblemSolve the Monty Hall Problem

List the elements of the sample space List the elements of the sample space under each strategyunder each strategy This is probably the part that makes the This is probably the part that makes the

problem difficultproblem difficult There are two parts to each outcome: choice There are two parts to each outcome: choice

of door and location of car. of door and location of car. Represent an outcome by an ordered pair Represent an outcome by an ordered pair

(door chosen, door with car)(door chosen, door with car) Determine the probability of winning under Determine the probability of winning under

each strategyeach strategy

Solution to Monty HallSolution to Monty Hall

S={(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)}S={(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)}

Strategy=StayStrategy=StayWin={(1,1),(2,2),(3,3)}Win={(1,1),(2,2),(3,3)}P(Win)=3/9=1/3P(Win)=3/9=1/3

Strategy=SwitchStrategy=SwitchWin={(1,2),(1,3),(2,1),(2,3),(3,1),(3,2)}Win={(1,2),(1,3),(2,1),(2,3),(3,1),(3,2)}P(Win)=6/9=2/3P(Win)=6/9=2/3

Note: The Win events under each strategy are Note: The Win events under each strategy are complements of each other.complements of each other.

Revisit a Previous ExampleRevisit a Previous Example

An ExperimentAn Experiment: Select two students at : Select two students at random and ask them if they have cars on random and ask them if they have cars on campus. Record Y if the answer is “yes” campus. Record Y if the answer is “yes” and N if the answer is “no.”and N if the answer is “no.”

We can use a tree diagram to enumerate We can use a tree diagram to enumerate the elements of the sample space.the elements of the sample space.

Hmmm…Hmmm…

How many statisticians does it take to How many statisticians does it take to screw screw inin a light bulb? a light bulb?

We don’t know yet…the entire sample was We don’t know yet…the entire sample was skewedskewed to the to the leftleft..

Hope that didn’t go Hope that didn’t go rightright by you… by you…

Tree Diagram of Sample SpaceTree Diagram of Sample Space

Student 1Student 1 Student 2Student 2 OutcomesOutcomes

YY Y, YY, YYY

NN Y, NY, N

YY N, YN, YNN

NN N, NN, N

-Tree diagrams start from a common point, or “root”-Tree diagrams start from a common point, or “root”-This tree has four branches (from root to ends)-This tree has four branches (from root to ends)-There are 2 first- and 4 second-generation branches.-There are 2 first- and 4 second-generation branches.-The path along each branch shows a possible outcome.-The path along each branch shows a possible outcome.

ExampleExample: An experiment consists of selecting electronic : An experiment consists of selecting electronic parts from an assembly line and testing each to see if it parts from an assembly line and testing each to see if it passes inspection (P) or fails (F). The experiment passes inspection (P) or fails (F). The experiment terminates as soon as one acceptable part is found terminates as soon as one acceptable part is found oror after three parts are tested. Construct the sample after three parts are tested. Construct the sample space.space.

OutcomeOutcome

FF FFFFFF

FF

FF PP FFPFFP

PP FPFP

PP PP

SS = { FFF, FFP, FP, P } = { FFF, FFP, FP, P }

Laws or Axioms of ProbabilityLaws or Axioms of Probability

The probability of any event A is The probability of any event A is between 0 and 1.between 0 and 1.

The sum of the probabilities of all The sum of the probabilities of all outcomes is 1.outcomes is 1.

A probability of 0 means the event A probability of 0 means the event cannot occur.cannot occur.

A probability of 1 means the event A probability of 1 means the event is certain, it must occur every time.is certain, it must occur every time.

0 (A) 1P

all simpleevents A

(A) 1P

Introducing OddsIntroducing OddsExampleExample: On the way to work Bob’s personal judgment is that he is four : On the way to work Bob’s personal judgment is that he is four

times more likely to get caught in a traffic jam (J) than have an easy times more likely to get caught in a traffic jam (J) than have an easy commute (E). What values should be assigned to commute (E). What values should be assigned to PP(J) and (J) and PP(E)?(E)?

(J) 4 (E)P P

(J) (E) 1P P

4 (E) (E) 1

5 (E) 1

1(E)

51 4

(J) 4 (E) 45 5

P P

P

P

P P

Definition of OddsDefinition of Odds The The complementcomplement of A is denoted by . of A is denoted by . contains all outcomes in S not in A.contains all outcomes in S not in A. TwoTwo events are events are complementarycomplementary if they are mutually if they are mutually

exclusive and exhaustive.exclusive and exhaustive. OddsOdds are a way of expressing probabilities for are a way of expressing probabilities for

complementary events as a ratio of expected complementary events as a ratio of expected frequencies. frequencies.

If the odds in favor of an event A are If the odds in favor of an event A are a to ba to b then the then the odds against A are odds against A are b to ab to a..

Then the probability that A occurs is Then the probability that A occurs is

The probability A does not occur is The probability A does not occur is

(A)a

Pa b

(A)b

Pa b

AA

ExampleExample::

1.1. The complement of the event “success” is “failure.”The complement of the event “success” is “failure.”

2.2. The complement of the event “rain” is “no rain.”The complement of the event “rain” is “no rain.”

3.3. The complement of the event “at least 3 patients The complement of the event “at least 3 patients recover” out of 5 patients is “2 or fewer recover.”recover” out of 5 patients is “2 or fewer recover.”

NotesNotes::

1.1.

2.2.

3.3. Every event A has a complementary event Every event A has a complementary event

4. Useful in calculations such as when the question 4. Useful in calculations such as when the question asks for the probability of “at least one.”asks for the probability of “at least one.”

5. The complement of S is 5. The complement of S is Ø, the empty set.Ø, the empty set.

6. Obviously, P(Ø)=1-P(S)=1-1=0.6. Obviously, P(Ø)=1-P(S)=1-1=0.

(A) (A) 1 for any event AP P

(A) 1 (A)P P

A

Addition RulesAddition Rules If A and B occur, the outcome is in both, i.e., AIf A and B occur, the outcome is in both, i.e., A∩B has ∩B has

occurred. So occurred. So P(A and B)=P(P(A and B)=P(AA∩B).∩B).

If A and B are If A and B are mutually exclusivemutually exclusive, , AA∩B=Ø so ∩B=Ø so P(A and B)=P(Ø)=0.P(A and B)=P(Ø)=0.

If A or B occurs, the outcome is in at least one of them, i.e., If A or B occurs, the outcome is in at least one of them, i.e., AUB has occurred. So AUB has occurred. So

P(A or B)=P(AUB)P(A or B)=P(AUB) =P(A)+P(B)–P( =P(A)+P(B)–P(AA∩B).∩B).

Note: If A and B are Note: If A and B are NOT mutually exclusiveNOT mutually exclusive, just adding , just adding P(A)+P(B) would count the outcomes in the intersection P(A)+P(B) would count the outcomes in the intersection twice, so we have to correct for this double-count.twice, so we have to correct for this double-count.

But, if A and B But, if A and B ARE mutually exclusiveARE mutually exclusive, P(A∩B)=0 so, P(A∩B)=0 soP(A or B)=P(AUB)P(A or B)=P(AUB)

=P(A)+P(B). =P(A)+P(B).

ExampleExampleThis diagram shows the probability that a randomly selected consumer has tried a snack food (F) is .5, tried a new soft drink (D) is .6, and tried both the snack food and the soft drink is .2.

FF DD.2.2.3.3 .4.4

.1.1SS(Tried the snack food or the soft drink)

(F or D) (F) (D) (F and D) .5 .6 .2 .9

P

P P P P

(Tried neither the snack food nor the soft drink)

(F and D) (F or D) 1 (F or D) 1 .9 .1

P

P P P

ExamplesExamples

Suppose A and B are mutually exclusive, Suppose A and B are mutually exclusive, and P(A)=.12 and P(B)=.34. Find P(AUB).and P(A)=.12 and P(B)=.34. Find P(AUB).

Suppose P(A)=.6, P(AUB)=.9, and Suppose P(A)=.6, P(AUB)=.9, and P(B)=.5. Find P(AP(B)=.5. Find P(A∩B).∩B).

Suppose A, B, and C are mutually Suppose A, B, and C are mutually exclusive and exhaustive. If P(A)=.2, exclusive and exhaustive. If P(A)=.2, P(B)=.4, find P(C).P(B)=.4, find P(C).

Conditional ProbabilityConditional Probability

Sometimes two events are related in such a way that the Sometimes two events are related in such a way that the probability of one depends upon whether the other probability of one depends upon whether the other occurs.occurs.

Partial information about the outcome may alter our Partial information about the outcome may alter our assessment of the probabilities.assessment of the probabilities.

The symbol The symbol PP(A | B) represents the probability that A will (A | B) represents the probability that A will occur given B is known (assured). This is called occur given B is known (assured). This is called conditional probability.conditional probability.

Suppose I toss a die and show you that there is a 3 on Suppose I toss a die and show you that there is a 3 on the front face. What can you say about the probabilities the front face. What can you say about the probabilities for the top face?for the top face?

What is P(1 on top|3 on front)?What is P(1 on top|3 on front)? What is P(4 on top|3 on front)?What is P(4 on top|3 on front)?

Attention!!Attention!!

It is crucial to realize we are not talking It is crucial to realize we are not talking about two sequential events.about two sequential events. This is for one This is for one outcome of one trial of an experiment, for outcome of one trial of an experiment, for which we have partial information, allowing which we have partial information, allowing us to remove some of the uncertainty.us to remove some of the uncertainty.

When I show you the three on the front face, When I show you the three on the front face, the toss has already occurred, but you don’t the toss has already occurred, but you don’t know the result. The “chance” involved is in know the result. The “chance” involved is in your ability to guess the correct value, rather your ability to guess the correct value, rather than in a particular value coming up.than in a particular value coming up.

Die ExampleDie Example

Normally, There are six Normally, There are six possibilities with P=1/6 for possibilities with P=1/6 for each.each.

With the three showing on With the three showing on front, we eliminate two front, we eliminate two outcomes, restricting the outcomes, restricting the sample space.sample space.

The four remaining The four remaining numbers are equally likely, numbers are equally likely, with P=1/4.with P=1/4.

1 2 3 1 2 3

6 5 46 5 4

1 2 3 1 2 3

6 5 46 5 4

1 2 1 2

6 56 5

Calculating Conditional ProbabilityCalculating Conditional Probability

Recall our definition of probability in terms of frequencies of equally likely Recall our definition of probability in terms of frequencies of equally likely outcomes:outcomes:

Given B has occurred, the numerator becomes the number of outcomes Given B has occurred, the numerator becomes the number of outcomes of A that are still in the sample space. Any outcomes in A that were of A that are still in the sample space. Any outcomes in A that were not in B are eliminated now. The denominator is the number of not in B are eliminated now. The denominator is the number of outcomes in B, the new sample space.outcomes in B, the new sample space.

To relate this back to the original probabilities, divide the numerator and To relate this back to the original probabilities, divide the numerator and denominator by denominator by nn(S).(S).

Though this formula was derived using the idea of equal probabilities for Though this formula was derived using the idea of equal probabilities for all outcomes, the final form works in general.all outcomes, the final form works in general.

(A B)(A | B)

(B)

nP

n

(A)(A)

(S)

nP

n

(A B) / ( ) (A B)(A | B)

(B) / ( ) (B)

n n S PP

n n S P

Independent EventsIndependent Events Two events, defined for one trial of an Two events, defined for one trial of an

experiment, are independent iffexperiment, are independent iff PP(A | B) = (A | B) = PP(A) or (A) or PP(B | A) = (B | A) = PP(B).(B).

This should be understood to mean that if A and This should be understood to mean that if A and B are independent, the occurrence of B does not B are independent, the occurrence of B does not affect the probability of A, and visa versa.affect the probability of A, and visa versa.

If A and B are independent, then so are:If A and B are independent, then so are:

A and B

A and B

A and B

Example of Independent EventsExample of Independent Events

Consider the experiment in which a single Consider the experiment in which a single fair die is rolled: fair die is rolled: SS = {1, 2, 3, 4, 5, 6 }. = {1, 2, 3, 4, 5, 6 }. Define the following events:Define the following events:

A = {1, 2}A = {1, 2}B = “an odd number occurs”B = “an odd number occurs”

(A B) 1/ 6 1(A | B) (A)

(B) 3/ 6 3

(A B) 1/ 6 1(B | A) (B)

(A) 1/ 3 2

PP P

P

PP P

P

Example of non-Independent Example of non-Independent EventsEvents

Consider the experiment in which a single Consider the experiment in which a single fair die is rolled: fair die is rolled: SS = {1, 2, 3, 4, 5, 6 }. = {1, 2, 3, 4, 5, 6 }. Define the following events:Define the following events:

A = {1}A = {1}B = “an odd number occurs”B = “an odd number occurs”

(A B) 1/ 6 1 1(A | B) (A)

(B) 3/ 6 3 6

(A B) 1/ 6 1(B | A) 1 (B)

(A) 1/ 6 2

PP P

P

PP P

P

General Multiplication RuleGeneral Multiplication Rule A little algebra gives this variation:A little algebra gives this variation:

Which might be more usefully thought of as:Which might be more usefully thought of as:

NoteNote: How to recognize phrasing that indicates intersections:: How to recognize phrasing that indicates intersections:1.1. Both A and B:Both A and B:2.2. A but not B:A but not B:3.3. Neither A nor B = Not A and Not B = Not (A or B):Neither A nor B = Not A and Not B = Not (A or B):

4.4. Not (A and B)=Not A or Not B:Not (A and B)=Not A or Not B:

(A B)(A | B) (A B) (A | B) (B)

(B)

PP P P P

P

(A and B) (A | B) (B)P P P

A B A B

A B A B

A BA B

Special Multiplication RuleSpecial Multiplication Rule

If A and B are If A and B are independent events independent events in S, thenin S, then

, so ., so .

ExampleExample: Suppose the event A is “Allen gets a cold this : Suppose the event A is “Allen gets a cold this winter,” B is “Bob gets a cold this winter,” and C is “Chris winter,” B is “Bob gets a cold this winter,” and C is “Chris gets a cold this winter.” gets a cold this winter.” PP(A) = .15, (A) = .15, PP(B) = .25, (B) = .25, PP(C) = .3, (C) = .3, and all three events are independent. Find the probability and all three events are independent. Find the probability that:that:

1.1. All three get colds this winter.All three get colds this winter.

2.2. Allen and Bob get a cold but Chris does not.Allen and Bob get a cold but Chris does not.

3.3. None of the three gets a cold this winter.None of the three gets a cold this winter.

(A and B) (A) (B)P P P (A | B) (A)P P

SolutionSolution::

(All three get colds this winter)

(A and B and C) (A) (B) (C)

(.15)(.25)(.30) .0113

P

P P P P

(Allen and Bob get a cold, but Chris does not)

(A and B and C) (A) (B) (C)

(.15)(.25)(.70) .0263

P

P P P P

(None of the three gets a cold this winter)

(A and B and C) (A) (B) (C)

(.85)(.75)(.70) .4463

P

P P P P

Summary NotesSummary Notes

Independent and mutually exclusive are two very different Independent and mutually exclusive are two very different concepts.concepts.

Mutually exclusive says the two events cannot occur together, that Mutually exclusive says the two events cannot occur together, that is, they have no intersection.is, they have no intersection.

Independence says each event does not affect the other event’s Independence says each event does not affect the other event’s probability.probability.

PP(A and B) = (A and B) = PP(A) (A) PP(B) when A and B are independent.(B) when A and B are independent. Since Since PP(A) and (A) and PP(B) are not zero, (B) are not zero, PP(A and B) is nonzero.(A and B) is nonzero. Thus, independent events have an intersection.Thus, independent events have an intersection.

Events cannot be both mutually exclusive and Events cannot be both mutually exclusive and independent.independent.

If two events are independent, then they are not mutually exclusive.If two events are independent, then they are not mutually exclusive. If two events are mutually exclusive, then they are not independent.If two events are mutually exclusive, then they are not independent.

Tree DiagramsTree Diagrams

Tree Diagrams can be used to calculate Tree Diagrams can be used to calculate probabilities that involve the multiplication probabilities that involve the multiplication and addition rules.and addition rules.

• A set of branches that initiate from a single A set of branches that initiate from a single point has a total probability 1.point has a total probability 1.

• Each outcome for the experiment is Each outcome for the experiment is represented by a branch that begins at the represented by a branch that begins at the common starting point and ends at the common starting point and ends at the terminal points at the right.terminal points at the right.

ExampleExample: A certain company uses three overnight delivery : A certain company uses three overnight delivery services: A, B, and C. The probability of selecting service services: A, B, and C. The probability of selecting service A is 1/2, of selecting B is 3/10, and of selecting C is 1/5. A is 1/2, of selecting B is 3/10, and of selecting C is 1/5. Suppose the event T is “on time delivery.” Suppose the event T is “on time delivery.” PP(T|A) = 9/10, (T|A) = 9/10, PP(T|B) = 7/10, and (T|B) = 7/10, and PP(T|C) = 4/5. A service is randomly (T|C) = 4/5. A service is randomly selected to deliver a package overnight. Construct a tree selected to deliver a package overnight. Construct a tree diagram representing this experiment.diagram representing this experiment.

The resulting tree diagram

Service Delivery

T

A

T

B

T

C

T

T

T

1 2/

3 10/

1 5/

9 10/

1 10/

7 10/

3 10/

4 5/

1 5/

Using the tree diagram:

1. The probability of selecting service A and having the package delivered on time.

2. The probability of having the package delivered on time.

P P P( ) ( ) ( | )A and T A T A 12

910

920

P P P P

P P P P P P

( ) ( ) ( ) ( )

( ) ( | ) ( ) ( | ) ( ) ( | )

T A and T B and T C and T

A T A B T B C T C

12

910

310

710

15

45

920

21100

425

4150

Example: This problem involves testing individuals for the presence of a disease. Suppose the probability of having the disease (D) is .001. If a person has the disease, the probability of a positive test result (Pos) is .90. If a person does not have the disease, the probability of a negative test result (Neg) is .95. For a person selected at random:

1. Find the probability of a negative test result given the person has the disease (False negative).

2. Find the probability of having the disease and a positive test result.

3. Find the probability of a positive test result.4. Find the probability a person has the disease, given a

positive test result.

TestDisease Result

PosD

Neg

Pos

Neg

1. Find the probability of a negative test result given the person has the disease (False negative). Answer: .10

D

.001

.999

.90

.10

.05

.95

TestDisease Result

PosD

Neg

Pos

Neg

2. Find the probability of having the disease and a positive test result. Answer: .001x.90=.0009

D

.001

.999

.90

.10

.05

.95

TestDisease Result

PosD

Neg

Pos

Neg

3. Find the probability of a positive test result. Answer: .001x.9+.999x.05=.05085

D

.001

.999

.90

.10

.05

.95

TestDisease Result

PosD

Neg

Pos

Neg

4. Find the probability a person has the disease, given a positive test result: A difficult problem to answer this way.

D

.001

.999

.90

.10

.05

.95

Pos

D

Neg

Pos

Neg

4. Find the probability a person has the disease, given a positive test result: 90/5085≈.0177

D

.001

.999

.90

.10

.05

.95

+ –D 90 10 100

4995 94905 99900

5085 94915 100000

D

Baye’s Theorem• Simplifies problems like this when we

essentially need to reverse the direction of a conditional probability.

• Complete Baye’s theorem is written for multiple events, but for two events it simplifies like this:

• For our problem:

( | ) ( )( | )

( )

P A B P BP B A

P A

( | ) ( ) .9 .001( | ) .0177

( ) .05085

P D P DP D

P

Outcomes with Outcomes with Unequal ProbabilitiesUnequal Probabilities

A scenario in which outcomes have different A scenario in which outcomes have different probabilities may be illustrated by the “urn” problems. probabilities may be illustrated by the “urn” problems.

Suppose we have an urn (an opaque container from Suppose we have an urn (an opaque container from which we may randomly select items) containing which we may randomly select items) containing marbles of different colors, such as:marbles of different colors, such as: Two redTwo red Three blueThree blue Five whiteFive white

Represent the outcome of one draw as R, B, or W. Represent the outcome of one draw as R, B, or W. Clearly,Clearly, P(R)=.2P(R)=.2 P(B)=.3P(B)=.3 P(W)=.5P(W)=.5

ClarificationClarification

There are only three outcomes, R, B, and W. There are only three outcomes, R, B, and W. This is because the information obtained from a This is because the information obtained from a draw is the color, not the particular marble.draw is the color, not the particular marble.

However, we realize that there are several However, we realize that there are several marbles associated with each outcome.marbles associated with each outcome.

If we choose to use the notation n(A) in this If we choose to use the notation n(A) in this case, we will have to define it as the number of case, we will have to define it as the number of marbles associated with the event A, and n(S) marbles associated with the event A, and n(S) would be the total number of marbles. Doing would be the total number of marbles. Doing this will enable us to correctly use the definition this will enable us to correctly use the definition of probability: P(A)=n(A)/n(S)of probability: P(A)=n(A)/n(S)

Two Draws with ReplacementTwo Draws with Replacement Suppose we draw a marble, return it to the urn, and draw Suppose we draw a marble, return it to the urn, and draw

again. Since the first marble is replaced, the first draw has again. Since the first marble is replaced, the first draw has no effect on the probability of the second draw; thus the no effect on the probability of the second draw; thus the draws are independent.draws are independent.

P(R,R)=(.2)(.2)=.04P(R,R)=(.2)(.2)=.04P(W,R)=(.5)(.2)=.10P(W,R)=(.5)(.2)=.10P(1 red)=(.2)(.3)+(.2)(.5)P(1 red)=(.2)(.3)+(.2)(.5)

+(.3)(.2)+(.5)(.2) +(.3)(.2)+(.5)(.2) =.32 =.32

P(at least one red)P(at least one red)=.32+(.2)(.2)=.36=.32+(.2)(.2)=.36

P(no red)=1P(no red)=1–.36=.64–.36=.64P(1 red and 1 blue)P(1 red and 1 blue)

=(.2)(.3)+(.3)(.2)=(.2)(.3)+(.3)(.2)=.12=.12

Two Draws, without ReplacementTwo Draws, without Replacement Suppose we draw two marbles, sequentially. When the first Suppose we draw two marbles, sequentially. When the first

marble is taken out, the proportions of the remaining marble is taken out, the proportions of the remaining marbles change; thus the draws are not independent.marbles change; thus the draws are not independent.

P(R,R)=1/45P(R,R)=1/45≈.022≈.022P(W,R)=1/9P(W,R)=1/9≈.111≈.111

P(1 P(1 red)=1/15+1/9+1/15red)=1/15+1/9+1/15 +1/9=16/45+1/9=16/45≈.356≈.356

P(at least one red)P(at least one red)=16/45+1/45=17/45 =16/45+1/45=17/45

≈.378≈.378 P(no red)=1P(no red)=1–17/45=28/45 –17/45=28/45

≈.622 ≈.622 P(1 red and 1 blue)P(1 red and 1 blue)

=1/15+1/15=2/15 =1/15+1/15=2/15 ≈.133≈.133

Spinners and Unequal ProbabilitySpinners and Unequal Probability

A spinner is a device with a rotating pointer or A spinner is a device with a rotating pointer or wheel and markings that determine an outcome wheel and markings that determine an outcome when the device stops spinning. Many when the device stops spinning. Many children’s games have these; roulette wheels children’s games have these; roulette wheels and “Wheels of Fortune” are fancier examples.and “Wheels of Fortune” are fancier examples.

The probability that the spinner stops in any The probability that the spinner stops in any particular arc (part of the circle) is determined by particular arc (part of the circle) is determined by the proportion of the circle taken up by the arc, the proportion of the circle taken up by the arc, or by the corresponding angle divided by 360or by the corresponding angle divided by 360º.º.

By changing the angles (arcs) corresponding to By changing the angles (arcs) corresponding to different outcomes, any desired set of different outcomes, any desired set of probabilities can be achieved. probabilities can be achieved.

Dice and Unequal ProbabilityDice and Unequal Probability Dice can also be used in a variety of imaginative ways to Dice can also be used in a variety of imaginative ways to

mimic unequal probability. For example, re-label a die so mimic unequal probability. For example, re-label a die so that one side is 1, two sides are 2, and three sides are 3. that one side is 1, two sides are 2, and three sides are 3. Then the corresponding probabilities are 1/6, 1/3, and Then the corresponding probabilities are 1/6, 1/3, and 1/2. 1/2.

Coins can be used too. For example, toss a coin twice. Coins can be used too. For example, toss a coin twice. Record a 2 for two heads, a 1 for one head, and a 0 for Record a 2 for two heads, a 1 for one head, and a 0 for no heads. The probabilities are 1/4, 1/2, and 1/4.no heads. The probabilities are 1/4, 1/2, and 1/4.

Recall the die toss simulation where we counted the Recall the die toss simulation where we counted the number of threes in two tosses?number of threes in two tosses?

There are 36 outcomes total:There are 36 outcomes total: 1 with 2 threes {33} 1 with 2 threes {33} 10 with 1 three {13 23 43 53 63 31 32 34 35 36}10 with 1 three {13 23 43 53 63 31 32 34 35 36} and the other 25 have no threes.and the other 25 have no threes. Hence the ratio of 25:10:1 as demonstrated in the simulation.Hence the ratio of 25:10:1 as demonstrated in the simulation.

Hmmm…Hmmm…

Why did the statistician cross the Why did the statistician cross the interstate?interstate?

To get data from the other side of the To get data from the other side of the median.median.