# What distribution does $\frac{\hat p -p_0}{\sqrt{p_{0}(1-p_{0})/n}}$ have?

Suppose we're testing whether more than $$100p_0$$% Bernoulli trials are successful at the $$\alpha$$% significance level. We take a sample of $$n$$ Bernoulli trials and find that $$\hat p$$ trials are successful.

Our hypothesis test is:

$$H_0: p \leq p_0 \text{ Vs. }H_1:p>p_0$$

Then our test statistic is:

$$T=\frac{\hat p -p_0}{\sqrt{p_{0}(1-p_{0})/n}}$$

My professor says $$T$$ has a t-distribution with $$(n-1)$$ degrees of freedom, i.e. it is a t-statistic.

I am not sure what to think of this. Reflecting on the z-statistic for a sample mean, $$\frac{\bar X-\mu}{\sigma/\sqrt{n}}$$, if we did not know $$\sigma$$, we would estimate this with the sample standard deviation, $$s$$, and swap $$\sigma$$ for $$s$$. Therefore, this becomes a t-statistic, $$\frac{\bar X-\mu}{s/\sqrt{n}}$$.

In the case above, we have computed $$\sqrt{p_{0}(1-p_{0})/n}$$. We assume to know the value of $$p_0$$ under $$H_0$$. Therefore, we have nothing to estimate. So why isn't this a z-statistic rather than a t-statistic, as my professor claims?

Can someone more experienced comment on what distribution this test statistic has and why?

• Strictly speaking, it is not a t-statistic nor a z-statistic. Even if $p_0$ were known exactly, then $T$ is not exactly normal even though its distribution converges to the normal distribution by force of the CLT for $n\to\infty$. So that is a first approximation. A second approximation is replacing $p_0$ by $\hat{p}$ in the denominator in order to get a statistic that you can actually compute from the sample under the null. For any finite $n$, $T$ is not normal or $t$-distributed, but there is convergence ("almost surely") to the normal distribution asymptotically for $n\to\infty$. Nov 3 '20 at 19:22