What value of z should be used to calculate a confidence interval with a 98% confidence level?

This confidence interval calculator is a tool that will help you find the confidence interval for a sample, provided you give the mean, standard deviation and sample size. You can use it with any arbitrary confidence level. If you want to know what exactly the confidence interval is and how to calculate it, or are looking for the 95% confidence interval formula with no margin of error, this article is bound to help you.

The definition says that, "a confidence interval is the range of values, derived from sample statistics, that is likely to contain the value of an unknown population parameter." But what does that mean in reality?

Imagine that a brick maker is concerned whether the mass of bricks he manufactures is in line with specifications. He has measured the average mass of a sample of 100 bricks to be equal to 3 kg. He has also found the 95% confidence interval to be between 2.85 kg and 3.15 kg. It means that he can be 95% sure that the average mass of all the bricks he manufactures will lie between 2.85 kg and 3.15 kg.

Of course, you don't always want to be exactly 95% sure. You might want to be 99% certain, or maybe it is enough for you that the confidence interval is correct in 90% of cases. This percentage is called the confidence level.

Calculating the confidence interval requires you to know three parameters of your sample: the mean (average) value, μ, the standard deviation, σ, and the sample size, n (number of measurements taken). Then you can calculate the standard error and then the margin of error according to the following formulas:

standard error = σ/√n

margin of error = standard error * Z(0.95)

where Z(0.95) is the z-score corresponding to the confidence level of 95%. If you are using a different confidence level, you need to calculate the appropriate z-score instead of this value. But don't fret, our z-score calculator will make this easy for you!

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

If you want to calculate this value using a z-score table, this is what you need to do:

  1. Decide on your confidence level. Let's assume it is 95%.
  2. Calculate what is the probability that your result won't be in the confidence interval. This value is equal to 100%–95% = 5%.
  3. Take a look at the normal distribution curve. 95% is the area in the middle. That means that the area to the left of the opposite of your z-score is equal to 0.025 (2.5%) and the area to the right of your z-score is also equal to 0.025 (2.5%).
  4. The area to the right of your z-score is exactly the same as the p-value of your z-score. You can use the z-score tables to find the z-score that corresponds to 0.025 p-value. In this case, it is 1.959.

Once you have calculated the Z(0.95) value, you can simply input this value into the equation above to get the margin of error. Now, the only thing left to do is to find the lower and upper bound of the confidence interval:

lower bound = mean - margin of error

upper bound = mean + margin of error

To calculate a confidence interval (two-sided), you need to follow these steps:

  1. Let's say the sample size is 100.
  2. Find the mean value of your sample. Assume it's 3.
  3. Determine the standard deviation of the sample. Let's say it's 0.5.
  4. Choose the confidence level. The most common confidence level is 95%.
  5. In the statistical table find the Z(0.95)-score, i.e., the 97.5th quantile of N(0,1) – in our case, it's 1.959.
  6. Compute the standard error as σ/√n = 0.5/√100 = 0.05.
  7. Multiply this value by the z-score to obtain the margin of error: 0.05 × 1.959 = 0.098.
  8. Add and subtract the margin of error from the mean value to obtain the confidence interval. In our case, the confidence interval is between 2.902 and 3.098.

That's it! That was quite of a lot of computations, wasn't it? Luckily, our confidence level calculator can perform all of these calculations on its own.

One peculiar way of making use of confidence interval is the time series analysis, where the sample data set represents a sequence of observations in a specific time frame.

A frequent subject of such a study is whether a change in one variable affects another variable in question.

To be more specific, let's consider the following general question that often raises economists' interest: "How does a change in the interest rate affect the price level?"

There are several ways to approach this issue, which involves complex theoretical and empirical analysis, that is far beyond the scope of this text. Besides, there are multiple techniques to estimate and apply confident intervals, but still, through this example, we can represent the functionality of confidence interval in a more complicated problem.

What value of z should be used to calculate a confidence interval with a 98% confidence level?

The horizontal axis represents the number of months after one unit change in the interest rate, the vertical axis shows the response of price level. Note that this example with the figure is hypothetical and displayed here only for illustrative purposes.

The above graph is a visual representation of an estimation output of an econometric model, a so-called Impulse Response Function, that shows a reaction of a variable at the event of a change in the other variable. The red dashed lines below and above the blue line represent a 95% confidence interval, or in another name, confidence band, which defines a region of most probable results. More specifically, it shows that after a change in interest rate, it is only the second month when a significant response occurs at the price level.

To sum up, we hope that with the above examples and short description, you get more insight into the purpose of the confidence interval, and you gain the confidence to use our confidence interval calculator.

If you repeatedly draw samples and use each of them to find a bunch of 95% confidence intervals for the population mean, then the true population mean will be contained in about 95% of these confidence intervals. The remaining 5% of intervals will not contain the true population mean.

The z-score for a two-sided 95% confidence interval is 1.959, which is the 97.5-th quantile of the standard normal distribution N(0,1).

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

The width of a confidence interval increases when the margin of error increases, which happens when the:

  • Significance level increases;
  • Sample size decreases; or
  • Sample variance increases.

The width of a confidence interval decreases when the margin of error decreases, which happens when the:

  • Significance level decreases;
  • Sample size increases; or
  • Sample variance decreases.

The sample mean has no impact on the width of a confidence interval!

What value of z should be used to calculate a confidence interval with a 98% confidence level?

What value of z should be used to calculate a confidence interval with a 98% confidence level?

An interval of 4 plus or minus 2

A Confidence Interval is a range of values we are fairly sure our true value lies in.

What value of z should be used to calculate a confidence interval with a 98% confidence level?

Example: Average Height

We measure the heights of 40 randomly chosen men, and get a mean height of 175cm,

