# likelihood of observed data when some data is missing

Context. An unknown number of patients is tested 6 times for cancer. The number of positive tests for a single patient is Bernoulli$(6,\pi)$-distributed.

Let $Z_0,Z_1,...,Z_6$ be the number of patients that have 0,1,...,6 positive tests respectively.

Question. I am given specific numbers for $Z_1,\ldots,Z_6$. The number for $Z_0$ was not recorded. I am asked to find the log-likelihood $l(\pi; Z_1,\ldots,Z_6)$ of the 'observed data'.

What I did. I found the log-likelihood of the complete data, which is $$l_0 = \log\left( \frac{k!}{z_0!\cdots z_6!} \prod_{i=0}^6 \left[ {{6}\choose{i}} \pi^i (1-\pi)^{6-i} \right]^{z_i} \right),$$ where $k$ is the total number of patients tested. I used this to derive the maximum likelihood estimator for $\pi$ $$\hat \pi = \frac{1}{6} \frac{ \sum_{i=0}^6 i z_i} {\sum_{i=0}^6 z_i}.$$ The problem. I can't really find anything on how to get rid of $Z_0$. Should I drop the $Z_0$ term in the product and then estimate $k$ using the values of $Z_1,\ldots,Z_6$? Or is there a more sophisticated theory?

## 1 Answer

Suggestion 1 You may include $Z_0$ as a parameter to be estimated by maximum likelihood. I don't think there is an easy way to get the analytical expression of the profile or concentrated likelihood with respect to $Z_0$. However, if the likelihood is optimized by means of numerical methods, then you could easily define $Z_0$ as a parameter to be passed to the optimization algorithm, along with $\pi$.

Suggestion 2 (some thoughts elaborating on Suggestion 1)

If you consider $Z_0$ as an unknown parameter, then the likelihood function would be a kind of conditional likelihood, $l_0(Z_1, \dots, Z_6 | Z_0=\xi, \pi)$ (conditional on the value chosen for $Z_0$, e.g., the value tried but the optimization algorithm at a given iteration).

You could try to integrate $Z_0$ out of this conditional log-likelihood function: $$l_0(Z_1, \dots, Z_6 | \pi) = \int l_0(Z_1, \dots, Z_6 | s, \pi) f_{Z_0}(s) ds \,.$$ By doing so, you would get an expression that does not depend on the missing data $Z_0$. It would depend on the distribution of $Z_0$, so you would need to choose a distribution for $Z_0$, $f_{Z_0}$.

In order to deal with the integral, the Bayes formula can be used. Rearranging terms yields: $$l_0(Z_1, \dots, Z_6 | \pi) = \log f(Z_1, \dots, Z_6 | Z_0=\xi, \pi) + \log f_{Z_0}(\xi) - \log f_{Z_0|Z_1, \dots, Z_6, \pi}(\xi) \quad (1)\,.$$ That is, the general likelihood function (not conditional) is equal to the conditional likelihood times the marginal distribution of $Z_0$ divided by the posterior distribution of $Z_0$ evaluated at $\xi$ (the equation above takes logs, exchanging the product by addition and division by subtraction).

The expressions for all the elements, except for the posterior distribution, are known. So here would come the tougher step. Using the fact that the posterior is proportional to the likelihood times the prior distribution, the goal would be to find the expression for the parameters of the posterior distribution in terms of the elements of the likelihood.

Once the expression for the parameters of the posterior distribution are obtained, the likelihood function could be evaluated as defined in equation (1) for a general value of $Z_0$.

The validity of this would depend on the reliability of the distribution chosen for $Z_0$. Also, note that the element $\xi$ should be fixed to some value when obtaining the expressions of the parameters of the posterior distribution.