PDA

View Full Version : Fun with Probability (and the CHR)


psychoadept
08-08-2009, 07:56 AM
This began as a reply to thingirl and Ariel in the "Don't you hate it when..." thread, but I decided that I should ramble endlessly about probabilities for my own amusement elsewhere. Feel free to ignore this, it's pretentious and self-indulgent. I just wanted to get the thought process down in writing.

Ariel managed to roll three 1s on the CHR, even though she was casting the stones three times each. The chances of this are 1/(6^9) or one in over 10 million.

The funny thing is that the chance of getting all 1s is the easiest probability to calculate under the circumstances, though the least likely occurrence. Since any roll other than a 1 botches the whole thing, you just multiply 1/6 by itself a number of times equal to the number of rolls being made. If you were only casting each stone once, it would be 1/(6^3) or 1/216. In the cases where you're casting the stones 4 times each, the probability of all 1s drops to 1/(6^12) or one in over 2 billion.

Now let's look at the probability of getting all 6s, which is the next most straightforward computation. Of course, if you're casting each stone once the probability of all 6s is the same as the probability of all 1s (or all of any number, for that matter), 1/216. For each reroll you add, you increase you chances of a 6 overall on each casting. It's NOT a linear increase, though (i.e. not 1/6 + 1/6 + 1/6...), because even if you rolled 6 times you couldn't guarantee that one of them would be a six.

If you have more than one roll and you roll a six on the first one the others don't matter. So that's a straight 1/6 chance right there. BUT there's a 5/6 chance that it's not a 6, in which case you go to the second roll, and have another 1/6 chance of getting a 6. So that's 1/6 + (5/6 x 1/6) or 1/6 + 5/36 = 11/36. That leaves a 25/36 chance that the second roll isn't a 6, in which case if you roll again you have ANOTHER 1/6 chance of getting a 6. For each roll you add {[1-(chance of 6 on all previous rolls)]*1/6} to the probability of getting a 6. This is the result:

2 Rolls: 6/36 + 5/36 = 11/36 = about 1/3
3 Rolls: 36/216 + 30/216 + 25/216 = 91/216 = a little less than 1/2
4 Rolls: 216/1296 + 180/1296 + 150/1296 + 125/1296 = 671/1296 = a little more than 1/2

(Ah, I see now that we're adding 5^(n-1)/6^n with each roll, where n is the number of rolls.)

That's just for each individual stone. To find the probability of getting 6 on all three of them, we have to multiply the probability of getting 6 on any one of them by itself 3 times. WHEE!

2 Rolls: 1331/46656 = about 1/35
3 Rolls: 753571/10077696 = about 1/13 (Note that Ariel's chance of rolling all 6s was SEVEN HUNDRED AND FIFTY THOUSAND times greater than her chance of rolling all 1s. Talk about beating the odds.)
4 Rolls: 302111711/2176782236 = about 1/7

<snip>

Okay, at this point I've got it hammered out enough that I could get the remaining numbers a lot faster than I got these, but it's 4am and I should sleep. If anybody actually cares, I can calculate the rest later.

-----

Edited again because I'm still missing something here. Regardless of the number of rerolls, the sum of the chances of all possible results must, by definition, be 1 (100%). When I started adding the chance I'd calculated for a 6, and a 5, and a 4 together I was getting numbers greater than 1.

Let's break it down. If you're looking for a final result of five, these are the possibilities:

One roll:
--Roll a 6. Go directly to jail. Do not pass Go. Do not collect $200. (1/6 chance)
--Roll a 5. (1/6 chance)
--Roll anything else. (4/6 chance)

Two rolls:
--Roll a 6. Go directly to jail. Do not pass Go. Do not collect $200. (11/36 chance)
--Roll two 5s. (1/36 chance) } Total chance of 5 is 9/36 = 1/4
--Roll one 5, one less. (8/36 chance) }
--First roll less, second roll less. (16/36 chance)

Three rolls:
--Roll a 6. Go directly to jail. Do not pass Go. Do not collect $200. (91/216)
--Roll three 5s. (1/216) }
--Roll two 5s, one less. (12/216) } 61/216
--Roll one 5, two less. (48/216) }
--All rolls less. (64/216)

Four rolls:
--Roll a 6. Go directly to jail. Do not pass Go. Do not collect $200. (671/1296)
--Roll four 5s. (1/1296) }
--Roll three 5s, one less. (16/1296) }
--Roll two 5s, two less. (96/1296) } 369/1269 = 41/141
--Roll one 5, three less. (256/1296) }
--All rolls less. (256/1296)

That's the raw numbers. But there's got to be some equation here, too...

