# Probability distribution to represent group mean of multiple beta distributions

Say I have two coins from a particular mint in the US.

I flip coin one 20 times and receive 4 heads, giving me a beta distribution for the bias of coin one of $Beta$($\alpha$=5, $\beta$=17).

I then flip coin two 200 times and receive 105 heads, giving me a beta distribution for coin two of $Beta$($\alpha$=106, $\beta$=96).

What I would like to calculate is (assuming a prior of $Beta$(1,1)) the probability distribution that represents the average bias of coins from that mint after flipping just the two coins (or generalizing to N coins w/ different beta distributions). There is no assumption that the coins have the same bias.

I want to know if/how this can be calculated analytically.

In case it helps, this is what I've used to answer the question via hierarchical model MCMC simulation (where mu is the parameter of interest):
Hyperpriors: k ~ $Gamma$(s=1, r= .1), mu ~ $Beta$(1, 1)
Prior: coin_bias$_i$ ~ $Beta$(mu*k,(1-mu)*k)
Likelihood: $y_i$ ~ $Binomial$(flips$_i$, heads$_i$, coin_bias$_i$)

• What prior distribution on the bias do you wish to assume? That seems to be essential for your approach, which appears to be Bayesian. – whuber Oct 14 '16 at 17:49
• @whuber Thank you for helping me to clarify my question. Say the prior is a non-informative Beta, so Beta(1,1) – Eddie Oct 14 '16 at 17:50
• OK, that helps. One more minor question: do you need to calculate or approximate the posterior distribution as a Beta or do you want the correct posterior distribution (in case the result turns out not to have a Beta distribution)? – whuber Oct 14 '16 at 17:53
• Interesting, I did not realize the correct posterior would be something else. I would say the correct posterior if it's tractable. Otherwise an approximating Beta would do the trick. I will change the prompt to reflect your feedback. Thanks! – Eddie Oct 14 '16 at 17:57
• If you believe the coins from the mint have the exact same $p$ wouldn't you want your prior for the second coin to be the posterior after flipping the first? – Josh Magarick Oct 15 '16 at 2:49