Results 1 to 30 of 30

20100221, 07:19 PM (ISO 8601)
 Join Date
 Oct 2007
 Location
 Chicago, IL
 Gender
[Math] Calculating Dice for Success Tests
Assuming the following
S = total number of successes needed
d = total number of dice rolled
P(success on a die roll) = 0.33
How would you calculate the number of dice you need to roll to roll S successes with probabilistic certainty (e.g. P(S)=1)?
Or what is a good rule of thumb? Though I would like the general answer as well, if possibleLead Designer for Oracle Hunter GamesToday a Blog, Tomorrow a Business!
~ Awesome Avatar by the phantastic Phase ~Spoiler
Elflad

20100221, 07:36 PM (ISO 8601)
 Join Date
 Jul 2007
 Location
 United States
 Gender
Re: [Math] Calculating Dice for Success Tests
The following assumes you are performing d binary simulations with probabilities P(True)=1/3 and P(False)=2/3 and attempting to calculate the probability of generating s "True" outcomes.
e.g.: You have some 3sided dice. You roll d of these dice. You will calculate the probability of s 3s being rolled.
P(s  d)* = (1/3)^{ds}(2/3)^{s}_{d}C_{s}
*read: Probability of s successes given d rolls.
That, however, is not exactly what you seek. To calculate the probability of rolling at least s successes, you need to add the probabilities of rolling any given number of successes equal to or greater than s. You can either add the probability of all these outcomes together, or add all the probabilities of rolling less than s successes together and subtract from 1.
I'm trying to think of how a formula might be generated for this...
[EDIT]: Wait, I don't think this is even close to what you seek. Rereading your post, you want to know how many dice you need roll at P(Success on a single die)=X so that P(Success on at least one die)=1. To find this:
P(Success on at least one die) = 1  P(Failure on all dice) = 1  (1X)^{d}
if P(Success on at least one die) = 1
then P(Failure on all dice) = 0
then 0 = (1X)^{d}
then Log_{(1X)}(0) = d
Basic familiarity with logarithms will inform you that no solution for the variable d exists, because logarithms are undefined** when evaluated at numbers less than or equal to 0.
** Specifically, the limit approaches inf from the right, and IIRC negative arguments produce imaginary outputs.
[EDIT2]: More practically, you could calculate your "break even" point fairly easily. i.e.: P(Success) = .5
if P(Success) = .5
then P(Failure) = .5
then .5 = (1X)^{d}
then Log_{(1X)}(.5) = d
Specifically, in the case of X = .33:
d = 1.7095
And thus, you need to roll at least 2 dice to have a 50% or better chance at success.Last edited by AlterForm; 20100221 at 07:47 PM.

20100221, 07:48 PM (ISO 8601)
 Join Date
 Oct 2007
 Location
 Chicago, IL
 Gender
Re: [Math] Calculating Dice for Success Tests
Whups, I was looking more for "if I need at least 3 successes, how many dice should I roll?"
Lead Designer for Oracle Hunter GamesToday a Blog, Tomorrow a Business!
~ Awesome Avatar by the phantastic Phase ~Spoiler
Elflad

20100221, 07:48 PM (ISO 8601)
 Join Date
 Jul 2007
Re: [Math] Calculating Dice for Success Tests
Well, you'll never have P(at least S successes in d rolls) = 1 with a finite value for d and a positive S. What you're describing is essentially a negative binomial random variable, where for some integer k > 1 the result is the number of independent and identical Bernoulli trials (dice rolls, in this case) it takes to get the k'th success.
The probability of it taking y rolls to get k successes, where p is the probability of any given roll being a success is
P(y) = (y1)!/((k1)!(kr)!)*p^k*(1p)^(yk)
and the expected result (basically the average number or rolls to get k successes) = k/p
I'm writing this mostly from memory and with only a bit of checking, so since I'm not a statistician I could easily have screwed the above up.Last edited by ApatheticDespot; 20100221 at 07:50 PM.
You have been warned.

20100221, 07:50 PM (ISO 8601)
 Join Date
 Jun 2005
 Location
 Zagreb
