# Confidence interval given the population mean and standard deviation

Say we have a normal distribution with mean 10 and standard deviation 5. How do I get a two sided and one sided (left/right) 90% confidence interval using this?

This is the actual question I am trying to answer:

We have a normal process with mean 10 and standard deviation 5.

We want to test whether or not the values 15, 12, and 4 come from this process.

Are those three values in a 90% symmetric about the mean confidence interval?
Are those three values in a 90% one-sided to the left confidence interval?


Everything about confidence intervals I see online refers to cases where the population mean is unknown, and you create a confidence interval using the sample mean, sample standard deviation, and sample size. I can't find anything when you have the population mean and standard deviation and then want a confidence interval for the data.

• Welcome to CV, Abso! When you say "mean 10 and standard deviation 5" to you mean "sample mean $\overline{x} = 10$ and sample standard deviation $s_{x} = 5$," or "population mean $\mu_{x}=10$ and population standard deviation $\sigma_{x}=5$"? Commented Dec 1, 2021 at 1:10
• @Alexis Thanks. They are the population mean and population standard deviation.
– Abso
Commented Dec 1, 2021 at 1:21
• You can compute the CI of the mean for the n=3 sample of data provided in the question. Then look at whether the stated population (theoretical) mean is in that interval or not.... Commented Dec 1, 2021 at 2:02
• What do you mean by "We want to test whether or not the values 15, 12, and 4 come from this process." What do the Type I error and Type II error of statistical inference mean given that this question of "whether" is known with absolute certainty? Commented Dec 1, 2021 at 3:52
• I find the question very confusing given that I understand confidence intervals. Confidence intervals are a statement saying that the true value you are estimating i.e. the population mean - is in your estimated given interveral. The interval is usually stated as $$\hat \mu_n \pm 1.96 \frac{\hat \sigma_n}{\sqrt n}$$ assuming $n \geq 30$ to avoid having to worry if we should be using the t-test instead of 1.96 (which you should if your using unbiased std). So if you are given the population mean (e.g. $\mu^* = E_x[x]$ the true expectation of the r.v. x) then there is nothing for you to do. Commented Dec 15, 2021 at 23:59

@Abso, what the question is describing is not a 90% confidence interval, it is a 90% margin of error around a particular hypothesis. It is unfortunate that the question uses this term incorrectly. As you and Alexis have correctly stated, the confidence interval is for making inference on an unknown mean. The confidence interval is a set of hypotheses for which the observed data are within a 90% margin of error.

• +1 I think this answer is to the point. The question is just wrongly formulated, which understandably confuses the OP. Interestingly, the Wikipedia article on the "Margin of Error" makes the same mistake: "we would expect that 95% of the results to fall within about two standard deviations either side of the true mean. This interval is called the confidence interval, and the radius (half the interval) is called the margin of error [...]" en.wikipedia.org/wiki/Margin_of_error Commented Dec 1, 2021 at 7:26
• I find the question very confusing, given that I understand confidence intervals. Confidence intervals are a statement saying that the true value you are estimating, i.e. the population mean - is in your estimated given interval. The interval is usually stated as $$\hat \mu_n \pm 1.96 \frac{\hat \sigma_n}{\sqrt n}$$ assuming $n \geq 30$ to avoid having to worry if we should be using the t-test instead of 1.96 (which you should if your using unbiased std). So if you are given the population mean (e.g. $\mu^* = E_x[x]$ the true expectation of the r.v. x) then there is nothing for you to do. Commented Dec 16, 2021 at 0:00
• just to confirm, this can be used for any type of numeric data right?I think so because the mean and std are calculated for general numeric data and the z_p/t_p value only takes in the confidence interval and data size, so it is independent of assumptions on the distribution of data. Commented May 9, 2022 at 18:14

If you have the population mean, and the population variance, you would not calculate a confidence interval for the mean of a normal distribution.

Here's why: Confidence intervals are one form of statistical inference. The aim of statistical inference is to learn something about some statistical quantity or quantities in a target population, given that what what we have to learn from are data and statistical quantities derived with them from a sample.* Loosely, confidence intervals are intended to provide a plausible range of estimates of the statistical quantity in the target population, where this range gets wider as our level of confidence increases (e.g., ceteris paribus a 99%CI is wider than a 90% CI). If we already know the statistical quantity in the population, we have no need to try and infer it. Finally, everything about the normal distribution is conveyed through it's two parameters, the population mean $$\mu$$ and the population standard deviation $$\sigma$$ (though some prefer to think of the population variance, $$\sigma^{2}$$ as the parameter): if you know these quantities in advance, you do not need to guess them, as @Dave said.

