3.4.2 Median
The median is the value that represents the middlemost observation in a dataset when the observations are arranged in ascending or descending order. It serves as the central observation and divides the data into two equal parts. The median is also referred to as the positional average.
Just like the Mean, according to the different types of data distributions, the calculation of the Median differs. Let’s look at these cases:
Ungrouped data
Consider we have an ungrouped dataset with observations, then the median is calculated as:
When is odd
When is even
Let’s understand it with an example.
Example 3.10. Imagine an e-commerce company selling a wide range of products online, and the company wants to analyze its sales data to gain insights into customer behavior and tailor its strategies for better revenue generation. One of the key metrics they are interested in is the median order value, which represents the typical amount customers spend on their platform. Let's consider a dataset of order values for a sample of 11 customers:
{$35, $42, $27, $54, $38, $47, $31, $45, $50, $43, $40}
To find the median order value, we will have to first arrange the dataset in ascending order:
|
Order value ($) |
27 |
31 |
35 |
38 |
40 |
42 |
43 |
45 |
47 |
50 |
54 |
Here, the number of observations , which is an odd number, so the median is:
The median order value is $42, which indicates that roughly half of the customers spent more than $42 and the other half spent less. This information is valuable for the company to make strategic decisions like they might offer special discounts to customers whose spending is slightly below (like $38, $40) the median to encourage them to spend more.
Grouped data
Now, let’s examine the dataset which is classified into class intervals. However it’s not possible to calculate the exact median value of the grouped data, as the individual values within each interval are not known, and this lack of specific data points makes it impossible to determine the exact position of the median value within the dataset. However, it is possible to approximate the median using the following formula: