# Confidence Interval Calculator

## What is the Confidence Interval?

According to the definition, "a range of values derived from sample statistics is likely containing the value of a population parameter that is unknown." What does this mean in practice?

Imagine a brickmaker is worried about whether or not the bricks he produces are in accordance with specifications. He measured that the average mass for a sample 100 bricks was 3 kg. The 95% confidence interval is between 2,85 kg and 3,15 kg. He can therefore be 95% certain that the average weight of the bricks that he produces will fall between 2,85 kg and 3,15 kg. If the brickmaker took 100 brick samples and computed the confidence interval for each brick, 95% of the intervals would be the average brick mass.

You don't have to be 95% certain all the time. You may want to be 95% certain or you might just accept that the interval of confidence is accurate in 90% cases. This percentage is known as the **level of confidence**.

## Calculate the 95% Confidence Interval

You will need to know the following three parameters: the mean, m; the standard deviation, S; and the number of measurements, n. You can then calculate the error standard, and the margin of error using the following formulas.

`standard error = s/n`

`Margin of error = Standard Error * Z(0.95)`

Where Z(0.95) represents the score that corresponds to a 95% confidence level. You can use this value if you want to. If you're using a confidence level other than 95%, you will need to calculate a z-score. Don't worry, our z score calculator will do the work for you.

How do you find the Z(0.95)? The value of the z-score is where the two-tailed level of confidence is equal to 95%. This means that, if you draw the normal distribution graph, the area between two z scores will equal 0.95 (out 1).

You can calculate the value by using a table of z-scores.

- Decide your
**level of confidence**. Let's say it is 95%. - Calculate the probability of your result
**not being**within the interval. This value equals 100%-95% = 5. - Look at the
**curve of normal distribution**. The middle area is 95%. The area on the left side of your opposite z-score equals 0.025 (2.5%), and the area on the right is also 0.025 (2.5%). - The area directly to the right is the exact same as your p value. The z score tables can be used to find the z score that corresponds to the 0.025 p value. It is 1.959 in this case.

You can now input the Z(0.95) into the equation to calculate the margin of error. The only thing left is to calculate the upper and lower bounds of the confidence interval.

`lower bound = mean + margin of error`

`upper bound = median + margin of error`

## How do you calculate the confidence interval?

Follow these steps to calculate a two-sided confidence interval:

- Let's say that the
**sample sizes**are`100`

. - Find the
**average value**for your sample. Assume that it is`2`

. - Calculate the
**standard error**for the sample. Say it's`0.5%`

. - Select the
**level of confidence**. The most common level of confidence is`95%`

. - Find the
**Z (0.95)-score**in the statistical table. In our case it is`1.959`

. - Calculate the
**standard errors**using`s/n=0.5/100 = 0.05`

. - Multiply the margin by the z score to get the margin of error : 0.05 x 1.9559 = 0.098 .
- To obtain the
**Confidence Interval**, add and subtract the margins of error from mean value. In this case, the interval of confidence is between 2.902 to 3.098.

That's it! Wasn't that a lot to calculate? Our confidence calculator can do all these calculations by itself.

## Application of confidence intervals in time series analysis

*Time Series Analysis* is a unique way to use confidence intervals. The sample data set represents observations within a specified timeframe.

One of the most common questions in such an analysis is to determine if a change in a variable will affect another variable.

Let's look at a question that is often asked by economists: "How can a change in interest rates affect the price level?"

This text is not able to cover all the possible approaches, as they require a complex theoretical and empirical evaluation. There are many ways to estimate confident intervals and use them. However, this example shows how confidence intervals can be used in a much more complex problem.

The graph above is a visual representation that represents an estimate output from an econometrics model. It's called *Impulse response function* and it shows the reaction of one variable to a change of another variable. The dashed red lines below and above blue line are a 95% Confidence Interval, or as it is also known, *Confidence Band*. This defines the region of results that are most likely. It shows that the first month after an interest rate change, a significant price response is observed.

We hope you have gained more understanding of the confidence interval and are confident to use the calculator.

## The FAQ

### What is the confidence interval?

The true population mean is contained within 95% of the confidence intervals if you draw many samples. The remaining 5% will not contain true population means.

### What is the z score for a 95% confidence interval?

The z score for a 2-sided 95% confidence range is **1.959**. This is the 97.5th quantile in the normal standard distribution N(0.1).

### What is the z score for 99% confidence intervals?

The z score for a two-sided confidence interval of 99% is **2.807**. This is the 99.5th quantile in the normal standard distribution N (0,1).

### What increases the width of an interval of confidence?

The width of an interval of confidence increases as the margin of error grows, which occurs when:

- Increase in the significance level
- Sample sizes can be reduced.
- Sample variances increase.

### What can decrease the width a confidence interval?

When the margin of errors decreases (which occurs when:

- The significance level is decreasing;
- Increase in sample size
- Sample variance decreases.

The sample mean does not affect the width of an interval of confidence!