Dferrario
Dferrario
  • Threads: 1
  • Posts: 5
Joined: May 15, 2018
May 15th, 2018 at 8:20:34 AM permalink
What is the probability of rolling 2 dice and rolling every combination of dice before a 7 comes up? Not looking for the 36 combinations, looking for the probability without duplicates. (Example: Counting 1,2 and 2,1 as only one combination) I believe looking at it this way there are 21 combinations.

1,1. 1,2. 1,3. 1,4. 1,5. 1,6
2,2. 2,3. 2,4. 2,5. 2,6
3,3 3,4. 3,5. 3,6
4,4. 4,5. 4,6
5,5. 5,6
6,6

So the probability of rolling all these combinations before a 7 comes up? Thanks!
Romes
Romes
  • Threads: 29
  • Posts: 5602
Joined: Jul 22, 2014
May 15th, 2018 at 8:36:07 AM permalink
So craps side bet all small/tall/all?

https://wizardofodds.com/games/craps/appendix/5/
Playing it correctly means you've already won.
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
May 15th, 2018 at 8:50:48 AM permalink
Quote: Dferrario

So the probability of rolling all these combinations before a 7 comes up? Thanks!

so all 21 combos B4 any 7

instead of the 10 sums that the All Bonus Craps bet is. that is 1 in 190

so I say very close to 0 (how close do you want?)
without calculating it.
too many states for a simple transition matrix solution and too small values for inclusion-exclusion

there might be one that could do this while having fun with it

edit
Sally
Last edited by: mustangsally on May 15, 2018
I Heart Vi Hart
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
Thanked by
Dferrario
May 15th, 2018 at 9:02:21 AM permalink
Quote: Dferrario

What is the probability of rolling 2 dice and rolling every combination of dice before a 7 comes up?

1,1. 1,2. 1,3. 1,4. 1,5. 1,6
2,2. 2,3. 2,4. 2,5. 2,6
3,3 3,4. 3,5. 3,6
4,4. 4,5. 4,6
5,5. 5,6
6,6

1,6
2,5
3,4
are the combos for a 7
you do not want that right?
so 18 combos in all?
I Heart Vi Hart
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
May 15th, 2018 at 9:14:02 AM permalink
Quote: Dferrario

So the probability of rolling all these combinations before a 7 comes up? Thanks!

this was easier than I thought.
> p
[1] 0.0001345821
> a=1/p
> a # 1 in
[1] 7430.409
> a-1 # odds against
[1] 7429.409


compare All Bonus bet too below

I used R
 ##################################################################
> # Probability of rolling a subset of numbers before a single number
> ##################################################################
> start.time <- Sys.time()
> options(scipen=999)
>
> numbers = c(2,3,4,5,6,8,9,10,11,12,7) # Last must occur only after all others in any order
>
> in_36 = ifelse(numbers <= 7, numbers-1, 13-numbers) # Ways to make each number
> i = length(in_36)
> p = 0
> for (j in 1:(i-1)) { # Last number before j numbers
+ terms = combn(in_36[1:(i-1)],j) # Matrix w/combos of j numbers in C(i-1,j) columns
+ for (k in 1:ncol(terms)) { # Sum each column, compute and add probabilities
+ p = p + (-1)^(j+1) * in_36/(in_36 + sum(terms[1:j,k]))
+ }
+ }
> end.time <- Sys.time()
> time <- end.time - start.time
> time
Time difference of 0.1562679 secs
> p = 1-p
> p
[1] 0.005257704
> a=1/p
> a # 1 in
[1] 190.1971
> a-1 # odds against
[1] 189.1971
> ##################################################################
> # Probability of rolling a subset of numbers before a single number
> ##################################################################
> start.time <- Sys.time()
> options(scipen=999)
>
> numbers = c(2,3,4,5,6,4,5,6,8,6,8,9,8,9,10,10,11,12,7) # Last must occur only after all others in any order
>
> in_36 = c(1,2,2,2,2,1,2,2,2,1,2,2,1,2,2,1,2,1,6) # Ways to make each number
> i = length(in_36)
> p = 0
> for (j in 1:(i-1)) { # Last number before j numbers
+ terms = combn(in_36[1:(i-1)],j) # Matrix w/combos of j numbers in C(i-1,j) columns
+ for (k in 1:ncol(terms)) { # Sum each column, compute and add probabilities
+ p = p + (-1)^(j+1) * in_36/(in_36 + sum(terms[1:j,k]))
+ }
+ }
> end.time <- Sys.time()
> time <- end.time - start.time
> time
Time difference of 1.200368 secs
> p=1-p
> p
[1] 0.0001345821
> a=1/p
> a # 1 in
[1] 7430.409
> a-1 # odds against
[1] 7429.409


