# Beta Coin Toss Experiment

I've run across this tricky little problem that I just can't seem to figure out. Say we flip a coin N times, but we don't know the true value of the success parameter $\theta$. Instead, we have a prior distribution over $\theta$ that is beta(a, b). So, the expected number of heads after the first coin toss would be $\frac{a}{a+b}$.

However, the tricky part is that after the first toss, we do a Bayesian update, so the next coin toss is distributed either as beta(2,3) or beta(1,4), depending on the outcome of the previous toss.

So far, the closest thing I've been able to find is the Poisson Binomial distribution, but it still assumes the trials are independent, even if they aren't i.i.d.

I also tried writing out what I thought was a solution for small values of N (based on $\mathrm{E}[N_H|N]=\displaystyle\sum^{N}_{i=1}{p_i i}$), but even though I found an interesting recursive structure, I couldn't figure out how to use that to do some sort of inductive proof, because I couldn't factor out the expression for N-1.

So, basically, I need to figure out how to compute the expected number of successes. Any pointers would be greatly appreciated.

Edit: Here's some additional clarification. Hope this helps.

Say I'm starting out with just my prior belief of B(1,3), and someone asks me "How many heads do you expect to get in 5 tosses?" Well, I do have more information than just my prior. I know that whatever I get for my first toss, my expectation will change. So, I was thinking it should be something like, for N=2, E[NH|N=2]=p(H1)p(T2|H1)+p(T1)p(H2|T1)+2p(H1)p(H2|H1)

-

Is is not quite clear what your precise question is.

Your starting prior is $B(a,b)$ with mean $\frac{a}{a+b}$.

If you know the first toss then your distribution moves to $B(a+1,b)$ with mean $\frac{a+1}{a+b+1}$ or to $B(a,b+1)$ with mean $\frac{a}{a+b+1}$, depending on the result of the first toss.

If you do not know the first toss then your distribution for the second toss remains at $B(a,b)$ with mean $\frac{a}{a+b}$ and these are your subjective distribution and expectation for future tosses until you actually get some information to update your prior.

-
I'll try to clarify a bit, then. You're probably correct, but the assignment question strongly implies that the bayesian update step is important. – user61640 Feb 10 '13 at 0:08
I guess I'll have to ask the professor. The question isn't clear about whether any tosses have been performed or not. – user61640 Feb 10 '13 at 0:14
Okay, I've got some clarification on the question. Say I'm starting out with just my prior belief of B(1,3), and someone asks me "How many heads do you expect to get in 5 tosses?" Well, I do have more information than just my prior. I know that whatever I get for my first toss, my expectation will change. So, I was thinking it should be something like, for N=2, $E[N_H|N=2]=p(H_1)p(T_2|H_1)+p(T_1)p(H_2|T_1)+2p(H_1)p(H_2|H_1)$ – user61640 Feb 10 '13 at 0:47
@user: But until you see the results of the next tosses, you do not know what they are so you cannot update your prior. So the expectation remains $\frac{1}{4}$ and so the mean number of heads you expect number of heads from $5$ is $1.25$. – Henry Feb 10 '13 at 8:16