Should we use the hypothesized population variance when calculating the CI even after rejecting the null hypothesis?

Suppose we want to verify the probability a sample comes from a distribution with mean $$\mu_1$$ and variance $$\sigma²_1$$. Then, we conduct a hypothesis test and decide to reject the null hypothesis, i.e., we consider that is improbable the sample was drawn from a distribution with these parameters.

Now, we want to estimate $$\mu_2$$[1] (the population mean from which the sample was drawn) using Confidence Interval. Should we use $$\sigma²_1$$ or $$s²$$ (sample variance) when calculating the CI? I think, since we rejected the hypothesis null, there's no reason to consider any parameter from the null distribution. We have decided that our sample doesn't come from that distribution, so we should only use estimated parameters to determine the confidence interval. Is this conclusion correct?

[1]It's not the second moment

• Standard formulas for CIs are based on data, not hypothetical parameter values. So you wouldn't ordinarily have a choice. // If some parameters are taken as known from the start, then those known values would be used along with data to estimate other parameters. For example, the CI for normal $\sigma^2$ is based on $\sum_i (X_i - \mu)^2/\sigma^2 \sim$ CHISQ($n$), if $\mu$ is known. – BruceET Mar 16 at 2:42
• @BruceET I see. So if we know the parameter we don't need to test it. And we can use it to estimate another parameter. But, if we are not sure about the assumed parameter, we test it. In case we cannot reject it, we can use the tested parameter to estimate others. Right? – UCC Mar 16 at 15:56
• Either that or sometimes we can get interval estimates for two parameters simultaneously. – BruceET Mar 16 at 16:36
• The answer depends on precisely what your null and alternative hypotheses might be. Could you clarify that? – whuber Mar 16 at 16:49
• It kind of sounds you are effectively describing a Bayesian model, where you have a specific prior (you think the data is going to be drawn from a specific type of distribution with certain parameters), and then you want to look at the data and attempt to estimate what you now (given the data) think the distribution of the population looks like. If so, it might be better to try such a tool directly. – BrianH Mar 16 at 17:12