Bayes Theorm
Bayes Theorm
Example
Three jars contain colored balls as described in the table
below.
One jar is chosen at random and a ball is selected. If the ball is
red, what is the probability that it came from the 2nd jar?
P A B P A | BPB
Computing Probabilities
Probability of picking up a red ball from J1 = P of a red ball being picked up
from J1 from all balls* P of J1 being picked up from 3 jars
P J 2 R
P J 2 | R
P R
P J 2 R
P J 1 R P J 2 R P J 3 R
Arithmetic!
Plugging in the appropriate values:
P J 2 R
P J 2 | R
P J 1 R P J 2 R P J 3 R
1
18
12
0.17
1 1 4 71
8 18 27
Try Problem
Bowl A contains 2 red chips; bowl B
contains two white chips; and bowl C
contains 1 red chip and 1 white chip. A
bowl is selected at random, and one chip
is taken at random from that bowl. What is
the probability of selecting a white chip?
Another Example—Tree Diagrams
Red, White, and Blue are 3 types of tractors made
by a company
The chances that a tractor is defective are
6%,11%, and 8% for lines Red, White, and Blue
respectively.
48% of the company’s tractors
are made on the Red line and 31% are made
on the Blue line. What fraction of the company’s
tractors do not start when they roll off of an
assembly line?
Define Events
Let R be the event that the tractor was made by
the red company
Let W be the event that the tractor was made by
the white company
Let B be the event that the tractor was made by
the blue company
Let D be the event that the tractor won’t start
Extracting the Information
In terms of probabilities for the events
we’ve defined, this what we know:
P R 0.48
P W 0.21
P B 0.31
P D | R 0.06
P D | W 0.11
P D | B 0.08
What are we trying to find?
Our problem asked for us to find:
The fraction of the company’s tractors that do
not start when rolled off the assembly line?
In other words:
P D
Tree Diagram
Because there are three companies
producing tractors we will divide or
partition our sample space along those
events only this time we’ll be using a tree
diagram
Tree Diagram
Follow the Branch?
There are three ways for a tractor to be defective:
It was made by the Red Company
It was made by the White Company
It was made by the Blue Company
P R D
PW D
P B D
Computing Probabilities
To find each of these probabilities we
simply need to multiply the probabilities
along each branch
Doing this we find
P R D
P R | D
P D
I thought this was called Bayes’
Theorem?
Bayes’ Theorem
Suppose that B1, B2, B3,. . . , Bn partition the
outcomes of an experiment and that A is
another event. For any number, k, with
1 k n, we have the formula:
P( A | Bk ) P( Bk )
P( Bk | A) n
P( A | B ) P( B )
i 1
i i
In English Please?
What does Bayes’ Formula helps to find?
Helps us to find:
PB | A
By having already known:
P A | B