Recommend
3 
 Thumb up
 Hide
25 Posts

BoardGameGeek» Forums » Everything Else » Chit Chat

Subject: Math help? (Statistics) rss

Your Tags: Add tags
Popular Tags: [View All]
Michael
United States
Lincoln
NE: NEBRASKA
flag msg tools
badge
Avatar
mbmbmbmbmb
I have a 6-sided die with sides labeled, "A","A","A","B","B", and "C".
Each time I roll it, I add the letter rolled the previous letters rolled to form a string.
Example: ABBAACAAB

In this example, the maximum number of times "A" appears consecutively is 2. For "B" the maximum consecutive times is also 2. For "C", 1.

If I roll the dice X times, what would be the expected value of maximum consecutive repeat of the letter "A"?
"B"?
"C"?
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Chris B
United States
Oxford
Mississippi
flag msg tools
Hotty Toddy Rebels!
badge
Lets go Blues!
Avatar
mbmbmbmbmb
Umm, I guess I'm not understanding. But it seems easy.


If you roll the dice 3 times the MAXIMUM expected value of any letter to repeat is '3' because it could happen.

If you roll the dice 300 times, the MAXIMUM expected value of any letter to repeat is '300' because it could happen.

Maybe expected value is a statistics term I'm not familiar with.
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael
United States
Lincoln
NE: NEBRASKA
flag msg tools
badge
Avatar
mbmbmbmbmb
SybotCB wrote:
Umm, I guess I'm not understanding. But it seems easy.


If you roll the dice 3 times the MAXIMUM expected value of any letter to repeat is '3' because it could happen.

If you roll the dice 300 times, the MAXIMUM expected value of any letter to repeat is '300' because it could happen.

Maybe expected value is a statistics term I'm not familiar with.

Perhaps I explained it poorly. I'm looking for an average value of maximum consecutive repeats of the letter.

For instance if I did roll the dice 5 times and got ABCAA the maximum consecutive for A is 2. I could get AAAAA, and have the maximum value be 5, but that isn't very likely. So say I roll the dice 5 times, record the string, and write down the maximum consecutive A's. Then I do it again. And again. Say I do it a million times. Some strings would have a max consecutive A value of 5, and some would have 0 A's rolled. But most would probably have maybe 2 or 3 A's rolled. So out of the million times I roll the dice 5 times, what is the average number of A's in a row?

But except for rolling the dice 5 times, I'm rolling the dice X times.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Dennis Ku
Canada
Toronto
Ontario
flag msg tools
badge
"You can spend all your time making money / Or you can spend all your love making time."
Avatar
mbmbmbmbmb
Ok, I is none 2 smart, but I'll give it a go:

The average number of times you would expect to roll an A = x/2. So, over a long enough period of time, you would expect the maximum number of consecutive rolls to also be between 1 and x/2 (assuming you rolled all x/2 As in a row).

So, say there are 60 rolls. You would expect between 1 and 30 As rolled consecutively. The average would be right in the middle - 15.

Therefore, x/2 divided by 2, or x/4.

OK, THAT LOOKS EFFING RIDICULOUS I HAVE NO IDEA WHAT I'M DOING I AM NOT SMART OK I ALMOST FAILED MATH EVERY YEAR FROM GRADE SEVEN TO TWELVE.

But that was my attempt.
1 
 Thumb up
0.02
 tip
 Hide
  • [+] Dice rolls
Dennis Ku
Canada
Toronto
Ontario
flag msg tools
badge
"You can spend all your time making money / Or you can spend all your love making time."
Avatar
mbmbmbmbmb
Will someone with real math skills please give me a definitive answer so that I can sleep well tonight?
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jim Cote
United States
Maine
flag msg tools
badge
Avatar
mbmbmbmbmb
I wrote a quick and dirty Java app to simulate this. I did 10 million runs of 3 through 40 rolls each and found the average longest run of each letter:

