The median in statistics is the middle value of the provided data set arranged in ascending or descending order. The median represents the large data set values with a single value. When it comes to calculating the median of a data set, we must follow some steps that are mentioned in this article. Let’s learn the steps in the article.
Table of Contents
The median is one of the easiest measures of central tendency in statistics that indicates the middle value of a dataset. The value divides the dataset into two equal portions, with half of the values above and the rest below the median.
The middle value of a large data set is known as the median. It is very difficult to represent the whole data set, so we use the median to represent the whole data set. Among all the measures of central tendency in statistics, the median is the easiest for us to calculate.
Suppose we have a data set given like: 70, 85, 60, 90, 80, 75, 95, and have to find the median of it. then first of all we have to sort the data in ascending order 60, 70, 75, 80, 85, 90, and 95. Then Since the dataset has 7 observations (an odd number), the median is (7+1)/2 = 4th observation, which is 80.
To calculate the median of a large data set, we must follow some rules; the median formula will change depending on the data set given, whether it is even, odd, grouped or ungrouped, etc. Also, we have to sort the data in either ascending or descending order.
From Data to Decisions!
Learn Statistics, Python, and Machine Learning to Unlock High-Paying Careers in Tech
When the given data set is ungrouped, then for calculating the median of that data set, follow the below-mentioned steps:
- Step 1: Sort the data in ascending or descending order.
- Step 2: Count the number of elements in that data set.
- Step 3: Then check whether the number of elements is even or odd.
If the number of values in the given data set is odd, then the median formula is:
Median = (n+1) / 2 th data.
When the number of elements in the given data set is even, then the median formula is:
Median = 1/2 [(n/2) th term + ((n/2)+1)th term]
Grouped data is something in which class intervals, frequency, and cumulative frequency are given. It is also in continuous form, and frequency distribution is given in the form of a table. Then median of the given data is calculated by the formula:
Median = L + ((n/2 – CF)/f) x w
Where,
- l= lower class limit,
- n is the total frequency,
- CF is the cumulative frequency up to the end of the median class.
- f is the frequency of the median class,
- and w is the width of each class interval.
After learning about all the formulas of the median, now let’s calculate the median with some examples:
Solution: Given data set: 85, 92, 88, 91, 87, 84, 90, 86, 89
Step 1: sort the data set.
84, 85, 86, 87, 88, 89, 90, 91, 92
Step 2: The number of elements in the data set is 9, which is odd.
Step 3: Apply the formula when n is odd.
Median = (n+1)/2 th data
= (9+1)/2 th data
= 5th data = 88.
Median = 88.
Q2: The table below shows the marks obtained by students in a test:
Find the median of the marks.
Marks | 0-10 | 10-20 | 20-30 | 30-40 | 40-50 | 50-60 |
Number of Students | 5 | 8 | 12 | 20 | 10 | 5 |
Solution: To find the median of this frequency distribution, calculate the cumulative frequency of the data.
Marks | 0-10 | 10-20 | 20-30 | 30-40 | 40-50 | 50-60 |
Number of Students | 5 | 8 | 12 | 20 | 10 | 5 |
Cumulative Frequency | 5 | 13 | 25 | 45 | 55 | 60 |
Here, n = ∑fi = 5+8+12+20+10+5 = 60 (even)
n/2 = 60/2 =30
The cumulative frequency just greater than or equal to N/2 is 45. (so, the median class would be 30-40).
Now by using the formula,
Median = L + ((n/2 – CF)/f) x w
Where,
- L = Lower boundary of the median class = 30
- N/2 = 30 (already calculated)
- CF = Cumulative frequency before the median class = 25
- f = Frequency of the median class = 20
- w= Class width = 10
Median = 30 + ((30- 25)5/20) * 100
= 30 + (5/20)*10
= 30 + 2.5
Media = 32.5 Ans.
Median has a lot of advantages in our lives. Suppose 10 students are there in a class. They score marks like: 78, 67, 89, 97, 93, 88, 90, 85, 82, 75. In a class test of mathematics out of 100. Then, after finding the median of marks, we can conclude the performance of the students in the test
To calculate the median of the marks, first of all, we have to sort the array: 67, 75, 78, 82, 85, 88, 89, 90, 93, 97. Here n=10 (even).
So Median = 1/2 [10/2 th data + (10/2)th data+1]
= 1/2 [ 5th data + 6th data]
= 1/2 ( 85 + 88 )
= 1/2 * 173 = 86.5
Median = 86.5
To find the Median of two numbers, we can not find the middle data between them, because there are only two numbers. So the median of two numbers is also equal to the mean of two numbers. That is the sum of two numbers divided by 2.
Median = (a+b) / 2.
Example: find the median of 45, 45, 49.
Solution: Median = (45+49)/2 = 94/2 = 47.
So, the median is 47.
Become a Data Expert!
Learn Core Statistics and Cutting-Edge Data Science Techniques to Solve Real-World Problems.
Mean, median, and mode are the three measures of central tendency. These are used to study the data.
- Mean: It is calculated by summing all the observations and dividing by the total number of observations.
- Median: It is the middle data of a large data set.
- Mode: It is calculated by finding which elements occur more number of times. The element having the highest frequency.
Example: given a set of data 56, 67, 89, 45, 23, 56, 78, 45, 34, 67, 56, 90, 67, 23, 56, calculate the mean, median, and mode.
Mean = (56 + 67 + 89 + 45+ 23+ 56+ 78+ 45+ 34+ 67+ 56+90+ 67+23+56) / 15
= 56.93
To find the median, we have to sort the data set. 23, 23, 34, 45, 45, 56, 56, 56, 56, 67, 67, 67, 78, 89, 90
Median = (15+1)/2 th data
= 16/2 th data
= 8th data
= 56.
Mode = 56 (having frequency 4).
Get 100% Hike!
Master Most in Demand Skills Now!
Conclusion
In Conclusion, the Median is the middle data of any large set. It is the value that divides the dataset into two equal portions, with half of the values above and the rest below the median. we have learnt formula to calculate the Median in both grouped and ungrouped forms. The median is used to represent the whole data set. The median is easy to calculate and an essential measure of central tendency. If you’re eager to delve deeper into this field, consider enrolling in our Data Science Course to prepare yourself for a future-ready career.
The median is the middle value of a large data set sorted in ascending or descending order.
The median of two numbers is the sum of the numbers divided by 2.
The median is the middle value of the data set ordered in ascending or descending order. While the mean is just the sum of the numbers divided by the total number of observations, does not matter whether the data set is sorted or not.
Mode = 3* Median – 2 * Mode
The median of 7 and 7 is (7+7)2 = 7.
Our Data Science Courses Duration and Fees
Cohort starts on 11th Jan 2025
₹65,037
Cohort starts on 18th Jan 2025
₹65,037
Cohort starts on 11th Jan 2025
₹65,037