# expectation maximization in coin flipping problem - one more …

I am looking at the same coin-flipping problem - http://www.nature.com/nbt/journal/v26/n8/full/nbt1406.html?pagewanted=all

I understand the example well, but am unable to correlate it with the theory. What is the output of Step-2 (a probability function?), and how is theta maximized in Step 3 ?

Thanks, - Ranjan

## 1 Answer

Okay Ranjan. There are two biased coins with different biases. If we only flipped one coin many times (n) we can estimate that bias θa since number of successes/n is an consistent and unbiased estimate of it. But we also have a second coin with a different θ say θb. Now when we flip we don't know which coin we flipped (this is how the missing information comes in). But if the coin is selected at random so that each coin has probability 1/2 of being selected the expected value for any flip is (θa + θb)/2. According to the experiment you pick a coin 5 times and each time you flip it 10 times. They are saying that in step 1 you have an initial guess at both θa and θb. If you pretend those are the actual values then the first 10 flips come from either coin A or coin B and use can use the data to calculate a likelihood for coin a and a likelihood for coin B. You can calculate these two likelihoods and pick the one with the larger likelihood. Now pretend that you made the right decision. Now you have selected A. Now take that likelihood and find θa that maimizes it. This revises your estimate of θa but doesn't change the estimate of θb. Now repeat this process with the new pair of estimates and repeat the experiment a second time. Doing this 5 times may allow you to revise both θa and θb s estimates. But 5 times will not be enough to converge to the solution. Repeat this many more times and you should get the estimate of both θa and θb to converge. That will be the result of the EM algorithm. The first step was expectation. You take the estimates for the two parameters to determine the likelihoods. Then step 2 picks the maximum likelihood estimates. The new estimates are then used for the expectation step. I hope this helps. I think by describing the whole process in different words will anserr your specific question and make the whole process clearer.

• Ranjan. I gave you an upvote for the question because although you were confused looking at the article shows the reason for confusion and allows someone to answer it. Someone else didn't like the question and downvoted. I don't know exactly why. – Michael Chernick May 23 '12 at 19:23
• Thanks, this clarification actually helped. There is also a detailed analysis at cs.ucsb.edu/~ambuj/Courses/bioinformatics/EM.pdf . I was able to correlate the above remarks with the paper contents, and was able to understand this. – Ranjan May 24 '12 at 12:38
• Glad of that. so do i deserve an upvote? – Michael Chernick May 24 '12 at 14:52
• Yes, definitely ... I am not able to send an upvote, since I do not have enough reputation (since I just enrolled). Have marked your answer as the right answer. Will try upvoting later. – Ranjan May 24 '12 at 18:55