Two-Dimensional Moran Model: Final Altitude and Number of Resets

: In this paper, we consider a two-dimension symmetric random walk with reset. We give, in the ﬁrst part, some results about the distribution of every component. In the second part, we give some results about the ﬁnal altitude Z n . Finally, we analyse the statistical properties of N Xn , the number of resets (the number of returns to state 1 after n steps) of the ﬁrst component of the random walk. As a principal tool in these studies, we use the probability generating function.


Introduction
The two-dimensional Moran model is a simple discrete process used in many fields to describe the evolution of two discrete random walks in each unit of time.
Moran's random walk model can be applied in the field of renewable energy.Many renewable energy situations can be modelled as Moran's random walk.This modelling has the advantage of minimizing expenses to guarantee the proper functioning of such a system by avoiding surprise breakdowns.In certain ecosystems, and more particularly in certain tropical forests, different species with the same ecological requirements coexist in the same environment.For example, some forests have more than a hundred different tree species on one hectare.To explain this astonishing diversity, scientists have constructed models in which community composition is solely based on the stochastic dispersal of individuals.The mathematical model studied in our paper is in line with this.It was suggested by M.Kalyuzhni [1] in an article where he justifies its relevance.It is known as Moran's model in a random environment.It is therefore a question of studying a process of birth and death which takes into account environmental hazards (climates, diseases, etc.) that randomly favour or disadvantage certain species.
In this work, our goal is to study the statistical properties of some discrete statistics such as the limiting distributions, the mean and the variance of two discrete walks in our model, X n and Y n , and the maximum of two walks Z n (called final altitude) using very elegant tools called probability generating functions.Also, we analyse the return time, N X n , of the random walk X n and find its mean and variance.
In the literature, these properties of discrete random walks are studied in one dimension and in higher dimensions via the kernel method and singularity analysis (see [2,3]).For example, for one dimension, if one focuses on articles which play a role in our analysis, Banderier and Flajolet have proven in [2] that the limiting distribution of the final altitude of a random meander of length n converges to a Rayleigh distribution (drift δ = 0) and normal distribution (δ > 0).Furthermore, the height of discrete bridges/meanders/excursions for bounded discrete walks has been analysed by Banderier and Nicodème [4].Also, Aguech, Althagafi , and Banderier in [5] have studied the height of walks with resets and the Moran Model.Similar extremal parameters were studied for trees in [6,7], and by Gafni [8] for the asymptotic distribution of the length of the longest run of consecutive equal parts.
Finally, Banderier and Wallner treated the number of catastrophes of a random excursion of size n, which converges to a Gaussian, Rayleigh, or discrete distribution depending on the drift (see Theorem 4.12 in [9]).
For higher dimensions, still in connection with our model, we can mention the twodimensional Moran model, investigated by Abdelkader and Althagafi in [10], where they showed that the age of each component converges to a shifted geometric distribution in law.Furthermore, the limiting distribution for the lifetime of an individual converges to a (shifted) geometric distribution in law, proven by Itoh and Mahmoud [11].Itoh, Mahmoud, and Takahashi in [12] proved that the wavelength converges, in distribution, to a convolution of geometric random variables.Other papers are related to the Moran process (in biology and population genetics); see, e.g., [13][14][15].The models in the papers [16,17] can be modelled as a Moran process.
This paper is organized as follows.In Section 2, we present our model in detail and define some statistics.In Section 3, in order to obtain the probability generating functions of the random walks, X n and Y n , we give some recursive equations for the sequence of multivariate polynomials in our model.We show that the two Moran random walks X n and Y n converge to shifted geometric distributions in law asymptotically.Also, we calculate their means and variances using the probability generating function of the random walks X n and Y n .In Section 4, we study the statistical properties of the maximum age, Z n , between two random walks X n and Y n .In Section 5, we analyse the number of returns up to time n, N X n .We start with a simulation of the random walk N X n with different lengths: 100, 1000, 10,000, and 100,000 according to the initial probability q using R software.Also, we obtain the distribution and the probability generating function.In Section 6, we determine the general probability generating function of the two-dimensional random walk, which can be useful to extract the distribution of the height H n .In Section 7, we present some conclusions concerning our results and some perspectives.In Appendix A, we give some technical lemmas useful for studying the final altitude.

Definitions and Presentation of the Model
In this section, we introduce our model: the two-dimensional symmetric Moran model.We define some statistics such as the final altitude, the height, and the return time.We present an elegant tool called the probability generating function, which plays an important role in finding the statistical properties of discrete random walks.

