Maximum Likelihood Estimation

superwolf
$$L(x_1,x_2,...,x_n;\theta)=\Pi _{i=1}^n (\frac{\theta}{2})^x (1-\frac{\theta}{2})^{1-x} = (\frac{\theta}{2})^{\Sigma^n_{i=1}x_i}(1-frac{\theta}{2})^{n-\Sigma^n_{i=1}x_i}$$

Correct so far if $$f(x) = (\frac{\theta}{2})^x (1-\frac{\theta}{2})^{1-x}$$?

$$lnL(x_1,x_2,...,x_n;\theta) = \Sigma^n_{i=1} x_i ln(\frac{\theta}{2}) + (n-\Sigma_{i=1}x_i) ln(\frac{1}{2 - \theta})$$

$$\frac{d lnL}{d \theta}(x_1,x_2,...,x_n;\theta) = Sigma^n_{i=1}x_i \cdot \frac{1}{\theta - }(n-\Sigma^n_{i=1}x_i) \frac{1}{2-\theta}$$

Last edited:

Billy Bob
Mostly right, with some typos.

$$lnL(x_1,x_2,...,x_n;\theta) = \Sigma^n_{i=1} x_i ln(\frac{\theta}{2}) + (n-\Sigma_{i=1}x_i) ln(\frac{1}{2 - \theta})$$

$$\ln L(x_1,x_2,...,x_n;\theta) = \Sigma_{i} x_i \ln(\frac{\theta}{2}) + (n-\Sigma_{i}x_i) \ln(\frac{2 - \theta}{2})$$

$$\frac{d lnL}{d \theta}(x_1,x_2,...,x_n;\theta) = Sigma^n_{i=1}x_i \cdot \frac{1}{\theta - }(n-\Sigma^n_{i=1}x_i) \frac{1}{2-\theta}$$

$$\frac{d\ln L}{d \theta}(x_1,x_2,...,x_n;\theta) =\frac{\Sigma_{i}x_i}{\theta}\, -\,\frac{n-\Sigma_{i}x_i}{2-\theta}$$

Now combine into a single fraction, set equal to zero, and solve for theta.

superwolf
I'll try.

Last edited:
superwolf
It worked! Great stuff, thanks!

$$\hat{\theta}=\frac{2}{n}\Sigma^n_{i=1}X_i$$

Now, $$E(\hat{\theta}) = \theta$$ and $$Var(\hat{\theta})=\frac{2 \theta}{n}(1-\frac{\theta}{2})$$.

Find a 95% confidence interval for $$\theta$$ by using that $$\frac{\hat{\theta} - \theta}{\sqrt{\frac{2 \hat{\theta}}{n}(1-\frac{\hat{\theta}}{2})}}$$

Can I use this formula?

With n=100 and $$\Sigma^n_{i=1}X_i = 32$$ I get

$$\hat{\theta}=0.64$$, but using the formula above gives doesn't give me the correct interval, which is [0.46, 0.82]

Edit: I get the right interval when I don't include the $$\sqrt{n}$$ in the formula above. Is the formula wrong?

Last edited:
Billy Bob
You used the wrong formula. You have to derive your own confidence interval formula.

I assume you meant to say that $$\frac{\hat{\theta} - \theta}{\sqrt{\frac{2 \hat{\theta}}{n}(1-\frac{\hat{\theta}}{2})}}$$ is standard normal.

Then $$P(-1.96<\frac{\hat{\theta} - \theta}{\sqrt{\frac{2 \hat{\theta}}{n}(1-\frac{\hat{\theta}}{2})}} <1.96 )=0.95$$

Now rearrange to get

$$P(\text{thing}<-\theta<\text{other thing})=0.95$$

and then finally

$$P(-\text{thing}>\theta>-\text{other thing})=0.95$$

Last edited: