Most powerful test for deciding probability mass function Let $X$ be an integer valued random variable supported on $\{0.1.2...,12\}$ whose pmf is either $g(x)=1/13; x=0,1,...,12$ or
$ f(x)=\dfrac x {36} 1_{\{0,1,...,6\}} + (\dfrac 13 - \dfrac x{36})1_{\{7,8,...,12\}}; x =0,1,...,12$. (where $1_A$ denotes the indicator function of a set $A$)
On the basis of one single observation $X$, how to construct the most powerful test of
$H_0: $ pmf of $X$ is $f$ vs. $H_1:$ pmf of $X$ is $g$ , at a $0.25$ level of significance ? 
I don't know, have never encountered, testing  hypothesis for pmf before ... I have only known testing hypothesis for parameter. 
A detailed solution of this, with some relevant reading material will be much appreciated. 
Thanks in advance. 
 A: Recall the construction of most powerful test using the fundamental Neyman-Pearson lemma.
Consider the problem of testing a simple null against a simple alternative, namely $$H_0:X\sim f_0\quad\text{ vs }\quad H_1:X\sim f_1\,(\ne f_0)$$
, where $X$ is a random variable/vector, $f_0$ (or $f_{H_0}$) is the null distribution which is completely specified, and $f_1$ (or $f_{H_1}$) is the alternative distribution which is also completely specified.
Then any test $\varphi$ of the form 
$$\varphi(x)=\begin{cases}1&,\text{ if }f_1(x)>kf_0(x)\\ \gamma&,\text{ if }f_1(x)=kf_0(x)\\0&,\text{ if }f_1(x)<kf_0(x)\end{cases}$$
where $\gamma\in(0,1)$ and $k>0$ are such that $\varphi$ is of size $\alpha$, is a most powerful size $\alpha$ test for testing $H_0$ against $H_1$.
Since you are familiar with hypothesis testing of parameters using N-P lemma, the above would not come as much of a surprise. After all, if your distribution $f$ was indexed by the parameter $\theta$ you would do the same thing for testing, say, $H_0:\theta=\theta_0$ vs $H_1:\theta=\theta_1\,(\ne\theta_0)$. In that case, $f_0$ becomes $f_{\theta_0}$ and $f_1$ becomes $f_{\theta_1}$.

To get you started, let $f$ be the pmf of $X$.
Since both the null and alternative distributions are discrete, a most powerful level $\alpha=0.25$ test for testing $H_0$ against $H_1$ is simply of the form
$$\varphi(x)=\begin{cases}1&,\text{ if }x\in E\\0&,\text{ otherwise }\end{cases}$$
, where $$E_{H_0}\varphi(X)\le 0.25$$
To choose the set of points in $E$, compute the likelihood ratio $\lambda(x)=\frac{f_{H_1}(x)}{f_{H_0}(x)}$ for each $x$, and write the different values of $\lambda(x)$ in decreasing order (because we reject $H_0$ for large values of $\lambda(x)$).
For this question, the order looks something like $$\lambda(0)=\lambda(12)>\lambda(1)=\lambda(11)>\ldots\tag{*}$$
The critical region $E$ would consist of sample points taken according to the preference rule $(*)$. So here $0,12$ would be the first values to enter into $E$, and so on until $E_{H_0}\varphi(X)$ exceeds $0.25$.
[The test $\varphi$ might not be an exact size $\alpha$ test, in which case you would have to use randomisation.]
