5
$\begingroup$

I have a question regarding the boxplot. On some web pages, the Minimum and the Maximum of the 5-Number-Summary correspond to the whiskers. However, regarding this definition, my question is:

how is it possible to illustrate outliers?

In fact, no data points can be lower than the minimum (lower whisker) or higher than the maximum (upper whisker).

$\endgroup$
2
  • 4
    $\begingroup$ the whiskers extend to the closest observation not exceeding $\pm$1.5xIQR from the lower/upper quartile. $\endgroup$
    – utobi
    Commented Jan 28, 2023 at 13:21
  • 3
    $\begingroup$ @Made The usual Tukey boxplot is not identical to a five number summary; its whiskers don't necessarily get drawn all the way to the extremes. $\endgroup$
    – Glen_b
    Commented Jan 28, 2023 at 16:55

1 Answer 1

11
$\begingroup$

To clarify your doubt, consider the following example using the standard definition of the boxplot.

Suppose we have the following observations $x = (-40,0, 2, 3, 4,10, 40)$. The median is 3, the first quartile is $Q_1 = 1$, and the third quartile is $Q_3 = 7$, thus $\text{IQR} = 8$. Let $u = Q_3+1.5\times \text{IQR} =16$ and $l = Q_1-1.5\times \text{IQR}=-8$.

The upper whisker would then be $$\max_{x_i\leq u} x,$$

which equals 10. The lower whisker would be $$\min_{x_i\geq l} x,$$ which equals 0.

Therefore, observations -40 and 40 fall outside the whiskers, and are thus "outlying" observations.

The conclusion is thus: the maximum and the minimum observed values may or may not correspond to the whiskers, depending on the distribution of observations.

Note: There are many ways to compute sample quantiles. In this example, I calculated them in R by the quantile function and using the default method.

enter image description here

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.