Skip to main content
Examonaut

Topic 2 · Lesson 3 of 4

Box plots, outliers and correlation

Box plots and outliers

An outlier is a value that is unusually far from the rest. The question will tell you the rule; common ones are:

  • more than 1.5×IQR1.5 \times \text{IQR} below Q1Q_1 or above Q3Q_3;
  • more than 2 (or 3) standard deviations from the mean.

A box plot shows the median, quartiles and extremes; outliers are marked with a cross, and the whisker stops at the most extreme value that is not an outlier. In the diagram, station A has Q1=11.6Q_1 = 11.6 and Q3=15.2Q_3 = 15.2, so IQR=3.6\text{IQR} = 3.6 and the upper limit is 15.2+1.5×3.6=20.615.2 + 1.5 \times 3.6 = 20.6. The value 20.9 is above it, so it is an outlier, and the whisker ends at the next value, 19.4.

810121416182022daily mean temperature (°C)×Station AStation B

Comparing distributions. When asked to compare, make one point about location (median or mean) and one about spread (IQR or standard deviation), each in context: "Station B's median temperature is higher, so it was generally warmer; station B's IQR is larger, so its temperatures were more variable." Use the median and IQR for skewed data or data with outliers; the mean and standard deviation otherwise.

Cleaning data. Real data sets contain errors (a temperature of 210 °C), missing values (marked "n/a" in the large data set) and outliers. An obvious error should be removed or corrected. A genuine outlier (an unusually hot day) is real information and should usually be kept, though you might note its effect on the mean.

Scatter diagrams and correlation

Bivariate data have two variables for each item, such as height and arm span. A scatter diagram plots one against the other. Correlation describes the linear pattern: positive (both increase together), negative (one increases as the other decreases) or none.

positivenegativeno correlation

Interpreting correlation needs care:

  • Correlation does not imply causation. Ice-cream sales and drownings are positively correlated, but both are caused by hot weather (a third variable). A causal claim needs a reason in context.
  • Distinct sections. If the data contain separate groups, the overall pattern can mislead. In the diagram, each group has negative correlation, but together they look positive. Analyse each group separately.
group 1group 2within each group: negative; overall: looks positive

Regression lines. The line of best fit y=a+bxy = a + bx (found by the calculator, or given in the question) predicts yy from xx. Interpret its gradient in context: "b=0.8b = 0.8: each extra hour of revision is associated with 0.8 more marks". Use it only within the range of the data (interpolation); predicting outside the range (extrapolation) is unreliable. To predict yy from xx, xx should be the explanatory (independent) variable.

The product moment correlation coefficient (A level only). The PMCC, rr, measures the strength of linear correlation on a scale from −1-1 (perfect negative) through 0 (none) to +1+1 (perfect positive). You find it on your calculator. Its significance is tested in the hypothesis testing topic.

If the relationship looks curved, a straight line is the wrong model: a model y=kbxy = kb^x or y=axny = ax^n can be fitted by taking logarithms, which turns it into a straight line (see Exponentials and logarithms). For example, if log⁡y\log y against xx has a regression line log⁡y=0.3+0.12x\log y = 0.3 + 0.12x, then y=100.3×(100.12)x=2.00×1.32xy = 10^{0.3} \times (10^{0.12})^x = 2.00 \times 1.32^x.

Worked example

Interpreting bivariate datatop grade

A researcher records, for 30 towns, the number of fast-food outlets ff and the number of hospital admissions for heart disease hh, and finds strong positive correlation, with regression line h=12+3.5fh = 12 + 3.5f. The numbers of outlets range from 4 to 40.
a) Interpret the gradient. b) Estimate hh when f=20f = 20 and comment on reliability. c) A journalist writes "fast food causes heart disease". Comment. d) Why should the researcher not estimate hh for a city with 150 outlets?

Show solution
  1. a) Each additional fast-food outlet is associated with about 3.5 more admissions.
  2. b) h=12+70=82h = 12 + 70 = 82. Reliable: 20 is within the data range (interpolation) and the correlation is strong.
  3. c) Correlation does not prove causation. Bigger towns have both more outlets and more people to be admitted: population size is a likely third variable. The data should be per head of population.
  4. d) 150 is far outside the range 4–40: extrapolation, so the linear pattern may not continue.

Selecting a diagram

  • Histogram: continuous grouped data, especially with unequal classes.
  • Box plot: quick comparison of two or more data sets, showing outliers.
  • Cumulative frequency: estimating medians, quartiles and percentiles of grouped data.
  • Scatter diagram: the relationship between two variables.
  • Stem and leaf, dot plots: small data sets where individual values matter.

Practise this topic

Both are part of Premium.