Chapter 2 · OpenStax Ch 2
Descriptive Statistics
Pictures and numbers that summarize the shape, center, and spread of a data set.
2.1 Histograms
A histogram sorts data into equal-width intervals called bins and draws a bar for each, as tall as the number of values inside. It is the quickest way to see the shape of a data set. The bars show where values pile up, where they thin out, and whether there is one hump or two.
The 80 commute times here never change. Drag the bin-width slider and watch the picture change anyway. Very narrow bins show every bump and look ragged. Wide bins look smooth but can hide the two groups of commuters entirely. Somewhere in between, the story is clearest. The frequency polygon joins the bar tops with a line, which makes comparing two histograms easier. When you read a histogram, always ask what bin width was used.
Reading: OpenStax Introductory Statistics, Sections 2.1, 2.2.
2.2 Center and location
Three numbers describe the “middle” of data, and they answer different questions. The mean \(\bar{x} = \frac{1}{n}\sum x_i\) is the balance point. If the dots were weights on a plank, the triangle is where it would balance. The median is the splitter, with half the dots on each side. The mode is the most common value, if any value repeats.
Drag one dot far to the right, or press the button. The mean chases it, because a far-away weight tips the plank. The median barely moves, because it only counts how many dots are on each side, not how far away they are. Values like this one are called outliers, and the median is resistant to them. For incomes and house prices, the median is usually the honest “typical” number.
Reading: OpenStax Introductory Statistics, Sections 2.3, 2.5.
2.3 Box plots and skewness
The quartiles cut sorted data into four equal parts. A quarter of the values lie below \(Q_1\), half below the median, and three quarters below \(Q_3\).1 A box plot draws a box from \(Q_1\) to \(Q_3\), a line at the median, and whiskers out to the smallest and largest values. The box width, \(Q_3 - Q_1\), is the interquartile range.
Slide the skew control. With the slider in the middle the data are symmetric and the mean sits on the median. Push it right and a tail of large values grows. The upper whisker stretches, and the mean is dragged above the median. That is a right-skewed distribution. Push it left for the mirror image. The gap between mean and median is a quick test for skew.
1 Quartiles on this site use the Weibull rule, position \((n+1)p\) in the sorted data. Reading: OpenStax Introductory Statistics, Sections 2.4, 2.6.
2.4 Spread
Each stick is one value's deviation from the mean, \(x_i - \bar{x}\). Deviations always add to zero, so to measure spread we square them first. Press “Show squares”: each stick becomes a square whose area is the squared deviation. The variance is the average square.2 The standard deviation is its square root,
\[s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n - 1}}.\]
Taking the square root brings the number back to the original units, so \(s\) reads as a typical distance from the mean. Drag the dots apart and the squares grow fast. A point twice as far contributes four times as much. Press “Bunch up” and \(s\) shrinks. The mean does not care about spread. The standard deviation cares about nothing else.
2 The sample variance divides by \(n - 1\), not \(n\), because the mean was estimated from the same data. Reading: OpenStax Introductory Statistics, Section 2.7.