Probability that the maximum of the reflected Brownian motion over a finite interval $[0,t]$ is achieved by its last zero before $t$

We calculate the probability $p_c$ that the maximum of a reflected Brownian motion $U$ is achieved on a complete excursion, i.e. $p_c:=P\big(\overline{U}(t)=U^*(t)\big)$ where $\overline{U}(t)$ (respectively $U^*(t)$) is the maximum of the process $U$ over the time interval $[0,t]$ (resp. $\big[0,g(t)\big]$ where $g(t)$ is the last zero of $U$ before $t$).


Introduction
1.1 Motivation. The local score of a biological sequence is its "best" segment with respect to some scoring scheme (see e.g. [12] for more details) and the knowledge of its distribution is important (see e.g. [8], [9]). Let us briefly recall the mathematical setting while biological interpretations can be found in [5]. Let S n := 1 + · · · + n be the random walk generated by the sequence of the independent and identically distributed random variables ( i , i ∈ N) that are centered with unit variance. The local score is the process: U n := S n − min 0 i n S i , where n 0. The path of (U n , n ∈ N) is a succession of 0 and excursions above 0. In [5], the authors only took into consideration complete excursions up to a fixed time n and so considered the maximum U * n of the heights of all the complete excursions up to time n instead of the maximum U n of the path until time n. They also introduced the random time θ * of the length of the segment that realizes U * n . Since it is easy to simulate (S k , 0 k n), for any n not too large, we get an approximation of the law of (U * n , θ * n ) for a given n. Simulations have shown that for an important proportion of sequences, U n is realized during the last incomplete excursion. As expected, the number of excursions naturally increases when the length of the sequence growths, however the proportion of sequences that achieve their maximum on a complete excursion remains strikingly constant. The main goal of this study is to explain these observations and to calculate this probability when n is large, see Proposition 1.2 below.

Link with the Brownian motion.
According to the functional convergence theorem of Donsker, the random walk (S k , 0 k n) (resp. (U k , 0 k n)) normalized by the factor 1/ √ n converges in distribution, as n → ∞, to the Brownian motion (resp. the reflected Brownian motion). We prove (see Theorem 1.1 for a precise formulation) that the probability that the maximum of a reflected Brownian motion over a finite interval [0, t] is achieved on a complete excursion is around 30% and is thus independent of t. This result permits to answer to the two questions asked in the discrete setting, when n is large.
Let U be the reflected Brownian motion started at 0, i.e. U (t) = |B(t)| where (B(t), t ≥ 0) is the standard one-dimensional Brownian motion started at 0. In Chabriac et al. [5], the authors have considered two maxima: U (t) and U * (t), the first (resp. second) one being the maximum of U up to time t (resp. the last zero before t), namely U (t) := max and U * (t) = U g(t) , where g(t) := sup{s t, U (s) = 0}. In [5], the density function of the pair U * (t), θ * (t) has been calculated where θ * (t) is the length of time segment that realizes U * (t), i.e. the first hitting time of level U * (t) by the process U (s), 0 s g(t) .
Here we only deal with U * (t) and U (t).
In that case, the maximum of U over [0, t] is the maximum of all the complete excursions of U which hold before t. We introduce the probability p c that the maximum of U over [0, t] is achieved on a complete excursion: .  The main result of our study is  can be obtained from Theorem 3.3 in [5] and the fact that the event N defined by (4.23) in [5] is actually included in max 0 k n U k = max 0 k gn U k .

Main steps of the proof.
We now consider the Brownian motion setting. The density function of U (t) is known (see either Subsection 2.11 in [3] or Lemma 3.2 in [11]) and the one of U * (t) has been calculated in [5]. Obviously, the knowledge of the distributions of U (t) and U * (t) is not sufficient to determine p c . The trajectory of (U (s), 0 s t) naturally splits in two parts before and after the random time g(t) which is not a stopping time. Although U (s), 0 s g(t) and U (s), g(t) s t are not independent, the scaling with g(t) leads to independence. Indeed, ECP 0 (2012), paper 0. Page 2/9 ecp.ejpecp.org are independent. Moreover each part of the above triplet has a known distribution. The process g(t) −1/2 B(g(t)s), 0 s 1 is distributed as the Brownian bridge b(s), 0 s 1 , (see e.g. [1]) and the second component in (1.5) is the Brownian meander denoted m. The scaling property of the Brownian motion implies that g(t) is distributed as tg(1) while the distribution of g(1) is the arcsine one (see again [1]): Consequently, where b * := sup . But by [2], for any bounded Borel function f , where (R(u), 0 u 1) stands for a 3-dimensional Bessel started at 0. Due to the scaling property (1.7), we deduce that p c does not depend on t and (1.11) According to (1.10) we have first to determine the function F (see Lemma 2.1 below), sec- As a consequence, The second equality in (2.1)
But making s = 2x 2 u and letting z = 2(2k + 1)π √ u, we get: [13,Formula (13) p80] . It follows that We now focus on the function A. Our method is based on the crucial fact that A can be expressed with the function ψ defined by (1.3).
where, for any a ∈ R, ∆ a is the line with parametrization by z = a + it, t ∈ R.
Proof. 1) We note that sin(2πiv) = i sinh(2πv). Thus where ∆ a is the half-line: z = a + it, t 0. Similarly, where ∆ a := {z = a + it, t 0} and a ∈ R. This implies the value of I 1 given by (2.11).
We show in the following lemma that I 1 and I 2 are integrals over the vertical line.
We proceed analogously on C n D n . As a consequence, letting n → ∞ in (2.14), we get Bringing together Lemmas 2.4, 2.6 leads to p c = −8i Setting z = 1/2 + u and using identity (2.12) with u + 1/2 instead of z gives: .
We make the change of variable u = tanh(πx): Theorem 1.1 follows from (2.18) and the above result.