Histogram
A histogram is the standard display for the distribution of a single continuous variable. Its most common failure is arbitrary bin-width selection: too few bins hide structure, too many bins create noise. Licklider applies automatic bin-width optimization and discloses the method used, eliminating one of the most common sources of misleading histograms.
STEP 1 —When to Use
Use a histogram when: you need to show the distribution shape of a single continuous variable; you want to visually assess normality, skewness, or bimodality; n >= 30 (below this, individual data or a dot histogram is more honest); you are comparing frequency distributions across two groups (overlapping semi-transparent histograms).
Do not use a histogram when: n < 20 (use a strip plot instead); you are comparing many groups (use violin plots); the primary message is the summary statistic, not the distribution shape.
STEP 2 —Journal Requirement
- Bin-width or bin count method must be stated in the legend: "Bin width selected by Freedman-Diaconis rule."
- Y-axis label must specify frequency, count, or probability density —these are not interchangeable.
- If a normal curve is overlaid, this must be labeled: "Normal distribution curve fitted to the data."
- n (total observations in the histogram) must be stated.
STEP 3 —Licklider Implementation
Input
- Continuous variable column
- Optional: grouping variable (for overlapping group histograms)
- Bin-width method: Freedman-Diaconis (default, robust to outliers), Sturges, Scott, or user-specified
- Y-axis: count, frequency (proportion), or density
Output
- Histogram with auto-optimized bin width
- Bin method and bin count labeled in legend
- Optional normality curve overlay (Shapiro-Wilk result auto-appended to legend)
- Optional KDE curve overlay (bandwidth labeled)
- For two groups: semi-transparent overlapping histograms with distinct fills
- Normality test result (Shapiro-Wilk W and p) displayed as a text annotation if normality check is enabled
STEP 4 —Draft Output (Draft / Needs review)
Histogram of [variable] for n = 65 observations. Bin width was selected
using the Freedman-Diaconis rule (bin width = 2.3 units; 18 bins).
Y-axis shows probability density. A fitted normal distribution is overlaid
for reference (dashed line). Shapiro-Wilk normality test: W = 0.91,
p = 0.003, indicating significant departure from normality.