Spatzimaus
First Post
radferth said:This problem does not call for iterations. It is a discrete probability question with a discrete answer. Borlon is right for the probablity that it will take x number of rolls for a 1 to come up (for d20 5% for one roll, 5(100-5)% for two rolls, etc.). If one takes this all the way out, you end up with the median number of rolls needed to get a 1 and just a bit over half the number of sides on the die. This means that for the d20-d12-d10-d8 method, the average would be a bit over 25.
No. That's the mistake we were making earlier, you CAN'T simply add up the medians for each discrete die and call that the total median, because when you're adding the dice together, the distance FROM the median starts becoming important when determining the new distribution. The dice can't be considered separately. If they were nice, linear distributions (like a d6 roll) then sure, you could add them, but they're skewed distributions instead. If I go through four stages, I should expect my "median" case to be where two are below the average, and two are above the average. However, the ones above the average will be further from the mean than the ones below, so the median SUM will be higher than simply the sum of the medians.
I teach this sort of thing to college students, so I'm kicking myself that I didn't catch this mistake the first time.
---------------
I ran more numbers, and found the mistake that was causing babomb and I to differ. I had accidentally capped the rolls at around 30-40 per die, so it was ruling out the combinations that had one really long streak. I upped the limit to 100 per die, and it started working fine (since I'm only breaking down probabilities for combinations of less than 100 total rolls).
Also, this isn't an "iteration" logic. It works like this:
Define N1 as the number of rolls it takes for die number one to hit a 1. Define N2, N3, etc. the same way.
Loop N1 from 1 to 100, N2 from 1 to 100, etc. in a series of nested loops
For each combination (N1,N2,N3,etc.), figure out the probability of that combination occurring. This is just the product of the individual probabilities we discussed earlier.
Prob[T] = Prob[T] + p(N1)*p(N2)*p(N3)... where T = N1+N2+N3... is the total number of rolls.
end loops
(If you want to be more elegant, replace the brute-force loops with a convolution of vectors containing the elements for each die. But it's the same effect.)
The result of this, Prob[X], is a probability profile showing the chances of ending at exactly X rolls. Now, to find out the chance of running out within the first Y charges, just sum Prob[0:Y].
Going d20-d12-d10-d8, I get the following:
Mean: 50
Median: 44.74
The lowest possible result, 4, happens 0.00521% of the time (1 in 20,000)
10 or less happens 0.7% of the time. (That is, you'll have the four 1s within the first 10 rolls.)
20 or less happens 8.0% of the time.
30 or less happens 23.3% of the time.
40 or less happens 41.7% of the time.
50 or less happens 58.5% of the time.
60 or less happens 71.9% of the time.
70 or less happens 81.6% of the time.
80 or less happens 88.3% of the time.
90 or less happens 92.6% of the time.
And you have about a 4.5% chance of making it past 100 uses.
This gives pretty much what you wanted, I think. You could add the d6, bringing the median to just over 50 (and more importantly reducing the chance of really-low-use wands), but I wouldn't add the d4. (and don't ask me to calculate it, each additional die increases the processor time needed by a factor of 100.) I'm running the numbers with the d6 added now, but it's taking a while.
Edit: Got the d6 numbers. Took a little under three hours to run, so there's no way I'm spending two weeks working out the d4 numbers.
10 or less now only happens 0.14%.
20 happens 3.6%.
30 happens 14.5%
40 happens 31.0%
50 happens 48.5%
60 happens 63.8%
70 happens 75.7%
80 happens 84.1%
90 happens 89.9%
and you have just under a 6% chance to make it past 100.
Median was 50.894. Mean was 56.
So actually, the 5-die progression ending with the d6 seems best to me; the mean's slightly higher than before, the median is right on 50, and the chances of a really short-duration wand go way down without drastically increasing the top end. Adding the d4 would be a bit much, IMO, pushing the median to 54ish and the mean to 60, but you COULD do it.
Last edited: