What is the probability that the difference in the number of successes between two independent tests will exceed a certain value? I'm going to ask this question with an example because I'm not certain I know the right terminology.
Suppose I have two coins. I flip the first and increment counter #1 if it comes up heads, and then I flip the second and increment counter #2 if it comes up heads. Then I calculate the absolute difference between counter #1 and counter #2. It it exceeds some threshold, I stop; otherwise, I repeat the process. What is the probability that I will stop for some given number of rounds?
What I think I'm asking: I have two independent discrete binomial random variables, X and Y. What is the probability that |X-Y| exceeds some value at any point during the test, not just at the end?
 A: Consider the variable $Z=X-Y$. $X$ can be $0$ or $1$ with the same probability, just like $Y$. Then the probability distribution of $Z$ is given by
$P(Z=-1)=P(Z=1)=1/4$ and $P(Z=0)=1/2$
This is the same probability distribution we would get if we defined $Z=r_1+r_2$ where $r_1$ and $r_2$ can be $-1/2$ or $1/2$ with probability $1/2$
Now consider the probability distribution of $W_n=\sum_{1\le i\le n} Z_i=\sum_{1\le i\le 2n} r_i$ which represents the difference in the two counters. This probability distribution is the probability distribution of $Z$ convoluted with itself $n-1$ times.
Thinking in the second definition of $W_n$ as $W_n=\sum_{1\le i\le 2n} r_i$, its probability distribution will be  $P(W_n=S)=\frac{(2 n)!}{(n+S)! (n-S)!}\left(\frac{1}{2}\right)^{2 n}$, as explained here.
By the central limit theorem, as $n\rightarrow \infty$ this distribution aproaches a normal distribution with mean $0$.
The variable $|W_n|$ will have the distribution $P(W_n=S)=2 \frac{(2 n)!}{(n+S)! (n-S)!}\left(\frac{1}{2}\right)^{2 n}$ for $S\neq 0$ and $P(W_n=0)=\frac{(2 n)!}{(n)!^2}\left(\frac{1}{2}\right)^{2 n}$.
It will have a Folded Normal Distribution, as $n\rightarrow \infty$.
From here, you can compute $P(W_n>k)$ for any threshold $k$ and $n$.
A: To compliment on @matias morant's answer, the process you are considering is in fact a one-dimensional random walk with loop probability $1/2$ and forward and backward probabilities each equal to $1/4$. The walker starts from origin. Then $X-Y$ exceeding some threshold $T$ would be equivalent to the walker's getting farther than $T$ steps from the origin, and you want the probability of (the complement of) this event: "The first time that the walker hits $T$ or $-T$ is more than the test duration". 
This connection may help in getting more information on the process, as there is a rich literature on random walks in one-dimension (see e.g. this paper).
