Hypothesis test beyond simple hypotheses (mathematical statistics) In mathematical statistics, the following problem (simple hypothesis test) is considered: given a data sample, test the hypothesis $H_0$ stating that all sampled values are values of a random variable with a given distribution $P_0$ against the hypothesis $H_1$ stating that all sampled values are values of a random variable with another given distribution $P_1$. 
The question I am dealing with is a bit more general: test the same hypothesis $H_0$ against the hypothesis $H_1'$ stating that some of the sampled values are values of a random variable with a given distribution $P_0$, and some others are values of a random variable with another given distribution $P_1$. 
The original question is usually settled using Neyman-Pearson Lemma (https://en.wikipedia.org/wiki/Neyman-Pearson_lemma). What are the methods available for the more general hypothesis test? I know mathematical statistics from a postgraduate qualifying exam, but I am not a specialist. I need this for applied statistical problems I am solving, and I failed to find an answer in available textbooks and monographs. Can you direct me to some approaches?
 A: You may want to model the situation by assuming that the alternative distribution is the mixture $P_t:=(1-t)P_0+tP_1$ of the distributions $P_0$ and $P_1$, for some $t\in(0,1]$. You may then want to test for the value of the mixture parameter $t$. Let $f_t$ be the Radon--Nikodym density/derivative of $P_t$ with respect to some appropriate measure (e.g. $P_0+P_1$), so that $f_t=(1-t)f_0+tf_1$. Then for any $s$ and $t$ such that $0\le s<t\le1$ the likelihood ratio 
$$r_{t,s}:=\frac{f_t}{f_s}=\frac{tr+1-t}{sr+1-s}
$$ 
is a nondecreasing function of $r:=r_{1,0}$. (Here I am assuming for simplicity that $f_0>0$ everywhere; otherwise, rather straightforward adjustments have to be made; for instance, one may assume that $a/0=\infty$ if $a>0$, $0\cdot\infty=0$, $0/0\ge b$ and $0/0\le b$ for any $b\in[0,\infty]$.)
So, by the Karlin–Rubin theorem (see a version of it for non-randomized tests at [wikipedia]), for any $t_0\in[0,1]$ and any $t_1\in(t_0,1]$, any Neyman--Pearson test of size $\alpha\in(0,1)$ (say of the form "reject $H_{t_0}$ iff $r_{t_1,t_0}>c$ ", for some critical value $c>0$) for testing the simple hypotheses $H_{t_0}\,\colon t=t_0$ vs. $H_{t_1}\,\colon t=t_1$ will also be a uniformly most powerful test of level $\alpha$ for the null hypothesis $H_{t_0}\,\colon t=t_0$ (or $H_{\le t_0}\,\colon t\le t_0$) vs. the composite alternative hypothesis $H_{>t_0}\,\colon t>t_0$. 
In particular, for any $t_1\in(0,1]$, any Neyman--Pearson test of size $\alpha\in(0,1)$ for testing the simple hypotheses $H_0\colon t=0$ vs. $H_{t_1}\,\colon t=t_1$ will also be a uniformly most powerful test of level $\alpha$ for $H_0\colon t=0$ vs. $H_{>0}\,\colon t>0$. 
