So, assume we have an array like that: 4,6,9,10,2,25,12,6,9 And then I try to calculate quantiles with numpy.quantile and statistics.quantile
import numpy as np
from statistics import quantiles
arr = np.array([4,6,9,10,2,25,12,6,9,])
np.quantile(arr, (0.25, 0.50, 0.75))
quantiles(arr)
When I calculate with numpy the result:
array([ 6., 9., 10.])
When I calculate with statistics the result:
[5.0, 9.0, 11.0]
So which library is calculating correctly?