Difference between multinomial distribution with n trials and categorical distribution performed n times I want to understand if there is any difference between performing multinomial distribution with 1 trial, 10000 times and performing multinomial distribution with 10000 trials, 1 time.
Here is the code of what I am talking about. Notice that the outputs in both cases are almost similar.
pi  = [0.2, 0.5, 0.3] # probabaility
trails = 1
repeat = 10000

rng = np.random.default_rng(seed=4)
cat = rng.multinomial(trails, pvals=pi, size=repeat) # categorical distribution sampled 10000 times

m = np.mean(cat, axis=0)
print(m)                             # output - [0.2037 0.4951 0.3012]
print(np.sum(cat, axis=0))           # output - [2037 4951 3012]

pi  = [0.2, 0.5, 0.3] # probabaility
trails = 10000
repeat = 1

rng = np.random.default_rng(seed=4)
mult = rng.multinomial(trails, pvals=pi, size=repeat) # Multinomial distribution with 10000 trials

print(mult/trails)                   # output - [[0.2133 0.4877 0.299 ]]
print(mult)                          # output - [[2133 4877 2990]]


There is no difference.  That you get slightly different results, even with the same random seed, must be because somewhat different algorithms are used in the two cases.
As an illustration, think about throwing coins (well, three-sided coins ...). Throwing 10000 coins once, or throwing one coin 10000 times, you will expect the same results.
