0

The image below is the final steps taken from the MLE for the Pr. of success (parameter $\pi$) to a Negative Binomial. Source: SE thread. Here are the final steps from that:

$ \frac{d\ell(\pi;x_i)}{d\pi} = \sum_{i=1}^{n}[\dfrac{k}{\pi}-\dfrac{(x_i-k)}{(1-\pi)}]$

Set this to zero,

$\frac{nk}{\pi}=\frac{\sum_{i=1}^nx_i-nk}{1-\pi}$

$\therefore$ $\hat\pi=\frac{nk}{\sum_{i=1}^nx}$

I'd like to know the algebra that got us from the second to last line to the final line ($\pi$-hat). I can't seem to reproduce the answer because there is a $\pi$ on both sides of the equation.

User1865345
  • 8,202
baverso
  • 103
  • 1
    Please type your question as text, do not just post a photograph (see here). When you retype the question, add the [self-study] tag & read its wiki. Then tell us what you understand thus far, what you've tried & where you're stuck. We'll provide hints to help you get unstuck. – gung - Reinstate Monica Jan 31 '17 at 14:28
  • I agree with you that if this is from a textbook I would have done exactly as you've stated. However, this screenshot is not from a textbook. I've quoted the source. It's the answer to someone's prior stack exchange. I also normally post my work when I have questions as I have in math exchange so I'm familiar with the conventions. But this question I can see is likely a fairly direct answer. – baverso Jan 31 '17 at 14:39
  • It doesn't really matter if this is actually from a textbook or not. Nor does it matter if this is actually homework or not. This is clearly self-study according to our definition, & our policy applies the same either way. – gung - Reinstate Monica Jan 31 '17 at 15:02

1 Answers1

2

1) Multiply both sides by $\pi(1-\pi)$

$$nk(1-\pi) = \pi \big(\sum_{i=1}^n(x_i)-nk \big)$$

2) Isolate $\pi$

$$\pi\big((\sum_{i=1}^n(x_i)-nk ) + nk\big) = nk$$

$$\hat{\pi}=\frac{nk}{(\sum_{i=1}^n(x_i))}$$

Knarpie
  • 1,648