3 rolls: avg longest A=1.37 avg longest B=0.93 avg longest C=0.48
4 rolls: avg longest A=1.69 avg longest B=1.14 avg longest C=0.60
5 rolls: avg longest A=1.94 avg longest B=1.30 avg longest C=0.71
6 rolls: avg longest A=2.16 avg longest B=1.45 avg longest C=0.80
7 rolls: avg longest A=2.34 avg longest B=1.57 avg longest C=0.88
8 rolls: avg longest A=2.51 avg longest B=1.67 avg longest C=0.96
9 rolls: avg longest A=2.66 avg longest B=1.76 avg longest C=1.02
10 rolls: avg longest A=2.80 avg longest B=1.85 avg longest C=1.08
11 rolls: avg longest A=2.92 avg longest B=1.93 avg longest C=1.13
12 rolls: avg longest A=3.04 avg longest B=2.00 avg longest C=1.17
13 rolls: avg longest A=3.15 avg longest B=2.06 avg longest C=1.22
14 rolls: avg longest A=3.25 avg longest B=2.12 avg longest C=1.25
15 rolls: avg longest A=3.34 avg longest B=2.18 avg longest C=1.29
16 rolls: avg longest A=3.43 avg longest B=2.24 avg longest C=1.32
17 rolls: avg longest A=3.51 avg longest B=2.29 avg longest C=1.35
18 rolls: avg longest A=3.59 avg longest B=2.34 avg longest C=1.38
19 rolls: avg longest A=3.66 avg longest B=2.38 avg longest C=1.41
20 rolls: avg longest A=3.73 avg longest B=2.43 avg longest C=1.43
21 rolls: avg longest A=3.80 avg longest B=2.47 avg longest C=1.45
22 rolls: avg longest A=3.86 avg longest B=2.51 avg longest C=1.48
23 rolls: avg longest A=3.92 avg longest B=2.55 avg longest C=1.50
24 rolls: avg longest A=3.98 avg longest B=2.59 avg longest C=1.52
25 rolls: avg longest A=4.04 avg longest B=2.63 avg longest C=1.54
26 rolls: avg longest A=4.09 avg longest B=2.66 avg longest C=1.56
27 rolls: avg longest A=4.14 avg longest B=2.69 avg longest C=1.58
28 rolls: avg longest A=4.19 avg longest B=2.72 avg longest C=1.60
29 rolls: avg longest A=4.24 avg longest B=2.76 avg longest C=1.62
30 rolls: avg longest A=4.29 avg longest B=2.79 avg longest C=1.63
31 rolls: avg longest A=4.34 avg longest B=2.81 avg longest C=1.65
32 rolls: avg longest A=4.38 avg longest B=2.84 avg longest C=1.67
33 rolls: avg longest A=4.42 avg longest B=2.87 avg longest C=1.68
34 rolls: avg longest A=4.46 avg longest B=2.90 avg longest C=1.70
35 rolls: avg longest A=4.50 avg longest B=2.92 avg longest C=1.71
36 rolls: avg longest A=4.54 avg longest B=2.95 avg longest C=1.73
37 rolls: avg longest A=4.58 avg longest B=2.97 avg longest C=1.74
38 rolls: avg longest A=4.62 avg longest B=2.99 avg longest C=1.76
39 rolls: avg longest A=4.66 avg longest B=3.02 avg longest C=1.77
40 rolls: avg longest A=4.69 avg longest B=3.04 avg longest C=1.78
8 
 Thumb up
0.05
 tip
 Hide
  • [+] Dice rolls
Gary Cooper
United States
Raleigh
North Carolina
flag msg tools
Avatar
mbmbmb
mylittlepwny wrote:

Perhaps I explained it poorly.
perhaps you are still explaining it poorly but I will take a stab.

I think you are asking for the average of the possible outcomes where A is repeated, counting all outcomes that don't include an A as a single outcome (0).

I think the answer you seek is something like this:

avg(0, 1, 2, ....x)

so for 5 rolls you would COULD HAVE the possible outcomes:
0 As(this is every OTHER possible outcome being counted as 1 single outcome!)
1 As
2 As
3 As
4 As
5 As
with an average = 2.5

From what I understand of the question is that you are not trying to determine probabilities here, just POSSIBLE OUTCOMES and even then a subset of the possible outcomes.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael Edwards
United States
Everett
Washington
flag msg tools
YA R'LYAH
badge
Phnglui mglw nafh Cthulhu R'lyeh wgah nagl fhtagn! With cheeze!
Avatar
mbmbmbmbmb
Well, for the result "C", which is just one side, there are plenty of examples out there. I found:

