In the classical coin toss problem, one can estimate the distribution of \theta (by theta I mean that if \theta=0.5, the coin is unbiased) from an experiment in which one observes m faces from N tosses. If one assumes total ignorance (Prior=Beta(1,1)) then the posterior is simply B(m+1,N-m+1). So far so good.
I have a generalization that I don't know how to solve it. The idea is that we have two two coins. We toss the first one (whose \theta is known). If it's a face then a add a mark in the X category. If it's a tail, then I throw another (now biased) coin: face, I add a mark in category Y; tail, nothing happens.
My question is, if I observe a sequence of X's and Y's (but I don't know the number of tosses of the first coin), what's the posterior distribution (for its \theta) of the second coin? I don't see how to solve it...and it might have interesting applications in message communications.