Title: Statistics 221
1Statistics 221
- Chapter 4 Part B
- Probability
2Combining probabilities
- To determine the probability of some events,
probabilities of individual outcomes need to be
added or multiplied. - Here is an example where adding probabilities is
appropriate If you roll a die, what is the
probability of getting an even number (2, 4 or
6)? - To answer that question, youd add P(2) P(4)
P(6) 1/6 1/6 1/6 3/6 or ½. - There is a 50 chance of getting an even value on
the die.
3Combining probabilities
- Here is an example where multiplying
probabilities is appropriate If you roll a die
three times, what is the probability of getting
HHH? - To answer that question, you would multiply ½ ½
½ 1/8. - There is a 12.5 (1 in 8) chance of rolling a die
and getting heads all three times.
4When to add probabilities
- When there is more than one sample point that
satisfies the criteria needed to say that the
event has occurred, you add probabilities. - The question of what is the probability of
getting an even number on the die can be framed
as an OR question - What is P(2) OR P(4) OR P(6)?
- The answer is determined by adding the
probabilities - P(even) 1/6 1/6 1/6 3/6 or ½.
5When to multiply probabilities
- When each sample point (outcome) for that event
is a collection of individual outcomes treated as
a single outcome. - For example, rolling a die three times, the
outcome is made up of three individual outcomes
such as HHH or HTH or THT, etc. but each
set is considered a single outcome for the
event of rolling three times. - The question of what is the probability of
getting three heads can be framed as an AND
question - What is P(H) AND P(H) AND P(H)?
- The answer is determined by multiplying the
probabilities P(HHH) ½ ½ ½ 1/8.
6What is the probability of rolling doubles?
- That question can be framed as
- What is P(1 and 1) or (2 and 2) or (3 and 3) or
(4 and 4) or (5 and 5) or (6 and 6) - Since the probability of any one particular value
on the die is 1/6, the answer to this question
can be calculated as - (1/6 1/6) (1/6 1/6) (1/6 1/6) (1/6
1/6) (1/6 1/6) (1/6 1/6) or 5/36
7The Addition Principle
- The formula for calculating the probability of an
event consisting of two or more events joined by
OR is derived from the Addition Principle. The
formula is this - P(A or B) P(A) P(B)
- It says The probability of (A or B) is the
probability of event A occurring plus the
probability of event B occurring.
8Asking the probability of at least one is a
union question
- When we ask, what is the probability of A OR B,
we are actually asking - What is P(A ? B)? where the ? symbol means union.
- A Venn diagram can be used to represent a union
visually.
9A Venn diagram to represent the Union of A ? B
- P(2) or P(4) or P(6) P(2 ? 4 ? 6)
- P(even) is represented visually as the sum of the
areas in the green circles as a percentage of the
total area in the blue box.
5
4
1
6
2
3
10The Multiplication Principle
- The formula for calculating the probability of an
event consisting of two events joined by AND is
derived from the Multiplication Principle. The
formula is this - P(A and B) P(A) P(B)
- It says The probability of (A and B) is the
probability of event A occurring times the
probability of event B occurring.
11Intersections
- When we ask, what is the probability of A AND
B?, we are actually asking - What is P(A ? B)? where the ? symbol means
intersection. - VENN diagrams can be used to visualize the
concepts of union and intersection.
12The expression (A and B) can be expressed as the
Intersection of A ? B
- P(H) and P(H) and P(H) P(H ? H ? H)
- P(HHH) is represented visually as the overlapping
area in the green circles as a percentage of the
total area in the blue box.
Overlapping area
H
H
H
13Another example
- Lets say you draw a card from a deck. What is
the probability that you draw an ACE or a KING or
a QUEEN or a JACK? - A drawing an ACE
- B drawing an KING
- C drawing an QUEEN
- D drawing an JACK
- And
- P(A) 4/52, P(B) 4/52, P(C) 4/52, P(D)
4/52 - Therefore
- P(A or B or C or D) 4/52 4/52 4/52 4/52
16/52 or 30.77
14Venn Diagram for P(Ace or King or Queen or Jack)
The blue box represents the sample space all
cards in the deck.
Ace
King
Jack
Queen
15Lets change the question
- Lets say you draw a card from a deck. What is
the probability that you draw an ACE or a RED
card? - A drawing an ACE
- B drawing a RED (??)
- And
- P(A) 4/52, P(B) 26/52
- Therefore, is this true?
- P(A or B) 4/52 26/52 or 30/52? No!
16Disjoint events
- When two outcomes of an event can occur at the
same time, the outcomes are NOT disjoint. When
two outcomes of an event cannot occur at the same
time, the outcomes are disjoint. - In this case, A and B are not disjoint (mutually
exclusive) events. In other words, A and B can
occur together. - When A and B are NOT disjoint, then to calculate
the P(A or B), we must add the P(A) to the P(B)
but then subtract off the probability that (A and
B) will occur simultaneously.
17Venn Diagram for Joint Events
Sample space of all cards in the deck
Ace
Red
The red circle encompasses the points where we
drew the Ace of hearts or the Ace of diamonds.
18What is the P(A or B) now?
- If A and B are NOT disjoint, they can occur
together, and that occurrence is represented by
the overlap of the circles. The sample points
that fall in that area must be subtracted out so
that they are not counted twice.
Sample Space S
If A and B are NOT disjoint, subtract out the
sample points in the red circle (the overlap
area).
Red
Ace
19Formula refinement
- The formula for calculating the probability of a
combination event consisting of two events joined
by OR when events are NOT disjoint is - P(A or B) P(A) P(B) P(A and B)
- It says The probability of (A or B) is the
probability of event A occurring plus the
probability of event B occurring less the
probability that they occurred simultaneously.
20So what is P(Ace or Red)?
- A drawing an ACE
- B drawing a RED ??
- And
- P(A) 4/52, P(B) 26/52
- Therefore
- P(A or B) P(A) or P(B) P(A and B)
- P(A or B) 4/52 26/52 (4/52 26/52) .538
21Applying the multiplication rule to obtain the
P(A ? B)
- What is the probability of rolling a dice twice
and getting a six each time? - A getting a 6 on the first roll
- P(A) 1/6
- B getting a 6 on the 2nd roll
- P(B) 1/6
- Therefore
- P (A and B) P(A) P(B) 1/6 1/6 1/36
22Another Example
- Lets say you draw a card from a deck 4 times.
What is the probability that you draw an ACE all
four times? - A drawing an ACE on the first draw
- B drawing an ACE on the second draw
- C drawing an ACE on the third draw
- D drawing an ACE on the fourth draw
- And
- P(A) 4/52, P(B) 4/52, P(C) 4/52, P(D)
4/52 - Therefore
- P(A and B and C and D) 4/524 or .000035
23But what if you dont replace the card before you
draw the next one?
- Now you have a dependent events situation.
- If you replace the card each time before you draw
the next one, then the events are independent of
each other, and the probability of drawing an ACE
is the same each time (4/52). - If you do not replace the card each time before
you draw the next one, then the events are
dependent, and the probability of drawing an ACE
is not the same each time.
24Dependent events
- Lets say you draw a card from a deck 4 times and
this time you do not put the card back in the
deck each time. What is the probability that you
draw an ACE all four times? - A drawing an ACE on the first draw
- B drawing an ACE on the second draw
- C drawing an ACE on the third draw
- D drawing an ACE on the fourth draw
- And now
- P(A) 4/52, P(B) 3/51, P(C) 2/50, P(D)
1/49 - Therefore
- P(A and B and C and D) 4/52 3/51 2/50
1/49 .0000037
25Revisiting the formula for P(A and B)
- The formula
- P(A and B) P(A) P(B)
- Is applicable only if (A) and (B) are independent
events. That is, the occurrence of (A) does not
effect the occurrence of (B). - But if the outcome of As occurrence affects the
probability of B occurring, the A and B are
dependent events.
26When A and B are dependent
- If A and B are dependent events, the formula is
- P(A and B) P(A) P(BA)
- In English the probability of A and B both
occurring is the probability of A occurring
multiplied by the probability of B occurring
assuming that A did occur. - P(BA) is the probability of B given that A
occurred.
27Applying this formula to drawing cards without
replacement
- P(drawing first ACE) 4/52 .077
- But assume that you did get an ace, so there are
only 3 aces left in the deck which now has 51
cards. - P(drawing second ACE) 3/51 .059
- Again, assume that you did get an ace the second
time, so there are only 2 aces left in the deck
of 50 cards - P(drawing third ACE) 2/50 .04
- P(drawing fourth ACE) 1/49 .020
- Therefore
- P(drawing 4 aces) .077 .059 .04 .020
28Practice question
- If two of the items shown below are randomly
selected, find the probability that both items
are colored green. - red yellow green red blue yellow green
- Assume that the first item is replaced before the
2nd item is selected. - Assume that the first item is NOT replaced before
the 2nd item is selected
29P (green and green)
- a. With replacement (independent events)
- P (A and B) P (A) P (B)
- 2/7 2/7 4/49
- 8.16
- b. Without replacement (dependent events)
- P (A and B) P (A) P(B A)
- 2/7 1/6
- 4.8
30Practice question
- Time magazine reported that when 20,000 gas masks
from branches of the U.S. military were tested,
it was found that 6,850 were defective. If
further investigation begins with the random
selection of two gas masks from this population,
find the probability that they are both
defective. - A. Assume that the first is replaced before the
2nd is selected. - B. Assume that the first is NOT replaced before
the 2nd is selected. - C. Which choice makes more sense?
31P(defective AND defective)
- a. With replacement
- P (A and B) P (A) P (B)
- 6850/20000 6850/20000
- .3425 .3425
- 11.7306
- b. Without replacement
- P (A and B) P (A) P(B A)
- 6850/20000 6849/19999
- 11.7295
- c. It makes more sense not to replace the first
before selecting the second.
32Conditional Probability
- Recall the formula for P(A and B) when A and B
are dependent events - P(A and B) P(A) P(BA)
- The expression P(BA) means the probability of
B given that A did in fact happen. - If A and B are related events in some way,
knowing whether A actually did occur affects the
probability of B occurring.
33We use conditional probability to refine our
probability estimates
- Learning about conditional probability is
worthwhile if we want to improve our chances of
predicting some outcome. - If A and B are related in some way (dependent
events), knowing that A happened can improve our
chances of accurately predicting whether B will
happen.
34Examples that use conditional probability
- When a lab runs a test on a specimen or sample,
false positives have been known to occur as
well as true negatives. - For example, if you get a strep test, it could
come back negative when you really have strep and
it could come back positive when you do not have
strep.
35Examples that use conditional probability
- What is the probability that a person tested
positive, given that he has strep? - Positive
Negative - Has strep 80 5
- Does not have strep 3
11
36What is P(positivestrep)?
- Without using formulas, common sense tells you
that - Take all those who truly have strep and find out
what percent of those tested positive. - 85 have strep (denominator)
- 80 of those tested positive (numerator)
- P (positivestrep) 80 / 85 or 94.1
The part about given that he has strep reduces
the denominator from 99 to 85.
37What is P(streppositive)?
- This is a different question. It is What is the
probability that someone has strep given that
they tested positive. - Take all the ones who tested positive and find
out what percentage of those are actually have
strep. - 83 tested positive
- 80 of those actually have it
- P(streppositive) 80 / 83 or 96.4
The part about given that he tested positive
reduces the denominator from 99 to 83.
38Calculating conditional probabilities the easy
way
- 1. Create row and column totals.
- Positive Negative Total
- Has strep 80 5
85 - Does not have strep 3 11
14 - Total 83 16 99
- 2. To find P(AB), divide. The denominator is the
row or column total for whatever B is, the
numerator is the A value in that row or column
identified as B. Examples - P(positivestrep) 80/85
- P(streppositive) 80/83
39Whats the conditional probability?
- If we randomly select someone who as aboard the
Titanic, what is the probability of getting a
man, given that the selected person died?
Results of the sinking of the Titanic
40What is P(man died)?
- Denominator 1517 died
- Numerator 1360 of those were men
- P (man died) 1360 / 1517 or 89.7
41Whats the conditional probability?
- If we randomly select someone who as aboard the
Titanic, what is the probability of getting a boy
or girl, given that the selected person survived?
42What is P(boy or girl survived)?
- Denominator 706 survived
- Numerator (29 27) 56 of those were boys or
girls - P(boy or girl survived) 56 / 706 or 7.93
43Generalizing the formula for conditional
probability
- In each of the previous examples, we were
actually using the formula below. - For example, P(positivestrep)
- Where A positive, B strep
P(A and B)
80
P (A B)
P(B)
85
Positive Negative Has strep
80
5 Does not have strep 3
11
44Bayes Theorem
- The method just presented for calculating
conditional probabilities can be expressed using
Bayes terminology. - Bayes conditional probability formula is the
same but the situation is thought of as happening
in a time sequence where we start out with
initial information (we call prior probabilities)
and we then receive new information that enables
us to refine our probability estimates to obtain
posterior probabilities.
45Calculating conditional probabilities using Bayes
terminology
- A manufacturing firm receives shipments of parts
from two different suppliers, A1 and A2. - 65 of their parts come from supplier A1 and 35
come from supplier A2. - Historically speaking, 98 of the parts from A1
have been good (G) and 2 have been bad (B). - Historically speaking, 95 of the parts from A2
have been good (G) and 5 have been bad (B). - Heres the question Given that a part is bad
(B), whats the probability it came from supplier
A?
46Bayes terminology
- Before we know that a part is bad, there is a 65
chance it came from A1 and a 35 chance it came
from A2. These are called the prior
probabilities. - We also know that 2 of supplier A1s parts are
bad and 5 of supplier A2s parts are bad. These
are the conditional probabilities. - Now if we select a part and (given) it is bad,
what is the probability it came from supplier Ai?
These are the posterior probabilities that we
want to know.
47Given that a part is bad (B), whats the
probability it came from supplier A?
- Prior probabilities We know that 65 of our
parts come from supplier A and 35 come from
supplier B. - Conditional probabilities We know that 2 of
supplier As parts are bad and 5 of supplier Bs
parts are bad.
48Given that a part is bad (B), whats the
probability it came from supplier A?
- If we randomly selected a part from our
inventory, and it was bad, there is a 1.3 chance
that it came from supplier A and its bad there
is a 1.75 chance that it came from supplier B
and its bad.
49Given that a part is bad (B), whats the
probability it came from supplier A?
- 3.05 of our inventory is bad and 96.95 is good.
50Given that a part is bad (B), whats the
probability it came from supplier A?
What is P(supplier A part is bad)? Denominator
3.05 Numerator 1.30 P(supplier A part is
bad) 1.30 / 3.05 or 42.62
51Practice Question
- Given that a part is good (G), whats the
probability it came from supplier B?
P(Supplier B Good) .3325 / .9695 P(Supplier B
Good) 34.29
52Complements
- Sometimes its easier to calculate the probability
of an event NOT happening than it is to calculate
the probability of an event happening. - If we know that
- P(A) P(not A) 1
- Then after we calculate P(not A), we can subtract
that from 1 to find P(A).
53The Complement of an Event
- The complement of event A is defined to be the
event consisting of all sample points that are
not in A. - The complement of A is denoted by Ac.
- The Venn diagram below illustrates the concept of
a complement.
Sample Space S
Ac
Event A
P(A) P(Ac) 1
54Using complements to find the probability of at
least one
- The complement of at least one is none.
Therefore - P(at least one) 1 - P(none)
55Example
- Find the probability of a couple having at least
one girl out of three children. - P (none) P (boy) P (boy) P (boy)
- P (none) ½ ½ ½
- P (none) 1/8
- P (at least one girl) 1 1/8 or 7/8
56Whats the probability?
- If you run a red traffic light at an intersection
equipped with a camera monitor, there is a .1
probability that you will be given a ticket. If
you run a red traffic light at this intersection
five different times, what is the probability of
getting at least one ticket?
57The possible outcomes
- The (6) possible outcomes are
- 0 tickets
- 1 ticket
- 2 tickets
- 3 tickets
- 4 tickets
- 5 tickets
None
At least 1
58Whats the complement?
- If A is (getting at least one ticket)
- Then not A is (getting 0 tickets)
- Rather than find the P(A), find the P(not A) and
subtract it from 1 - P (0 tickets)
- P(.95) (.9) (.9) (.9) (.9) (.9) ) .59
- 1 - .59 .41
- Or 41
59Homework 7
- 28 on page 161
- 29 on page 161
- 32 on page 167
- 34 on page 168
- 42 on page 174