Example: We flip a fair coin four times. What is the probability that the first flip was heads given that there were n heads in total?
S = {(h,h,h,h), .., (h,h,h,t), .., (t,t,t,t)} n(S)=24=16
A = first flip is heads
Bn="n heads in total"
P(A|B0) = P(A∩B0)/P(B0)=0
B0={{(t,t,t,t)} P(B0)=1/16
A∩B0=
P(A∩B0)=0
P(A|B0) = 0
P(A|B1) = P(A∩B1)/P(B1)
B1={{(t,t,t,h), (t,t,h,t), (t,h,t,t), (h,t,t,t)} P(B1)=4/16
A∩B1={ (h,t,t,t)} P(A∩B1)=1/16
P(A|B1) = P(A∩B1)/P(B1)=(1/16)/(4/16)=1/4
P(A|B2) = P(A∩B2)/P(B2)
B2={{(t,t,h,h), (t,h,t,h), .., (h,h,t,t)} P(B2)=6/16
A∩B2={ (h,t,t,h), (h,t,h,t), (h,h,t,t)} P(A∩B2)=3/16
P(A|B2) = P(A∩B2)/P(B2)=(3/16)/(6/16)=1/2
P(A|B3) = P(A∩B3)/P(B3)
B3={{(t,h,h,h), (h,t,h,h), (h,h,t,h), (h,h,h,t)} P(B1)=4/16
A∩B3={ (h,t,h,h), (h,h,t,h), (h,h,h,t)} P(A∩B3)=3/16
P(A|B3) = P(A∩B3)/P(B3)=(3/16)/(4/16)=3/4
P(A|B4) = P(A∩B4)/P(B4)
B4={{(h,h,h,h)} P(B4)=1/16
A∩B4 = {{(h,h,h,h)} P(A∩B4)=1/16
P(A|B4) = 1
:
Example : You draw two cards from a standard 52-card deck. What is the probability to draw 2 Aces?
Solution:
Let A = "First card drawn is an ace"
Let B = "Second card drawn is an ace"
Then
It's easy to extend this to more than two events: What is the probability of drawing 4 aces when drawing 4 cards?
Let Ai = "ith card drawn is an ace"
Then
even a little more complicated: In most Poker games you get in the first round 5 cards (Later you can exchange some you don't like but we leave that out). What is the probability that you get 4 aces?
Again let Ai = "ith card drawn is an ace"
Then
Example : a student is selected at random from all the undergraduate students at the Colegio
A1 = "Student is female", A2 = "Student is male"
or maybe
A1 = "Student is freshman", .., A4 = "Student is senior"
Let B be any event, then the law of total probability says
Example : A company has 452 employees, 210 men and 242 women. 15% of the men and 10% of the women have a managerial position. What is the probability that a randomly selected person in this company does not have a managerial position?
Let A1 = "person is female", A2 = "person is male"
Let B = "person has a managerial position"
Then
This is also part of Bayes' Rule:
Notice that the denominator is just the law of total probability, so we could have written the formula also in this way
only usually the first form is the one that is need because of the available information.
Example : In the company above a person is randomly selected, and that person is in a managerial position. What is the probability the person is female?
Example : As part of the attempt to avoid further terrorist attacks on the US some people have proposed face-recognition technics for airports. Basically each person entering the security checkpoint of the airport is photographed and the digital picture is then compared to a list of pictures of known terrorist suspects. Such systems are never 100% correct, they do make an occasional mistake. Say that the system classifies an actual terrorist as ok 50% of the time (many terrorists won't be in the database because they have never been investigated). This is called a false-negative. Also say that the system wrongly classifies an ok person as a terrorist 0.1% of the time (false-positive). Say at some large airport there are 10 million passengers per year, 20 of whom are actually terrorists. What is the probability that a person classified as a terrorist by the face-recognition system actually is not a terrorist?
Let's use the following notation:
Let A1 = "person is not a terrorist", A2 = "person is a terrorist"
B = "person is classified as a terrorist"
Now
So only 1 in 1000 people "accused" by the system actually is a terrorist!
Note: in this calculation you need to carry along a lot of digits until the final answer.
Example : A company has received three shipments, one each from three different suppliers. The shipment from company 1 contained 37 parts, the one from company 2 had 25 parts and the one from company 3 had 20 parts. An employee randomly selected one part from each shipment and tested it. It turned out one of them was bad. Unfortunately he did not pay attention which part came from which company. From previous experience we know that a part made by company 1 is faulty with probability 0.043. For company 2 the probability is 0.033 and for company 3 it is 0.027. What is the probability that the bad part came from company 2?
Let Ai = "part was made by company i"
B = "part is bad"
then
Bayes' Rule plays a very important role in Statistics and in Science in general. It provides a natural method for updating you knowledge based on data.
Example : Say you flip a fair coin 5 times. What is the probability of 5 "heads"?
Let Ai = "ith flip is heads"
Now it is reasonable to assume that the Ai's are independent and so