A new discrete distribution arising from a generalised random game and its asymptotic properties
AA new discrete distribution arising from a generalised random gameand its asymptotic properties
Rudolf Fr¨uhwirth a, ∗ , Roman Malina b and Winfried Mitaroff aa Austrian Academy of Sciences, Vienna b Pf¨affikon (ZH), SwitzerlandFebruary 8, 2021
Abstract
The rules of a popular dice game are extended to a “hyper-die” with n ∈ N equally probable faces, numbered from 1 to n . We derive recursive and explicitexpressions for the probability mass function and the cumulative distributionfunction of the gain G n for arbitrary values of n .The expected value of the gain, E [ G n ], exists for all n . A numerical studysuggests that, in the limit of n → ∞ , the expectation of the scaled gain E [ H n ] = E [ G n / √ n ] converges to a constant which is empirically conjecturedto be equal to (cid:112) π/ E [ G n ] and show that its asymptotic behaviour for n → ∞ implies indeed convergence of E [ H n ] to (cid:112) π/ G n is derived by a similartechnique. Its asymptotic behaviour for n → ∞ implies that the variance of H n converges to 2 − π/ H n converges weakly to the Rayleigh distributionwith scale parameter 1, mean (cid:112) π/ − π/ ∗ Corresponding author. Email:
[email protected] a r X i v : . [ m a t h . P R ] F e b Introduction
The Bohemian game Mlyn´aˇr (“Miller”) [1] is played with a standard die having facesnumbered 1 to 6. Each player throws the die up to five times and collects a gain or apenalty G according to the following rules: • If 1 st throw shows a [1], the gain is G = 1 point, and the player stops. Else: • If 2 nd throw shows [1] or [2], the gain is G = 2 points, the player stops. Else: • If 3 rd throw shows [1] to [3], the gain is G = 3 points, the player stops. Else: • If 4 th throw shows [1] to [4], the gain is G = 4 points, the player stops. Else: • If 5 th throw shows [1] to [5], the gain is G = 5 points, the player stops. Else: • Without a further throw, the gain is G = 6 points, and the player stops.Assuming a fair die, the probability of each face showing up is 1 /
6. Hence, the prob-abilities p k, = P ( G = k ) of a player gaining k points can be easily computed, seeEqs. (3)–(5). The expected value of the gain, i.e. the average number of points a playerwill collect in the long run, is defined by E [ G ] = (cid:88) k =1 k · p k, = 2 . , (1)where the p k, are calculated by one of Eqs. (3)–(5) for n = 6. They are plotted in Fig. 1(a).Figure 1: Probabilities p k,n for (a) n = 6, (b) n = 252 Generalisation
The game can be generalised by replacing the ordinary die with a “hyper-die” having n ∈ N equally probable faces and formalising the rules in the following way.Let X = { X k , k ≥ } be a stochastic process such that the X k are independentand identically distributed according to the discrete uniform distribution on the set { , , . . . , n } . Let G n be the gain associated with X , and τ be a stopping time withrespect to X . Then the game is defined by the following rule:
Rule:
For k = 1 , , . . . , n : X k ≤ k = ⇒ τ = k, G n = k (2)It follows that the probability mass function p k,n = P ( G n = k ) of the gain G n is recursivelydefined by p ,n = 1 n , p k,n = (cid:32) − k − (cid:88) i =1 p i,n (cid:33) · kn = p k − ,n · k · (cid:18) k − − n (cid:19) for 2 ≤ k ≤ n. (3)The last probability is p n,n = 1 − (cid:80) n − i =1 p i,n , and the sum of all probabilities is (cid:80) nk =1 p k,n = 1 as required. The probabilities in Eq. 3 can also be expressed explicitely by p k,n = 1 n · k (cid:89) i =2 i · (cid:18) i − − n (cid:19) for 2 ≤ k ≤ n, (4)or more conveniently by p k,n = kn k · ( n −
1) !( n − k ) ! for 1 ≤ k ≤ n. (5)While the recursive definition in Eq. (3) is well suited to numerical computations (seebelow and Section 3), the expression in Eq. (5) is the most useful one for the furthertheoretical analysis (see Sections 4 and 5).To the best of our knowledge, this distribution has not been described in the literaturebefore. We therefore propose to call it the “Mlynar distribution” with parameter n . Asanother example, the probability mass function for the case n = 25 is plotted in Fig. 1(b).The cumulative distribution function (cdf) P n ( x ) = P ( G n ≤ x ) of G n is obtained bysumming over the probabilities in Eq. (5) up to χ = (cid:98) x (cid:99) , the largest integer that does notexceed x : P n ( x ) = χ (cid:88) i =1 p i,n = 1 − ( n −
1) ! n χ ( n − − χ ) ! with χ = (cid:98) x (cid:99) . (6)The expectation of G n is given by g ( n ) = E [ G n ] = n (cid:88) k =1 k · p k,n = ( n −
1) ! · n (cid:88) k =1 k n k · ( n − k ) ! . (7) For an elementary definition of the stopping time, see [2]. g ( n ) can be calculated in double precision floating pointarithmetic without numerical problems for n up to 10 . As can be seen in Fig. 1(b), the p k,n fall off very quickly in the tail of the distribution already for n = 25. If K ( n ) is theindex in the sum in Eq. (7) beyond which addition of another term has no effect becauseof rounding errors, then K ( n ) ≤ . √ n for 1 ≤ n ≤ .As guessed initially and proved below in Section 4, g ( n ) ∼ C √ n as n → ∞ , with C ∈ R . Therefore, a scaled expectation h ( n ) is defined as h ( n ) = E [ H n ] = g ( n ) √ n , with H n = G n √ n . (8)The functions g ( n ) and h ( n ) are plotted in Fig. 2(a) and (b), respectively, in the range1 ≤ n ≤
25. Figure 2: (a) g ( n ) up to n = 25. (b) h ( n ) up to n = 25. The function h ( n ) is monotonically increasing and apparently converges to a non-zeroconstant value, as shown in Fig. 3(a) up to n = 10 , with a logarithmic scale on theabscissa. A surprising observation reveals this constant to be empirically equal (withinour numerical precision) to (cid:112) π/
2. This inspires us to the following conjecture:
Conjecture.
The scaled expectation value h ( n ) converges for n → ∞ aslim n →∞ h ( n ) = lim n →∞ E [ H n ] = (cid:114) π . . . . . (9)In order to corroborate the conjecture, the difference function∆( n ) = (cid:114) π − h ( n ) (10)4igure 3: (a) Function h ( n ). (b) Difference function ∆( n ) and the fitted power function.is calculated and plotted in Fig. 3(b) up to n = 10 with a logarithmic scale on theabscissa. Its behaviour above n = 10 shows approximate linearity in double log scale,suggesting an ansatz ∆( n ) = c · n − s orlog ∆( n ) = α + β · log n, with α = log c, β = − s. (11)The intercept α and the slope β have been estimated by linear regression [3] on 10 datapoints ( n df = 8) situated at log n = 1 , , . . . ,
10, yielding the estimates˜ α = log ˜ c = − . ± . , ˜ β = − ˜ s = − . ± . , ˜ c = 0 . ± . , (12)where the errors represent 1 σ .Assuming that above ansatz holds beyond n = 10 , the extrapolation n → ∞ addsstrong evidence for the exact validity of Eq. (9). The convergence behaviour of h ( n ) canthus be parametrized, within the fitted accuracy, by h ( n ) = 1 √ n · E [ G n ] ≈ (cid:114) π − ∆( n ) , with ∆( n ) = 0 . · n − . . (13)It is remarkable that within 2 . σ , ˜ s ≈ .
5, hinting at ∆( n ) ∝ / √ n . In order to prove Conjecture Eq. (9), we first derive an explicit expression for the expectedgain g ( n ) = E [ G n ] for fixed n . Theorem 1.
For any n ∈ N , g ( n ) = E [ G n ] is given by g ( n ) = n (cid:88) k =1 k · p k,n = e n n − n Γ( n + 1 , n ) − , (14)5here Γ( a, x ) is the upper incomplete Gamma function as defined in [4] and [5, Eq. (6.5.3)]. Proof.
The sum in Eq. (14) can be rewritten in the following way: n (cid:88) k =1 k · p k,n = n (cid:88) k =1 n (cid:88) i = k p i,n . (15)It is easy to see that in the double sum on the right hand side p ,n occurs exactly once, p ,n occurs exactly twice, and so on, up to p n,n which occurs exactly n times. The sameis true for the sum on the left hand side.The resulting double sum in Eq. (15) can be evaluated in two steps, with the helpof [4]. In the first step we obtain P k,n = n (cid:88) i = k p i,n = ( n −
1) ! n k − ( n − k ) ! . (16)The second step yields E [ G n ] = n (cid:88) k =1 P k,n = e n n − n Γ( n + 1 , n ) − g ( n ) . (17)This concludes the proof.The asymptotic behaviour of h ( n ) as n → ∞ is given by the following theorem. Theorem 2.
Let h ( n ) be as in Eq. (8). Then, as n → ∞ , h ( n ) ∼ (cid:114) π − √ n = ⇒ lim n →∞ h ( n ) = (cid:114) π . (18) Proof.
The asymptotic behaviour of Γ( n + 1 , n ) as n → ∞ is given in [5, Eq. (6.5.35)]:Γ( n + 1 , n ) ∼ e − n n n (cid:32)(cid:114) n π √ π √ n + · · · (cid:33) . (19)It follows that as n → ∞ g ( n ) ∼ − (cid:114) n π √ π √ n + · · · = (cid:114) n π −
13 + √ π √ n + · · · . (20)Dividing by √ n and omitting terms that are O (1 /n ) yields Eq. (18).It should be noted that the empirical result in Eq. (13) is in very good agreement withthe assertion of the theorem. 6 Variance and asymptotic distribution
The variance of G n can be computed as V [ G n ] = E [ G n ] − E [ G n ] . The followingtheorem gives an explicit expression for V [ G n ]. Theorem 3.
The variance of G n is given by V [ G n ] = 2 n − E [ G n ] − E [ G n ] . (21) Proof.
The expectation of G n can be rewritten in the following form: E [ G n ] = n (cid:88) k =1 k · p k,n = n (cid:88) k =1 k (cid:88) i =1 (2 i − · p k,n = n (cid:88) k =1 (2 k − · P k,n . (22)It is not difficult to verify that in all sums p ,n occurs exactly once, p ,n occurs exactlyfour times, and so on, up to p n,n which occurs exactly n times. With the help of [4] andusing Eq. 17, the last sum evaluates to E [ G n ] = 2 · n (cid:88) k =1 k · P k,n − n (cid:88) k =1 P k,n = 2 n − E [ G n ] . (23)Subtracting the squared expectation yields the theorem.The function v ( n ) is defined by v ( n ) = V [ H n ] = V [ G n / √ n ] = V [ G n ] /n . Its asymp-totic behaviour as n → ∞ is described by the following theorem. Theorem 4. As n → ∞ , v ( n ) ∼ − π − (cid:114) π n + · · · = ⇒ lim n →∞ v ( n ) = 2 − π . (24) Proof.
The assertion follows by an elementary calculation from Eqs. (20) and (21).A well-known distribution with mean (cid:112) π/ − π/ σ = 1 [6]. Its cdf R ( x ) is given by R ( x ) = (cid:40) − exp( − x /
2) for x ≥ , x < . (25)The following theorem shows that this distribution is indeed the asymptotic distributionof H n for n → ∞ . Theorem 5.
The sequence H n , n ∈ N converges weakly (in distribution) to a randomvariable with the cdf R ( x ) in Eq. 25, i.e.:lim n →∞ Q n ( x ) = 1 − exp (cid:0) − x / (cid:1) , for x ≥ , (26)where Q n ( x ) is the cdf of H n (see also Eq. 6): Q n ( x ) = P n ( x √ n ) = 1 − ( n −
1) ! n χ ( n − − χ ) ! with χ = (cid:98) x √ n (cid:99) . (27)7 roof. As P n ( x ) in increasing, the following inequality holds: P n ( x √ n − ≤ P n ( (cid:98) x √ n (cid:99) ) ≤ P n ( x √ n ) . (28)We rewrite P n in the form P n ( u ) = 1 − exp( L ( u )) , with L ( u ) = ln Γ( n ) − u ln n − ln Γ( n − u ) . (29)According to [5, Eq. 6.1.41], ln Γ( z ) can be approximated byln Γ( z ) ∼ ( z − ) · ln( z ) − z + · ln(2 π ) , for z → ∞ . (30)With this approximation, we obtain: L ( u ) = ln ( n ) (cid:0) n − (cid:1) − u + ln ( n − u ) (cid:0) u − n + (cid:1) − u ln ( n ) . (31)Using [7] and [4] for the calculation of the limits in Eq. (32), as well as the fact that L ( u )is decreasing, we have proved thatlim n →∞ L ( x √ n −
1) = lim n →∞ L ( x √ n ) = − x ⇒ lim n →∞ L ( (cid:98) x √ n (cid:99) ) = − x . (32)It follows thatlim n →∞ Q n ( x ) = lim n →∞ P n ( (cid:98) x √ n (cid:99) ) = 1 − exp (cid:0) − x / (cid:1) . (33)This concludes the proof.The convergence in distribution is illustrated by Fig 4. It shows that already for n = 10 it is very hard to visually distinguish Q n ( x ) and R ( x ). A numerical study showsthat the maximum absolute difference d ( n ) = max x | Q n ( x ) − R ( x ) | can be parametrizedby d n ≈ . / √ n for n ≥ We have analyzed the generalisation of a popular dice game to a “hyper-die” with anarbitrary number n of faces. Its gain is described by a novel probability mass functionand its corresponding cumulative distribution function. We propose to call the distributionthe “Mlynar distribution”.An empirical study has led to the conjecture that the expected gain divided by √ n converges to the constant (cid:112) π/
2. A proof of the conjecture has been found, based on ananalytic expression of the gain. A simple expression for the variance of the gain has beenderived as well.The asymptotic distribution, in the sense of weak convergence, of the expected gaindivided by √ n has been proved to be the Rayleigh distribution with scale parameter 1.8igure 4: Distribution functions of H n and the limiting Rayleigh cdf. References [1] H. Hemme: “Cogito”, in
Bild der Wissenschaft th printing), Dover Publications (1970), New York, USA[6] N.L. Johnson, S. Kotz and N. Balakrishnan: “Continuous Univariate Distributions”,vol. 1 (2 nd edition), John Wiley & Sons (1994), New York, USA[7] Mathworks: MATLAB ® Symbolic Toolbox ™