# Finding the Maximum Likelihood Estimator for a random variable of mixed type

I am having issues solving the follow problem from my textbook:

Suppose we have $$x_1,...,x_n$$ i.d.d. data from a r.v. $$X$$ with unknown distribution function $$F_\theta$$, for $$\theta = (\theta_1,\theta_2)\in\Theta = [0,1] \times\mathbb R_+ \subset \mathbb R^2$$. The r.v. $$X$$ is known to be of mixed type, with density

$$f_\theta(x) = \left\{ \begin{array}{c} \frac{1}{4}\theta_1,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x = 1, \\ \frac{1}{4}(1 - \theta_1),\ \ \ \ \ \ \ x = 2, \\ \frac{3}{4}\frac{1}{\theta_2}e^{-(x-3)/\theta_2}, \ \ x\geq 3, \end{array} \right.$$

with respect to the measure $$\mu(t) = \mu_0(t)\mathbb I\{t<3\} + \mu_1(t)\mathbb I\{t\geq3\}$$, where $$\mu_0$$ is counting measure of the integers in $$\mathbb R$$ and $$\mu_1$$ is length measure on $$\mathbb R$$.

Derive the MLE of $$\theta$$.

When one deals with a variable of mixed type, I know that you consider the likelihood function $$L(\theta) = \prod_{x_i < 3}f_\theta(x_i)\cdot\prod_{x_i \geq 3}f_\theta(x_i)$$, but other that that I am not sure how to tackle this problem. So I am aware that I should begin by finding the MLE w.r.t. one of the parameters. But I don't see how one should do that when we don't know the actual values of the $$x_i's$$.

For example if none of the $$x_i's = 1$$, then $$\theta_1 = 0$$ is the maximiser, etc. This leads me to believe that there is something crucial I am missing here or is failing to consider on my own, and I haven't been able to find much help for this in the textbook that I'm using.

• What do you mean by "we don't know the actual values of the $x_i$'s" ? The sample need be known to compute the MLE. In which case $\theta_1$ is estimated from the observations in $\{1,2\}$ and $\theta_2$ from the $x_i$'s larger than $3$. Jul 19, 2021 at 5:21

Firstly, as Xi'an points out in the comments, you can't get the MLE without any data. The MLE is an estimator, and so it required data to give an estimate. So obviously you are going to need some values for the $$x_i$$ in order to estimate the parameters. This is merely a recognition that we can't estimate unknown aspects of a distribution without some observations of outcomes of the distribution.
Once you understand this part, the most important thing in these kinds of problems is to simplify the log-likelihood function as much as you can before you try to maximise. To do this, suppose you have a $$n$$ data points. Without loss of generality, let $$n_1$$ and $$n_2$$ denote the number of $$1$$s and $$2$$s in the sample and let $$(x_1,...,x_k)$$ denote the remaining values that aren't $$1$$s or $$2$$s (so you have $$n_1+n_2+k = n$$). Then you can write the log-likelihood function as:
\begin{align} \ell_\mathbf{x}(\theta_1, \theta_2) &= \sum_{i=1}^n \log f_\theta(x_i) \\[6pt] &= n_1 \log f_\theta(1) + n_2 \log f_\theta(2) + \sum_{i=1}^k \log f_\theta(x_i) \\[6pt] &= \text{const} + n_1 \log(\theta_1) + n_2 \log(1-\theta_1) + \sum_{i=1}^k \Bigg[ -\frac{x_i-3}{\theta_2} - \log(\theta_2) \Bigg] \\[6pt] &= \text{const} + n_1 \log(\theta_1) + n_2 \log(1-\theta_1) - \frac{1}{\theta_2} \sum_{i=1}^k (x_i-3) - k \log(\theta_2) \\[6pt] &= \text{const} + n_1 \log(\theta_1) + n_2 \log(1-\theta_1) - \frac{k (\bar{x}_k-3)}{\theta_2} - k \log(\theta_2), \\[6pt] \end{align}
where $$\bar{x}_k \equiv \sum_{i=1}^k x_i / k$$ is the sample mean for the data points that are not equal to $$1$$ or $$2$$. Now, this gives you a function of the parameters $$\theta_1$$ and $$\theta_2$$ that you can maximise using ordinary calculus techniques.