I wasn't sure whether to address this to CS SE, StackOverflow or Math SE, but here goes...
What algorithms exist, if any, for (pseudo-) random dice rolls such that some aggregate properties across many rolls are obeyed, for example,
I want to get to roll a 3-sided die (faces 'A', 'B', 'C') such that, if rolled 100 times:
- the expected numbers of 'A', 'B', 'C' are 90, 8, 2 respectively;
- the number of 'A' rolls will be between 89 and 91 with probability 67%
or some other similar such specification. I am still looking for algorithms that can provide a random(-looking) single roll; but over many rolls I do not want the cumulative results to follow a binomial distribution but rather one like I've specified. What should I look into for such pseudo-random rolling algorithms? (Pseudo-code, or actual code in say R or Python or Mathematica, would also be very appreciated)
EDIT: I know how to satisfy property (1), it's (2) I'm interested in
For (1), choose a random integer between $1$ and $100$. Call the result $A$, $B$ or $C$ using the intervals $[1,90], [91,98], [99,100]$.
I know that's not the algorithm you ask for.
Intuition suggests that you cannot guarantee (2) with any algorithm. What coin tossing algorithm would you use to assure between $49$ and $51$ heads with predetermined probability in a $100$ tosses?
Response to comment.
Consider a random permutation of the sequence $(A(90), B(8), C(2))$. That will give you the exact frequencies for (1) and satisfy (2). This will not serve your purpose if the customer for these dice rolls knows your algorithm and can "count cards".