Hypergeometric solution to a gambler's ruin problem with a nonzero halting probability

This paper treats of a kind of a gambler's ruin problem, which seeks the probability that a random walker first hits the origin at a certain time. In addition to a usual random walk which hops either rightwards or leftwards, the present paper introduces the `halt' that the walker does not hop with a certain probability. The solution to the problem can be obtained exactly using a Gauss hypergeometric function. The moment generating function of the duration is also calculated, and a calculation technique of the moments is developed. The author derives the long-time behavior of the ruin probability, which exhibits power-law behavior if the walker hops to the right and left with equal probability.


Introduction
The gambler's ruin problem is a classical subject of probability theory. Consider a random walker on a one-dimensional lattice hopping to the right with probability p → and left with p ← (= 1 − p → ) in a single time step. The problem seeks statistical properties of duration T x , the time at which the walker from x first hits the origin. (Of course, T x is a random variable.) Not only a model of bankruptcy [1] and gambling [2], but queuing theory [3] and genetic algorithm [4] are concerned with the gambler's ruin problem.
A standard textbook of probability theory [5] gives detailed instructions on this problem. The central quantity is the probabilityP (x, t) that the walker at position x first hits the origin after time t. As the solution of the equationP (x, t + 1) = p →P (x+ 1, t)+ p ←P (x− 1, t) with initial and boundary conditionsP (0, 0) = 1 andP (x, 0) =P (0, t) = 0 (x, t ≥ 1), The coefficient before p is the number of different paths from x hitting the origin first at time t, and it is connected with the reflection principle of a random walk [6]. Obviously,P (x, t) = 0 holds when t < x, because t t+x 2 = 0. In statistical physics, a similar problem is called the first passage problem [7]. This is a more general problem than the ruin problem, in that the state space of a random walker (or a diffusion particle) is not necessarily a one-dimensional lattice but higher-dimensional spaces and networks. Many fields Figure 1: An illustration of the problem. The random walker hops to the right with probability p → , and to the left with p ← ; hopping does not occur with probability p 0 . (p → + p ← + p 0 = 1.) The problem focuses on statistical properties of the duration T x , which is the time the walker first hits the origin.
in statistical physics, including reaction-rate theory [8], neuron dynamics [9], and economic analysis [10], have been formulated and analyzed based on first-passage properties.
The present paper analyzes an extended form of the classical ruin problem; a random walker hops to the right with probability p → , to the left with p ← , and it does not hop with probability Figure 1 schematically shows the problem. The only difference from the original ruin problem is that the halting probability p 0 is introduced. The difference seems very small, but the results become quite distinct. In fact, the solution (1) of non halting case (p 0 = 0) is superseded by a formula involving a Gauss hypergeometric function in halting case p 0 = 0. Moreover, moment analysis and asymptotic (long-time) behavior are developed.

