Expected total time more green than red dots Suppose we have $G$ green dots and $R$ red dots uniformly distributed over the interval $[0,1]$. I am interested in knowing the expected proportion of the interval where there are at least as many green dots as red dots.
This is how far I got: Let $R_t$ and $G_t$ be the number of red and green dots, respectively, up to time $t\in [0,1]$. Then $R_t$ is $Bin(R, t)$ and $G_t$ is $Bin(G,t)$. Define the function $h_t$ as $h_t=1$ if $G_t \geq R_t$ and $0$ otherwise. The expected total time where there are at least as many green dots as red dots is then calculated as $E[\int_0^1 h_t\ dt]$ = $\int_0^1 P(G_t \geq R_t)\ dt$.
 A: As demonstrated by user469053, the trick is to split up the probability $P(G_t\geq R_t)$ in terms of probabilities we already know, namely into events of the form $G_t=g$ for some constant $g\leq G$, and likewise for $R_t$. Assuming the $R_t$ and $G_t$ variables are independent, the simplification works out as follows.
$$\int_0^1 P(G_t\geq R_t)\,dt = \int_0^1 \sum_{g=0}^G\sum_{r=0}^{\min(R,g)} P(G_t=g)P(R_t=r) \,dt$$
$$ = \sum_{g=0}^G\sum_{r=0}^{\min(R,g)} \binom{G}{g}\binom{R}{r} \int_0^1 t^{g+r}(1-t)^{G+R-g-r} \,dt$$
$$ = \frac{1}{(G+R+1)}\sum_{g=0}^G\sum_{r=0}^{\min(R,g)} \frac{\binom{G}{g}\binom{R}{r}}{\binom{G+R}{g+r}}$$
Now I'm going to make approximations, particularly under the regime where $\min(G,R)\to \infty$ and $R\sim G$. The assumption that $R\sim G$ might seem restrictive, but in any other case our expression simply limits to a binary, which will become evident once we finish our analysis. The crux of the estimation is the observation that, if we let $t=\frac{k-n/2}{\sqrt{n}}$, we can approximate the binomial coefficient $\binom{n}{k} \sim 2^n\sqrt{\frac{2}{n\pi}}e^{-2t^2}$ so long as all of $n,k,n-k$ tend to infinity. Applying this  approximation to our summands, we should let $x=\frac{g-G/2}{\sqrt{G}}$ and $y=\frac{r-R/2}{\sqrt{R}}$ and $z=\frac{g+r-(G+R)/2}{\sqrt{G+R}}$, and then we get the following after some simplification.
$$\frac{\binom{G}{g}\binom{R}{r}}{\binom{G+R}{g+r}} \sim 
\sqrt{\frac{2(G+R)}{GR\pi}}e^{-2x^2-2y^2+2z^2} \sim \sqrt{\frac{8}{(G+R)\pi}}e^{-2x^2-2y^2+2z^2}$$
Based on the definitions of $x,y,z$ and the relationship $R\sim G$, we should notice that $z\approx \frac{x+y}{\sqrt{2}}$ in some sense, and thus $-2x^2-2y^2+2z^2 \approx (y-x)^2$, so our entire summand is approximated by some normal distribution curve. In turn, that curve can be approximated by a single binomial coefficient, which should be easier to sum over. In particular, we have $\frac{y-x}{\sqrt{2}}\approx\frac{r-g+G-(R+G)/2}{\sqrt{R+G}}$, so we should approximate with $\binom{R+G}{G+r-g}$. Carrying out this argument more carefully will prove the following.
$$\frac{\binom{G}{g}\binom{R}{r}}{\binom{G+R}{g+r}} \sim 2^{1-G-R}\binom{G+R}{G+r-g}e^{2(y^2-x^2)\frac{R-G}{R+G}}$$
This asymptotic relationship is valid so long as $g,r,G-g,$ and $R-r$ tend to infinity, which is satisfied so long as $x,y$ are bounded. Since our summand is extremely small when $x,y$ become large, it should be safe to assume that the error terms are negligible, so we can approximate the case where $G\leq R$ as follows.
$$\int_0^1 P(G_t\geq R_t)\,dt \approx \frac{2^{1-G-R}}{(G+R+1)}\sum_{g=0}^G\sum_{r=0}^{g} \binom{G+R}{G+r-g}$$
$$= \frac{2^{1-G-R}}{(G+R+1)}\sum_{r=0}^G\sum_{g=0}^r \binom{G+R}{r}$$
$$= \frac{2^{1-G-R}}{(G+R+1)} \sum_{r=0}^{G}(r+1)\binom{G+R}{r}$$
$$\approx \frac{2^{1-G-R}}{(G+R+1)} \sum_{r=0}^{G}G\cdot\binom{G+R}{r}$$
$$\approx \int_{-\infty}^{\frac{G-R}{2\sqrt{G+R}}} \sqrt{\frac{2}{\pi}}e^{-2t^2} \,dt $$
The above approximation is the integral of a very simple normal distribution,  which can't be simplified further. Letting $D=G+R$ be the total number of dots, and letting $\alpha=\frac{G}{D}$ be the proportion of green dots, the upper bound to our integral is thus $(\alpha-\frac{1}{2})\sqrt{D}$. If we hold $\alpha>\frac{1}{2}$ constant, we can see that the solution limits to $1$ as $D\to\infty$. Conversely if we hold $\alpha<\frac{1}{2}$ constant, the solution instead limits to zero. In other words, if the proportion red dots versus green dots is at all different from equal, the color we see the most of will almost always be the color that there is the most of.
Although our approximation assumed $G\leq R$, it's not too hard to prove that the exact solution has some symmetry when swapping the places of $G$ and $R$, so by symmetry, our approximation should extend to the case $G>R$ as well. Likewise, although we assumed $G\sim R$ to make our estimation, we should expect the exact solution to be monotonic with $\alpha$ and bounded within $[0,1]$, and since our approximation already occupies nearly the entire $[0,1]$ range, it must apply universally. In other words, we should expect that our approximation becomes more accurate in the limit of $D\to\infty$, regardless of the size and sign of $G-R$.
