# Confidence Interval for mean | Statistics and Probability

## Introduction

Confidence interval can be used to estimate the population parameter with the help of an interval with some degree of confidence. One such a parameter that can be estimated is a population mean.

In this article we will discuss about the derivation and step by step procedure to construct a confidence interval for population mean when the population standard deviation is unknown.

## Confidence Interval for Mean when variance is known

### Assumptions

a. The sample is a simple random sample.

b. The population standrad deviation $\sigma$ is known.

c. The population has a normal distribution.

### Derivation

Let $X_1,X_2, \cdots, X_n$ be a random sample from $N(\mu,\sigma^2)$ with known $\sigma^2$. Let $\overline{X}=\dfrac{1}{n}\sum_{i=1}^n X_i$ be the sample mean. Then $\overline{X}\sim N(\mu,\sigma^2/n)$.

Therefore, $Z = \dfrac{\overline{X}-\mu}{\sigma/\sqrt{n}}\sim N(0,1)$ distribution. Here $Z$ is a function of $X_1, X_2, \cdots, X_n$ and parameter $\mu$. Moreover, the distribution of $Z$ is independent of any unknown parameter. Hence $Z$ can be used as a pivotal quantity.

Therefore, there exist two numbers $z_1$ and $z_2$ ($z_1 < z_2$) dependening on $\alpha$ ($0\leq \alpha \leq 1$) such that

 $$P(z_1 < Z < z_2) =1-\alpha$$

Therefore,

 \begin{aligned} & P(z_1 < Z < z_2) =1-\alpha\\ \Rightarrow & P(z_1 < \dfrac{\overline{X}-\mu}{\sigma/\sqrt{n}} < z_2) =1-\alpha\\ \Rightarrow & P(z_1 \frac{\sigma}{\sqrt{n}} < \overline{X}-\mu < z_2 \frac{\sigma}{\sqrt{n}}) =1-\alpha\\ \Rightarrow & P(-z_2 \frac{\sigma}{\sqrt{n}} < \mu-\overline{X} < -z_1 \frac{\sigma}{\sqrt{n}}) =1-\alpha\\ \Rightarrow & P(\overline{X}-z_2 \frac{\sigma}{\sqrt{n}} < \mu < \overline{X}-z_1 \frac{\sigma}{\sqrt{n}}) =1-\alpha\\ \end{aligned}

Thus, $100(1-\alpha)\%$ confidence interval for $\mu$ of normal distribution ($\sigma^2$ known) is

 $$\big(\overline{X}-z_2 \frac{\sigma}{\sqrt{n}},\overline{X}-z_1 \frac{\sigma}{\sqrt{n}}\big)$$

where $z_1$ and $z_2$ can be determined from $P(z_1 < Z < z_2) =1-\alpha$.

As the distribution of $Z$ is symmetric about zero, we have, $z_1 = -z_2=-z_{\alpha/2}$.

Hence, $100(1-\alpha)\%$ confidence interval for $\mu$ of normal distribution ($\sigma^2$ known) is
 $$\big(\overline{X}-z_{\alpha/2} \frac{\sigma}{\sqrt{n}},\overline{X}+z_{\alpha/2} \frac{\sigma}{\sqrt{n}}\big)$$

Note

The limit $\overline{X}-z_{\alpha/2} \frac{\sigma}{\sqrt{n}}$ is called the lower confidence limit, $\overline{X}+z_{\alpha/2} \frac{\sigma}{\sqrt{n}}$ is called the upper confidence limit and $1-\alpha$ is called the confidence coefficient.

### Step by Step Procedure

Let $X_1, X_2, \cdots , X_n$ be a random sample of size $n$ from $N(\mu, \sigma^2)$ with known variance $\sigma^2$.

Let $\overline{X} = \frac{1}{n} \sum X_i$ be the sample mean.

Let $C=1-\alpha$ be the confidence coefficient. We wish to construct a $100(1-\alpha)$% confidence interval of a population mean $\mu$ when $\sigma$ is known.

Step by step procedure to estimate the confidence interval for mean is as follows:

#### Step 2 Given information

Specify the given information, sample size $n$, sample mean $\overline{X}$ and population standard deviation.

#### Step 3 Specify the formula

$100(1-\alpha)$% confidence interval for the population mean $\mu$ is

 \begin{aligned} \overline{X} - E \leq \mu \leq \overline{X} + E \end{aligned}

where $E = Z_{\alpha/2} \frac{\sigma}{\sqrt{n}}$.

#### Step 4 Determine the critical value

Determine the critical value $Z_{\alpha/2}$ from normal statistical table that corresponds to the desired confidence level.

#### Step 5 Compute the margin of error

The margin of error for mean is

 \begin{aligned} E = Z_{\alpha/2} \frac{\sigma}{\sqrt{n}}. \end{aligned}

#### Step 6 Determine the confidence interval

$100(1-\alpha)$% confidence interval estimate for population mean is

 \begin{aligned} \overline{X} - E \leq \mu\leq \overline{X} + E \end{aligned}

Equivalently, $100(1-\alpha)$% confidence interval estimate of population mean is $\overline{X} \pm E$ or $(\overline{X} -E, \overline{X} +E)$.

That is the $100(1-\alpha)$% confidence interval estimate of population mean (when $\sigma$ is unknown) is

$$\bigg(\overline{X} -Z_{\alpha/2} \dfrac{\sigma}{\sqrt{n}}, \overline{X} +Z_{\alpha/2} \dfrac{\sigma}{\sqrt{n}}\bigg)$$.

## Conclusion

In this tutorial, you learned about the derivation of confidence interval for the population mean when population variance is known. You also learned about the step by step procedure to construct desired confidence interval for the population mean when population variance is known.