Skip to content
Research Atlas

Scientific Statistics · Lesson 1 of 7

From Sample to Population

~14 min

The Concept

You have five years of nitrate readings from well GW-14, 2,920 individual measurements. But what you actually care about isn't those specific 2,920 numbers. You care about the true underlying nitrate level at that well: the population mean that would exist if you could measure every molecule of water that passed through it, forever. Those 2,920 readings are just your sample.

This distinction, between the sample you have and the population you want to know, is the foundation of all inferential statistics. Every technique in this mission is a method for making defensible claims about the population using only the imperfect sample you were able to collect.

The population is the complete thing you want to know about: all the water in the aquifer, every nitrate molecule, every rainfall event that will ever occur. The sample is the subset you actually observed. Because you can never measure the whole population, statistics gives you tools to estimate population properties, like the true mean, from your sample, along with honest measures of how uncertain those estimates are.

The sample mean (written x̄, meaning the average of the numbers you actually collected) is your best guess at the population mean (written μ, meaning the true average you can never fully measure). It's not equal to μ, it's an estimate with uncertainty. Quantifying that uncertainty is what standard errors and confidence intervals are for.

The Analogy

Imagine tasting three spoonfuls from a huge pot of soup to guess how salty the whole pot is. The pot is the population. Your three spoonfuls are the sample. You are not measuring every drop, you are making an educated guess, and the more spoonfuls you taste, the more confident that guess becomes.

The Math (optional)

The sample mean is computed the familiar way, but its uncertainty depends on both sample size and variability.

Sample mean

xˉ=1ni=1nxi\bar{x} = \frac{1}{n} \sum_{i=1}^{n} x_i

Add all n measurements and divide by n. This is your point estimate of the true population mean μ.

Standard error of the mean

SE=snSE = \frac{s}{\sqrt{n}}

s is the sample standard deviation (how spread out your measurements are); n is sample size. SE measures how uncertain your estimate of μ is, it shrinks as n grows.

Code (optional)

sample_stats.pypython
import numpy as np

# Five years of nitrate readings from GW-14 (mg/L)
nitrate = np.load("gw14_nitrate.npy")

n    = len(nitrate)
xbar = nitrate.mean()
s    = nitrate.std(ddof=1)      # ddof=1 gives unbiased sample std dev
se   = s / np.sqrt(n)

print(f"n     = {n}")
print(f"mean  = {xbar:.3f} mg/L")
print(f"std   = {s:.3f} mg/L")
print(f"SE    = {se:.4f} mg/L")

Line by line

  • np.load reads the pre-cleaned nitrate array from Mission 03's cleaned dataset.
  • ddof=1 in std() uses n-1 in the denominator, the unbiased estimator of population variance.
  • SE = s / √n: more data or less variability → smaller SE → more precise estimate of μ.

Why Real Researchers Care

Every reported scientific measurement should come with an uncertainty quantification. The standard error is the most common one, it appears in almost every environmental science paper as error bars on figures or ± values in result tables. A mean without any uncertainty estimate is not a complete scientific result.

Quick Check

Q1. You double your sample size from 50 to 100 measurements. By how much does the standard error decrease?

Your Goal

Using the formula SE = s/√n: if GW-14 has s = 2.3 mg/L nitrate and you take 36 measurements, what is the standard error? How many measurements would you need to cut SE in half?

Hint: SE = 2.3/√36. To halve SE, you need to multiply n by 4.

Teach It Back

Explain in plain language why the difference between 'sample mean' and 'population mean' matters, using a concrete Bluewater Basin example.