Sally
I Heart Vi Hart
Dferrario
Dferrario
  • Threads: 1
  • Posts: 5
Joined: May 15, 2018
May 15th, 2018 at 9:26:57 AM permalink
Great point, yes, without the 7 combinations! Thanks for catching this!
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
May 15th, 2018 at 9:42:15 AM permalink
Quote: Dferrario

Great point, yes, without the 7 combinations! Thanks for catching this!

it is what you said at 1st.
the subset of combos can roll in any order (the order does not matter)
in the code I used

you can also use the code for smaller subsets of combos too

wondering why the question?
Sally
I Heart Vi Hart
Dferrario
Dferrario
  • Threads: 1
  • Posts: 5
Joined: May 15, 2018
May 15th, 2018 at 3:12:55 PM permalink
Thanks Mustangsally. My dealer friend and I had a side bet. So to confirm it is roughly a 1-7,500 chance of rolling all 18 combinations before a seven comes up? It’s amazing you are able to calculate this, I should have paid more attention in school!😄
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
Thanked by
Dferrario
May 15th, 2018 at 3:48:18 PM permalink
Quote: Dferrario

Thanks Mustangsally. My dealer friend and I had a side bet. So to confirm it is roughly a 1-7,500 chance of rolling all 18 combinations before a seven comes up?

Hope you won your side bet!
yes, closer to 1 in 7431
Quote: Dferrario

It’s amazing you are able to calculate this, I should have paid more attention in school!😄

most everything can be calculated.
credit is to BruceZ who did the original code.
I changed it to suit my interests.

The math behind it is more involved as it uses a concept in set counting named inclusion- exclusion.
the code looks to see the probability of NOT getting all the combos and we subtract that from 1 to get the answer.

a dice example. the chance to NOT get at least one 1 on 2 dice =
5 ways * 5 ways = 25 ways out of 6*6 = 36 total ways = 25/36.

so 1 - 25/36 = 11/36 = the probability of getting at least one 1 when rolling 2d6

or 1/6 + 1/6 = 2/6 or 12/36
so we overcounted when the dice rolls 1,1
that should only count as one 1.
so 12/36 - 1/36 = 11/36
(one can see this in a list of all the possible sums)
Permutations with repetition (n=6, r=2)
Using Items: 1,2,3,4,5,6

List has 36 entries.
1,1
1,2
1,3
1,4
1,5
1,6
2,1
2,2
2,3
2,4
2,5
2,6
3,1
3,2
3,3
3,4
3,5
3,6
4,1
4,2
4,3
4,4
4,5
4,6
5,1
5,2
5,3
5,4
5,5
5,6
6,1
6,2
6,3
6,4
6,5
6,6

many ways to use the math to our advantage of finding the right answer.
Sally
I Heart Vi Hart
Dferrario
Dferrario
  • Threads: 1
  • Posts: 5
Joined: May 15, 2018
May 15th, 2018 at 6:31:05 PM permalink
One more math question for you:
Do you know the odds of not rolling a 7, for 10, 20, 30, 40 and 50 rolls?

Looking for 1 in 6, 1 in 50 etc.
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
May 15th, 2018 at 7:11:35 PM permalink
Quote: Dferrario

Looking for 1 in 6, 1 in 50 etc.

