Let \( X \) be a random sample from a discrete distribution with the probability mass function \[ f(x; \theta) = P(X = x) = \begin{cases} \frac{1}{\theta}, & x = 1, 2, \dots, \theta, \\ 0, & \text{otherwise}, \end{cases} \] where \( \theta \in \{20, 40\} \) is the unknown parameter. Consider testing \[ H_0: \theta = 40 \,\, \text{against} \,\, H_1: \theta = 20 \] at a level of significance \( \alpha = 0.1 \). Then the uniformly most powerful test rejects \( H_0 \) if and only if
Step 1: Apply Neyman-Pearson Lemma
Under $H_0$, $X$ can take values $1, 2, ..., 40$. Under $H_1$, $X$ can take values $1, 2, ..., 20$.
For $x \leq 20$: $$\frac{f(x; 20)}{f(x; 40)} = \frac{1/20}{1/40} = 2$$
For $x > 20$: $$\frac{f(x; 20)}{f(x; 40)} = \frac{0}{1/40} = 0$$
Step 2: Find Critical Region
The likelihood ratio is constant (= 2) for $x \leq 20$ and 0 for $x > 20$. This means small values of $X$ provide evidence for $H_1$.
The UMP test rejects $H_0$ for small values of $X$.
Step 3: Determine the cutoff
Under $H_0$: $P(X = k) = \frac{1}{40}$ for $k = 1, 2, ..., 40$.
We need $P(X \leq c | \theta = 40) = \alpha = 0.1$: $$P(X \leq c) = \frac{c}{40} = 0.1$$ $$c = 4$$
Therefore, reject $H_0$ if and only if $X \leq 4$.
Answer: (A) $X \leq 4$