Update: You can control the median confidence interval using the suboption "MedianConfidenceIntervalParameter"
of the option Method
:
data = Table[RandomReal[BetaDistribution[a, 1.5], 100], {a, 1, 5, 1}];
opts = {{"Notched", {"MedianMarker", Purple}, {"MedianNotch", Orange}},
ImageSize -> 300, ChartElementFunction -> "GlassBoxWhisker"};
bwc1 = BoxWhiskerChart[data[[1]], ## & @@ opts, PlotLabel -> Style["Default" , 16]];
bwcs = BoxWhiskerChart[data[[1]], Sequence @@ opts,
PlotLabel -> Style["MedianConfidenceIntervalParameter ->" <> ToString@#, 16],
Method -> {"MedianConfidenceIntervalParameter" -> #}] & /@
{1.7, .5, 1., 2., 3};
Row[{bwc1, bwcs[[1]]}]

Row[Rest@bwcs]

Note: The function Charting`iBoxWhiskerChart
is the first function called in the TracePrint
of BoxWhiskerChart[...]
. One of its options is "MedianConfidenceIntervalParameter"
with default value 1.7
:
Options[Charting`iBoxWhiskerChart, "MedianConfidenceIntervalParameter"]
{"MedianConfidenceIntervalParameter" -> 1.7`}
Original post:
The core function used rendering the box plots in BoxWhiskerChart
is System`BarFunctionDump`boxplot
. You can see the code using
?? System`BarFunctionDump`boxplot
The relevant line that determines the median interval is
System`BarFunctionDump`medianInterval =
(System`BarFunctionDump`medianConfIntPara 1.25` System`BarFunctionDump`iqr)/
( 1.35` Sqrt[Length[System`BarFunctionDump`data]])
where System`BarFunctionDump`iqr
is the IQR
and the default value for the parameter System`BarFunctionDump`medianConfIntPara
is previously defined as
System`BarFunctionDump`medianConfIntPara = 1.7`
So, the default value of the median interval parameter is
(1.7 1.25/1.35) IQR / Sqrt[n] = 1.574074 IQR / Sqrt[n]
The value of System`BarFunctionDump`medianConfIntPara
is controlled by the option "MedianConfIntPara"
but I could not figure out how this option is to be used in BoxWhiskerChart
.
"Notched"
option. $\endgroup$