When psychologists and researchers collect data, they need a reliable way to describe what’s typical in a dataset. The mean – the simple arithmetic average – is often the go-to choice, but it has a significant weakness: it gets pulled toward extreme values. A single outlier can distort the mean dramatically, giving a misleading picture of the data. This is where the median steps in. As a measure of central tendency that focuses on position rather than magnitude, the median offers a more accurate snapshot of the center in many real-world datasets. Understanding how to calculate and interpret the median – for both ungrouped and grouped data – is a foundational skill in statistical analysis.
Table of Contents
- What is the median?
- Median for ungrouped data
- When the number of observations is odd
- When the number of observations is even
- Median for grouped data
- The formula for grouped data
- Step-by-step worked example
- Why the median matters: outliers and skewed distributions
- Median in normal vs. skewed distributions
- When to use the median
- A note on the median’s limitations
What is the median?
The median is the value that occupies the middle position when all observations are arranged in ascending or descending order. As noted in a peer-reviewed article published in the Journal of Pharmacology and Pharmacotherapeutics, the median divides a frequency distribution exactly into two halves – 50% of observations fall at or below the median, making it equivalent to the 50th percentile. For this reason, it is sometimes called a positional average: its value is determined entirely by the position of data points, not by their numerical magnitude.
This characteristic is what makes the median so valuable. Laerd Statistics explains that unlike the mean, the median is far less affected by outliers and skewed data – meaning that extreme values on either end of a dataset have little to no bearing on the final result. In a salary dataset where most workers earn between $12,000 and $18,000 but two executives earn significantly more, the mean salary would be pulled upward and misrepresent the typical worker. The median, by contrast, stays anchored to the actual center of the data.
Median for ungrouped data
Ungrouped data refers to raw, individual data points that have not been sorted into class intervals. Calculating the median here is relatively straightforward – the key step is always arranging the data in order first.
When the number of observations is odd
If a dataset has an odd number of values (n), the median is simply the value at position (n + 1) / 2 after the data has been arranged in ascending order. Consider the following dataset of 7 values representing anxiety scores:
Dataset: 3, 7, 8, 12, 15, 19, 22
Here, n = 7. Using the formula: (7 + 1) / 2 = 4th observation. Counting to the 4th value in the ordered list gives us 12. So, the median anxiety score is 12. Every value on either side of 12 has exactly three data points – a perfect split.
When the number of observations is even
When a dataset contains an even number of values, there is no single middle number. According to Scribbr’s guide on central tendency, the median in this case is calculated by averaging the two central values. Specifically, the formula uses the n/2th and the (n/2 + 1)th observations.
Consider this dataset of 6 test scores:
Dataset: 4, 9, 11, 15, 18, 24
Here, n = 6. The two middle positions are: 6/2 = 3rd value (11) and (6/2 + 1) = 4th value (15). The median = (11 + 15) / 2 = 13. The median score is 13, even though no actual data point has that value – it is an estimated central point between the two middle observations.
Median for grouped data
In psychological research and many scientific fields, data is frequently collected in large volumes and organized into class intervals – also called grouped data or frequency distributions. When individual values are not available and only ranges and their frequencies are known, a different approach is required to locate the median.
As explained by BYJU’S, finding the median of grouped data involves identifying a median class – the class interval that contains the middle value – and then applying an interpolation formula to estimate the median’s precise location within that class.
The formula for grouped data
The standard formula used to compute the median for grouped data is:
Median = L + [(n/2 โ cf) / f] ร h
Where each component has a specific meaning:
- L = Lower class boundary of the median class
- n = Total number of observations (sum of all frequencies)
- cf = Cumulative frequency of the class preceding the median class
- f = Frequency of the median class
- h = Class width (size of the class interval)
According to Cuemath, the median class is identified by first computing cumulative frequencies for each class interval, then locating the class whose cumulative frequency is just greater than or equal to n/2.
Step-by-step worked example
Suppose a psychology researcher collected reaction time data (in milliseconds) from 40 participants and organized the results into the following frequency distribution:
Step 1 – Build the cumulative frequency table. Add up the frequencies progressively. For example, if the frequencies across five class intervals are 5, 7, 12, 10, and 6, the cumulative frequencies would be 5, 12, 24, 34, and 40.
Step 2 – Find n/2. Total observations n = 40, so n/2 = 20.
Step 3 – Identify the median class. Look for the class interval whose cumulative frequency first equals or exceeds 20. In this case, the cumulative frequency reaches 24 at the third class interval (say, 30-40). So the median class is 30-40.
Step 4 – Extract values for the formula.
- L = 30 (lower boundary of median class)
- cf = 12 (cumulative frequency before the median class)
- f = 12 (frequency of the median class)
- h = 10 (class width)
Step 5 – Apply the formula.
Median = 30 + [(20 โ 12) / 12] ร 10 = 30 + [8/12] ร 10 = 30 + 6.67 = 36.67 ms
This result tells the researcher that the middle reaction time in this dataset is approximately 36.67 milliseconds – a reliable central point that isn’t distorted by any unusually fast or slow responses at either extreme. As highlighted by GeeksforGeeks, because grouped data works with ranges rather than exact values, this formula produces an estimated median – but it is an estimate that is mathematically sound and widely accepted in statistical practice.
Why the median matters: outliers and skewed distributions
One of the most practically important features of the median is its resistance to outliers. In statistics, outliers are data points that sit far outside the general range of a dataset – extremely high or extremely low values that don’t reflect the experience of most individuals in the sample.
The Australian Bureau of Statistics notes that when a distribution is skewed, the mean gets pulled toward the tail of the distribution, making it an unreliable center point. The median, however, stays close to where most data actually clusters. This is why the median is typically the preferred measure of central tendency whenever data is not symmetrically distributed.
In psychological research specifically, this matters a great deal. Consider a study measuring the number of therapy sessions attended by clients over a year. Most clients may attend 4-8 sessions, but a small group with severe conditions might attend 40 or more. The mean session count would be inflated by these high-attendance outliers. The median would give a far more accurate sense of the typical client’s experience.
As Statistics by Jim explains, statisticians describe the median as a robust statistic – meaning it holds up well even when data contains unusual or atypical values. The mean, by contrast, is sensitive to these values and can produce misleading summaries when they are present.
Median in normal vs. skewed distributions
The relationship between the median and other measures of central tendency depends heavily on the shape of the data distribution. In a perfectly symmetrical, normal distribution, the mean, median, and mode all coincide at the same central point. But this symmetry breaks down the moment data becomes skewed.
In a positively skewed distribution (where the tail extends to the right), the mean is pulled upward above the median. In a negatively skewed distribution (where the tail extends to the left), the mean is dragged below the median. As detailed in Introduction to Statistics for Psychology, the median consistently sits between the mean and mode in skewed distributions – making it the most stable and representative measure of center when data is asymmetrical.
This is a key reason why researchers must always inspect the shape of their distribution before selecting which measure of central tendency to report. Automatically defaulting to the mean can introduce significant error in skewed datasets.
When to use the median
Choosing the right measure of central tendency is not arbitrary – it depends on the nature of the data and the distribution. The median is typically the best choice in the following situations:
- Skewed distributions: When data is not normally distributed, the median better reflects the typical value.
- Presence of outliers: Extreme values distort the mean but have little impact on the median.
- Ordinal data: When data is ranked rather than measured on a continuous scale, the median is more appropriate than the mean. As noted by Scribbr, the median can be used with ordinal, interval, and ratio data – but not with nominal (categorical) data.
- Large grouped datasets: When working with frequency distributions and class intervals, the median formula provides a reliable estimated center point.
A note on the median’s limitations
While powerful, the median is not without its drawbacks. Unlike the mean, it does not use every value in the dataset in its calculation – it only identifies a positional midpoint. As the Journal of Pharmacology and Pharmacotherapeutics points out, this means the median is not easily used in further algebraic calculations or in many inferential statistical tests. For example, if two datasets are combined, the median of the combined group cannot be derived mathematically from the medians of the individual groups alone. For these reasons, when data is normally distributed and free of extreme outliers, the mean remains the preferred statistic – because it takes every value into account and is more compatible with advanced statistical procedures.
The key takeaway is that neither the mean nor the median is universally superior. Choosing correctly means understanding your data first – its shape, its scale of measurement, and whether outliers are likely to distort the results.
What do you think? If you were analyzing income data from a community where a few individuals earn significantly more than everyone else, would you trust the mean or the median to represent the typical income – and why? And in psychological research, can you think of a scenario where reporting the mean instead of the median might lead to genuinely misleading conclusions about a population?
References
- https://pmc.ncbi.nlm.nih.gov/articles/PMC3157145/
- https://statistics.laerd.com/statistical-guides/measures-central-tendency-mean-mode-median.php
- https://www.scribbr.com/statistics/central-tendency/
- https://byjus.com/maths/median-of-grouped-data/
- https://www.cuemath.com/data/median-of-grouped-data/
- https://www.geeksforgeeks.org/maths/median-of-grouped-data/
- https://www.abs.gov.au/statistics/understanding-statistics/statistical-terms-and-concepts/measures-central-tendency
- https://statisticsbyjim.com/basics/measures-central-tendency-mean-median-mode/
- https://open.maricopa.edu/psy230mm/chapter/chapter-4-measures-of-central-tendency/
Leave a Reply