View Single Post
  #8  
Old 10-16-2007, 12:50 PM
R Gibert R Gibert is offline
Member
 
Join Date: Jan 2006
Posts: 53
Default Re: basic probability question counter intuitive?

[ QUOTE ]

The probability of getting an A or a K on just the first 2 flop cards, which we will call P2, is:

P2 = 6/48 + (1 - 6/48)*(6/47) =~ 23.67%

and then for all 3 flop cards it is:

P2 + (1 - P2)*6/46 =~ 33.6%.


[/ QUOTE ]
This is how what you're doing looks like in Python:

reduce(lambda x,y: x + (1 - x)*y, [6.0/48, 6.0/47, 6.0/46])

which appears to use 6 mul/div operations, but one of them is a multiply by zero, so it is actually only 5. What you did looks like 6 mul/div operations too, but 6/48 does not need to be computed twice. This puts it on a par with:

33.6 = 1 - 42/48*41/47*40/46

The number of add/sub operations is the same too.

Interesting.
Reply With Quote