# Computational Statistics question

I've got a tricky computational statistics problem and I was wondering if anyone could help me solve it.

Okay, so in your left pocket is a penny and in your right pocket is a dime. On a fair toss, the probability of showing a head is p for the penny and d for the dime. You randomly chooses a coin to begin, toss it, and report the outcome (heads or tails) without revealing which coin was tossed. Then you decide whether to use the same coin for the next toss, or to switch to the other coin. You switch coins with probability s, and use the same coin with probability (1 - s). The outcome of the second toss is reported, again not reveling the coin used.

I have a sequence of heads and tails data based on these flips, so how would I go about estimating p, d, and s?

• You can't identify the individual values of p and d, since you could interchange them (and start with the opposite coin) and get the same results with the same probability. Your problem isn't fully identifiable. You may perhaps be able to estimate min(p,d) and max(p,d) Nov 28 '14 at 1:27
• @Glen_b Yeah that was my first thought on the question, however depending on which coin we start with p and d would just be switched right? Nov 28 '14 at 1:43
• Yes, that was the point I was making. You can't tell which is which from the data. Nov 28 '14 at 2:03
• Ah gotcha. Any idea how I would go about finding that then? Nov 28 '14 at 2:16
• There are some other issues as well. I'm pondering whether there's enough to say for me to write an answer. Nov 28 '14 at 3:51

This is an example of a "Hidden Markov Model." There's a huge literature on how to estimate that transition probabilities and how to use the observed data to estimate the current state. In this particular case there's no way to distinguish between the two coins, but you could obtain estimates of the probabilities of heads for one coin and the other from the observations.

• Yeah it definitely depends on which coin we start with, but is there a way to find a estimates given that we started with the dime/penny? Nov 28 '14 at 5:15
• Yes, in analyzing the HMM, you could incorporate a single 100% certain observation that you started with the penny. However, this is going to provide very little information about which coin is which, so you'll be likely to end up with a likelihood function that gives virtually the same likelihoods to sets of parameters with p and d swapped. Nov 28 '14 at 17:11

Each flip of each coin is independent -- dime or penny, right or left pocket. If you get heads on a flip of the penny, it's still equally probable that you'll get heads or tails flipping the dime or the penny again. So taken independently, p = 0.5 and d = 0.5.

However, if you're trying to find the probability of a particular sequence of flip results, the probabilities are different, depending on how many flips and how many ways there are to get that particular sequence, but it still makes no difference which coin or pocket. Due to their independence, you can't find s (unless one of the coins isn't fair).

That said, there are some studies showing interesting coin flip probabilities under certain conditions. See Wolfram's Coin Tossing page for some of those.

• I'm not sure if the coins are fair or not, I'm trying to estimate what the p and d values are given a set of data Nov 28 '14 at 5:13