Imagine we have a dice:
| Side | probability |
|---|---|
| 1 | 0.1 |
| 2 | 0.1 |
| 3 | 0.1 |
| 4 | 0.1 |
| 5 | 0.2 |
| 6 | 0.4 |
We will throw the dice N times (ie. 7 times) And we want to calculate the probability that the average of the 7 faces of the dice is bigger than 5.
I tried mapping all outcomes, but it gets too nasty too fast because the number of possible outcomes grows exponentially $$6^N$$
So I decided to try a Binomial approach, in which I iterate first for the 1s and calculate the probabilities of getting either 0,1,2,..., or 7 ones. If I get a 7 I am done because there's no other 'free slot'. But if I get 6 ones I still have to fill it, so I have to calculate now for the probability of getting either one or zero 2s, and so on until all the 'slots' are full.
Is there a better approach to this? I have the feeling that this should be a trivial problem but I just don't know where to look at!!!
Should I just better move to MonteCarlo and approximate it??
Thank you all!!
I wrote a Mathematica program which answers your question exactly, and efficiently. I used probability generating functions to do this. Try it online!
First, let me explain the method.
The probability that the average of $n$ dice is more than $5$, is equal to the probability that the sum of $n$ dice is more than $5n$.
A probability generating function is a polynomial, $P(x)$, which encodes the distribution of a discrete random variable, $T$. For any integer $k$, the probability that $T$ is equal to $k$ is the coefficient $x^k$ in $P(x)$. For example, the pgf of a single die roll is $$ P_\text{die}(x)= 0.1x^1 + 0.1x^2 + 0.1x^3 + 0.1x^4 + 0.2x^5 + 0.4x^6. $$
A useful fact about pgf's is that the pgf of the sum of two independent random variable is the product of the individual pgf's. Therefore, the pgf for the total of $n$ rolls of your die is simply $P_\text{die}(x)^n$.
Finally, we can use a common generating function trick to extract the probability of rolling at most a certain level. If $Q(x)$ is any polynomial, say $Q(x)=a_0+a_1x+\dots+a_nx^n$, then $Q(x)/(1-x)$ will be a power series, where the coefficient of $x^k$ in $Q(x)/(1-x)$ is the sum of the coefficients $a_0+a_1+\dots+a_k$. Letting $Q(x)=P_\text{die}(x)^n$, then the coefficient of $x^k$ in $P_\text{die}(x)^n/(1-x)$ is $P(T\le k)$, where $T$ is the total of the $n$ dice.
Here is the Mathematica program I wrote, which combines all of the above logic.