# Estimate p from sample of two Binomially Distributions

1. Dec 10, 2012

### Scootertaj

1. Suppose X~B(5,p) and Y~(7,p) independent of X. Sampling once from each population gives x=3,y=5. What is the best (minimum-variance unbiased) estimate of p?

2. Relevant equations
$$P(X=x)=\binom{n}{x}p^x(1-p)^{n-x}$$

3. The attempt at a solution
My idea is that Maximum Likelihood estimators are unbiased, and have asymptotic variance = Cramer-Rao lower bound. Also, C-R lower bound = minimum variance of unbiased estimators.
So, since X and Y independent, $$X+Y \sim B(5+7,p)=B(12,p)$$
Thus, can we just compute the likelihood function and take the derivative?
$$L = \binom{12}{8}p^8(1-p)^4$$
$$\frac{dL}{dp} = 8p^7(1-p)^4 - 4p^8(1-p)^3$$
Thus, $$p=8/12=2/3$$

Is that legit?

Last edited: Dec 10, 2012
2. Dec 10, 2012

### haruspex

The method is OK as far as I know (not an expert on unbiased estimators), but I have a problem with this step:
That's not what I get by putting dL/dp =0.

3. Dec 10, 2012

### Scootertaj

$$\frac{dL}{dp} = 8p^7(1-p)^4 - 4p^8(1-p)^3=0$$
$$p^7(1-p)^3[8(1-p)]-4p]=0$$
$$8-8p-4p=0$$ ignoring p=0,p=1
$$8=12p \Rightarrow p=8/12=2/3$$

Did I miss something?
Note: I screwed up my fraction simplification previously if that's what you meant.

4. Dec 10, 2012

### haruspex

Yes.

5. Dec 11, 2012

### Ray Vickson

I disagree with your expression for L, but agree with the final answer you get later. You only get B(n,p)+B(m,p) = B(n+m,p) when you perform a convolution (that is, sum over all the outcomes for each term). In your case you just have one outcome from each binomial, so you should use
$$L = {5 \choose 3}p^3(1-p)^2 {7 \choose 5} p^5 (1-p)^2.$$ Of course, this has the form $c p^8(1-p)^4,$ so will give the same result you got.

6. Dec 11, 2012

### Scootertaj

Ahh yes, I thought about that also. It's nice to see I wasn't off-base by considering that way.
Why does it not make statistical sense to use the L I suggested (which is based off the fact that X+Y~B(12,p) ?

7. Dec 11, 2012

### Ray Vickson

I already gave the explanation, although it was very brief. I mean that P(X+Y=8) = P(X=1,Y=7) + P(X=2,Y=6) + P(X=3,Y=5) + P(X=4,Y=4)+ P(X=5,Y=3), a sum of 5 terms, but you have only the term P(X=3,Y=5). Each separate term has p^8 * (1-p)^4, but with different coefficients.

Last edited: Dec 11, 2012