24  First confidence interval for a normal mean

Author

Karl Gregory

Suppose we draw a random sample \(X_1,\dots,X_n\) from the \(\mathcal{N}(\mu,\sigma^2)\) distribution, where the value of \(\mu\) is unknown, but the value of \(\sigma^2\) is known (later on we will drop the assumption that \(\sigma^2\) is known, as it is actually quite unrealistic in practice). We would like to construct an interval \([L,U]\), where \(L\) and \(U\) are computed from the sample, such that \(P(L \leq \mu \leq U )\) is large. That is, we would like our interval \([U,L]\) to contain the value of \(\mu\) with some guaranteed probability.

To start off, let’s say we want an interval which contains \(\mu\) with probability \(0.95\). We may arrive at such an interval in two steps:

  1. Since \(\bar X_n \sim \mathcal{N}(\mu,\sigma^2/n)\) we may write \[ P\Big(-1.96 \leq \frac{\bar X_n - \mu}{ \sigma/\sqrt{n}} \leq 1.96\Big) = 0.95. \] See Proposition 16.2 and Figure 13.5

  2. Rearrange the above expression to get \[ P\left(\bar X_n -1.96 \frac{\sigma}{\sqrt{n}} \leq \mu \leq \bar X_n + 1.96\frac{\sigma} {\sqrt{n}} \right) = 0.95, \] which suggests the interval with endpoints \[ \bar X_n \pm 1.96\frac{\sigma}{\sqrt{n}}. \]

We call this a \(95\%\) confidence interval for \(\mu\).

More generally, for any \(\alpha \in (0,1)\), we consider the construction of \((1-\alpha)100\%\) confidence intervals, where the value \(\alpha\) is the probability that our confidence interval will not contain \(\mu\). For a \(95\%\) confidence interval, the corresponding value of \(\alpha\) is \(0.05\). We refer to \(1-\alpha\) as the confidence level of the confidence interval. To give a general expression for a \((1-\alpha)100\%\) confidence interval, let \(z_{\alpha/2}\) denote the value such that \(P(Z > z_{\alpha/2}) = \alpha/2\), where \(Z \sim \mathcal{N}(0,1)\), as depicted here:

Figure 24.1: Depiction of upper quantile \(z_{\alpha/2}\).

The above is a depiction of what is called upper quantile notation. We call \(z_{\alpha/2}\) the upper \(\alpha/2\) quantile of the \(\mathcal{N}(0,1)\) distribution because there is area \(\alpha/2\) to the right of this value under the \(\mathcal{N}(0,1)\) PDF. Because the normal distributions are symmetric, the ordinary \(\alpha/2\) quantile is equal to \(-z_{\alpha/2}\), that is, it is the reflection of the upper \(\alpha/2\) quantile across the origin.

Then we have the following result:

Proposition 24.1 (Confidence interval for normal mean) For a random sample \(X_1,\dots,X_n \overset{\text{ind}}{\sim}\mathcal{N}(\mu,\sigma^2)\) with \(\sigma\) known, for any \(\alpha \in (0,1)\) the interval with endpoints \[ \bar X_n \pm z_{\alpha/2} \frac{\sigma}{\sqrt{n}} \] will contain \(\mu\) with probability \(1-\alpha\).

We are very often interested in building confidence intervals at the \(0.90\), \(0.95\), or \(0.99\) confidence levels, for which Figure 13.5 depicts the necessary quantiles, \(z_{0.05} = 1.645\), \(z_{0.025} = 1.96\), and \(z_{0.005} = 2.576\), respectively, of the standard Normal distribution. Note that these quantities govern the width of the confidence interval, such that higher confidence corresponds to greater width.

Note that the confidence interval with endpoints given in Proposition 24.1 is constructed by adding and subtracting the same amount \(z_{\alpha/2}\sigma/\sqrt{n}\) to and from the sample mean \(\bar X_n\). When a confidence interval is constructed in this way, we will refer to the amount added and subtracted as the margin of error. Thus the width of such a confidence interval is two times the margin of error. Later on, in Chapter 29, we will consider the problem of selecting a sample size \(n\) in order to ensure that a confidence interval has a margin of error no larger than some desired bound.

Consider building a confidence interval for \(\mu\) in the golden ratio example, Example 15.2. From Figure 19.3, it seems reasonable to assume that the sample was drawn from a normal distribution. The variance \(\sigma^2\) of the population distribution is unknown, but the following exercise assumes \(\sigma = 0.15\).

Exercise 24.1 (Confidence interval for the mean in golden ratio example) Regarding the values in the golden ratio data set as a random sample from a normal distribution with unknown mean \(\mu\) and standard deviation \(\sigma = 0.15\), construct a confidence interval for \(\mu\) at these confidence levels:

  1. \(90\%\)1
  2. \(95\%\)2
  3. \(99\%\)3
  4. \(98\%\)4

Note that Exercise 25.1 depended on knowledge of the population standard deviation \(\sigma\). Later on we will learn how to construct a confidence interval for \(\mu\) when \(\sigma\) is replaced by its sample counterpart \(S_n\).


  1. The \(90\%\) confidence interval is given by \[ \bar X_n \pm 1.645 \frac{\sigma}{\sqrt{n}} = 1.56 \pm 1.645 \frac{0.15}{\sqrt{27}} = [1.513,1.607] \] ↩︎

  2. The \(95\%\) confidence interval is given by \[ \bar X_n \pm 1.96 \frac{\sigma}{\sqrt{n}} = 1.56 \pm 1.96 \frac{0.15}{\sqrt{27}} = [1.503,1.617] \] ↩︎

  3. The \(99\%\) confidence interval is given by \[ \bar X_n \pm 2.576 \frac{\sigma}{\sqrt{n}} = 1.56 \pm 2.576 \frac{0.15}{\sqrt{27}} = [1.486,1.634] \] ↩︎

  4. This corresponds to \(\alpha = 0.02\), so that \(z_{\alpha/2} = z_{0.01} = 2.33\) (See the \(Z\) table in Chapter 36). \[ \bar X_n \pm 2.33 \frac{\sigma}{\sqrt{n}} = 1.56 \pm 2.33 \frac{0.15}{\sqrt{27}} = [1.493,1.627] \] ↩︎