Suppose that random numbers x are generated on the computer using the following procedure:
- Generate two numbers $x_1$, $x_2$ from a uniform distribution $\mathcal{U}$([0,1])
- If $x_1$ > f, take x = $x_2$, otherwise x = m $x_2$,
where f and m are two real constants between 0 and 1.
The value of f=0.2 is known, while m is unknown and we want to infer its value from a list of N outputs using the Maximum Likelihood Estimator.
I somehow managed to write the pdf $p_X(x)$ for a single observation:
$p_X(x)=\frac{1}{m(1+f)+f}\mathcal{I}(0<x<m)+\frac{f}{m(1+f)-f}\mathcal{I}(m<x<1)$,
where $\mathcal{I}(a<x<b)$ is the indicator function.
The likelihood is defined as $\mathcal{L}=\prod_i p(x_i)$, and in order to find the MLE i have to solve the known equation $\frac{d}{dm}\log\mathcal{L}=0$.
I find some issues in writing the likelihood, because i find myself with
$\mathcal{L(m|x_1,...,x_N)}=\prod_i p(x_i)=\frac{1}{(m(1+f)+f)^a}+\frac{(1-f)^{N-a}}{(m(1+f)+f)^{N-a}}$, where $a$ is the number of observations $x_i$ for which $x_i<m$. But i added a further unknown parameter to my problem.
I think I am having some issues multiplying the indicator functions, or maybe I have determined the wrong pdf for my problem.
Many thanks in advance.