In reading through the literature on z-tests for difference in proportions, I often see it stated that the null hypothesis only tests whether p1 = p2, not whether p1 = p2 = any specific value for the pooled proportion. But in fact when we use the overall/pooled proportion from our sample to estimate the population proportion to calculate our test statistic, are we not actually making a concrete assumption about a specific value that p1 and p2 are both equal to?
As an illustration, suppose a researcher is interested in evaluating whether men or women in a large city are more likely to own a pet. The researcher performs separate, independent random samples of 20 men and 20 women and records whether they own a pet or not. Now lets say the results are that 8 of the 20 men own pets, and 12 of the 20 women own pets. The overall (pooled) proportion of pet owners from this exercise is 20/40 or 0.5. By using 0.5 to calculate our test statistic, aren't we really testing the probability that p1 = p2 = 0.5? There is nothing in the standard calculation of the test statistic which says anything about the probability that p1 = p2 = 0.2, or 0.8, or any other value other than 0.5.
It seems to me that if you wanted to really test the probability p1 = p2 = any specific value, you would need to run separate tests for specific different possible p1=p2 values, and then weight the outcomes by the likelihood of these different possible prior probabilities. But that begs the question of what the distribution of prior probabilities looks like....
But really rather than getting into a long discussion on a much more complex analysis involving estimating alternative prior probability distributions, I really am looking for confirmation that the more common approach of using a z-test for difference in proportions is actually testing the validity of a null hypothesis that p1 = p2 = the specific value as determined by the pooled sample proportion - despite what I have commonly encountered in textbooks and online explanations which claim that no specific value for p1 = p2 is being tested.