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


 A: 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.
A: 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.
A: 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.
