- #1

KenNKC

- 11

- 1

5 in a row: 3

4 in a row: 6

3 in a row: 9

2 in a row: 3

Thanks for any help.

Ken

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter KenNKC
- Start date

- #1

KenNKC

- 11

- 1

5 in a row: 3

4 in a row: 6

3 in a row: 9

2 in a row: 3

Thanks for any help.

Ken

- #2

awkward

- 365

- 0

It's fairly complicated. See

http://mathworld.wolfram.com/Run.html

http://mathworld.wolfram.com/Run.html

- #3

KenNKC

- 11

- 1

Thank you for the link! I am trying to understand the formulas and adapt them for my purposes.

- #4

techmologist

- 306

- 12

https://www.physicsforums.com/showthread.php?t=405379

In it the original poster discovers several recursive solutions to a problem that is similar to yours, but slightly different. That might give you some ideas.

- #5

KenNKC

- 11

- 1

If we change the problem to independent trials with the probability of winning each game at 100/162, there is a great site that calculates this for you:

http://www.pulcinientertainment.com/info/Streak-Calculator-enter.html

There are even Excel sheets to download in the site that show in detail how the results are determined.

- #6

techmologist

- 306

- 12

That is a handy website. If you are still interested in doing the problem as you originally stated it (where the number of successes and the number of trials are given), it is doable. If you are comfortable with counting techniques and binomial coefficients, I believe it is even possible to obtain a formula (kinda nasty looking...but still manageable) in terms of those two given quantities. For fairly large values like 162, it may be easier to have a computer evaluate the formula than to have it solve the problem recursively. If you want to pursue this, I'll try to help.

EDIT:

I'll go ahead and post the formula I have in mind, and you can decide if it's something you want to look into. Here n is the number of trials, s the number of successes, and R the longest run or streak of successes. Then the number of ways of getting a run of at least r is

[tex]N(R \geq r) = \sum_{b=1}^{B} \binom{n-s+1}{b}\sum_{j=1}^{J}(-1)^{j+1}\binom{b}{j}\binom{s-j(r-1)-1}{b-1}[/tex]

here J = min{b, integer part of s/r}

and

B = min{s, n-s-1}

To find the number of ways N(R=r) where the longest streak is exactly r, you can subtract N(R >= r+1) from N(R >= r).

EDIT:

I'll go ahead and post the formula I have in mind, and you can decide if it's something you want to look into. Here n is the number of trials, s the number of successes, and R the longest run or streak of successes. Then the number of ways of getting a run of at least r is

[tex]N(R \geq r) = \sum_{b=1}^{B} \binom{n-s+1}{b}\sum_{j=1}^{J}(-1)^{j+1}\binom{b}{j}\binom{s-j(r-1)-1}{b-1}[/tex]

here J = min{b, integer part of s/r}

and

B = min{s, n-s-1}

To find the number of ways N(R=r) where the longest streak is exactly r, you can subtract N(R >= r+1) from N(R >= r).

Last edited:

- #7

KenNKC

- 11

- 1

- #8

techmologist

- 306

- 12

- #9

KenNKC

- 11

- 1

I ran 1000 seasons of a baseball team going exactly 100-62, recording the longest winning streak in each. This would be a __with__ replacement experiment. In the table below, the first column lists the maximum streak lengths. The second column lists the actual probabilities of at least that long of a streak for __without__ replacement (probability of winning each game exactly 100/162), which I got from the site linked in post 5. The third column lists the percentages from the 1000 trials. As you would expect, without replacement has a better chance for longer streaks, but for the shorter ones, the results are almost identical. Overall, these numbers are a lot closer than I thought they would be.

Code:

```
Random Specific
Streak Pct Pct
4 100.0 100.0
5 99.9 99.9
6 98.0 98.0
7 89.9 89.3
8 74.3 73.1
9 55.7 52.5
10 38.8 37.2
11 25.8 24.8
12 16.6 14.4
13 10.5 8.7
14 6.5 5.8
15 4.1 4.0
16 2.5 2.0
17 1.5 1.0
18 0.9 0.6
19 0.6 0.5
```

Last edited:

- #10

techmologist

- 306

- 12

[tex]\lambda = p^r + (n-r)qp^r \approx (n-r)qp^r[/tex]

Then the probability of at least one streak of length r or more is given by

[tex]P(R \geq r) \approx 1-e^{-\lambda}[/tex]

Using p = 100/162, I tried it for r=10 and r = 15 and got answers that agree well with what you got by simulation.

- #11

techmologist

- 306

- 12

Code:

```
Streak
length
5 .996
6 .965
7 .873
8 .717
9 .539
10 .378
11 .253
12 .164
13 .104
14 .065
15 .040
16 .025
17 .015
18 .009
19 .006
```

- #12

KenNKC

- 11

- 1

- #13

techmologist

- 306

- 12

Yeah, the Poisson approximation works quite well as long as trials are only weakly dependent. For your problem, I think this condition holds for streaks of moderate length, say 10 to 15 or 20. Shorter streaks happen too frequently, and so the occurrence of a streak of length 5 starting on the 10th trial eliminates the possibility of another streak of length 5 starting on the 14th trial, for example (it can't be the start of one because you are already in the middle of one). On the other hand, since we are given the total number of successes, 100, a very long streak like 30 or more means that successes are rare from there on out. So again, the trials are too strongly dependent for the Poisson approximation to apply. Still, I am surprised that the values you gave for dependent and independent trials are as close as they are over such a large range of streak lengths. Are you primarily interested in very long streaks?

EDIT:

Also, wouldn't independent trials be a better assumption for a season of baseball games, anyway? Assuming that the team was drawing from a bag with a predetermined number of "win" and "lose" marbles in it isn't all that realistic. I'm just curious to know if you are primarily interested in the mathematics, which is pretty interesting itself, or if you are more interested in an application (like wagering?).

EDIT:

Also, wouldn't independent trials be a better assumption for a season of baseball games, anyway? Assuming that the team was drawing from a bag with a predetermined number of "win" and "lose" marbles in it isn't all that realistic. I'm just curious to know if you are primarily interested in the mathematics, which is pretty interesting itself, or if you are more interested in an application (like wagering?).

Last edited:

Share:

- Replies
- 7

- Views
- 2K

- Replies
- 12

- Views
- 2K

- Last Post

- Replies
- 0

- Views
- 998

- Last Post

- Replies
- 2

- Views
- 1K

- Last Post

- Replies
- 1

- Views
- 1K

- Last Post

- Replies
- 9

- Views
- 1K

- Replies
- 6

- Views
- 999

- Last Post

- Replies
- 2

- Views
- 822

- Last Post

- Replies
- 8

- Views
- 2K

- Last Post

- Replies
- 2

- Views
- 3K