*Article* **The Rescaled Pólya Urn and the Wright—Fisher Process with Mutation**

**Giacomo Aletti 1,† and Irene Crimaldi 2,\*,†**


**Abstract:** In recent papers the authors introduce, study and apply a variant of the Eggenberger— Pólya urn, called the "rescaled" Pólya urn, which, for a suitable choice of the model parameters, exhibits a reinforcement mechanism mainly based on the last observations, a random persistent fluctuation of the predictive mean and the almost sure convergence of the empirical mean to a deterministic limit. In this work, motivated by some empirical evidence, we show that the multidimensional Wright—Fisher diffusion with mutation can be obtained as a suitable limit of the predictive means associated to a family of rescaled Pólya urns.

**Keywords:** Pólya urn; predictive mean; urn model; Wright—Fisher diffusion

## **1. Introduction**

The well-known standard Eggenberger—Pólya urn [1,2] works as follows. An urn initially contains *N*0, *<sup>i</sup>* balls of color *i*, for *i* = 1, ... , *k*, and at each time-step, a ball is drawn from the urn and then it is returned into the urn together with *α* > 0 additional balls of the same color (here and in the following, the expression "number of balls" is not to be understood literally, but all the quantities are real numbers, not necessarily integers). Hence, denoting by *Nn*, *<sup>i</sup>* the number of balls of color *i* inside the urn at time-step *n*, we have

$$N\_{n,i} = N\_{n-1,i} + \alpha\_{n,i}^x \qquad \text{ for } n \ge 1,$$

where *ξn*, *<sup>i</sup>* = 1 if the drawn ball at time-step *n* is of color *i*, and *ξn*, *<sup>i</sup>* = 0 otherwise. The parameter *α* tunes the reinforcement mechanism: the greater the *α*, the greater the dependence of *Nn*, *<sup>i</sup>* on ∑*<sup>n</sup> <sup>h</sup>*=<sup>1</sup> *ξh*, *<sup>i</sup>*.

In [3–5], the rescaled Pólya (RP) urn has been introduced, studied, generalized and applied. This model differs from the original one by the introduction of a parameter *β* such that

$$\begin{aligned} \mathsf{N}\_{n,i} &= b\_i + B\_{n,i} & \text{with} \\ B\_{n+1,i} &= \beta B\_{n,i} + \alpha \xi\_{n+1,i} & n \ge 0. \end{aligned}$$

Therefore, at time-step 0, the urn contains *bi* + *B*0, *<sup>i</sup>* > 0 balls of color *i* and the parameters *α* > 0 and *β* ≥ 0 regulate the reinforcement mechanism. More precisely, the term *βBn*, *<sup>i</sup>* connects *Nn*+1, *<sup>i</sup>* to the "configuration" at time-step *n* by means of the "scaling" parameter *β*, and the term *αξn*+1, *<sup>i</sup>* connects *Nn*+1, *<sup>i</sup>* to the outcome of the drawing at timestep *n* + 1 by means of the parameter *α*. The case *β* = 1 corresponds to the standard Eggenberger—Pólya urn with an initial number *N*0, *<sup>i</sup>* = *bi* + *B*0, *<sup>i</sup>* of balls of color *i*. When *β* < 1, the RP urn model shows the following three characteristics:


**Citation:** Aletti, G.; Crimaldi, I. The Rescaled Pólya Urn and the Wright—Fisher Process with Mutation. *Mathematics* **2021**, *9*, 2909. https://doi.org/10.3390/ math9222909

Academic Editors: Emanuele Dolera and Federico Bassetti

Received: 8 October 2021 Accepted: 13 November 2021 Published: 15 November 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

(iii) The almost sure convergence of the empirical mean ∑*<sup>N</sup> <sup>n</sup>*=<sup>1</sup> *ξn*, *<sup>i</sup>*/*N* to the deterministic limit *pi* = *bi*/ ∑*<sup>n</sup> <sup>i</sup>*=<sup>1</sup> *bi*, and a chi-squared goodness of fit result for the long-term probability distribution {*p*1,..., *pk*}.

Regarding point (iii), we specifically have that the chi-squared statistics

$$\chi^2 = N \sum\_{i=1}^k \frac{(O\_i/N - p\_i)^2}{p\_i}.$$

,

where *N* is the sample size and *Oi* = ∑*<sup>N</sup> <sup>n</sup>*=<sup>1</sup> *ξn*, *<sup>i</sup>* the number of sampled observations equal to *<sup>i</sup>*, is asymptotically distributed as *<sup>χ</sup>*2(*<sup>k</sup>* <sup>−</sup> <sup>1</sup>)*λ*, with *<sup>λ</sup>* <sup>&</sup>gt; 1. Therefore, the presence of correlation among observations attenuates the effect of *N*, which multiplies the chi-squared distance between the observed frequencies and the expected probabilities. This is a key feature for statistical applications in the framework of a "big sample", where a small value of the chi-squared distance might be significant, and hence a correction related to the correlation between observations is required. In [3,5], a possible application in the context of clustered data was described, with independence between clusters and correlation due to a reinforcement mechanism inside each cluster.

