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]]

 A: 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.
A: There is a difference. If we denote the probability vector $\pi$, then the first case of 10,000 repetitions of $X \sim \text{Mult}(1, \pi)$ retains information about the $X_i$ in each of the 10,000 repetitions.
The second case of one repetition of $Y \sim \text{Mult}(10000, \pi)$ does not retain information about the $X_i$ in each of the 10,000 trials.
Here is an example of what the data reduction of the first case relative to the second case looks like (doing 5 replications instead of 10,000):
pi = c(0.2, 0.5, 0.3)

x = replicate(5, rmultinom(1, 1, pi), simplify = 'matrix')
y = rmultinom(1, 5, pi)

# Output

> x
     [,1] [,2] [,3] [,4] [,5]
[1,]    0    0    0    0    0
[2,]    0    1    0    1    1
[3,]    1    0    1    0    0
> y
     [,1]
[1,]    0
[2,]    4
[3,]    1

It is true that if you sum the $X_i$ over the repetitions in the first case, it is equivalent to the second case. But the first case contains more information than the second case since it has information about each repetition. So you could do things like calculate the sample variances & covariances.
