# Confidence Interval

## Summary

• A Confidence Interval is an interval of numbers containing the most plausible values for our Population Parameter.
• A confidence level can be any value between, and not including, 0% and 100%.
• The higher the value, the larger the confidence level and the more the confidence interval will include the actual population mean.
• An increase in sample size will decrease the length of the confidence interval without reducing the level of confidence.
• General Formula: $\left[ \bar { X } \quad -\quad { z }_{ { \alpha }/{ 2 } }\frac { \sigma }{ \sqrt { n } } ,\quad \bar { X } \quad +\quad { z }_{ { \alpha }/{ 2 } }\frac { \sigma }{ \sqrt { n } } \right]$
• The margin of error m of a confidence interval is defined to be: $m\quad =\quad z\quad \ast \quad \frac { \sigma }{ \sqrt { n } }$

Statisticians use a confidence interval to describe the amount of uncertainty associated with a sample estimate of a population parameter. A Confidence Interval is an interval of numbers containing the most plausible values for our Population Parameter.

A confidence level can be any value between, and not including, 0% and 100% and provides a measure of how probable it is that our interval estimate includes the population mean.

In theory, any confidence interval can be chosen, but 90%, 95%, or 99% are commonly used to calculate the confidence interval.

The higher the value, the larger the confidence level and the more the confidence interval will include the actual population mean. Moreover, confidence interval is appropriate for small samples only when the population distribution is normal.

Remember that an increase in sample size will decrease the length of the confidence interval without reducing the level of confidence. This is because the standard deviation decreases as n increases.

#### Margin of Error

The margin of error basically tells us the maximum expected difference between the true population parameter and a sample estimate of that parameter.

The margin of error m of a confidence interval is defined to be the value added or subtracted from the sample mean which determines the length of the interval. It is defined using the formula: $m\quad =\quad z\quad \ast \quad \frac { \sigma }{ \sqrt { n } }$

#### Constructing Confidence Intervals

If we draw a sample of a size n from $\bar { x } \quad \sim \quad N(\mu ,\quad { \sigma }^{ 2 })$  where $\mu$  is not given $\bar { x } \quad \sim \quad N(\mu ,\quad \frac { { \sigma }^{ 2 } }{ n } )$ $Z\quad =\quad \frac { \bar { x } \quad -\quad \mu \quad }{ \frac { \sigma }{ \sqrt { n } } }$ To find 95% confidence interval for $\mu$.

Two values of x between which the area of 0.95(95%) lie are the value of ${ x }_{ 1 }$  and ${ x }_{ 2}$.

Which is:

1- 0.95 = 0.05 ${ z }_{ { \alpha }/{ 2 } }\quad =\quad 1.96$ $\pm \quad 1.96\quad =\quad \frac { \bar { x } \quad -\quad \mu \quad }{ \frac { \sigma }{ \sqrt { n } } }$ $\pm \quad 1.96\quad \frac { \sigma }{ \sqrt { n } } \quad =\quad \bar { x } \quad -\quad \mu$

Two possible values one with – and other with +

Which further makes its general formula: $\left[ \bar { X } \quad -\quad { z }_{ { \alpha }/{ 2 } }\frac { \sigma }{ \sqrt { n } } ,\quad \bar { X } \quad +\quad { z }_{ { \alpha }/{ 2 } }\frac { \sigma }{ \sqrt { n } } \right]$

#### Example #1

Q. A sample of size n = 100 produced the sample mean of $\bar { X } \quad =\quad 16$. Assuming the population standard deviation σ = 3, compute a 95% confidence interval for the population mean µ.

Solution:

A 95% confidence interval for µ is $\left[ \bar { X } \quad -\quad { z }_{ { \alpha }/{ 2 } }\frac { \sigma }{ \sqrt { n } } ,\quad \bar { X } \quad +\quad { z }_{ { \alpha }/{ 2 } }\frac { \sigma }{ \sqrt { n } } \right]$  where α = 0.05.

As we know that ${ z }_{ { \alpha }/{ 2 } }\quad =\quad { z }_{ 0.025 }\quad =\quad { \Phi }^{ -1 }(1\quad -\quad 0.025)\quad =\quad 1.96$  from the table of Normal distribution.

Then, the 95% confidence interval for µ will be: $=\quad \left[ 16\quad -\quad 1.96\frac { 3 }{ \sqrt { 100 } } ,\quad 16\quad +\quad 1.96\frac { 3 }{ \sqrt { 100 } } \right]$ $=\quad \left[ 16\quad -\quad 0.588,\quad 16\quad +\quad 0.588 \right]$ $=\quad \left[ 15.412,\quad 16.688 \right]$      Ans

#### Example #2

Q. A random sample ${ X }_{ 1 },\quad { X }_{ 2 },\quad { X }_{ 3 },\quad .........,\quad { X }_{ 100 }$  is given from a distribution with known variance $Var({ X }_{ i })\quad =\quad 16$. For the observed sample, the sample mean is $\bar { X } \quad =\quad 23.5$. Find an approximate 95% confidence interval for $\theta \quad =\quad E{ X }_{ i }$.

Solution:

Here, $\left[ \bar { X } \quad -\quad { z }_{ { \alpha }/{ 2 } }\frac { \sigma }{ \sqrt { n } } ,\quad \bar { X } \quad +\quad { z }_{ { \alpha }/{ 2 } }\frac { \sigma }{ \sqrt { n } } \right]$

is an approximate (1−α)100% confidence interval.

Now since α = 0.05, we have $\frac { \alpha }{ 2 } \quad =\quad 0.025$

Hence, from the table of normal distribution: ${ z }_{ { \alpha }/{ 2 } }\quad =\quad { z }_{ 0.025 }\quad =\quad { \Phi }^{ -1 }(1\quad -\quad 0.025)\quad =\quad 1.96$

Also as $\sigma \quad =\quad 4$,  the approximate confidence interval would be: $=\quad \left[ 23.5\quad -\quad 1.96\quad \frac { 4 }{ \sqrt { 100 } } ,\quad 23.5\quad +\quad 1.96\quad \frac { 4 }{ \sqrt { 100 } } \right]$ $=\quad \left[ 22.7,\quad 24.3 \right]$