To get a 5 you have to roll a 5 plus NOT roll a 6. Chance of rolling a 5 at all is... the same as the chance of rolling a 6 at all, as calculated above. It's a Venn Diagram situation. You might have a 5, you might have a 6, you might have both, you might have neither. Edited again: I'm making this too difficult. Rather than subtracting the number of rolls with a 5 and a 6 from the number of rolls with a 5, you can just calculate the number of rolls with a 5 that DON'T include a 6. That's 1/6 (for the 5) x 4/6 (the number of results on the second roll that aren't 5 or 6) x 2 (number of permutations, i.e. 5,6 vs 6,5) + 1/6 x 1/6 (chance of rolling two 5s, for which there is only one permutation). That's 8/36 + 1/36 = 9/36. There's got to be a way to simplify that into a single equation, but I haven't worked out how to predict the number of permutations yet, save for counting them the old fashioned way. With just four rolls that's possible, but if we were to continue indefinitely it would be tough.

To figure out the number of results on three rolls that have a 5 but not a 6... following the reasoning above, you'll start with 1/6 (the 5) x 4/6 (2nd roll) x 4/6 (3rd roll) x 3 (permutations). Then you'll have 1/6 (the 5) x 1/6 (another 5) x 4/6 (the 3rd roll) x 3 (permutations). Finally, there's 1/6 x 1/6 x 1/6 (all 5s). That's 48/216 + 12/216 + 1/216 = 61/216.

Next, we'll apply the same reasoning to four rolls. Let's get the case of all 5s out of the way, first. The chance of that is only 1/1296. Then we've got 1/6 x 4/6 x 4/6 x 4/6 x 4 + 1/6 x 1/6 x 4/6 x 4/6 x 6 + 1/6 x 1/6 x 1/6 x 4/6 x 4.

OOH. Oh, oh, oh! *jumps up and down* I see Pascal's Triangle emerging here. I KNEW there had to be a pattern. I'm not sure what it means, exactly, but there it is. Look at the number of permutations for each combination of 5s/not 5s. One roll: 1 permutation. Two rolls: 2, 1. Three rolls: 3, 3, 1. Four rolls: 4, 6, 4, 1. I bet you if we went to 5 rolls you could find different combinations of rolls with 5, 10, 10, 5, and 1 permutations (quick check: yep!) There's a ghost 1 in there somewhere... oh, the rolls WITHOUT a 5 would effectively only have 1 permutation. This could be useful...

Anyway, back to the math: if you add everything above together, you do indeed get 369/1296. I am now confident that I have enough information to do these calculations for any number of rolls. See equation below, yay!

thingirl
08-08-2009, 01:49 PM
I care :evil_grin:

psychoadept
08-08-2009, 06:36 PM
I care :evil_grin:

You asked for it! Although now I've got to sort out some confusion above, after all. There's a reason why I had to put all this in writing to keep track of it. I will fill this in as I get more of it worked out.

On one roll:
--Chance of any number is 1/6.

On two rolls:
--Chance of 6 is 11/36 (about 1/3)
--Chance of 5 is 9/36 (exactly 1/4)
--Chance of 4 is 7/36 (about 1/5)
--Chance of 3 is 5/36 (about 1/7)
--Chance of 2 is 3/36 (exactly 1/12)
--Chance of 1 is 1/36

On three rolls:
--Chance of 6 is 91/216 (about 1/2)
--Chance of 5 is 61/216 (between 1/3 and 1/4)
--Chance of 4 is 37/216 (about 1/6)
--Chance of 3 is 19/216 (about 1/11)
--Chance of 2 is 7/216 (about 1/31)
--Chance of 1 is 1/216

On four rolls:
--Chance of 6 is 671/1296 (about 1/2)
--Chance of 5 is 369/1269 (between 1/3 and 1/4)
--Chance of 4 is 175/1296 (between 1/7 and 1/8)
--Chance of 3 is 65/1296 (about 1/20)
--Chance of 2 is 15/1296 (about 1/86)
--Chance of 1 is 1/1296

To find the probability of getting any particular combination of stones, just multiply the probability of each individual stone by the others.

Elrond
08-08-2009, 09:20 PM
You're PROBABLY right ;) .

And it has been 18 years since my last probability equation. So, don't think I know what's wrong with the above calculation! But I figured that it was a 50/50 chance that there was a mistake in there! :)

psychoadept
08-08-2009, 09:36 PM
You're PROBABLY right ;) .

And it has been 18 years since my last probability equation. So, don't think I know what's wrong with the above calculation! But I figured that it was a 50/50 chance that there was a mistake in there! :)

*snort* ...and 63% of all statistics are made up on the spot.

Lightwielder
08-08-2009, 11:58 PM
*snort* ...and 63% of all statistics are made up on the spot.

I like that. Duly rep'ed

