a

Calculating the Confidence interval for a mean using a formula - statistics help

Calculating a confidence interval for a mean using a formula.

To find out about confidence intervals,

watch our video "Understanding Confidence Intervals."

This video introduces the traditional way to find a confidence interval for a mean

using a formula.

Usually we just get the computer to calculate the confidence interval for us,

but it is useful to know what is being calculated.

Two things will affect the width of any confidence interval:

variation in the population and

sample size

We don't know the variation in the population but the variation in

the sample will be an indicator of the variation in the population.

We use thestandard deviation for the sample as a measure of variation in the population.

The standard deviation tells us the average distance the values are from the mean in the sample

The Central Limit Theorem underpins the following formula for the confidence interval of a mean.

We take the sample standard deviation and

divide by the square root of the sample size.

This gives us the standard error.

Say we took lots of samples of size n from the same population.

The standard error is a measure of how spread out we would

expect those means to be. It is interesting that we divide by the square

root of the sample size.

This reflects the phenomenon that the more information

we have the less new information we get from one more observation in the sample.

It makes sense that increasing our sample size from 10 to 20 will give more

information and thus decrease our confidence interval more than increasing

the sample size from 100 to a 110.

In traditional confidence intervals we also wish to specify the level of confidence.

The more confident we wish to be, the larger our confidence interval will be.

If we wanted to be certain of including the population parameter we could use a very

wide interval but that would not give us any useful information.

We use a value from the t distribution in our formula

You can read these off a table.

The value of t depends on the sample size and the chosen level of confidence.

The bigger the t value is, the bigger our confidence interval will be.

Here are some t values for different sample sizes and confidence levels.

We multiply the standard error by the t value to get the margin of error.

so now we add and subtract the margin of error from the sample mean

to find the confidence interval.

This confidence interval gives us a range of values that we can be

pretty sure or confident contains the mean from the population.

We can explicitly state how confident we are.

It is quite possible that this interval will not contain the mean of the population

but usually a confidence interval will contain the population parameter we are estimating

Here's an example.

We wish to estimate the mean weight of apples in the orchard.

We take a sample of 15 apples from the orchard.

These are their weights.

This combination box plot and dot plot shows the distribution of the sample.

We use iNZight to get these summary statistics.

We can see the mean value of 149.3 g

the standard deviation of 4.758

and the sample size of 15.

We wish to find a 95% confidence interval for the mean weight of apples in the whole orchard.

We substitute the appropriate values into the formula.

The standard error is 4.758 divided by the square root of 15

which gives us 1.22851.

The t value for a sample of 15 and a

confidence level of 95% is 2.145

The margin of error is 2.63515

which we round to 2.6.

We add and subtract this from the sample mean of 149.3

to get a confidence interval of 146.7 to 151.9

Thus our 95% confidence interval for the mean weight of the apples in the population

is 146.7 to 151.9 grams.

This is NOT the interval that will hold the weights of 95% of the apples in the orchard.

It is the interval that we are 95% confident will contain the true unknown value of the population mean.

If we were to take lots of samples of size 15 and create 95% confidence intervals from them,

we would expect most of them, 95% of them, to contain the true population mean.

However about 5% of them will not contain the true population mean.

We do not know for certain whether our confidence interval really does contain the population mean.

We can be 95% sure that the mean weight of the apples in the orchard

is somewhere between 146.7 to 151.9 grams

A much quicker way is simply to get the

computer to calculate the confidence interval.

Note that the answer here is slightly different due to rounding.

You should never give confidence intervals to too many decimal places.

This video was brought to you by Statistics Learning Centre. (Creative Maths)

Visit our website for more resources to help you learn.