Table of Contents
The median in statistics refers to the middle value in a set of data when arranged in ascending or descending order. It is a measure of central tendency that divides the data into two equal parts, with half of the values above and half below. It is often used as a robust alternative to the mean, as it is less affected by extreme values and outliers. The median is commonly used to describe the typical value of a data set and is particularly useful for skewed distributions.
Statistics – Median
The median is a type of average value, which describes where the center of the data is located.
Median
The median is the middle value in a data set ordered from low to high.
Finding the Median
The median can only be calculated for numerical variables.
The formula for finding the middle value is:
( displaystyle frac{n + 1}{2} )
Where (n) is the total number of observations.
If the total number of observations is an odd number, the formula gives a whole number and the value of this observation is the median.
13, 21, 21, 40, 48, 55, 72
Here, there are 7 total observations, so the median is the 4th value:
( displaystyle frac{7 + 1}{2} = frac{8}{2} = 4 )
The 4th value in the ordered list is 40, so that is the median.
If the total number of observations is an even number, the formula gives a decimal number between two observations.
13, 21, 21, 40, 42, 48, 55, 72
Here, there are 8 total observations, so the median is between the 4th and 5th values:
( displaystyle frac{8 + 1}{2} = frac{9}{2} = 4.5 )
The 4th and 5th values in the ordered list is 40 and 42, so the median is the mean of these two values. That is, the sum of those two values divided by 2:
( displaystyle frac{40+42}{2} = frac{82}{2} = underline{41} )
Note: It is important that the numbers are ordered before you can find the median.
Finding the Median with Programming
The median can easily be found with many programming languages.
Using software and programming to calculate statistics is more common for bigger sets of data, as finding it manually becomes difficult.
Example
With Python use the NumPy library median() method to find the median of the values 13, 21, 21, 40, 42, 48, 55, 72:
import numpy values = [13,21,21,40,42,48,55,72]
x = numpy.median(values)
print(x)
Example
Use the R median() function to find the median of the values 13, 21, 21, 40, 42, 48, 55, 72:
values <- c(13,21,21,40,42,48,55,72) median(values)
Cite this article
stats writer (2024). What is the median when referring to statistics?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/what-is-the-median-when-referring-to-statistics/
stats writer. "What is the median when referring to statistics?." PSYCHOLOGICAL SCALES, 29 Jun. 2024, https://scales.arabpsychology.com/stats/what-is-the-median-when-referring-to-statistics/.
stats writer. "What is the median when referring to statistics?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/what-is-the-median-when-referring-to-statistics/.
stats writer (2024) 'What is the median when referring to statistics?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/what-is-the-median-when-referring-to-statistics/.
[1] stats writer, "What is the median when referring to statistics?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. What is the median when referring to statistics?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
