Finance Formulas

Quantitative Methods

core

Percentiles, Quartiles and the Interquartile Range

Builds onArithmetic Mean Return — if this page feels steep, start there.

Ly=(n+1) y100,Py=X⌊Ly⌋+(Ly−⌊Ly⌋)(X⌊Ly⌋+1−X⌊Ly⌋)L_y = (n+1)\,\frac{y}{100}, \qquad P_y = X_{\lfloor L_y\rfloor} + \left(L_y - \lfloor L_y\rfloor\right)\left(X_{\lfloor L_y\rfloor+1} - X_{\lfloor L_y\rfloor}\right)

Reading the notation

LyL_y
the LOCATION (rank position) of the y-th percentile in the sorted list — a position, not a return
n+1n+1
the number of observations plus one; the +1 places the percentiles evenly in the gaps between ranked observations
y100\frac{y}{100}
the percentile as a fraction: the 25th percentile is one quarter of the way through the list
X⌊Ly⌋X_{\lfloor L_y\rfloor}
the sorted observation at the whole-number part of the location (the floor, i.e. rounded down)
Ly−⌊Ly⌋L_y - \lfloor L_y\rfloor
the fractional part of the location: how far past that observation toward the next one the percentile sits
PyP_y
the percentile value itself: the return below which about y% of the observations fall
IQR=P75−P25IQR = P_{75} - P_{25}
the interquartile range: the width of the middle half of the data, a dispersion measure that ignores extremes

Why it must be true

A percentile answers "what value has y% of the data below it?" You cannot answer that from unsorted numbers, so sort first. Then ask where the y-th percentile lies in the ranking. With nn observations there are n+1n+1 gaps (counting the ends), so the location is the fraction y/100y/100 of the way along those n+1n+1 steps: Ly=(n+1)y/100L_y = (n+1)y/100.

If LyL_y lands exactly on a rank, the percentile is that observation. If it lands between two ranks, interpolate: move the fractional distance from the lower observation toward the higher one. The median is the 50th percentile, the quartiles are the 25th, 50th and 75th, and the interquartile range P75−P25P_{75}-P_{25} measures spread while ignoring the extremes.

The derivation

Rank the nn observations X(1)≤⋯≤X(n)X_{(1)} \le \dots \le X_{(n)}. Place the y-th percentile at the fraction y/100y/100 of the way through the n+1n+1 equal gaps:

Ly=(n+1)y100L_y = (n+1)\frac{y}{100}

Write Ly=k+fL_y = k + f with kk the whole part and 0≤f<10 \le f < 1. The percentile lies a fraction ff of the way from X(k)X_{(k)} to X(k+1)X_{(k+1)}:

Py=X(k)+f (X(k+1)−X(k))P_y = X_{(k)} + f\,\bigl(X_{(k+1)} - X_{(k)}\bigr)

Check with n=7n = 7 and y=50y = 50: L=4L = 4, the middle observation — the median, as it should be.

When to reach for it

A question gives a list of returns and asks for a quartile, a percentile, the median or the interquartile range — or for the ranking position of one of these.

Listen for

“the 25th / 75th / 90th percentile of the returns”“interquartile range”“quartile / quintile / decile”“at what position does the percentile fall”

Back-of-the-envelope

Estimate it in your head first — then the calculator only confirms.

  • ≈

    Sort before anything else. The exhibit is deliberately in the order observed. Cross out numbers as you move them into the sorted list.

  • ≈

    The location uses n+1n+1, not nn: for 9 observations the median is at (9+1)/2 = 5, the fifth value; for 10 it sits at 5.5, halfway between the fifth and sixth.

  • ≈

    Sanity bounds: every percentile must lie between the smallest and largest value, and P25≤P50≤P75P_{25} \le P_{50} \le P_{75}. An interpolated answer outside the two neighbours is an arithmetic slip.

Traps in applying it

  • ✗Skipping the sort and reading the position from the data as presented.
  • ✗Using $n$ instead of $n+1$ in the location formula.
  • ✗Rounding the location to a whole rank when it is fractional, instead of interpolating.
  • ✗Reporting the rank position when the question asks for the value (or the reverse).

Limits & criticisms

There is no single universal percentile definition: spreadsheets (inclusive and exclusive methods), statistical packages and the CFA formula (n+1)y/100(n+1)y/100 give slightly different answers on small samples, so always use the method the question specifies. Percentiles are also unstable in small samples and in the tails — the 99th percentile of 20 observations is mostly the maximum — and say nothing about how bad the data beyond that point are.

Where it came from

Percentiles go back to Francis Galton in the 1880s, who ranked children's heights and used "percentile" to describe a position in a distribution; quartiles and the interquartile range were popularized by John Tukey's exploratory data analysis and box plots in the 1970s because they resist outliers.

Today percentiles are the language of risk and performance: a 5th-percentile return underlies value at risk, fund managers are ranked by percentile within a peer group, and the IQR is the box in every box plot.

One identity, 3 questions

The exam can hide any variable. Each face below is the same equation solved for a different unknown — drill them separately.

Percentile value

Py=X⌊Ly⌋+(Ly−⌊Ly⌋)(X⌊Ly⌋+1−X⌊Ly⌋)P_y = X_{\lfloor L_y\rfloor} + (L_y-\lfloor L_y\rfloor)(X_{\lfloor L_y\rfloor+1}-X_{\lfloor L_y\rfloor})

The value face: after locating the rank, interpolate between the two neighbouring sorted observations by the fractional part of the location.

Drill this face →

Interquartile range

IQR=P75−P25IQR = P_{75} - P_{25}

Two percentile lookups subtracted: the width of the middle half of the data, a spread measure that ignores the tails.

Drill this face →

Percentile location

Ly=(n+1)y100L_y = (n+1)\frac{y}{100}

The position face: a rank, not a return. It can be fractional, which is the cue to interpolate.

Drill this face →

On the BA II Plus

Worked example: An investment committee wants a robust view of a strategy's returns over 8 months. The exhibit shows them in the order observed; the interquartile range of the returns (75th minus 25th percentile, using $L_y = (n+1)y/100$ with linear interpolation) is closest to:

  1. 1.[2ND] [DATA] [2ND] [CLR WORK] 7.5 [+/−] [ENTER] [↓] 4.5 [ENTER] [↓] 5 [ENTER] [↓] 6 [ENTER] [↓] 6.5 [ENTER] [↓] 7.5 [ENTER] [↓] 9 [ENTER] [↓] 9.5 [ENTER] [↓]sorting is by hand — the calculator will not rank for you. Entering the SORTED list makes position counting easy
  2. 2.( 8 [+] 1 ) [×] 75 [÷] 100 [=]location of the 75th percentile (repeat with 25 for the first quartile)
  3. 3.[−] 6 [=]the fractional part: how far past the lower rank. Multiply it by the gap between the two neighbouring sorted values and add the lower one

→ 4%