In [4], the RP urn was applied as a good model for the evolution of the sentiment associated with Twitter posts. Precisely, we analyzed three data sets: (i) the "COVID-19 epidemic" data set covers the period from 21 February to 20 April to 2020 and includes tweets in Italian about the COVID-19 epidemic; (ii) the "Migration debate" data set refers to the period from 23 January to 22 February 2019 and the collected posts are related to the Italian debate on migration; (iii) the "10 days of traffic" data set collects the entire traffic of posts in Italian in the period from 1 September to 10 September 2019. For every post, the relative sentiment, that is, the positive or negative connotation of the text, was computed using the polyglot python module developed in [6], which provides a numerical value *v* ∈ [−1, 1] for the sentiment of a post (for a survey on sentiment analysis, also known as opinion mining, we refer to [7] and references therein). We fixed a threshold *T* so that a tweet with *v* > *T* was classified as a tweet with a positive sentiment and one with *v* < −*T* was classified as a tweet with a negative sentiment. Tweets with a value *v* ∈ [−*T*, *T*] were discarded. We took the following different values for *T*: *T* = 0, *T* = 0.35 and *T* = 0.5. We applied the RP urn model, ordering the tweets according to their creation time and taking each tweet with a positive/negative classification as an extraction in the urn model. More specifically, we applied the RP model with *k* = 2: the time series of the tweets represents the time series of the extractions from the urn, that is, the random variables *ξn*, 1. The event {*ξn*, 1 = 1} means that tweet *n* exhibits a positive sentiment, while {*ξn*, 1 = 0} means that tweet *n* exhibits a negative sentiment. For all the considered data sets, the estimated values of *β* were strictly smaller than 1, but very near to 1 (details about the parameters estimation can be found in [4]). Note that the RP urn dynamics with such a value for *β* cannot be approximated by the standard Pólya urn (*β* = 1), because one would lose the fluctuations of the predictive means and the possibility of touching the barriers {0, 1}. In this work, we show that the law of such an RP urn process can be approximated by a Wright—Fisher diffusion with mutation. More precisely, we prove that the multidimensional Wright— Fisher diffusion with mutation can be obtained as a suitable limit of the predictive means associated with a family of RP urns with *β* ∈[0,1), *β* → 1. As an example, in Figure 1, for the data set "COVID-19 epidemic", we show the plot of the process (*ψn*, 1)*n*, reconstructed from the data (details about the reconstruction process can be found in [4]) and rescaled in time as *<sup>t</sup>* <sup>=</sup> *<sup>n</sup>*(<sup>1</sup> <sup>−</sup> *<sup>β</sup>*)2, the plot of a simulated (by the Euler–Maruyama method) trajectory of the Wright—Fisher process, the plot of the approximation of this trajectory by means of the RP urn and the approximation of the data process by means of the standard Pólya urn.

**Figure 1.** "COVID-19 epidemic" Twitter data set: the black line is the process (*ψn*, 1)*n*, reconstructed from the data and rescaled in time as *<sup>t</sup>* <sup>=</sup> *<sup>n</sup>*(<sup>1</sup> <sup>−</sup> *<sup>β</sup>*)2; the red line is a simulated trajectory of the Wright—Fisher process; the orange line is the approximation of this trajectory by means of the RP urn and the blue line is the approximation of the data process by means of the standard Pólya urn. The numbers 0, 0.35 and 0.5 refer to the values chosen for the threshold *T*. The corresponding estimated values for 1 <sup>−</sup> *<sup>β</sup>* are: 0.000776 (8 <sup>×</sup> <sup>10</sup>−4), 0.00115 (11 <sup>×</sup> <sup>10</sup>−4) and 0.00130 (13 <sup>×</sup> <sup>10</sup>−4).

The Wright–Fisher (WF) class of diffusion processes models the evolution of the relative frequency of a genetic variant, or allele, in a large randomly mating population with a finite number *k* of genetic variants. When *k* = 2, the WF diffusion obeys the one-dimensional stochastic differential equation

$$dX\_t = F(X\_t)dt + \sqrt{X\_t(1-X\_t)}dW\_{t\prime} \qquad X\_0 = x\_{0\prime}t \in [0,T]. \tag{1}$$

The drift coefficient, *F* : [0, 1] → *R*, can include a variety of evolutionary forces such as mutation and selection. For example, *F*(*x*) = *p*<sup>1</sup> − (*p*<sup>1</sup> + *p*2)*x* = *p*1(1 − *x*) − *p*2*x* describes a process with recurrent mutation between the two alleles, governed by the mutation rates *p*<sup>1</sup> > 0 and *p*<sup>2</sup> > 0. The drift vanishes when *x* = *p*1/(*p*<sup>1</sup> + *p*2) which is an attracting point for the dynamics. Equation (1) can be generalized to the case *k* > 2. The WF diffusion processes are widely employed in Bayesian statistics, as models for time-evolving priors [8–11] and as a discrete-time finite-population construction method of the two-parameter Poisson– Dirichlet diffusion [12]. They have been applied in genetics [13–18], in biophysics [19,20], in filtering theory [21,22] and in finance [23,24].

The benefit coming from the proven limit result is twofold. First, the known properties of the WF process can give a description of the RP urn when the parameter *β* is strictly smaller than one, but very near to one. Second, the given result might furnish the theoretical base for a new simulation method of the WF process. Indeed, the simulation from Equation (1) is highly nontrivial because there is no known closed form expression for the transition function of the diffusion, even in the simple case with null drift [25].

The rest of the paper is organized as follows. In Section 2, we set up our notation and we formally define the RP urn model. Section 3 provides the main result of this work, that is, the convergence result of a suitable family of predictive means associated with RP urns with *β* → 1. In Section 4, employing the boundary classification of the WF diffusion with mutation and connecting it to the parameters of the RP urn model, we introduce an RP urn with a value of *β* very near to 1 the notion of recessive subsets of colors and the notion of dominant color. These two concepts are related to the possibility of reaching the barriers 0 and 1 by the predictive means of the urn process. Finally, Section 5 summarizes the work and concludes it.

