Quantile estimators based on k order statistics, Part 8: Winsorized Harrell-Davis quantile estimator

Andrey Akinshin · 2021-09-21
Update: this blog post is a part of research that aimed to build a statistically efficient and robust quantile estimator. A paper with final results is available in Communications in Statistics - Simulation and Computation (DOI: 10.1080/03610918.2022.2050396). A preprint is available on arXiv: arXiv:2111.11776 [stat.ME]. Some information in this blog post can be obsolete: please, use the official paper as the primary reference.

In the previous post, we have discussed the trimmed modification of the Harrell-Davis quantile estimator based on the highest density interval of size n/n. This quantile estimator showed a decent level of statistical efficiency. However, the research wouldn’t be complete without comparison with the winsorized modification. Let’s fix it!

All posts from this series:

The approach

The general idea is the same that was used in one of the previous posts. We express the estimation of the pth quantile as a weighted sum of all order statistics:

qp=i=1nWixi,Wi=F(ri)F(li),li=(i1)/n,ri=i/n,

where F is a CDF function of a specific distribution. In the case of the Harrell-Davis quantile estimator, we use the Beta distribution. Thus, F could be expressed via regularized incomplete beta function Ix(α,β):

FHD(u)=Iu(α,β),α=(n+1)p,β=(n+1)(1p).

In the case of the winsorized Harrell-Davis quantile estimator, we use a part of the Beta distribution inside the [L,R] window. In addition, we use the tails of the Beta distribution, but we replace “tailed elements” with elements that correspond to L and R positions. Thus, F could be expressed as rescaled regularized incomplete beta function inside the given window:

FWHD(u)={0foru<L,FHD(u)forLuR,1forR<u.

In the previous post, we discussed the idea of choosing L and R as the highest density interval of the given width RL:

RL=nn.

Numerical simulations

The relative efficiency value depends on five parameters:

  • Target quantile estimator
  • Baseline quantile estimator
  • Estimated quantile p
  • Sample size n
  • Distribution

As target quantile estimators, we use:

  • HD: Classic Harrell-Davis quantile estimator
  • THD-SQRT: The described in the previous post trimmed modification of the Harrell-Davis quantile estimator based on highest density interval of size n/n.
  • WHD-SQRT: The described above winsorized modification of the Harrell-Davis quantile estimator based on highest density interval of size n/n.

The conventional baseline quantile estimator in such simulations is the traditional quantile estimator that is defined as a linear combination of two subsequent order statistics. To be more specific, we are going to use the Type 7 quantile estimator from the Hyndman-Fan classification or HF7. It can be expressed as follows (assuming one-based indexing):

QHF7(p)=x(h)+(hh)(x(h+1))x(h),h=(n1)p+1.

Thus, we are going to estimate the relative efficiency of the trimmed and winsorized Harrell-Davis quantile estimators with different percentage values against the traditional quantile estimator HF7. For the pth quantile, the classic relative efficiency can be calculated as the ratio of the estimator mean squared errors (MSE):

Efficiency(p)=MSE(QHF7,p)MSE(QTarget,p)=E[(QHF7(p)θ(p))2]E[(QTarget(p)θ(p))2]

where θ(p) is the true value of the pth quantile. The MSE value depends on the sample size n, so it should be calculated independently for each sample size value.

We are also going to use the following distributions:

  • Uniform(0,1): Continuous uniform distribution; a=0,b=1
  • Tri(0,1,2): Triangular distribution; a=0,c=1,b=2
  • Tri(0,0.2,2): Triangular distribution; a=0,c=0.2,b=2
  • Beta(2,4): Beta distribution; α=2,β=4
  • Beta(2,10): Beta distribution; α=2,β=10
  • Normal(0,1^2): Standard normal distribution; μ=0,σ=1
  • Weibull(1,2): Weibull distribution; λ=1(scale),k=2(shape)
  • Student(3): Student distribution; ν=3(degrees of freedom)
  • Gumbel(0,1): Gumbel distribution; μ=0(location),β=1(scale)
  • Exp(1): Exponential distribution; λ=1(rate)
  • Cauchy(0,1): Standard Cauchy distribution; x0=0(location),γ=1(scale)
  • Pareto(1,0.5): Pareto distribution; xm=1(scale),α=0.5(shape)
  • Pareto(1,2): Pareto distribution; xm=1(scale),α=2(shape)
  • LogNormal(0,1^2): Log-normal distribution; μ=0,σ=1
  • LogNormal(0,2^2): Log-normal distribution; μ=0,σ=2
  • LogNormal(0,3^2): Log-normal distribution; μ=0,σ=3
  • Weibull(1,0.5): Weibull distribution; λ=1(scale),k=0.5(shape)
  • Weibull(1,0.3): Weibull distribution; λ=1(scale),k=0.3(shape)
  • Frechet(0,1,1): Frechet distribution; m=0(location),s=1(scale),α=1(shape)
  • Frechet(0,1,3): Frechet distribution; m=0(location),s=1(scale),α=3(shape)

Simulation Results

Conclusion

One of the biggest drawbacks of the winsorized modification of the Harrell-Davis quantile estimator is the stair-like pattern which we can observe in the above images. Such a phenomenon could be easily explained. If we enumerate all the quantile values from 0 to 1, the [L;R] window moves from left to right. At some specific moments, L and R cross the border between elements. Once they do that, the estimator switches the index of the winsorized elements that get “extra” weight. Thus, the winsorized modification of the Harrell-Davis quantile estimator is not smooth, and it has low statistical efficiency around these “switching points.”