Tunny Icon
TunnyDocs

The next-gen Grasshopper optimization tool.

Box Plot

Overview

A box plot summarizes a numeric distribution with quartiles, whiskers, and outliers. Tunny Dashboard's Box Plot widget analyzes one Value, optionally split by a categorical or explicitly declared integer/stepped parameter. It shares selection and data preparation with Violin Plot, not the density estimator.

Data and normalization

Only finite Values enter the statistics. With grouping, each Value is paired with the grouping value from the same trial; missing/non-finite group values are excluded. Category identity distinguishes empty-string choices from absent parameters and differently typed choices from each other. Numeric grouping requires declared Optuna integer or step metadata, not observed repetition. Continuous parameters are not binned.

With Normalize enabled, let aa and bb be the finite minimum and maximum of the entire selected Value column, including finite rows without a grouping value. Before splitting:

x′=x−ab−ax' = \frac{x-a}{b-a}

If a=ba=b, finite Values become zero. There is no per-group normalization. Statistics and CSV use the selected raw or normalized scale.

Quartiles and whiskers

Quartiles use linear interpolation between order statistics (type 7, NumPy's default linear method). For sorted x(1),…,x(n)x_{(1)},\ldots,x_{(n)} and q∈[0,1]q\in[0,1], let h=(n−1)qh=(n-1)q. Interpolate between the adjacent order statistics at hh; the endpoint q=1q=1 is x(n)x_{(n)}. Q(q)=x_{(\lfloor h\rfloor+1)}+(h-\lfloor h\rfloor) \left(x_{(\lfloor h\rfloor+2)}-x_{(\lfloor h\rfloor+1)}\right) Q1=Q(0.25)Q_1=Q(0.25), median Q2=Q(0.5)Q_2=Q(0.5), and Q3=Q(0.75)Q_3=Q(0.75). The interquartile range is IQR=Q3−Q1\mathrm{IQR}=Q_3-Q_1. Tukey fences are:

Q1−1.5 IQR,Q3+1.5 IQRQ_1-1.5,\mathrm{IQR},\qquad Q_3+1.5,\mathrm{IQR}

Each whisker ends at the most extreme observed point inside its fence. Points outside the fences are plotted individually as outliers. One finite Value is sufficient: singleton and constant groups have coincident quartiles and whiskers. Groups without finite Values are omitted.

Interpretation and limitations

  • The factor 1.5 is a conventional threshold, not a hypothesis test. An outlier marker does not by itself establish an invalid measurement.
  • A box hides multimodality: distributions with different shapes can share the same quartiles. Use a Histogram or Violin Plot to inspect shape.
  • Group comparisons describe conditional distributions; they do not establish causation or control for other parameters.

Reference

  • Tukey, J. W. (1977). Exploratory Data Analysis. Addison-Wesley.