Maximizing Theta in a Summation Formula

127 Views Asked by At

I need to take the first derivative of

$$\sum Y_i (\log(\Theta )) +(n-\sum Y_i)(\log(1-\Theta )) $$

with respect to theta, and then solve for theta. I believe this is my derivative...

$$\frac d{d\Theta} =\frac{ \sum Y_i}{ \Theta} +\frac{(n-\sum Y_i)}{1-\Theta} $$

but now (if that is right) I dont know how to solve for theta...

2

There are 2 best solutions below

2
On

You want to solve $0 =d/d\Theta =\frac{ \sum Yi}{ \Theta} +\frac{(n-\sum Yi)}{1-\Theta} $.

Letting $a = \sum Yi$ and $b = (n-\sum Yi)$, this is $0 =\frac{a}{ \Theta} +\frac{b}{1-\Theta} $.

Multiplying by $\Theta(1-\Theta)$, this becomes $0 =a(1- \Theta) +b\Theta =a +(b-a)\Theta $, so $\Theta =\frac{a}{a-b} =\frac{\sum Yi}{\sum Yi-((n-\sum Yi))} =\frac{\sum Yi}{2\sum Yi-n} $.

0
On

You have forgotten to derive $(1-\Theta)$, which is $-1$.

Therefore the derivative is $$d/d\Theta =\frac{ \sum_{i=1}^n Y_i}{ \Theta} \color{blue}{-}\frac{(n-\sum_{i=1}^n Y_i)}{1-\Theta}=0 $$

$$\frac{1-\Theta}{ \Theta} =\frac{(n-\sum_{i=1}^n Y_i)}{ \sum_{i=1}^n Y_i}$$

$\frac{1}{ \Theta}-1=\frac{n}{ \sum_{i=1}^n Y_i}-1 \quad |+1$

$\frac{1}{ \Theta}=\frac{n}{ \sum_{i=1}^n Y_i}$

$\Theta=\frac{\sum_{i=1}^n Y_i}{n}$

$\boxed{\Theta=\overline Y}$