Sunday 8 February 2015

Methods to find probability I

I believe one way to be sure about the answer to a probability problem is to be able to use different methods to arrive at the same probability.

A good example:
Tossing two fair coins once.
Find the conditional probability that both coins show tails given that
a) the first coin shows a tail;
b) at least one coin shows a tail.

Method I. Direct Way
a) P(TT | T first)
= P(T second)
= 1/2

b) P(TT | at least 1 T)
= (*) P(TT and at least 1 T) / P(at least 1 T)
= P(TT) / [1 - P(no T)]
= (1/2)^2 / (1-1/4)
= 1/3

(*) Note that P(TT and at least 1 T) =/= 1/2.

A related problem:

Assume the chance of having a boy or a girl in a family is equal.
a) In a two-kid family, given that the elder one is a boy, find the probability of the younger one being a boy.
b) In a two-kid family, given that one of them is a boy, find the probability of the other child also being a boy.

Denote boy by B, girl by G, the first letter being the older one, the second letter the younger one.

All possibilities of a two-kid family:
{GG, BG, GB, BB}

a) P(_B | B_) = 1/2
The younger one being a boy does not depend on whether or not the elder one is a boy.

b) P(BB | 1 B) = 1/3
We have to rule out GG if we are given that one of them is a boy.

Moral of the story: list out all possibilities to understand the problem! Don't rely on your intuition!


Method IIa. Enumeration (Listing all possibilities)
{HH, HT, TH, TT}

a) P(TT | T first)
= P({TT} | {TH, TT})
= P({TT} and {TH, TT}) / P({TH, TT})
= P({TT}) / P({TH, TT})
= #P({TT}) / #P({TH, TT})
= 1/2

b) P(TT | at least 1 T)
= P({TT} | {HT, TH, TT})
= P({TT} and {HT, TH, TT}) / P({HT, TH, TT})
= P({TT}) / P({HT, TH, TT})
= #P({TT}) / #P({HT, TH, TT})
= 1/3

Method IIb. Enumeration (Listing all possibilities)
{HH, HT, TH, TT}

a) P(TT | T first)
= 1/2
Since we know the first coin shows a tail, the possibilities are {TH, TT}. Then 1/2.

b) P(TT | at least 1 T)
= 1/3
We already know there is at least one tail, which means we can rule out the case HH. From the remaining cases {HT, TH, TT}, we know the probability of having TT from the given condition is 1/3.

Method III. Logic
Let Ti denote the event that the i-th coin shows a tail.

a) P(TT | T first)
= P(T1 and T2 | T1)
= P(T1 and T2 and T1) / P(T1)
= P(T1 and T2) / P(T1)
= (1/2)(1/2) / (1/2)
= 1/2

b) P(TT | at least 1 T)
= P[T1 and T2 | T1 or T2]
Note that T1 and T2 are not mutually exclusive. T1 or T2 includes three cases HT, TH, TT.
= P[(T1 and T2) and (T1 or T2)] / P(T1 or T2)
= P[(T1 and T2 and T1) or (T1 and T2 and T2)] / P(T1 or T2)
= P(T1 and T2) / P(T1 or T2)
= P(T1 and T2) / [P(T1) + P(T2) - P(T1 and T2)]
= (1/2)(1/2) / [1/2 + 1/2 - (1/2)(1/2)]
= 1/3

Method IV. Generating Functions (Refer to my previous post here.)
t: Tail appears
h: Head appears
$(t+h)^2=t^2+2th+h^2$

Since order matters in this problem,
$(t+h)^2=t^2+th+ht+h^2$

a) P(TT | T first) = 1/2
Nominator: coefficient of t^2
Denominator: sum of coefficients of t^2 and th

b) P(TT | at least 1 T) = 1/3
Nominator: coefficient of t^2
Denominator: sum of coefficients of terms with t, namely t^2, th, ht

No comments:

Post a Comment