Combinatorics Urn Problem I have 208 unique marbles:

*

*From this 208, I select 15 marbles without replacement and place them into an urn.

*I do this again with a new urn, 3 more times, but using the original
208 marble set, so I apply replacement after each selection of 15.

*I now have 4 urns of 15 marbles each, with no duplicate marbles within
a particular urn, but possibly duplicates across urns.

What is the probability that there are exactly 14 marbles that appear in more
than 1 urn $?$.
 A: import numpy as np
from tqdm import tqdm
count = np.zeros(208)
rng = np.arange(208)
exactly14 = 0
morethan14 = 0
history = []
for i in range(4):
    choice = np.random.choice(rng, 15)
    history.append(choice)
    count[choice] += 1
for i in tqdm(range(100000)):
    choice = np.random.choice(rng, 15)
    count[choice] += 1
    history.append(choice)
    count[history[0]] -= 1
    history.pop(0)
    ccount = count[count > 1].sum()
    if ccount == 14:
        exactly14 += 1
    if ccount > 14:
        morethan14 += 1

print(exactly14/100000)

0.11
IMHO this problem suffers from combinatorial explosion thus it's easier to go with monte-carlo
A: Following the advice from Quester I simulated the problem with Monte Carlo
import numpy as np
from tqdm import tqdm
import matplotlib.pyplot as plt
count = np.zeros(208)
rng = np.arange(208).astype(int)
urns=np.zeros([4,15]).astype(int)
exactly14 = 0
morethan14 = 0
lessthan14 = 0
history = []

for i in tqdm(range(1000000)):
    for j in range(4):
        urns[j, :] = np.random.choice(rng, 15, replace=False)

    n_unique=len(np.unique(np.ravel(urns)))
    n_multi=len(np.ravel(urns))-n_unique
    history.append(n_multi)
    if n_multi == 14:
        exactly14 += 1
    if n_multi > 14:
        morethan14 += 1
    else:
        lessthan14+=1

print(exactly14/1000000)

0.000489
