exterminatorx
exterminatorx
  • Threads: 1
  • Posts: 2
Joined: Apr 5, 2020
April 5th, 2020 at 6:06:04 PM permalink
I have 9 special six-sided dice. 5 of these dices have a special symbol on one of the faces (1/6 prob). The other four have this special symbol on two of the faces (2/6 prob).

If I roll all 9 dice, what is the probability of rolling exactly two of the special symbols? Exactly rolling three special symbols? Rolling four or more of the special symbols?

I'd love to see a detailed breakdown of the math because I have other dice and combinations I want to be able to learn how to calculate. Thanks, Wizard of Odds!
ssho88
ssho88
  • Threads: 58
  • Posts: 682
Joined: Oct 16, 2011
April 5th, 2020 at 8:24:03 PM permalink
probability of rolling exactly two of the special symbols = 3,120,000/10,077,696 = 0.30959
Klopp
Klopp
  • Threads: 7
  • Posts: 16
Joined: Mar 10, 2020
April 6th, 2020 at 3:19:48 AM permalink
The answer is indeed 0.3096. It might be interesting to outline the generally applicable method I have used for getting the answer. The idea was to use generating functions! For the die with one special symbol, let the random variable $X_i$ be 1 with probability 1/6 and be 0 with probability 5/6 for $i=1, \ldots, 5$, and for the die with two special symbols let the random variable $Y_i$ be 1 with probability 2/6 and be 0 with probability 4/6 for $i=1, \ldots, 4$. The generating function of $X_i$ is $5/6+z/6$ and the generating function of $Y_i$ is $4/6+2z/6$. By the independence of the $X_i$ and the $Y_i$, the generating function of the sum of the $X_i$ and the $Y_i$ is $(5/6+z/6)^5\times (4/6+2z/6)^4$. Using standard software such as the free software WolframAlpha, you find that the product of the polynomials is:

z^9/629856 + (11 z^8)/209952 + (79 z^7)/104976 + (647 z^6)/104976 + (6647 z^5)/209952 + (22175 z^4)/209952 + (500 z^3)/2187 + (8125 z^2)/26244 + (3125 z)/13122 + 3125/39366

The coefficient of $z^k$ gives the probability that the total of special symbols will be $k$. In particular, for $k=2$, this probability is 8125/26244=0.3096.
Last edited by: Klopp on Apr 6, 2020
exterminatorx
exterminatorx
  • Threads: 1
  • Posts: 2
Joined: Apr 5, 2020
April 7th, 2020 at 9:16:50 AM permalink
Quote: Klopp

The answer is indeed 0.3096. It might be interesting to outline the generally applicable method I have used for getting the answer. The idea was to use generating functions! For the die with one special symbol, let the random variable $X_i$ be 1 with probability 1/6 and be 0 with probability 5/6 for $i=1, \ldots, 5$, and for the die with two special symbols let the random variable $Y_i$ be 1 with probability 2/6 and be 0 with probability 4/6 for $i=1, \ldots, 4$. The generating function of $X_i$ is $5/6+z/6$ and the generating function of $Y_i$ is $4/6+2z/6$. By the independence of the $X_i$ and the $Y_i$, the generating function of the sum of the $X_i$ and the $Y_i$ is $(5/6+z/6)^5\times (4/6+2z/6)^4$. Using standard software such as the free software WolframAlpha, you find that the product of the polynomials is:

z^9/629856 + (11 z^8)/209952 + (79 z^7)/104976 + (647 z^6)/104976 + (6647 z^5)/209952 + (22175 z^4)/209952 + (500 z^3)/2187 + (8125 z^2)/26244 + (3125 z)/13122 + 3125/39366

The coefficient of $z^k$ gives the probability that the total of special symbols will be $k$. In particular, for $k=2$, this probability is 8125/26244=0.3096.



This is fantastic and exactly what I was looking for. Now, just to make sure I *get it*, let me modify the dice and see if I get the generating function correct. If we remove two of the 1-symbol dice and replace it with a single 2-symbol dice, that leaves us with 8 total dice, 3 w/1-symbol and 5 w/2-symbols.

