Regardless of the debate about the casino...I modified the program a bit to be more flexible to different sized penetrations.
Code:
shoe = c(rep(1,120),rep(0,72),rep(-1,120))
sims = 10000
count = c()
pens = c(244, 223, 216, 245, 209, 203, 198, 230, 220, 220, 217, 196, 220, 225,
200, 213, 243, 158, 219, 61, 199, 154, 97, 264, 196, 228, 217, 251, 260, 226,
219, 267, 210, 206, 247, 219, 234, 262, 193, 211, 259, 247, 281, 226, 256)
for (i in 1:sims) {
rnd = c()
for (j in 1:length(pens)) {
rnd[j] = sum(sample(shoe, pens[j], F))
}
count[i] = sum(rnd)
}
hist(count)
p = sum(count <= -92) / sims
p
This one is easier to operate as more hands get added as well. All you have to do is add a comma and another penetration number to the pens = c() statement and change the high/low count number and you are good to go.
Oh ya. For this one I get .0268.
Sherman