Given a random variable $Y$ with pdf $\ f_Y(y| \theta) = \frac{\Gamma(2\theta)}{(\Gamma(\theta))^2} y^{\theta-1}(1-y)^{\theta-1}I_{(0,1)}(y)$ and $\theta \in (0,\infty)$.
(a) Let $Y$ be the test statistics. Determine the test function for the most powerful size $0.1$ test with $H_0: \theta = 2$ versus $H_1: \theta = 1$.
(b) Using the same test statistics, find the $p$-value if the observed $y = 0.25?$
My attempt:
(a) First, since the two hypothesis are both simple, the Neyman-Pearson Lemma would apply here. Now, the ratio $r(y) = \frac{f(y|\theta_1)}{f(y|\theta_0)} = 6(\frac{y^2}{2} - \frac{y^3}{3})$. Now, I want to find the test function $\phi(y)$ such that $\phi(y) = 1$ if $r(y) > k$, and $=0$ if $r(y) < k$ for some $k\geq 0$.
Now, since we are given MP size $0.1$ test, we would have: $0.1 = E(\phi(y)) = P(0.5 - \frac{\sqrt{3-2k}}{2\sqrt{3}} < X < 0.5 + \frac{\sqrt{3-2k}}{2\sqrt{3}})$ $ = P(X < 0.5 + \frac{\sqrt{3-2k}}{2\sqrt{3}}) - P(X < 0.5 - \frac{\sqrt{3-2k}}{2\sqrt{3}})$ for some $k\in [0, 1/2]$.
But this equation results in no solution for $k$, and I do not understand why this is the case. Could someone please help me with this part?
(b) $P_{\theta = 2}(Y\geq 0.25) = 1 - P_{\theta = 2}(Y\leq 0.25) = 1 - 6(0.25^2/2 - 0.25^3/3) = 0.844$. Thus, $p$-value $= \fbox{0.844}$. Is this correct?