In the previous article Probability, I defined what is probability. In this following lesson, I will introduce important related concepts like conditional probability and independence.
We will start by introducing this concept of independence
Till now, we have assumed that all events are independent,i.e. occurrence of 1 event will not affect the occurrence of the other event. For example, if we flip a coin twice, the probability of heads occurring twice is 1/2 x 1/2 = 1/4. The first head toss couldn't influence the occurrence of the other and so we consider both of them as independent events.
We can say that the coin doesn't have memory about the first toss
Formally, we can define two events A and B to be independent if:
There are two types of independence:
Consider 2 disjoint events, A and B.
If we apply the formula of independence, we see that:
P(AB) = 0
P(A)P(B) > 0
which is a contradiction. So, disjoint events don't follow the formula of independence.
As we have defined independence, we will now jump to the next important topic of Conditional probability.
Earlier, we have made an assumption that all the events are independent. But, there are cases when 2 events can be dependent upon each other. For example, consider 2 events, A and B such that A is the event that John goes to school and B is the event that it is raining heavily. John can go to school only if it is not raining. So, event A is dependent upon the occurrence/non-occurrence of event B. In these special cases, the probability takes a different form a.k.a. conditional probability.
Formally, we can define the conditional probability of A given B as:
So, the probability of John going to school given that it is raining is 0,i.e P(A|B) = 0
We can also define conditional probability of A given B as the fraction of number of occurrences of A to the number of occurrences of B. Another important rule to remember is that P(A|B) is not generally equal to P(B|A).
For example, the probability that you have red eyes given that you have fever is 1 but the inverse, the probability that you have fever given that you have red eyes is not 1.
Q) A particular medical test of a disease has positive and negative outcomes. The important probabilities are:
P(positive result & disease ) = .009
P(positive result & absence of disease ) = .099
P(negative result & disease ) = .001
P(negative result & absence of disease ) = .891
What is the probability of getting a positive result given that the patient has the disease and probability of getting a negative result given that the patient doesn't have the disease?
We can extend the definition of independence using conditional probability. For 2 independent events A and B,
conditional probability of A given B is:
6. 2 events A and B are independent if and only if P(A|B) = P(A).
I would love to receive feedback in the comment section below.