I took a course on Stochastic Calculus with J. Michael Steele at UPenn. (I remember you said you were gonna teach stat in fall 2010, but never learnt it before)
First of all, is a martingale,

From Doob stopping time theorem,

So

I like your series term matching method for solving for . I came up with a combinatorial approach that I want to discuss with you.
Let denote the event that for a random walk without stopping rules (hallway is infinitely long), there are left steps and right steps during the first steps.

where is the number of ways to choose items from items.

By principle of reflection, for . Otherwise it is 0.
can be decomposed as
Finally

I converted formulas to latex (WordPress uses “dollar”latex … “dollar” syntax). Your count of paths is interesting but there are two questionable points. First, the events “hit N before T” and “hit -N before T” are not mutually exclusive. Second, I did not understand your way of counting the number of “hit N before T”.

This is meant as a reply to your Nov. 4 7:59pm comment, but WordPress does not seem to allow 4th level replies. The term actually counts only (hits N and then -N before T). Using reflection again, the term (hits -N and then N before T) should be . So the total number of walks exiting [-N,N] through N in M steps should be

binomial(M,(M+N)/2)-2*binomial(M-1,(M+N)/2)-binomial(M,(M+3*N)/2)+2*binomial(M-1,(M+3*N)/2)+binomial(M,(M+5*N)/2)
(using Maple notation, since I calculated with Maple).

The convenient test case is N=2, because (for M even) the correct answer is . The above formula gives correct answer for M=2,4,6,8,10, but for M=12 it returns 34 instead of 32. Why? Apparently, because the events (hits -N and then N before T) and (hits N and then -N before T) are not mutually exclusive. We could try to fix this too, but I’m afraid this is never going to stop.

I took a course on Stochastic Calculus with J. Michael Steele at UPenn. (I remember you said you were gonna teach stat in fall 2010, but never learnt it before)

First of all, is a martingale,

From Doob stopping time theorem,

So

I like your series term matching method for solving for . I came up with a combinatorial approach that I want to discuss with you.

Let denote the event that for a random walk without stopping rules (hallway is infinitely long), there are left steps and right steps during the first steps.

where is the number of ways to choose items from items.

By principle of reflection, for . Otherwise it is 0.

can be decomposed as

Finally

I converted formulas to latex (WordPress uses “dollar”latex … “dollar” syntax). Your count of paths is interesting but there are two questionable points. First, the events “hit N before T” and “hit -N before T” are not mutually exclusive. Second, I did not understand your way of counting the number of “hit N before T”.

Yes thanks for pointing these out! It should be .

if .

if .

This is meant as a reply to your Nov. 4 7:59pm comment, but WordPress does not seem to allow 4th level replies. The term actually counts only (hits N and then -N before T). Using reflection again, the term (hits -N and then N before T) should be . So the total number of walks exiting [-N,N] through N in M steps should be

binomial(M,(M+N)/2)-2*binomial(M-1,(M+N)/2)-binomial(M,(M+3*N)/2)+2*binomial(M-1,(M+3*N)/2)+binomial(M,(M+5*N)/2)

(using Maple notation, since I calculated with Maple).

The convenient test case is N=2, because (for M even) the correct answer is . The above formula gives correct answer for M=2,4,6,8,10, but for M=12 it returns 34 instead of 32. Why? Apparently, because the events (hits -N and then N before T) and (hits N and then -N before T) are not mutually exclusive. We could try to fix this too, but I’m afraid this is never going to stop.

I expanded this discussion into a new post.