Learn how to calculate mean median mode statistics for grouped and ungrouped data with one clear guide designed for students and analysts. This walkthrough explains each measure of central tendency so you can apply the right method quickly and accurately.
Use the following reference table to compare definitions, formulas, use cases, and examples for mean, median, mode, and range at a glance.
| Measure | Formula | When to Use | Example Dataset |
|---|---|---|---|
| Mean | Sum of values ÷ Number of values | Data is roughly symmetric with few extreme values | 12, 15, 18, 19, 20 → Mean = 16.8 |
| Median | Middle value after sorting (or average of two middle values) | Data is skewed or contains outliers | 12, 15, 18, 19, 20 → Median = 18 |
| Mode | Most frequently occurring value(s) | Identifying common categories or peaks in data | 11, 12, 12, 14, 15 → Mode = 12 |
| Range | Maximum value − Minimum value | Quick sense of data spread | 11, 12, 12, 14, 15 → Range = 4 |
How to Calculate the Mean for Ungrouped Data
To calculate mean for ungrouped data, add all numbers together and divide by the count of values. This arithmetic average is sensitive to every entry in the dataset.
For example, with scores 78, 85, 92, 67, 88, the sum is 410 and dividing by 5 gives a mean of 82. This method works well when no single value dominates the distribution.
How to Find the Median in Sorted Data
Finding the median requires sorting the data first and then selecting the middle value. If the count of values is odd, the median is the center item; if even, it is the average of the two center items.
For dataset 4, 7, 7, 10, 13, 15, sorting shows six values, so the median is the average of the third and fourth values, (7 + 10) ÷ 2, which equals 8.5. This approach reduces the impact of extreme high or low numbers.
How to Determine the Mode in Categorical and Numerical Data
To determine the mode, count how many times each value appears and select the most frequent one. A dataset can have one mode, multiple modes, or no mode at all if all values are unique.
Survey responses of 2, 4, 4, 5, 5, 5, 6 show a mode of 5 because it occurs three times, more than any other number. Mode is especially useful for categorical data such as colors, brands, or survey ratings.
Handling Grouped Data and Frequency Tables
For grouped data, use class midpoints and frequencies to estimate the mean. Multiply each midpoint by its frequency, sum these products, and divide by the total frequency to obtain an approximate mean.
Median for grouped data can be estimated with the median class formula, identifying the class containing the middle position and interpolating within that class. Mode is approximated from the modal class, often the class with the highest frequency, using formulas that consider the frequencies of adjacent classes.
Key Takeaways for Accurate Statistics Calculations
- Use the mean for symmetric data without strong outliers.
- Choose the median when data is skewed or has extreme values.
- Apply the mode to find the most common category or peak value.
- Check for multiple modes or no mode in your dataset.
- With grouped data, rely on midpoints and class boundaries for reliable estimates.
FAQ
Reader questions
How do I calculate mean median mode by hand for a small dataset?
Add all numbers and divide by count for the mean, sort the data and pick the middle value for the median, and identify the most repeated number for the mode.
What is the difference between mean and median with outliers in the data?
The mean shifts toward outliers because it uses all values, while the median remains stable since it depends only on the middle position after sorting.
Can mode be used for non-numeric categories like colors or brands?
Yes, mode works for any category type, showing the most common label or choice among observations. Use class midpoints for the mean, locate the median class and interpolate, and identify the modal class then apply adjacent frequencies for mode estimation.