Moments of uniform random walks in the plane
edit · history · discussion · files · long url · integral random walks probability theory special functions special values
Numbers
$n$
$s$ 
$W_n(s)$
3
1:
1.574597237551893657494692183076519690221666180758519170193693098301831180594454382131085313362241953
comment: Mean distance from the origin.
3
-1:
0.8964407887767628642327709000349704991387844034162414609834833987065596797806136031423376992276078122
comment: Mean reciprocal distance from the origin.
3
3:
6.451679653132074204075792620988788055228991106790181333253751060035319162993506846802727096462854635
3
5:
36.70518910262770539212833351083942280156566394634277292805674123053093515107189216917695516978563411
3
7:
241.5438884325818909394572120653345661579642316234345510198866599376377900615201209124784525460868827
4
1:
1.799092479842851033532602845846108910066282003291620456626641773598854266932120575241161930573474828
comment: Mean distance from the origin.
4
-1:
0.9027285783238348241903933987727629850304635036014195522559185553239931867554294224993878943710033573
comment: Mean reciprocal distance from the origin.
4
3:
10.12068101030959857117828689311952623741652682870990046944160365931309708011713714090418407354722791
4
5:
82.65146061218160253264341821152523717355689861471062139494090139831178199309483015283222906911803326
4
7:
822.2733729627545473875906636736519876586871256155389079039288911570862095415026148804830247323282182
Definition
The raw radial moment $W_n(s)=\mathbb{E}[|\sum_{j=1}^n e^{i\theta_j}|^s]$ of an $n$-step planar random walk, where every step has length $1$ and the directions $\theta_j$ are independent and uniform on $[0,2\pi)$ [1].
Parameters
$n$
—   number of steps ($n\geq 3$)
$s$
—   radial moment order ($s\geq -1$)
Formulas
(1)
With $A=\dfrac{3\,2^{1/3}\Gamma(1/3)^6}{16\pi^4}$, where $\Gamma$ is Euler's gamma function, $W_3(-1)=A$ and $W_3(1)=A+\dfrac{27\,2^{2/3}\Gamma(2/3)^6}{4\pi^4}$ [1].
(2)
For $m_3=(2-\sqrt3)/4$ and $K_3=K(m_3)$, $W_3(-1)=2\sqrt3 K_3^2/\pi^2$ and $W_3(1)=2\sqrt3 K_3^2/\pi^2+\sqrt3/K_3^2$. The value $K_3$ is the elliptic integral at the third singular value [1].
(3)
For $J_p=\int_0^1 k^pK(1-k^2)^2\,dk$, $W_4(-1)=4J_0/\pi^3$ and $W_4(1)=16(J_0-3J_2)/\pi^3$ [1].
(4)
$(s+4)^2W_3(s+4)-2(5s^2+30s+46)W_3(s+2)+9(s+2)^2W_3(s)=0$ for integers $s\geq-1$ [2].
(5)
$(s+4)^3W_4(s+4)-4(s+3)(5s^2+30s+48)W_4(s+2)+64(s+2)^3W_4(s)=0$ for integers $s\geq-1$ [2].
(6)
$W_3(-1)=\tfrac23 W_{A_3}$, where $W_{A_3}$ is the face-centred cubic Watson integral [1].
Comments
(7)
The moments are taken about the origin, without centering the distance or rescaling by the number of steps. The order $s=1$ gives the mean distance and $s=-1$ gives the mean reciprocal distance. The defining integral is convergent for the stated integer domain $n\geq3$, $s\geq-1$ [1].
(8)
The complete elliptic integral is written in the parameter convention, $K(m)=\int_0^{\pi/2}(1-m\sin^2\theta)^{-1/2}\,d\theta$. The symbol $K^{\prime}(k)$ in [1] denotes the complementary-modulus integral, which is $K(1-k^2)$ in this table; it does not denote differentiation.
Programs
(P1)
Python
import mpmath as mp
mp.mp.dps = 50

def W(n, s):
    if n not in (3, 4) or s <= -2:
        raise ValueError("Require n=3 or 4 and s>-2")
    if n == 3:
        factor = mp.power(3, s+mp.mpf(3)/2) / (
            mp.pi * mp.power(2, s) * mp.gamma(mp.mpf(s)/2+1)**2)
    else:
        factor = mp.power(4, s+2) / (
            mp.pi**2 * mp.gamma(mp.mpf(s)/2+1)**2)
    return factor * mp.quad(
        lambda t: t**(s+1)*mp.besseli(0,t)*mp.besselk(0,t)**(n-1),
        [0, 1, 4, 16, 64, mp.inf])

print(W(3, 1))
References
[1]
J. M. Borwein, A. Straub and J. Wan, Three-step and four-step random walk integrals, Experimental Mathematics 22 (2013), 1–14. Equations (5), (7), (40) and (58) in the October 14, 2010 author preprint. (doi)
[2]
J. M. Borwein, D. Nuyens, A. Straub and J. Wan, Some arithmetic properties of short random walk integrals, The Ramanujan Journal 26 (2011), 109–132. Theorem 4 and Example 1. (doi)
[3]
J. M. Borwein, A. Straub, J. Wan and W. Zudilin, Densities of short uniform random walks, Canadian Journal of Mathematics 64 (2012), 961–990. Section 7, equations (75) and (76), Lemmas 1 and 3. (arXiv) (doi)
Links
Similar tables
Mahler measures of short random walks —   holds $W_n^{\prime}(0)$, the derivatives of the radial moment function
Elliptic integrals at singular values —   contains the elliptic seed for the three-step odd moments
Watson integrals —   contains the face-centred cubic lattice integral related to the reciprocal-distance moment
Data properties
Entries are of type: real number
Table is complete: no (it holds the orders $s=-1,1,3,5,7$ for the three-step and four-step unit-length planar walks. These are the mean reciprocal distance, the mean distance and the next three positive odd radial moments studied through the short-walk recurrences [1] [2]; the cutoff $s=7$ is an editorial prefix of that discrete family. The mean distance is displayed first for each step count)
How they were obtained:

The generator evaluates the three-step gamma formulas and the four-step elliptic integrals in Arb ball arithmetic. It writes 100 significant decimal digits only after checking the enclosure widths. The complete computation is repeated at 150 and 200 working decimal digits, each with an additional 48-bit guard.

more

For the four-step seeds, the integral is split at $k=1/2$. The logarithmic expansion [5] is integrated term by term on $(0,1/2)$, with an explicit bound for the remainder of its square. Arb quadrature encloses the integral on $[1/2,1]$ with its analytic domain checked. The attached numerical-method.md gives the bounds; generate.py implements them. The proved moment recurrences propagate the seed enclosures.

Independent checks integrate the modified-Bessel representations [3] at 50 working digits for every stored pair $(n,s)$. The controls $W_n(0)=1$ and $W_n(2)=n$ are evaluated first. These quadratures provide agreement checks, while the enclosures come from the generator. The three-step elliptic seed identities, the face-centred cubic Watson identity, and all recurrence instances contained in the selected range are checked separately. The attached checks.py also checks the stored values.