Posterior coin selection from repeated tosses (source code)

= Posterior coin selection from repeated tosses
{title2=$P(B\mid H^m)=\pi p_B^m/[(1-\pi)p_A^m+\pi p_B^m]$}

If a hidden coin is selected once with prior probability $\pi$ of coin $B$, repeated tosses are <independent> conditional on that coin. <Bayes' theorem> weights the prior by each all-heads likelihood. They need not be <independent> without conditioning on the chosen coin.