+ Reply to Thread
Results 1 to 6 of 6

Determining dice probabilities

  1. #1
    Registered User
    Join Date
    02-08-2012
    Location
    Western Mass
    MS-Off Ver
    Excel 2003
    Posts
    15

    Determining dice probabilities

    I have only managed to figure out how to do this with two dice by creating a result matrix and using countif() to find occurrences of a a particular sum.

    I'm trying to create a formula, or whatever solution works, to determine what the probability of getting a certain sum on dice is.

    Example: you roll 3 six sided dice and want to know the distribution of results for possibilities 3 through 18.

    Also what if I want to change my dice to four six sided dice, but only keeping the highest three results? My range stays 3 to 18 but the mean and deviation should be higher and lower respectively.

    Any thoughts?
    Last edited by tedcahill2; 05-25-2018 at 09:20 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,447

    Re: Determining dice probabilities

    Hi Ted,

    See if the attached helps. In reality you have 6x6x6 possible outcomes to your die rolling problem. But the attached is more fun to deal with. Press F9 to see the results change.

    3 Die Probability.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,230

    Re: Determining dice probabilities

    Not sure why you are interested in mean and [standard] deviation for this (normally you would just be interested in probabilities for the discrete values) but here is an exhaustive analysis that addresses both of the scenarios that you identified.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Determining dice probabilities

    Pl see file. Columns C to G are for verification.

    Formula for 3 dies. I2 is event.
    Please Login or Register  to view this content.
    Formula for 4 dies. L2 is event.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Determining dice probabilities

    If you want exact answers, the probability of rolling a sum N on M 6-sided dice is the coefficient of x^N in

    (x + x^2 + x^3 + x^4 + x^5 + x^6)^M / 6^M

    You can expand polynomials like this at, for instance https://xrjunque.nom.es/polycalc.aspx

    So for example,

    (x+x^2+x^3+x^4+x^5+x^6)^4

    returns

    x^24 +4*x^23 +10*x^22 +20*x^21 +35*x^20 +56*x^19 +80*x^18 +104*x^17 +125*x^16 +140*x^15 +146*x^14 +140*x^13 +125*x^12 +104*x^11 +80*x^10 +56*x^9 +35*x^8 +20*x^7 +10*x^6 +4*x^5 +x^4

    Which means the chance of rolling a 14 on three dice is 146/6^4 = 146/1296
    Last edited by shg; 05-25-2018 at 03:46 PM.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    12-11-2019
    Location
    Chesterfield, VA
    MS-Off Ver
    2010
    Posts
    1

    Re: Determining dice probabilities

    To create a spreadsheet for up to 7 dice of up to 20 faces do as follows:
    On a blank spreadsheet, for example for a 20 sided die, put 20 in cell A3 to denote the number of sides on the dice and put 1 through 7 in cells C1 through I1 to designate the number of dice for reference below.

    Put a zero in cell A22, 1 in cell B22, the formula =A22+1 in cell A23.
    In cell C23 put formula =SUM(OFFSET(C23,-$A$3,-1,$A$3,1)/$A$3) and enter it by using the combination of Control, Shift Enter. This is an array formula.

    Copy the formula in cell C23 into D23 through I23.
    Then copy cells A23 through I23 down to row A162 through I162.

    additional descriptive text is shown in the spreadsheet.

    The blank lines between the top row and the probabilities are necessary for the formula to work but can be hidden. You need to add as many blank lines as the maximum number of faces on the die.
    There needs to be as many rows at the bottom such that the maximum number of die total is met. For example, 7 dice with 20 sides means the bottom number in column A needs to be 140.
    Change A3 to whatever number of sides of dice you are rolling and look up the probability of getting a total in column A for the number of dice rolled in row 1.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Slice and dice data
    By rpinxt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-12-2018, 07:55 AM
  2. Calculating Six Sided Dice Probabilities
    By MadWelshWizard in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-28-2017, 05:26 PM
  3. how to input all combinations for 6 dice
    By demonuga in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 08-21-2015, 05:55 PM
  4. Replies: 1
    Last Post: 03-25-2014, 10:46 AM
  5. Excel 2007 : RANDOM dice NOT FAIR
    By vazi01 in forum Excel General
    Replies: 6
    Last Post: 02-18-2010, 11:39 PM
  6. Probabilities, random numbers and dice throws
    By Galamdring in forum Excel Formulas & Functions
    Replies: 28
    Last Post: 09-06-2005, 03:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1