Wednesday, December 31, 2008

GATE 1998 CS question 1.1 (Probability)

1.1. A die is rolled three times. The probability that exactly one odd number turns up among the three outcomes is:
(a) 1/6 (b) 3/8 (c) 1/8 (d) 1/2

Explanation (answer at the end):

Hah, probability!
Ok, let that not deter you, this problem is quite easy.
First of all, what are the numbers on a die? Ok, repeat after me, 1, 2, 3, 4, 5, and 6. :)
How many is that? 6
Now, how many of those are odd? 3
So, when you roll a die once, what is the probability that you get an odd number? (getting one of 3 odd numbers/ getting any one of the 6 numbers on the die) = 3choose1 / 6choose1 = 1/2.
Now, the die does not have any 'memory', so repeated rollings also have the same probability. So now, the probability that you get an odd num in the first rolling is 1/2, and the probability that you get an odd num in the second rolling is also 1/2.
Combining the first and second rollings, the possible combinations are:
(odd, even), (even, odd), (even, even), (odd, odd)
Let's say you wanted it such that both the first and the second rolling must give odd numbers.
That is, you want the combination (odd, odd). Given that odd and even are equally probable, and the rollings of independent of each other, we can see that all the 4 combinations above must have equal probability i.e. 1/4. Therefore, the probability of getting (odd,odd) is 1/4.
Now, extend this to 3 rollings. The combinations go like:
(odd, odd, odd), (odd, odd, even), (odd, even, odd), ...
There are 8 combinations like this (try and count if you don't believe me.. :) ). Using the same argument as above, all 8 are equally probable, so the probability of getting any of them is 1/8.
In particular, we want (odd, odd, odd), and the probability of getting that is also 1/8.
Answer: (c)

I probably got carried away explaining things and forgot the original question while writing that stroked out content. Sorry for the messup, and thanks to the anonymous commenter.
What we actually want is cases where exactly one odd comes up among the rollings. This one odd can come in one of three places as in (odd, even, even), (even, odd, even), and (even, even, odd). So out of the possible 8 combinations, 3 are favourable to us.
So the answer is (b) 3/8

3 comments:

Anonymous said...

Its actually 3/8 as the favorable cases are (odd,even,even),(even,odd,even) and (even,even,odd)

Anonymous said...

The way my math teacher told me is when you are solving dice problems you need to multiply the denominators and sum up the numerators...and that has always worked for me. However, I never really understood the reason until today. :-)

Anonymous said...

probability of getting odd number in one throw is (1,3,5) among six (1 t0 6) so 3/6=1/2
let p=1/2 q=1/2
by using bernouli's equation
we can get
three times we have to throw in that we must get one odd so n=3
3c1*(1/2)^1*(1/2)^2=3/8