What is Conditional Probability?

 



Introduction


Let us begin like this. Assume this case. The probability of getting more than 80% on my MCQ paper if I answer it myself is 0.3 but, if I get a chance to get help from a cleaver student in my class at the exam then that probability will be much higher. Let us say 0.9. But the chance/ probability of getting help from a cleaver student in my class is, maybe 0.25. Considering all these aspects now what will be the probability I can score more than 80% on the exam?

This problem can be easily solved using a tree diagram which we are very familiar with since our childhood.

Let us follow the following conventions,
  • H - Getting help at the exam
  • H' - Not getting help at the exam
  • S - Score 80% +
  • S' - Not score 80% +
  • and - Intersection
  • or - Union
  • P(X) - Probability of occurring event 'X'
Figure 1: Tree diagram of the example


So the probability of me scoring 80% + on the exam is the sum of the above two circled probabilities.

P(S) = P(H and S) + P(H' and S) = 0.225 + 0.225 = 0.45

This is the diagrammatic method. Now let us learn how to do this in a more professional way. 

Conditional Probability


conditional probability is a measure of the probability of an event occurring, given that another event has already occurred. If the event of interest is A and the event B is known or assumed to have occurred, "the conditional probability of A given B", or "the probability of A under the condition B", is usually written as P(A|B). 

Check the following Venn diagram in Figure 2. The sample space is a big rectangle and there are two events A, B defined within that sample space (E). 

Figure 2: Sample Space and two events


When we say the probability of event A without considering anything, it is just the orange-colored area. Therefore, 

Figure 3: A and B events

P(A) = Area of the Orange circle / Area of the rectangle
P(A) = P(A) / P(E)
P(A)= P(A) ; since P(E) = 1

Now think that event B has already occurred, then the original sample space is no longer there. The new sample space is shrunk to the B circle (Figure 4 Orange + Green areas). Any event which will occur hereafter will be limited to that Green area. Also if event A is going to occur hereafter, only the part of A within B (which is the intersection part of A and B) is possible to occur. Therefore the probability of occurring A given that B is already occurred or the probability of A given B or the conditional probability of A given B is, 

Figure 4: After occurring event B


P(A/B) = Area of orange region / Green and Orange areas
P(A/B) = P(A and B) / P(B) ------------ ( 1 )

This is how we get the famous formula of conditional probability.   
     
In a similar way, we can obtain, 

P(B/A) = P(A and B) / P(A)

From there we can have,

P(A and B) = P(A/B) x P(A) ----------- ( 2 )

Therefore from equations ( 1 ) and ( 2 ) we can deduce,

P(A/B) = P(B/A) x P(A) / P(B) -------------- ( 3 )

We get the second form of the conditional probability formula.


Back to the Example

Recall our example of obtaining the probability of scoring 80% + on the exam. The data we were given are, 

"The probability of getting more than 80% on my MCQ paper if I answer it myself is 0.3 but, if I get a chance to get help from a cleaver student in my class at the exam then that probability will be much higher. Let us say 0.9. But the chance/ probability of getting help from a cleaver student in my class is, maybe 0.25."

We can rewrite these data using our notations considering the terms we defined in the beginning.
  • - Getting help with the exam
  • H' - Not getting help at the exam
  • - Score 80% +
  • S' - Not score 80% +
  • and - Intersection
  • or - Union
  • P(X) - Probability of occurring event 'X'
If I do not get help with the exam, the probability of getting 80% + means, 

P(S/H') = 0.3

The probability of getting help at the exam means,

P(H) = 0.25

If I get help with the exam, the probability of getting 80% + means,

P(S/H) = 0.9

Now we are asked to find the probability of me scoring 80% +. That means, 

P(S) = ???

Recall the Figure 2 Venn diagram. Assume A as H and B as S. From that we can write 
(NB: Here we should consider the conditional probability of event B given event A - which is the other way around explained in Figure 2),

Area of B = Intersection of A and B + Area only belong to B
        B = (A and B) U (A' and B) ; U means union
     P(B) = P(A and B) + P(A' and B) ; union in sets is an addition in probability
     P(B) = P(B/A) x P(A) + P(B/A') x P(A')

By substituting A ---> H and B ---> S we get,

P(S) = P(S/H) x P(H) + P(S/H') x P(H')
P(S) = 0.9 x 0.25 + 0.3 x 0.75 ; since P(H') = 1 - P(H) = 0.75
P(S) = 0.45


We get the same answer as before.

Relationship with Tree Diagrams

If you carefully observe how both tree and conditional probability methods work, you can identify the following relationship.

Figure 5: Relationship between two methods



There are some important theories developed using conditional probability called the Total Probability Theorem and the Bayes Theorem which play a major role in the probability and statistics field. In the example we discussed here, some parts of those theorems were also applied indirectly. If you are really interested please read about those two simple yet really important theories.

Comments