Read · 3 min
How To Calculate A Confidence Interval (CI)
Depending on our sample size, our confidence interval formula will depend on values from either our Z-table or T-table.
Additionally, our CI formulas will change slightly based on whether or not our parameter of interest is either a mean or a proportion, or if we are comparing one-sample or two-samples.
In general, if you do not know the population standard deviation, you will use a t-score. It gets a little more complicated if you do know the population standard deviation, then it gets a little more complicated.
Online, you will find a lot of awesome z-score tables and t-score tables.
Z-table Confidence Interval Formulas:
-
one-sample mean z-table CI formula:
-
one-sample proportion z-table CI formula:
-
two-sample mean z-table CI formula:
-
two-sample proportion z-table CI formula:
t-table Confidence Interval Formulas:
Search t-table with confidence level and degrees of freedom ()
for a one-sample problem
or
for a two-sample problem
-
one-sample mean CI t-table formula:
-
two-sample mean CI t-table formula:
such that
Note: There are several different methods that can be used to calculate the confidence interval for small one and two-sample proportions that are not listed here.
Such that:
= Number of members in sample
= Number of members in sample #1
= Number of members in sample #2
= Sample Mean
= Sample #1 Mean
= Sample #2 Mean
= hypothesized difference between the two population means
= Standard Deviation
= Standard Deviation for Sample #1
= Standard Deviation for Sample #2
= pooled estimate of the variance between two sample means
confidence level = 90%, 95%, 99%, etc...
Some common values are 1.645, 1.96, and 2.576 for confidence levels 90%, 95%, and 99% respectively. More can be found on a Z-table.
values can be found on a t-table based on the desired confidence level and degrees of freedom.
Hit "Continue" for a CI calculation walkthrough for a one-sample mean and one-sample proportion problem
Confidence interval for one-sample mean
Question: The average score obtained by 10 students in a test is 75. Standard deviation of the sample is 8. Find the confidence interval at 95% confidence level.
Step 1) State our given variables
Given:
= 10 --> Therefore
= sample mean = 75
= standard deviation = 8
confidence level = 95%
Step 2) Plug values into appropriate CI formula
Because our sample of n = 10 is less than 30, we use a t-table.
Hence our CI is: [69.2775,80.7225]
Confidence interval for one-sample proportion
Question: We survey 76 veterinarians from several local veterinary clinics. 19 reported that they are left-handed. Thus 19/76 = 0.25 is our estimate of the proportion of left-handed veterinarians. We want to determine how accurate this estimate is by calculating a confidence interval to give us a confident understanding of the percentage of veterinarians that are left-handed. What is the confidence interval for based on this data?
Step 1) State our given variables
-->
Therefore, %
Therefore
Step 2) Plug in values into appropriate CI formula
[0.1526,0.3474] is our confidence interval
So provided this data came from a random sample, we are fairly confident that the true percentage of left-handed veterinarians is between .15 and .35
Hit "Continue" for a CI calculation walkthrough for a two-sample mean and a two-sample proportion problem
Confidence interval for two-sample mean
Question: What is the 95% confidence interval for these given values?
Step 1) State our given variables
From t-table -->
Step 2: Plug in values into appropriate CI formula
[7.165, 10.634] is our confidence interval
Confidence interval for two-sample proportion
Question: In two different space camp groups (#1 and #2), space camp participants were asked whether or not they LOVED mathematics. There were 96 participants in Group #1 and 123 participants in Group #2. 18 participants in Group #1 and 60 in Group #2 reported that they LOVED math. What is the 99% confidence interval for the difference between the two proportions?
Step 1) State our given variables
confidence level
Therefore Z* = 2.576
Step 2: Plug in values into appropriate CI formula
[0.1453,0.4553] is our confidence interval
This means that we are 99% confident that the true value of the difference between the two population proportions lies between .1435 and .4553




