Zum Inhalt springen

Lektion 12 · Reading Charts

Charts for Distributions and Relationships

Read histograms, box plots and scatter plots: shape, bin width, medians and outliers, and the direction, strength and form of relationships between variables.

Bar and line charts answer questions about totals and trends. Two other questions are just as important: how are values spread out? and do two measurements move together? Histograms and box plots answer the first. Scatter plots answer the second. These charts show details that a single average hides.

Histograms

A histogram groups a numeric variable into intervals called bins and shows how many values fall in each. It looks like a bar chart, but the horizontal axis is a number line, so the bars touch and their order cannot change.

Read the shape:

Common shapes

Symmetric One central peak
Right-skewed Long tail of large values
Left-skewed Long tail of small values
Two peaks Maybe two groups
1 / 2

The bin width changes the picture. Bins that are too wide hide detail. Bins that are too narrow produce a jagged, noisy chart. Try several widths before you trust a shape.

Python Change the bin width

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

With width 5 you can see two clusters (short waits and waits around 15) plus one long wait. With width 15, the gap between the clusters and the lonely long wait vanish into just two broad bars.

Box plots

A box plot summarizes a distribution with a few numbers:

  • the box runs from Q1 to Q3, so it holds the middle half;
  • the line inside the box is the median;
  • whiskers often extend to the most extreme values within 1.5 times the IQR of the box;
  • points beyond the whiskers are drawn separately.

Some tools define whiskers differently, so check the caption. Box plots are excellent for comparing several groups side by side. Compare the medians first, then the box widths (spread), then the unusual points. A box plot cannot show two peaks, so also look at a histogram when it matters.

Python The numbers behind a box plot

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Both medians are 16, but Team B is far more spread out, and its value of 40 lies beyond the upper fence.

Scatter plots

A scatter plot places one point for each observation, with one numeric variable on each axis, for example hours of study and test score. Describe what you see with four words:

  • Direction: upward (positive), downward (negative) or none.
  • Form: a straight band, a curve, or clusters.
  • Strength: how tightly the points follow the form.
  • Unusual points: values far from the rest.

A U-shaped pattern is a real relationship even though it is neither "upward" nor "downward". For example, energy use for heating and cooling is often high in cold and hot weather and lower in mild weather.

Adding a third variable

Color or point shape can show a group, such as city or product type. Doing this can reveal that one cloud of points is really two groups with different patterns. Bubble size can show a third number, but people judge areas poorly, so do not rely on it for precise values.

Overplotting and other limits

With thousands of points, dots cover each other and dense areas can look the same as sparse ones. Smaller or transparent dots, or counting points into squares, can help. Also remember that a scatter plot only shows association. It cannot show why the two variables move together. That is the subject of Correlation and Causation.

When you compare two histograms or box plots, make sure they use the same axis range and bins. Otherwise differences can be created by the chart itself.

A worked reading of a scatter plot

Suppose a plot shows 60 shops, with shop floor area on the horizontal axis and weekly sales on the vertical axis. The points drift upward in a wide band, and one small shop sits far above the rest.

Using the four words: the direction is positive, the form is roughly straight, the strength is moderate (the band is wide), and there is one unusual point. A fair sentence is: "Larger shops tend to sell more, but there is a lot of variation between shops of similar size, and one small shop sells much more than expected." Then follow up on the unusual shop. It might have a station next door, a data entry error or a different way of counting sales. Notice that you did not claim that making a shop bigger would raise its sales. Location or staffing could drive both size and sales.

Practice

Match each question with a chart. How are delivery times spread out? Do three warehouses differ in typical delivery time and spread? Do longer distances go with longer delivery times?

Answers: use a histogram for the first, side-by-side box plots for the second and a scatter plot for the third. For the second, you could also draw three histograms with the same bins and axis range, which would reveal two peaks that boxes hide. For the third, look for the form before adding a line: if the points curve, because long trips use faster roads, a straight line would mislead.

When there is little data

With only a handful of values, histograms and box plots can suggest shapes that are not really there. In that case, simply plot every point on a line, or list the values. A strip of dots shows exactly how many observations you have, which a box cannot. As data grows, summaries become both more useful and more stable.

Common mistakes: calling a histogram a bar chart and reordering its bars; trusting a shape from one bin width; assuming every point beyond a whisker is an error; and drawing a straight trend line through a clearly curved cloud.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is special about the horizontal axis of a histogram?

    The bins are slices of a number line, so their order is fixed.
  2. 2. In a box plot, what does the box itself show?

    The box covers the interquartile range, with the median marked inside.
  3. 3. A scatter plot shows a clear U shape. What is the right description?

    The variables are related, but not in a straight line.
  4. 4. Why try several bin widths?

    Binning choices can hide or exaggerate features of the same data.

Summary

  • Histograms show shape; bin width affects what you see.
  • Box plots compare medians, spread and unusual points across groups.
  • Scatter plots show direction, form, strength and outliers.
  • A scatter plot shows association, not cause.
  • Compare charts only with matching scales.

Next: Spotting Misleading Charts

Dein Fortschritt wird in diesem Browser gespeichert. Kein Konto nötig.