## **2. The Rescaled Pólya Urn**

For a vector *<sup>x</sup>* = (*x*1, ... , *xk*) <sup>∈</sup> <sup>R</sup>*k*, we set <sup>|</sup>*x*<sup>|</sup> <sup>=</sup> <sup>∑</sup>*<sup>k</sup> <sup>i</sup>*=<sup>1</sup> <sup>|</sup>*xi*<sup>|</sup> and *x*<sup>2</sup> <sup>=</sup> *<sup>x</sup><sup>x</sup>* <sup>=</sup> ∑*k <sup>i</sup>*=<sup>1</sup> |*xi*| 2. Moreover we denote by **1** and **0** the vectors with all the components equal to 1 and equal to 0, respectively.

Let *α* > 0 and *β* ≥ 0. At time-step 0, the urn contains *bi* + *B*0, *<sup>i</sup>* > 0 distinct balls of color *i*, with *i* = 1, ... , *k*. We set *b* = (*b*1, ... , *bk*) and *B***<sup>0</sup>** = (*B*0, 1, ... , *B*0, *<sup>k</sup>*). We suppose *<sup>b</sup>* <sup>=</sup> <sup>|</sup>*b*<sup>|</sup> <sup>&</sup>gt; 0 and we set *<sup>p</sup>* <sup>=</sup> *<sup>b</sup> <sup>b</sup>* . At each time-step (*n* + 1) ≥ 1, a ball is drawn at random from the urn and we define the random vector *ξn***+<sup>1</sup>** = (*ξn*+1, 1,..., *ξn*+1, *<sup>k</sup>*) as

$$
\xi\_{n+1,i}^{\mathbb{Z}} = \begin{cases} 1 & \text{when the drawn ball at time-step } n+1 \text{ is of color } i \\ 0 & \text{otherwise.} \end{cases}
$$

The number of balls inside the urn is updated as follows:

$$N\_{n+1} = b + B\_{n+1} \qquad \text{with} \qquad B\_{n+1} = \beta B\_n + n\xi\_{n+1},\tag{2}$$

which gives

$$\mathcal{B}\_{\mathfrak{h}} = \beta^n \mathcal{B}\_{\mathfrak{0}} + a\beta^n \sum\_{h=1}^n \beta^{-h} \mathfrak{F}\_{\mathfrak{h}} \, . \tag{3}$$

Similarly, from the equality

$$|\mathcal{B}\_{\mathfrak{n}+\mathbf{1}}| = \beta |\mathcal{B}\_{\mathfrak{n}}| + a\_{\mathfrak{n}}$$

we get, using ∑*n*−<sup>1</sup> *<sup>h</sup>*=<sup>0</sup> *<sup>x</sup><sup>h</sup>* = (<sup>1</sup> <sup>−</sup> *<sup>x</sup>n*)/(<sup>1</sup> <sup>−</sup> *<sup>x</sup>*),

$$|\mathcal{B}\_{\mathfrak{H}}| = \beta^{\mathfrak{H}} |\mathcal{B}\mathfrak{o}| + a \sum\_{h=1}^{n} \beta^{n-h} = \beta^{\mathfrak{H}} \left( |\mathcal{B}\mathfrak{o}| - \frac{a}{1-\beta} \right) + \frac{a}{1-\beta}.\tag{4}$$

Setting *r*∗ *<sup>n</sup>* = |*Nn*| = *b* + |*Bn*|, that is the total number of balls inside the urn at time-step *n*, we get the relations

$$r\_{n+1}^\* = r\_n^\* + (\beta - 1) \left| \mathcal{B}\_n \right| + \mathfrak{a} \tag{5}$$

and

$$r\_n^\* = b + \frac{\alpha}{1 - \beta} + \beta^n \left( |\mathcal{B}\_0| - \frac{\alpha}{1 - \beta} \right). \tag{6}$$

Denoting by F<sup>0</sup> the trivial *σ*-field and setting F*<sup>n</sup>* = *σ*(*ξ***1**, ... , *ξn*) for *n* ≥ 1, the conditional probabilities *ψ<sup>n</sup>* = (*ψn*, 1, ... , *ψn*, *<sup>k</sup>*) of the extraction process, also called *predictive means*, are

$$\Psi\_{\rm H} = E[\mathcal{J}\_{\rm n+1} | \mathcal{F}\_{\rm n}] = \frac{\mathcal{N}\_{\rm n}}{|\mathcal{N}\_{\rm n}|} = \frac{\mathbf{b} + \mathcal{B}\_{\rm n}}{r\_{\rm n}^\*} \qquad n \ge 0 \tag{7}$$

and, from (3) and (4), we have

$$\psi\_n = \frac{b + \beta^n \mathbf{B\_0} + a \sum\_{h=1}^n \beta^{n-h} \mathbf{\tilde{f}\_h}}{b + \frac{a}{1-\beta} + \beta^n \left( |\mathbf{B\_0}| - \frac{a}{1-\beta} \right)}. \tag{8}$$

The dependence of *<sup>ψ</sup><sup>n</sup>* on *<sup>ξ</sup><sup>h</sup>* is regulated by the factor *<sup>f</sup>*(*h*, *<sup>n</sup>*) = *αβn*−*h*, with 1 <sup>≤</sup> *<sup>h</sup>* <sup>≤</sup> *n*, *n* ≥ 0. In the case of the standard Eggenberger—Pólya urn (i.e., the case *β* = 1), each observation *ξ<sup>h</sup>* has the same "weight" *f*(*h*, *n*) = *α*. Instead, when *β* < 1 the factor *f*(*h*, *n*) increases with *h*, and the main contribution is given by the most recent drawings. The case *β* = 0 is an extreme case, for which *ψ<sup>n</sup>* depends only on the last drawing *ξn*.

