TITLE: Integral of the positive part of a Brownian motion
QUESTION [7 upvotes]: Let $X(t)$ be the standard Brownian motion, I need to find the distribution of $S=\int_{0}^T(X(t))^+dt$, where $(x)^+=\max\{0,x\}$.
I want to use the distribution to get a concentration bound for $S$. So even if we can't find the distribution, still, bounding the variance of $S$ helps a lot. For example, if I can bound the variance by, say $T^3$, then I can use Chebyshev's inequality to get a good concentration bound: 
\begin{align*}
\Pr\{|S-E[S]|>k T^{3/2}\} < \frac{1}{k^2}
\end{align*}
Any results on the same problem with $S=\int_{0}^T|X(t)|dt$ is also very much appreciated. Thank you!

REPLY [3 votes]: The chances are that the distribution isn't pretty, but a decent concentration bound should be much easier. Let $f:\mathbb{R}^+\to\mathbb{R}^+$ be convex and strictly increasing. Suppose we want  to get a bound on $\mathbb{P}[g(S-\mathbb{E}S)\geq l]$, where $g:\mathbb{R}\to \mathbb{R}^+$ is convex. Use Markov's inequality to get
$$
\begin{align}
\mathbb{P}[g(S-\mathbb{E}S)\geq l] &= \mathbb{P}[f(g(S-\mathbb{E}S))\geq f(l)]\\
&\leq \frac{\mathbb{E}[f(g(S-\mathbb{E}S))]}{f(l)}\\
&= \frac{\mathbb{E}[f(g(\int_0^T X_t^+-\mathbb{E}X_t^+dt))]}{f(l)}\\
&= \frac{\mathbb{E}[f(g(T\int_0^T X_t^+-\mathbb{E}X_t^+\frac{dt}{T}))]}{f(l)}\\
\end{align}
$$
The composition of $f$ with $g$ is convex since $f$ is increasing, so, using Jensen's inequality
$$
\begin{align}
\mathbb{P}[g(S-\mathbb{E}S)\geq l] &\leq \frac{\mathbb{E}[\int_0^T f(g(T(X_t^+-\mathbb{E}X_t^+)))\frac{dt}{T}]}{f(l)}
\end{align}
$$
Let $N$ be a standard normal random variable. Define $\varphi(m) = \mathbb{E}[f(g(m(N^+-\mathbb{E}N^+)))]$. Then
$$
\begin{align}
\mathbb{P}[g(S-\mathbb{E}S)\geq l] &\leq \frac{\int_0^T \mathbb{E}[f(g(T(X_t^+-\mathbb{E}X_t^+)))]dt}{Tf(l)}\\
&\leq \frac{\int_0^T \varphi(T\sqrt{T})dt}{Tf(l)}\\
&= \frac{\varphi(T^{\frac{3}{2}})}{f(l)}\\
\end{align}
$$
Example 1
Fix $g(x)=|x|$, corresponding to the problem of bounding $\mathbb{P}[|S-\mathbb{E}S|\geq l]$. Pick a function $f$ and see what bound you get. Take, for example,
$$
\begin{align}
f(l) =e^{\frac{l^2}{4T^3}}
\end{align}
$$
Then, according to Mathematica,
$$
\begin{align}
\varphi(T^{\frac{3}{2}}) &= \mathbb{E}\left[e^{\frac{(N^+-\mathbb{E}N^+)^2}{4}}\right]\\
                         &= 1.12 \\
                         &<\infty \\
\end{align}
$$
So
$$
\begin{align}
\mathbb{P}[|S-\mathbb{E}S|\geq l] = O\left(e^{\frac{-l^2}{4T^3}}\right)
\end{align}
$$
If we let $l=kT^{\frac{3}{2}}$, then 
$$
\begin{align}
\mathbb{P}[|S-\mathbb{E}S|\geq kT^{\frac{3}{2}}] = O\left(e^{\frac{-k^2}{4}}\right)
\end{align}
$$
Example 2
Let $g(x) = (-x)\mathbf{1}(x<0)$, corresponding to the problem of bounding $\mathbb{P}[\mathbb{E}(S)-S\geq l]$, for $l\geq 0$. Let $f(l)=\frac{l}{T^{\frac{3}{2}}}$. Then, by Mathematica,
$$
\begin{align}
\varphi(m) &= T^{\frac{-3}{2}}\mathbb{E}[m(\mathbb{E}N^+-N^+)\mathbf{1}(N^+-\mathbb{E}N^+<0)]\\
&= T^{\frac{-3}{2}}m\left(\frac{1}{2 \sqrt{2 \pi }}+\frac{-1+e^{-\frac{1}{4 \pi }}+\frac{1}{2} \text{Erf}\left[\frac{1}{2 \sqrt{\pi }}\right]}{\sqrt{2 \pi }}\right)\\
&= 0.23m T^{\frac{-3}{2}}
\end{align}
$$
So
$$ 
\begin{align}
\mathbb{P}[\mathbb{E}[S]-S\geq l]&\leq \frac{\int_0^T\varphi(t\sqrt{T})dt}{Tf(l)}\\
&= \frac{\varphi(1)\int_0^Tt\sqrt{T}dt}{Tf(l)}\\
&= \frac{0.12T^{\frac{3}{2}}}{l} 
\end{align}
$$
So
$$ 
\begin{align}
\mathbb{P}[\mathbb{E}[S]-S\geq kT^{\frac{3}{2}}]&\leq \frac{0.12}{k}
\end{align}
$$