Hypergeometric solution
As in the classical problem described in the previous section, let P (x, t) be the probability that the walker starting from x has duration T x = t. P (x, t) satisfies the equation P (x, t + 1) = p → P (x + 1, t) + p ← P (x − 1, t) + p 0 P (x, t) with initial and boundary conditions P (0, 0) = 1 and P (x, 0) = P (0, t) = 0 (x, t ≥ 1). However, it is hard to solve this equation directly, and we take an another way by employing a classical result (1) effectively.
To calculate P (x, t), we classify the walker's paths according to the number of hopping. We count the paths consisting of j hops and t − j halts. First, the different patterns of putting t − j halts into t steps are given by t−1 t−j in total, where 't − 1' (not t) comes from the fact that a halting step never comes to the last t-th step. Next, if we focus on only the hopping steps (and ignore the halting steps), the paths are reduced to those of classical ruin problem; the probability that the walker from x hits the origin after j hops is given byP (x, j). Thus the total occurring probability of a path with j hops and t − j halts is Summing up all j, we get In the third equality, the range of summation is changed; the terms corresponding to j > t have no contribution because 1 (t−j)! = 0. In the last equality we change the summation variable as j = x + 2k. This result can be also obtained by solving directly the equation P (x, t+1) = p → P (x+1, t)+p ← P (x− 1, t) + p 0 P (x, t) with conditions P (0, 0) = 1, and P (x, 0) = P (0, t) = 0 (x ≥ 1, t ≥ 1).
We further proceed with calculation; we rewrite factorials using gamma functions, which is a preparatory step toward a hypergeometric function. Employing some formulas of the gamma function, one obtains (See Appendix A for the calculation in detail.) The probability P (x, t) is expressed as where F (α, β; γ; z) is the Gauss hypergeometric function. This is an explicit form of the solution of our problem. This solution cannot be deduced from the non-halting solution (1). The hypergeometric function in Eq. (4) is a genuine hypergeometric function, in the sense that it cannot be expressed using simpler functions. (It has been studied that some hypergeometric functions have tractable expressions, e.g., F (1/2, 1; 3/2; −z 2 ) = z −1 arctan z. [11]) We comment here on the convergence of the sum in Eq. (4)-at first sight, it seems to diverge when 4p → p ← /p 2 0 > 1. By using the Pochhammer symbol (α) k := α(α + 1) · · · (α + k − 1) instead of gamma functions, (More precisely, the former becomes zero when x and t are of same parity, and the latter becomes zero otherwise.) The sum consists of a finite number of terms in reality, so one does not need to worry about the convergence.
The exact solution (4) is difficult to understand intuitively. We show numerical evaluation of P (x, t) in Fig. 2. The initial position of the walker is fixed as x = 50. We separate graphs according to the parameter ∆p := p ← − p → ; the panels (a), (b), and (c) respectively correspond to ∆p = 0.2, 0.1, and 0. (∆p is a key parameter for the average duration, as discussed in the following section.) P (x, t) is a unimodal function of t for each parameter value. Power-law behavior P (x, t) ∝ t −3/2 is suggested in large t when ∆p = 0 (see (d)), which is further discussed in Sec. 4.

Analysis of moment
In order to see properties of the random variable T x , moment analysis is developed in this section. First, we calculate the moment generating function of T x , defined as Calculation process is summarized in Appendix B, and the result is M x (s) contains no special functions, so this is simpler than P (x, t) of Eq. (4). Remarkably, M x (s) is described by elementary functions, though its definition (5) is an infinite sum of which each term contains a genuine hypergeometric function Remarkably, M x (s) contains no special functions, though the infinite summation in Eq. (5) involves a genuine hypergeometric function via P (x, t).
Repeatedly differentiating M x (s) and putting s = 0, we have the first and second moments of the duration T x as The average and the other moments remain finite when p ← > p → , and they diverge to infinity as We can give a plain explanation for the average T x . The walker moves to the left by a length ∆p = p ← − p → on average in a single hop. In other words, ∆p is a mean velocity of the walker toward the origin. Hence, it takes x/∆p time steps on average to reach the origin.
The moment generating function (6) looks too complicated to calculate higher moments by differentiation. Alternatively, we provide another calculation method for moments of the duration T x .
We start from the difference equation for P (x, t): Multiply t and take summation for t to get The left-hand side can be expressed as The last equality uses ∞ t=0 P (x, t + 1) = 1, which means that a random walker surely hits the origin. (This normalization breaks if p ← < p → -see the discussion of total probability of ruin in Sec. 5 in more detail.) We have a difference equation A particular solution is given by T x = x/(p ← − p → ), and the characteristic equation p → λ 2 − (p → + p ← )λ + p ← = 0 admits the two roots 1 and p ← /p → . Thus, the general solution is which has two constants A and B. In a limiting case p → → 0, the problem is still well-defined, and T x should be finite, so B = 0. Also, it is obvious that T 0 = 0, so A = 0. The appropriate solution is therefore Next we calculate the second moment. Multiplying t 2 and taking summation, we derive a difference equation where we use t 2 = (t + 1) 2 − 2(t + 1) + 1 for the calculation on the left-hand side. We assume a particular solution in the form T 2 x = C 2 x 2 + C 1 x, and determine two constants as The second moment is The homogeneous-solution part vanishes for the same reason as the average. In short, this 'bottom-up' method calculates higher moments inductively, and generally T k x becomes a polynomial of degree k. For instance, the third moment is calculated as x.