$X_i$ be 1 with probability 1/6 and be 0 with probability 5/6 for $i=1, \ldots, 3$, and for the die with two special symbols let the random variable $Y_i$ be 1 with probability 2/6 and be 0 with probability 4/6 for $i=1, \ldots, 5$. The generating function of $X_i$ is $5/6+z/6$ and the generating function of $Y_i$ is $4/6+2z/6$. By the independence of the $X_i$ and the $Y_i$, the generating function of the sum of the $X_i$ and the $Y_i$ is $(5/6+z/6)^3\times (4/6+2z/6)^5$. Using standard software such as the free software WolframAlpha, you find that the product of the polynomials is:

z^8/52488 + (25 z^7)/52488 + (265 z^6)/52488 + (1555 z^5)/52488 + (2765 z^4)/26244 + (1529 z^3)/6561 + (2060 z^2)/6561 + (1550 z)/6561 + 500/6561

So, the probability of rolling exactly two special symbols with these 8 dice would be 2060/6561 = 31.40%, which differs from the previous set of dice by +0.44%

Have I understood how to modify the generating functions for different sets of dice w/different probabilities?
Klopp
Klopp
  • Threads: 7
  • Posts: 16
Joined: Mar 10, 2020
Thanked by
exterminatorx
April 7th, 2020 at 10:27:11 AM permalink
Yes. One other example: 3 dice each with 4 special symbols and 5 dice each with 3 special symbols. Then the generating function is $(2/6+4z/6)^3\times (3/6+3z/6)^5$. The powerful method of generating functions is nicely explained in chapter 8 of the book Probability, A Lively Introduction by Henk Tijms.
ssho88
ssho88
  • Threads: 58
  • Posts: 682
Joined: Oct 16, 2011
April 7th, 2020 at 11:08:37 AM permalink
Quote: exterminatorx

This is fantastic and exactly what I was looking for. Now, just to make sure I *get it*, let me modify the dice and see if I get the generating function correct. If we remove two of the 1-symbol dice and replace it with a single 2-symbol dice, that leaves us with 8 total dice, 3 w/1-symbol and 5 w/2-symbols.

$X_i$ be 1 with probability 1/6 and be 0 with probability 5/6 for $i=1, \ldots, 3$, and for the die with two special symbols let the random variable $Y_i$ be 1 with probability 2/6 and be 0 with probability 4/6 for $i=1, \ldots, 5$. The generating function of $X_i$ is $5/6+z/6$ and the generating function of $Y_i$ is $4/6+2z/6$. By the independence of the $X_i$ and the $Y_i$, the generating function of the sum of the $X_i$ and the $Y_i$ is $(5/6+z/6)^3\times (4/6+2z/6)^5$. Using standard software such as the free software WolframAlpha, you find that the product of the polynomials is:

z^8/52488 + (25 z^7)/52488 + (265 z^6)/52488 + (1555 z^5)/52488 + (2765 z^4)/26244 + (1529 z^3)/6561 + (2060 z^2)/6561 + (1550 z)/6561 + 500/6561

So, the probability of rolling exactly two special symbols with these 8 dice would be 2060/6561 = 31.40%, which differs from the previous set of dice by +0.44%

Have I understood how to modify the generating functions for different sets of dice w/different probabilities?





8 total dice, 3 w/1-symbol and 5 w/2-symbols, there are three scenarios :-

S = special symbol, N = Non

a) SSN+NNNNN
Prob1 = 1/6 * 1/6*5/6*(4/6)^5 * 3 = 15360/1679616

b) NNN+SSNNN
Prob2 =(5/6)^3*(2/6)^2*(4/6)^3 *10 = 320000/1679616

c) SNN+SNNNN
Prob3 =1/6*(5/6)^2*(2/6)*(4/6)^4 * 15 = 192000/1679616

Prob1 + Prob2 +Prob3 = 0.313976 = 31.3976%
  • Jump to: