Monday, August 14, 2017

Probability of consecutive dice rolls


This is probably quite a simple question but here I go..
Suppose you are going to roll a six-sided (fair) die N times, what is the probability that you will get at least one set of three consecutive numbers in a row?
Hopefully that's clear enough but as an example, in nine rolls you may get:
1, 4, 2, 6, 4, 4, 4, 4, 3
With the 4s making two sets of consecutive rolls.
Thanks!


Answer



Let T denote the first time when this happens and, for every |s|1 and k in {0,1,2}, uk(s)=Ek[sT] where k is the number of identical results just produced. One is asking for P0[TN]. A one-step Markov conditioning yields the usual linear system u0=su1, u1=s(16u2+56u1) and u2=s(16+56u1).


Solving this yields u0(s)=s33630s5s2. There exists two positive real numbers a and b such that 3630s5s2=36(1as)(1+bs), thus u0(s)=1361a+bs3(a1as+b1+bs) and, for every n1, P0[T=n+2]=1361a+b(an(1)nbn). The value of P0[TN] follows.


Numerically, a=112(5+35)=0.97568, b=112(5+35)=0.14235, for every n1, P0[T=n+2]=1185(an(1)nbn), and, when n, P0[T=n]73555an,P0[Tn]1255an.



No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...