Statistics Basics: Mean, Median and Confidence Explained

Mean, median, standard deviation, and confidence intervals explained with one worked dataset. Master the basics and analyze real data with confidence.

2026-09-179 min readBy Prime Metric

Mean, median, and mode on one dataset

Meet our running example: seven quiz scores of 12, 15, 18, 21, 24, 30, and 45. The mean is the total divided by the count: 165 divided by 7 equals 23.57. The median is the middle sorted value, 21, the fourth of seven. There is no mode since no score repeats, which is completely normal in small datasets.

Notice the mean sits above the median because the lone 45 drags the average up while the median ignores it. That gap is the story of skew: outliers pull the mean but leave the median with the crowd. Report both, and whenever they disagree badly, trust the median for what is typical.

  • Mean 23.57, median 21, no mode in this dataset
  • Outliers pull the mean but leave the median nearly fixed
  • Skewed data: use the median; symmetric data: mean is fine

Spread: range, variance, and standard deviation

Center means little without spread. The range is fastest: 45 minus 12 equals 33, but it depends entirely on two extremes. Variance fixes that by averaging every point's distance from the mean: square each deviation, add them to get 745.71, and divide by 7 for a population variance of 106.53. The standard deviation is its square root, about 10.32.

That 10.32 says a typical score lands roughly 10 points from the mean, which matches the data well. If the seven scores were a sample from a larger class, divide by 6 instead: sample variance 124.29 and sample deviation about 11.15. Hold everyone and use the population version; hold a subset and use the sample version.

  • Range 33 is quick but fragile; one outlier owns it
  • Population variance 106.53, deviation about 10.32
  • Sample version divides by 6: deviation about 11.15

Percentiles and z-scores made concrete

A z-score counts standard deviations from the mean: subtract the mean, divide by the deviation. The score of 30 becomes (30 minus 23.57) divided by 10.32, which is 6.43 divided by 10.32, or about 0.62. The standout 45 becomes 21.43 divided by 10.32, about 2.08 standard deviations above average.

Percentiles translate that into rank: a z of 0.62 sits near the 73rd percentile, beating roughly three-quarters of the group, while 2.08 lands near the 98th. This is how exam boards, growth charts, and fitness benchmarks compare people across different tests. Whenever units differ, convert to z-scores first and the comparison becomes fair.

  • Score 30: z near 0.62, about the 73rd percentile
  • Score 45: z near 2.08, about the 98th percentile
  • Z-scores let you compare results in different units

The normal curve and the 68-95-99.7 rule

Many real measurements pile into the bell-shaped normal curve, symmetric around the mean. The empirical rule quantifies it: about 68 percent of values fall within one standard deviation of the mean, 95 percent within two, and 99.7 percent within three. For our class (mean 23.57, deviation 10.32), roughly two-thirds of scores should land between 13.25 and 33.89.

The rule doubles as a lie detector: a supposedly normal process with 40 percent of values beyond two deviations is either non-normal or misreported. Check shape with a histogram first. Our seven scores lean right because of the 45, so the rule holds only roughly here; with hundreds of points the bell usually sharpens.

  • 68 percent within one deviation, 95 within two, 99.7 within three
  • Our class: roughly two-thirds between 13.25 and 33.89
  • Fails on skewed or tiny samples; check the histogram first

Confidence intervals: what they really say

A sample mean is an estimate, and the confidence interval measures its wobble. The standard error equals the deviation divided by the square root of sample size, so 100 people with deviation 12 give 1.2 (12 divided by 10). The 95 percent interval is the mean plus or minus 1.96 standard errors: with a mean of 50, the margin is 2.35, giving 47.65 to 52.35.

That means the procedure captures the true average in about 95 of 100 repeats, not that any value has a 95 percent chance of something. Quadrupling the sample to 400 halves the width, since the root of 400 is 20 and the error shrinks accordingly. Precision is bought with sample size, and halving uncertainty always costs four times the data.

  • Standard error 1.2 gives a 95 percent interval of 47.65 to 52.35
  • Quadrupling data halves width; doubling barely dents it
  • 95 percent describes the method's hit rate over repeats

Statistics mistakes even analysts make

The deadliest habit is quoting the mean of skewed data, like average income in a town with one billionaire, where the median earner disappears. Next is confusing correlation with causation: ice-cream sales and drownings correlate through summer heat, yet banning ice cream saves nobody. Third is the tiny sample, where five lucky responses masquerade as public opinion.

Visualization sins finish the list: truncated axes turn a 5 percent gap into a canyon, cherry-picked dates manufacture trends, and hidden sample sizes cover everything up. Demand the quartet every time: sample size, spread, shape, and the exact question asked. Statistics without those four is storytelling with numbers.

  • Skewed data needs medians; means follow billionaires
  • Correlation needs a mechanism before becoming causation
  • Insist on sample size, spread, shape, and exact wording

Statistics questions, answered

Population or sample deviation? Divide by n when the data is everyone you care about, by n minus 1 when generalizing beyond it. Our seven as a whole use 10.32; as a school sample they use 11.15. The gap fades past a few dozen points. What p-value counts? The traditional line is 0.05, a flag for interest, never proof of importance.

How many poll responses? About 1,000 buys a 3-point margin at 95 percent confidence. Mean or median for house prices? Always the median, since a few mansions drag every average upward. Report intervals alongside means, because a lonely average without its uncertainty misleads more often than it informs.

  • Population divides by n; samples divide by n minus 1
  • p below 0.05 flags interest but never proves importance
  • House prices, incomes, and wait times all want medians

Try it yourself

Run your own numbers with these free calculators.