Quartiles are the quantiles at probability levels ; is a median. For a population we can use its quantile function, for . Finite-sample conventions differ. Our box plot uses linear interpolation between order statistics: for and , setThen . This is R's type-7 convention, described in the documentation authored by Ivan Frohne and Rob J Hyndman. It differs from the generalized-inverse sample quantile defined elsewhere in this wiki: for the twelve toy values, that rule selects ranks and gives , rather than . These are different stated conventions, not arithmetic disagreements. [ref]
https://stat.ethz.ch/R-manual/R-devel/library/stats/html/quantile.html. Frohne and Hyndman, R stats documentation, sample quantile types
New to topics? Read the docs here!