Quote:
For n dice, this is 1/(6^n)
. So, for 2 rolls, it's 1/6*6, or 1/36th chance. For 3, it's 1/216th, 4 1/1,296th, etc.



So, for rolling an A, the chance is 1/2. Lets see the chance for rolling an A five times in a row. 1/2^5 is 1/32nd.

The tricky part - the part I'm not sure how to handle - is how that works into an arbitrary longer number of rolls. What's the chance of 5A's in a row in 10 rolls, vs. 30? Each roll, you get a 1/2 chance to start your streak. In theory, for 10 rolls, you have at least six chances at hitting that 1/32nd chance. After the sixth roll, however, you have no remaining chances to do a five in a row - there's not enough rolls left. So would that just be a straight up 6/32nd, or 18.75% chance of it happening?
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Huzonfirst
United States
Manassas
Virginia
flag msg tools
designer
badge
Best hobby, with the best people in the world. Gaming is the best!
Avatar
mbmbmbmbmb
Even though I'm one of those weird guys (they call us "mathematicians") who thinks coming up with analytical solutions is fun and using simulations is cheating, this one sounds sufficiently hard that a simulation is clearly the way to go. Looks like Ekted has given you all you need to know.
6 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Brandon
United Kingdom
Exeter
flag msg tools
badge
Avatar
If we change it to "how many times would I expect to roll the die to see A show up N times in a row", it's fairly easy to compute.

If N = 1 (how many times should we roll before we see A once). If x is the number of rolls:

x = (1/2)*1 + (1/2)*(1 + x)

In the first term, there's a 50% probability of rolling an A on the first roll (the 1/2 is the probability, the 1 is the number of rolls). In the second term, we consider the probability that we roll something else first, which is a lost roll, and then we still have x more rolls to do. If you solve for x, you get x = 2, or you would have to roll 2 times before you expect to see an A. Makes sense...

How about seeing two A's?

x = (1/4)*2 + (1/2)*(1 + x) + (1/4)*(2 + x)

The first two terms represent the same scenarios as before. The third term represents the possibility that you roll an A, then you roll something else, bringing you back to zero with still x more rolls to make. If you solve for x, you get x = 6, so 6 rolls to see A twice in a row.

Three-in-a-row:

x = (1/8)*3 + (1/2)*(1 + x) + (1/4)*(2 + x) + (1/8)*(3 + x)
x = 14

How about letter B, which has a 1/3 probability of being rolled?

One-in-a-row:

x = (1/3)*1 + (2/3)*(1 + x)
x = 3

Two-in-a-row:

x = (1/9)*2 + (2/3)*(1 + x) + (2/9)*(2 + x)
x = 12

Three-in-a-row:

x = (1/27)*3 + (2/3)*(1 + x) + (2/9)*(2 + x) + (2/27)*(3 + x)
x = 39

Letter C:

One-in-a-row:

x = (1/6)*1 + (5/6)*(1 + x)
x = 6

Two-in-a-row:

x = (1/36)*2 + (5/6)*(1 + x) + (5/36)*(2 + x)
x = 42

Three-in-a-row:

x = (1/216)*3 + (5/6)*(1 + x) + (5/36)*(2 + x) + (5/216)*(3 + x)
x = 267 258

(I know it's not exactly what you were asking for but it's close enough to help to think about the problem)
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Dennis Ku
Canada
Toronto
Ontario
flag msg tools
badge
"You can spend all your time making money / Or you can spend all your love making time."
Avatar
mbmbmbmbmb
Sweet Jesus. I have no idea what you guys are talking about anymore. I love this stuff, but am terrible at it. Does anyone in Chit Chat want to do my taxes?
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Dennis Ku
Canada
Toronto
Ontario
flag msg tools
badge
"You can spend all your time making money / Or you can spend all your love making time."
Avatar
mbmbmbmbmb
And I clearly need/want to learn how to do a "quick and dirty Java app". I barely even understand what that means, but it sounds like a useful skill.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Daniel Chen
United States
Apple Valley
Minnesota
flag msg tools
designer
This looks tasty...
badge
Yuck!
Avatar
mbmbmbmbmb
If you want to know the exact consecutive probability(so for example you want 5 consecutive but not count 6 consecutive successes).


