Let $\left(Z_1, \ldots Z_n\right)$ be an i.i.d. sample with common probability mass function $$ p_Z(j)=\vartheta^2 I_{[j=1]}+2 \vartheta(1-\vartheta) I_{[j=2]}+(1-\vartheta)^2 I_{[j=3]} $$ (a) Find a UMP size $\alpha$ hypothesis test for $H_0: \vartheta=1 / 3$ versus $H_A: \vartheta>$ 1/3 Give an explicit formula determining the constant threshold in the rejection region.
My approach:
Let $n_1$ = #(j = 1),
$n_2$ = #(j = 2),
$n_3$ = # (j = 3),
$n = n_1 + n_2 + n_3$
$P(\textbf{Z}) = 2^{n_2} \theta^{2n_1 + n_2} (1-\theta)^{2n - (2n_1 + n_2)}$
By factorization theorem we get that the sufficient statistic is $T(Z) = 2n_1 + n_2$
For $\theta_2 > \theta_1$, I am able to show that the likelihood ratio is monotone and so the UMP test is given by:
$ \phi(T(Z))$ = 1 if $T(Z) > K$, r if $T(Z) = K$, and 0 if $T(Z) < K$
So $\alpha = E_{\theta_0}(\phi(T(Z))) = P_{\theta_0}(T(Z) > K) + rP_{\theta_0}(T(Z) = K) $
I am not sure what I have so far is correct or what the next steps are on how to solve for K.