* I am intentionally leaving out additional things we have to work with like modeling assumptions, prior beliefs, and so forth.

• +1 In other words, if you know the answer, you don’t have to make an educated guess!
– Dave
Commented Dec 1, 2021 at 1:35
• Thanks for the answer. The confidence interval isn't supposed to be for the mean or the standard deviation, but it is supposed to test whether given data values are likely to come from that distribution or not. I've added the actual given question to my post as an edit above. Maybe that makes more sense.
– Abso
Commented Dec 1, 2021 at 1:38
• @Abso My answer remains pertinent: see my edit. Aside: confidence intervals ≠ hypothesis tests (although they are related to one another). The former: plausible range of values; the latter: decision about whether some statement about the parameter is true or not. Commented Dec 1, 2021 at 2:24
• just to confirm, this can be used for any type of numeric data right?I think so because the mean and std are calculated for general numeric data and the z_p/t_p value only takes in the confidence interval and data size, so it is independent of assumptions on the distribution of data. Commented May 9, 2022 at 18:14
• @CharlieParker I am not following your question, Can you spell it out more clearly? Commented May 10, 2022 at 21:50

I find the question very confusing, if you understand CI - which is likely the problem.

Confidence intervals are a statement saying that the true value you are estimating, i.e. the population mean $$\mu^*$$ - is in your estimated given interval $$\hat \mu_n \pm 1.96 \frac{\hat \sigma_n}{\sqrt n}$$. The interval is usually stated as

$$\hat \mu_n \pm 1.96 \frac{\hat \sigma_n}{\sqrt n}$$

assuming $$n \geq 30$$ to avoid having to worry if we should be using the t-test instead of 1.96 (which you should if you're using unbiased std). So if you are given the population mean (e.g. $$\mu^* = E_x[x]$$ the true expectation of the r.v. x) then there is nothing for you to do.

Note that what the statement means this formally: $$Pr[ \mu^* \in [\hat \mu_n - 1.96 \frac{\hat \sigma_n}{\sqrt n}, \hat \mu_n + 1.96 \frac{\hat \sigma_n}{\sqrt n}] \geq 0.95$$ in particular note that the EVENT (or the indicator random variable) you are checking for is $$\mu^* \in [\hat \mu_n - 1.96 \frac{\hat \sigma_n}{\sqrt n}, \hat \mu_n + 1.96 \frac{\hat \sigma_n}{\sqrt n}]$$. Meaning that if you surveyed (avoiding the word sample to not confuse with sampling $$x$$) a bunch of data sets $$D_n = \{ x_i \}^n_{i=1}$$ then 95% of the time the true mean $$\mu^*$$ (the quanity you are trying to estimate) would be in that interval. It only says that your (current) interval is likely to contain the true mean. I want to emphasize current because each data set will have it's own confidence interval e.g. if you were estimating the CI of the validation set and sampled 100 batches (with at least 30 points), then 95 of those batches their specific confidence interval will hold true i.e. the true mean would be contained for 95 of them. Note you never actually know which ones since the true/population mean is usually unknown (otherwise there is nothing to do - which answers your question actually). Note that thus the r.v. here is really the mean your estimated and the std you are estimating.

The common misunderstanding is that for some fixed interval, you claim the mean is within those values. That is wrong because that is not what the statement says. The statement says that if you kept computing intervals the true mean will be in there 95% and nothing more afaik. It doesn't say anything about a specific set of values. The mean will either be there or it will not. The statement is about the r.vs you are computing i.e. the actual interval. (don't get confused that x's are also r.v.s from the true distribution your trying to learn stuff about).

This is a nice reference imho: https://www.youtube.com/watch?v=MzvRQFYUEFU&list=PLUl4u3cNGP60hI9ATjSFgLZpbNJ7myAg6&index=205

NOTE: as a bonus it is interesting to see that this looks quite similar to the definitions used in statistical learning theory (STL), in particular to things like:

$$Pr[ | ERM(f, D_n) - \mu^* | < \gamma ] \geq 1 - \delta$$

if you notice that the bounded absolute value is the same as being in the interval $$[\gamma]$$ and that CI is a especial case for the estimator being the sample mean but usually in SLT the estimator is maximum likelihood (e.g. ERM/Empirical Risk Minimization). So both are ML's and trying to see how far they are from the true mean, but the man in STL is the true error (expected risk).

• just to confirm, this can be used for any type of numeric data right?I think so because the mean and std are calculated for general numeric data and the z_p/t_p value only takes in the confidence interval and data size, so it is independent of assumptions on the distribution of data. Commented May 9, 2022 at 18:15