P(success) = Probability of success on single roll
N(total) = # of total chances
N(desired) = # of consecutive rolls

Formula:
2 x (P(success)^(N(desired)+1))
+ (N(total)-N(desired)-2) x (P(success)^(Ndesired+2)
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Huzonfirst
United States
Manassas
Virginia
flag msg tools
designer
badge
Best hobby, with the best people in the world. Gaming is the best!
Avatar
mbmbmbmbmb
To continue Brandon's derailment, there's an interesting pattern for x, the expected number of rolls to see N consecutive rolls of our target die face. First of all, there's a math error in the three-in-a-row C result--it should be 258, not 267. And here's the pattern:

For A, we get x = 2, 6, 14 for 1, 2, and 3 in a row.
6 = (2+1)*2
14 = (6+1)*2
The probability of a single roll of A is 1/2; its inverse is 2.

For B, we get x = 3, 12, 39
12 = (3+1)*3
39 = (12+1)*3
The probability of a single roll of B is 1/3; its inverse is 3.

For C, we get x = 6, 42, 258
42 = (6+1)*6
258 = (42+1)*6
The probability of a single roll of C is 1/6; its inverse is 6.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jim Cote
United States
Maine
flag msg tools
badge
Avatar
mbmbmbmbmb
futhee wrote:
And I clearly need/want to learn how to do a "quick and dirty Java app". I barely even understand what that means, but it sounds like a useful skill.
I tried to post the code, but it keeps getting clipped in a weird way.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Daniel Chen
United States
Apple Valley
Minnesota
flag msg tools
designer
This looks tasty...
badge
Yuck!
Avatar
mbmbmbmbmb
TrojanDan wrote:
If you want to know the exact consecutive probability(so for example you want 5 consecutive but not count 6 consecutive successes).


P(success) = Probability of success on single roll
N(total) = # of total chances
N(desired) = # of consecutive rolls

Formula:
2 x (P(success)^(N(desired)+1))
+ (N(total)-N(desired)-2) x (P(success)^(Ndesired+2)

Two examples:
How many 3 consecutive A's in 10 rolls? (May have two separate sequences of threes) Approx 28.1%.

How many 5 consecutive C's in 8 rolls? 4.64 x 10^-5

The formulas only work for cases where the # of total rolls is 2 or more greater than the desired # of consecutive successes. If they are closer in #, than those formulas should be simppler.

1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Daniel Chen
United States
Apple Valley
Minnesota
flag msg tools
designer
This looks tasty...
badge
Yuck!
Avatar
mbmbmbmbmb
Reading the OP a bit more carefully, you would have to repeat the formulas for each # of consecutive desired(2 in a row, 3 in a row... up to N-2 consecutive) and adding the probability of having all successes, and N-1 consecutive.

Edit: but then you need to subtract out situations that are counted multiple times:

AAACAAAAAB - would be counted once under the 3's and once under the 5's

So the formula would have to be adjusted down.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael
United States
Lincoln
NE: NEBRASKA
flag msg tools
badge
Avatar
mbmbmbmbmb
GBCooper wrote:
mylittlepwny wrote:

Perhaps I explained it poorly.
perhaps you are still explaining it poorly but I will take a stab.

Hey!
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael
United States
Lincoln
NE: NEBRASKA
flag msg tools
badge
Avatar
mbmbmbmbmb
ekted wrote:
I wrote a quick and dirty Java app to simulate this. I did 10 million runs of 3 through 40 rolls each and found the average longest run of each letter:

3 rolls: avg longest A=1.37 avg longest B=0.93 avg longest C=0.48
4 rolls: avg longest A=1.69 avg longest B=1.14 avg longest C=0.60
5 rolls: avg longest A=1.94 avg longest B=1.30 avg longest C=0.71
6 rolls: avg longest A=2.16 avg longest B=1.45 avg longest C=0.80
7 rolls: avg longest A=2.34 avg longest B=1.57 avg longest C=0.88
8 rolls: avg longest A=2.51 avg longest B=1.67 avg longest C=0.96
9 rolls: avg longest A=2.66 avg longest B=1.76 avg longest C=1.02
10 rolls: avg longest A=2.80 avg longest B=1.85 avg longest C=1.08
11 rolls: avg longest A=2.92 avg longest B=1.93 avg longest C=1.13
12 rolls: avg longest A=3.04 avg longest B=2.00 avg longest C=1.17
13 rolls: avg longest A=3.15 avg longest B=2.06 avg longest C=1.22
14 rolls: avg longest A=3.25 avg longest B=2.12 avg longest C=1.25
15 rolls: avg longest A=3.34 avg longest B=2.18 avg longest C=1.29
16 rolls: avg longest A=3.43 avg longest B=2.24 avg longest C=1.32
17 rolls: avg longest A=3.51 avg longest B=2.29 avg longest C=1.35
18 rolls: avg longest A=3.59 avg longest B=2.34 avg longest C=1.38
19 rolls: avg longest A=3.66 avg longest B=2.38 avg longest C=1.41
20 rolls: avg longest A=3.73 avg longest B=2.43 avg longest C=1.43
21 rolls: avg longest A=3.80 avg longest B=2.47 avg longest C=1.45
22 rolls: avg longest A=3.86 avg longest B=2.51 avg longest C=1.48
23 rolls: avg longest A=3.92 avg longest B=2.55 avg longest C=1.50
24 rolls: avg longest A=3.98 avg longest B=2.59 avg longest C=1.52
25 rolls: avg longest A=4.04 avg longest B=2.63 avg longest C=1.54
26 rolls: avg longest A=4.09 avg longest B=2.66 avg longest C=1.56
27 rolls: avg longest A=4.14 avg longest B=2.69 avg longest C=1.58
28 rolls: avg longest A=4.19 avg longest B=2.72 avg longest C=1.60
29 rolls: avg longest A=4.24 avg longest B=2.76 avg longest C=1.62
30 rolls: avg longest A=4.29 avg longest B=2.79 avg longest C=1.63
31 rolls: avg longest A=4.34 avg longest B=2.81 avg longest C=1.65
32 rolls: avg longest A=4.38 avg longest B=2.84 avg longest C=1.67
33 rolls: avg longest A=4.42 avg longest B=2.87 avg longest C=1.68
34 rolls: avg longest A=4.46 avg longest B=2.90 avg longest C=1.70
35 rolls: avg longest A=4.50 avg longest B=2.92 avg longest C=1.71
36 rolls: avg longest A=4.54 avg longest B=2.95 avg longest C=1.73
37 rolls: avg longest A=4.58 avg longest B=2.97 avg longest C=1.74
38 rolls: avg longest A=4.62 avg longest B=2.99 avg longest C=1.76
39 rolls: avg longest A=4.66 avg longest B=3.02 avg longest C=1.77
40 rolls: avg longest A=4.69 avg longest B=3.04 avg longest C=1.78

This is very good The numbers are close to what I'd expect for low rolls, an the rate of increase is very interesting to see.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael
United States
Lincoln
NE: NEBRASKA
flag msg tools
badge
Avatar
mbmbmbmbmb
Lets take a look at all the possibilities for A in three rolls. There is a fifty percent shot at getting A, and a fifty percent shot at getting a non-A "N" Because there are even odds, all the following possibilities should have equal weight

1.NNN=0
2.ANN=1
3.NAN=1
4.NNA=1
5.AAN=2
6.ANA=1
7.NAA=2
8.AAA=3

So the average number would be the sum of the results (11) divided by the number of possibilities (8). That gives us 1.375 -> Making EKTed's model dead on
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael
United States
Lincoln
NE: NEBRASKA
flag msg tools
badge
Avatar
mbmbmbmbmb
Now with 4

1.NNNN=0
2.ANNN=1
3.NANN=1
4.NNAN=1
5.NNNA=1
6.ANNA=1
7.ANAN=1
8.AANN=2
9.NANA=1
10.NAAN=2
11.NNAA=2
12.AAAN=3
13.AANA=2
14.ANAA=2
15.NAAA=3
16.AAAA=4

Which gives us 27/16 or 1.6875, which is again very close to the model, making me feel good about the method
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jim Cote
United States
Maine
flag msg tools
badge
Avatar
mbmbmbmbmb
I was actually concerned by the result on the 6 row of C=0.80, because my gut intuition was that it should be 1.00. But when you consider that it's much more likely that there will be no C's than 2 C's in a row, then it makes sense.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael
United States
Lincoln
NE: NEBRASKA
flag msg tools
badge
Avatar
mbmbmbmbmb
So the answer appears to be a number divided by 2^x
Maybe I can find a pattern if find out some more of those numbers based on x
1................................1/2...
2................................4/4...1*2+2
3 rolls: avg longest A=1.37 .....11/8...4*2+3
4 rolls: avg longest A=1.69......27/16...11*2+5
5 rolls: avg longest A=1.94......62/32....27*2+8
6 rolls: avg longest A=2.16......138/64


Yup this is going some where...
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Brandon
United Kingdom
Exeter
flag msg tools
badge
Avatar
Larry Levy wrote:
To continue Brandon's derailment, there's an interesting pattern for x, the expected number of rolls to see N consecutive rolls of our target die face. First of all, there's a math error in the three-in-a-row C result--it should be 258, not 267.


Oops, good catch. I fixed it.

Quote:
And here's the pattern:

For A, we get x = 2, 6, 14 for 1, 2, and 3 in a row.
6 = (2+1)*2
14 = (6+1)*2
The probability of a single roll of A is 1/2; its inverse is 2.

For B, we get x = 3, 12, 39
12 = (3+1)*3
39 = (12+1)*3
The probability of a single roll of B is 1/3; its inverse is 3.

For C, we get x = 6, 42, 258
42 = (6+1)*6
258 = (42+1)*6
The probability of a single roll of C is 1/6; its inverse is 6.

Very interesting! That makes it a lot easier to compute for longer runs. I wanted to work on simplifying the series but I got really exhausted and went to bed instead.

Full disclosure: I took inspiration from this discussion in finding the solution to my modified wording of the problem.

To find analytically the solution to the original problem, you would need to enumerate the probabilities of all combinations of die rolls of length L and multiply them by the longest run of the face in question.

So, if L is two, and x is the length of the longest run, this is easy:

A (P(A)=probability of rolling A; P(!A)=prob. of rolling not A):

E(x) = P(!A!A)*0 + P(A!A + !AA)*1 + P(AA)*2
E(x) = (1/2)*(1/2)*0 + ((1/2)*(1/2) + (1/2)*(1/2))*1 + (1/2)*(1/2)*2
E(x) = (1/4)*0 + (1/2)*1 + (1/4)*2 = 1
(this matches what we found for the expected number of rolls to see a run of 1 A)

B:
E(x) = (4/9)*0 + (4/9)*1 + (1/9)*2 = 2/3

C:
E(x) = (25/36)*0 + (5/18)*1 + (1/36)*2 = 1/3;

For L=5, it gets more complicated:

A (there very well could be math errors here, but I'll give it a shot anyway):

E(x) = (prob of never rolling A)*0 + (prob of rolling A once)*1 + (prob of rolling A twice but with a max run of 1)*1 + (prob of rolling A twice with a max run of 2)*2 etc
E(x) = P(!A!A!A!A!A)*0 + P(A!A!A!A!A + !AA!A!A!A + !A!AA!A!A)*1 + P(A!A!A!AA + !AA!AA!A + ...) etc
E(x) = (1/32)*0 + ((1/32)*5)*1 + ((1/32)*6)*1 + ((1/32)*4)*2 + ((1/32)*1)*1 + ((1/32)*6)*2 + ((1/32)*3)*3 + ((1/32)*0)*1 + ((1/32)*1)*2 + ((1/32)*2)*3 + ((1/32)*2)*4 + (1/32)*5
E(x) = 31/16 = 1.94

So, for five rolls, it's nearly 2, which is the expected max run for 6 rolls. So, that checks out.

B:
E(x) = (32/243)*0 + ((16/243)*5)*1 + ((8/243)*6)*1 + ((8/243)*4)*2 + ((4/243)*1)*1 + ((4/243)*5)*2 + ((4/243)*3)*3 + ((2/243)*0)*1 + ((2/243)*1)*2 + ((2/243)*2)*3 + ((2/243)*2)*4 + (1/243)*5
E(x) = 317/243 = 1.30

C:
E(x) = (3125/7776)*0 + ((625/7776)*5)*1 + ((125/7776)*6)*1 + ((125/7776)*4)*2 + ((25/7776)*1)*1 + ((25/7776)*6)*2 + ((25/7776)*3)*3 + ((5/7776)*0)*1 + ((5/7776)*1)*2 + ((5/7776)*2)*3 + ((5/7776)*2)*4 + (1/7776)*5
E(x) = 2755/3888 = 0.71

If I would want to go longer than 5 rolls, I'd write a program to figure out all of the different permutations! But hopefully that makes it clear.

edit: yep, there was a math error in there. Fixed...
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Brandon
United Kingdom
Exeter
flag msg tools
badge
Avatar
OK, nobody cares anymore, but I'm at home sick and I got bored so I whipped up a Python script to calculate the precise expected maximum run of a face for any number of rolls. Due to having to calculate all the permutations of a given combination of rolls, its performance degrades exponentially with increasing number of rolls.

I calculated them for up to 25 rolls (which took 24.5 minutes on my laptop).

1 roll:
A E(x) = 0.5
B E(x) = 0.3333333333333333
C E(x) = 0.16666666666666666
2 rolls:
A E(x) = 1.0
B E(x) = 0.6666666666666667
C E(x) = 0.33333333333333337
3 rolls:
A E(x) = 1.375
B E(x) = 0.9259259259259259
C E(x) = 0.4768518518518519
4 rolls:
A E(x) = 1.6875
B E(x) = 1.1358024691358026
C E(x) = 0.6010802469135803
5 rolls:
A E(x) = 1.9375
B E(x) = 1.3045267489711936
C E(x) = 0.7085905349794238
6 rolls:
A E(x) = 2.15625
B E(x) = 1.4458161865569275
C E(x) = 0.8021690672153635
7 rolls:
A E(x) = 2.34375
B E(x) = 1.5660722450845914
C E(x) = 0.8840306355738456
8 rolls:
A E(x) = 2.51171875
B E(x) = 1.6710867245846674
C E(x) = 0.9560536455951836
9 rolls:
A E(x) = 2.662109375
B E(x) = 1.7644159934969261
C E(x) = 1.019800458358736
10 rolls:
A E(x) = 2.798828125
B E(x) = 1.8486680553438666
C E(x) = 1.0765756048472461
11 rolls:
A E(x) = 2.923828125
B E(x) = 1.9256606095502613
C E(x) = 1.1274679031574066
12 rolls:
A E(x) = 3.0390625
B E(x) = 1.9967070662594772
C E(x) = 1.1733864382111567
13 rolls:
A E(x) = 3.145751953125
B E(x) = 2.062764571545416
C E(x) = 1.2150904629232213
14 rolls:
A E(x) = 3.2451171875
B E(x) = 2.1245519258017613
C E(x) = 1.2532143333232204
15 rolls:
A E(x) = 3.338043212890625
B E(x) = 2.1826192754611595
C E(x) = 1.2882882837937393
16 rolls:
A E(x) = 3.4253082275390625
B E(x) = 2.237399127334313
C E(x) = 1.3207557420267213
17 rolls:
A E(x) = 3.5075531005859375
B E(x) = 2.2892398316084868
C E(x) = 1.3509877589103105
18 rolls:
A E(x) = 3.5853271484375
B E(x) = 2.3384285852782085
C E(x) = 1.379295034369082
19 rolls:
A E(x) = 3.6590919494628906
B E(x) = 2.385207170427791
C E(x) = 1.4059379397953156
20 rolls:
A E(x) = 3.729246139526367
B E(x) = 2.429782878909603
C E(x) = 1.43113487095124
21 rolls:
A E(x) = 3.796131134033203
B E(x) = 2.4723361526239476
C E(x) = 1.4550692095759998
22 rolls:
A E(x) = 3.8600430488586426
B E(x) = 2.5130260190275155
C E(x) = 1.4778951255586514
23 rolls:
A E(x) = 3.921239137649536
B E(x) = 2.5519940207550893
C E(x) = 1.4997424128966654
24 rolls:
A E(x) = 3.979944407939911
B E(x) = 2.589367115864465
C E(x) = 1.5207205204537002
25 rolls:
A E(x) = 4.03635647892952
B E(x) = 2.625259866456926
C E(x) = 1.5409219117011028


Pretty nice correspondance to Jim's simulation-based estimations.
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls