ScriptUO

General => Off Topic => Topic started by: Cerveza on September 17, 2012, 08:19:49 AM

Title: Odds using a dispenser
Post by: Cerveza on September 17, 2012, 08:19:49 AM
My son wants to setup a random gambling device in Minecraft. I've built him the basic operational device, but now we're trying to determine some odds for betting.

The devices are called Dispensers. They have 9 slots that can be loaded with items. We will be using red, white and blue wool.

The dispensers, when triggered, toss out one random item. *If* we put 3 stacks of red, 3 stacks of white and 3 stacks of blue into a dispenser the odds of a color coming out is 3 in 9 or 1/3 of the time. Now if I remember correctly, if we were to load two dispensers with 3-red, 3-white and 3-blue, then the odds of getting both dispensers to output the same color would be 1 in 9, because each colors chance is 1/3 in each dispenser so getting the same color from two dispensers would be 1/9?

So my question is what are the odds of getting 3 of a kind, and also a Red, White, Blue (in order) using three dispensers for these cases.

#1
A = 3 Red, 3 White, 3 Blue (red = 3/9, white = 3/9, blue = 3/9)
B = 3 Red, 3 White, 3 Blue (red = 3/9, white = 3/9, blue = 3/9)
C = 3 Red, 3 White, 3 Blue (red = 3/9, white = 3/9, blue = 3/9)

All 3 same = (I'm thinking 1 in 27?)
Red/White/Blue = (Same thinking? 1 in 27?)

#2
A = 3 Red, 3 White, 3 Blue
B = 3 Red, 3 White, 3 Blue
C = 4 Red, 3 White, 2 Blue

All 3 same =
Red/White/Blue =

#3
A = 3 Red, 3 White, 3 Blue
B = 4 Red, 3 White, 2 Blue
C = 4 Red, 4 White, 1 Blue

All 3 same =
Red/White/Blue =

After seeing a few examples I should be able to mix things up to give the win percentages I want.

*Jeez, just thought about putting one GOLD in as a wild.... man this could get complicated. One gold in each dispenser or one gold in one dispenser only.

Math probably sux.