Select Page
Poker Forum
Over 1,292,000 Posts!
Poker ForumFTR Community

Dice Probability Question

Results 1 to 30 of 30
  1. #1
    !Luck's Avatar
    Join Date
    Feb 2004
    Posts
    1,876
    Location
    Under a bridge

    Default Dice Probability Question

    The probability of two fair 6-sided dice to roll doubles is 1/6. The probability of rolling 3 doubles in a row is (1/6)^3. Which is 1/216 or 0.46%.


    If I roll dice 10,000,000 times, I would expect this value to be fairly close to 46k. This is not the case, when I perform this simulation I get ~38k.


    10 mil, appears to be sufficient sample size to tell me that either my simulation is wrong or my math or both .
    Last edited by !Luck; 12-23-2012 at 05:21 PM.
  2. #2
    !Luck's Avatar
    Join Date
    Feb 2004
    Posts
    1,876
    Location
    Under a bridge
    So I think I got it. Basically, I need to take into account that the previous roll before the start of this sequence isn't a double, which will happen 5/6 of the time. This doesn't feel very intuitive.


    I'm still getting higher numbers than:
    http://www.gammonsite.com/dice2.asp

    It looks like my triple rate is equal to triple + quad + five times. Here is the code I'm using to generate my simulation.

    Code:
    turns = 10000000
    current_turn = 0
    
    dice_1 = [random.randrange(1,7) for i in range(turns)]
    dice_2 = [random.randrange(1,7) for i in range(turns)]
    
    doubles = [ dice_1[i] == dice_2[i] for i in range(turns)]
    triples = []
    
    count = 0
    for i in range(len(doubles)):
        if doubles[i]==True:
            count += 1
            if count == 3:
                triples.append(i)
                count = 0
        else:
            count = 0
    Last edited by !Luck; 12-23-2012 at 06:05 PM.
  3. #3
    How do you want to handle the situation of 4 or more doubles in a row? For example, if you roll 6 doubles in a row -- do you want that to count as 2 triples, no triples (because it's a 6-in-a-row, not a 3-in-a-row), or 4 triples (because the last 4 of those double throws had two previous doubles behind each)?
  4. #4
    Quote Originally Posted by !Luck View Post
    I'm still getting higher numbers than:
    http://www.gammonsite.com/dice2.asp
    To match that site, you shouldn't increment your triple count until you have a triple and then the 4th throw is not a double. If the 4th throw is another double, it doesn't count as a triple. And then you shouldn't reset your checking until a non-double is thrown.
  5. #5
    should there be something like

    if dice_1(i)=dice2(i) and dice_1(i-1)= dice_2(i-1) and dice_1(i-2)=dice2(i-2)then trip=trip+1

    to compare the current dice and the 2 previous throws?
  6. #6
    also straight from the site you linked
    when I perform this simulation I get ~38k
    3 doubles = 37941
  7. #7
    Quote Originally Posted by celtic123 View Post
    should there be something like

    if dice_1(i)=dice2(i) and dice_1(i-1)= dice_2(i-1) and dice_1(i-2)=dice2(i-2)then trip=trip+1

    to compare the current dice and the 2 previous throws?
    No. First, that wouldn't take into account the times when dice_1[i-3] == dice_2[i-3] (you don't want to count those times). Second, an easy way is to just move the "if count == 3" line into the else statement, so you're only checking for a triple once the string of double-throws ended. Not sure what language this is, but I think this will work:

    Code:
    turns = 10000000
    current_turn = 0
    
    dice_1 = [random.randrange(1,7) for i in range(turns)]
    dice_2 = [random.randrange(1,7) for i in range(turns)]
    
    doubles = [ dice_1[i] == dice_2[i] for i in range(turns)]
    triples = []
    
    count = 0
    for i in range(len(doubles)):
        if doubles[i]==True:
            count += 1
        else:
            if count == 3:
                triples.append(i)
            count = 0
  8. #8
    Join Date
    Oct 2012
    Posts
    1,168
    Location
    Argentina
    Dices??? HAHAHA What's that?
  9. #9
    swiggidy's Avatar
    Join Date
    Sep 2005
    Posts
    7,876
    Location
    Waiting in the shadows ...
    I think they covered it. To match your description, don't roll 10mill times in a row, loop for 10mill 3x throw experiments.
    (\__/)
    (='.'=)
    (")_(")
  10. #10
    !Luck's Avatar
    Join Date
    Feb 2004
    Posts
    1,876
    Location
    Under a bridge
    My goal here was to duplicate monopoly dice rolling. Roll 3 times go to jail. Counter restarts at 0. I think this is why my numbers are off because I want it to be different.

    Plus, once I realized that i should ignore the first roll my 38k matches expected probability. Thank you guys for your help. I'm still learning!
  11. #11
    MadMojoMonkey's Avatar
    Join Date
    Apr 2012
    Posts
    10,456
    Location
    St Louis, MO
    Quote Originally Posted by swiggidy View Post
    I think they covered it. To match your description, don't roll 10mill times in a row, loop for 10mill 3x throw experiments.
    That's not going to answer the same question. DUCY?
    EDIT: It might be a better experiment for the monopoly scenario, though.

    Quote Originally Posted by !Luck View Post
    Plus, once I realized that i should ignore the first roll my 38k matches expected probability. Thank you guys for your help. I'm still learning!
    I was under the impression that ignoring the first roll had to do with the first roll serving a different function in backgammon.

    If the RNG is truly generating random numbers, then all outputs should be equivalent. Why would the "first" roll need to be discarded? (I'm actually curious)
  12. #12
    Join Date
    Dec 2010
    Posts
    46
    Location
    Cedar Rapids, Iowa, USA
    What programming language is this?
  13. #13
    Quote Originally Posted by Sloomer View Post
    What programming language is this?
    Reads like Basic , except the == which looks like a blatant error
  14. #14
    matlab possibly?

    Anyway I think it'd be worthwhile to do a set of simulations, not just the one simulation that yielded ~38k out of 10 mil. You could then draw a distribution of the results. Obviously, you would need to change the random seed each time to ensure you're not getting simulations that are identical to eachother.

    It's not outside of the realm of possibility that you get a 38k when the mean (expected value) is 46k. In fact I imagine it'd be somewhere in the left tail of the distribution. Not impossible, but unlikely.

    Edit: without going over in detail what others have said, is it possible that you're not counting 4 doubles in a row as 3 doubles, and so on? By the way it seems very odd that you need to set the previous roll to not be a double. Strictly speaking, 6 doubles in a row should count as 3 doubles happening twice, if you're just counting how many 3 doubles come up.

    If this is for monopoly, swiggidy's proposal seems legit. Have your simulation roll 3 sets of die 10 million times, and count how many times they come up triple double.

    You are correct in saying that the probability is significantly less than (1/6)^3 under these other assumptions.
    Last edited by Penneywize; 12-24-2012 at 06:47 PM.
  15. #15
    !Luck's Avatar
    Join Date
    Feb 2004
    Posts
    1,876
    Location
    Under a bridge
    Quote Originally Posted by MadMojoMonkey View Post
    That's not going to answer the same question. DUCY?
    EDIT: It might be a better experiment for the monopoly scenario, though.


    I was under the impression that ignoring the first roll had to do with the first roll serving a different function in backgammon.

    If the RNG is truly generating random numbers, then all outputs should be equivalent. Why would the "first" roll need to be discarded? (I'm actually curious)
    On the first 3 rolls the probability is 1/216 (1/6)^3. But on any roll that isn't the first. I need to check that the prevoius roll wasn't a double, which happens 5/6 of the time. Thus, starting from the second roll the probability of just 3 consecutive doubles in 4 rolls is 5/6*(1/6)^3.

    I ran it a few times too and got 38.5k +- 500.
    Last edited by !Luck; 12-24-2012 at 07:25 PM.
  16. #16
    !Luck's Avatar
    Join Date
    Feb 2004
    Posts
    1,876
    Location
    Under a bridge
    Quote Originally Posted by Sloomer View Post
    What programming language is this?
    Python
    Last edited by !Luck; 12-24-2012 at 07:16 PM.
  17. #17
    MadMojoMonkey's Avatar
    Join Date
    Apr 2012
    Posts
    10,456
    Location
    St Louis, MO
    Quote Originally Posted by !Luck View Post
    [...]I need to check that the prevoius roll wasn't a double [...]
  18. #18
    !Luck's Avatar
    Join Date
    Feb 2004
    Posts
    1,876
    Location
    Under a bridge
    Despite that my simulation has been done by others before, I wanted to do it my way. What insight can this give us?

    It is known fact that orange is by far the best property to have. It should also be fairly commonly known that for each property 3 houses is key.

    But, before I get started I will point out that the below assumes a house rule for utilities and railroads. Which is that utilities now cost 200 but if you have 6 rail roads the rent is 800.

    ===Analysis====


    Key points from the above:

    1. Purple is total crap
    2. Besides purple, the worst case 3 house scenario, is better than two house
    3. 6 Rail Roads is a monster
    4. If you only have $800 your best bet to maximize future earnings is to buy light blue and build 3 houses
    5. If trading for not orange you need to demand a min of 10% discount to cost to make it fair
    6. You can offer seemingly generous deals for orange properties and still come out way ahead
    7. People significantly undervalue orange properties
    8. People in general overvalue monopolies when they have little money
    9. Cash starving opponents is powerful
    10. House hording is the only reason to ever own Purple
  19. #19
    swiggidy's Avatar
    Join Date
    Sep 2005
    Posts
    7,876
    Location
    Waiting in the shadows ...
    Quote Originally Posted by MadMojoMonkey View Post
    That's not going to answer the same question. DUCY?
    EDIT: It might be a better experiment for the monopoly scenario, though.
    This is his statement:
    The probability of rolling 3 doubles in a row is (1/6)^3

    Not: "If I roll the dice x times, how often do I get three doubles in a row"

    Yes, I realize those are different.
    (\__/)
    (='.'=)
    (")_(")
  20. #20
    JKDS's Avatar
    Join Date
    Feb 2008
    Posts
    6,780
    Location
    Chandler, AZ
    It's cool for maths to find a way to answer this question, but it seems overly complicated since it isn't just (1/6) to the third.

    I can't remeber what the percent was for this, but I remeber people preferred to simulate a game. It honestly seems much easier to just program rolling 2 dice over and.over and then just searching for strings of doubles.

    Edit: bleh, seems like that's what u guys are arguing over. Carry on lol. Alls I know is that the chance of rolling into jail is dependent on what you rolled before.
    Last edited by JKDS; 12-27-2012 at 10:24 PM.
  21. #21
    MadMojoMonkey's Avatar
    Join Date
    Apr 2012
    Posts
    10,456
    Location
    St Louis, MO
    Quote Originally Posted by !Luck View Post
    6 Rail Roads is a monster
    B & O
    Short Line
    Reading
    Pennsylvania

    What other 2 railroads are you on about?

    Fun Fact: B & O stands for "Baltimore and Ohio"
  22. #22
    JKDS's Avatar
    Join Date
    Feb 2008
    Posts
    6,780
    Location
    Chandler, AZ
    Theres a variant of monopoly that makes utilities railroads. Its done because both are useless otherwise compared to the orange/red properties.
  23. #23
    !Luck's Avatar
    Join Date
    Feb 2004
    Posts
    1,876
    Location
    Under a bridge
    Utilities are worth less than purples. Making them into rail roads changes the importance of rail roads.
  24. #24
    MadMojoMonkey's Avatar
    Join Date
    Apr 2012
    Posts
    10,456
    Location
    St Louis, MO
    Yeah, I get it. It does seem like you end up trading one imbalance for another, though.

    I mean, making the railroads the only properties which have 6 spaces (double any other property), and keeping the rent as 100*2^(n-3), where n is the number of railroads owned, seems over the top. Especially much so when you consider that the max rent is achieved without any building improvement costs.

    If you move the rent for 6 rails down to 600, then it makes more sense as far as balancing early game strength to late game strength.

    Group %: 15.42
    Cost: 1,200
    Rent: 600
    EV: 95.52
    P/E: 12.97

    Which places 6 rails somewhere around the value of Violet or Light Blue.
  25. #25
    Quote Originally Posted by !Luck View Post
    1. House hording is the only reason to ever own Purple
    Random bump because whatever.

    If you're playing standard casual players (which probably isn't what you were assuming), then shouldn't it be standard to buy the Purple even though it's actual eV is crap? It can become an extremely powerful piece of trade leverage (since rec players will go bananas for any monopoly under any circumstances ever), and worst case scenario, you can cut your losses by selling it for face value or slightly less.
  26. #26
    Quote Originally Posted by MadMojoMonkey View Post
    B & O
    Short Line
    Reading
    Pennsylvania

    What other 2 railroads are you on about?

    Fun Fact: B & O stands for "Baltimore and Ohio"
    Do you guys really play with American place names as standard, or is it like a novelty board?

    Edit: or is my British one a novelty board? I don't even know where the game originated from and just woke up so too lazy to google.

    Edit 2: Impatience won over laziness. Seems both versions were thought out before either was released but that the game's american so the american one is indeed the original. That must take about 73% of the fun of visiting London away, for you guys.
    Last edited by kiwiMark; 01-28-2013 at 04:31 AM.
  27. #27
    MadMojoMonkey's Avatar
    Join Date
    Apr 2012
    Posts
    10,456
    Location
    St Louis, MO
    Quote Originally Posted by kiwiMark View Post
    Do you guys really play with American place names as standard, or is it like a novelty board?

    Edit: or is my British one a novelty board? I don't even know where the game originated from and just woke up so too lazy to google.

    Edit 2: Impatience won over laziness. Seems both versions were thought out before either was released but that the game's american so the american one is indeed the original. That must take about 73% of the fun of visiting London away, for you guys.
    The "original" is the standard in America, I think. I haven't played Monopoly in years, though.

    Even still. I think in America if you mentioned a Monopoly novelty board, people would think "Star Wars Monopoly" or something similar long before they'd even imagine a British version.

    And yeah... I bet a London board would make visiting London a bit more fun.
  28. #28
    Yeah my edit #2 research says that the British version is the "normal" one for Britain (ldo) and all of the commonwealth bar Canada who use the american version with a couple of changes.

    Novelty was probably too strong a word, but like these days kids are growing up with boards with New Zealand place names on (or even specifically from the city they're in) rather than the British one.
  29. #29
    The Monopoly drinking game. You have to get the tube, bus or walk to every place on the board. Find the road name. Find nearest pub. Drink in every pub. Profit.
    Normski
  30. #30
    MadMojoMonkey's Avatar
    Join Date
    Apr 2012
    Posts
    10,456
    Location
    St Louis, MO
    profit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •