Problem with deriving uniformly powerful test

60 Views Asked by At

Let's consider discrete variable $X$ with the following distribution for $\Theta = \{0, 1\}$:

$$f(x;0) = (0.420, 0.054, 0.526)$$ $$f(x;1) = (0.046, 0.239, 0.715)$$

I want to derive uniformly powerful test for it with $H_0: \theta = 0, H_1: \theta = 1$

My intuitive problem is the following: I know that critical region is in form of

$$R = \{X: \frac{f_1(X)}{f_0(X)} > k\}$$

where $k$ is chosen in such a way that $P(f(X; 0) > f(X; 1)) = \alpha$

However this likelihood for $\theta = 0$ equals to $0.42 \cdot 0.054 \cdot 0.526 = 0.01192968$ and for $\theta = 1$ we have $0.046 \cdot 0.239 \cdot 0.715 = 0.00786071$ so it does not depend on theta, and probability $P(f(X; 0) > f(X; 1)) = 1$.

Can you please point mistake in my way of thinking?

EDIT

I must say that I have hard time understating the answer. One of the main things that I don't understand is that $c$ is picked three times differently, whereas to my knowledge $c$ should be picked as such a number that satisfies:

$$P_{\theta = 0}(f_1(x) > c f_0(x) = \alpha)$$

Now we know that $f_1(x) = \prod_{i = 1}^n f(x_i, 1)$ and $f_0(x) = \prod_{i = 1}^n f(x_i, 0)$

Could you please correct where I'm thinking incorrectly?

1

There are 1 best solutions below

2
On

The assumptions of Neymann-Pearson are satisfied, so there exists a UMP test of the form $$T(X)=\begin{cases} 1&f(X,1)>cf(X,0)\\ \gamma & f(X,1)=cf(X,0)\\ 0&f(X,1)<cf(X,0) \end{cases}$$ where $\gamma \in [0,1]$ and $c\geq 0$ s.t. $E_0[T(X)]=\alpha$. Suppose we have a single random sample $X=X_1\in \{1,2,3\}$. $$\frac{f(x_1,1)}{f(x_1,0)}=\frac{p_{1,1}}{p_{1,0}}\mathbf{1}_{\{1\}}(x_1)+ \frac{p_{2,1}}{p_{2,0}}\mathbf{1}_{\{2\}}(x_1)+\frac{p_{3,1}}{p_{3,0}}\mathbf{1}_{\{3\}}(x_1)$$ From the data, we know that: $$\frac{p_{1,1}}{p_{1,0}}<\frac{p_{3,1}}{p_{3,0}}<\frac{p_{2,1}}{p_{2,0}}$$ Set $A(c)=\{x:f(x,1)>cf(x,0)\},\,E(c)=\{x:f(x,1)=cf(x,0)\}$. Suppose $$c=p_{1,1}/p_{1,0}$$ We get $$\begin{aligned}P_0(f(X,1)>cf(X,0)) &=p_{1,0}\mathbf{1}_{A(c)}(1)+p_{2,0}\mathbf{1}_{A(c)}(2)+p_{3,0}\mathbf{1}_{A(c)}(3)=\\ &=p_{2,0}+p_{3,0}\end{aligned}$$ and $$P_0(f(X,1)=cf(X,0))=p_{1,0}\mathbf{1}_{E(c)}(1)+p_{2,0}\mathbf{1}_{E(c)}(2)+p_{3,0}\mathbf{1}_{E(c)}(3)=p_{1,0}$$ therefore $$E_0[T(X)]=p_{2,0}+p_{3,0}+\gamma p_{1,0}=\alpha$$ set $$\gamma^*=\frac{\alpha-p_{2,0}-p_{3,0}}{p_{1,0}}\geq 0\implies \alpha \geq p_{2,0}+p_{3,0}$$ So if $\alpha \geq p_{2,0}+p_{3,0}$ this is the UMP test. Suppose now $$c=p_{3,1}/p_{3,0}$$ We get $$\begin{aligned}P_0(f(X,1)>cf(X,0)) &=p_{1,0}\mathbf{1}_{A(c)}(1)+p_{2,0}\mathbf{1}_{A(c)}(2)+p_{3,0}\mathbf{1}_{A(c)}(3)=\\ &=p_{2,0}\end{aligned}$$ and $$P_0(f(X,1)=cf(X,0))=p_{1,0}\mathbf{1}_{E(c)}(1)+p_{2,0}\mathbf{1}_{E(c)}(2)+p_{3,0}\mathbf{1}_{E(c)}(3)=p_{3,0}$$ therefore $$E_0[T(X)]=p_{2,0}+\gamma p_{3,0}=\alpha $$ set $$\gamma^*=\frac{\alpha-p_{2,0}}{p_{3,0}}$$ we get $$0\leq \gamma^*\leq 1\implies p_{2,0}\leq \alpha \leq p_{2,0}+p_{3,0}$$ so if $p_{2,0}\leq \alpha \leq p_{2,0}+p_{3,0}$ this is the UMP test. In conclusion: $$c=p_{2,1}/p_{2,0}$$ We get $P_0(f(X,1)>cf(X,0))=0$ and $$P_0(f(X,1)=cf(X,0))=p_{2,0}\implies \gamma^*=\alpha/p_{2,0}$$ $$\gamma^*\leq 1 \implies \alpha \leq p_{2,0}$$ So here we have finally the values for $(c,\gamma)$ for all levels of $\alpha$.