The whole, before the parts

Descriptive statistics is the craft of replacing a list of numbers too long to read with a few numbers short enough to think with — without lying in the process. Every summary throws information away; the whole subject is knowing what each summary throws away, so you can tell when the discarded part was the story. The one habit worth more than any formula is looking at a picture of the data before trusting any number computed from it. Citation needed

Terminology and core concepts

  1. Variables and observations

    A dataset is a table whose rows are observations — the things measured — and whose columns are variables, the measurements taken on each; a variable is categorical when its values are labels and numerical when they are quantities. Citation needed

    In a table of patients, what is one row?
    one observation — one patient Citation needed
    Is blood type categorical or numerical?
    categorical Citation needed
    Is a zip code a quantity?
    no — it is a label wearing digits Citation needed
    Why can you not average a categorical variable?
    its values are labels, not quantities Citation needed
  2. The distribution of a variable

    The distribution of a variable is the pattern of which values occur and how often; a histogram draws it by cutting the range into bins and stacking a bar per bin, and it is the picture to look at first. Citation needed

    What does a variable's distribution record?
    which values occur and how often Citation needed
    What does one bar of a histogram show?
    how many observations fall in that bin Citation needed
    What does changing the bin width change?
    how much detail the histogram shows Citation needed
    Why look at the histogram before computing summaries?
    summaries hide shape; the picture shows it Citation needed
  3. The mean, and what pulls it

    The mean is the sum of the values divided by their count — the balance point of the distribution — and an outlier, a value far from the rest, pulls it the way a weight far out on a seesaw does. Citation needed

    What is the mean of 2, 4, 9?
    5 Citation needed
    What is the mean, pictured on the histogram?
    the balance point Citation needed
    Why does one billionaire move a town's mean income so much?
    the mean weighs each value by its size Citation needed
    If every value increases by 10, what happens to the mean?
    it increases by 10 Citation needed
    If every value doubles, what happens to the mean?
    it doubles Citation needed
  4. Median and quantiles

    The median is the middle value once the data are sorted — half below, half above — and the quartiles cut the sorted data into quarters; because they only count positions, outliers barely move them. Citation needed

    What is the median of 1, 3, 7, 9, 40?
    7 Citation needed
    How is the median found for an even count?
    average the two middle values Citation needed
    Why is the median resistant to outliers?
    it uses only the order, not the sizes Citation needed
    What fraction of the data lies below the third quartile?
    three quarters Citation needed
    Which is the better "typical income" summary, mean or median?
    the median — incomes have extreme high values Citation needed
  5. Spread: variance and standard deviation

    The variance is the mean of the squared deviations from the mean, and the standard deviation is its square root — a typical distance from the mean, back in the data's own units. Citation needed

    What is a deviation?
    a value minus the mean Citation needed
    Why square the deviations before averaging?
    otherwise they sum to zero Citation needed
    Why take the square root at the end?
    to return to the original units Citation needed
    What does a standard deviation of zero mean?
    every value is identical Citation needed
    If every value doubles, what happens to the standard deviation?
    it doubles Citation needed
    If 10 is added to every value, what happens to the standard deviation?
    nothing Citation needed
  6. Interquartile range and the boxplot

    The interquartile range (IQR) is the distance between the first and third quartiles — the spread of the middle half — and the boxplot draws median, quartiles, and flagged outliers in one glance. Citation needed

    What does the box of a boxplot span?
    first quartile to third quartile Citation needed
    What is the line inside the box?
    the median Citation needed
    What is the usual fence for flagging an outlier?
    more than 1.5 × IQR beyond a quartile Citation needed
    Why pair IQR with the median rather than the mean?
    both are order-based and outlier-resistant Citation needed
  7. Shape: skew and modes

    A distribution is skewed when one tail stretches farther than the other — right-skewed means a long right tail — and a mode is a peak; two peaks usually mean two populations mixed together. Citation needed

    Which way is income skewed?
    right — a long tail of high values Citation needed
    In a right-skewed distribution, which is larger, mean or median?
    the mean Citation needed
    What does a two-peaked histogram usually signal?
    two different groups mixed in one dataset Citation needed
    When do mean and median roughly agree?
    when the distribution is symmetric Citation needed
  8. Standard units and z-scores

    A z-score restates a value as how many standard deviations it sits above or below the mean, which is what makes scores from different scales comparable at all. Citation needed

    What is the z-score formula?
    (value − mean) / standard deviation Citation needed
    What does a z-score of −2 mean?
    two standard deviations below the mean Citation needed
    What are the mean and standard deviation of z-scores?
    0 and 1 Citation needed
    Why convert two exam scores to z-scores before comparing?
    it removes the difference in scale Citation needed
  9. Correlation as a summary of a scatter

    A scatterplot plots two numerical variables against each other, and the correlation coefficient r summarizes how tightly the cloud hugs a straight line, from −1 to +1 — it measures linear association and nothing else. Citation needed

    What does r = +1 mean?
    the points lie exactly on a rising line Citation needed
    What does r near 0 mean?
    no linear association Citation needed
    Can r be 0 while the variables are strongly related?
    yes — if the relation is curved Citation needed
    Does changing units change r?
    no — it is computed from z-scores Citation needed
    What single outlier can do to r?
    move it drastically Citation needed

