A histogram is often the first graph you should draw for any numeric variable. It shows the whole shape of the data at once: where values cluster, how spread out they are, whether the distribution is symmetric or lopsided, and whether there are surprises such as two peaks or isolated extreme values. This guide explains how to read one, the shapes you will meet most often and what each implies for your analysis, and the one setting (the bin width) that can make the same data look completely different.
What a histogram shows
A histogram divides the range of the data into intervals called bins and draws a bar for each bin whose height is the number of values falling inside it. The horizontal axis is the measured variable; the vertical axis is the count (or sometimes the proportion or density).
Histogram vs bar graph
They look similar but answer different questions. A bar graph compares a summary (usually the mean) across separate categories, and the order of the bars is arbitrary. A histogram shows the distribution of a single continuous variable; the bars touch because the bins are adjacent ranges of one scale, and their order is fixed.
The shapes you will see most often
| Shape | What it looks like | Typical examples | What it means for analysis |
|---|---|---|---|
| Symmetric, bell-shaped | One central peak, tails of similar length on both sides | Measurement error, heights, many lab assays | Mean and SD describe it well; t-tests and ANOVA are appropriate. |
| Right-skewed | Peak on the left, long tail stretching to the right | Incomes, reaction times, concentrations, hospital stays | Mean is pulled above the median. Consider medians, a log transformation, or rank-based tests. |
| Left-skewed | Peak on the right, long tail to the left | Scores on an easy exam, age at death in rich countries | Mean is pulled below the median. Same options as right skew. |
| Bimodal | Two distinct peaks | A mix of two groups (e.g. responders and non-responders) | A single mean misrepresents everyone. Look for a hidden grouping variable. |
| Uniform | Roughly flat | Random numbers, evenly spread dates | Mean is fine; extremes are not unusual. |
| Isolated bar far from the rest | A gap, then a lone bar | Data-entry errors, unit mix-ups, true extremes | Investigate before analysing; see handling outliers. |
A useful quick check on skewness: compare the mean with the median. In a right-skewed distribution, mean > median; in a left-skewed one, mean < median. In a symmetric one, they are close. See mean vs median.
Bin width changes the picture
The same data can look smooth, jagged, or even two-peaked depending on how many bins you use:
- Too few bins (very wide) hide structure. A bimodal distribution can collapse into one broad lump.
- Too many bins (very narrow) produce a spiky picture where each bar contains only a few values, and random noise looks like real features.
Common starting rules suggest about √n bins, or Sturges' rule: log2(n) + 1 bins (about 7 bins for 100 values). There is no single correct choice; the honest approach is to check that any feature you report (a second peak, a gap) is still visible at a couple of different bin widths. StatFlo lets the plotting library choose bin edges automatically, with up to 30 bins, which works well for typical sample sizes.
How many values do you need?
Histograms of small samples are unreliable. With 10 values, the shape is mostly noise: even data drawn from a perfect normal distribution will often look lopsided or lumpy. As a rough guide, histograms become informative from about 30 values and dependable from about 100. For small samples, a dot plot or a box plot with individual points shows the same information more honestly.
Comparing groups with histograms
Overlaying the histograms of two or three groups (as StatFlo does, with semi-transparent bars) works well when the groups have similar sample sizes and do not overlap too heavily. Keep these points in mind:
- With very different sample sizes, raw counts make the larger group dominate; compare shapes rather than heights.
- With more than three groups, overlaid histograms become hard to read. Switch to box or violin plots side by side.
- For checking test assumptions, what matters is the shape within each group, not the shape of all groups pooled together. See how to check normality.
A checklist for reading any histogram
- Centre: where is the bulk of the data?
- Spread: how wide is the range of typical values?
- Shape: symmetric, skewed left or right, one peak or two?
- Unusual values: isolated bars, gaps, or impossible values (negative weights, percentages above 100)?
- Sample size: are there enough values for the shape to mean anything?
- Robustness: would the main features survive a different bin width?
Making one in StatFlo
- Upload a file with one or more numeric columns.
- Choose Histogram as the graph type and select the columns you want.
- Label the X axis with the variable and its units; the Y axis shows counts.
- Use what you see to choose your summary statistics and test: a symmetric shape points to means and t-tests or ANOVA; a skewed one points to medians and Mann-Whitney U or Kruskal-Wallis. The test picker walks you through the decision.