Understanding science, for all. Home About
Novadette› ∑ Mathematics› Statistics› Mean, Median & Standard Deviation› Compare Two Data Sets
∑ Statistics

Compare Two Data Sets

Two classes, two machines, before and after: put the two groups side by side. Which one is higher on average, which one is more spread out, and how much do they overlap?

StatisticsDescriptiveBox plot
Inputs
Input examples
Type or paste the numbers of each group, separated by commas, spaces or new lines (use ; between numbers when you write decimal commas). The groups may have different sizes. Give them a name to see it in the chart.

Comparing Groups

Two groups can have the same average and still be very different: in one, everyone scores close to the mean; in the other, the scores run from very low to very high. So compare both the centre (mean or median) and the spread (standard deviation or IQR).

Box plots side by side show this at a glance: the line in each box is the median, the box holds the middle half of the values, and the whiskers reach to the most extreme values that are not outliers. Boxes that hardly overlap point to a real difference; to test it properly you need a statistical test, such as a t-test.

centremean, median
spreads, IQR
CV = s / x̄spread relative to size
outliersbeyond 1.5 IQR

Side-by-Side Box Plots

n
group A
group B
median
mean
outlier
Result
Enter the values above

Side by Side

StatisticAB

Worked Techniques

Same Mean, Different Spread

Two machines can fill bottles with the same average amount, while one of them is far less consistent. The standard deviation shows which.

Example: both average 500 ml; one has s = 1.8 ml, the other s = 6.6 ml.
Mean or Median?

If one group has a few extreme values, compare the medians: one outlier can pull a mean a long way, but hardly moves the median.

Example: commute times with one 45-minute trip: mean 19.3, median 15.5.
Relative Spread

To compare the spread of groups with very different sizes — elephants and mice, say — divide the standard deviation by the mean.

Example: s = 2 kg on a mean of 40 kg is a CV of 5%.

Sources & Verification

References
  1. D. C. Montgomery & G. C. Runger, Applied Statistics and Probability for Engineers, 6th ed., Wiley, 2013 — Ch. 6 (Descriptive Statistics).