# Probability of Having a Bingo after $n$ Balls

First of all, I am looking less for an answer, and more for an explanation as how to find the answer. Second, I know that this may appear to be a duplicate of this question, but the answer there seemed inadequate considering that the probability of getting bingo one way is not independent of the probabilities of getting it another way; if you did not get the top row, it adds information about which balls have been drawn and therefore affects the likelihood of all the other ways to get bingo.

My question is this: At a local bingo charity, there are several ways to get bingo. The first is the regular way with which we are all familiar (5 in a row). The second is to get all four corners. The third is to get all 4 mid-pieces of each side. The fourth is to get the four squares orthogonally adjacent to the center (free square). The fifth is to get the four squares diagonally adjacent to the center.

I want to find a way to calculate the probability of having bingo after the announcer has drawn $$n$$ balls. Because there are 75 balls, and only 25 spaces on a card, one should expect $$n/3$$ spots inked on their card.

At firs, I tried to calculate this by figuring out the probability of getting bingo each way and then combining the probabilities as if they were independent. Yet they are not independent. The only way I can think of to do it is to calculate the number of ways a card could not have a single bingo for each $$n$$, and then take $$1-$$ (that number). That, however, would require rather a lot of computation. Is there any easier way?

I agree that the linked answer is incorrect, because it doesn't deal with double counting. It adds the number of ways to get $$5$$ in the top row and the number of ways to gets $$5$$ in the second row, but that counts the number of ways to get $$5$$ in the top two rows twice. (Of course, this never happens in a real game, but to make the calculation correctly, we have to account for the possibility.)

I don't there is a way to actually solve this problem without a lot of calculation. You have to figure out the number of ways to get $$1,2,3,...$$ bingos, and part of the difficulty is that the answer differs depending on which bingo we're talking about. There are more ways to get the top row and the four corners than there are to get the top two rows, because the first only requires $$7$$ balls and the second requires $$10$$ balls.

I tried to write out a description of how to do a direct calculation, counting the number of multiple bingos and using the principle of inclusion and exclusion, but it's just too complicated to bother with. I've no doubt that the second method, figuring out the probability of not having a bingo with $$n$$ balls is the way to go.

There are $$24$$ square on the card, not counting the free cells, and there are $$2^{24}=16,777,216$$ subsets of these cells. You'd need to write a computer program, to evaluate all of these possibilities and to record for each $$0\leq k\leq24$$ the probability $$p_k$$ that a card with $$k$$ balls does not have a bingo.

Then given $$n$$ the probability that exactly $$k$$ of the $$n$$ balls drawn are to be found on our card is $${{24\choose k}{51\choose n-k}\over{75\choose n}}$$ Multiply this by $$p_k$$ and sum over all $$0\leq k\leq n$$ to get the probability of not having a bingo, then subtract from $$1$$ to get the probability of not having a bingo with $$n$$ balls.

I doubt that I'll be able to resist writing a program to compute these probabilities. If I'm successful, I'll post my results.

EDIT

Here's my python script. It's much slower than I expected. It seems like the powerset function that I copied from the itertools docs is the culprit, but it would haven taken me longer to write my own routine than to run the program, and my routine would probably have been slower, anyway.

from itertools import chain, combinations, product
from collections import defaultdict
from math import factorial

def powerset(iterable):
"powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)"
s = list(iterable)
return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))

def choose(n,m):
if m > n: return 0
return factorial(n)//(factorial(m)*factorial(n-m))

def hits(n,k):
'''
Probability that exactly k on n balls are on the card
'''
return choose(24,k)*choose(51,n-k)/choose(75,n)

values = range(1,6)
free = {(3,3)}
card = set(product(values, repeat=2))-free
rows = {frozenset({(r,c) for c in values})-free for r in values}
cols = {frozenset({(r,c) for r in values})-free for c in values}
bingos =rows | cols
bingos.add(frozenset({(v,v) for v in values}-free)) #diag 1
bingos.add(frozenset({(v,6-v) for v in values}-free)) #diag2
bingos.add(frozenset([(2,3),(3,2),(3,4),(4,3)])) # orthogonal neighbors
bingos.add(frozenset(product([2,4], repeat=2))) # diagonal negighbors

noBingo = defaultdict(int)

for s in powerset(card):
balls = set(s)
if not any(b <= balls for b in bingos):
noBingo[len(s)] += 1

for key in noBingo.keys():
noBingo[key] /= choose(24,key)

prob = { }

for n in range(76):
prob[n] = sum(hits(n,k)*noBingo[k] for k in range(min(n+1,25)))

for n in range(76):
print('%2d: %8.4f %%'%(n,100*(1-prob[n])))


This produces

 0:   0.0000 %
1:   0.0000 %
2:   0.0000 %
3:   0.0000 %
4:   0.0007 %
5:   0.0033 %
6:   0.0101 %
7:   0.0240 %
8:   0.0486 %
9:   0.0884 %
10:   0.1490 %
11:   0.2366 %
12:   0.3584 %
13:   0.5224 %
14:   0.7375 %
15:   1.0133 %
16:   1.3603 %
17:   1.7895 %
18:   2.3123 %
19:   2.9408 %
20:   3.6871 %
21:   4.5633 %
22:   5.5816 %
23:   6.7535 %
24:   8.0897 %
25:   9.6002 %
26:  11.2936 %
27:  13.1768 %
28:  15.2548 %
29:  17.5303 %
30:  20.0037 %
31:  22.6724 %
32:  25.5309 %
33:  28.5703 %
34:  31.7789 %
35:  35.1411 %
36:  38.6386 %
37:  42.2496 %
38:  45.9497 %
39:  49.7117 %
40:  53.5066 %
41:  57.3037 %
42:  61.0712 %
43:  64.7771 %
44:  68.3901 %
45:  71.8795 %
46:  75.2171 %
47:  78.3770 %
48:  81.3368 %
49:  84.0779 %
50:  86.5861 %
51:  88.8522 %
52:  90.8718 %
53:  92.6454 %
54:  94.1786 %
55:  95.4813 %
56:  96.5676 %
57:  97.4549 %
58:  98.1632 %
59:  98.7145 %
60:  99.1312 %
61:  99.4362 %
62:  99.6510 %
63:  99.7958 %
64:  99.8884 %
65:  99.9439 %
66:  99.9747 %
67:  99.9901 %
68:  99.9969 %
69:  99.9993 %
70:  99.9999 %
71: 100.0000 %
72: 100.0000 %
73: 100.0000 %
74: 100.0000 %
75: 100.0000 %


P.S.

I did a simulation of $$100,000$$ games, and these probabilities matched up very well, so I'm confident they're correct.

• Wow. Thank you so much!! That looks like you did a lot of work. Aug 15 '19 at 23:34