# How Do Confidence Intervals Work?

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram CDF Player or other Wolfram Language products.

Requires a Wolfram Notebook System

Edit on desktop, mobile and cloud with any Wolfram Language product.

This Demonstration shows the confidence interval, , for based on random samples of size from a normal population with mean and standard deviation , where is the sample mean and is the margin of error for a level interval. There are two cases, corresponding to when is assumed known, or is not known and is estimated by the standard deviation in the sample. For the known case, , where the critical value is determined so that the area to the right of is . Similarly in the unknown case, , where is the sample standard deviation and is the critical value determined from a -distribution with degrees of freedom.

[more]
Contributed by: Ian McLeod (March 2011)

Open content licensed under CC BY-NC-SA

## Snapshots

## Details

If we assume that , the unknown mean, has a suitable noninformative prior, the confidence interval with level confidence is equivalent to the highest posterior density interval [1] p. 85 and p. 98, and we can make the natural statement that .

[1] G. E. P. Box and G. C. Tiao, *Bayesian Inference in Statistical Analysis*, Reading: Addison-Wesley, 1973.

## Permanent Citation