Introduction to Median of Ungrouped Data
The post is about calculating the median ungrouped data. The median is the most central point (middlemost central value) of the data/set of observations, with the condition that the data or set of observations should be arranged in ascending or descending order. The median divides the data into two equal parts. That is the main objective of the median.
Table of Contents
It is important to note that the criteria for finding the median for grouped and ungrouped data are different.
The primary and secondary data can be defined as:
- Primary data, also called raw or ungrouped data, does not undergo any statistical procedure/method, which is not in the form of frequency distribution.
- Secondary data may also be called group data if it is in the form of frequency distribution.
Let us discuss how to find the median for ungrouped data.
There are two cases for ungrouped data. These cases are based on no of observations which is $n$
When the number of observations is odd (Say $n$ i.e. $n$ is odd), and when the number of observations is even (Say $n$ i.e. $n$ is even).
Median Calculations
The data below contains the odd number of observations.
Observation No. (Ascending Order) | 1st | 2nd | 3rd | 4th | 5th | 6th | 7th | 8th | 9th | 10th | 11th |
Data Values | 81 | 89 | 90 | 96 | 100 | 102 | 103 | 104 | 108 | 109 | 118 |
(Descending Order) | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
Since the number of observations is odd ($n = 11$), the central value after arranging in ascending order will be the 6th value. and the 6th value is 102. That is the median is 102 for the above data.
The position of the median can be located mathematically, as follows:
\begin{align*}
\tilde{x} &= \left( \frac{n+1}{2} \right)th\,\, \text{value}\\
&=\frac{11+1}{2} = 6th\,\, \text{value}
\end{align*}
The value at the 6th position (from sorted data) is 102. The $\tilde{x}$ can be read as “x-tild” which is the notation of the median.
Median for Even Numbers of Observations
Consider the following data that contains an even number of observations.
Observation No. | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Data Values | 81 | 100 | 96 | 108 | 90 | 102 | 104 | 103 | 109 | 89 |
Data after sorting (either in ascending or descending order) is
Observations No. | 1st | 2nd | 3rd | 4th | 5th | 6th | 7th | 8th | 9th | 10th |
x | 81 | 89 | 90 | 96 | 100 | 102 | 103 | 104 | 108 | 109 |
Since $n=10$ which is even, the central position (that is median) lies between the 5th value and the 6th value. This central value is the average of the 5th and 6th values (from the sorted data). The average of these two central observations is called the median. The two central positions are 100 and 102, take the average of these two numbers and find the median.
$$Median = \frac{100+102}{2} = 101$$
Median Formula for Large Data Sets
The median formula for large or small data sets can be represented mathematically.
- For large data sets one can find the median of data mathematically. The formula for both odd number of observations and even numbers of observations is different.
The point to remember when computing the median is that
- For an odd number of observations, the median is the centermost value after sorting the data
- For an even number of observations, the median is the average of two central values after sorting the data
\begin{align*}
\tilde{x} &= \frac{1}{2} \left[ \left(\frac{n}{2}th \, \, value \right)+ \left(\frac{n}{2}+1 \right)the \,\, value \right]\quad \quad \text{(When observations are even)}\\
&= \frac{n+1}{2} \quad \quad \text{(when observations are odd)}
\end{align*}
The other way of the median formula is
Consider, a data set containing 157 observations. To compute the median, first of all, you need to sort the data in either ascending or descending order. The formula for this data will be
$$\tilde{x} = \frac{n+1}{2} = \frac{157+1}{2}=79th$$.
The 79th observation in the sorted data will be the median of the data.
In case, if there are even number of observations (say $n=396$, the median will be
\begin{align*}
\tilde{x} &= \frac{1}{2}\left[\left(\frac{n}{2}\right)th + \left(\frac{n+1}{2}\right)th \right]\\
&=\frac{1}{2} \left[\frac{396}{2}th + \frac{396}{2}+1 \right]\\
&= \frac{1}{2} \left[198th + 199th\right]
\end{align*}
The average of 198th value and 199th value from the sorted data will be the median of the data.