By means of (7), together with (2) and (5), we get

$$
\Psi\_{n+1} - \Psi\_n = -\frac{(1-\beta)}{r\_{n+1}^\*} b \left(\psi\_n - p\right) + \frac{\alpha}{r\_{n+1}^\*} \left(\mathfrak{f}\_{n+1} - \varphi\_n\right). \tag{9}
$$

Setting Δ*Mn***+<sup>1</sup>** = *ξn***+<sup>1</sup>** − *ψ<sup>n</sup>* and letting *<sup>n</sup>* = *b*(1 − *β*)/*r*<sup>∗</sup> *<sup>n</sup>*+<sup>1</sup> and *δ<sup>n</sup>* = *α*/*r*<sup>∗</sup> *<sup>n</sup>*+1, from (9) we obtain

$$
\psi\_{\rm \textit{H}+\bf{1}} - \psi\_{\rm \textit{H}} = -\epsilon\_{\rm \textit{H}}(\psi\_{\rm \textit{H}} - \textit{p}) + \delta\_{\rm \textit{H}}\Delta\!\!M\_{\rm \textit{H}+\bf{1}}.\tag{10}
$$

#### **3. Main Result**

Consider the RP urn with parameters *α* > 0, *β* ∈ [0, 1), *b* > 0 and *B***<sup>0</sup>** such that |*B***0**| = *r*(*β*) = *α*/(1 − *β*). Consequently, the total number of balls in the urn along the time-steps is constantly equal to *<sup>r</sup>*∗(*β*) = *<sup>b</sup>* <sup>+</sup> *<sup>r</sup>*(*β*) and if we denote by *<sup>ψ</sup>***(***β***)** = (*ψ***(***β***)** *<sup>n</sup>* )*<sup>n</sup>* the predictive means corresponding to the fixed value *β*, we have the dynamics

$$
\psi\_{\mathfrak{n}}^{(\mathfrak{f})} - \psi\_{\mathfrak{n}-\mathbf{1}}^{(\mathfrak{f})} = -\epsilon(\beta) \left( \psi\_{\mathfrak{n}-\mathbf{1}}^{(\mathfrak{f})} - \mathfrak{p} \right) + \delta(\beta) \Delta \mathcal{M}\_{\mathfrak{n}}^{(\mathfrak{f})},\tag{11}
$$

where

$$\epsilon(\beta) = \frac{b(1-\beta)^2}{a+b(1-\beta)}, \qquad \delta(\beta) = \frac{a(1-\beta)}{a+b(1-\beta)}\tag{12}$$

