Charta is on Google Play: practise on the go. Get the app
Charta

Use sample data to estimate quantiles, the median among them.

FRM® Part I · Quantitative Analysis · Sample Moments · FRM1.QA.5.i

The idea

A sample quantile is read from the ordered data. The median is the middle observation when n is odd and the average of the two middle observations when n is even, and the data must be sorted first. For a general quantile q, one simple convention counts from the smallest value and takes the observation at Position = ceiling(n × q). For a 5% lower-tail quantile of 100 returns, that is the 5th smallest. This is how historical simulation estimates VaR. Quantiles and the median depend on ranks, so they are robust to outliers, unlike the mean, which moves with every extreme value. Rounding and counting from the wrong end are the typical errors, and the question usually states which convention to use.

Formulas

Position of a sample quantile

Position = ⌈n × q⌉

n
the number of observations
q
the quantile probability

Count from the smallest value of the sorted data and round up. Questions usually state the convention, so check it before counting.

A practice question

From the question bank, with the reason each wrong option is wrong.

Six daily returns (in %) are 1.2, -0.5, 2.8, 0.4, -1.9 and 3.5. What is the sample median?

  1. 0.40%Why not: Takes the lower of the two middle values instead of averaging them.
  2. 0.80% - correct
  3. 1.20%Why not: Takes the upper of the two middle values instead of averaging them.
  4. 0.92%Why not: Calculates the mean rather than the median.

Ordered: -1.9, -0.5, 0.4, 1.2, 2.8, 3.5. With n = 6 the median is the average of the 3rd and 4th values: (0.4 + 1.2)/2 = 0.80%.

A harder one

A risk manager estimates the 5% quantile of 40 daily returns as the ceiling(n x 0.05)-th smallest observation. The five smallest returns (in %) are -4.8, -3.9, -3.1, -2.7 and -2.4. What is the estimate?

  1. -4.8%Why not: Takes the minimum, treating the worst observation as the 5% quantile.
  2. -3.1%Why not: Uses the (n x 0.05 + 1) = 3rd smallest observation rather than the 2nd.
  3. -3.9% - correct
  4. -2.4%Why not: Picks the 5th smallest observation, confusing the 5% level with a count of five observations.

n x 0.05 = 2, so the estimate is the 2nd smallest observation: -3.9%. This is the historical-simulation 95% VaR loss of 3.9%, reported as a positive number.

The hardest tier

A risk manager estimates the 1% quantile of 250 daily returns as the ceiling(n x q)-th smallest observation. The five smallest returns (in %) are -6.2, -5.1, -4.4, -3.8, -3.5. What is the estimate?

  1. -4.4% - correct
  2. -5.1%Why not: Rounds n x q = 2.5 down to 2 rather than up to 3.
  3. -3.8%Why not: Uses ceiling(n x q) + 1 = 4th smallest, adding an extra position.
  4. -6.2%Why not: Takes the single worst return, treating it as the 1% quantile.

n x q = 250 x 0.01 = 2.5, which rounds up to 3, so the estimate is the 3rd smallest observation: -4.4%. The estimated 99% VaR is a loss of 4.4%.

In the app: 6 practice questions on this outcome, spaced review that brings it back before you forget it.

Start free →

More in Sample Moments