Face Value II
cleaned up + generalized
This post is going to serve two purposes. 1) We will clean up our original formula and 2) this cleanup will lead to a more generalized formula for different variations.
Let’s start by restating the original question, although I would maybe recommend that you read the first version first to get a sense of maybe the “easier” way to approach the question (despite it actually being more work and far less clean). Well I guess “easier” is very subjective but I think that the use of indicator variables is just something that people are less likely to have seen before?
We’re going to roll a d3 (a fair, 3-sided die) 20 times, record the frequencies that each face value that shows up and take the product of said frequencies. What’s the expected value of such a game?
Just to make sure we’re on the same page here, an example simulation could end with six 1s, five 2s, and nine 3s giving this a value of 6 x 5 x 9 = 270.
At the end of the last post, I posed a bonus question asking why the approximation of ((20-1)/3)^3 was so close to the actual. We didn’t get any takers on that, but I’m here today to give the answer (which I honestly should have just put in the original post to make it complete because it is truly lacking, but whatever).
So just to recap, we had the formal solution for the product of 3 faces from n rolls of a d3 to be:
and the approximate solution to be:
Cleaner Solution
I also want to give a simpler version to show this. Let’s say that instead we have a d2 and we roll this n times.
This ends up being E[X_A * X_B] where X_A is the number of times that side A shows up and X_B is the number of times that B shows up. Let’s denote p_A = Pr(a given roll is A) and likewise p_B = Pr(a given roll is B). We will use ~indicator variables~ to describe what each ‘trial’ is; I_{t,A} = 1{trial t is A} and I_{t,B} = 1{trial t is B}. Given this, we have:
We want the product of these so:
Now clearly we can’t have trial t be both A and B right? This means that anytime i==j the probability of this is 0, hence we can remove all of those.
For the product of two indicators, we simply have the product of the probability of occurrence:
And since we do this for every indicator such that i!=j, we get the product of the number of ways to get two distinct i,j pairs from n trials (this is written as (n)_2) times the probability of occurring:
Now, more generally speaking, we can say that the expectation of a multinomial distribution with categories c_1…c_m and probabilities of each being drawn from p_1…p_m is:
It can probably go without being said for the audience of this blog, but I think I should clearly define what (n)_m is mathematically. The number of ways to have distinct numbers drawn is:
For the case of our original question where every outcome of a k-sided die happens with probability 1/k and we roll it n times, we get:
And given the original question had a 20 rolls of a d3, this would become:
This is why our approximation was so close to the actual (notice that it’s barely off).
Anyway, I think that this version is much much cleaner and the fact that it generalizes out to more than just the product of 3 makes it actually usable for questions outside of the very specific one originally given.


Bad post. I think most people acquainted with combinatorics would prefer the linearity of expectation explanation going more like: (n choose m)*(m-1)/m*(m-2)/m*...*1/m where the (n choose m) counts the number of m-tuples and the other part is the probability a particular m-tuple has distinct values thus being counted precisely once in the product of multiplicities. It is a classic double counting argument.