Quote:
Originally posted by Imperator Fyron:
I forget if you want to use permutations or combinations here... it will be one over one of the following formulae:
n is the total number of items, r is the number of those items you want.
Combination (order does not matter):
n! / [ ( n - r )! * r! ]
Permutation (order matters):
n! / (n - r)!
So for probability, you have either
[ ( n - r )! * r! ] / n!
or
(n - r)! / n!
Depending on which is the one you want.
|
These formulae work when r=1, but don't seem to work when r>1.
code:
[ ( 6 - 1 )! * 1! ] / 6!
[ 5! * 1 ] / 720
[ 120 * 1 ] / 720
120 / 720
1/6, or 16 1/6%
but,
code:
[ ( 6 - 5 }! * 5! ] / 6!
[ 1! * 120 ] / 720
120 / 720
1/6, or 16 1/6% (should be 83 1/3%)
Obviously, the odds that I will roll a 6 and the odds that I will roll less than 6 are not both 1/6 (at least on a standard d6
).
It's worse with the permutation formula:
code:
( 6 - 1 )! / 6!
5! / 720
120 / 720
1/6, or 16 1/6%
but,
code:
( 6 - 5 )! / 6!
1! / 720
1/720, or ~.1389%
Things are even more exciting when you factor in more dice, such as the odds to roll at least one six with five d6:
code:
[ ( 30 - 5 }! * 5! ] / 30!
[ 25! * 120 ] / 2.6525285981219105863630848e+32
[ 15,511,210,043,330,985,984,000,000 * 120 ] / 2.6525285981219105863630848e+32
1,861,345,205,199,718,318,080,000,000 / 2.6525285981219105863630848e+32
7.0172483965587413863275932241449e-6
.0000070172483965587413863275932241449, or ~.0007%
I'd have thought my chances of rolling a six would have been slightly better than that! That's pretty close to 1/6^4.
Offhand, I'd guess there's a problem with the denominator in this formula--could it be n!/r, which would make the formula:
code:
r [ ( n - r )! * r! ] / n!
5 [ ( 6 - 5 }! * 5! ] / 6!
5 [ 1! * 120 ] / 720
5 [ 120 ] / 720
600 / 720
5/6, or 83 1/3%
but, then again:
code:
3 [ ( 6 - 3 )! * 3! ] / 6!
3 [ 3! * 3! ] / 720
3 [ 6 * 6 ] / 720
3 * 36 / 720
108 / 720
3/20, or 15% (should be 50%)
Any insight here?
[ December 25, 2003, 16:48: Message edited by: Krsqk ]
__________________
The Unpronounceable Krsqk
"Well, sir, at the moment my left processor doesn't know what my right is doing." -
Freefall