Re: [Math] Calculating Dice for Success Tests
To get one success you need on average 3 dice. You are much safer with 4 per hit. Shadowrun 4th edition uses a mechanic like that where you have Xd6, and count the number of times you got 5 or 6. It is advised that you can buy successes at a rate of 4 to 1.
Though there have been a couple of times where I threw 12 dice and got only 1 hit so its not a certain thing.
To calculate near certainty use this formula. This is to get one and only one success.
P(1)=1  (2/3)^n, where n is the number of dice you roll. From there you figure out n, depending on how sure you want to be.Last edited by Tehnar; 20100221 at 07:53 PM.

20100221, 07:52 PM (ISO 8601)
 Join Date
 Dec 2006
 Location
 London, England.
Re: [Math] Calculating Dice for Success Tests
I might have missed the point, but isn't this an unanswerable question? The probability of getting at least n successes is never going to be 1 in a WoD style success system.
What you can calculate instead is a threshold; if you know what you would consider to be an acceptably high probability of success (90%, say), then you can calculate how many dice you need to roll to reach that point.Last edited by Saph; 20100221 at 07:55 PM.
I'm the author of the Alex Verus series of urban fantasy novels. Fated is the first, and the final book in the series, Risen, is out as of December 2021. For updates, check my blog!

20100221, 07:53 PM (ISO 8601)
 Join Date
 Nov 2008
 Location
 Bristol, UK
Re: [Math] Calculating Dice for Success Tests
That's just "how many dice should I roll before I can expect three successes".
It's a binomial distribution, so your expected number of successes equals (number of dice) x (probability of success). I'm not sure if that's exactly what you want, however.
It's pretty normal to assume something's up if the probability of your result (given that nothing is up) is less than 5%. I don't think there's a quick and easy way to deal with cumulative binomial distributions.
Note that Shadowrun has a 1 in 3 probability of success  in NWoD, you expect 1/3rd of a success per dice rolled, even though the probability is only 30%.Last edited by lesser_minion; 20100221 at 08:06 PM.

20100221, 08:02 PM (ISO 8601)
 Join Date
 Apr 2005
 Location
 Copenhagen, DK
 Gender
Re: [Math] Calculating Dice for Success Tests
You're never going to be 100% certain of rolling those three succeses no matter how many dice you roll. You have to specify an acceptable margin of failure.

20100221, 08:05 PM (ISO 8601)
 Join Date
 Oct 2007
 Location
 Chicago, IL
 Gender
Re: [Math] Calculating Dice for Success Tests
Lead Designer for Oracle Hunter GamesToday a Blog, Tomorrow a Business!
~ Awesome Avatar by the phantastic Phase ~Spoiler
Elflad

20100221, 08:11 PM (ISO 8601)
 Join Date
 Mar 2007
 Location
 Reykjavík, Iceland
 Gender
Re: [Math] Calculating Dice for Success Tests
A good rule of thumb is: If you have a oneinN chance of success per die rolled, then you should be rolling at least N dice per success required. I'm not sure how accurate this is, I'll leave the exact mathematics to others.

20100221, 08:12 PM (ISO 8601)
 Join Date
 Feb 2005
Re: [Math] Calculating Dice for Success Tests
I've done quite a bit of math with WoD types.
What you actually have there is an expected value of number of successes per roll (Not the chance of a success on a roll. That is always 0.3  the explosion isn't counted). In otherwords, you can construct the equation:
E(S/R)=1/3 [Works out exactly]
So if you want 9 Rolls:
E(9S/R) = 9E(S/R) = 9*0.33 = 3
So, if you roll 9 rolls you are Expected to get 3 successes.
From this, you can easily construct the equation: D/3=S or 3S = D.
That is: If you want S successes, you need at least Three times S in dice to regularly achieve it.
Spoiler
Code:Proof: E(S/R) = 0*(7/10) + 1 * 2/10 + 1/10*(1+E(S/R)) E(S/R) = 2/10+1/10+1/10 * E(S/R) 9/10 E(S/R) = 3/10 9 E(S/R) = 3 E(S/R) = 3 / 9 = 1/3.
EDIT:
Oops, I think the P = E in this particular case, and I'm wrong. Doesn't matter.
What you essentially have is X Trials with Y success and XY Failures > This is a binomial.
So, if you have D dice, and S successes, without accounting for the explosion you have a PDF of the form:
P(S) = D Choose S * (P(S/Roll))^S * (1P(S/Roll))^(DS)
P(S) = D!/(S!*(DS)!) * (P(S/Roll))^S * (1P(S/Roll))^(DS)
And you want to solve for D.
The Math for that sucks, so I'll leave it as an exercise for you :PLast edited by Gralamin; 20100221 at 08:20 PM.

20100221, 08:12 PM (ISO 8601)
 Join Date
 Nov 2008
 Location
 Bristol, UK
Re: [Math] Calculating Dice for Success Tests
OK, well, you need to know how to calculate a binomial coefficient:
(n r)^{T} = n!/(r!(nr)!)
Then, where S is the actual number of successes rolled, s is the desired number, and d is the number of dice:
P(S=s) = (d s)^{T}(1/3)^{s}(2/3)^{(ds)}
Unfortunately, I don't think there's a shortcut (if you're not happy just knowing the mean number of successes) to working out when the probability of not getting enough successes is less than five percent.
By the way, the (n r)^{T} means that the 'n' is supposed to be directly above the 'r' but I couldn't quite write it that way.Last edited by lesser_minion; 20100221 at 08:20 PM.

20100221, 08:16 PM (ISO 8601)
 Join Date
 Mar 2007
 Location
 Santa Monica, CA, US
 Gender
Re: [Math] Calculating Dice for Success Tests
Something missing from all of this:
What is your target number? Exalted style (7)? WoD style (variable)? If WoD, what target are you aiming for?Avatar by Alarra

20100221, 08:18 PM (ISO 8601)
 Join Date
 Nov 2008
 Location
 Bristol, UK

20100221, 08:18 PM (ISO 8601)
 Join Date
 Apr 2005
 Gender
Re: [Math] Calculating Dice for Success Tests
To do it much less mathematically–in Exalted, with target number 7 and 10's counting for two, you will get approximately one success for every two dice you roll, on average. I'm not sure exactly how this ports over into WoD, but I can probably come up with something if you tell me the mechanics.
I no longer actively read the forums, and probably won't respond to any PMs. I'm fine with people using my homebrew in anything, including fancompilations and wikis, as long as you credit me.
Homebrew by The Demented One.

20100221, 08:20 PM (ISO 8601)
 Join Date
 Apr 2005
 Location
 Copenhagen, DK
 Gender

20100221, 08:25 PM (ISO 8601)
 Join Date
 Feb 2005
Re: [Math] Calculating Dice for Success Tests
I don't think you do need a Cumulative distribution.
CDF is defined as rolling P(x <= X). Reliability is defined as rolling P(x > X). I imagine you don't want to roll LESS successes, so you may actually want the Reliability.
Reliability is 1CDF.
Edit: Found it
Code:R(x) = \sum_{floor(x) +1}^n n choose k p^k (1p)^(nk)
Last edited by Gralamin; 20100221 at 08:29 PM.

20100221, 08:33 PM (ISO 8601)
 Join Date
 Nov 2008
 Location
 Bristol, UK
Re: [Math] Calculating Dice for Success Tests
Yes, that's why I wrote P(S=s) as opposed to P(S<=s).
According to Google, you can start using the normal distribution once you have fifteen or more dice, at which point you can start pulling answers from tables.
The number you'll need to look up is usually called z, and given by:
z = (3s  d)/sqrt(2d)
You need P(Z <= zZ ~ N(0,1)) to be 0.05 or less.
I don't think you do need a Cumulative distribution.
CDF is defined as rolling P(x <= X). Reliability is defined as rolling P(x > X). I imagine you don't want to roll LESS successes, so you may actually want the Reliability.Last edited by lesser_minion; 20100221 at 08:37 PM.

20100221, 08:35 PM (ISO 8601)
 Join Date
 Oct 2007
 Location
 Chicago, IL
 Gender
Re: [Math] Calculating Dice for Success Tests
More information (I guess?)
 A success is a 56 on a d6 (so, 0.33 chance of a success)
 If I could do the math for the probability calculation, I wouldn't have asked
Still, I guess the (intuitive) 3*S calculation must be accurate.
The main reason I'm asking is because, in a game of Bliss Stage, two of my Players (a Chemist and a Programmer) were capable of rolling highly efficiently; they were able to get just enough Successes to pass everything but didn't have so many extra dice around that they took a lot of "damage."
When I asked how the devil they were doing that, they said that you can calculate the number of dice you need in advance. I refuse to believe that they just had an exceptionally strong case of Good Luck, and if there is SCIENCE behind it, I must know!Lead Designer for Oracle Hunter GamesToday a Blog, Tomorrow a Business!
~ Awesome Avatar by the phantastic Phase ~Spoiler
Elflad

20100221, 08:36 PM (ISO 8601)
 Join Date
 May 2009
Re: [Math] Calculating Dice for Success Tests
I'm actually taking Data Management in High School right now just so I know how to do these types of thing.
Of course, half the class is stuff I already know, so it is really really really boring, but sacrifices must be made.

20100221, 08:42 PM (ISO 8601)
 Join Date
 Nov 2008
 Location
 Bristol, UK
Re: [Math] Calculating Dice for Success Tests
I suspect that they were mostly just using expected results  in this case, you should have a betterthaneven chance of doing at least as well as expected (I think  I don't really want to work out the proof).
It's the only piece of maths here that can be done in seconds, unless they bring a few databooks to the table.
Well, we explained how to do it. Nobody does all of this by hand any more  it's just stuff that might have to be translated and put onto a spreadsheet.Last edited by lesser_minion; 20100221 at 08:56 PM.

20100221, 08:53 PM (ISO 8601)
 Join Date
 Jan 2008
 Location
 Within my own Insanity
 Gender
Re: [Math] Calculating Dice for Success Tests
I once drew up a table. Technically it was a table to determine the statistical probability of "2pair" occuring in a hand of cards. It took about an hour and a half of just cranking numbers.
It occurs to me that a similar thing could be done ahead of time. If you knew, in your head, how many dice you would have to roll to achieve a 95% success ratio, you could easily decide to roll that many dice any time a challenge came up, given that you could choose any number of dice to roll.
It just requires a lot of work in advance, and then memorizing a table.But... but... You can't Wake Up Dead
Amazing waffle avatar crafted by the talented hands of MoriHikari.
The Demented One's fix of White Raven Tactics and Iron Heart Surge.
A well played paladin is a valuable asset to a party, and a beautiful roleplaying opportunity.

20100221, 08:57 PM (ISO 8601)
 Join Date
 Oct 2007
 Location
 Chicago, IL
 Gender
Re: [Math] Calculating Dice for Success Tests
Lead Designer for Oracle Hunter GamesToday a Blog, Tomorrow a Business!
~ Awesome Avatar by the phantastic Phase ~Spoiler
Elflad

20100221, 08:58 PM (ISO 8601)
 Join Date
 Nov 2008
 Location
 Bristol, UK

20100221, 09:07 PM (ISO 8601)
 Join Date
 Mar 2007
 Location
 Santa Monica, CA, US
 Gender
Re: [Math] Calculating Dice for Success Tests
So, out of x dice of 6 sides, you want to know how many can be kept in order to make it average  preferring just above  at the target value?
3d6 to 1 will actually provide /just/ under the target. And I would suspect that is what they are using.
4d6 to 1, then +3d6 for each 1 above that per 7 total, resetting, so:
4d6 : 1 Success (4d6)
7d6 : 2 Success (3d6)
10d6 : 3 Success (3d6)
13d6 : 4 Success (3d6)
16d6 : 5 Success (3d6)
19d6 : 6 Success (3d6)
22d6 : 7 Success (3d6)
26d6 : 8 Success (4d6)
29d6 : 9 Success (3d6)
etc.
Should work. It holds til you get upwards of 64 Success. At which point you need to add another (3d6) in there. I don't think you will need much higher than that...
edit: calculated using a gaussian summation formula, taking the average for a targeted "keep" amount of dice, and then summed together to try to target a single "5" (or higher) per, preferring to er on the side of "just over" than "just under"
edit2:
Made a quick script for you to play with:
http://pifro.com/tempmove/targetthis...des=6&Target=5
The Dice is the number of dice you a rolling. Sides is sides of the dice (d6), and target is target number for a success.
It throws 1000 random sequences of dice between 1 and Sides and spits out the average number of success.
Though, this appears to be showing my calculations to be a bit high. Huh.Last edited by Reinboom; 20100221 at 09:36 PM.
Avatar by Alarra

20100221, 09:49 PM (ISO 8601)
 Join Date
 Nov 2006
Re: [Math] Calculating Dice for Success Tests
The inaccurate (especially at low numbers of rolls, such as in this problem) is to hit it with the central limit theorem.
We have coin with a 1/3 chance of landing on +1, and a 2/3 chance of landing on +0.
Estimate how many coins it takes to have a 97.5% chance of getting a 3 or higher.
E( n C ) = n/3 (exact)
V( n C ) = n V( C ) =~ n 2/9 (central limit theorem, horribly abused)
SD( n C ) = sqrt V( n C ) = ~sqrt(n) sqrt(2)/3
2 SD( n C ) =~ 95% confidence radius. (is really ~1.96, but 2 is easier).
E( n C )  2 SD( n C ) =~ n/3  2 sqrt(n) sqrt(2)/3 (which is the lower bound of the 95% confidence interval)
Solving for 3:
3 = n/3  2 sqrt(n) sqrt(2)/3
9 = n  sqrt(n) sqrt(8)
Let x := sqrt(n)
x^2  sqrt(8) x  9 = 0
Candidates for x are [ sqrt(8) +/ sqrt( 8 + 36 ) ] / 2
= sqrt(2) +/sqrt(11)
negative x is nonphysical I suspect
= sqrt(2) + sqrt(11)
x = 4.7308383527284948979166214608804
as x = sqrt(n), n = 22.38
So if you roll 23 dice with a 1/3 chance of success, you'd expect a 97.5% chance to get at least 3 successes.
Hmm I think I made an algebra mistake.
With 2/3 failure chance and 23 dice...
P(0 successes) = (2/3)^23
P(1 success) = 3^23 * 2^22 * 23
P(2 success) = 3^23 * 2^21 * 23*22/2
P(0+1+2 success) = 635437056/3^23
So, using exact mathematics, we get a 99.3% chance that 23 dice get at least 3 successes.
I probably missed an order of magnitude somewhere. What if the negative x isn't nonphysical? Then we get 4 dice being enough, which doesn't seem reasonable.
Oh well. Anyone care to find my error?

20100221, 09:54 PM (ISO 8601)
 Join Date
 Mar 2007
 Location
 Santa Monica, CA, US
 Gender
Re: [Math] Calculating Dice for Success Tests
Well, just looking at the concept of your math  there is the additional issue that "they were able to get just enough Successes to pass everything but didn't have so many extra dice around that they took a lot of "damage.""
Was mentioned. Which I took as meaning that just getting the chance isn't enough. You must get the chance without risking going very far over.Avatar by Alarra

20100221, 10:35 PM (ISO 8601)
 Join Date
 Feb 2005

20100222, 01:59 AM (ISO 8601)
 Join Date
 Mar 2008
 Gender
Re: [Math] Calculating Dice for Success Tests
R is a free statistical computing package that I believe can calculate this for us. I use it sometimes at grad school when the professor prefers it to MATLAB. I'm not superfamiliar with it, and I'm a noob with programming anything, so I might screw up, but I think it works out...
> s=3
>
> k < seq(0, 50, by = 1)
>
> x=qbinom(0.05,k,1/3)
>
> which(x==s)
[1] 18 19 20 21
So according to my shoddy R programming you'd need 18 trials where p(success)=1/3 to have a 95% chance of getting 3 or more successes. Let's sanity check this with s=1000.
> s=1000
>
> k < seq(0, 5000, by = 1)
>
> x=qbinom(0.05,k,1/3)
>
> which(x==s)
[1] 3130 3131 3132
A little above 3*s seems right as we converge toCentral Limit Theoremprobability limit, pardon my edit.
Here's s=5 and s=10 for fun:
[1] 26 27 28 29 (so 26 rolls for 5 successes)
[1] 45 46 47 48 (45 rolls for 10 successes)
Hope this helped!Last edited by GoodbyeSoberDay; 20100222 at 02:12 AM.
Originally Posted by The Giant

20100222, 11:00 AM (ISO 8601)
 Join Date
 Oct 2007
 Location
 Chicago, IL
 Gender
Re: [Math] Calculating Dice for Success Tests
Lead Designer for Oracle Hunter GamesToday a Blog, Tomorrow a Business!
~ Awesome Avatar by the phantastic Phase ~Spoiler
Elflad