and **<sup>Δ</sup>***M***(***β***)** *<sup>n</sup>* <sup>=</sup> *<sup>ξ</sup>* **(***β***)** *<sup>n</sup>* <sup>−</sup> *<sup>ψ</sup>***(***β***)** *<sup>n</sup>−***1**. Note that we have (*β*) <sup>∼</sup> *<sup>c</sup>δ*(*β*)<sup>2</sup> for *<sup>β</sup>* <sup>→</sup> 1, with *<sup>c</sup>* <sup>=</sup> *<sup>b</sup>*/*<sup>α</sup>* <sup>&</sup>gt; 0. Finally, we define *<sup>X</sup>*(*β*) = (*X***(***β***)** *<sup>t</sup>* )*t*≥0, where

$$\mathbf{X}\_{\mathbf{t}}^{\{\boldsymbol{\theta}\}} = \boldsymbol{\Psi}\_{\lfloor \boldsymbol{\vartheta}(\mathbf{1}-\boldsymbol{\beta})^{2} \rfloor}^{\{\boldsymbol{\theta}\}} \iff \quad \mathbf{X}\_{\mathbf{t}}^{\{\boldsymbol{\theta}\}} = \boldsymbol{\Psi}\_{\mathbf{n}-\mathbf{1}\prime}^{\{\boldsymbol{\theta}\}}, t \in [(n-1)(1-\boldsymbol{\beta})^{2}, n(1-\boldsymbol{\beta})^{2}). \tag{13}$$

The following result holds true:

**Theorem 1.** *Suppose that <sup>X</sup>***(***β***) <sup>0</sup>** *weakly converges towards some process X***<sup>0</sup>** *when β* → 1*. Then, for <sup>β</sup>* <sup>→</sup> <sup>1</sup>*, the family of stochastic processes* {*X***(***β***)**, *<sup>β</sup>* <sup>∈</sup> [0, 1)} *weakly converges towards the k-alleles Wright—Fisher diffusion X* = (*Xt*)*t*≥0*, with type-independent mutation kernel given by p and with dynamics*

$$dX\_{\mathbf{t}} = -b\frac{\mathbf{X}\_{\mathbf{t}} - \mathbf{p}}{a}dt + \Sigma(\mathbf{X}\_{\mathbf{t}})dW\_{\mathbf{t}\prime} \tag{14}$$

$$\text{with } \Sigma(\mathbf{X\_{t}}) \Sigma(\mathbf{X\_{t}})^{\top} = \left( \text{diag}(\mathbf{X\_{t}}) - \mathbf{X\_{t}} \mathbf{X\_{t}}^{\top} \right) \text{ and } \mathbf{1}^{\top} \Sigma(\mathbf{X\_{t}}) = \mathbf{0}^{\top}, \text{ that is,}$$

$$\Sigma(\mathbf{X}\_{l})\_{ij} = \begin{cases} 0 & \text{if } \mathbf{X}\_{t,i}\mathbf{X}\_{t,j} = 0 \text{ or } i < j \\ \sqrt{\mathbf{X}\_{t,i}\frac{\sum\_{l=i+1}^{k}\mathbf{X}\_{t,l}}{\sum\_{l=i}^{k}\mathbf{X}\_{t,l}}} & \text{if } i = j \text{ and } \mathbf{X}\_{t,i}\mathbf{X}\_{t,j} \neq 0 \\ -\mathbf{X}\_{t,i}\sqrt{\frac{\mathbf{X}\_{t,j}}{\sum\_{l=j}^{k}\mathbf{X}\_{l,l}\sum\_{l=j+1}^{k}\mathbf{X}\_{t,l}}} & \text{if } i > j \text{ and } \mathbf{X}\_{t,i}\mathbf{X}\_{t,j} \neq 0. \end{cases} \tag{15}$$

**Proof.** Fix a sequence (*βn*), with *β<sup>n</sup>* ∈ [0, 1) and *β<sup>n</sup>* → 1. The sequence of processes {*X***(***βn***)**, *<sup>n</sup>* <sup>∈</sup> <sup>N</sup>} is bounded, hence we have to prove the tightness of the sequence in the space *Dk*[0, ∞) of right-continuous functions with the usual Skorohod topology, and the characterization of the law of the unique limit process.

For any *<sup>f</sup>* <sup>∈</sup> *<sup>C</sup>*<sup>2</sup> *<sup>b</sup>* , define

*<sup>γ</sup>*(*β*, *<sup>f</sup>*) *<sup>n</sup>* (*x*) = *<sup>A</sup>*\$(*β*) *<sup>f</sup>*((*<sup>n</sup>* <sup>−</sup> <sup>1</sup>)(<sup>1</sup> <sup>−</sup> *<sup>β</sup>*)2)(*x*) = *E <sup>f</sup>*(*X***(***β***)** *<sup>n</sup>***(1***−β***)<sup>2</sup>** ) <sup>−</sup> *<sup>f</sup>*(*X***(***β***) (***n−***1)(1***−β***)<sup>2</sup>** ) (<sup>1</sup> − *<sup>β</sup>*)<sup>2</sup> *<sup>X</sup>***(***β***) (***n−***1)(1***−β***)<sup>2</sup>** <sup>=</sup> *<sup>x</sup>* = *E <sup>f</sup>*(*ψ***(***β***)** *<sup>n</sup>* ) <sup>−</sup> *<sup>f</sup>*(*ψ***(***β***)** *<sup>n</sup>−***1**) (<sup>1</sup> − *<sup>β</sup>*)<sup>2</sup> *<sup>ψ</sup>***(***β***)** *<sup>n</sup>−***<sup>1</sup>** <sup>=</sup> *<sup>x</sup>* by *<sup>ψ</sup>***(***β***)** *<sup>n</sup>* <sup>−</sup>*ψ***(***β***)** *<sup>n</sup>−***<sup>1</sup>**=−(*β*) *ψ***(***β***)** *<sup>n</sup>−***<sup>1</sup>**−*p* +*δ*(*β*)Δ*M***(***β***)** *<sup>n</sup>* <sup>=</sup> <sup>1</sup> (<sup>1</sup> − *<sup>β</sup>*)<sup>2</sup> *E f*(*x*) + ∑ *i ∂ f ∂xi* (*x*)(−(*β*)(*xi* − *pi*) + *δ*(*β*)Δ*Mn*,*<sup>i</sup>* (*β*) ) + <sup>1</sup> <sup>2</sup> *<sup>δ</sup>*(*β*)<sup>2</sup> ∑ *ij ∂*<sup>2</sup> *f ∂xi∂xj* (*x*)Δ*M*(*β*) *<sup>n</sup>*,*<sup>i</sup>* <sup>Δ</sup>*M*(*β*) *<sup>n</sup>*,*<sup>j</sup>* <sup>+</sup> *<sup>O</sup>*((<sup>1</sup> <sup>−</sup> *<sup>β</sup>*)3) F*n*−<sup>1</sup> − *f*(*x*) <sup>=</sup> <sup>−</sup> *<sup>b</sup> <sup>α</sup>*+*b*(1−*β*) ∑ *i ∂ f ∂xi* (*x*)(*xi* <sup>−</sup> *pi*) + <sup>1</sup> 2 *α*2 (*α*+*b*(1−*β*))<sup>2</sup> ∑ *ij ∂*<sup>2</sup> *f ∂xi∂xj* (*x*)(*xii*=*<sup>j</sup>* <sup>−</sup> *xixj*) + *O*(1 − *β*). (16)

We note that, for any *<sup>f</sup>* <sup>∈</sup> *<sup>C</sup>*<sup>2</sup> *<sup>b</sup>* , the partial derivatives in (16) are uniformly bounded, as *x* belongs to the compact simplex *<sup>S</sup>* <sup>=</sup> {*xi* <sup>≥</sup> 0, <sup>∑</sup>*<sup>i</sup> xi* <sup>=</sup> <sup>1</sup>}. The family {*γ*(*β*, *<sup>f</sup>*) *<sup>n</sup>* (*x*), *<sup>n</sup>* <sup>∈</sup> <sup>N</sup>, *<sup>β</sup>* <sup>&</sup>lt; 1, *x* ∈ *S*} is then uniformly integrable. Thus, as a consequence of [26] (Theorem 4) (or [27] (ch. 7.4.3, Theorem 4.3, p. 236)), we have that the sequence of processes {*X***(***βn***)**, *<sup>n</sup>* <sup>∈</sup> <sup>N</sup>} is tight in the space of right-continuous functions with the usual Skorohod topology. Since, for any *<sup>n</sup>* and *<sup>t</sup>*, *<sup>X</sup>***(***βn***)** *<sup>t</sup>* ∈ *S*, then **1**Σ(*Xt*) = **0**. Moreover, the generator of the limit process is determined by the limit

$$\begin{split}Af(t)(\mathbf{x}) &= \lim\_{n \to \infty} \gamma\_{\lfloor t/(1-\beta)^2 \rfloor}^{(\beta\_n f)}(\mathbf{x}) \\ &= -\frac{b}{a} \sum\_{i} \frac{\partial f}{\partial \mathbf{x}\_i}(\mathbf{x})(\mathbf{x}\_i - p\_i) + \frac{1}{2} \sum\_{ij} \frac{\partial^2 f}{\partial \mathbf{x}\_i \partial \mathbf{x}\_j}(\mathbf{x})(\mathbf{x}\_i \mathbf{1}\_{i=j} - \mathbf{x}\_i \mathbf{x}\_j). \end{split}$$

Hence, the weak limit of the sequence of the bounded processes *X***(***βn***)** is the diffusion process

$$d\mathbf{X\_{t}} = -b\frac{\mathbf{X\_{t}} - \boldsymbol{\underline{p}}}{\boldsymbol{\underline{a}}}dt + \boldsymbol{\Sigma}(\mathbf{X\_{t}})d\mathbf{W\_{t}}, \qquad \boldsymbol{\Sigma}(\mathbf{X\_{t}})\boldsymbol{\Sigma}(\mathbf{X\_{t}})^{\top} = \left(\text{diag}(\mathbf{X\_{t}}) - \mathbf{X\_{t}}\mathbf{X\_{t}}^{\top}\right).$$

The expression (15) follows from [28] (Corollary 3).

**Remark 1** (Limiting ergodic distribution)**.** *Since the simplex has dimension k* − 1 *with respect to the Lebesgue measure, it is convenient to change the notations. Let <sup>T</sup>k*−<sup>1</sup> *be the <sup>k</sup>* <sup>−</sup> <sup>1</sup>*-dimensional simplex defined by*

$$T^{k-1} := \{ y \in \mathbb{R}^{k-1} : y\_1 \ge 0, \dots, y\_{k-1} \ge 0, 1 - y\_1 - y\_2 - \dots - y\_{k-1} \ge 0 \},$$

*where, with the old definition, we have xi* = *yi*, *<sup>i</sup>* < *<sup>k</sup> and xk* := 1 − *<sup>y</sup>*<sup>1</sup> − *<sup>y</sup>*<sup>2</sup> −···− *yk*−1*. Obviously, there is a one-to-one natural correspondence between <sup>T</sup>k*−<sup>1</sup> *and the simplex* {*<sup>x</sup>* <sup>∈</sup> <sup>R</sup>*<sup>k</sup>* : *x*<sup>1</sup> ≥ 0, . . . , *xk* ≥ 0, ∑*<sup>i</sup> xi* = 1} *defined by*

$$y = (y\_1, \dots, y\_{k-1}) \quad \longleftrightarrow \quad (y\_1, \dots, y\_{k-1}, 1 - y\_1 - y\_2 - \dots - y\_{k-1}) = (\mathbf{x}\_1, \dots, \mathbf{x}\_{k-1}, \mathbf{x}\_k) = \mathbf{x}\_{\mathbf{x}\_k}$$

*The Markov diffusion process Xt in* (14) *may be redefined as Yt* = (*Xt*,1, ... , *Xt*,*k*−1) *on <sup>y</sup>* <sup>∈</sup> *<sup>T</sup>k*−<sup>1</sup> *with the corresponding generator*

$$Lf(\boldsymbol{y}) = -\frac{b}{a} \sum\_{i=1}^{k-1} \frac{\partial f}{\partial y\_i}(\boldsymbol{y})(\boldsymbol{y}\_i - \boldsymbol{p}\_i) + \frac{1}{2} \sum\_{i,j=1}^{k-1} \frac{\partial^2 f}{\partial y\_i \partial y\_j}(\boldsymbol{y})(\boldsymbol{y}\_i \boldsymbol{1}\_{i=j} - \boldsymbol{y}\_i \boldsymbol{y}\_j). \tag{17}$$

*The Kolmogorov forward equation for the density p*(*y*, *t*) *of the limiting process Y<sup>t</sup> is*

$$\begin{split} \frac{\partial}{\partial t} p(y, t) &= \frac{1}{2} \left( \frac{b}{a} \sum\_{i=1}^{k-1} \frac{\partial}{\partial y\_i} \left( p(y, t) (y\_i - p\_i) \right) \right. \\ &\left. + \sum\_{i=1}^{k-1} \frac{\partial^2}{\partial y\_i^2} \left( y\_i (1 - y\_i) p(y, t) \right) - 2 \sum\_{1 \le i < j \le k-1} \frac{\partial^2}{\partial y\_i \partial y\_j} \left( y\_i y\_j p(y, t) \right) \right) . \end{split} \tag{18}$$

*Therefore, it is not hard to show that the limit invariant ergodic distribution is*

$$p(\boldsymbol{y}) = \frac{1}{B(2\frac{b}{a}\boldsymbol{p})}(1 - y\_1 - \dots - y\_{k-1})^{\frac{2b(1-p\_1-\dots-p\_{k-1})}{a}-1} \prod\_{i=1}^{k-1} y\_i^{\frac{2bp\_i}{a}-1},\tag{19}$$

*because it satisfies* (18) *(see also [29]). The above distribution is the Dirichlet distribution Dir* 2 *b α p as a function of <sup>x</sup>* = (*y*, 1 − *<sup>y</sup>*<sup>1</sup> −···− *yk*−1)*.*

**Remark 2** (Transition density of the limit process)**.** *The transition density p*(*y***0**, *y*; *t*) *is defined by*

$$P(\mathbf{Y\_t} \in S | \mathbf{Y\_0} = y\_\mathbf{0}) = \int\_{S \cap T^{k-1}} p(y\_{\mathbf{0}'} y; t) dy$$

*and it can be represented in terms of series of orthogonal polynomials [30] as shown in [31]. Moreover, we refer to [9,32,33] for the explicit form of the reproducing kernel orthogonal polynomials.*

## **4. Recessive and Dominant Colors in an RP Urn with** *β* **Near to 1**

Let *J* = {*J*1, ... , *JkJ* } be a partition of {1, ... , *k*}, in that *Jl* = ∅, *Ji*<sup>1</sup> ∩ *Ji*<sup>2</sup> = ∅, and ∪*kJ <sup>l</sup>*=<sup>1</sup> = {1, ... , *k*}. Here *kj* denotes the cardinality of *J* . Define the *kJ*-dimensional objects (*ψ***(***β***,***J***)** *<sup>n</sup>* )*n*, (*<sup>ξ</sup>* **(***β***,***J***)** *<sup>n</sup>* )*<sup>n</sup>* and *<sup>p</sup>***(***J***)** as

$$\begin{aligned} \boldsymbol{\psi}\_{n,i}^{(\beta,I)} &= \sum\_{l \in I\_{i}} \boldsymbol{\psi}\_{n,l}^{(\beta)} \\ \boldsymbol{\xi}\_{n,i}^{(\beta,I)} &= \sum\_{l \in I\_{l}} \boldsymbol{\xi}\_{n,l}^{(\varepsilon)} \\ p\_{i}^{(I)} &= \sum\_{l \in I\_{i}} p\_{I} \end{aligned} \qquad \text{for } i = 1, \dots, k\_{I'} $$

and *<sup>X</sup>***(***β***,***J***)** *<sup>t</sup>* <sup>=</sup> *<sup>ψ</sup>***(***β***,***J***)** *t***/(1***−β***)2**. With these definitions, from (11), we immediately get that (*ψ***(***β***,***J***)** *<sup>n</sup>* )*<sup>n</sup>* is a *kJ*-dimensional RP urn following the dynamics

