# Problem with bins and posterior probability

There are $$n$$ bins and there is a guy who throws a ball to a randomly chosen bin. Initially we believe that each bin has equal probability to receive a ball, $$p_i = \frac{1}{n}$$.

My question is, how should we update our beliefs about $$p_1,p_2, ... p_n$$ if we observed $$N$$ independent throws and there $$a_1$$ balls in bin $$1$$, $$a_2$$ balls in bin $$2$$ and $$a_n$$ balls in bin $$n$$? $$\sum_{i}a_i = N$$

I dont think maximum likelihood estimation will work in this case. For example if $$N = 1$$, then $$p_j = 1$$, $$p_k = 0$$, for $$k \neq j$$. So I need to use Bayes to incorporate my prior belief about $$p_i$$.

But i am not sure how to apply Bayes here. I guess that each $$p_i$$ is $$\mathbb{U}(0,1)$$ but with constraint that $$\sum_{i}p_i = 1$$, and I don't know how to proceed from here

Any help is very much appreciated

The standard approach is to use Dirichlet distribution as a prior distribution of initial probabilities $$P\in H = \{p\in[0,1]^n: \sum p_j = 1\}$$, which has density $$\pi(p_1, \dots, p_n; \alpha_1, \dots, \alpha_n) = \frac{\Gamma(\alpha_1+\dots+\alpha_n)}{\Gamma(\alpha_1)\dots\Gamma(\alpha_n)}p_1^{\alpha_1-1}\dots p_n^{\alpha_n-1} \sim Dir(\alpha_1, \dots, \alpha_n)$$ w.r.t. surface measure of $$H$$ with the parameters $$\alpha_j > 0$$. Let $$M=(M_1, \dots, M_n)$$ be numbers of balls in each bin after fixed amount of tosses. When you calculate the posterior conjugacy emerges, i.e.
$$f(p|m) \propto f(m|p)\pi(p) \propto p_1^{m_1}\dots p_n^{m_n} \ p_1^{\alpha_1-1}\dots p_n^{\alpha_n-1} \sim Dir(\alpha_1 + m_1, \dots, \alpha_n+m_n).$$
Setting all $$\alpha_j=1$$ gives $$P\sim U(H)$$. Note that you can't have $$P_j \sim U(0,1)$$, because after summing and taking expectation you would obtain $$\mathbb{E}\sum_{j=1}^n P_j = \frac n2.$$ More on Dirichlet distribution can be found here: https://en.wikipedia.org/wiki/Dirichlet_distribution
• Prior distribution reflects your beliefs about possible values of $p_i$'s. In this approach we take it to be uniform over all possible values. Distribution of the first chosen bin is indeed discrete $U{1, \dots, n}$, which I believe you mistake as prior distribution. Why choose Dirichlet? Because of conjugacy, which is a standard notion in bayesian statistics. It does not only helps to avoid unsolvable integrals but is also somewhat natural. More on conjugacy can be found here: en.wikipedia.org/wiki/Conjugate_prior Sep 10, 2019 at 11:02