Probability of 20 consecutive success in 100 runs. Suppose a chess player have a win rate equal 90%, what is the chance to have 20 consecutive wins (successes) playing 100 games? Consider that lose/draw = fail.
I've studied basic statistics in college and it seems like a binomial distribution problem (right?), but honestly I can't figure out a way to solve this problem considering "consecutive" successes.
Is there a statistical distribution for this kinda problem?
Thanks very much! I really appreciate any thoughts!
 A: Feller has this all worked out on p. 325 of An Introduction to Probability Theory and Its Applications, 3rd Edition, equation 7.11:
$$q_n \sim \frac{1-px}{(r+1-rx)q} \cdot \frac{1}{x^{n+1}}$$
where $q_n$ is the probability of no success run of length $r$ in $n$ trials, $p$ is the probability of success, $q=1-p$, and $x$ is the root near 1 of 
$$ 1-x + q p^r x^{r+1} = 0 $$
With your data, we find $x \approx 1.017502$ and $q_{100} \approx 0.2247$. 
So the probability that the chess player will have at least one run of 20 successes is $0.7753$, approximately.

Edit: Actually "$x$ is the root near 1 ..." is slightly misleading. The equation has two positive roots, and we must peak the one that is not $1/p$. Details here.
A: To support @awkward, I have cut and paste a Matlab code that computes the probability values; it is consistent in solution with inputs p = 0.9, r = 20, and n = 100 with the solution provided by awkward. I removed my help menu so the formatting does not interfere with the paste.
function pr = fellerconsecPdf(p,r,n)
d   = [size(p(:),1), size(r(:),1), size(n(:),1)];
id  = setdiff( unique(d), 1);
if(numel(id) > 3/2)
erorr('MATLAB:fellerconsecPdf.m: non-scalar inputs must match in size');

end
m   = max( d );
p   = repmat(p(:), m - (size(p(:),1)-1), 1);
r   = repmat(r(:), m - (size(r(:),1)-1), 1);
n   = repmat(n(:), m - (size(n(:),1)-1), 1);
if(isscalar(p))
q       = (1 - p);    
c       = zeros(r+2,1);
c(1)    = q.*(1 - q).^r;
c(r+1)  = -1;
c(r+2)  = 1;
xsol    = roots(c);
xsol    = xsol( abs(imag(xsol)) < eps );
xsol    = xsol(xsol>0);
[~,ii]  = max( abs(xsol - 1./p) );
x       = xsol(ii);

else
q       = (1 - p);
x       = [];

for k = 1:length(r)
    
    c           = zeros(r(k)+2,1);
    c(1)        = q(k).*(1 - q(k)).^r(k);
    c(r(k)+1)   = -1;
    c(r(k)+2)   = 1;
    xsol        = roots(c);
    xsol        = xsol( abs(imag(xsol)) < eps );
    xsol        = xsol(xsol>0);
    [~,ii]      = max( abs(xsol - 1./p(k)) );
    x           = cat(1,x,xsol(ii));
    
end

end
pr  = ( (1 - p.*x)./((r + 1 - r.x).(1-p)) ).x.^(-1(n + 1));
return;
Please not that star-dot-star does not show up in the text correctly, but it should be clear from context that that I intend point-wise multiplication of vectors.
A: I realize this is an old question - the only reason I'm answering is that recent similar questions are being tagged as a duplicate of this one. I wanted to point out a simplification to the first answer here by @awkward that might yield a better understanding for some people.
There's a pretty simple recurrence relation that yields the same result. Let f(n) be the possibility of getting a string of at least r successes in n trials where the possibility of success in one trial is p.
The next value of f(n+1) is the possibility of starting a new string of r successes $(p^r)$ preceded by a failure $(1-p)$, but you don't want to double count any sequence that already had a string of r successes. That double counting is removed by multiplying by $(1-f(n+1-r-1))$.
So the recurrence relation is:
$$f(n+1) = f(n) + (1-p) * (p^r) * (1-f(n-r))$$ for n > r
and
$$f(0)=f(1)=...=f(r-1)=0$$
and
$$f(r)=p^r$$
Substituting r = 20, and p = .9 yields the same answer as @awkward above. i.e. f(100) = 0.7752991959
A: The probability of getting $20$ consecutive wins is:
$$0.9^{20}$$
The first win of these consecutive wins can be at any trial from $1$ to $80$, and the probability of it being any on any of these trials is evenly distributed, so the probability of getting $20$ consecutive wins out of $100$ is:
$$\frac{80}{100}*0.9^{20}$$
A generalization for this formula would be:
$$\frac{n-k}{n}p^k$$
Where $p$ is the probability, $n$ is the number of trials, and $k$ is the number of consecutive wins.
