Home Â» What are Confidence Intervals?

# What are Confidence Intervals?

Often in statistics weâ€™re interested in measuringÂ population parameters â€“ numbers that describe some characteristic of an entire population.

Two of the most common population parameters are:

1. Population mean: the mean value of some variable in a population (e.g. the mean height of males in the U.S.)

2.Â Population proportion: the proportion of some variable in a population (e.g. the proportion of residents in a county who support a certain law)

Although weâ€™re interested in measuring these parameters, itâ€™s usually too costly and time-consuming to actually go around and collect data on every individual in a population in order to calculate the population parameter.

Instead, we typically take a random sample from the overall population and use data from the sample to estimate the population parameter.

For example, suppose we want to estimate the mean weight of a certain species of turtle in Florida. Since there are thousands of turtles in Florida, it would be extremely time-consuming and costly to go around and weigh each individual turtle.

Instead, we might take a simple random sample of 50 turtles and use the mean weight of the turtles in this sample to estimate the true population mean:

The problem is that the mean weight of turtles in the sample is not guaranteed to exactly match the mean weight of turtles in the whole population. For example, we might just happen to pick a sample full of low-weight turtles or perhaps a sample full of heavy turtles.

In order to capture this uncertainty we can create a confidence interval.Â A confidence interval is a range of values that is likely to contain a population parameter with a certain level of confidence. It is calculated using the following general formula:

Confidence Interval = (point estimate)Â  +/-Â  (critical value)*(standard error)

This formula creates an interval with a lower bound and an upper bound, which likely contains a population parameter with a certain level of confidence.

Confidence IntervalÂ  = [lower bound, upper bound]

For example, the formula to calculate a confidence interval for a population mean is as follows:

Confidence Interval =Â xÂ  +/-Â  z*(s/âˆšn)

where:

• x: sample mean
• z:Â the chosen z-value
• s:Â sample standard deviation
• n:Â sample size

The z-value that you will use is dependent on the confidence level that you choose. The following table shows the z-value that corresponds to popular confidence level choices:

Confidence Level z-value
0.90 1.645
0.95 1.96
0.99 2.58

For example, suppose we collect a random sample of turtles with the following information:

• Sample sizeÂ n = 25
• Sample mean weight xÂ = 300
• Sample standard deviationÂ s = 18.5

Here is how to find calculate the 90% confidence interval for the true population mean weight:

90% Confidence Interval:Â 300 +/-Â  1.645*(18.5/âˆš25) =Â [293.91, 306.09]

We interpret this confidenceÂ interval as follows:

There is a 90% chance that the confidence interval of [293.91, 306.09] contains the true population mean weight of turtles.

Another way of saying the same thing is that there is only a 10% chance that the true population mean lies outside of the 90% confidence interval. That is, thereâ€™s only a 10% chance that the true population mean weight of turtles is greater than 306.09 pounds or less than 293.91 pounds.

Itâ€™s worth nothing that there are two numbers that can affect the size of a confidence interval:

1. The sample size:Â The larger the sample size, the more narrow the confidence interval.Â

2. The confidence level:Â The larger the confidence level, the wider the confidence interval.

## Types of Confidence Intervals

There are many types of confidence intervals. Here are the most commonly used ones:

### Confidence Interval for a Mean

A confidence interval for a meanÂ is a range of values that is likely to contain a population mean with a certain level of confidence. The formula to calculate this interval is:

Confidence Interval =Â xÂ  +/-Â  z*(s/âˆšn)

where:

• x: sample mean
• z:Â the chosen z-value
• s:Â sample standard deviation
• n:Â sample size

### Confidence Interval for the Difference Between Means

AÂ confidence interval (C.I.) for a difference between meansÂ is a range of values that is likely to contain the true difference between two population means with a certain level of confidence. The formula to calculate this interval is:

Confidence interval = (x1â€“x2) +/- t*âˆš((sp2/n1) + (sp2/n2))

where:

• x1,Â x2: sample 1 mean, sample 2 mean
• t: the t-critical value based on the confidence level and (n1+n2-2) degrees of freedom
• sp2: pooled variance
• n1, n2: sample 1 size, sample 2 size

where:

• The pooled variance is calculated as:Â sp2Â = ((n1-1)s12 +Â (n2-1)s22) / (n1+n2-2)
• The t-critical valueÂ tÂ can be found using the Inverse t Distribution calculator

### Confidence Interval for a Proportion

A confidence interval for a proportionÂ is a range of values that is likely to contain a population proportion with a certain level of confidence. The formula to calculate this interval is:

Confidence Interval = pÂ  +/-Â  z*(âˆšp(1-p) / n)

where:

• p:Â sample proportion
• z:Â the chosen z-value
• n:Â sample size

### Confidence Interval for the Difference in Proportions

A confidence interval for the difference in proportionsÂ is a range of values that is likely to contain the true difference between two population proportions with a certain level of confidence.. The formula to calculate this interval is:

Confidence interval = (p1â€“p2)Â  +/-Â  z*âˆš(p1(1-p1)/n1Â + p2(1-p2)/n2)

where:

• p1, p2: sample 1 proportion, sample 2 proportion
• z: the z-critical value based on the confidence level
• n1, n2: sample 1 size, sample 2 size