I have seen many questions on this topic, but none of them could answer my question. Suppose I flip a coin 1,000 times and got 490 heads. I want to test if the coin is fair. I don't want to use the binomial distribution but instead I'd like to use the normal approximation. I want to test $H_0: p = 0.5$ vs $H_1 : p \neq 0.5$.
If I use the t-test, I would have to estimate the sample variance, and the reason for using a t-test would be that I don't know the population variance.
However, is it actually true that I don't know the population variance? I'm supposed to compute a test statistic, assuming that null is true. If I assume the null is true, I do know the population variance, because I know $p$ (because I assume $p = 0.5$). I should then use the z test.
Which test should I use, and why?