Find the MLE of a parameter for a random variable with a given density.

92 Views Asked by At

Let $X$ be a random variable with density:

$ f_{X}(x) = \begin{cases} 1 - \theta & \frac{-1}{2} < x < 0 \\ 1 + \theta & 0 \leq x < \frac{1}{2} \\ 0 & otherwise \end{cases} $

Where $\theta \in (-1,1)$ is an unkown value. We have a random sample $X_{1},...,X_{n}$.

Find the maximun likelihood estimator for $\theta$.


This was an excersive on a test I took a few weeks ago and while I passed the test I still can't figure out what is the correct approach to this problem. I went through my notes and haven't seen a problem like this before.

I tried the usual way of writing $L(\theta, X_{1},...,X_{n})$ and trying to maximize it but that got me nowhere useful.

Any help would be greatly appreacited, thanks!

1

There are 1 best solutions below

0
On

Let $a=\sum_{i=1}^n\mathbf 1_{(-\frac{1}{2},0)}(X_i)$ be the number of observations between $-\frac{1}{2}$ and $0$. Then the number of observations in $\left[0,\frac{1}{2}\right)$ is $n-a$. The likelihood function is $$L(\theta)=(1-\theta)^a(1+\theta)^{n-a}$$ and the log-likelihood function is $$l(\theta)=a\log (1-\theta)+(n-a)\log (1+\theta)$$ Differentiating $l(\theta)$ and equating it to $0$, $$l'(\theta)=-\frac{a}{1-\theta}+\frac{n-a}{1+\theta }=\frac{-a(1+\theta)+(n-a)(1-\theta)}{1-\theta^2}=\frac{-n\theta -2a+n}{1-\theta ^2}$$ This gives our desired MLE: $$\theta_{\text{MLE}}=\frac{n-2a}{n}=\frac{n-2\sum_{i=1}^n\mathbf 1_{(-\frac{1}{2},0)}(X_i)}{n}$$