We also know the standard deviation of men's heights is 20cm.

The 95% Confidence Interval (we show how to calculate it later) is:

What value of z should be used to calculate a confidence interval with a 98% confidence level?

The "±" means "plus or minus", so 175cm ± 6.2cm means

  • 175cm − 6.2cm = 168.8cm to 
  • 175cm + 6.2cm = 181.2cm

And our result says the true mean of ALL men (if we could measure all their heights) is likely to be between 168.8cm and 181.2cm

But it might not be!

The "95%" says that 95% of experiments like we just did will include the true mean, but 5% won't.

So there is a 1-in-20 chance (5%) that our Confidence Interval does NOT include the true mean.

Calculating the Confidence Interval

Step 1: start with

  • the number of observations n
  • the mean X
  • and the standard deviation s

Note: we should use the standard deviation of the entire population, but in many cases we won't know it.

We can use the standard deviation for the sample if we have enough observations (at least n=30, hopefully more).

Using our example:

  • number of observations n = 40
  • mean X = 175
  • standard deviation s = 20

Step 2: decide what Confidence Interval we want: 95% or 99% are common choices. Then find the "Z" value for that Confidence Interval here:

Confidence
Interval
Z
80% 1.282
85% 1.440
90% 1.645
95% 1.960
99% 2.576
99.5% 2.807
99.9% 3.291

For 95% the Z value is 1.960

Step 3: use that Z value in this formula for the Confidence Interval

X  ±  Zs√n

Where:

  • X is the mean
  • Z is the chosen Z-value from the table above
  • s is the standard deviation
  • n is the number of observations

And we have:

175 ± 1.960 × 20√40

Which is:

175cm ± 6.20cm

In other words: from 168.8cm to 181.2cm

The value after the ± is called the margin of error

The margin of error in our example is 6.20cm

What value of z should be used to calculate a confidence interval with a 98% confidence level?

Calculator

We have a Confidence Interval Calculator to make life easier for you.

We also have a very interesting Normal Distribution Simulator. where we can start with some theoretical "true" mean and standard deviation, and then take random samples.

It helps us to understand how random samples can sometimes be very good or bad at representing the underlying true values.

Another Example

What value of z should be used to calculate a confidence interval with a 98% confidence level?

Example: Apple Orchard

Are the apples big enough?

There are hundreds of apples on the trees, so you randomly choose just 46 apples and get:

  • a Mean of 86
  • a Standard Deviation of 6.2

So let's calculate:

X  ±  Zs√n

We know:

  • X is the mean = 86
  • Z is the Z-value = 1.960 (from the table above for 95%)
  • s is the standard deviation = 6.2
  • n is the number of observations = 46

86 ± 1.960 × 6.2√46 = 86 ± 1.79

So the true mean (of all the hundreds of apples) is likely to be between 84.21 and 87.79

True Mean

Now imagine we get to pick ALL the apples straight away, and get them ALL measured by the packing machine (this is a luxury not normally found in statistics!)

And the true mean turns out to be 84.9

Let's lay all the apples on the ground from smallest to largest:

What value of z should be used to calculate a confidence interval with a 98% confidence level?
Each apple is a green dot,

our observations are marked  blue

Our result was not exact ... it is random after all ... but the true mean is inside our confidence interval of 86 ± 1.79 (in other words 84.21 to 87.79)

Now the true mean might not be inside the confidence interval, but in 95% of the cases it will be!

95% of all "95% Confidence Intervals" will include the true mean.

Maybe we had this sample, with a mean of 83.5:

What value of z should be used to calculate a confidence interval with a 98% confidence level?
Each apple is a green dot,

our observations are marked purple

That does not include the true mean. That can happen about 5% of the time for a 95% confidence interval.

So how do we know if our sample is one of the "lucky" 95% or the unlucky 5%? Unless we get to measure the whole population like above we simply don't know.

This is the risk in sampling, we might have a "bad" sample.

Example in Research

Here is Confidence Interval used in actual research on extra exercise for older people:

What value of z should be used to calculate a confidence interval with a 98% confidence level?

What is it saying? Looking at the "Male" line we see:

  • 1,226 Men (47.6% of all people)
  • had a "HR" (see below) with a mean of 0.92,
  • and a 95% Confidence Interval (95% CI) of 0.88 to 0.97 (which is also 0.92±0.05)

"HR" is a measure of health benefit (lower is better), so it says that the true benefit of exercise for the wider population of men has a 95% chance of being between 0.88 and 0.97

* Note for the curious: "HR" is used a lot in health research and means "Hazard Ratio" where lower is better. So an HR of 0.92 means the subjects were better off, and a 1.03 means slightly worse off.

Standard Normal Distribution

It is all based on the idea of the Standard Normal Distribution, where the Z value is the "Z-score"

For example the Z for 95% is 1.960, and here we see the range from -1.96 to +1.96 includes 95% of all values:

What value of z should be used to calculate a confidence interval with a 98% confidence level?

From -1.96 to +1.96 standard deviations is 95%

Applying that to our sample looks like this:

What value of z should be used to calculate a confidence interval with a 98% confidence level?

Also from -1.96 to +1.96 standard deviations, so includes 95%

Conclusion

The Confidence Interval is based on Mean and Standard Deviation. Its formula is:

X  ±  Zs√n

Where:

  • X is the mean
  • Z is the Z-value from the table below
  • s is the standard deviation
  • n is the number of observations

Confidence
Interval
Z
80% 1.282
85% 1.440
90% 1.645
95% 1.960
99% 2.576
99.5% 2.807
99.9% 3.291

11285, 11286, 11287, 11288, 11289, 11290, 11291, 11292

Copyright © 2021 MathsIsFun.com