# Why use a Z test rather than T test for confidence interval of a population proportion?

Why use a Z test rather than a T test for confidence interval of a population proportion?

Let's forget about population proportions for a second. Let's say we are placing a confidence interval on the population mean of some random variable X. My understanding is that if the variance of X is known, then we can do a Z test. Otherwise (the common case), we must estimate the variance from the sample, and so we should do a T test. My understanding is that this is true EVEN if X is normally distributed. That is, if we estimate variance from the sample, the sampling distribution (not sure I have this part quite right) is a T distribution of n-1 degrees of freedom, even if X is normally distributed.

Why does the same logic not apply to estimating the population proportion? In online textbooks [2] & videos [2], a Z test is being done instead. My understanding is that if the sample size is large, the binomial distribution can be approximated with a normal distribution due to the central limit theorem, but even if that is so, aren't we estimating variance from the sample, implying the need for a T test, not a Z test?

• Similar recent question: math.stackexchange.com/q/3791622/321264. Aug 18, 2020 at 14:29
• I don't think the core of the Q has been answered there. Aug 18, 2020 at 16:44
• In estimating success probability $p,$ you have no second parameter to consider for the variance. The variance of the binomial distribution is $\sigma = np(1-p),$ where $n$ is known. The variance of the estimate $\hat p = X/n$ is $p(1-p)/n.$ That works find for testing where the null hypothesis specifies $p$ and thus also $\sigma.$ // To get a CI for $p$ you assume $\hat p$ is normal but you need $SD(\hat p),$ the std error of $\hat p.$ It is estimated as $\sqrt{\frac{\hat p(1-\hat p)}{n}}.$ For very large $n$ that est of SE mean is OK. For smaller $n$ you don't get a very good CI. Aug 20, 2020 at 4:16
• That's the reason for various other kinds of CIs for $p,$ such as Agresti, Wilson, etc. that work better for small $n.$ See Wikipedia on CI for binomial proportion. Aug 20, 2020 at 4:19