Message Boards Message Boards

[?] Plot a 1/4 Quantile in a BoxWhiskerChart?

Posted 7 years ago

Why is the 1/4 Quantile not equal to the 25% mark in the Plot? (look to the attached files)

Thx. Hannes

Attachments:
3 Replies

@Hannes Waltenberger please attach notebooks and NOT .pdf files or share code directly in the post.

Please read the forum rules: http://wolfr.am/READ-1ST

POSTED BY: Moderation Team

BoxWhiskerChart uses interpolation between numbers, while the default Quantile command find the nearest number. The difference is especially noticeable when you have few datapoints, and many numbers that are the same:

Quantile[data, 1/4]
Quantile[data, 1/4, {{1/2, 0}, {0, 1}}]
BoxWhiskerChart[data]

if you hover over the plot you will see:

enter image description here

POSTED BY: Sander Huisman

Note that Quartiles uses this definition (interpolation) by default...

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract