Sie sind auf Seite 1von 28

Conditional Probability

Conditional Probability Events Involving And

Conditional Probability

The probability of event B occurring given that event A has


occurred is usually stated as the conditional probability of B,
given A; P(B/A)

P( A B) P( A and B)
P(B/A) =
P ( A) P ( A)
Conditional Probability Events Involving And
Conditional Probability
Example:
A number from the sample space S = {2, 3, 4, 5, 6, 7, 8, 9} is randomly
selected. Given the defined events A and B,
A: selected number is odd, and
B: selected number is a multiple of 3
find the following probabilities.
a) P(B) b) P(A and B) c) P(B/A)
a) B = {3, 6, 9} P(B) = 3/8
b) P(A and B) = P({3, 5, 7, 9} {3, 6, 9})
= P({3, 9}) = 2/8 = 1/4
c) Probability of B given A has occurred:
P(A and B) 1/4
P(B/A) = = = 1/2
P(A) 4/8
Conditional Probability Events Involving And
Conditional Probability
Example:
Given a family with two children, find the probability that both are boys,
given that at least one is a boy.
P( A and B)
Conditional Probability P(B/A) =
P ( A)
S= {gg, gb, bg, bb}
A = at least one boy A = {gb, bg, bb}
B = both are boys B = {bb}
P(A and B) = P({gb, bg, bb} {bb}) = P({bb}) = 1/4
P(A) = P({gb, bg, bb}) = 3/4

P( A and B) 1/4
= = 1/3
P ( A) 3/4
Conditional Probability Events Involving And
Independent Events

Two events are Independent if the occurrence of one of them has no


effect on the probability of the other.

P(B/A) = P(B)
or
P(A/B) = P(A)
Conditional Probability Events Involving And
Independent Events
Example:
A single card is randomly selected from a standard 52-card deck. Given
the defined events A and B,
A: the selected card is an ace, B: the selected card is red,
find the following probabilities.
a) P(B) b) P(A and B) c) P(B/A)
26
a) P(B) = = 1/2
52
b) P(A and B) = P({Ah, Ad, Ac, As} {all red}) = P({Ah, Ad}) = 2/52
P(A and B) 2/52
c) P(B/A) = = = 1/2
P(A) 4/52

Events A and B are independent as P(B) = P(B/A).


Conditional Probability Events Involving And
Multiplication Rule of Probability - Events Involving And
If A and B are any two events then
P(A and B) = P(A) P(B/A)
If A and B are independent events then
P(A and B) = P(A) P(B)

Example:
A jar contains 4 red marbles, 3 blue marbles, and 2 yellow marbles.
What is the probability that a red marble is selected and then a blue one
without replacement?
P(Red and Blue) = P(Red) P(Blue/Red)
= 4/9 3/8
= 12/72
= 1/8 = 0.1667
Conditional Probability Events Involving And
Multiplication Rule of Probability - Events Involving And
Example:
A jar contains 4 red marbles, 3 blue marbles, and 2 yellow marbles.
What is the probability that a red marble is selected and then a blue one
with replacement?
P(Red and Blue) = P(Red) P(Blue)
= 4/9 3/9
= 12/81
= 4/27 = 0.148
Example:
In an exam, two reasoning problems, 1 and 2, are
asked. 35% students solved problem 1 and 15%
students solved both the problems. How many
students who solved the first problem will also solve
the second one?
Solution:
Probability of student solving problem 1,P(1)=0.35
Probability of student solving both problem,
P(1 and 2)=0.15

Probability of solving 2 if 1 is solved, P(2|1) =


Example

Out of 50 people surveyed in a study, 35 smoke in which


there are 20 males. What is the probability the if the person
surveyed is a smoker then he is a male?
Solution:
Example
The probability of raining on Sunday is
0.07. If today is Sunday then find the
probability of rain today.
Example
In a school the third language has to be chosen
between Hindi and French. If a student has taken
French then what is the probability that he will take
Hindi, if the probability of taking Hindi is 0.34?
Bayes Theorem
Introduction
Shows the relation between one conditional
probability and its inverse.

Provides a mathematical rule for revising an


estimate or forecast in light of experience and
observation.

Relates
-Prior Probability of A, P(A), is the probability of event A not
concerning its associated event B
- Prior Probability of B, P(B), is the probability of B not concerning A
- Conditional Probability of B given A, P(BA). Also called the
likelihood
-Conditional Probability of A given B, P(AB). Also called the
posterior probability.
Simple example of prior, conditional, and
posterior probability
A. Dice 1 lands
on 3
B. Dice 2 lands
on 1
C. The dice sum
to 8
The prior probability of A, P(A), is 1/6. The prior probability of B, P(B), is
1/6. The prior probability of C, P(C), is 5/36

The conditional probability of event C given that A occurs, P(CA), is 1/6

The posterior probability, P(AC), is 1/5

What is P(CB)?
Answer: 0
Why Bayes theorem?
Bayes Theorem:

The posterior probability is equal to


the conditional probability of event B
given A multiplied by the prior
probability of A, all divided by the
prior probability of B.
Example
Two different suppliers, A and B, provide a
manufacturer with the same part.
All supplies of this part are kept in a large
bin. in the past, 5% of the parts supplied by
A and 9% of the parts supplied by B have
been defective.
A supplies four times as many parts as B

Suppose you reach into the bin and select a


part, and find it is nondefective. What is the
probability that it was supplied by A?
Solution
5% of the parts supplied by A and 9% of the
parts supplied by B have been defective.
P (DA) = 0.95 P(DB) = 0.91
A supplies four times as many parts as B
P(A) = 0.8 P(B) = 0.2
Suppose you reach into the bin and select a
part, and find it is nondefective. What is the
probability that it was supplied by A?
Find P(AD)
Solution cont.
P(AD) = P(DA) P(A)
P(D)
P (DA) = 0.95 P(A) = 0.8

P(D)= P (DA) P(A) + P(DB) P(B)

P(D) = (0.95) (0.8) + (0.91) (0.2) = 0.942

P(AD) = (0.95) (0.8)


(0.942)
P(AD) = 0.8068
Why is Bayes Theorem so cool?
Describes what makes something "evidence" and how
much evidence it is.
Science itself is a special case of Bayes theorem
because you are revising a prior probability (hypothesis)
in the light of an observation or experience that
confirms your hypothesis (experimental evidence) to
develop a posterior probability(conclusion)
Used to judge statistical models and widely applicable in
computational biology, medicine, computer science,
artificial intelligence, etc.

Das könnte Ihnen auch gefallen