Problems that prove it

  1. Compute the standard deviation of 2, 4, 6, 8 (treating it as the whole population).

    Drills: deviations, squaring, averaging, and the root, by hand.

    Derivation steps
    1. Mean = (2 + 4 + 6 + 8)/4 = 5.
    2. Deviations: −3, −1, 1, 3.
    3. Squares: 9, 1, 1, 9; their mean is 20/4 = 5.
    4. Standard deviation = √5 ≈ 2.24.
    5. Check the units: 2.24 is in the data's units, 5 is in squared units.

    Citation needed

  2. Ana scored 82 on a test with mean 70 and standard deviation 8; Ben scored 90 on a test with mean 80 and standard deviation 10. Who did better relative to their class?

    Drills: z-scores as the common scale.

    Derivation steps
    1. Ana: z = (82 − 70)/8 = 1.5.
    2. Ben: z = (90 − 80)/10 = 1.0.
    3. Ana sits 1.5 standard deviations above her class, Ben only 1.0.
    4. Ana did better relative to her class, despite the lower raw score.

    Citation needed

  3. For the data 1, 2, 2, 3, 4, 5, 6, 9, 24, find the quartiles, the IQR, and decide whether 24 is flagged as an outlier.

    Drills: the 1.5 × IQR fence in action.

    Derivation steps
    1. Nine sorted values; the median is the 5th: 4.
    2. Lower half 1, 2, 2, 3: first quartile = 2. Upper half 5, 6, 9, 24: third quartile = 7.5.
    3. IQR = 7.5 − 2 = 5.5.
    4. Fence: 7.5 + 1.5 × 5.5 = 15.75.
    5. 24 > 15.75, so 24 is flagged as an outlier.

    Citation needed

  4. A firm reports that average employee pay rose 12% in a year when every salary was frozen. Explain how.

    Drills: reading a mean as a claim about composition, not just values.

    Derivation steps
    1. The mean depends on who is in the dataset as well as on the values.
    2. If low-paid employees left, the remaining salaries average higher.
    3. No individual's pay changed; the composition of the rows did.
    4. Moral: ask whether the observations changed before believing the summary moved.

    Citation needed

Sources

  • David Freedman, Robert Pisani, and Roger Purves, Statistics — the standard units and histogram treatment these notes follow.
  • John Tukey, Exploratory Data Analysis — the case for looking at the data before summarizing it.
  • Darrell Huff, How to Lie with Statistics — the catalogue of what each summary hides.

Learning path

Continue through Statistics & Probability in order, using the concepts above to connect this topic to the next.