$$
\Psi\_{\mathfrak{n}}^{(\mathfrak{f},l)} - \Psi\_{\mathfrak{n}-\mathbf{1}}^{(\mathfrak{f},l)} = -\epsilon(\beta) \left( \Psi\_{\mathfrak{n}-\mathbf{1}}^{(\mathfrak{f},l)} - \mathfrak{p}^{(I)} \right) + \delta(\beta) \left( \mathfrak{f}\_{\mathfrak{n}}^{(\mathfrak{f},l)} - \Psi\_{\mathfrak{n}-\mathbf{1}}^{(\mathfrak{f},l)} \right) \tag{20}
$$

and that Theorem <sup>1</sup> holds for *<sup>X</sup>***(***β***,***J***)** *<sup>t</sup>* . Consequently, the convergence to the Wright—Fisher diffusion still holds if we group together some components of the process. For instance, when we consider two groups of components, we have the following result:

**Corollary 1.** *Let <sup>J</sup>* <sup>=</sup> {*J*, *<sup>J</sup>c*} *with <sup>J</sup>* <sup>=</sup> <sup>∅</sup>*, <sup>J</sup><sup>c</sup>* <sup>=</sup> <sup>∅</sup>*. Under the hypothesis of Theorem 1, each component of the sequence of processes <sup>X</sup>***(***β***,***J***)** *<sup>t</sup> converges, for β* → 1*, to the one-dimensional diffusion process with values in* [0, 1] *that satisfies the SDE*

