*Author

Offline JenkarTopic starter

  • Legendary Member
  • ******
  • Posts: 4199
  • Country: fr
  • Reputation Power: 58
  • Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.Jenkar is truly a Titan, worthy of respect and acknowledgement.
  • Heart's made of shadows
  • Awards: Slice of Elements 8th Birthday CakeSlice of Elements 7th Birthday CakeChampionship League 2/2013 WinnerSlice of Elements 4th Birthday Cake6th Trials - Master of AirWinner of Revive the Archive 2!Slice of Elements 3rd Birthday CakeBeginners League 1/2012 WinnerWeekly Tournament Winner5th Trials - Master of AirAvatar of Patience - Winner of the 7 Heavenly Virtues Deck CompetitionBeginners League 3/2011 3rd PlaceC-C-C-Combo Maker Winner!
Dice probability https://elementscommunity.org/forum/index.php?topic=42218.msg525111#msg525111
« on: July 24, 2012, 09:06:30 pm »
Okay, though question. I've researched a bit empirically and found no easy solution, so here goes.

A guy rolls xdy (x times y-sided dices. I know that 1;3;5 ect dices don't exist, so let's supposed we somehow made dices like that that are weighted so that each side has the same chance of appearing).

What is the formula that, for a number n (x≤n≤xy), gives the probability of the total of the dices' sides equalling n?
« Last Edit: July 24, 2012, 09:37:01 pm by Jenkar »
The madness is in each of us. Close your eyes, sing, and open your webbed wings to the silent winds.
Beautiful art : http://i.imgur.com/eUhyYCC.png

Offline OldTrees

  • Legendary Member
  • ******
  • Posts: 10297
  • Reputation Power: 114
  • OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.
  • I was available for questions.
  • Awards: Brawl #2 Winner - Team FireTeam Card Design Winner
Re: Dice probability https://elementscommunity.org/forum/index.php?topic=42218.msg525125#msg525125
« Reply #1 on: July 24, 2012, 09:34:21 pm »
d3s d5s etc do exist. (they are cylindrical)
Dice can exist in all integers greater than 2.
A d2 is a coin rather than a die.

Unfortunately I do not know the formula.

Thinking out loud
Spoiler for Hidden:
Obviously the lowest and highest have 1 combination and the second lowest and second highest have X combinations.
The 3rd has 1,3,6,10 combinations for 1,2,3,4 dice. (triangle numbers obviously)
The 4th has 1,4,10,20? combinations for 1,2,3,4 dice. (summation of triangle numbers)
Perhaps this is summationn-1 of 1 from 1 to dice number?
This would stop working when n > y.

Spoiler for Hidden:
Edit: more
2d3:
min 2, max 6
combinations1st(2,6)=1=summation1(1) from1 to 1
combinations2nd(3,5)=2=summation1(1) from1 to 2
combinations3rd(4)=3=summation1(1) from1 to 3
234
345
456

3d3:
min 3, max 9
combinations1st(2,9)=1=summation2(1) from1 to 1
combinations2nd(3,8)=3=summation2(1) from1 to 2
combinations3rd(4,7)=6=summation2(1) from1 to 3
combinations4th(5,6)=10=summation2(1) from1 to 4
combinations5th(6)=15=summation2(1) from1 to 5
combinations6th(7)=21=summation2(1) from1 to 6
but 4[n] is > 3 [y] therefore it falls short
combinations4th(5,6)=7=summation2(1) from1 to 4  -3
combinations5th(6)=7=summation2(1) from1 to 5   -8
combinations6th(7)=6=summation2(1) from1 to 6  -15
345   456   567
456   567   678
567   678   789

N never has to be greater than Y in 2 dimensions. However it can be if you only approach from one side
2d3:
combinations3rd(4)=3=summation1(1) from1 to 3
combinations4th(5)=2=4-2=summation1(1) from1 to 4    -2
combinations5th(6)=1=5-4=summation1(1) from1 to 5    -4
combinations5th(7)=0=6-6=summation1(1) from1 to 6    -6


Edit more:
3d5
min 3, max 15[F], mode 9

34567    45678    56789    6789A    789AB
45678    56789    6789A    789AB    89ABC
56789    6789A    789AB    89ABC    9ABCD
6789A    789AB    89ABC    9ABCD    ABCDE
789AB    89ABC    9ABCD    ABCDE    BCDEF

3456789A
456789A
56789A
6789A
789AB
89A
9A
A


456789A
56789A
6789A
789AB
89ABC
9A
A

56789A
6789A
789AB
89ABC
9ABCD
A

89A
9A
A


9A
A


A

The yellow is the extra results the combination sees when n>Y
Note it is 3 then 9 then 18 in the X=3 case.
« Last Edit: July 24, 2012, 10:55:01 pm by OldTrees »
"It is common sense to listen to the wisdom of the wise. The wise are marked by their readiness to listen to the wisdom of the fool."
"Nothing exists that cannot be countered." -OldTrees on indirect counters
Ask the Idea Guru: http://elementscommunity.org/forum/index.php/topic,32272.0.htm