Asymptotic behavior
We look at long-time behavior of P (x, t) in this section. In particular, we confirm the power-law behavior P (x, t) ∝ t −3/2 mentioned in Sec. 2 when p → = p ← (see Fig. 2

(d) for reference).
A summation and factorial, as well as a hypergeometric function, are not suitable to study limiting behavior, so we first reexpress the probability P (x, t) into a tractable form. (It may also be possible to estimate factorials directly by Stirling's formula.) According to Ref. [5], the solution (1) of the classic ruin problem has another expressioñ This form is convenient in that one does not need to care about the parities of x and t. In fact, the integral holds the information of parities: t and x are of same parity, 0 otherwise.
In Appendix C we prove this formula. Applying Eq. (7) to Eq. (2), we have the integral form of the probability P (x, t): sin πφ · sin πxφdφ.
Here we estimate the integral where the integral variable is changed as ν = πtφ in the second equality. For large t, Hence the integrand is a rapidly decreasing function of ν, and we can extend the upper limit of the integration to infinity. Together with the approximation sin(ν/t) ≃ ν/t, we can carry out the integration as Therefore, the asymptotic form is expressed as By the arithmetic mean-geometric mean inequality, we note with equality holding if and only if p → = p ← (or ∆p = 0 by the notation in Sec. 2). Thus, the long-time behavior of P (x, t) is completely different according to whether ∆p equals zero or not.

Concluding remarks and discussions
In the present paper, we have solved a gambler's ruin problem where a random walker hops to the right with probability p → , left with p ← , and does not hop with p 0 . We have calculated exactly the probability P (x, t) that the walker starting from position x has duration T x = t. The average and higher moments of T x are calculated in two ways: by the moment generating function, and by the bottom-up calculation. The asymptotic form of P (x, t) is derived, and a power law P (x, t) ∼ t −3/2 is obtained when p → = p ← . We make a brief discussion on the continuum limit, which is an appropriate scaling limit where the step width and time interval of the walker tend to zero. Let the step width be δ and time interval be ǫ, and position and time are scaled as ξ = δx and τ = ǫt. In the continuum limit we take δ, ǫ → 0, together with are both kept finite. v is the mean displacement per time unit, and D is the diffusioin coefficient corresponding to a non-halting (or formally called a simple) random walk. The probability density function is suitable in the continuum limit, rather than the probability distribution P (x, t). ('lim' represents the continuum limit.) Carrying out calculation similar to that in Ref. [5], is obtained. The probability density ρ is called the inverse Gaussian distribution [12]. In the continuum limit, the halting effect p 0 is reflected only upon the diffusion coefficient as (1 − p 0 )D. Comparing P (x, t) of a discrete problem in Eq. (4) and above ρ(ξ, τ ) of a continuum limit, we conclude that the discrete random walk is far more difficult than the continuous diffusion, and that the results about the discrete random walk in this paper cannot be attained from continuous diffuision problem.
Combining Eqs. (4), (5), and (6), we get We have not used the condition p → + p ← + p 0 = 1 in the derivation of Eqs. (4) and (6), so p → , p ← , and p 0 can take any value independently. Set p → = z/4 and p ← = p 0 = 1, Furthermore, set s = − ln 2 (i.e., e −s = 2), These formulas are nontrivial, but the author cannot tell whether they are useful in practice. We stress that an infinite series of which each term involves a genuine hypergeometric function is hardly known.
We comment on the total probability of ruin. For the discrete problem, putting s = 0 the moment If p ← > p → , the gambler surely comes to ruin, but If p ← < p → , the gambler can manage to avoid running out of the bankroll with nonzero probability.
The equation P (x, t + 1) = p → P (x + 1, t) + p ← P (x − 1, t) + p 0 P (x, t) describes a traffic jam, where P (x, t) stands for the probability distribution that the jam consists of x cars at time t, and p → and p ← are involved in the rates at which cars enter and leave the jam. The scaling behavior with exponent −3/2 has been observed in the lifetime distribution of jams [13]. We think that results obtained in this paper can become theoretical bases; in particular, our discrete problem is comparable to a microscopic description of traffic, where discreteness is not negligible.

Acknowledgment
The author is grateful to Dr. Yoshihiro Yamazaki and Dr. Jun-ichi Wakita for their beneficial comments.
If t and x have opposite parity (i.e., t + x and t − x are odd), each Kronecker delta vanishes for all integer k. Otherwise, if t and x have same parity, each Kronecker delta becomes nonzero at some k. By picking out such k,