Example In a study of heart disease in male federal employees, researchers classified 356 volunteer subjects according to their socioeconomic status (SES - coded as Low, Middle, High) and their smoking status (Smoking - coded as Never, Former and Current). Here is the data:
What is the probability that a randomly selected volunteer in this study is a former smoker with a high socioeconomic status?
Answer is easy (92/356) but let's do this slowly:
Event A = "Former Smoker"
Event B = "high socioeconomic status"
What is the probability that a randomly selected volunteer in this study is a former smoker ?
Now, if we know that a randomly selected volunteer is a former smoker, what is the probability that he also has a high socioeconomic status?
If we know that that the person is a smoker, that means we are only choosing from the 141 smokers in the sample. Of those 92 have a high socioeconomic status, and so the answer is: 92/141
This kind of probability is called a conditional probability. We use the notation P(high|former) = P(B|A). Above we found the answer by switching sample spaces: from the original 356 people in the sample to the 141 who are smokers. This turns out to be difficult (or impossible) to do in most cases. Instead we will use the following. First note:
and so in general we can find conditional probabilities using the formula
Note: this only works if P(B)>0
It is important to notice that conditional probabilities are just like regular ones, for example they obey the Axioms:
Axiom 1: P(A|B)=P(A
B)/P(B), but P(A
B) and P(B) are both regular probabilities, so P(A
B)≥0, P(B)>0, so P(A|B)=P(A
B)/P(B)≥0
Also A
B
B, so P(A|B)=P(A
B)/P(B)≤P(B)/P(B)=1
Axiom 2: P(S|B)=P(S
B)/P(B)=P(B)/P(B)=1
Axiom 3: say A1,..,An are mutually exclusive, then
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"
Law of Total Probability
Let the set of events {Ai} be a partition, and let B be any event, then

Proof
P(B) = P(B
S) =
P(B
(
ni=1Ai) =
P(
ni=1(B
Ai) =
∑ni=1P(B
Ai) =
∑ni=1P(B|Ai)P(Ai)
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