The shape of a distribution · Statistics & Data Science… | StemPy Lab
Course 2.1·Lesson 2 of 3
The shape of a distribution
A histogram has a shape. It can be symmetric, skewed to the right or to the left, have one peak or two, or be flat. It can show a cluster, a gap or an outlier. This lesson names these shapes, links each to a real situation, and shows how a mix of two groups makes two peaks.
about 30 min1 simulation1 practice question1 Python program6 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
describe a distribution by its shape, its centre, its spread and anything unusual;
name symmetric, skewed, unimodal, bimodal and uniform shapes;
spot clusters, gaps and outliers, and suggest a reason for them.
What is a distribution?
The distribution of a variable tells you which values it takes and how often. A histogram is a picture of a distribution. When a statistician describes one, they say four things:
Shape. What does the outline look like?
Centre. Where is a typical value?
Spread. How far apart are the values?
Unusual features. Are there gaps, clusters or values far from the rest?
This lesson is about the first and the fourth. Course 3 of this chapter measures the spread.
Six shapes
The six histograms below are made up, but each one matches data that you meet in real life.
Six made-up histograms in two rows, each with ten bars. Top row: a symmetric hill with one peak in the middle; a histogram skewed right, with its peak near the left and a long tail to the right; a histogram skewed left, with its peak near the right and a long tail to the left. Bottom row: a bimodal histogram with two peaks and a valley between them; a roughly uniform histogram with bars of almost equal height; and a cluster of bars on the left, then an empty gap of four bins, then a single short bar far to the right, an outlier.
Symmetric. The left half is close to a mirror image of the right half. Heights of adults of one age group often look like this. A symmetric hill with one peak is called mound-shaped or bell-shaped.
Skewed right. Most values are low, and a long thin tail stretches to the right. Waiting times, house prices and incomes are often skewed right, because a value cannot go below zero but can be very large.
Skewed left. The tail stretches to the left. The marks on an easy test often look like this: most students score high, and a few score low.
Bimodal. Two peaks. This usually means that two groups are mixed together.
Uniform. All bars are about the same height. The last digit of a phone number is roughly uniform.
Clusters, gaps and outliers. A cluster is a group of values close together. A gap is an empty stretch. An outlier is a value far from the rest. It may be a mistake, or something real and interesting.
A word about names. The skew is named after the tail, not after the peak. A histogram with its peak on the left and its tail on the right is skewed right. Some books say "positively skewed" for right and "negatively skewed" for left.
One peak or two? A distribution with one clear peak is unimodal. With two clear peaks it is bimodal. Small bumps caused by a few values do not count as peaks. Look for a real valley between two hills.
Where do two peaks come from?
Picture a charity fun run of 5 km. Some people run and finish in about 25 minutes. Others walk and finish in about 50 minutes. One histogram of all the times has two peaks, one for each group. The mean of all the times can land in the valley between them, where hardly anybody finished. When you see two peaks, ask: are two groups mixed here? It is often better to split them and describe each group on its own.
You should find that with equal groups the curve keeps one peak while the gap is 10 minutes or less. From a gap of 12 minutes, two peaks appear. With fewer runners than walkers, the gap must be wider before the smaller group shows its own peak. The red mean always sits between the two groups.
Practise with new numbers
Try it in Python
The program draws three made-up data sets of 20 values side by side: arm spans, waits for a bus and times in a fun run.
Common mistakes
Naming the skew after the peak. Skew is named after the long tail.
Calling every bump a peak. Small data sets are bumpy. A second peak needs a clear valley before it.
Reading shape from a bar chart of categories. The order of categories such as colours is a choice, so their bar chart has no shape in this sense.
Deleting an outlier at once. First ask why it is there. Course 2 of this chapter gives a rule for outliers and a plan for what to do with one.
Remember these
Describe a distribution by its shape, centre, spread and unusual features.
Symmetric, skewed right (tail to the right), skewed left (tail to the left).
Unimodal means one peak, bimodal two peaks, uniform flat.
Two peaks often mean that two groups are mixed.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
A histogram of the prices of second-hand cars has a peak at low prices and a long tail towards high prices. Name the shape.
The ages of all the people at a children's birthday party are put into one histogram. Why might it have two peaks?
A histogram has bars of heights 7, 6, 8, 7, 6 and 7. What is its shape?
A histogram of 50 lap times has 49 values between 60 s and 75 s and one value of 140 s. What is the value of 140 s called, and what should you ask first?
A histogram has its tallest bars on the right and a tail to the left. A student says it is skewed right. Is the student right?
References
OpenStax, Introductory Statistics, Chapter 2 (Descriptive Statistics), section on skewness and the mean, median and mode.
Enroll free in Histograms and the Shape of Data
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.