I know the relation between the distribution of sample means (for a given sample size) and the population parameters, from which samples are taken.
My question is, how exactly do we use this relation to do interval estimation? More specifically, when we have a sample and attempt to make an inference about population from which sample is taken, we form the distribution of sample means as if the population mean is equal to mean of our sample, and then use this distribution as the probability density function of the population mean.
It seems right, intuitively, but I couldn't see a formal proof.
Edit: This question is because of a big confusion. I was taught that, X % confidence intervals are intervals, where parameter to be inferred lies with X % probability. As that statement is wrong, this question is also meaningless.