Offline YawnChainHow

  • Full Member
  • ***
  • Posts: 463
  • Reputation Power: 9
  • YawnChainHow is a Spark waiting for a buff.
  • Tees no longer available for purchase
  • Awards: Slice of Elements 4th Birthday CakeSlice of Elements 3rd Birthday CakeSlice of Elements 2nd Birthday Cake
Re: Dice probability https://elementscommunity.org/forum/index.php?topic=42218.msg525134#msg525134
« Reply #2 on: July 24, 2012, 10:05:18 pm »
Said a bit in chat but here's a webapp for closure: http://topps.diku.dk/torbenm/troll.msp.

Just click Calculate Probabilities (I feel that the default settings are fine). The output is a probability distribution (cool) with percentages along the Y (what we want).

The 3 and 6 in the default input "sum 3d6" can be changed to the desired values. First number is number of die, second number is sides per die.

If you wish to experiment with different kinds of dice, inputs such as "sum 4d6+7d3" are also acceptable. "Select User-contributed roll" has a number of fine examples of what Troll can do for you.

Offline OldTrees

  • Legendary Member
  • ******
  • Posts: 10297
  • Reputation Power: 114
  • OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.
  • I was available for questions.
  • Awards: Brawl #2 Winner - Team FireTeam Card Design Winner
Re: Dice probability https://elementscommunity.org/forum/index.php?topic=42218.msg525143#msg525143
« Reply #3 on: July 24, 2012, 10:54:20 pm »
Nice app.


I will just summarize my results and let people use the app.
XdY has YX combinations
The nth lowest combination (if n <= y) has SummationX-1 (1) from 1 to n combinations
The nth lowest combination (if n > y) has SummationX-1 (1) from 1 to n - Summationx-2(x) from 1 to n-Y combinations
"It is common sense to listen to the wisdom of the wise. The wise are marked by their readiness to listen to the wisdom of the fool."
"Nothing exists that cannot be countered." -OldTrees on indirect counters
Ask the Idea Guru: http://elementscommunity.org/forum/index.php/topic,32272.0.htm

Offline The_Mormegil

  • Legendary Member
  • ******
  • Posts: 2262
  • Country: it
  • Reputation Power: 32
  • The_Mormegil is a Ghost, obsessed with their Elemental pursuits.The_Mormegil is a Ghost, obsessed with their Elemental pursuits.The_Mormegil is a Ghost, obsessed with their Elemental pursuits.The_Mormegil is a Ghost, obsessed with their Elemental pursuits.The_Mormegil is a Ghost, obsessed with their Elemental pursuits.The_Mormegil is a Ghost, obsessed with their Elemental pursuits.
  • Intelligence is overrated.
  • Awards: Slice of Elements 10th Birthday CakeWar #5 Winner - Team AetherTeam PvP WinnerNew Slot Winner - FamiliarDeadly Sin Winner - GluttonyFirst Budosei of BudokanWinner of Revive the Archive
Re: Dice probability https://elementscommunity.org/forum/index.php?topic=42218.msg525155#msg525155
« Reply #4 on: July 24, 2012, 11:37:49 pm »
Okay, though question. I've researched a bit empirically and found no easy solution, so here goes.

A guy rolls xdy (x times y-sided dices. I know that 1;3;5 ect dices don't exist, so let's supposed we somehow made dices like that that are weighted so that each side has the same chance of appearing).

What is the formula that, for a number n (x≤n≤xy), gives the probability of the total of the dices' sides equalling n?

Sums of random variables are usually calculated through convolution, which makes it a pain since you have x variables. The formula ought to exist, but using a computer is the best way to go for this. Unless you need just an approximation, in which case know that if x is high enough you can just do the following (estimation is pretty good even for "low" numbers, such as 30-40 dice).

P(n <= X <= m) = P(n-1/2 < X < m+1/2) ~= P( ((n-1/2) - x(y+1)/2) / (x^1/2 * (y^2-1)/12) < N(0,1) < ((m+1/2) - x(y+1)/2) / (x^1/2 * (y^2-1)/12) ) = F( ((m+1/2) - x(y+1)/2) / (x^1/2 * (y^2-1)/12) ) - F( ((n-1/2) - x(y+1)/2) / (x^1/2 * (y^2-1)/12) )

...where F is the cumulative distribution function for the normal distribution, which you find tabulated rather easily.

(Someone please doublecheck those calculations, 'cause I'm up late)


If you aren't rolling many dice, it shouldn't be too much of a pain to use convolutions. The basic idea is to sum the probability for every possible combination that nets you that particular result.

If you want to know the probability for some number of dice between, say, 5 and 30... sucks to be you, but the app seems handy.
[18:21:43] jmdt: elements is just math over top of a GUI
Kakerlake: I believe that there is no God as in something that can think by itself and does stuff that sounds way OP.

 

anything
blarg: