The conditional probability, as its name suggests, is the probability of an event happening based upon a given condition. For example, assume that the probability of a boy playing tennis in the evening is 95% (0.95), whereas the probability that he plays given that it is a rainy day is lower, at 10% (0.1). Here, the former case is just normal probability, while the latter case is conditional probability. In this example, we represent the two probabilities as:
P(Play tennis) = 0.95 and P(Play tennis | Rainy day) = 0.1.
Conditional probability is one of the important concepts in probability and statistics. The "probability of A given B" or the "probability of A with respect to the condition B" is denoted by the conditional probability P(A | B). Thus, P(A | B) represents the probability of A occurring after event B has already occurred. The probability of an event may alter if there is a condition given.
If A and B are two events associated with the same sample space of a random experiment, the conditional probability of event A given that B has occurred is given by:
P(A | B) = P(A ∩ B) / P(B), provided P(B) ≠ 0.
Let's understand conditional probability with an example. Find the conditional probability of getting at least two tails given that it is a head on the first toss when 3 coins are tossed. The sample space, S, when 3 coins are tossed is:
Let A = the event of getting at least two tails
Let B = the event of getting a head on the first toss
Then, A = {HTT, THT, TTH, TTT} and B = {HHH, HHT, HTH, HTT}.
P(A) = 4/8 = 1/2 and P(B) = 4/8 = 1/2.
We want to find the probability of getting at least two tails given that it is a head on the first toss. Out of all elements of B, only one outcome (HTT) has two tails. Thus, the required probability is:
P(A | B) = 1/4 (only 1 outcome of B is favorable to A out of 4 outcomes of B).
In the above example, we found that P(A | B) = 1/4. Here, 1 represents the element HTT, which is present in both A and B, and 4 represents the total number of elements in B. Using this, we derive the formula for conditional probability as follows:
P(A | B) = P(A ∩ B) / P(B) (where P(B) ≠ 0)
Similarly, we can define P(B | A) as:
P(B | A) = P(A ∩ B) / P(A) (where P(A) ≠ 0)
These formulas are also known as the "Kolmogorov definition" of conditional probability.
Note that the elements of B which favor the event A are the common elements of A and B, i.e., the sample points of A ∩ B.
Thus, P(A | B) = Number of events favorable to A ∩ B ÷ Number of events favorable to B.
P(A | B) = (n(A ∩ B) / n(S)) / (n(B) / n(S))
Thus, P(A | B) = P(A ∩ B) / P(B)
Here are some properties of conditional probability along with their proofs, which may be useful while solving problems. All these properties rely on the conditional probability formula (as mentioned above).
Let S be the sample space of an experiment, and A be any event. Then, P(S | A) = P(A | A) = 1.
Proof:
By the formula of conditional probability:
P(S | A) = P(S ∩ A) / P(A) = P(A) / P(A) = 1
P(A | A) = P(A ∩ A) / P(A) = P(A) / P(A) = 1
Hence, Property 1 is proved.
Let S be the sample space of an experiment, and A and B be any two events. Let E be any other event such that P(E) ≠ 0. Then, P((A ⋃ B) | E) = P(A | E) + P(B | E) - P((A ∩ B) | E).
Proof:
By the formula of conditional probability:
P((A ⋃ B) | E) = [P((A ⋃ B) ∩ E)] / P(E)
= [ P(A ∩ E) ⋃ P(B ∩ E) ] / P(E) (using a property of sets)
= [P(A ∩ E) + P(B ∩ E) - P(A ∩ B ∩ E)] / P(E) (using the addition theorem of probability)
= P(A ∩ E) / P(E) + P(B ∩ E) / P(E) - P(A ∩ B ∩ E) / P(E)
= P(A | E) + P(B | E) - P((A ∩ B) | E) (By the conditional probability formula)
Hence, Property 2 is proved.
P(A' | B) = 1 - P(A | B), where A' is the complement of set A.
Proof:
By Property 1, we have P(S | B) = 1.
We know that S = A ⋃ A'. Thus, by the above property:
P( A ⋃ A' | B) = 1
Since A and A' are disjoint events:
P(A | B) + P(A' | B) = 1
P(A' | B) = 1 - P(A | B)
Hence, Property 3 is proved.
The definition of independent and dependent events is closely connected to conditional probability. Let's explore these definitions and their formulas.
Dependent events are events where the occurrence of one event affects the probability of the other event happening.
Using the conditional probability formulas:
P(A | B) = P(A ∩ B) / P(B) ⇒ P(A ∩ B) = P(A | B) · P(B)
P(B | A) = P(A ∩ B) / P(A) ⇒ P(A ∩ B) = P(B | A) · P(A)
Thus, two events A and B are said to be dependent if one of these conditions is satisfied:
P(A ∩ B) = P(A | B) · P(B) or P(A ∩ B) = P(B | A) · P(A)
Independent events are events where the occurrence of one event does not affect the probability of the other event occurring. If A and B are independent, then:
P(A | B) = P(A) and P(B | A) = P(B)
Thus, for independent events, we can substitute P(A | B) with P(A) (or P(B | A) with P(B)) in one of the dependent event formulas. Therefore, two events are said to be independent if:
P(A ∩ B) = P(A) · P(B)
This is also known as the multiplication rule of probability.