a table like this should work for you
roll Xon XX or lessno roll1 in
10.1666666670.1666666670.8333333331.20
20.1388888890.3055555560.6944444441.44
30.1157407410.4212962960.5787037041.73
40.0964506170.5177469140.4822530862.07
50.0803755140.5981224280.4018775722.49
60.0669795950.6651020230.3348979772.99
70.0558163290.7209183530.2790816473.58
80.0465136080.7674319610.2325680394.30
90.038761340.8061933010.1938066995.16
100.0323011170.8384944170.1615055836.19
110.0269175970.8654120140.1345879867.43
120.0224313310.8878433450.1121566558.92
130.0186927760.9065361210.09346387910.70
140.0155773130.9221134340.07788656612.84
150.0129810940.9350945280.06490547215.41
160.0108175790.9459121070.05408789318.49
170.0090146490.9549267560.04507324422.19
180.0075122070.9624389630.03756103726.62
190.0062601730.9686991360.03130086431.95
200.0052168110.9739159470.02608405338.34
210.0043473420.9782632890.02173671146.01
220.0036227850.9818860740.01811392655.21
230.0030189880.9849050620.01509493866.25
240.0025158230.9874208850.01257911579.50
250.0020965190.9895174040.01048259695.40
260.0017470990.9912645030.008735497114.48
270.0014559160.9927204190.007279581137.37
280.0012132630.9939336830.006066317164.84
290.0010110530.9949447360.005055264197.81
300.0008425440.995787280.00421272237.38
310.000702120.99648940.0035106284.85
320.00058510.99707450.0029255341.82
330.0004875830.9975620830.002437917410.19
340.0004063190.9979684030.002031597492.22
350.00033860.9983070020.001692998590.67
360.0002821660.9985891690.001410831708.80
370.0002351390.9988243070.001175693850.56
380.0001959490.9990202560.0009797441,020.67
390.0001632910.9991835470.0008164531,224.81
400.0001360760.9993196220.0006803781,469.77
410.0001133960.9994330180.0005669821,763.73
429.44969E-050.9995275150.0004724852,116.47
437.87474E-050.9996062630.0003937372,539.77
446.56229E-050.9996718860.0003281143,047.72
455.46857E-050.9997265710.0002734293,657.26
464.55714E-050.9997721430.0002278574,388.71
473.79762E-050.9998101190.0001898815,266.46
483.16468E-050.9998417660.0001582346,319.75
492.63724E-050.9998681380.0001318627,583.70
502.1977E-050.9998901150.0001098859,100.44
511.83141E-050.9999084299.15707E-0510,920.53
521.52618E-050.9999236917.63089E-0513,104.63
531.27182E-050.9999364096.35908E-0515,725.56
541.05985E-050.9999470085.29923E-0518,870.67
558.83205E-060.999955844.41602E-0522,644.80
567.36004E-060.99996323.68002E-0527,173.76
576.13337E-060.9999693333.06668E-0532,608.52
585.11114E-060.9999744442.55557E-0539,130.22
594.25928E-060.9999787042.12964E-0546,956.26
603.5494E-060.9999822531.7747E-0556,347.51
I Heart Vi Hart
Ace
Ace
  • Threads: 6
  • Posts: 43
Joined: Aug 15, 2013
Thanked by
Dferrario
May 15th, 2018 at 11:16:28 PM permalink
For a good approximation, take an average. There are 30 ways to throw the 18 values, so the average is 1.67 ways to throw each value.

Each of the 18 values makes up 1.67 in 36, or 1 in 22 rounded, of all possibilities leaving 4 in 22 of hitting a seven.

Therefore the chance of hitting all 18 before a seven is 18/22 * 17 /21 * 16/20 ....* 1/5

Which simplifies to (4 * 3 * 2) / (22 * 21 * 20 * 19) = 1 in 7,315.
Dferrario
Dferrario
  • Threads: 1
  • Posts: 5
Joined: May 15, 2018
September 24th, 2018 at 9:04:53 AM permalink
Sorry for the late thank you. Do you know the odds of hitting 10, 12, 14, and 16 of the combos of 18, leaving out the 7's?
  • Jump to: