--- tags: question --- # Metrics PS6 Q2 ## Question The joint density of $X$and $Y$ is given by $$ f(x,y) = \begin{cases} 2\theta^{-2} &\text{ for } x+y \ge \theta, 0 \le x, 0 \le y,\\ 0, &\text{otherwise}. \end{cases} $$ We test $H_0:\theta = 0.5$ against $H_1:\theta \neq 0.5$, where we assume $0 < \theta \le 1$, on the basis of one observation on $(X,Y)$. a) Derive the likelihood ratio test of size $0.25$. b) Derive its power function and draw its graph. c) Show that it is the uniformly most powerful test of size $0.25$. ## Answer ### a The test statistic of likelihood ratio test should be, \begin{align*} \frac{\sup_{\theta =0.5 } L(x,y; \theta)}{\sup_{\theta \in \Theta} L(x, y; \theta) } &= \frac{ 2 \cdot 4 \cdot 1_{\{x+y \le 0.5} \}}{ 2 \cdot (x+y)^{-2} }\\ &= 4 (x+y)^2 \cdot 1_{ \{x+y \le 0.5\}} \end{align*} To calibrate the size, \begin{align*} \alpha &= P_{\theta = 0.5} (X+Y \le k) = 0.25\\ &= \frac{\frac{1}{2} k^2}{\frac{1}{2} (0.5)^2} \implies k = 0.25 \end{align*} reject $H_0$ if $$ x+y \le 0.25 \text{ or }x+y > 0.5 $$ ### b \begin{align*} \beta(\theta) &= P_{\theta } (X+Y \le k \text{ or }x+y > 0.5 )\\ &= 1_{(\theta \le 0.25)} + \frac{1}{16} \theta^{-2} 1_{(0.25 < \theta \le 0.5)} + (\frac{1}{2} \theta^2-\frac{3}{32}) 1_{(\theta >0.5)} \end{align*} ### c Let $R = {(x, y) : x+y < 0.5}$. For any $\theta_1 < 0.5$, this test is UMP based on Neyman-Pearson lemma. If $\theta_1>0.5$, the power of any test decision function $\delta$ is \begin{align*} \beta(\theta) &=P((x+y) \in R) P(\delta =1| (x+y) \in R) + P((x+y) \in R^c) P(\delta =1| (x+y) \in R^c)\\ &= \frac{1}{4} \theta^{-2} P(\delta =1| (x+y) \in R) + (1-\frac{1}{4} \theta^{-2}) P(\delta =1| (x+y) \in R^c) \end{align*} If the size of $\delta$ is $0.25$, the first term must be $\frac{1}{16} \theta^{-2}$. Hence, any test with size $0.25$ can not have higher power than this one. Alternatively, based on the beta function, \begin{align*} \beta(\theta) &= P_{\theta } (X+Y \le k \text{ or }x+y > 0.5 )\\ &= 1_{(\theta \le 0.25)} + \frac{1}{16} \theta^{-2} 1_{(0.25 < \theta \le 0.5)} + (\frac{1}{2} \theta^2-\frac{3}{32}) 1_{(\theta >0.5)} \end{align*} If $\theta \le 0.25$, any test could not have the power higher than $1$. If $0.25 < \theta \le 0.5$, any test have power $a$ must have the size $$ \alpha \ge 4 a \theta^2, $$ so any test with size $0.25$ cannot have higher power.