Home

quantiletype

Quantile type is a convention used in statistics to define how sample quantiles are estimated from a finite data sample. It specifies how the probability p in the interval (0, 1) is mapped to a position within the ordered data and how the corresponding quantile is computed, either by selecting a data point or by interpolating between adjacent order statistics. The concept was formalized by Rob Hyndman and Yingying Fan in 1996, who described nine distinct quantile types that are implemented in many statistical software packages.

The nine types differ in how they treat endpoints and interpolation, which can lead to different quantile

Choice of quantile type can influence summary statistics such as quartiles and medians, and it may affect

See also: Hyndman–Fan quantile types, order statistics, empirical distribution function, quantile estimation.

estimates
for
the
same
data
and
probability.
Some
types
rely
on
the
inverse
empirical
distribution
function
with
little
or
no
interpolation,
while
others
use
linear
interpolation
between
order
statistics
with
varying
weighting
schemes.
Type
7,
which
uses
linear
interpolation
between
neighboring
order
statistics
with
a
specific
indexing
rule,
is
the
default
implementation
in
R’s
quantile
function
and
is
widely
used
in
practice.
Other
types
(2
through
6,
and
8–9)
employ
alternative
rules
for
mapping
p
to
data
positions
and
handling
ties
or
sample
size
effects.
downstream
analyses
that
rely
on
quantile-based
metrics
or
visualizations
like
boxplots.
Because
software
packages
differ
in
the
default
type,
practitioners
often
specify
the
type
explicitly
to
ensure
reproducibility
when
comparing
results
across
tools.