Presentation of the Model
Our model is presented as follows: At time 0, the random walk starts from the origin.After one unit of time, (a) the first random walk shifts by one positive unit, but the second random walk returns to 1 with probability 1 − q; (b) the second walk shifts by one positive unit, but the first random walk returns to 1 with same probability 1 − q; (c) the two random walks shift by one positive unit with probability 2q − 1, where q ∈ (1/2, 1).Mathematically, our model is given by the following system: for all n ∈ N where q ∈ (1/2, 1).The process (X n , Y n ) is considered a stochastic process with dimension two defined on the state space S 2 = {0, . . ., n} 2 , and started from the initial state (X 0 , Y 0 ) = (0, 0).

Definitions
In this subsection, we present some definitions concerning some discrete random walks.

1.
The final altitude, Z n , of the two-dimensional Moran random walk is defined by The height, H n , of the two-dimensional Moran random walk is defined by ∀n ∈ N, H n = max(Z 0 , Z 1 , Z 2 , . . ., Z n ),

3.
The return time, N X n , of the Moran random walk X .equals the number when X .returns to 1. where Our goal is to study the statistical properties of the following discrete random walks: n .Precisely, we want to find their limiting distributions, their means, and their variances.As mentioned before, as a tool, we use the probability generating function.
Definition 1.Let U be a discrete random variable with distribution P(U = r) = p r , r ∈ N. The probability generating function, denoted by G, of the variable U is defined by Due to their numerous uses, probability generating functions constitute an elegant tool to study the characteristic of a distribution.Mainly, the probability density functions associated with discrete stochastic processes and their moments can be obtained from the derivatives of the probability generating function.In fact, the mean and the variance of the process (the first and second centred moments of the distribution of U) are related to the derivatives of the probability generating function at u = 1.More precisely, the next folklore lemma explains this link.

Lemma 1 ([3]
).Let G U be the probability generating function of a the discrete random process U.For all k ∈ N, the k th factorial moment of U is given by In addition, if the limits of exist at u = 1, then we have the following two important equations, which are related to the mean and variance of U and G U (u): (2)

Distributions of X n and Y n
In this section, firstly, we derive a conditional probability of the position of the process defined in (1) at time (n + 1) given that we know its position at time n.Secondly, we determine the sequence of multivariate polynomials, denoted by f n (x, y) = E x X n y Y n , and find the recursive equation related to this sequence between two consecutive times n and n + 1.Finally, we show that the two symmetric random Moran walks X n and Y n converge to the shifted geometric distribution, and we compute their means and variances.Using the definitions in Section 2, we define the joint probability mass function of (X n , Y n ).Denote, for all r, s ∈ {0, . . ., n + 1}, this is the probability that the process is in the position (r, s) at time n + 1.
We start this section with a technical lemma.It involves a recursive equation between the probability of our model for two consecutive times, n and n + 1, to be used in Theorem 1.It is based on the following conditional probability: Lemma 2. For all n ≥ 2, we have Proof.This proof is based on the utility of the conditional probability that the Moran walks X and Y are aged r and s at time n + 1, given that they are aged l and k at time n, and then 1.
For r ≥ 2 and s ≥ 2, we have For r = 1 and s ≥ 2, we have: For r ≥ 2 and s = 1, we have by symmetry: Remark 1.Consider two consecutive times n and (n + 1), r and s days, starting from 1 to (n + 1), and the ages of two components X and Y are equal at time n + 1, respectively.We give some comments on the different cases of the age of two components X and Y at time n + 1: 1.
If r ≥ 2 and s ≥ 2, then the probability that X and Y are aged r and s at time (n + 1) is equal to the probability that (X, Y) is aged (r − 1, s − 1) days at the preceding time n multiplied by (2q − 1).

2.
If r = 1 and s ≥ 2, the probability that (X, Y) is aged (1, s) days equals (1 − q) multiplied by the sum of all probabilities of X and Y that are aged l and s − 1 days at time n, where l starts from 1 to n, respectively.

