@@ -876,8 +876,12 @@ output array `q` may also be specified. (If not provided, a new output array is
876876The keyword argument `sorted` indicates whether `v` can be assumed to be sorted; if
877877`false` (the default), then the elements of `v` will be partially sorted in-place.
878878
879+ Samples quantile are defined by `Q(p) = (1-γ)*x[j] + γ*x[j+1]`,
880+ where `x[j]` is the j-th order statistic of `v`, `j = floor(n*p + m)`,
881+ `m = alpha + p*(1 - alpha - beta)` and `γ = n*p + m - j`.
882+
879883By default (`alpha = beta = 1`), quantiles are computed via linear interpolation between the points
880- `((k-1)/(n-1), v [k])`, for `k = 1:n` where `n = length(v)`. This corresponds to Definition 7
884+ `((k-1)/(n-1), x [k])`, for `k = 1:n` where `n = length(v)`. This corresponds to Definition 7
881885of Hyndman and Fan (1996), and is the same as the R and NumPy default.
882886
883887The keyword arguments `alpha` and `beta` correspond to the same parameters in Hyndman and Fan,
@@ -1021,12 +1025,11 @@ probabilities `p` on the interval [0,1]. The keyword argument `sorted` indicates
10211025`itr` can be assumed to be sorted.
10221026
10231027Samples quantile are defined by `Q(p) = (1-γ)*x[j] + γ*x[j+1]`,
1024- where ``x[j]`` is the j-th order statistic, and `γ` is a function of
1025- `j = floor(n*p + m)`, `m = alpha + p*(1 - alpha - beta)` and
1026- `g = n*p + m - j`.
1028+ where `x[j]` is the j-th order statistic of `itr`, `j = floor(n*p + m)`,
1029+ `m = alpha + p*(1 - alpha - beta)` and `γ = n*p + m - j`.
10271030
10281031By default (`alpha = beta = 1`), quantiles are computed via linear interpolation between the points
1029- `((k-1)/(n-1), v [k])`, for `k = 1:n` where `n = length(itr)`. This corresponds to Definition 7
1032+ `((k-1)/(n-1), x [k])`, for `k = 1:n` where `n = length(itr)`. This corresponds to Definition 7
10301033of Hyndman and Fan (1996), and is the same as the R and NumPy default.
10311034
10321035The keyword arguments `alpha` and `beta` correspond to the same parameters in Hyndman and Fan,
0 commit comments