I am having an argument with a co-author about how to eliminate a nuisance parameter in a simple likelihood ratio test and am hoping that the community helps us settle it.
Our data $\mathbf{x}$ can be described by the likelihood functions $l(\mathbf{x};\theta_0,\eta)$ and $l(\mathbf{x};\theta_1,\eta)$ under hypotheses $H_0$ and $H_1$, where $\theta$ is the parameter of interest and $\eta$ is the random "nuisance" effect. We know the distribution function $f_\eta(\eta)$ that describes $\eta$.
The likelihood ratio is, of course, $$\Lambda(\mathbf{x},\eta)=\frac{l(\mathbf{x};\theta_0,\eta)}{l(\mathbf{x};\theta_1,\eta)}$$
Since we have $f_\eta(\eta)$, we can "average" out $\eta$ to obtain a simple test between two point hypotheses. We can then use Neyman-Pearson and calculate the value of threshold. Our argument stems from how to average it out. Since $\Lambda(\mathbf{x},\eta)$ is effectively a random variable that is a function of $\eta$, I think the following is the correct test statistic is
$$E_\eta\left[\frac{l(\mathbf{x};\theta_0,\eta)}{l(\mathbf{x};\theta_1,\eta)}\right]$$
while my co-author insists that the correct test statistic is
$$\frac{E_\eta[l(\mathbf{x};\theta_0,\eta)]}{E_\eta[l(\mathbf{x};\theta_1,\eta)]}$$ Who is right, and why?