OK, so you are averaging over all possible flip odds, assuming a uniform distribution of them. That’s what “Assume that all heads:tails ratios are equally likely for the coin.” means.
Your obvious best playing strategy is to look at the history of flips and trust the apparent bias. Assuming that N is much larger than the time it takes for the apparent bias to settle to the real one (perfect modeling), your odds of winning are max(p,1-p). Let’s assume p > 0.5. Your expected payout per flip is 1p-3(1-p)=4p-3. Averaged over 0.5<p<1, this gives 0. In other words, even if the coin bias is given to you, you do not come out ahead when averaged over all biases, regardless of N.
Ah, I get it now. N is stated ahead of time, but you can (predictably) use the information so far to “stop playing” whenever you want, and that’s part of the optimal strategy to consider in the expectation.
Yeah, which means if I’m trying to maximize my payout, I’ll set N arbitrarily large and abort the game at sufficient evidence that the coin isn’t predictable enough for the game to have positive expected value. If the coin is predictable enough, then I’ll pump my friend for every last cent he has.
However, note that the problem as stated asks for the minimum value of N so that the game has positive expected value. (I’m not too sure why we’re interested in this except as an exercise).
edit: just clarifying for others. Not that I think you misunderstood.
Right. The coin has a fixed value for P(heads), set when your friend tampered with it. You just don’t know what it is.
OK, so you are averaging over all possible flip odds, assuming a uniform distribution of them. That’s what “Assume that all heads:tails ratios are equally likely for the coin.” means.
Your obvious best playing strategy is to look at the history of flips and trust the apparent bias. Assuming that N is much larger than the time it takes for the apparent bias to settle to the real one (perfect modeling), your odds of winning are max(p,1-p). Let’s assume p > 0.5. Your expected payout per flip is 1p-3(1-p)=4p-3. Averaged over 0.5<p<1, this gives 0. In other words, even if the coin bias is given to you, you do not come out ahead when averaged over all biases, regardless of N.
Hmm, what else am I missing?
You’re missing the third option—the choice to stop playing.
So then can N be the dynamic result of a function, rather than a value?
No, you have to state N before you start flipping coins.
Ah, I get it now. N is stated ahead of time, but you can (predictably) use the information so far to “stop playing” whenever you want, and that’s part of the optimal strategy to consider in the expectation.
Yeah, which means if I’m trying to maximize my payout, I’ll set N arbitrarily large and abort the game at sufficient evidence that the coin isn’t predictable enough for the game to have positive expected value. If the coin is predictable enough, then I’ll pump my friend for every last cent he has.
However, note that the problem as stated asks for the minimum value of N so that the game has positive expected value. (I’m not too sure why we’re interested in this except as an exercise).
edit: just clarifying for others. Not that I think you misunderstood.