Maximum likelihood estimation of p from a Binomial sample count

There is already an answer here on the ML estimator for binomial p: Maximum likelihood estimation of p in a Binomial sample

Let me add a twist to the question: let's assume we don't know all the samples, but only count for a single value. So, for example, we have drawn M samples from a binomial distribution with known parameter N and unknown parameter p. The only information we know is that out of these M samples, m of them are equal to some value k.

So my question is: what is the ML estimator for p in Bin(N,p) if we know that m out of M samples are equal to k?

• Just for clarity: the problem is that you (for concreteness) have two coins (A and B) with different probabilities of generating a head, and you don't know how many flips come from each coin. Your objective is to estimate the probability of generating a head from coin A? Does that seem about right? Commented Feb 8, 2018 at 17:20
• This question definitely needs more clarity! Could you provide a more specific description of your model? What exactly is the relationship between the "1000" and "500 samples" you stipulate at the end?
– whuber
Commented Feb 8, 2018 at 17:22
• Sorry for confusing you, I edited the question. I hope it is clearer now. Commented Feb 8, 2018 at 18:58
• If I understand correctly, you can readily reduce this to a simpler problem. Since the chance that a Binomial$(N,p)$ observation equals $k$ is given by $q=\binom{N}{k}p^k(1-p)^{N-k}$, you have data that are equivalent to flipping a coin $M$ times, observing it came up heads $m$ times, and wish to estimate the chance $q$ of heads. From $q$ you can compute $p$.
– whuber
Commented Feb 8, 2018 at 22:49
• Great idea! Can you offer it as an answer? Commented Feb 9, 2018 at 10:52

Since the chance that a Binomial$$(N,p)$$ observation equals $$k$$ is given by $$q=\binom{N}{k}p^k(1-p)^{N-k}$$, you have data that are equivalent to flipping a coin $$M$$ times, observing it came up heads $$m$$ times, and wish to estimate the chance $$q$$ of heads. From $$q$$ you can compute $$p$$.