Friday, April 3, 2015

Unizor - Probability - Advanced Problems 6





Problem A
Knowing unconditional probabilities of events A and B and a conditional probability of an event B under condition of the occurrence of an event A, determine the conditional probability of an event A under condition that B has occurred.

Example
Many good mathematicians are also good chess players.
Assume that 1% of the people you might meet are good mathematician.
Assume further that 90% of them are good chess player.
At the same time only 10% of the people you might meet are good chess player.
What is the probability that a good chess player you've met is a good mathematician?
In terms of this problem, event A occurs when you meet a good mathematician; an event B occurs when you meet a good chess player.
P(A)=0.01
P(B)=0.1
P(B|A)=0.9
What is P(A|B)?

Solution
From the definition of a conditional probability, the probability of the occurrence of both events A and B (that is, the probability of an event A AND B or A∩B) can be represented in two ways:
(1) probability of the occurrence of A multiplied by a conditional probability of the occurrence of B under condition of the occurrence of A;
(2) probability of the occurrence of B multiplied by a conditional probability of the occurrence of A under condition of the occurrence of B.
In both case we should have the same result:
P(A∩B) = P(A)·P(B|A)
P(B∩A) = P(B)·P(A|B)
Of course,
P(A∩B) = P(B∩A)
Therefore,
P(A)·P(B|A) = P(B)·P(A|B),
from which we can derive the resulting formula:
P(A|B) = P(A)·P(B|A) / P(B)

Applied to the example above,
P(A|B)=0.01·0.9/0.1=0.09
So, there is 9% chance that a good chess player you've met is also a good mathematician. The knowledge about a person to be a good chess player increases the chances that he is also a good mathematician in 9 times compared to a random selection.

Problem B
This is a similar problem and it leads to a Bayes formula.
Assume there are two mutually exclusive events, A and B, that cover the whole sample space.
That is, A∩B=∅ (an empty set) and A∪B=Ω (an entire sample space).
Now we have another event X, the probability of which depends on whether A or B has occurred.
Knowing probability of event A (and, therefore, knowing the probability of B as a complementary event) and conditional probability of event X under condition of occurrence of events A and B, determine the conditional probability of event A under condition of occurrence of event X.

Example
For instance, A is an event describing a case of a person that is sick with some specific illness and B is an event that he has no such illness.
Now we run some diagnostic medical test X that is supposed to identify a specific illness defined by an event A.
Usually (but not always) the test performed on a sick person gives a positive result (event X occurred) and, if performed on a person who has no such type of illness, usually (but not always) gives a negative result (event X did not occur).
In medicine this is a typical situation when tests not always correctly identify the illness for a sick person and sometimes give false positive results on a non-sick person.
Assume that only 1% of people are sick with the illness in question, so we know the probability of the occurrence of event A:
P(A)=0.01
The rest 99% of the people are not sick, so the complementary event B has probability; P(B)=0.99
If the diagnostic test is performed on a sick person, it gives positive results in 95% of the cases, that is
P(X|A)=0.95
If the diagnostic test is performed on a non-sick person, it gives negative results in 95% of the cases, but in 5% of the cases gives false positive result.
P(X|B)=0.05
When the person comes to a doctor for a routine check-up, a doctor decides to run this diagnostic test and the result is positive.
What is the probability that this person is indeed sick with an illness in question?

Solution
P(A|X) = P(A)·P(X|A) / [P(A)·P(X|A)+P(B)·P(X|B)]

Applied to an example above,
P(A)=0.01
P(B)=0.99
P(X|A)=0.95
P(X|B)=0.05
Therefore, the probability of getting a positive result from the test is
P(X) = 0.01·0.95+0.99·0.05 =
= 0.059
Hence, the conditional probability of a person to be really sick if his test shows positive result is
P(A|X) = 0.01·0.95 / 0.059 ≅
≅ 0.161
As you see, relatively reliable test (95% reliability for sick people) delivers only 16% of reliability for randomly chosen person because of 5% of false positive results it delivers for healthy people. Really low reliability and insufficient to properly diagnose the person with the illness in question.

No comments: