Home » How to Find a Confidence Interval for a Median (Step-by-Step)

How to Find a Confidence Interval for a Median (Step-by-Step)

by Erma Khan

We can use the following formula to calculate the upper and lower bounds of a confidence interval for a population median:

j: nq  –  z√nq(1-q)

k: nq  +  z√nq(1-q)

where:

  • n: The sample size
  • q: The quantile of interest. For a median, we will use q = 0.5.
  • z: The z-critical value

We round j and k up to the next integer. The resulting confidence interval is between the jth and kth observations in the ordered sample data.

Note that the z-value that you will use is dependent on the confidence level that you choose. The following table shows the z-value that corresponds to popular confidence level choices:

Confidence Level z-value
0.90 1.645
0.95 1.96
0.99 2.58

Source: This formula comes from Practical Nonparametric Statistics, 3rd Edition by W.J. Conover.

The following step-by-step example shows how to calculate a confidence interval for a population median using the following sample data of 15 values:

Sample data: 8, 11, 12, 13, 15, 17, 19, 20, 21, 21, 22, 23, 25, 26, 28

Step 1: Find the Median

First, we need to find the median of the sample data. This turns out to be the middle value of 20:

8, 11, 12, 13, 15, 17, 19, 20, 21, 21, 22, 23, 25, 26, 28

Step 2: Find j and k

Suppose we would like to find a 95% confidence interval for the population median. To do so, we need to first find j and k:

  • j: nq – z√nq(1-q) = (15)(.5) – 1.96√(15)(.5)(1-.5) = 3.7
  • k: nq + z√nq(1-q) = (15)(.5) + 1.96√(15)(.5)(1-.5) = 11.3

We will round both j and k up to the nearest integer:

  • j: 4
  • k: 12

Step 3: Find the Confidence Interval

The 95% confidence interval for the median will be between the j = 4th and k = 12th observation in the sample dataset.

The 4th observation is equal to 13 and the 12th observation is equal to 23:

8, 11, 12, 13, 15, 17, 19, 20, 21, 21, 22, 23, 25, 26, 28

Thus, the 95% confidence interval for the median turns out to be [13, 23].

Additional Resources

How to Find a Confidence Interval for a Proportion
How to Find a Confidence Interval for a Mean
How to Find a Confidence Interval for a Standard Deviation

Related Posts