Skip to content
World 1 · Ask a Question, Collect Data · 12 min

A question data can answer

Statistical questions and variables

Teaching this? Open projector mode

Statistics starts with a question, and not every question is a statistics question.

Compare these two:

  • "How much does the penguin in row 1 of our table weigh?"
  • "How much do adult Gentoo penguins weigh?"

The first has one answer: you look it up (3 750 g). The second has many answers, because penguins differ. You can only answer it with a summary of many measurements: a typical value, a range, a picture. A statistical question is one where you expect the answers to vary, and where the data you collect will vary too.

"How many students are in our class today?" is a counting question with one answer. "How many hours do students in our school sleep on a school night?" is statistical: different students will give different answers, and the interesting part is the pattern.

Data usually arrives as a table. The words to know:

  • Observational unit (also called a case): the thing each row describes. In the penguin table it is one penguin.
  • Variable: something measured or recorded about every unit, one column per variable: species, island, flipper length, body mass, sex.
  • Value: the entry in one cell, such as "Gentoo" or 214 mm.

The standard layout, often called tidy data, follows three rules: each row is one unit, each column is one variable, and each cell holds one value. Tidy tables are easy to sort, filter, count and plot, which is why almost every tool for data analysis expects them.

The first three rows of the penguin table look like this:

  • Adelie · Torgersen · bill 39.1 mm long, 18.7 mm deep · flipper 181 mm · 3 750 g · male · 2007
  • Adelie · Torgersen · bill 39.5 mm long, 17.4 mm deep · flipper 186 mm · 3 800 g · female · 2007
  • Adelie · Torgersen · bill 40.3 mm long, 18.0 mm deep · flipper 195 mm · 3 250 g · female · 2007

The penguin measurements are the Palmer penguins data set: 344 birds measured at Palmer Station, Antarctica, in 2007, 2008 and 2009 (Gorman, Williams and Fraser, 2014), shared in the public domain (CC0).

Variables come in two main families.

  • Categorical variables put each unit in a group: species, island, sex. The values are labels. You can count how many are in each group.
  • Numerical (quantitative) variables are measurements or counts where arithmetic makes sense: flipper length, body mass. You can average them.

Numerical variables split again. A discrete variable takes separate values you can count, such as the number of eggs in a nest (0, 1, 2, 3 …). A continuous variable can take any value in a range, limited only by how precisely you measure: a flipper might be 214 mm, 214.3 mm or 214.27 mm. Body mass and flipper length are continuous, even though the table records them as whole numbers of grams or millimetres.

A good test for "numerical": does the average mean something? The average body mass of a group of penguins is meaningful. The average of a list of postal codes is not.

Loading 3D lab…
Check yourself

Which of these is a statistical question?

Check yourself

Flipper length in millimetres is best described as:

Check yourself

In the penguin table, what does one row stand for?

Check yourself

A table has a column of postal codes such as 10115 and 75001. What type of variable is it?

0 of 4 required activities complete. Finish each task and quiz.Next lesson →
My notes
Only saved in this browserAll my notes →

Report a mistake

What is wrong?
0 / 2000 · at least 10 characters
Sent along with your report
  • Page
  • About A question data can answer — Data Detective · data/statistical-questions
Plus your browser type. Reports go to our support system; see the privacy notice.