STAT 101
M1 · Lab
Hands-on lab
The centre and the spread, computed not eyeballed

Open the Data Explorer and type in a few small datasets, and predict — before you read it off the screen — the mean and the sample variance of a simple set, what a single wild value does to the mean versus the median, and which point the 1.5·IQR rule flags as an outlier.

The mean and the sample variance (the n − 1 divisor)
\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i, \qquad s^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i - \bar{x})^2

The mean x̄ is the balance point — sum the values and divide by n — but it chases the tail: one extreme value drags it away. The median, the middle value by rank, resists. Spread is measured by the sample variance s², which divides the summed squared deviations by n − 1, not n: the n − 1 divisor makes it the unbiased estimator, while dividing by n is the maximum-likelihood estimate that runs low on small samples. And the 1.5·IQR rule isolates outliers from the quartiles alone, so the outlier cannot drag its own fence.

1 / 10
STAT 101
M1 · Lab
Set it up
One small dataset

Open the Data Explorer. It opens on the Simple preset — the data 1, 2, 3, 4, 5 — with every statistic printed live. Each step names the one thing to change; type the exact data it asks for and leave the rest.

Set these values
Preset -> Simple Data -> 1, 2, 3, 4, 5 Statistics panel -> mean, median, s^2 Box plot -> Q1, Q3, IQR, fences

Watch the mean and median readouts, the variance readout with its n − 1 note (and the population-variance n note beside it), and the box-plot panel drawing the whiskers, the quartiles Q1/Q3, the IQR and the 1.5·IQR fences. Every number you predict is printed there.

2 / 10
STAT 101
M1 · Lab
Step 1 of 6
The mean of 1, 2, 3, 4, 5

Leave the Simple preset in place. The mean x̄ is the sum over n: (1+2+3+4+5)/5. Predict it, then read the mean readout.

Expected

The mean readout shows 3 — the balance point of the five values. Because this set is symmetric, the mean and the median coincide.

3 / 10
STAT 101
M1 · Lab
Step 2 of 6
The sample variance, and why n − 1

Still on 1, 2, 3, 4, 5. The deviations from the mean are −2, −1, 0, 1, 2, and their squares sum to 10. The sample variance divides that by n − 1 = 4, not by n. Predict s², then read the variance readout and its n − 1 note.

Expected

The variance readout shows 2.5 = 10/4. The demo shows the population variance 2.0 = 10/5 beside it: s² divides by n − 1 to be the unbiased estimator, while the n divisor is the maximum-likelihood estimate that runs low on small samples.

4 / 10
STAT 101
M1 · Lab
Step 3 of 6
Add one wild value: the mean jumps

Type the data 1, 2, 3, 4, 100. Four points are unchanged and one is far out. Predict the new mean, then read the mean readout.

Expected

The mean readout jumps to 22 — a single outlier has dragged the average above every point except the outlier itself. The mean has a breakdown point of zero: one bad value can move it anywhere.

5 / 10
STAT 101
M1 · Lab
Step 4 of 6
The median does not budge

Keep the data 1, 2, 3, 4, 100. The median is the middle value by rank, and the ranks have not changed. Predict the median, then read the median readout.

Expected

The median readout is still 3, exactly as it was for 1, 2, 3, 4, 5. The median depends only on ranks, so pushing the top value to 100 — or to a billion — cannot move it. That resistance is why we report the median for skewed data.

6 / 10
STAT 101
M1 · Lab
Step 5 of 6
The 1.5·IQR upper fence

Type the data 10, 12, 14, 15, 16, 18, 20, 50. The box plot reports Q1 = 13.5 and Q3 = 18.5, so IQR = 5. The upper fence is Q3 + 1.5·IQR. Predict it, then read the box-plot fence readout.

Expected

The upper fence is 26 = 18.5 + 1.5·5, and the lower fence is 6 = 13.5 − 1.5·5. Any point beyond [6, 26] is flagged. This is Tukey's rule: the fences come from the quartiles, not from the mean, so they are not themselves dragged by the outlier.

7 / 10
STAT 101
M1 · Lab
Step 6 of 6
Which point gets flagged

Same data 10, 12, 14, 15, 16, 18, 20, 50. Predict which value(s) the 1.5·IQR rule marks as an outlier, then read the flagged points off the box plot.

Expected

Exactly one point is flagged: 50, the only value beyond the upper fence of 26. The other seven all sit inside [6, 26], so the whisker reaches 20, the largest point still inside the fence. The rule flagged the outlier without any human deciding what “far” means.

8 / 10
STAT 101
M1 · Lab
Your turn
Open the sandbox

Everything above is waiting in the Data Explorer. Try the Skewed preset and watch the mean sit above the median; try the Bimodal preset, where the mean and median both land in the empty valley between the two humps and neither describes the data well; drag the histogram bin count and watch the shape appear and dissolve; and type your own data to see the box plot, quartiles and fences update live.

9 / 10
STAT 101
M1 · Lab
Wrap-up
What you did
  • Read the mean of 1, 2, 3, 4, 5: x̄ = 3
  • Read the sample variance s² = 2.5, divided by n − 1 to be unbiased (the n divisor gives 2.0, the MLE)
  • Watched one wild value drag the mean to 22 while the median stayed at 3 — the mean chases the tail, the median resists
  • Computed the 1.5·IQR upper fence, 26, from the quartiles
  • Saw the rule flag exactly the outlier, 50, and nothing else
  • Every value you predicted is the demo's own arithmetic, not a picture
10 / 10