# UMP Test of $H_0 : \theta \leq 0.1$ vs. $H_1 : \theta \gt 0.1$ for iid Geometric Random Variables

Consider $$90$$ iid geometric random variables having parameter $$\theta$$ (and thus mean $$1/\theta$$), and a UMP test of the null hypothesis that $$\theta \leq 0.1$$ against the alternative that $$\theta \gt 0.1$$. Give the approximate p-value (based on large sample results) which results for the case of the sum of the observations equal to $$723$$.

This is a practice problem (not homework). I'm given that the answer should be $$0.025$$.

I have that if $$X_i$$ are iid random variables from a full one-parameter exponential family distribution, then for a UMP test of

$$H_0:\theta\leq\theta_0 \text{ vs. } H_1:\theta\gt\theta_0$$

we can use

$$T\left(\vec{X}\right)=\sum_{i=1}^n t(X_i)$$

as a test statistic.

We have that the geometric distribution is a full one-parameter exponential family with

$$h(x)=I_{\{1,2,...,\}}(x)$$, $$c(\theta)=\theta$$, $$t(x)=x-1$$, and $$w(\theta)=\text{log}(1-\theta)$$

We can use

$$T\left(\vec{X}\right)=\sum_{i=1}^n t(X_i)$$

as a test statistic and reject $$H_0$$ for sufficiently small values of $$T(\vec{X})$$ since $$w(\theta)$$ is decreasing.

Applying the CLT to obtain an approximate p-value, we get

$$\mu_{t,0}=E_{H_0}(t(X_1))=E_{H_0}(X_1-1)=\frac{1}{0.1}-1=9$$

and

$$\sigma_{t,0}=\sqrt{\mathsf{Var}_{H_0}(t(X_1))}=\sqrt{\frac{1-0.1}{0.1^2}}=\sqrt{90}$$

So $$\frac{T\left(\vec{X}\right)-n\cdot\mu_{t,0}}{\sqrt{n}\cdot\sigma_{t,0}}\overset{d}{\longrightarrow} \mathsf N(0,1)$$

But

$$\Phi\left(\frac{723-90\cdot9}{\sqrt{90}\cdot\sqrt{90}}\right)\approx0.167\neq0.025$$

Any ideas on where I went wrong?

## 1 Answer

Since $$t(x) = x-1$$, a sufficient statistic for the data is the sample mean $$\bar{x}_n$$, which can be used as your test statistic. For the geometric distribution this has moments:

$$\mathbb{E}(\bar{X}_n) = \frac{1}{\theta} \quad \quad \quad \mathbb{V}(\bar{X}_n) = \frac{1-\theta}{n \theta^2}.$$

For large $$n$$ we can appeal to the central limit theorem to obtain the approximate distribution:

$$\frac{\bar{X}_n - \mathbb{E}(\bar{X}_n)}{\sqrt{\mathbb{V}(\bar{X}_n) }} = \sqrt{n} \cdot\frac{\theta \bar{X}_n - 1}{\sqrt{1-\theta}} \sim \text{N}(0,1).$$

Consider the hypotheses $$H_0: \theta \leqslant \theta_0$$ and $$H_A: \theta > \theta_0$$. For these hypotheses, smaller values of the sample mean are more conducive to the alternative hypothesis, and so you have p-value:

\begin{equation} \begin{aligned} p(x_1,...,x_n) &= \sup_{\theta \leqslant \theta_0} \mathbb{P}( \bar{X}_n \leqslant \bar{x}_n | \theta) \\[6pt] &= \sup_{\theta \leqslant \theta_0} \mathbb{P} \Bigg( \sqrt{n} \cdot\frac{\theta \bar{X}_n - 1}{\sqrt{1-\theta}} \leqslant \sqrt{n} \cdot\frac{\theta \bar{x}_n - 1}{\sqrt{1-\theta}} \Bigg| \theta \Bigg) \\[6pt] &\approx \sup_{\theta \leqslant \theta_0} \Phi \Bigg( \sqrt{n} \cdot\frac{\theta \bar{x}_n - 1}{\sqrt{1-\theta}} \Bigg) \\[6pt] &= \Phi \Bigg( \sqrt{n} \cdot\frac{\theta_0 \bar{x}_n - 1}{\sqrt{1-\theta_0}} \Bigg) \\[6pt] &= \Phi \Bigg( \frac{1}{\sqrt{n}} \cdot\frac{\theta_0 n \bar{x}_n - n}{\sqrt{1-\theta_0}} \Bigg). \\[6pt] \end{aligned} \end{equation}

Your example: In your particular case you have $$\theta_0 = 0.1$$, $$n = 90$$ and $$\bar{x}_n = 723/90$$. So your approximate p-value should be:

\begin{equation} \begin{aligned} p &\approx \Phi \Bigg( \frac{1}{\sqrt{90}} \cdot\frac{0.1 \cdot 723 - 90}{\sqrt{1-0.1}} \Bigg) \\[6pt] &= \Phi \Bigg( \frac{1}{\sqrt{90}} \cdot\frac{72.3 - 90}{\sqrt{0.9}} \Bigg) \\[6pt] &= \Phi \Bigg( - \frac{1}{\sqrt{90}} \cdot\frac{17.7}{\sqrt{0.9}} \Bigg) \\[6pt] &= \Phi \Bigg( - \frac{17.7}{\sqrt{81}} \Bigg) \\[6pt] &= \Phi \Bigg( - \frac{17.7}{9} \Bigg) \\[6pt] &= \Phi ( - 1.9 \bar{6} ) \\[6pt] &= 0.02461083. \\[6pt] \end{aligned} \end{equation}

In your calculation you made an error in the last line where you substituted $$T(\vec{X}) = 723$$ instead of $$T(\vec{X}) = 723-90 = 633$$ (consistent with your definition of $$T(\vec{X})$$). If you correct this error then you get the same value as in my working.