Skip to content

Summary: The shape of data: distributions and histograms

A center and a spread summarize data, but a picture shows its shape, and shape carries information no single number can. Two datasets can share a mean and a standard deviation and still look nothing alike. The histogram is the picture that tells them apart, and reading distributions is a habit that pays off every time you look at data. This lesson builds the histogram, names the shapes, and shows why a practitioner looks at a feature’s distribution before trusting it. This summary is the scan-in-five-minutes version of the full lesson.

  • A histogram, in two steps. Chop the value range into equal bins, then draw a bar for the count of values in each bin. The result reveals shape, which a center and spread alone cannot capture.
  • Bin width changes the picture. Too wide hides real structure; too narrow manufactures spiky noise. The same data can be made to look smooth or jagged, so ask how the bins were chosen.
  • The shapes you will meet. Symmetric (mean and median together), right-skewed (long tail right, mean above median), left-skewed (long tail left, mean below median), uniform (all bins equal), bimodal (two peaks), and bell-shaped (the normal distribution, its own lesson later).
  • Skew is a visible tail. It explains the mean-versus-median gap from the previous lesson: the tail drags the mean toward it. The skew is named for where the tail points, not where the bulk sits.
  • A second peak is a warning. A bimodal shape usually means two populations are mixed into one column, and a single mean can land in the empty valley between them, describing nobody.
  • The picture catches what numbers miss. A histogram surfaces skew (suggesting a transform like the logarithm), outliers and data errors (a lone far-out bar), hidden subpopulations (a second peak), and class imbalance (one label towering over the rest, the base-rate problem made visible).

You stop trusting a column of data on its summary numbers alone and start asking to see its shape. When someone reports an average, you picture the distribution behind it: is there a long tail pulling that average around, a second hump hiding a mixed population, a spike that smells like a data error? In a machine-learning setting, plotting the distribution of every feature and of the labels becomes an automatic first move, because it is the cheapest way to catch skew, outliers, hidden groups, and class imbalance before any of them quietly corrupts a model. The histogram is not a presentation chart; it is a diagnostic you run before you trust the data.