Graphs and the Shape of a Distribution
Choose the right graph for categorical or quantitative data, read histograms, and describe a distribution by shape, outliers, center and spread.
Welcome back!
Step 1 of 13Learn
What a distribution shows
A teacher hands back 120 exam papers and announces, "The average was 74." That one number hides a lot. Did most students score in the 70s? Or did half the class ace it while the other half struggled? To see, you need the distribution: what values a variable takes and how often it takes each one.
The graph you choose depends on the variable type.
For categorical variables, use a bar chart (one bar per category, with gaps between bars) or a pie chart (slices of a whole, only useful when the categories make up 100% of something). Bar charts are usually easier to read, because people compare lengths more accurately than angles.
For quantitative variables, use:
- A dotplot: one dot per value stacked above a number line. Great for small data sets.
- A stemplot (stem-and-leaf plot): splits each value into a stem (leading digits) and a leaf (last digit). Shows the shape and keeps the actual numbers.
- A histogram: divides the number line into equal-width bins and draws a bar for how many values fall in each. The bars touch, because the bins cover a continuous range.
A histogram is not a bar chart with no gaps. The horizontal axis of a histogram is a number line; the order and width of the bins matter. In a bar chart, you could rearrange the categories without changing any information.
Step 2 of 13Practice · Chart
Histogram: 120 exam scores
Tap the bin that holds the most students.
Tap the bar that answers the question, then press Check.
Step 3 of 13Practice · Choose one
A survey records each student's preferred way of getting to campus: car, bus, bike, walk or other. Which graph is the best choice?
Step 4 of 13Learn
Describing shape
When you look at a histogram or dotplot, start with its shape.
- Symmetric: the left and right sides are roughly mirror images. Heights of adult women, or measurement errors, are often close to symmetric and bell-shaped.
- Skewed right: most values are low, with a long tail stretching toward high values. Incomes, house prices and the number of social media followers are right-skewed: a few huge values, many modest ones.
- Skewed left: the long tail stretches toward low values. Scores on an easy exam are left-skewed: most students score high, a few score very low.
The direction of skew is the direction of the tail, not the peak. A right-skewed distribution has its peak on the left and its tail on the right. This is the most common misreading of skewed graphs.
Also note how many peaks the distribution has. Unimodal distributions have one peak, bimodal two. A bimodal shape often signals two different groups mixed together, like the heights of a mix of adults and children, or wait times at a restaurant at lunch rush and mid-afternoon.
Finally, look for outliers: values that stand apart from the overall pattern. They might be errors (a height typed as 610 cm instead of 161) or genuinely unusual cases worth investigating.
Step 5 of 13Practice · Sort into groups
Predict the likely shape of each distribution.
Tap an item, then tap its group (or drag it there).
Step 6 of 13Learn
Reading and building histograms
A histogram can show frequencies (counts) or relative frequencies (proportions or percentages). Relative frequencies make it easy to compare groups of different sizes: 30% of 60 students and 30% of 600 students look the same.
To build one, choose a bin width, count how many values fall into each bin, and draw touching bars. Decide in advance which bin gets values on a boundary; the usual convention is that a value of 70 goes in the 70–80 bin, not 60–70.
Bin width changes the picture. With very wide bins, all detail disappears into a few blocks. With very narrow bins, the graph turns into a jagged picket fence where random noise looks like a pattern. Software picks a default, but it's worth trying a couple of widths before deciding what the shape really is.
When you describe any distribution, cover four things, in context:
- Shape: symmetric or skewed, number of peaks.
- Outliers: any values far from the rest.
- Center: a typical value (mean or median).
- Spread: how variable the values are (range, IQR or standard deviation).
A good description sounds like: "Commute times for these 80 employees are skewed right with a median of about 25 minutes. Most commutes are between 10 and 45 minutes, with two outliers above 90 minutes."
Step 7 of 13Chart
A right-skewed distribution: daily commute times
Relative frequencies on the vertical axis: each bar is a percentage, so this shape would look the same for 200 or 200,000 workers. Most values pile up on the left and a thin tail stretches right.
Step 8 of 13Note
Step 9 of 13Practice · True or false
A histogram with a long tail extending to the left is described as skewed right.
Step 10 of 13Learn
Comparing distributions
Statistics gets interesting when you compare groups: test scores of two teaching methods, battery life of two phone models, wait times at two clinics.
To compare, graph the groups on the same scale, either stacked one above the other (back-to-back stemplots, stacked dotplots or histograms) or side by side (boxplots, which you'll meet in the next lesson). Using different scales for each graph is a classic way to fool the eye.
Then compare all four features, using comparison words:
- "Clinic A's wait times are skewed right, while Clinic B's are roughly symmetric."
- "The center of Clinic A's distribution (median 18 minutes) is lower than Clinic B's (median 26 minutes)."
- "Clinic B's wait times are more variable; they range from 5 to 70 minutes, compared with 8 to 35 at Clinic A."
- "Clinic B has one outlier at 70 minutes."
A common mistake is listing features for each group separately without ever comparing them. "A has median 18. B has median 26." is true but unfinished. Say which is larger and by roughly how much.
Remember that differences in a sample might be due to chance. Whether a difference is large enough to be "real" is the question hypothesis tests answer, later in the course.
Step 11 of 13Chart
Comparing two teaching methods on the same scale
Same bins, same axis: now you can compare center (B sits higher), spread and shape directly.
Step 12 of 13Practice · Work it out
In a class of 60 students, 18 say they prefer studying in the library. What percentage of the class is that (the relative frequency)?
Step 13 of 13Practice · Choose one
A histogram of the heights of everyone at a school event shows two clear peaks, one near 130 cm and one near 170 cm. What is the most likely explanation?
Lesson complete!