Back to questions
Say you roll a die three times. What is the probability of getting two sixes in a row?
This is the same question as problem #2 in the Probability Chapter of Ace the Data Science Interview!
Note that there are only two ways for 6's to be consecutive: either the pair happens on rolls 1 and 2 or 2 and 3, or else all three are 6's. In the first case with exactly two 6's, the probability is given by:
and, for all three, the probability is
By combining the probability for the two cases, the answer is: