Comparing Sample Centers
Introduction
Welcome back to Comparing Two Populations! In the first lesson, we laid the groundwork by identifying two populations, choosing a shared numerical characteristic, and verifying that our samples are fair to compare. With that careful setup behind us, this second lesson moves us from planning to doing.
Here we will compare the centers of two samples — their means or medians — to describe which population tends to have larger typical values and by how much. This is often the most natural first question people ask when placing two groups side by side, and learning to answer it clearly is a skill you will use throughout the rest of this course.
What Centers Reveal About a Group
A measure of center captures what is "typical" for a group. The two most common measures are:
- The mean: the sum of all values divided by the number of values.
- The median: the middle value when all values are sorted in order.
Both compress an entire sample into a single representative number. When we compare two populations, comparing their centers is a natural starting point because it directly answers the question, "Which group typically has higher or lower values?" Before we can interpret that comparison, though, we need to compute each center carefully and consistently.
Computing the Center of Each Sample
Let's walk through a concrete example. Suppose a city planner wants to compare morning commute times for two bus routes. She draws a random sample of riders from each route and records their commute times in minutes.
Route A sample: 22, 18, 25, 30, 20 Route B sample: 35, 28, 32, 40, 30
To find the mean of each sample, we add the values and divide by the count:
If we preferred the median, we would sort each sample and pick the middle value. For Route A, the sorted values are 18, 20, 22, 25, 30, giving a median of minutes. For Route B, the sorted values are 28, 30, 32, 35, 40, giving a median of minutes.
Either measure works here. The important thing is to use the same measure for both samples so the comparison stays fair.