$$dX\_{t,i}^{(J)} = -b \frac{X\_{t,i}^{(J)} - p\_i}{a} dt + (-1)^{i+1} \sqrt{X\_{t,i}^{(J)} (1 - X\_{t,i}^{(J)})} dW\_{t,i}$$

*In addition, X*(*J*) *<sup>t</sup>*,1 <sup>=</sup> <sup>∑</sup>*l*∈*<sup>J</sup> Xt*,*<sup>l</sup> and X*(*J*) *<sup>t</sup>*,2 = <sup>∑</sup>*l*∈*J<sup>c</sup> Xt*,*l.*

Now, if we further specialize the grouping choice to *J* = ({*i*}, {1, ... , *i* −1, *i* +1, ... , *k*}), we get:

**Corollary 2.** *Under the conditions of Theorem 1 the i-th component of the sequence of processes <sup>X</sup>***(***β***)** *converges, for <sup>β</sup>* <sup>→</sup> <sup>1</sup>*, to the one-dimensional diffusion* (*Xt*,*i*)*t*≥<sup>0</sup> *with values in* [0, 1] *satisfying the SDE*

$$dX\_{t,i} = -b\frac{X\_{t,i} - p\_i}{\alpha}dt + \sqrt{X\_{t,i}(1 - X\_{t,i})}dW\_{t-1}$$

