Mastering Means, Medians, Modes, and Quantiles: A Complete Guide
This article explains the four types of averages—arithmetic, geometric, weighted, and harmonic—along with median, mode, and various quantiles, showing how each is calculated and when to use them for reliable data analysis.
When we have a dataset, the first question is where its center lies, i.e., the value around which the data fluctuate, which is called a measure of central tendency. Usually the mean is used, and there are four kinds.
Arithmetic Mean
Population mean
Sample mean
Geometric Mean
In finance, when averaging performance over years, the average return should be the geometric mean (time‑weighted return), which is not affected by cash inflows or outflows. The geometric mean is obtained by adding 1 to each annual return, multiplying them together, taking the nth root, and then subtracting 1.
Weighted Mean
Here the weights sum to 1. When all weights are equal, the weighted mean reduces to the arithmetic mean. In finance, the weighted mean is used to compute a portfolio’s return, where each asset’s weight equals its market value proportion of the total portfolio.
Harmonic Mean
When observations are not all equal, the relationship holds: harmonic mean ≤ geometric mean ≤ arithmetic mean.
Median
If a dataset is ordered from smallest to largest, the median is the value that splits the ordered list into two equal halves. For an odd‑sized list, the median is the middle number; for an even‑sized list, it is the average of the two middle numbers.
Because the mean is sensitive to outliers, using the median provides a more stable estimate of central tendency.
Mode
The mode is the value that appears most frequently in a dataset. For example, in the series … the mode is 3. In another series … the modes are 1 and 3. In a series where all values appear equally, there is no mode.
A dataset may have one mode, multiple modes, or none, which limits its applicability.
Quantiles
When a dataset is ordered, a quantile is a value that divides the list into equal parts. The median is the 2‑quantile. Dividing the list into four parts yields three quartiles (Q1, Q2, Q3), where Q2 is the median. Dividing into five parts gives four quintiles, into ten parts gives nine deciles, and into one hundred parts gives ninety‑nine percentiles.
All quantiles can be expressed as percentages; for instance, the 2nd quintile corresponds to the 40th percentile, and the 3rd quartile corresponds to the 75th percentile. The following formula can be used to compute a quantile:
where N is the total number of observations, P is the desired percentile, and k is the resulting position in the ordered list.
Example: For the series …, to find the 4th quintile (the 80th percentile) in a list of 9 numbers, apply the formula to obtain the 8th number, which is 34.
Another example: For the series …, with 10 numbers, the 4th quintile (80th percentile) corresponds to the 8th number, which is 38.
Reference:
Zhu Shunquan, Economic and Financial Data Analysis and Its Python Application
Model Perspective
Insights, knowledge, and enjoyment from a mathematical modeling researcher and educator. Hosted by Haihua Wang, a modeling instructor and author of "Clever Use of Chat for Mathematical Modeling", "Modeling: The Mathematics of Thinking", "Mathematical Modeling Practice: A Hands‑On Guide to Competitions", and co‑author of "Mathematical Modeling: Teaching Design and Cases".
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.