# Statistics: relationship between length of run of events and probability of events

**URL:** <https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233>\
**Category:** Factual Questions\
**Created:** [November 6, 2013, 11:56am UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233 "2013-11-06T11:56:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dervorin](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Dervorin](https://boards.straightdope.com/u/Dervorin)\
**Post date:** [November 6, 2013, 11:56am UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233/1 "2013-11-06T11:56:10Z")

</div>

This is most assuredly not homework; just something I’ve been interested in, and can vaguely remember reading something about somewhere, but stats has never been my strong point.

In short: is there a way to calculate the probability of an event, based on an observed run of success or failures, particularly around the maximum length of run? I’m specifically interested in Solitaire statistics, where I’ve had several long runs of successful games. Can I use this information about my longest run of wins to calculate the probability of winning a game?

I fully realise this might be a very naive question, but I seem to recall Marcus du Satoy, in some documentary about statistics, taking information about fish sizes to predict the size of the biggest fish ever caught - and he was pretty spot on. Would a similar technique work in this circumstance?

---

<div class="post-metadata">

**Author:** ![D18](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@D18](https://boards.straightdope.com/u/D18)\
**Post date:** [November 6, 2013, 1:30pm UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233/2 "2013-11-06T13:30:20Z")

</div>

I had the exact same question a few months ago. My winning percentage was about 15%, which I think is absurd to begin with. I also had a string of 4 or 5 wins, twice. So, the chance of any random 4-game stretches being wins is .15^4 (or ^5). Even at 4 in a row, the probability is .0005, which (I believe), means 1 stretch of 4 games in 2000 should be a streak of wins. Given I had played way less than 2000 games, I assume there’s something wrong with the ramdomization of the cards!

---

<div class="post-metadata">

**Author:** ![Snarky\_Kong](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Snarky\_Kong](https://boards.straightdope.com/u/Snarky_Kong)\
**Post date:** [November 6, 2013, 1:56pm UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233/3 "2013-11-06T13:56:50Z")

</div>

It would depend on how many total games you’ve played. If you’ve played 20 games and had a streak of 10 wins, the winning percentage is much higher than if you’ve had a longest streak of 10 wins when you’ve played 2,000 games.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [November 6, 2013, 3:44pm UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233/4 "2013-11-06T15:44:59Z")

</div>

You can estimate probability (_p_) from _average_ run length (_L_).

There are two different ways to define average run length. Suppose your Wins and Losses are  
WWW L L WW L W L L L WWWW L WWWWW L WWW  
The winning runs are 3, 2, 1, 4, 5, 3 for an average length of 3.0.  
However, you could also say the runs are 3, 0, 2, 1, 0, 0, 4, 5, 3 for an average of 2.0. (After three of the losses you had zero wins in a row.)

The probability estimate is  
_p = L / (L+1)_  
or  
_p = (L-1) / L_  
depending on whether you use the first or second definition of run.

The first approach yields 3.0/4.0 = 0.75 as the estimate; the second 1.0/2.0 = 0.55  
The actual probability here is 0.692. (The results are just _estimates_.)

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [November 6, 2013, 5:53pm UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233/5 "2013-11-06T17:53:44Z")

</div>

> [@septimus](#):
>
> 1.0/2.0 = 0.55

What’s the matter with this Chrome spellchecker? Can’t it even spot obvious arithmetic errors? 😉

---

<div class="post-metadata">

**Author:** ![Dervorin](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Dervorin](https://boards.straightdope.com/u/Dervorin)\
**Post date:** [November 7, 2013, 4:37pm UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233/6 "2013-11-07T16:37:08Z")

</div>

> [@D18](#):
>
> I had the exact same question a few months ago. My winning percentage was about 15%, which I think is absurd to begin with. I also had a string of 4 or 5 wins, twice. So, the chance of any random 4-game stretches being wins is .15^4 (or ^5). Even at 4 in a row, the probability is .0005, which (I believe), means 1 stretch of 4 games in 2000 should be a streak of wins. Given I had played way less than 2000 games, I assume there’s something wrong with the ramdomization of the cards!

I need a trip meter on my games, because I’m looking for the longest streak I keep resetting my statistics when I fail. I suspect my win percentage is much higher than 15%, but that’s because I’m playing 1-card-draw with unlimited undo; my longest streak of wins to date is 39. I’ve been obsessed for some time with trying to get to 50, but so far no luck. Clearly my winning percentage must be higher than 15% to get runs that long.

> [@Snarky\_Kong](#):
>
> It would depend on how many total games you’ve played. If you’ve played 20 games and had a streak of 10 wins, the winning percentage is much higher than if you’ve had a longest streak of 10 wins when you’ve played 2,000 games.

I need a game that keeps better statistics; just win/loss percentage isn’t enough, dammit. I should be able to pull up my entire history!

> [@septimus](#):
>
> You can estimate probability (_p_) from _average_ run length (_L_).
> 
> There are two different ways to define average run length. Suppose your Wins and Losses are  
> WWW L L WW L W L L L WWWW L WWWWW L WWW  
> The winning runs are 3, 2, 1, 4, 5, 3 for an average length of 3.0.  
> However, you could also say the runs are 3, 0, 2, 1, 0, 0, 4, 5, 3 for an average of 2.0. (After three of the losses you had zero wins in a row.)
> 
> The probability estimate is  
> _p = L / (L+1)_  
> or  
> _p = (L-1) / L_  
> depending on whether you use the first or second definition of run.
> 
> The first approach yields 3.0/4.0 = 0.75 as the estimate; the second 1.0/2.0 = 0.55  
> The actual probability here is 0.692. (The results are just _estimates_.)

Yep, that makes sense. Except for that calculation at the end… 😉

I was just hoping that there are more sophisticated statistical analysis methods to bring to bear on this problem.

Or perhaps I should start writing down the results, though there are limits to even my nerdiness, and perhaps this is beyond the pale - writing down the result of each Solitaire game I play is dangerously close to trainspotting…

> [@septimus](#):
>
> What’s the matter with this Chrome spellchecker? Can’t it even spot obvious arithmetic errors? 😉

Heh

---

<div class="post-metadata">

**Author:** ![AGuy](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@AGuy](https://boards.straightdope.com/u/AGuy)\
**Post date:** [November 7, 2013, 7:17pm UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233/7 "2013-11-07T19:17:34Z")

</div>

If you had a 39-game winning streak, it was probably a fluke. You can’t judge something based on a freak occurrence.

That being said, if you played a ton of games and found that your average winning streak was indeed 39 games, you might infer your true winning percentage was 98.24%. w^39 = 0.5; solve for w (winning %) by doing 0.5^(1/39). But, if you’ve played a bunch of games, then just go by your actual winning percentage over those games.

Or maybe you realize 39 games was a total fluke, and want to say that streak had about a 0.1% chance of happening. Then, w^39 = 0.001 leads to a true win% of 83.77%. Obviously, if your win% is indeed 15%, there’s basically no chance of a legitimate 39-win streak happening randomly:0.15^39 = 7\*10^(-33).

---

<div class="post-metadata">

**Author:** ![Quartz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/quartz/32/267_2.png) [@Quartz](https://boards.straightdope.com/u/Quartz)\
**Post date:** [November 7, 2013, 9:30pm UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233/8 "2013-11-07T21:30:47Z")

</div>

> [@Dervorin](#):
>
> In short: is there a way to calculate the probability of an event, based on an observed run of success or failures, particularly around the maximum length of run? I’m specifically interested in Solitaire statistics, where I’ve had several long runs of successful games. Can I use this information about my longest run of wins to calculate the probability of winning a game?

If the items are independent of skill and of each other like coin tosses then you cannot use prior information - each time the probability is 50%. Solitaire is in part a game of skill, so the success chance is based on your personal skill, but each game is independent so streaks don’t matter. Thus you should look at your overall success rate. Or maybe the last N games if you want to allow for your changing skill. In the limit this should approach the percentage of winnable games.

---

<div class="post-metadata">

**Author:** ![Snarky\_Kong](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Snarky\_Kong](https://boards.straightdope.com/u/Snarky_Kong)\
**Post date:** [November 7, 2013, 9:43pm UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233/9 "2013-11-07T21:43:43Z")

</div>

> [@Quartz](#):
>
> If the items are independent of skill and of each other like coin tosses then you cannot use prior information - each time the probability is 50%.

Here’s a game: roll a die, if it’s one you win otherwise you lose. Your chances of winning are not 50%.

Assume the die is hidden in a black box and you don’t know the rules. You only know if you win or lose. It’s pretty trivial to figure out that you win 1/6th of the time from your win history. Now, you’re not going to be positive that you have a 1/6th chance, but you can definitely bound it with some confidence intervals.

---

<div class="post-metadata">

**Author:** ![Great\_Antibob](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@Great\_Antibob](https://boards.straightdope.com/u/Great_Antibob)\
**Post date:** [November 7, 2013, 9:44pm UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233/10 "2013-11-07T21:44:06Z")

</div>

> [@Quartz](#):
>
> If the items are independent of skill and of each other like coin tosses then you cannot use prior information - each time the probability is 50%.

If you don’t see a run of at least 4 or 5 heads/tails in the last 200 flips of a coin, something is wrong (or you’ve hit a very low probability event).

Also, the coin can still be weighted, yet produce results independently from flip to flip, i.e. the probability doesn’t have to be 50%, and that can be assessed by examining past results.

And the independence assumption itself can be assessed by examining past results. While it’s true a fair coin produces independent results, that’s not something we can assume _a priori_ for any set of random trials.

---

<div class="post-metadata">

**Author:** ![D18](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@D18](https://boards.straightdope.com/u/D18)\
**Post date:** [November 7, 2013, 11:42pm UTC](https://boards.straightdope.com/t/statistics-relationship-between-length-of-run-of-events-and-probability-of-events/673233/11 "2013-11-07T23:42:32Z")

</div>

> [@Dervorin](#):
>
> I’m playing 1-card-draw with unlimited undo; my longest streak of wins to date is 39. I’ve been obsessed for some time with trying to get to 50, but so far no luck. Clearly my winning percentage must be higher than 15% to get runs that long.

Well, you didn’t ask, but I’d say you need to switch to a more challenging game! 😉 Anyway, if you download Solitaire by Branium you get excellent statistics: games played, won, percentage, current streak, longest streak among others. I just took a look and my longest streak was indeed 5 games (three card draw) and I do cheat on the undo and for that matter, the replay. I think I’ve gotten 5 games twice and that’s in 995 (cheated) games. FWIW.

Now, back to those who are actually answering your questions!
