# How to do Bayesian updating on biased information?

You have a coin that you can flip, but you can't see. It's a weighted $3$-sided coin taken (uniformly) randomly from some small known collection of $100$ weighted coins. However, we don't know how each coin in the collection is weighted. The sides of the coin are green, red, and black. You throw the coin $5$ times. If at any point the black side comes up, you stop this experiment, and you don't get to see what the coin is. If all $5$ throws are non-black, then you get to see the coin. For each new experiment, you pick a random coin from your collection (with replacement). So, $\mbox{P(we are playing with coin №}\mbox{1)} =\frac{1}{100}$. When we flip it and see "color", then $\mbox{P(coin №}\mbox{1 | color)} = \mbox{P(color | coin №}\mbox{1)} \frac{\mbox{P(coin №}\mbox{1)}}{\mbox{P(color)}}$ by Bayes Theorem. We obviously know $\mbox{P(coin №}\mbox{1)}$, and we know $\mbox{P(color}\mbox{1)}$ from running these experiments for a long time. But how do we estimate $\mbox{P(color | coin №}\mbox{1)}$? How do we account for the fact that we are not going to see coins that are weighted heavily towards the black side very often? And when we do see a coin, it's only because of some luck? What does updating your hypotheses look like in this case?

• I think the following much simpler model already contains all the important properties of your model, but due to being simpler is much easier to reason about: Take just two normal (but potentially biased) two-sided coins. On each round one of them is taken with probability $\frac12$ for each and tossed. If the result is head, you get told which coin it was. If the result is tail, you don't get told which coin it was. – celtschk Jun 2 '13 at 2:52
• So, each experiment produce up to 5 colors thrown for a coin? You are shown all the resulting colours, regardelss of whether the coin number is revealed? – leonbloy Jun 2 '13 at 3:36
• @leonbloy: Correct! – Alexei Andreev Jun 2 '13 at 5:19
• @celtschk: I think that's too simplistic. – Alexei Andreev Jun 2 '13 at 5:27
• @AlexeiAndreev: Why? – celtschk Jun 2 '13 at 7:38

The key insight is that you do not have 100 separate models for the coins 1 to 100, but one model which contains the probabilities for all coins. So if we write as $g_i$ the probability that if coin $i$ is tossed, it gives green, and with $r_i$ the probability that if coin $i$ is tossed, it gives red (the probability to get black when coin $i$ is tossed is then just $1-g_i-r_i$, so we don't need a separate variable for that), then the probability function for the model is given by the joint probability function $$P(g_1,r_1,g_2,r_2,\ldots,g_{100},r_{100})$$ While for the prior you'll probably choose $$P_0(g_1,r_1,g_2,r_2,\ldots,g_{100},r_{100}) = P(r_1,g_1)P(r_2,g_2)\cdots P(r_{100},g_{100})$$ this product structure will definitely not remain as soon as a toss results in black.
• Of course I can. Note that also in the version as I understood it, there's an update on black, without revealing the coin. Just that in that case you have even less information than in your version. About the loss of the product structure: That's exactly because you are missing the information about which coin it is. After that step, it doesn't even make sense to ask whether $P(r_1,g_1)$ and $P(r_2,g_2)$ are independent because they don't even exist (except as marginals of $P(r_1,g_1,p_2,g_2,...)$. Note that this $P$ does not give the probabilities of the coins; those are the parameters … – celtschk Jun 2 '13 at 20:02
• … $g_1$, $r_1$, $g_2$, $r_2$, etc. Rather $P$ gives you the probability distribution you assign to the models. In each individual model the different coins are independent (because they are constructed that way), but $P$ is correlated (because it contains data of the form "either coin 1 was black, or coin 2 was black, or ..."). Note that $P$ is not part of the model, it is a probability measure on the model space. – celtschk Jun 2 '13 at 20:05