Gaussian distribution distance function

43 Views Asked by At

I would be happy to get guidance for the following questions:

I have a dice with 3 sides.

side A: have a 50% chance of falling on it.

side B: have a 30% chance of falling on it.

Side C: have a 20% chance of falling on it.

I'm assuming that if I do 100 rounds, each round I throw the dice 100 times. the results will somehow be distributed as gaussian to what the real distribution should be like according to Central limit theorem. P(A)=0.5, P(B)=0.3 % P(C)=0.2

I want to give a build a function that in the 101 round will result in a number between 0 to 1, where 0 means it's really far from the expected value (E) . and 1 if it was exactly as the expected value Any help and guidance will bwe helpfull. Thanks!

1

There are 1 best solutions below

0
On

This is exactly a multinomial distribution with the pmf. So you throw the dice $100 \cdot 100 = 10 000$ times. Let $X_a, X_b, X_c$ be the number of times the dice comes up $A, B$ or $C$. This means that

$$ \begin{align} E[X_a] &= n\, p_a = 5000 \\ E[X_b] &= n\, p_b = 3000 \\ E[X_c] &= n\, p_c = 2000 \end{align} $$ We can calculate the probability $P(X_a = 5000, X_b = 3000, X_c=2000)$ using the pmf of the multinomial $$ f(x_a, x_b, x_c) = \frac{n!}{x_a ! x_b ! x_c!} p_a^{x_a} p_b^{x_b} p_c^{x_c} $$ We insert for $p_a, p_b, p_c, x_a, x_b$ and $x_c$ and get $$ f(5000, 3000, 2000) = \frac{10000!}{5000! 3000! 2000!} 0.50^{5000}0.30^{3000}0.20^{2000} $$ This is the product of a really a large number and several really small numbers. In this case it might be a good idea to compute it on a log scale and rescale afterwards, $$ \begin{align} \ln f(5000, 3000, 2000) &= \sum_{i=1}^{10000} \ln (i) - \sum_{i=1}^{5000} \ln(i) - \sum_{i=1}^{3000} \ln(i) - \sum_{i=1}^{2000} \ln(i) + 5000 \ln (0.5) + 3000 \ln (0.3) + 2000 \ln (0.2) \\ &= 10287.2 - 10296.5 \\ &= -9.29502 \end{align} $$ We transform back and arrive at $$ f(5000, 3000, 2000) = e^{-9.29502} = 0.0000918807 $$