|
Post by derv on Aug 17, 2013 11:01:47 GMT -6
Seriously, too much time has passed since I've used these skills. I know there are a number on these boards that can unwrap this formula for me in a way I can understand. I realize this is most likely Probability 101, but I could really use someone breaking this down for me. All attempts on the internet have failed to make it any clearer.
The following formula should give the probability for rolling a certain face value on a d6 a certain number of times or greater. It could be used with other dice as well, the fraction values would just have to be changed accordingly. I am not looking for combined totals, just face values.
[(1/6)^i * (5/6)^(d-i)] * [ d! / (i! * (d-i)!) ]
d= total # of d6 i=sum of dice face value sought
I may be misinterpreting the symbology in the formula. Where I run into trouble is with (d-i). If both of these values are the same it seems to result in zero, which in turn causes the results to end in zero (which I know is not correct). I understand that whenever a number is to the zero power it equals 1, but when you are multiplying or dividing by zero the result would be zero.
So, as an example, if I'm rolling five d6, how probable would it be to roll five 6's? According to the formula, this would look like this: [(1/6)^5*(5/6)^(5-5)]*[5/ (5*(5-5)]= ?
Any help would be appreciated.
|
|
18 Spears
BANNED
Yeah ... Spear This Ya' Freak!
Posts: 251
|
Post by 18 Spears on Aug 17, 2013 11:10:17 GMT -6
|
|
Azafuse
Level 5 Thaumaturgist
Posts: 245
|
Post by Azafuse on Aug 17, 2013 11:18:18 GMT -6
Simple answer: a number n followed by the symbol ! is a factorial (aka "the product of all positive integers less than or equal to n"). If you have 3!, the final result will be 3!=3*2*1=6. By convention 0!=1, and this is the problem's solution (everything else should be pretty clear in the link above).
|
|
|
Post by derv on Aug 17, 2013 16:44:06 GMT -6
18 Spears, thanks for the link. Unfortunately, the program does not seem to do what I'm looking for. This is the common problem when looking at formulas for probabilities- most give probabilities for dice totals and not face values. I'm looking for a solution in determining how many times an actual 6 will appear, not dice totals that add up to six. Also, what I really want to do is physically check the math myself without running it through a program.
Azafuse, thank you very much for the clarification. I definately was missing the factorial symbol and its function when doing the math. That really helped clarify things a bit.
Now to see if I can work out the solution correctly.
If anyone else has some input into this problem I'd be happy to hear it.
|
|
|
Post by mgtremaine on Aug 17, 2013 17:30:51 GMT -6
So, as an example, if I'm rolling five d6, how probable would it be to roll five 6's? According to the formula, this would look like this: [(1/6)^5*(5/6)^(5-5)]*[5/ (5*(5-5)]= ? The formula you have is used for to find probability for the number of faces less then the total number of rolls. The normal probably of 1 die = 5 is 1/6 like you said then 2 dice both showing 5 is 1/6 * 1/6 = 1/36 Your question is how probable is it to roll 5 dice and have them come up all 5 is just 6 ^ 5 or 1/7776 Does that help? If you want to know the odds of 4 of 5 dice showing 5 then you apply the formula above -Mike
|
|
|
Post by derv on Aug 17, 2013 18:06:22 GMT -6
Thanks Mike. It was really the factorial function and my ignorance of it that was tripping me up. The example I gave was simply to show (d-i)as the same numbers. In my mind 5-5= 0 and everything multplied against it also equaled zero. In reality, the formula called for (5-5)! which equals 1. I was not applying the factorial symbol and this caused the formula to break down. But thanks for the simple formula for finding probability on the exact number of dice. As you stated, this formula is handy in determining the likelihood of rolling a certain dice face value less then the total number of dice rolled.
|
|
|
Post by krusader74 on Aug 17, 2013 22:02:25 GMT -6
Let's say you roll 5 six-sided dice and you want to know the probability that you get exactly x of the dice with spots of one specific type. This is called the Binomial distribution with parameters-- - number of trials: n = 5
- success probability in each trial: p = 1/6
You can easily compute this distribution in WolframAlpha using the formula prob x for x binomial with n=5 and p=1/6Everything you want should be shown there... - This will show you the statistical properties (mean, standard deviation and higher moments).
- It will show you the formula using conventional math notation.
- It will show you a plot of the probabilities for x = 0 through 5.
- It can show you a table of probabilities for x-- Under the section labelled "Plots of PDF" click the button that says "Show table of values" and then click the "More" button to see x = 0 through 5.
Furthermore, you can experiment by changing the parameters. For example, you want to roll 3 twenty-siders and see the likelihood of getting 0 through 3 dice showing one specific type of spots? Just change n to 3 and p to 1/20 in the formula above. For a thorough discussion of the Binomial distribution, I suggest Wikipedia-- en.wikipedia.org/wiki/Binomial_distributionIf you want to know how the formula was derived, here's a crash course...First use the "Multiplication Rule for Dependent Events" to get the probability that the first x of n dice show the desired number of spots and the rest don't: P(A and B) = P(A) * P(B|A)where - P(A) = (1/6)^x = probability of first rolling exactly x six-sided dice showing the given type of spots
- P(B|A) = (1 - 1/6)^(n-x) = probability of then rolling exactly (n-x) six-sided dice, *not* showing the given type of spots
Since we don't really care whether the x dice showing the given type of spots are the first x dice, the last x, or jumbled up any which way, we need to apply the "Addition Rule": If the events A and B are mutually exclusive, then P(A or B) = P(A) + P(B). The notation (n choose x) refers to the binomial coefficient-- the number of ways to choose x things out of n things. (What you've written above is the factorial form.) Since repeated addition is just multiplication, we simply multiply the previous formula by this binomial coefficient in order to get the desired probability: P(X=x) is (1/6)^x * (1 - 1/6)^(n-x) * (n choose x)where X ~ binomial with p = 1/6 and n given
|
|
|
Post by derv on Aug 18, 2013 9:41:34 GMT -6
Thanks for everyones help. Just for clarification, this was the table I was trying to varify with the formula. The math seems to hold up.
……………….#of Individual Face Values -> 1 2 3 4 5 6 7 8 9 10 #of d6 1.…….. 16.67% 2.………27.78% 2.78% 3.…….. 34.72% 6.94% 0.46% 4.…….. 38.58% 11.57% 1.54% 0.08% 5.…….. 40.19% 16.08% 3.22% 0.32% 0.01% 6.…….. 40.19% 20.09% 5.36% 0.80% 0.06% 0.00% 7.…….. 39.07% 23.44% 7.81% 1.56% 0.19% 0.01% 0.00% 8.…….. 37.21% 26.05% 10.42% 2.60% 0.42% 0.04% 0.00% 0.00% 9.…….. 34.89% 27.91% 13.02% 3.91% 0.78% 0.10% 0.01% 0.00% 0.00% 10.…… 32.30% 29.07% 15.50% 5.43% 1.30% 0.22% 0.02% 0.00% 0.00% 0.00%
This table gives the probability of rolling exactly the number of face values on a certain # of dice (in my case I wanted to know the prob. to the face value of 6). If you want to know the probability of rolling the exact number or greater, you would add the percentages across the row. If you want to know the probability for not rolling the face value on the dice, you tally the percentages across the row and subtract from 100%. If anyone see's a flaw in these calculations, let me know.
|
|
|
Post by krusader74 on Aug 19, 2013 20:54:52 GMT -6
If it's any reassurance, I got the same values as you, modeling the problem as a binomial distribution, as explained above.
Table 1. Probability of rolling exactly the number of face values on a certain # of dice. .......#of Individual Face Values #of d6 0 1 2 3 4 5 6 7 8 9 10 1 0.833333 0.166667 0. 0. 0. 0. 0. 0. 0. 0. 0. 2 0.694444 0.277778 0.0277778 0. 0. 0. 0. 0. 0. 0. 0. 3 0.578704 0.347222 0.0694444 0.00462963 0. 0. 0. 0. 0. 0. 0. 4 0.482253 0.385802 0.115741 0.0154321 0.000771605 0. 0. 0. 0. 0. 0. 5 0.401878 0.401878 0.160751 0.0321502 0.00321502 0.000128601 0. 0. 0. 0. 0. 6 0.334898 0.401878 0.200939 0.0535837 0.00803755 0.000643004 0.0000214335 0. 0. 0. 0. 7 0.279082 0.390714 0.234429 0.0781429 0.0156286 0.00187543 0.000125029 3.57225*10^-6 0. 0. 0. 8 0.232568 0.372109 0.260476 0.10419 0.0260476 0.00416762 0.000416762 0.000023815 5.95374*10^-7 0. 0. 9 0.193807 0.348852 0.279082 0.130238 0.0390714 0.00781429 0.0010419 0.0000893061 4.46531*10^-6 9.9229*10^-8 0. 10 0.161506 0.323011 0.29071 0.155045 0.0542659 0.0130238 0.00217064 0.000248073 0.0000186054 8.26909*10^-7 1.65382*10^-8
I've included a new column for 0. Row probabilities should sum to 1. This table was generated with the following Mathematica code: TableForm[Table[(Probability[x==#2, x\[Distributed]BinomialDistribution[#1,1/6]])&[i,j]//N,{i,10},{j,0,10}], TableHeadings-> {Range[10], Range[0,10]}]
Simply by changing "==" to ">=" in this code, you can compute the probability of rolling the exact number or greater...
Table 2. Probability of rolling the number of face values or greater on a certain # of dice. .......#of Individual Face Values #of d6 0 1 2 3 4 5 6 7 8 9 10 1 1. 0.166667 0. 0. 0. 0. 0. 0. 0. 0. 0. 2 1. 0.305556 0.0277778 0. 0. 0. 0. 0. 0. 0. 0. 3 1. 0.421296 0.0740741 0.00462963 0. 0. 0. 0. 0. 0. 0. 4 1. 0.517747 0.131944 0.0162037 0.000771605 0. 0. 0. 0. 0. 0. 5 1. 0.598122 0.196245 0.0354938 0.00334362 0.000128601 0. 0. 0. 0. 0. 6 1. 0.665102 0.263224 0.0622857 0.00870199 0.000664438 0.0000214335 0. 0. 0. 0. 7 1. 0.720918 0.330204 0.0957755 0.0176326 0.00200403 0.000128601 3.57225*10^-6 0. 0. 0. 8 1. 0.767432 0.395323 0.134847 0.0306564 0.00460879 0.000441172 0.0000244103 5.95374*10^-7 0. 0. 9 1. 0.806193 0.457341 0.17826 0.0480215 0.00895006 0.00113578 0.0000938707 4.56454*10^-6 9.9229*10^-8 0. 10 1. 0.838494 0.515483 0.224773 0.0697278 0.015462 0.00243816 0.000267521 0.0000194489 8.43447*10^-7 1.65382*10^-8
|
|
|
Post by derv on Aug 21, 2013 19:12:06 GMT -6
thanks for checking it over krusader74.
|
|
|
Post by Ynas Midgard on Aug 22, 2013 4:47:20 GMT -6
I use anydice.com for hard and fast probability checks. In this case, the input should look like this:
output [count {F} in XdY]
|
|