13

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!

Anthony
  • 133
  • There is a formula here: http://math.stackexchange.com/questions/59738/probability-for-the-length-of-the-longest-run-in-n-bernoulli-trials –  Jun 11 '13 at 19:00
  • I believe it is a Bernoulli trial. – Sujaan Kunalan Jun 11 '13 at 19:01
  • @SujaanKunalan Bernoulli trials don't require each success to be consecutive. – rurouniwallace Jun 11 '13 at 19:03
  • @ByronSchmuland: why not $80p^{20}(1-p)^{80}$? – Alex Jun 11 '13 at 19:04
  • Related: http://math.stackexchange.com/questions/4658/what-is-the-probability-of-a-coin-landing-tails-7-times-in-a-row-in-a-series-of and http://math.stackexchange.com/questions/261261/finding-the-probability-of-getting-5-consecutive-heads-from-flipping-a-coin-200?lq=1 – lab bhattacharjee Jun 11 '13 at 19:09
  • @Alex: that is the chance of winning exactly 20 or 80 (depending on the definition of $p$), but ignores "in a row" – Ross Millikan Jun 11 '13 at 19:27

4 Answers4

13

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.

leonbloy
  • 63,430
awkward
  • 14,736
0

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)) &lt; eps );
xsol        = xsol(xsol&gt;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.

0

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

-3

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.

  • That makes total sense to me, but is it correct? I'm just asking because I read the posts that Byron posted (thanks so much, by the way), and I found some really really really tough things to understand - the generating functions by de Moivre in 1738 seems beautiful, but hard to understand intuitively. – Anthony Jun 11 '13 at 19:21
  • 4
    It is not correct. $0.9^{20}\approx 0.12158$. The formula as given says the chance in a run of $100$ games is less than the chance in a run of 20 games, which is clearly wrong. – Ross Millikan Jun 11 '13 at 19:24
  • @Anthony I agree, that's why I tried to come up with an alternative method. Still trying to re-work my current solution because as Ross pointed out, it doesn't work... – rurouniwallace Jun 11 '13 at 20:11