May 11th, 2009, 7:56 am
QuoteOriginally posted by: lega85B - is a simple random walk starting at 0:( B(0)=0, B(i)=S(1)+...+S(i). All S(k) are independent and P(S(k)=1) = P(S(k)=-1) = 1/2 for every k )Let's denote by N(a) the number of times the process B was equal to a, before its first returning back to 0. What is the E[N(a)]?Solution:Without loss of generality, assume a>0.To generalize a bit, define B(r,i)= S(1)+...+S(i), with B(r,0)=r where r is any integer. Accordingly, N(r,a) denotes the number of times the process B visits a, before its first return back to 0 (given that the process B starts off at r).Let f(r)=E[N(r,a)]. Our task is to compute f(0)=E[N(a)]=E[N(0,a)].If r<0, then clearly f(r)=0.It is a well-established fact that on the one-dimensional number line, the process B visits all integers with probability 1. If r>a, then with probability 1 the process B will eventually visit a. Hence, f(r)=f(a) for any r>a.Case a=1:f(0)= E[N(0,1)]= E[N(0,1) | B(0,1)=-1]*P{B(0,1)=-1} + E[N(0,1) | B(0,1)=1]*P{B(0,1)=1}.Since E[N(0,1) | B(0,1)=-1]=0, then f(0)= E[N(0,a)]=E[N(0,1) | B(0,1)=1]*P{B(0,1)=1}=(1/2)* E[N(0,1) | B(0,1)=1]= (1/2)*E[N(1,1)]=(1/2)*f(1)because once the process lands at 1, then from that point on, the number of times the process visits a=1 is N(1,1). In short f(0)=(1/2)*f(1).Now, f(1)= E[N(1,1)]= 1 + E[N(1,1) | B(1,1)=0]*P{ B(1,1)=0} + E[N(1,1) | B(1,1)=2]*P{ B(1,1)=2}.Once the process B returns to 0 (i.e., when B(1,1)=0), the game is over and the count for N(r,a) stops. So E[N(1,1) | B(1,1)=0]=0. Thusf(1)= E[N(1,1)]= 1 + (1/2)*E[N(1,1) | B(1,1)=2] = 1 + (1/2)* E[N(2,1)] = 1 + (1/2)*f(2) = 1 + (1/2)*f(1).From the latter equation, once simplified we get f(1)=2.Recall that f(0)=(1/2)*f(1). So, f(0)=(1/2)*(2)=1 since f(1)=2.Case a>1:f(a)= E[N(a,a)]=1 + E[N(a,a) | B(a,1)=a-1]*P{ B(a,1)=a-1} + E[N(a,a) | B(a,1)=a+1]*P{ B(a,1)=a+1},which can be written as f(a)= 1 + E[N(a-1,a)]*P{ B(a,1)=a-1} + E[N(a+1,a)]*P{ B(a,1)=a+1},which can be simplified tof(a)= 1 + (1/2)*E[N(a-1,a)] + (1/2)*E[N(a+1,a)] = 1 + (1/2)*f(a-1)+(1/2)*f(a+1).Recall that f(r)=f(a) for any r>a. So, f(a+1)=f(a) and hence f(a) = 1 + (1/2)*f(a-1)+(1/2)*f(a), which when simplified, becomes:f(a) = 2 + f(a-1). (**1**)Now, starting from 0, we have:f(0)= E[N(0,a)]= E[N(0,a) | B(0,1)=-1]*P{B(0,1)=-1} + E[N(0,a) | B(0,1)=1]*P{B(0,1)=1}.Clearly E[N(0,a) | B(0,1)=-1]= E[N(-1,a)]=0 and E[N(0,a) | B(0,1)=1]=E[N(1,a)]. So, f(0)= E[N(1,a)]*P{B(0,1)=1}=(1/2)*f(1). (**2**)f(1)= E[N(1,a)]= E[N(1,a) | B(1,1)=0]*P{B(1,1)=0} + E[N(1,a) | B(1,1)=2]*P{B(1,1)=2}, which can be written as f(1)=E[N(1,a) | B(1,1)=2]*P{B(1,1)=2} since as soon as B(1,1)=0, the game is over and the count for N(1,a) stops, which makes E[N(1,a) | B(1,1)=0] to be equal to zero. Since, E[N(1,a) | B(1,1)=2]=E[N(2,a)], thenf(1)=(1/2)* E[N(2,a)]=(1/2)*f(2).We can show by mathematical induction that f(1)=(1/k)*f(k) for any k in {1,2,3,
,a}. Thus,f(1)=(1/(a-1))*f(a-1), (**3**)andf(1)=(1/a)f(a). (**4**)From (**3**) and (**4**), we get:f(a-1)=((a-1)/a)*f(a). (**5**)From (**5**) and (**1**), we get:f(a)=2a. (**6**)From (**6**) and (**4**) we get:f(1)=2. (**7**)Finally, from (**7**) and (**2**) we get:f(0)=1.