Using sample standard deviation to estimate the standard error

In single-sample hypothesis testing, we can collect a sample and test whether the mean of this sample might have been drawn from the same population as some hypothesised mean. We use the standard deviation of the sample to estimate standard error of the population mean. If the probability is <0.05 that our sample mean was drawn from the same population as our hypothesised mean, we conclude our sample mean and hypothesised mean belong to different populations. Why then is it fair to use the standard deviation of our sample mean to estimate the standard error of the population mean? If they belong to different populations, the variation in each population is surely likely to be different.

• "If they belong to different populations", the null hypothesis is that they belong to the same population, and you are testing under $H_0$ Dec 17, 2014 at 13:43
• I believe that's captured in my question. If P < 0.05 we reject the null and conclude they are from different populations. But the estimate of the standard error still assumes they are from the same population, which seems unfair. Dec 17, 2014 at 13:46
• There's a related question here, for which the answers may be useful. Dec 17, 2014 at 14:26

• Hence, my comment was that the testing is "under $H_0$". Dec 18, 2014 at 16:21