### Median Definition

Median (a measure of central tendency) is the middle-most value in the data set when all of the values (observations) in a data set are arranged either in ascending or descending order of their magnitude. The median is also considered as a measure of central tendency which divides the data set in two halves, where the first half contains 50% observations below the median value and 50% above the median value. If in a data set, there are an odd number of observations (data points), the median value is the single-most middle value after sorting the data set.

After understanding the median definition, let us consider few examples to calculate the median for a data set.

**Median Example** – 1

**Question: **For the following data set: 5, 9, 8, 4, 3, 1, 0, 8, 5, 3, 5, 6, 3, calculate the median.

**Answer**: To find the median of the given data set, first sort the data (either in ascending or descending order), that is

0, 1, 3, 3, 3, 4, 5, 5, 5, 6, 8, 8, 9. The middle-most value of the above data after sorting is 5, which is the median of the given data set.

When the number of observations in a data set is even then the median value is the average of two middle-most values in the sorted data.

**Median Example** – 2

**Question: **Consider the following data set, 5, 9, 8, 4, 3, 1, 0, 8, 5, 3, 5, 6, 3, 2. Compute the median.

**Answer:** To find the **median** first sort it and then locate the middle-most two values, that is,

0, 1, 2, 3, 3, 3, 4, 5, 5, 5, 6, 8, 8, 9. The middle-most two values are 4 and 5. So the median will be the average of these two values, i.e. 4.5 in this case.

The **median** is less affected by extreme values in the data set, so the median is the preferred measure of central tendency when the data set is skewed or not symmetrical.

### Median Formula for Odd Number of Observations

For large data sets it is relatively very difficult to locate median values in sorted data. It will be helpful to use the median value using the formula. The formula for an odd number of observations is

$\begin{aligned}

Median &=\frac{n+1}{2}th\\

Median &=\frac{n+1}{2}\\

&=\frac{13+1}{2}\\

&=\frac{14}{2}=7th

\end{aligned}$

The 7th value in sorted data is the median of the given data.

### Median Formula for Even Number of Observations

The **median** formula for an even number of observations is

$\begin{aligned}

Median&=\frac{1}{2}(\frac{n}{2}th + (\frac{n}{2}+1)th)\\

&=\frac{1}{2}(\frac{14}{2}th + (\frac{14}{2}+1)th)\\

&=\frac{1}{2}(7th + 8th )\\

&=\frac{1}{2}(4 + 5)= 4.5

\end{aligned}$

Note that the median measure of central tendency, cannot be found for categorical data.