How can I simulate the frequency of each face for N die rolls? I want to simulate a fair die roll N times without actually rolling a die.
To be clear, I want to achieve something like this:
N = 1000
"1" showed up 185 times
"2" showed up 162 times
"3" showed up 158 times
"4" showed up 148 times
"5" showed up 182 times
"6" showed up 165 times

I can say that, for example, the number 1 shows up
random_binomial_distribution(N = 1000, probability = (1/6))

times. But I can't apply this for all faces, as the sum of all these results will likely not equal 1000.

How can I simulate the frequency of each face for N rolls without iterating through every roll?
 A: The frequencies for the different faces aren't independent, since they have to sum to $N$. However, instead of iterating over the dice, you can iterate over the number of faces, which doesn't increase with $N$:

*

*Simulate occurrences of 1, $n_1$, as Binomial, with $N$ trials and success probability $1/6$.

*Simulate occurrences of 2, $n_2$, as Binomial, with $N - n_1$ trials and success probability $1/5$.

*Simulate occurrences of 3, $n_3$, as Binomial, with $N - n_1 - n_2$ trials and success probability $1/4$.

And so on, until you simulate the occurrences of 6 with a success probability of $1$, using up all the remaining rolls.
A: I feel the simplest approach for a die of $D$ sides (your question assumes $D=6$), with an arbitrary set of values (your question assumes a die roll is one of $\in {1,2,3,4,5,6}$) is to use a shuffle algorithm-based sampling function on the set of values of your die:
Python
Assume you have an array of die values (any number of values, any set of values), named MyDie, the basis for "rolling" MyDie N times is:
import random
values, counts = np.unique(random.choices(MyDie,k=10), return_counts=True)

For example, for $N=10$:
>>> import random
>>> import numpy as np
>>> values, counts = np.unique(random.choices(MyDie,k=10),return_counts=True)
>>> print(values,"\n",counts,sep="")
[1 2 3 4 5 6]
[1 4 1 1 1 2]

R
Assume you have an array of die values (any number of values, any set of values), named MyDie, the basis for "rolling" MyDie N times is:
sample(MyDie,size=N,replace=TRUE)

For example, for $N=10$:
> MyDie <- 1:6
> table(sample(MyDie,size=10,replace=TRUE))

1 2 3 5 6 
4 1 2 1 2

