Probability that between two Bernoulli sequences, one will get 'ahead' and remain there to sequence end. As per title, given two Bernoulli sequences both of length $N$ with probability of success $P$ the same for both, what is the probability that one will 'get ahead' in its sum from 1st of the sequence to the current sequence position (or said another way, one of the two sequences has a first hit that gives them a lead before the other) and then stays ahead through sequence position $N$ (the end).

E.G., if the two sequences were $0,1,0,0,1$ and $1,1,0,1,0$ the latter 'got ahead' at the start, and stayed ahead.

Answers outright, hints, pointers to literature all appreciated, I have hit a wall beyond enumerating and counting simple examples.

I searched other queries here, found nothing similar. 

Thanks.
This is my attempt to solve the problem and it could be a little different.

Let us assume that the sequence E gets ahead and stays ahead through the sequence. Another 

way of interpretation is that its expected number of successes is always greater than that 

of  the sequence G. Thus the required probability is Expected Success of E/(Expected 

Successes of E+ Expected Successes of G).

Let us assume that E stays ahead after the first two positions of sequence. This can happen 

in the following ways when compared to G. Thus E will have successes in the first two 

positions. G which is lagging will have (Failure, success),(success, failure),

(failure,failure) and (success, success). The first three will characterize its lag and the 

last will put the two positions unchanged with no clear winner of getting ahead.

Thus Expected Successes of E, $$\bar{E} =2*3p^2+(\bar{E}+1)*p$$. 

Meaning three subsequent successes and hence $3p^2$  and one position after with a 

probability of keeping the success.

Similarly Expected Successes of G,$$\bar{G}= [2.p.(1-p)+(1-p)^2].2+(\bar{G}+1).(1-p)$$ meaning  

the probability of (Failure, success),(Success, failure) and (failure, failure) and one 

position after with a probability of keeping the failure

$$\bar{E}=3p^2*2+p*\bar{E}+p$$ $$=&gt; \bar{E}(1-p) = 6p^2+p$$  $$=&gt; \bar{E}=\frac{(6p^2+p)}{(1-p)}$$

$$\bar{G}= [2p(1-p)+(1-p)^2]*2 + \bar{G}*(1-p)+ (1-p)$$  $$=&gt;\bar{G}(1-1+p) = (1-p)*(4p+2-2p+1)$$

$$ =&gt;\bar{G} = \frac{((1-p)*(2p+3))}{p}$$

Required Probability $$=\frac{[p^2(6p+1)]}{[(8p^3-4p+3)]}$$

Dynamics of the required probability given p to make sure $0\leq required Prob\leq 1$

0   0

0.1 0.006134969

0.2 0.038869258

0.3 0.125

0.4 0.284518828

0.5 0.5

0.6 0.711340206

0.7 0.86548913

0.8 0.952772074

0.9 0.990825688

1   1

Thanks

Satish
This is my attempt to solve the problem and it could be a little different.

Let us assume that the sequence E gets ahead and stays ahead through the sequence. Another 

way of interpretation is that its expected number of successes is always greater than that 

of  the sequence G. Thus the required probability is Expected Success of E/(Expected 

Successes of E+ Expected Successes of G).

Let us assume that E stays ahead after the first two positions of sequence. This can happen 

in the following ways when compared to G. Thus E will have successes in the first two 

positions. G which is lagging will have (Failure, success),(success, failure),

(failure,failure) and (success, success). The first three will characterize its lag and the 

last will put the two positions unchanged with no clear winner of getting ahead.

Thus Expected Successes of E, $$\bar{E} =2*3p^2+(\bar{E}+1)*p$$. 

Meaning three subsequent successes and hence $3p^2$  and one position after with a 

probability of keeping the success.

Similarly Expected Successes of G,$$\bar{G}= [2.p.(1-p)+(1-p)^2].2+(\bar{G}+1).(1-p)$$ meaning  

the probability of (Failure, success),(Success, failure) and (failure, failure) and one 

position after with a probability of keeping the failure

$$\bar{E}=3p^2*2+p*\bar{E}+p$$ $$=&gt; \bar{E}(1-p) = 6p^2+p$$  $$=&gt; \bar{E}=\frac{(6p^2+p)}{(1-p)}$$

$$\bar{G}= [2p(1-p)+(1-p)^2]*2 + \bar{G}*(1-p)+ (1-p)$$  $$=&gt;\bar{G}(1-1+p) = (1-p)*(4p+2-2p+1)$$

$$ =&gt;\bar{G} = \frac{((1-p)*(2p+3))}{p}$$

Required Probability $$=\frac{[p^2(6p+1)]}{[(8p^3-4p+3)]}$$

Dynamics of the required probability given p to make sure $0\leq required Prob\leq 1$

0   0

0.1 0.006134969

0.2 0.038869258

0.3 0.125

0.4 0.284518828

0.5 0.5

0.6 0.711340206

0.7 0.86548913

0.8 0.952772074

0.9 0.990825688

1   1

Thanks

Satish