3.
If r ≥ 2 and s = 1, the probability that (X, Y) is aged (r, 1) days equals (1 − q) multiplied by the sum of all probabilities of X and Y that are aged r − 1 and k days at time n, where k starts from 1 to n, respectively.
Next, we define the sequence of multivariate polynomials f n (x, y) (for n ∈ N) associated with the two-dimensional process (X n , Y n ), by The coefficient of x r y s in f n (x, y) represents the probability that the position of the twodimensional process (X, Y) is at level (r, s) at time n.When x = y = 1, we have the special case By Equation ( 4) and Lemma 2, we deduce a recursive equation related to f n+1 (x, y), f n (x, 1), f n (1, y), and f n (x, y).It is presented in the next proposition.
Proposition 1.For all (x, y) ∈ R 2 , the explicit expression of the sequence of multivariate polynomials f n (x, y) holds the following recurrence: Proof.Using Equation ( 4) and for all n ≥ 1, the function f n+1 (x, y) can be developed as Due to Lemma (2), we can compute A, B, and C as follows: x r+1 y s+1 P n (r, s) finally, via symmetry, we deduce We obtain Equation ( 6) by combining Equations ( 7) and (10).
In this part, we study some statistical characteristics such that the probability generating function, the asymptotic distribution, the mean, and the variance of the final altitude of each component X n and Y n at time n can be obtained.Precisely, we start by finding the probability generating function of each component f (1, y).Next, we show that the final altitude of the two random walks X n and Y n converge to a shifted geometric distribution asymptotically.Finally, we finish this section by computing the mean and the variance of the two random walks.The following theorem introduces the probability generating function and the asymptotic limit distributions of X n and Y n .Theorem 1. X n and Y n converge to a shifted geometric distribution with parameter (1 − q) in law asymptotically, with the same probability generating function given by the following: for all n ≥ 0 for all x ∈ R, such that |1 − q x| < 1.
Proof.Using Equations ( 5) and ( 6) with y = 1, we obtain We iterate f n (x, 1) n times and we obtain Hence, passing to the limit of f n (x, 1), we the have it is exactly the generating function of a shifted geometric distribution with parameter 1 − q.
By symmetry, we have Theorem 1 leads us to find the explicit expressions of the means and variances of X n and Y n , which depend on the first and the second derivatives of the probability generating function f n (u), u = x, y.
Corollary 1.The means and the variances of X n and Y n are given by and Proof.Calculating the first derivative of f n (u, 1) defined in Equation ( 11) with respect to u, Using Equation (2), we obtain To derive the variance of X n and Y n , we need to define the following sequences of functions: Observe that using Equation ( 16) and computing the second derivative of f n (u) with respect u, one has The first derivatives of the functions K n (u), L n (u), and M n (u) are given by Let u = 1 and multiply by (1 − q), n(1 − q)q n , and (1 − q) q, respectively, we can obtain Replacing, in Equation ( 17), the first derivatives of K n (u), L n (u), and M n (u), with respect the variable u, with 1, we obtain Using the following equalities, and combining Equations ( 18)-( 20), the second derivative of f n (u) evaluated at u = 1 is given by Applying Equation (2), and using Equations ( 13) and ( 18), we obtain

Statistical Properties of the Maximum Age Z n
In this section, we analyse the final altitude of the maximum age, Z n = max(X n , Y n ), between two components at time n.Precisely, we determine the explicit form of Φ n (v), the probability generating function of Z n .It is defined as follows: for all v ∈ R such that |v| ≤ 1

