Find a course

Module 1: Data and Study DesignLesson 1 of 1211 min

Data, Variables and the Big Picture

Learn what statistics is for, tell populations from samples and parameters from statistics, and classify variables as categorical or quantitative.

Step 1 of 13Learn

A café full of questions

Rosa runs a small café. She wonders: What's the average amount a customer spends? Do more people order oat milk than they did last year? If she raises the price of a latte by 50 cents, will sales drop? Is the new pastry more popular on weekends?

Every one of those questions is a statistics question. Statistics is the science of collecting, describing and drawing conclusions from data, especially when you can't see everything at once.

Some vocabulary you'll use throughout the course:

  • Individuals are the people or things described by the data: customers, orders, days.
  • A variable is a characteristic recorded for each individual: amount spent, drink type, day of the week.
  • The population is the entire group you want to know about: all of Rosa's customers, ever.
  • A sample is the part of the population you actually observe: the 300 receipts from last week.

Rosa can't survey every customer who will ever walk in. She studies a sample and uses it to learn about the population. That leap, from the data you have to the group you care about, is the heart of statistics. Done well, it lets a poll of 1,000 people describe a nation of millions. Done badly, it produces confident nonsense.

Step 2 of 13Learn

Two kinds of variables

The first thing to ask about any variable is what kind it is, because that decides which graphs and calculations make sense.

Categorical variables place individuals into groups: drink type (latte, tea, drip), payment method, blood type, whether a patient recovered (yes/no). You summarize them with counts and percentages: 42% of orders were lattes.

Quantitative variables take numerical values where arithmetic makes sense: amount spent, wait time, height, temperature. You can average them: the mean order was $6.80.

Quantitative variables come in two flavors:

  • Discrete: countable values with gaps between them, like the number of items in an order (1, 2, 3…).
  • Continuous: any value in a range, like wait time (3.27 minutes) or weight.

The number trap. Some variables are recorded as numbers but are really categories. ZIP codes, jersey numbers and phone area codes are labels. The "average ZIP code" of your customers is a meaningless number. The test: would adding or averaging the values mean anything? If not, the variable is categorical, whatever it looks like.

Rating scales (1 to 5 stars) are a gray zone. They're often averaged in practice, but strictly they're ordered categories.

Step 3 of 13Practice · Sort into groups

Sort each variable as categorical or quantitative.

Tap an item, then tap its group (or drag it there).

Step 4 of 13Learn

Parameters and statistics

A number that describes a population is a parameter. A number that describes a sample is a statistic. A handy memory link: population goes with parameter, sample with statistic.

Statisticians use different symbols for each, so you always know which one you're looking at:

Population (parameter)Sample (statistic)
Meanμ ("mu")x̄ ("x-bar")
Proportionpp̂ ("p-hat")
Standard deviationσ ("sigma")s

Example. A polling firm asks 1,000 randomly chosen adults whether they support a new transit plan; 54% say yes. That 54% is a statistic (p̂ = 0.54). The percentage of all adults in the city who support it is the parameter p, and nobody knows it exactly.

Parameters are usually fixed but unknown. Statistics are known but vary: a different random 1,000 adults would give a slightly different percentage, maybe 52% or 56%. That sample-to-sample wobble is called sampling variability, and measuring it is what lets us say how far a statistic is likely to be from the parameter.

Step 5 of 13Practice · Choose one

A school district reports that the average reading score of all 18,400 of its third graders was 212. A reporter then interviews 40 of those students and finds an average of 219. Which statement is correct?

Step 6 of 13Practice · Diagram

From population to conclusion and back

At which stage does a number become a statistic rather than a parameter?

Tap the shape that answers the question, then press Check.

From population to conclusion and backCycle diagram: Population → Draw a sample → Compute a statistic → Infer the parameter.StatisticalstudyPopulationDraw a sampleCompute astatisticInfer theparameter
Population

Everyone you want to learn about. Its true summary number is a parameter, usually unknown.

Draw a sample

A manageable group chosen from the population, ideally at random.

Compute a statistic

A number calculated from the sample, such as a sample mean or percentage.

Infer the parameter

Use the statistic, plus a measure of uncertainty, to say something about the whole population.

Step 7 of 13Compare

Categorical vs. quantitative data

AspectCategoricalQuantitative
ExamplesDrink type, eye color, survey answer yes/noWait time, income, number of visits
Summarize withCounts, percentages, proportionsMean, median, standard deviation, quartiles
Typical graphsBar chart, pie chartHistogram, dotplot, boxplot
Inference in this courseConfidence interval and test for a proportionConfidence interval and t-test for a mean

Step 8 of 13Learn

Describing vs. inferring

Statistics has two big branches, and this course covers both.

Descriptive statistics summarizes the data you have: graphs, averages, percentages, measures of spread. "The 300 receipts last week had a median of $6.20." No guessing is involved; it's a statement about those 300 receipts.

Inferential statistics uses a sample to draw conclusions about a population, with a measured amount of uncertainty. "We're 95% confident the average spend of all customers is between $6.10 and $7.50." Or: "The new pastry sells better on weekends, and the difference is too big to be a fluke."

Inference only works if the sample is representative, which is why the next lesson is about how data are collected. A brilliant analysis of badly collected data still gives wrong answers. Statisticians sum this up as "garbage in, garbage out."

Here is the road map:

  1. Collecting data well (this module).
  2. Describing data with graphs and numbers.
  3. Probability, the language of uncertainty.
  4. Inference: confidence intervals and hypothesis tests.
  5. Relationships between two quantitative variables.

Each step uses the one before it. Probability, in particular, is the bridge between describing a sample and making claims about a population.

Step 9 of 13Practice · Match the pairs

Match each term to the example from Rosa's café study.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. Population
  2. Sample
  3. Variable
  4. Statistic
  5. Parameter

Step 10 of 13Practice · Diagram

The two branches of statistics

Rosa reports "the median of last week's 300 receipts was $6.20". Which branch is that?

Tap the shape that answers the question, then press Check.

The two branches of statisticsHierarchy diagram: Statistics, Descriptive, Inferential, Graphs, Summary numbers, Confidence intervals, Hypothesis tests.StatisticsDescriptiveInferentialGraphsSummarynumbersConfidenceintervalsHypothesistests
Statistics
Descriptive

Summarizes the data you actually have. No guessing about anyone outside the data.

Inferential

Draws conclusions about a population from a sample, with a stated margin of uncertainty.

Graphs

Bar charts, histograms, boxplots, scatterplots.

Summary numbers

Means, medians, percentages, standard deviations.

Confidence intervals

A range of plausible values for a parameter (Module 4).

Hypothesis tests

Weigh evidence against a claim about a parameter (Module 4).

Step 11 of 13Note

Step 12 of 13Practice · True or false

The average age of all 2,400 students at a college, calculated from the registrar's complete records, is a statistic.

Step 13 of 13Practice · Choose one

A researcher surveys 2,000 randomly selected US households and finds that 38% own a dog. What is the population?