# Is the sample proportion ($\hat p$) a random variable?

Since it should vary from sample to sample, I suppose it should be a random variable. But if it is, when we write the variance of sample proportions, should we write an uppercase P-hat as the index notation of sigma?

But in most textbooks and formula tables, it seems that a lowercase p-hat is usually used  • Yes, your estimator $\hat p$ (presumably $\frac{X}{n}$ or something essentially the same) is a random variable and your second image tells you its mean and standard deviation in terms of the population proportion Aug 20, 2022 at 22:50

In the frequentist tradition (which is what you are using here) the random variable is the data. The population parameters are mathematically treated as constant. This is what leads to the somewhat counterintuitive "null hypothesis" setup we use in intro statistics, because the probability we return (usually in the form of a p-value) is a probability on the sample given constant population parameter set at the null hypothesis values.

I would imagine this is why you see the notation you do in introductory many textbooks.

• Thank you for your reply. This is my humble understanding of hypothesis testing, and please correct me if I am wrong: the logic behind H₀ is that we suppose the parameter is equal to a corresponding null stat, the value which is a constant, such as p＝p₀＝1/2, and the logic behind Hₐ is that the parameter should be equal to a corresponding stat, the value of which is unknown but not equal to the null stat, such as p＝pₐ≠1/2. Aug 19, 2022 at 19:40
• I don't see how what you said conflicts with my explanation, so I think I may misunderstand you. I think maybe your misunderstanding is the statistics is not an estimate of the parameter in any way, it's a statistic related to the data. It's saying "given the constant null hypothesis value, here is a statistic that quantifies how odd our data is." In mathematical notation P(Data | Null Hypothesis Value). So we actually don't "update" our understanding of the constant, just of the data. You may say "isn't that really weird and nit-picky?" And I would say "Yes, frequentist statistics is weird." Aug 19, 2022 at 21:26
• Is the oddness of our data measured by multiples of standard deviation? Aug 20, 2022 at 1:43
• Yes it is. Rui's answer clarifies that point. Aug 21, 2022 at 2:30

I don't see a $$\hat{p}$$ in the figure you posted, but from the formula in the figure, $$p_1$$ and $$p_2$$ are statistics. Once you calculate a statistic, it becomes a realization of the random variable (Be aware that I am not saying that your statistic is the true population parameter).

Above all, remember that in most cases upper/lower cases are conventions. They might be widespread, which can be helpful in many cases, but there is no law that forces you to write a random variable's "name" in uppercase. It's common for introductory (and even advanced) books to have a discussion on symbols and style. That section will help you understand the notation the author(s) has adopted.

• I forgot to upload another picture until now. Aug 19, 2022 at 18:57

A statistic is a function of a random sample, therefore it is also random variable.
Like Tanner Phillips says in his answer, the frequentist school of statistics establishes a difference between a population and a sample taken from the population. Population parameters are [always] constants and to estimate those parameters we sample from the population and compute a statistic or estimate. Unless the entire population is sampled, the statistic is not a constant, it's a variable as random as the sample.

In the case of proportions, the population proportion is usually represented by a lower-case $$p$$ and the sample proportion by the very same symbol plus a marker. The sample proportion is many times noted as $$\hat p$$ but the hat-p is not a standard notation for proportion estimator, it's a frequent one, not more.

I can not find examples right now but I think that the convention of noting the sample proportion as $$\hat p$$ is not universal and is even a relatively recent one. I have also seen $$p^{\star}$$ and $$\widetilde p$$. And sometimes, not frequently, when the population proportion is noted with an upper-case $$P$$ so is the sample proportion.

• Thank you for your reply. I remeber reading in some books that population proportion is represented by π. Aug 20, 2022 at 13:30