Moment Generating Function of Z n
In the following theorem, we give the explicit expression of Φ n (v): Theorem 2. The probability generating function, Φ n (v), of the final altitude Z n between the two components X n and Y n is given by the following expression: For all v ∈ [−1, 1[ and for all n ∈ N * , Proof.The probability generating function, Φ n (v), of the final altitude Z n = max(X n , Y n ), can be developed as follows: and Using the last equation and Equation (A8), in Appendix A, we deduce that for all n ≥ 1 Remark 2. The probability generating function Φ n (v) of the random walk Z n , satisfies where S n (v) is given in Appendix A. The coefficient (2q − 1) n−1 represents the probability that both random walks X n and Y n are always increasing from (1, 1) at time 1 to (n, n) at time n with probability (2q − 1).Also, this probability equals 1 when n = 1, (i.e., P 1 (1, 1) = P 0 (0, 0) = 1).The coefficient 2 in Equation (23) reflects the symmetry between X n and Y n .

Moments of Z n
Due to the explicit form of Φ n (v) and using the first and the second derivatives in v = 1, we are able to compute the mean and the variance of the final altitude Z n .
Corollary 2. The explicit expressions of the mean and the variance of the final altitude Z n are given by Proof.In order to obtain the mean and the variance of Z n , we need to compute the first and the second derivatives of the probability generating function, Φ n (v), given in Theorem 2. Next, we evaluate two derivatives of Φ n (v Define the following sequences of functions: ∀n ≥ 1, ∀v ∈ R such that qv < 1 and The first derivative of Φ n (v) defined in Theorem 2 with respect v is given by where and evaluating at v = 1, we obtain By combining Equations ( 25)-( 27), we obtain Using Equations ( 2) and (28), we obtain Observe that The second derivative of the function H n (v) can be computed as We evaluate at v = 1, and we multiply it by 2(1 − q) to obtain The second derivative of the function L n (v) is given by The last second derivative evaluated at v = 1 gives We simplify , and we multiply it by 2(1 − q) to obtain 33) by ( 31)-(33), we deduce Via a simple calculation, we obtain and combining Equations ( 34)-(37), we obtain The variance of Z n is finally obtained using Equations ( 2), (24), and (38).

Return Time N X n of the Random Walk X n
In this section, we analyse the number of return times N X n at time n of the process (X .) to position 1 at time n.Precisely, we start with a simulation of the process N X n and determine the explicit form of G n (x), i.e., the probability generating function of N X n .

Simulations of N X n
In this subsection, we give some simulations with R-program using N X n with different lengths: 100, 1000, 10,000, and 100,000 for different values of the given probabilities q = 0.6, 0.75, 0.9.
Figure 1 shows that the return time, N n X , of the random walk, X, with length 100 is increasing from 0 to 40 from time 0 to time 100, when the random walk X alternates between 0 and 9 with initial probability q equal to 0.6.Also, we observe that the return time of random walk N X n with lengths 1000, 10,000, and 100,000 is increasing from 0 to 400, 4000, and 40,000, when the evolution of the random walk, X, is about 0 (very small variation in X), respectively.Figure 2 shows that the return time, N n X , of the random walk, X, with length 100 is increasing from 0 to 40 from time 0 to time 100, when the evolution of the random walk X alternates between 0 and at most 12 with initial probability q equal to 0.75.Also, we observe that the return time of random walk N X n with length 1000 is increasing from 0 to 300, when the evolution of the random walk, X, alternates between 0 and 25.Furthermore, Figure 2 shows that the return time of random walk N X n with lengths 10,000 and 100,000 is increasing from 0 to 2500 and 25,000, when the evolution of the random walk X is about 0, respectively.Figure 3 shows that the return time, N n X , of the random walk, X, with length 100 is increasing slowly from 0 to 10 from time 0 to time 100, when the evolution of the random walk X alternates between 0 and 17 with initial probability q equal to 0.9.Also, it shows that the return time of random walk N X n with length 1000 is increasing from 0 to 100, when the evolution of the random walk X alternates between 0 and 50.Furthermore, we observe that the return time of random walk N X n with lengths 10,000 and 100,000 is increasing from 0 to 1000 and from 0 to 10,000, when the evolution of the random walk X alternates between 0 and 80, and about 0, respectively.Figure 3.Return time of X (in red) and the random walk X (in green) of lengths 1000 and 500 and for q = 0.9.

Probability Distribution of N X n
In this section, we give the probability distribution of N X n .
Theorem 3. The exact distribution of N X n is given by Remark 3. Through an easy computation, we prove that this probability can be given by where for a k differentiable function g, the notation g (k) denotes the k th derivative of g.

Proof.
For the proof of Theorem 3, we start by computing the joint distribution of the discrete return time N X n and the discrete random walk X.To this end, for all k ∈ {0, . . ., n − 2} and for all s ∈ {1, . . ., n − 1}, we compute, as a first step, the probability of intersection between the return time equal to k, and the random walk equal to s.As a second step, we deduce the marginal distribution of N X n .Consider N X n the number of visits of the process X .to the state 1 up to time n.
We start by giving the joint distribution of N X n , X n .
Lemma 3. The joint distribution of (N X n , X n ) satisfies the following relation: and is given as where Bin(n − 1 − s, 1 − q) is a binomial distribution with parameters n − 1 − s and 1 − q.
Proof.Using Equation (39), we have By Theorem 1, X n follows a shifted geometric distribution with parameter 1 − q We conclude the proof by using the fact that By summing with respect to s and using the known distribution of X n , we deduce the result of Theorem 3.

Remark 4.
In the particular cases,
• If the return time of X equals 0 (k = 0), then the probability that the random walk X is strictly increasing from time 0 to time n equals q n−1 for any age of the random walk Y at time n.

•
If the return time of X equals n − 2 (k = n − 2), given that the age of X increases from 0 at time 0 to n − 2 at time n − 2, the probability that the age of X equals 1 at time n − 1 comes from the probability of X at time n − 2 multiplied by (1 − q).Remark 5.The probability generating function G n (x) of N X n can be expressed, and we prove that it is given by where the function g(n, k, q) is the well-known hyper-geometric function given by g(n, k, q) = hypergeom 1, n; [n − k]; q −1 .
From G n (x), we can compute the mean and the variance of N X n , but the expressions are very complicated.

The Probability Generating Function of the Random Walks X n and Y n
Next, consider the generating function associated to the above Moran process defined in (1), where the time is encoded by the exponent of t: Starting from the functional equation defined in (6) and using the kernel method (for more details view [2,18]), we obtain the PGF.It is very important to obtain this the probability generating function because it contains all information about the past of the random walk; in particular, it will be very useful for studying the height H n .This point will be one of our objectives in a future work.
Theorem 4. The probability generating function of the final altitude of the two-dimensional Moran walk is given as follows: for all (x, y) ∈ R 2 such that |t| < 1, |t x y| < 1/(2q − 1), |t x| < 1/q and |t y| < 1/q where 1 − q t y .
Remark 6.The term 1 − t p x 1 x 2 in Equation (46) is called the kernel factor.
Remark 7. We can factorize the probability generating function given by Equation (46) as From the previous theorem, we can find the probability generating function of two random Moran walks X n and Y n .Corollary 3. The probability generating functions, denoted by F X (t, x) := F(t, x, 1) and F Y (t, y)F(t, 1, y) :=, of X n and Y n are given by Proof.The proof is a direct consequence of the previous theorem: if we take x = 1 in (46), then we obtain the expression of the probability generating function of X n , and similarly for Y n .
The previous result is very important.It allows us to know the probability generating function of the two-dimensional walk (X n , Y n ).Combining Equations (45), (52), and (53), and evaluating at t = 1, then we have the expressions of f n (x, 1) and f n (1, y) .

Conclusions and Perspectives
In this current paper, we use very useful tools called probability generating functions to find the statistical properties, i.e., the mean, the variance, and the limiting distribution, of the random walks X n , Y n , Z n , and N X n .Firstly, we prove that both symmetric random Moran walks X n and Y n converge to a shifted geometric distribution with parameter (1 − q) using the probability generating functions asymptotically.Also, the means and the variances of X n and Y n are calculable explicitly using the same tools.Secondly, we use the symmetry of two random walks X n and Y n to find the statistical properties of the maximum age Z n between two components, such as the mean and the variance, derived from the probability generating function.Finally, we analyse the return time, N X n , of the random Moran walk X n .From the simulation of N X n , we observe that the return time is affected according to the initial probability q and the length of the random walk.Precisely, we distinguish two cases: 1.
When the initial probability q approaches 1 (q = 0.9), the return time with a small length (n = 100) is increasing slowly and remains lower than the final altitude of X n at time n (see Figure 3).In this case, the Moran random walk increases often and returns to 1 few times.That means the number of increases in X n is greater than the number of times that N X n returns to 1.

2.
When the length of the random walk X n is very large, (n = 1000) or 10,000 or 100,000, the return time N X n is not affected by the initial probability q and increases quickly (see Figures 1-3).In this case, the Moran random walk often returns to 1 but X n alternates between 1 and at most 50.That means the number of times that X n returns to 1 is greater than the increase in X n .
Here, the initial probability q represents the probability that the random walk X n increases.This increase in X n happens intwo ways: in the first way, X n increases but Y n stops at 1 with probability (1 − q); in the second, both walks X n and Y n increase in the same time with probability (2q − 1) (see Equation ( 1)).
In the next work, we will use the probability generating function to study the statistical properties of the height statistics, H n .Precisely, we will find the distribution of H n and compute its mean and variance based on the return time N X n .Firstly, we will start with the following conditional probability: P(H n ≤ k|N n = r) = ∑ I n, r, k where the random walk H n is bounded by an integer k > 0 given that the random walk N X n equals r ≥ 1.Secondly, we will try to obtain the joint distribution of (H n , N X n ).Finally, we can extract the distribution of the bounded random walk H n and determine its statistical properties.

Figure 1 .
Figure 1.Return time of X (in red) and the random walk X (in green) of lengths 1000 and 500 and for q = 0.6.

Figure 2 .
Figure 2.Return time of X (in red) and the random walk X (in green) of lengths 1000 and 500 and for q = 0.75.