Our confidence interval calculator can help you find the confidence interval for a sample based on the mean, standard deviation, and sample size. Moreover, this tool also provides the confidence interval by using raw data.
What is the Confidence Interval?
A confidence interval estimates the range of values within which a true population parameter is likely to fall based on sample statistics. Confidence interval measures the degree of uncertainty or certainty in the estimation process.
Confidence intervals are often determined using confidence levels of 95% or 99%.
Confidence Interval Formula
The formula for the confidence interval is:
CI = x̄ ± z (s/√n)
Where
Table of Z-values for Confidence Intervals
Confidence level | Z-value |
80% | 1.282 |
85% | 1.440 |
90% | 1.645 |
95% | 1.960 |
98% | 2.326 |
99% | 2.576 |
99.5% | 2.807 |
99.9% | 3.291 |
Confidence Interval for Raw Data
When you have raw data, calculate the confidence interval using the following three formulas.
- Formula to Calculate Sample Means
x̄ = [x1 + x2 + x3 + … + xn]/n
Here n is the total number of the given observation.
- Sample Standard Deviation Formula
s = √[∑(xi - x̄)2/n – 1]
- Use Confidence Interval Formula
CI = x̄ ± z (s/√n)
How to Calculate Confidence Interval in Statistics?
The confidence interval can be determined using the tool provided above. However, let us break down the method for calculating a confidence interval with examples.
Example 1. (When Means and SD are given)
25 students from a school were randomly selected for an experiment. The average score in a math test for this sample was 85 points with a standard deviation of 6 points. Compute the 99% confidence interval for the mean score of all students in the school.
Solution:
Step 1. Identify the Values Given in the Problem.
The sample size (n) = 25
The sample mean (x̄) = 85
The sample standard deviation (s) = 6
Confidence Level = 99%
Step 2. Write the value of z by looking at the table of z-value corresponding to the 99% confidence level.
Z = 2.576
Step 3. Use the formula for the Confidence interval.
CI = x̄ ± z (s/√n)
Step 4. Substitute the given and calculated values into the formula of the confidence interval.
CI = 85 ± 2.576 (6/√25)
CI = 85 ± (2.576) (1.2)
CI = 85 ± 3.0912
CI = 85 + 3.0912 & CI = 85 - 3.0912
CI = 88.0912 & CI = 81.9088
Therefore, the 99% confidence interval for the mean score of all students in the school is approximately 81.9088 to 88.0912.
Example 2: (For Raw Score)
Calculate the 90% confidence interval for the sample's mean: 2, 16, 3, 10, 11, and 6.
Solution:
Step 1: Find the Sample mean x̄.
n = 6
As we know, the formula of sample means is
x̄ = [x1 + x2 + x3 + … + xn]/n
x̄ = [2 + 16 + 3 + 10 + 11 + 6]/6 = 48/6 = 8
Step 2: Calculate the SD.
Data Set (xi) | xi - x̄ | (xi - x̄)2 |
2 | 2 - 8 = - 6 | 36 |
16 | 16 - 8 = 8 | 64 |
3 | 3 - 8 = - 5 | 25 |
10 | 10 - 8 = 2 | 4 |
11 | 11 - 8 = 3 | 9 |
6 | 6 - 8 = 2 | 4 |
----- | ----- | å (xi - x̄)2 = 142 |
s = √[∑(xi - x̄)2/n – 1]
s = √[142/6 – 1]
s = √[142/5]
= √28.4
s = 5.33
Step 3: Identify the z-value corresponding to the chosen level of confidence in the z-value table.
z = 1.645
Step 4: Now substitute all the obtained values in the confidence interval formula.
CI = 8 ± 1.645 (5.33/√6)
CI = 8 ± 1.645 (5.33/√6)
CI = 8 ± 1.645 (2.184)
CI = 8 ± 3.58
= 8 + 3.58= 11.58 | = 8 - 3.58= 4.42 |
Therefore, the 90% confidence interval for the sample's mean (2, 16, 3, 10, 11, and 6) is approximately (4.736, 11.264).