For instance, the above two results are useful in order to translate the well-known classification of the boundaries of the WF process with mutation [34] (p. 239, Example 8) (see also [35]) to the RP urn model when the parameter *β* is strictly smaller than 1, but very near to 1. Indeed, Corollary <sup>1</sup> implies that *Zt* = <sup>∑</sup>*l*∈*<sup>J</sup> Xt*,*<sup>l</sup>* satisfies the SDE

$$\begin{split} dZ\_{t} &= -b\frac{Z\_{t} - \sum\_{l \in \mathbb{J}} p\_{l}}{\alpha} dt + \sqrt{Z\_{t}(1 - Z\_{t})} dW\_{t} \\ &= \left( -\frac{b}{\alpha} \left( 1 - \sum\_{l \in \mathbb{J}} p\_{l} \right) Z\_{t} + \frac{b}{\alpha} \sum\_{l \in \mathbb{J}} p\_{l} (1 - Z\_{t}) \right) dt + \sqrt{Z\_{t}(1 - Z\_{t})} dW\_{t}. \end{split}$$

Setting *a*<sup>0</sup> = *<sup>b</sup> <sup>α</sup>* <sup>∑</sup>*l*∈*<sup>J</sup> pl* and *<sup>a</sup>*<sup>1</sup> <sup>=</sup> *<sup>b</sup> <sup>α</sup>* − *<sup>a</sup>*<sup>0</sup> and noting that ∩*i*∈*J*{*Xt*,*<sup>i</sup>* = 0} = {*Zt* = 0}, we obtain:


With the same spirit, Corollary 2 states that *Zt* = 1 − *Xt*,*<sup>i</sup>* satisfies the SDE

$$\begin{split} dZ\_t &= -b \frac{Z\_t - \sum\_{l \neq i} p\_l}{\alpha} dt + \sqrt{(1 - Z\_t) Z\_t} dW\_t \\ &= \left( -\frac{b}{\alpha} p\_i Z\_t + \frac{b}{\alpha} (1 - p\_i)(1 - Z\_t) \right) dt + \sqrt{Z\_t (1 - Z\_t)} dW\_t. \end{split}$$

Setting *a*<sup>0</sup> = *<sup>b</sup> <sup>α</sup>* (<sup>1</sup> <sup>−</sup> *pi*) and *<sup>a</sup>*<sup>1</sup> <sup>=</sup> *<sup>b</sup> <sup>α</sup>* − *a*0, we get:


Therefore, for an RP urn with *β* < 1, but very near to 1, we can give the following definition:

**Definition 1.** *We call recessive a non-empty subset <sup>J</sup>* {1, ... , *<sup>k</sup>*} *of colors such that* <sup>∑</sup>*l*∈*<sup>J</sup> pl* <sup>&</sup>lt; *<sup>α</sup>* 2*b . We call dominant a color i* ∈ {1, . . . , *k*} *such that* {1, . . . , *k*}\{*i*} *is recessive.*

Obviously, every subset of a recessive set is recessive. Moreover, when *<sup>α</sup> <sup>b</sup>* > 2(1 − min*<sup>i</sup> pi*), every set *J* {1, ... , *k*} is recessive. The terms "recessive" and "dominant" are justified by the fact that, recalling properties (1)–(4) of the WF process, if a set of colors is recessive, then we can observe that at some times the corresponding predictive means of the urn process are very near to zero. On the contrary, when a color is dominant, we can observe that at some times the corresponding predictive mean of the urn process is very near to one. In Figure 2, we plot the process (*ψn*,1) related to the simulation of an RP urn with *k* = 2, *α*/*b* = 1 and *p* = 0.75, where it is possible to observe the excursions near the barrier 1.

**Figure 2.** Simulation: plot of the process (*ψn*,1) related to the simulation of an RP urn with *k* = 2, *α*/*b* = 1 and *p* = 0.75.

#### **5. Conclusions**

We have proven that the multidimensional WF diffusion with mutation can be obtained as the limit of the predictive means associated with a family of RP urns with *β* < 1, *β* → 1. As a consequence, the known properties of the WF process can give a description of the RP urn when the parameter *β* is strictly smaller than 1, but very near to 1. For instance, starting from the known classification of the boundaries for the WF process and connecting it to the model parameters of the RP urn, we have obtained for an RP urn with a value of *β* very near to one, the notion of recessive subsets of colors and the notion of a dominant color. These two concepts are related to the possibility of reaching the barriers 0 and 1 by the predictive means of the urn process. Other classical problems, together with the corresponding known results for the WF process, can be found in [31]. These results can be used in order to give an approximated answer to the considered problems in the case of an RP urn with a value of *β* near 1.

**Author Contributions:** Both authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.

**Funding:** Irene Crimaldi is partially supported by the Italian "Programma di Attività Integrata" (PAI), project "TOol for Fighting FakEs" (TOFFE) funded by the IMT School for Advanced Studies Lucca. This research received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme under grant agreement No 817257.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Acknowledgments:** Both authors sincerely thank the organizers of the present special issue for their invitation to contribute and Fabio Saracco for having collected and shared with them the analyzed Twitter data sets. Giacomo Aletti is a member of the Italian group "Gruppo Nazionale per il Calcolo Scientifico" of the Italian Institute "Istituto Nazionale di Alta Matematica". Irene Crimaldi is a member of the Italian group "Gruppo Nazionale per l'Analisi Matematica, la Probabilità e le loro Applicazioni" of the Italian Institute "Istituto Nazionale di Alta Matematica".

**Conflicts of Interest:** The authors declare no conflict of interest.

## **References**