psychoadept
08-15-2009, 05:09 PM
I have an EQUATION! It involves summation and factorials, so it gets a little messy in application, but the equation itself is fairly simple.

the chance of getting a particular result on any ONE stone on the CHR is:

the summation taken from a=1 to a=n
where n = number of rolls
and x = desired result
of:

(1/6^n) {[(x-1)^(n-a)] (n!)/[a!(n-a)!]}

That's 1 over (6 to the n), times (x minus 1) to the (n minus a), times n-factorial over (a-factiorial times (n minus a) factorial). Roughly. Since 0! (zero-factorial) is 1 and anything to the zero power is also 1, when a = n, everything except the 6^n becomes 1. Thus, the formual applies even to just one roll, where n=1.

Oldschool
08-15-2009, 06:00 PM
I have an EQUATION! It involves summation and factorials, so it gets a little messy in application, but the equation itself is fairly simple.

the chance of getting a particular result on any ONE stone on the CHR is:

the summation taken from a=1 to a=n
where n = number of rolls
and x = desired result
of:

(1/6^n) {[(x-1)^(n-a)] (n!)/[a!(n-a)!]}

That's 1 over (6 to the n), times (x minus 1) to the (n minus a), times n-factorial over (a-factiorial times (n minus a) factorial). Roughly. Since 0! (zero-factorial) is 1 and anything to the zero power is also 1, when a = n, everything except the 6^n becomes 1. Thus, the formual applies even to just one roll, where n=1.

Simple :eek: ? That's a very subjective application of that term if there ever was one. ;)

psychoadept
08-16-2009, 06:08 AM
Simple :eek: ? That's a very subjective application of that term if there ever was one. ;)

Heh. You have a point. I guess by simple, I mean expressed almost exclusively in terms of the given variables and conforming to common mathematical patterns.

Also, credit where credit is due: I got the factorial bit of my equation from this page:

http://ptri1.tripod.com/

which I found after I realized that Pascal's triangle was involved somehow, and figured out purely by experiment and observation that the number you multiply each piece of the summation by just happens to correspond to the a element of the n row.

Sorry if it seems like I'm being a math snob or something. I just genuinely have fun thinking about these things.

thingirl
08-16-2009, 07:10 PM
And you make our brains hurt reading it.

Doolipalally
08-16-2009, 07:12 PM
I think it's a great effort, and one of these days when I have a moment I'll try and dust off my A-level maths skills and go through it.

thingirl
08-16-2009, 07:13 PM
I'm on lession 1 of algabra 1.

psychoadept
08-17-2009, 05:38 AM
I'm on lession 1 of algabra 1.

Ah, you're at the exciting stage of just starting to work with variables! This particular ponder is probably about an Algebra 2 level. You'll get there soon. :)

thingirl
08-17-2009, 01:23 PM
Shoot. I don't understand a word of what is said in the problems here.

psychoadept
08-18-2009, 05:48 AM
Shoot. I don't understand a word of what is said in the problems here.

I wouldn't feel too bad about that. It's mostly useless knowledge taking up space in my brain. It might be for you in 15 years, too.

thingirl
08-18-2009, 09:35 PM
Probably. I had to grade my own math paper today (Mom told me to), so I got all the if A=b and B=C, then A=C stuff.

Lightwielder
08-28-2009, 12:43 AM
Yeah, but watch those variables. If A equals b, but A does not equal B, and b equals C, then B does not equal C.

But, I'm just trying to screw with your head now. It's actually a lot easier to understand once you get the hang of it. At least...it was for me.

thingirl
08-28-2009, 02:04 AM
How can a= b, but a != b in the same problem? I'm going to bed now.

zmflavius
08-28-2009, 02:51 AM
in math, "b", and "B" are different variables. Usually.

psychoadept
08-28-2009, 04:28 AM
in math, "b", and "B" are different variables. Usually.

And sometimes they're not actually variables. Like i and e and G and L.

Don't worry, thingirl. You'll rarely have to deal with cases where the same letter is used in the same equation to mean different things, capitalized or not. And if you do, the letters used will probably have some connection to what they represent.

Rangerlord
08-28-2009, 08:33 AM
I just rolled on the archery contest and on my rolls I rolled a one two and a three and went over 50 on one roll....come on.

thingirl
08-28-2009, 12:34 PM
And sometimes they're not actually variables. Like i and e and G and L.

Don't worry, thingirl. You'll rarely have to deal with cases where the same letter is used in the same equation to mean different things, capitalized or not. And if you do, the letters used will probably have some connection to what they represent.

I actually didn't see that one of the B s was capitalized. And Bs is different again from B or b. And if I'm writing out a formula, C usually = pi*d

@Rangerlord: That sucks. I just rolled very high, but didn't beat my score. Yay me, Boo random. ;)