Calculate the score at a given percentile of the input sequence.
For example, the score at per=50 is the median. If the desired quantile lies between two data points, we interpolate between them, according to the value of interpolation. If the parameter limit is provided, it should be a tuple (lower, upper) of two values.
Parameters : | a : array_like
per : array_like
limit : tuple, optional
interpolation : {‘fraction’, ‘lower’, ‘higher’}, optional
axis : int, optional
|
---|---|
Returns : | score : float (or sequence of floats)
|
See also
Examples
>>> from scipy import stats
>>> a = np.arange(100)
>>> stats.scoreatpercentile(a, 50)
49.5