This post is once again, going out to the statisticians out there, and is only contains mild references to WoW and/or popular WoW personalities.
I'm an obsessive dork.
Things get into my head and I cant let them sit until there's some nice closure.
I wanted to figure out the odds of randomly generating a BRK Hunter Bingo card without any duplicates. I didn't really finish it off, so I'm going mental.
The game involved creating bingo boards. Each board has 25 squares.
Each square had two values in it, a color and an equipment slot. There were 4 colors and 14 equipment slots.
No duplicate Color/Slot pairs are allowed on a valid board.
I think I figured it out, and so follow along. At least, I've figured it out enough to satisfy my own internal sense of closure, whether right or wrong. If you know I'm wrong, drop me a line with a decent solution, and I'll, I dunno, maybe give you a nice hearty "How's she goin!" on the the blog.
To find out the odds of choosing a valid board (ie, no dupes), first I need to find out how many possible boards there are, both valid and invalid.
Given 4 colors and 14 equipment slots, there are 4 * 14 = 56 possible values for each slot.
So, choosing 25 things from those 56, allowing repeats, you have 56 ^ 25 =
possible bingo boards, which is pretty staggering if correct.
Then we need to figure out how many of those boards have no dupliates.
To build a board with no duplicates, start by choosing one value. There are 56 possible choices.
Next, choose your second value. Since you already chose one of the options, you now only have 55 choices.
Likewise, for the third value, two of the possibilities have been taken, so you now have only 54 choices.
yadda yadda yadda
Likewise for the twentyfifth value, twentyfour of the possibilities have been taken, so you now have only 32 choices.
56 * 55 * 54 * ... * 33 * 32 = 56! / (56-25)! =
bingo boards with no duplicate values.
Dividing the no-dupe number by the total-possible number, you get 0.001706657
So, when I randomly generated my bingo boards, each time I hit F9, there was a 0.17% chance that it would be made up of 25 unique Color / Slot pairs.
Then the next question, which will continue to drive me mental, is "how many tries before I become worried that I'm still hitting F9 and I haven't gotten a valid board yet". If memory serves me correctly, its not quite as simple as just saying "well, if its roughly 0.1%, hit it 1000 times and you probably should have gotten a valid one". Maybe it is that simple, but I've a nagging feeling its a fancier solution than that, and I should expect a valid board way sooner than 1000. But oh well. I'll have to see if the inspiration stings me into action.
The other thing that will continue to plague me is "why cant you just let it go and forget about the stupid combinatorics and go get a steak hogie".