Distribution
Variable-width box plot
Adds group-size information by varying box width.
- Plot
- Distribution
- Sample size
What it answers
How do distribution summaries and group sizes compare?
- Shape
- Boxes with different widths
- What it shows
- Spread, median and sample-size imbalance.
Example
The question
How do order values vary across stores of very different sizes?
Order value by store, box width shows number of orders (illustrative)
Illustrative data. It belongs to no company.
When to use it
Use it when
Comparing distributions while showing unequal sample sizes.
Avoid it when
When width encoding is unexplained or masks small groups.
How to read it
Read each box's statistics, then width using the sample-size key.
Note
State whether width follows sample size or its square root.
The data you need
- Layout
- Long table
- Fields
- Group: text; Value: number
- One row is
- One raw observation belonging to a group. What is the grain?
- Rules
- Retain individual observations and group labels. State weighting and missing-data rules.
- Optional
- For box plots only, some tools accept Group,Q1,Median,Q3,WhiskerLow,WhiskerHigh plus separate outliers. Other distributions usually need raw data.
- Preparation
- Keep raw numeric observations, group them if needed and handle missingness explicitly. Choose bins, bandwidth or summary conventions as appropriate to this specific plot.
- Units
- The value axis uses original units; box width encodes sample size or a stated transformation of it.
Worked example
Groups A: n 25 and B: n 100. If width follows square root of n, B is twice as wide as A, not four times.
| Group | Value |
|---|---|
| A | 10 |
| A | 12 |
| A | 18 |
| B | 11 |
| B | 23 |
