Formula to calculate chance probability of a dice side based on its value

0 votes

So I am making a simple Dice that has 6 sides, but I want to modify the chances of those 6 sides.

Now my dice can have N sides, it grows, so you start with 6 sided dice and you may get up to 10 sided dice. The chances for a specific side to come up on a roll depends on its value. Chances should decrease depending on the value on a side so if side value is 1 its chance is higher than the side numbered 6 whose chance would be much lower.

Example (6 Sided):

Side   :   Chance
 1     :   35  %
 2     :   25  %
 3     :   20  %
 4     :   11  %
 5     :   6.5 %
 6     :   2.5 %

So as sides increase the chances should decrease never going over 100.

I tried making formula depend on the side and divide the current chance by number of sides but did not work.

Edit:

Side 6 should have 6 times less probability than side 1 and 5 times less probability than side 2 and 4 times less probability than side 3 etc... My example does not match this because I could not come up with numbers so they would add up to 100 and qualify the conditions.

Mar 15, 2022 in Machine Learning by Nandini
• 5,480 points
768 views

1 answer to this question.

0 votes

If I understand you correctly, you're looking for the following equation:

The overall "weight" of a dice with N sides is (N/2)*(n+1).

1 The total "weight" for 6 sides is (6/2)*(6+1) = 3*7 = 21.

The calculation is then straightforward.

1 -> 6 / 21 = 0.28571428571 
2 -> 5 / 21 = 0.23809523809
3 -> 4 / 21 = 0.19047619047 
4 -> 3 / 21 = 0.14285714285 
5 -> 2 / 21 = 0.09523809523 
6 -> 1 / 21 = 0.04761904761

6/21 is obviously 6 times the size of 1/21, therefore that part is correct. Finally, here's the bottom line:

0.28571428571         6/21 
+ 0.23809523809      +5/21
+ 0.19047619047      +4/21 
+ 0.14285714285      +3/21 
+ 0.09523809523      +2/21 
+ 0.04761904761      +1/21 

--------------- -----
0.99999999996        21/21

In any case, the left side is close to 100 percent. Being what it is, rounding is inevitable. The right side demonstrates that this is a rounding issue rather than an error.

*This equation (and its variation (N/2)*(N-1)) are quite useful. It's a shortened version of 1+2+3+4+5+6...

answered Mar 17, 2022 by Dev
• 6,000 points

Related Questions In Machine Learning

0 votes
1 answer
0 votes
0 answers
+1 vote
1 answer

not able to see all columns and rows of a pandas DataFrame?

Hi@akhtar, Your data set contains lots of rows ...READ MORE

answered Apr 8, 2020 in Machine Learning by MD
• 95,460 points
5,500 views
0 votes
1 answer

Understanding the probability of a double-six if i roll two dice

The chance of not getting a double ...READ MORE

answered Mar 23, 2022 in Machine Learning by Nandini
• 5,480 points
20,374 views
0 votes
1 answer

Probability: the one true fish

What you're looking for is P(A|B), which ...READ MORE

answered Mar 25, 2022 in Machine Learning by Dev
• 6,000 points
515 views
0 votes
1 answer

Calculate the probability in R for sum of two dice rolls

By converting the outer values to a ...READ MORE

answered Apr 4, 2022 in Machine Learning by Nandini
• 5,480 points
2,081 views
0 votes
1 answer

Help with Probability Equation

The likelihood of winning is equal to ...READ MORE

answered Apr 7, 2022 in Machine Learning by Nandini
• 5,480 points
1,005 views
0 votes
1 answer
0 votes
1 answer

Is P(A, B) probability equal to P(A intersection B)?

They both signify the same thing; the ...READ MORE

answered Mar 15, 2022 in Machine Learning by Dev
• 6,000 points
2,197 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP