Interpret bell curve, calculate 95th percentile value I have data showing the distribution of a given metric across a population.
The data is broken up into increments, with values for the 90th 97.5th and 99th percentiles.
How can I interpret this data to predict what the 95th percentile would be?




Percentile
1
2.5
10
20
30
40
50
60
70
80
90
97.5
99




Value
5.8
7.1
9.5
11
12.1
13.1
14
15.6
17.4
19.5
22.3
26.7
29.1




Two ways:
1. Linear interpolation (simple, but with a larger error): Interpolate between the 90th and 97.5th percentile. Your $x$ should be between 22.3 and 26.7, two-thirds towards the latter.
2. Curve fitting (computationally more complex, but more precise): You have $x$-values: 5.8, 7.1, ..., 29.1, and the corresponding $y$-values, which you should divide by 100 to get the probabilities: 0.01, 0.025, ..., 0.99. You adjust the $\mu$ and $\sigma$ parameters of the normal CDF, $\Phi(x; \mu, \sigma)$, to achieve the best fit between the given $y$-values and the ones given by $\Phi$. Finally, you calculate the inverse, $\Phi^{-1}(0.95; \mu, \sigma)$ to predict the 95th percentile.
Something like this:
import numpy as np
import scipy.optimize as opt
from scipy.stats import norm as gauss

# the data, as given in the question:
y = np.array([1, 2.5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 97.5, 99]) / 100
x = np.array([5.8, 7.1, 9.5, 11, 12.1, 13.1, 14, 15.6, 17.4, 19.5, 22.3, 26.7, 29.1])

# fit the Gaussian CDF to the data:
res = opt.minimize(
  lambda params: np.sum((gauss.cdf(x, loc=params[0], scale=params[1]) - y)**2),
  [10, 10]
)
# calculate the 95th percentile:
x_95 = gauss.ppf(.95, res.x[0], res.x[1])


#### the rest is just for visualisation:
import matplotlib.pyplot as plt

xx = np.linspace(5, 30, 100)
plt.plot(x, y, '.')
plt.plot(xx, gauss.cdf(xx, res.x[0], res.x[1]))
plt.plot([min(xx), x_95], [.95, .95], ':', c='k')
plt.plot([x_95, x_95], [0, .95], ':', c='k', label='$x_{95} = $' + f'{x_95:.2f}')
plt.legend()
plt.grid()
plt.title(f'$\mu$ = {res.x[0]:.2f}, $\sigma$ = {res.x[1]:.2f}')


