slackyhacky
slackyhacky
  • Threads: 49
  • Posts: 361
Joined: Jan 18, 2012
February 7th, 2012 at 9:26:34 AM permalink
What is the formula to calculate the following...

given probability of Event A happening and Event B happening, what is the probability that Event A will happen x number of times before B happens?

I'm curious to know how many times I would have to expect to roll the dice before seeing 10 come up x number of times before a 7 hits.

I have written a program in WinCraps to keep track of that. I have rolled about 1 million times and never seen a 10 roll 10 times before a 7. I have seen a few 10's come up 9 times, and it comes up 7 times before a 7 a handful.

I would like to know the actuall expected probability of this happening - and better yet, how to calculate it (if it isn't too complicated).
dwheatley
dwheatley
  • Threads: 25
  • Posts: 1246
Joined: Nov 16, 2009
February 7th, 2012 at 9:35:56 AM permalink
The easier question to answer is the probability that Event A will happen x times before event B.

a = prob(A)
b = prob(B)

prob(A before B) = a / (a+b)

prob( A at least X times before B) = (a / a+b)^x
prob(A exactly X times before B) = b*(a / a+b)^x

example:
if A is roll a 10, a = 1/12
B is roll a 7, b = 1/6

prob( roll 10 at least 10 times before a 7) = 1/3^10 = 1/59049 = 0.00001693
Wisdom is the quality that keeps you out of situations where you would otherwise need it
TIMSPEED
TIMSPEED
  • Threads: 89
  • Posts: 1246
Joined: Aug 11, 2010
February 9th, 2012 at 3:21:25 PM permalink
As long as 10 comes up once every other time, the 2:1 (almost) payout makes it worth it..
I can't tell you the number of times I've played a session with a $30 buy on the 10, and absolutely cleaned up...
Gambling calls to me...like this ~> http://www.youtube.com/watch?v=4Nap37mNSmQ
slackyhacky
slackyhacky
  • Threads: 49
  • Posts: 361
Joined: Jan 18, 2012
February 10th, 2012 at 3:17:06 PM permalink
Quote: dwheatley

The easier question to answer is the probability that Event A will happen x times before event B.

a = prob(A)
b = prob(B)

prob(A before B) = a / (a+b)

prob( A at least X times before B) = (a / a+b)^x
prob(A exactly X times before B) = b*(a / a+b)^x

example:
if A is roll a 10, a = 1/12
B is roll a 7, b = 1/6

prob( roll 10 at least 10 times before a 7) = 1/3^10 = 1/59049 = 0.00001693



thanks!
  • Jump to: