Probability of a pair with certain sum using four 4-sided die

jedskee

New member
Joined
Sep 4, 2022
Messages
2
What's the Probability of getting a pair for a certain sum with four four-sided die? I'm planning on making a ttrpg so I have additional questions too. And the probability of getting two pairs? Also the probability of getting three of the same number as well as four of the same number?
If possible, I also want to know the probability of getting an exact sum of x. I want to make a tabletop rpg focusing on making actions based on the sum of 4d4, but I want to limit what sort of actions the players make by making certain ones difficult to achieve statistically
[e.g.:
4= (1,1,1,1) critical hit
5= (1,1,1,2)(1,1,2,1)(1,2,1,1)(2,1,1,1) great hit
6= (1,1,2,2)(1,2,1,2)(1,2,2,1)(2,2,1,1)(2,1,2,1)...]

Alternatively, I could just get a sample space with all the subsets, but I don't know how to do that that's not manually. I'm not really good (and English isn't my first language) so please explain like I'm a child.
 
... so please explain like I'm a child.
Here is my childish question: what are 'rpg' and 'ttrpg' ?

Also, are your 4-sided dice have numbers from 1 to 4 and equal probability for each side?
 
Here is my childish question: what are 'rpg' and 'ttrpg' ?

Also, are your 4-sided dice have numbers from 1 to 4 and equal probability for each side?
Not a childish question at all, Rpg is an anacronym for "role playing game" and the "tt" prefix is for table top. I think that we can assume the 4 sided die will have equal probability of landing on each side.

I'm sure that this question, and yesterday's (click), can be answered directly since it seems very clear to me that this isn't class/ student work.

I do however think that @jedskee would become a much better game designer if he/she/they could learn at least a bit of maths from this problem.

@jedskee I see that you started constructing a histogram in the op. That's very good. Therefore, do you see the relevance of the "result" section of the following link (sorry to steal your thunder Pka ;) )...
expand (sum of k from 1 to 4 of x^k)^4
...hint there's 4 ways to get the sum of 5 (4x^5). What does x^4 represent, and 10x^6? Please reply with your thoughts or any questions
 
There are [imath]4^4 = 256[/imath] possible rolls

1 pair - Select the number that will be in the pair. 4 choices. Two dice left that can take 3 possible values each. [imath]\dbinom{3}{2}=3[/imath] choices
A total of 4x3 = 12 possible pairs.
P[1 pair] = 12/256 = 3/64

2 pairs - Is 4 of a kind considered two pairs? Assume not. There are [imath]\dbinom{4}{2}=6[/imath] ways to select 2 pairs.
P[2 pairs (not including 4 of a kind)] = 6/256 = 3/128

3 of a kind - Pick the number to be the triple. 4 choices. Pick the number to be the single. 3 choices. 12 ways to make 3 of a kind.
P[3 of a kind]=12/256 = 3/64

4 of a kind - Clearly 4 ways of rolling 4 of a kind.
P[4 of a kind] = 4/256 = 1/64

The distribution of the sum is a bit more complicated.
Here's a trick.

[imath]p(x) = (x+x^2+x^3+x^4)^4 = \sum \limits_{k=0}^{16} c_k x^k [/imath] (I leave you to determine the c's, note some are zero)

[imath]P[\text{sum of the rolls equals }k] = \dfrac{c_k}{256}[/imath]
 
1 pair - Select the number that will be in the pair. 4 choices. Two dice left that can take 3 possible values each. [imath]\dbinom{3}{2}=3[/imath] choices
A total of 4x3 = 12 possible pairs.
P[1 pair] = 12/256 = 3/64
Welcome to the forum BeansNRice! The above is correct except you forgot that the pair (and the other two numbers) can be permuted among the 4 dice, in 4! / (2! 1! 1!) = 12 ways. Therefore P[1 pair] = 12*12/256 = 9/16

Your "distribution of the sum" looks correct :thumbup:

I haven't checked the rest of your work.
 
Welcome to the forum BeansNRice! The above is correct except you forgot that the pair (and the other two numbers) can be permuted among the 4 dice, in 4! / (2! 1! 1!) = 12 ways. Therefore P[1 pair] = 12*12/256 = 9/16

Your "distribution of the sum" looks correct :thumbup:

I haven't checked the rest of your work.

I don't think order matters in a dice roll. Am I misunderstanding you?
 
I don't think order matters in a dice roll. Am I misunderstanding you?
You've divided by 4^4 = 256 and this number includes all permutations.

Always be consistent.

Let x be the set of all possible outcomes being considered (4^4 in this case)
Then let y be the subset of x that contains all elements (of x) with a particular feature.
The probability of that feature occuring is (the number of elements in y) / (the number of elements in x) if each element in x is equally likely.

Your set x contained all permutations. But your set y did not contain all elements of x that had a single pairing.

=====

This raises an important "gotcha" in combinatorics

Consider all permutations of rolling 3d3...
Code:
  111  *211  *311
 *112  *212   312
 *113   213  *313
 *121  *221   321
 *122   222  *322
  123  *223  *323
 *131   231  *331
  132  *232  *332
 *133  *233   333
...there's a * against all outcomes with a single pair. P(single pair) = 18 / 27 = 2/3

Now let's consider the set of ordered outcomes (again with a * against pairs)...
Code:
  111    *133
 *112     222
 *113    *223
 *122    *233
  123     333
The proportion of outcomes containing a single pair is 6/10 = 3/5. Can you think why this doesn't give the probability?
 
Last edited:
Top