TITLE: Expected supremum of average?
QUESTION [10 upvotes]: Is there either a closed form (in terms of the moments of $X_1$, say) or good bounds on
$$
\mathbb{E} \sup_{k \leq n} \frac{1}{k} \sum_{i=1}^k X_i,
$$
where $X_i$ are iid and arbitrarily nice? (In my specific application, $X_i$ are given by $(B_i - p)^2$, where $B_i$ are iid Bernoulli variables with mean $p$.) I am particularly interested in the correct functional dependence on $n$; e.g., is there a constant bound that holds for all $n$?

REPLY [8 votes]: Here is  an "arbirarily nice" example with closed form results.
Let $X_1,X_2,\ldots$ be i.i.d. real random variables with partial sums $S_k:=\sum_{i=1}^kX_i$ and let $M_n:=\sup_{k\leq n} \frac{S_k}{k}$,
$R_n:=\inf_{k\leq n} \frac{S_k}{k}= - \sup_{k\leq n} \frac{-S_k}{k}$, and let $M_\infty,R_\infty$ be the all-time supremum/infimum (possibly $\infty/-\infty$).
(1) The distribution of $M_n$ resp. $R_n$ can
be obtained as follows.
For $a\in \mathbb{R}$ let
$$T_a:=\inf\{k\geq 1\;:\;S_k-ka>0\}  \mbox{  and  } U_a:=\inf\{k\geq 1\;:\;S_k-ka\leq 0\}$$
be first strictly ascendending resp. weakly descending ladder epochs of the random walk generated by the steps $X_i-a$, then clearly
$$\{M_n >  a\}=\{ T_a \leq n\}\;\mbox{ and }\; \{R_n >  a\}=\{ U_a > n\}\;\;, $$
The fluctuation theory of random walks (see e.g. chapter XII in Feller II (1971)) gives for the generating functions
$g_a(z):= \mathbb{E}(z^{T_a}),\, h_a(z):=\mathbb{E}(z^{U_a}) $  that
$$\log\left(\frac{1}{1-g_a(z)}\right)=\sum_{n=1}^\infty  \frac{z^n}{n} \mathbb{P}(S_n>na)\;\;\mbox{  (Sparre Andersen's theorem, Thm 1 in XII.7)}$$
$$\mbox{ and } (1-g_a(z))(1-h_a(z))=1-z\;\;\mbox{ (duality, Thm 4 in XII.7).}$$
Thus $\mathbb{P}(M_n>a)$ resp. $\mathbb{P}(R_n>a)$  can (in principle) be computed when only the probabilities $\mathbb{P}(S_k>ka), k=1,\ldots,n$ are known.
(2)
Now let the $X_i$ be $\exp(1)$-distributed. Then clearly $M_n, R_n\geq 0$ so only $a\geq  0$ need to be considered. Here it is known that for $a\geq 0$
$$\mathbb{P}(T_a=n) = \frac{n^{n-1}}{n!} a^{n-1}e^{-an} \;\;\;\mbox{ for } n\geq 1, \mbox{ resp. that }$$
$$g_a(z)=z\,e^{-a+T(zae^{-a})} \;\;\;\;(*)$$
where $T(z):=\sum_{n=1}^\infty \frac{n^{n-1}}{n!} z^n$ denotes the "tree function".  $(*)$ can e.g. be proved using Sparre Andersen's thm. and Lagrange inversion
(the series defining $T$ converges for $|z|\leq e^{-1}$ and represents the inverse of $z\mapsto z e^{-z}$ there).
Thus
$$\mathbb{P}( M_n>a) = \sum_{k=1}^n \frac{k^{k-1}}{k!} a^{k-1}e^{-ak}\;\;\mbox{ and }$$
$$\mathbb{E} (M_n) = \int_0^\infty \mathbb{P} (M_n>a)\,da=\sum_{k=1}^n \frac{1}{k^2}$$
Let $[z^n] F(z)$ denote the $n$-th cofficient of a (formal) power series $F(z)$. We have
\begin{align*}
\mathbb{P}(R_n >a) &=1-\mathbb{P}(U_a\leq n)\\
                   &=[z^n]\frac{1-h_a(z)}{1-z}\\
                   &=[z^n]\frac{1}{1-g_a(z)}\end{align*}
where in the last step the duality relation was used.
Expanding $\frac{1}{1-g_a(z)}$ into a geometric series and using Lagrange inversion on the individual terms now gives
$$\mathbb{P}( R_n>a) = \left(\sum_{k=0}^n \frac{(n-k)}{n}\frac{(na)^k}{k!}\right)e^{-na}\;.\;\mbox{ Thus }$$
$$\mathbb{E} (R_n) = \int_0^\infty \mathbb{P} (R_n>a)\,da=\frac{1}{n^2}\sum_{k=0}^n (n-k)=\frac{1}{2}+\frac{1}{2n}$$
(3) Passing to the limit
gives that
$\mathbb{P}(M_\infty >a)=e^{-a+T(ae^{-a})}$ (note that $\mathbb{P}(M_\infty > a)=1 \mbox{ for } a\in[0,1]$), and
$$\mathbb{E} (M_\infty) = \int_0^\infty e^{-a+T(ae^{-a})}\,da=\zeta(2)=\frac{\pi^2}{6}$$
and that
$R_\infty $ is uniformly distributed  on $[0,1]$:
we have that
$$\mathbb{P}( R_n >a) =\mathbb{P}(\mathrm{Poiss}(na)\leq n) -a\,\mathbb{P}(\mathrm{Poiss}(na)\leq n-1)$$
By the strong law of large numbers for sums of i.i.d. $\mathrm{Poiss}(a)$-variables, both $\mathbb{P}(\mathrm{Poiss}(na)\leq n)$ and $\mathbb{P}(\mathrm{Poiss}(na)\leq n-1)$ tend to $0$ if $a>1$ and to $1$ if $0<a<1$. Further $\mathbb{P}( R_n >1)=\mathbb{P}(\mathrm{Poiss}(n)=n)$ tends to zero (e.g. by Stirling's formula). Thus for $a>0$ $$ \mathbb{P}(R_\infty>a)= 1-\min(a,1)\;\;,$$
that is, $R_\infty$ is uniformly distributed on $(0,1)$.
Further
$$\mathbb{E} (R_\infty) = \frac{1}{2}$$