Sub topic 8
Turning data points into a range
This chapter assumes you have already matched your target job to a role family and level. It also assumes you have collected several pay figures from postings, surveys, or crowdsourced sites, and that you know the difference between base salary and total compensation. Here you will combine those figures into one working range you can defend.
Why a range and not a single number
Every pay source gives you a noisy estimate of what a role pays. Two postings for the same title can differ by 20 percent. A survey figure reflects last year's hiring. A crowdsourced entry reflects one person's package. No single figure is the market rate.
A range does three things a single number cannot:
- It shows how much pay varies for comparable jobs.
- It lets you place an offer inside the distribution ("this is below the middle") instead of judging it against one number.
- It gives you three useful reference points for later chapters: a low end, a middle, and a high end.
The goal is a range that is honest about its uncertainty, built the same way each time, and small enough to be useful.
Why medians and percentiles
The average (mean) is pulled around by extreme values. If six people report between 118,000 and 140,000 and one reports 400,000, the mean jumps well above what most comparable roles pay. The median is the middle value when the data is sorted, so one extreme entry barely moves it.
Percentiles extend that idea. The Nth percentile is the value below which N percent of the data falls.
| Statistic | Meaning | Use in your research |
|---|---|---|
| 25th percentile (Q1) | A quarter of data points are lower | Lower edge of a typical range |
| 50th percentile (median) | Half are lower, half higher | Best single estimate of the market middle |
| 75th percentile (Q3) | Three quarters are lower | Upper edge of a typical range |
| 90th percentile | Only a tenth are higher | Stretch figure, for strong candidates or hot markets |
Use the 25th to 75th percentile as your default working range. It covers the middle half of the data and ignores both tails. This is the same idea as the interquartile range (IQR), which is Q3 minus Q1.
Worked example: one clean sample
Suppose you gathered seven annual base salaries from postings and surveys for the same role and level in your market. Python's statistics.quantiles computes the three quartile cut points.
import statistics
# Annual base salaries gathered from comparable postings and surveys
samples = [112000, 118000, 121000, 125000, 130000, 134000, 140000]
q1, median, q3 = statistics.quantiles(samples, n=4, method="inclusive")
print(q1, median, q3) # 119500.0 125000.0 132000.0The working range is about 119,500 to 132,000, with a midpoint of 125,000.
The method="inclusive" argument matters. It treats your samples as the full set of data you have, and it interpolates between neighboring values. The default method, "exclusive", assumes your samples are a draw from a larger population and extrapolates beyond them. For small salary samples it can produce a Q1 below your lowest observation. Inclusive keeps the quartiles inside the data you actually saw.
Interpolation explains the 119,500 figure. With seven values the Q1 position falls halfway between the second value (118,000) and the third (121,000), which gives 119,500.
Clean the data before you summarize it
Statistics cannot repair bad inputs. Before computing anything, check each data point against these questions:
- Is it the same role and level? A "Senior Engineer" at a company that uses five levels may be your "Staff". Drop or relabel mismatches.
- Is it the same pay basis? Mixing base salary with total compensation inflates the range. Keep one basis per list. Convert hourly rates to annual only if you are sure of the hours.
- Is it current? Pay data older than about 12 to 18 months in a moving market understates today's pay. Drop it or mark it as dated.
- Is it a duplicate? The same posting copied across job boards counts once.
- Is the currency and location stated? Convert or exclude entries you cannot place.
After that, you can screen for statistical outliers. A common rule flags any value more than 1.5 times the IQR below Q1 or above Q3.
import statistics
def drop_outliers(values):
q1, _, q3 = statistics.quantiles(values, n=4, method="inclusive")
iqr = q3 - q1
low, high = q1 - 1.5 * iqr, q3 + 1.5 * iqr
kept = [v for v in values if low <= v <= high]
dropped = [v for v in values if v < low or v > high]
return kept, dropped
samples = [112000, 118000, 121000, 125000, 130000, 134000, 140000, 210000]
kept, dropped = drop_outliers(samples)
print(kept) # [112000, 118000, 121000, 125000, 130000, 134000, 140000]
print(dropped) # [210000]Here the fence is about 97,375 to 158,375, so the 210,000 entry is flagged.
Combine several sources
One source is rarely enough. Postings show what employers advertise, surveys show what employers report paying, and crowdsourced entries show what individuals say they received. Each has different biases, which you will have judged in the previous chapter on source quality.
A simple, transparent approach is to look at each source separately first, then pool them.
import statistics
sources = {
"postings": [118000, 124000, 128000, 135000],
"survey": [121000, 127000, 133000],
"crowd": [112000, 119000, 125000, 130000, 140000],
}
for name, values in sources.items():
print(f"{name:9} n={len(values)} median={statistics.median(values):,.0f}")
pooled = [v for values in sources.values() for v in values]
q1, median, q3 = statistics.quantiles(pooled, n=4, method="inclusive")
print(f"pooled n={len(pooled)} Q1={q1:,.0f} median={median:,.0f} Q3={q3:,.0f}")The output is:
postings n=4 median=126,000
survey n=3 median=127,000
crowd n=5 median=125,000
pooled n=12 Q1=120,500 median=126,000 Q3=130,750The three source medians sit within 2,000 of each other, which is a good sign. When independent sources agree, you can trust the pooled range more.
Pooling has a weakness. A source with many entries dominates the result, even if it is the least reliable. If a crowdsourced site contributes 40 entries and an official survey contributes 3, the pooled range is mostly crowdsourced. There are two ways to handle this:
- Cap each source. Use at most a fixed number of entries per source, or summarize each source into its own median and then take the median of those medians.
- Weight by quality. Give more weight to larger, more recent, better-defined samples. This is more flexible but harder to explain, so record your weights.
If your sources disagree sharply, do not average the disagreement away. Find out why. A common cause is that one source covers a different location or company type.
Adjust before you pool, not after
Location, company size, industry, and funding stage shift pay. Apply those adjustments to individual data points before computing percentiles, or restrict your data to comparable entries. Adjusting the final range with a single rough percentage hides which data drove the result.
Two practical rules:
- Prefer filtering to scaling. Using only entries from your market and similar company type is more defensible than multiplying other markets' pay by a cost-of-labor factor.
- If you must scale, use one stated factor per entry, such as 0.92 for a lower-paying market, and keep the original value in your notes.
The overall process
Small samples and edge cases
Real research often leaves you with fewer data points than you want. Handle it as follows.
| Situation | What to do |
|---|---|
| Fewer than 5 points | Report the minimum, median, and maximum instead of quartiles. State that the range is rough. |
| 5 to 10 points | Quartiles work, but treat the edges as soft. One new data point can shift them noticeably. |
| All points are posted ranges | Use the midpoint of each posted range as one data point, and also note the lowest minimum and highest maximum. |
| Points cluster at round numbers | This is normal in postings and self-reports. Do not read false precision into the percentiles. |
| One source dominates | Cap its entries or summarize it separately, as described above. |
| Wide spread (Q3 more than about 30 percent above Q1) | The role is probably mixed across levels or markets. Go back and tighten the filters. |
Posted ranges deserve special care. A posting that says 110,000 to 150,000 gives the employer's full band, and the hiring target is often in the lower or middle part. Treat the range as two facts about the band, and treat only its midpoint as a data point.
Sanity checks
Before you trust the range, check it:
- Width. A good working range spans roughly 10 to 25 percent of the median. Much narrower suggests too little data. Much wider suggests mixed levels or markets.
- Consistency. The median should fall inside any official or posted range for the same role and location.
- Sensitivity. Remove each data point in turn and recompute. If removing one point moves the median by more than a few percent, the sample is too thin to rely on.
- Bias direction. Self-reported data tends to skew high, and posted minimums tend to skew low. If your pool leans on one, say so in your notes.
Common errors
- Using the mean. One high outlier makes the average misleading. Use the median.
- Mixing pay bases. Combining base salary with total compensation overstates the range. Convert everything to one basis first, which the next chapter on comparing total compensation covers.
- Using the default quantile method on tiny samples. Use
method="inclusive"so the quartiles stay within the data. - Deleting inconvenient data. Remove entries only for a stated reason such as wrong level or duplicate, never because they feel too low or too high.
- Treating the range as a promise. It describes what comparable roles tend to pay. Your own target, anchor, and walk-away figures come next and depend on your situation.
Exercise
You collected these annual base salaries for the same role, level, and market: 105000, 110000, 115000, 120000, 125000, 128000, 300000. (a) Which value does the 1.5 × IQR rule flag, and why should you check it before dropping it? (b) After dropping it, what is the median of the remaining six values?
Show answer
(a) With inclusive quartiles on all seven values, Q1 is 112,500 and Q3 is 126,500, so the IQR is 14,000 and the upper fence is 126,500 + 21,000 = 147,500. The value 300,000 is above the fence and is flagged. Before dropping it, check whether it is a typo, a different level, or a package that includes large equity or bonus amounts, and record the reason. (b) The remaining six values are 105000, 110000, 115000, 120000, 125000, 128000. The median is the average of the middle two, 115,000 and 120,000, which is 117,500.
Exercise
Your pooled data has 30 crowdsourced entries with a median of 135,000 and 3 survey entries with a median of 124,000. The pooled median comes out at 134,000. Name two ways to reduce the crowdsourced source's influence, and say what the gap between the two source medians suggests.
Show answer
You can cap the number of entries taken from each source, or summarize each source separately and take the median of the source medians (here 129,500 for two sources). You could also give the survey more weight and record the weights. An 11,000 gap suggests the sources differ in bias or scope. Self-reported crowdsourced pay often skews high, and the survey may cover a different company mix or an older period. Investigate the cause before pooling, and filter to comparable entries.