Nvidia Interview Question | Combination
Question
What is the probability of getting a HTT combination before getting a TTH combination?
in progress
1
Statistics
55 years
1 Answer
895 views
Great Grand Master 0
Answer ( 1 )
Okay, this would be a bit long!!
Thes types of problems are of Triplets, I didn’t know about these until I got back to my basics of probability and solved some problems on Triplets to get an understanding of this.
Hold on, guys 😛
Given that each triplet is equally likely, it may initially seem that each is equally likely to appear first. For example, consider the triplets HHH and THH. The only way for HHH to appear before THH is if the first three tosses come up heads. Any other result will allow THH to block HHH. Therefore, the probability that HHH appears before THH is 1/8. (1/2*1/2*1/2)
We may calculate the probabilities for each pair in a similar manner. Consider, for example, HTT versus HHT. The probability HTT appears first is the mean of that probability over the four possibilities for the first two coin tosses. Let, for example, p(HT) be the probability HTT appears first following HT.
Suppose the first two throws are HH. Then the third throw can be either H or T. If it’s H, then we are back in the same position: the preceding two throws are HH. But if it’s T, then HHT has won! So the probability of HTT winning in this case is 0.
Putting the two possibilities for the third throw together, as a weighted mean, the probability that HTT wins following HH is: p(HH) = ½×p(HH) + ½×0 = p(HH)/2.
Now suppose the first two throws are HT. If the third throw is H, then neither player has won, and the probability HTT will ultimately win is (by definition) p(TH). (The last two throws were TH.) On the other hand, if the third throw is T, then HTT has won
So this time the weighted mean for the probability that HTT wins, following HT is: p(HT) = ½×p(TH) + ½×1 = p(TH)/2 + 1/2.
Continuing in this way, we obtain the results below:
(1) p(HH) = p(HH)/2
(2) p(HT) = p(TH)/2 + 1/2
(3) p(TH) = p(HH)/2 + p(HT)/2
(4) p(TT) = p(TH)/2 + p(TT)/2
(1) implies p(HH) = 0. (Intuitively, HTT can avoid losing only by hoping for an infinite string of heads!)
(3) implies p(TH) = p(HT)/2
(2) implies p(HT) = p(HT)/4 + 1/2 implies p(HT) = 2/3
(3) implies p(TH) = 1/3
(4) implies p(TT) = p(TH) implies p(TT) = 1/3
The mean of these four results gives us: probability of HTT appearing before HHT = 1/3
From the table the odds of getting HHT over TTH is 1-3/4 = 1/4
Attachment