How to calculate the critical region in a numerical likelihood ratio test?

42 Views Asked by At

Let $N$ be a discrete random variable. Let $H_0$ and $H_1$ be the two hypotheses $$\begin{align}f(n|H_0)=p_n&=\mathbb P(N=n|H_0)\\f(n|H_1)=q_n&=\mathbb P(N=n|H_1)\end{align}$$ where $p_n$ and $q_n$ are known. (In practice, I have two histograms which represent the two distributions.) Let also $\mathbf N=(N_1,\dots,N_{15})$ be a random sample from the variable $N$.

By the Neyman-Pearson lemma, letting $$\lambda(\mathbf n)=\frac {L(\mathbf n|H_0)}{L(\mathbf n|H_1)}=\prod_{i=0}^{15}\frac {p_{n_i}}{q_{n_i}}\,,$$the most powerful test at a significance level $$\alpha=\mathbb P(\lambda(\mathbf N)\le k_\alpha |H_0)$$ is $$\lambda(\mathbf N)\le k_\alpha\,.$$

Given $\alpha$, how to calculate $k_\alpha$? Or vice versa, given $k_\alpha$ how to calculate $\alpha$?

It seems a stupid question to me, but, still, all of the answers to this question I've found were relative to cases where you could express $\lambda$ analytically in terms of some test statistics, and you could use some known distribution. I have no idea how to handle this case where instead the two distributions are known only numerically.