Download conditional probability

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Inductive probability wikipedia , lookup

Birthday problem wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
Chapter 4, Part 1
Repeated Observations
Independent Events
The Multiplication Rule
Conditional Probability
1
Repeated Observations / Trials
• In this section, we discuss probabilities
that arise when we observe:
– The same random phenomenon more than
once.
– Two or more different random phenomena,
each of which could effect the others.
• We will use Classical Probability—all
outcomes are equally likely.
2
Repeated Dice Rolling
• Q: I roll my 20-sided die. What is the
probability of rolling a 20?
– Ans: 1/20 = 0.05 = 5%
• Q: I roll my die a second time. What is the
probability of rolling a 20?
– Ans: The same as before: 1/20 = 0.05 = 5%
• Q: I roll my die twice. What is the
probability that both rolls are 20?
3
Repeated Dice Rolling
• DIFFICULT(?) QUESTIONS:
– I roll my die twice. You see that the first roll is
20. What is the probability that the second roll
is 20?
– I roll my die twice. You see that the second
roll is 20. What is the probability that the first
roll was 20?
4
Repeated Dice Rolling
• Note the difference between:
– Probability that both rolls were 20 (400
possible outcomes).
– Probability that one roll was 20, given the
result of the other roll (20 outcomes).
• We usually assume that the two rolls
“have no effect on one another,” but we
don’t actually know this for certain.
5
Selection Without Replacement
• Assume that my hat has 5 pink slips and 5
blue slips.
• I pick one slip, and then pick a second slip
without replacing the first.
• Q: What is the probability that the first slip
is blue?
• Q: What is the probability that the second
slip is blue?
6
Selection Without Replacement
• The second probability depends on the
result of the first selection.
– First slip is Blue: There are 4 Blue, 5 Pink
slips left. The probability that the second slip
is Blue is 4/9.
– First slip is Pink: There are 5 Blue, 4 Pink
slips left. The probability that the second slip
is Blue is 5/9.
• This example illustrates what we will call a
conditional probability.
7
Conditional Probability
• The probability of one event occurring,
assuming that another event has occurred is
called a conditional probability.
• Idea: Knowing/assuming that one event
occurred might change the probability of a
second event.
• This commonly happens when we “select
without replacement.” The first result has an
effect on the second (and later) results.
• Note that this didn’t happen with the multiple
die rolls. The first result does not have an effect
on the second (or so we assume).
8
Conditional Probability
• We use the notation P(B|A), read as “the
conditional probability of B, given A.”
– Note that the order of events matters!!!
• This means: We assume that event A has
occurred, and use this knowledge to
compute the (classical) probability of B.
• P(B|A) and P(A|B) will usually be different
numbers. Order of events matters!!!
Conditional Probability Example
• I have 5 blue and 5 pink slips in the hat. I choose
two slips, without replacing the first.
• P(2nd is blue | 1st is Pink) = ??
– Assuming the 1st is pink (note the order of events),
the hat contains 5 blue, 4 pink.
– The conditional probability is 5/9.
• P(2nd is blue | 1st is Blue) = ??
– After the 1st selection, the hat contains 4 blue, 5 pink.
– The conditional probability is 4/9.
The Multiplication Rule
• Notation (only in section 4-4):
– We observe a random phenomenon twice.
– “A and B” means that event A occurs on the first
observation, and event B occurs on the second
observation.
– While this is technically a correct use of “A and B,” it
requires that each “outcome” consist of two separate
observations. This will probably confuse you, so…
– I will use the notation “A then B” to emphasize that we
are considering two observations.
The Multiplication Rule
• For any two events A, B.
P(A then B) = P(A) x P(B|A)
• Example: I choose two slips from the hat
(without replacing the first). The probability
that both slips are blue is:
P(Blue then Blue) = (5/10)*(4/9) = 2/9.
The Multiplication Rule
• P(A then B) = P(A) x P(B|A)
• The probability that the 1st is blue and the
2nd is pink?
P(Blue then Pink) = (5/10)*(5/9) = 5/18.
The Actual Definition of
Conditional Probability
• The conditional probability of B given A
(in that order) is defined to be:
P(A and B)
P(B | A) 
P(A)
• This is the standard use of “A and B”
discussed last time. “A then B” is just a
special case of this.
14
Classical Conditional Probability
• For conditional probability, we assume
that one event (A) occurred, and use this
information to compute the probability of a
second event (B).
• If we make a single observation, and all
outcomes are equally likely, there is a
very simple method for computing
conditional probability…
15
Classical Conditional Probability
• For the result of a single observation,
P(B|A) is given by:
# of outcomes in “A and B”
# of outcomes in A
• In other words, we take the number of
outcomes satisfying BOTH conditions,
and divide by the number of outcomes
satisfying the GIVEN condition.
16
Examples
• I select a student from the class. Assume
all outcomes are equally likely, compute:
– P(Female | Row 1)
– P(Male | Back Row)
– P(Back Row | Male)
– P(Back Row)
Dependent Events
• More often than not, knowing that one
event occurred will change our
expectations about a second event.
• In terms of conditional probability, this
means that P(B) ≠ P(B|A).
• If this is the case, we say that the two
events are dependent.
Independent Events
• But in some cases, knowing that one
event occurred DOES NOT change our
expectations about a second event.
• In terms of conditional probability, this
means that P(B) = P(B|A). If this is true,
we say the events are independent.
• An example is the 20-sided die:
P(2nd is 20) = P(2nd is 20 | 1st is 20).
Independent Events, Example
• I have 5 blue, 5 pink slips in the hat. I
choose two slips, REPLACING THE
FIRST before drawing the second.
Compute the following:
– P(2nd is Blue)
– P(2nd is Blue | 1st is Blue)
• You should find these to be the same
number, so these are independent events.
The Multiplication Rule for
Independent Events
• Original multiplication rule:
P(A then B) = P(A) x P(B|A)
• If the events are independent, then P(B|A)
is equal to P(B). The multiplication rule
reduces to:
P(A then B) = P(A) x P(B)