Making sense of a pile of numbers
What kind of data is this?
Tell cases from variables, sort every column into one of four kinds (category, ordered category, measurement without a true zero, measurement with a true zero), and know what each kind lets you calculate.
By the end of this lesson you can say what one row and one column of a table stand for, sort any column into one of four kinds of data, tell discrete from continuous, and say which summaries each kind allows.
Why it matters
A spreadsheet will happily calculate the "average island" if islands are written as numbers. Code the 344 penguins' islands as 1 = Biscoe, 2 = Dream, 3 = Torgersen, and the average comes out as 1.66. That is nonsense: there is no island 1.66. The computer cannot tell you that a calculation makes no sense. You have to know what kind of data each column holds. Every choice later in this course depends on it: which average, which chart, and, in S2, which test.
The idea in plain words
First, the two parts of any data table:
- One row is one case: one penguin, one sale, one country, one patient visit. (Statisticians also say observation or unit.)
- One column is one variable: one thing recorded about every case, such as its island or its mass.
Now look at what is in a column. Think of a ladder with four steps. Each step allows everything below it, plus one more thing.
The four kinds of data, from categories at the bottom to measurements with a true zero at the top. Diagram, no data.
Category (nominal): a name with no order: species, island, fruit, payment method. You may count them and find the mode.
Ordered category (ordinal): names that have an order, but the gaps between them are not equal steps: World Bank income group (Low, Lower middle, Upper middle, High), or small, medium, large. You may also put them in order and find the median.
Measurement without a true zero (interval): numbers with equal steps, but 0 does not mean "none": a year, or a temperature in °C. 20 °C is not "twice as hot" as 10 °C. You may also take differences and find the mean.
Measurement with a true zero (ratio): numbers where 0 really means "none": length, mass, money, waiting time, number of pieces. You may also say "twice as much": a 4,000 g penguin is twice as heavy as a 2,000 g one.
Discrete and continuous: a discrete measurement can only take separate values, usually whole numbers you count (pieces sold, pupils in a class). A continuous measurement can take any value in between (length, mass, time), even if we round it when we write it down.
See it done
Data:
penguins.csv(real),amara-stall-s1-sales.csv(synthetic) andwdi-2024.csv(real). Open each file and read the column headings in row 1.
- Penguins: one row is one penguin. The columns:
species,island,sex: categories. You can count them (COUNTIF), not average them.bill_length_mm,bill_depth_mm,flipper_length_mm,body_mass_g: measurements with a true zero, and continuous.year: a measurement without a true zero. The years run from 2007 to 2009; the difference of 2 years means something, but year 0 is not "no time".
- Amara's sales: one row is one sale.
fruitandpaymentare categories.quantity(pieces) is a measurement with a true zero, and discrete: you cannot sell 2.5 pieces.amount_ngnis money: a measurement with a true zero. - World Bank: one row is one economy.
income_groupis an ordered category. Count the economies in each group:=COUNTIF(D2:D189, "Low income")gives 20;"Lower middle income"gives 45;"Upper middle income"gives 52;"High income"gives 71.
- The median of an ordered category. Line all 188 economies up from Low to High. The middle is position (188 + 1) ÷ 2 = 94.5. The Low and Lower middle groups fill positions 1 to 65, and Upper middle income fills positions 66 to 117. So the middle economy is Upper middle income: that is the median group.
Ordered categories have a middle, even though you cannot average them. Source: World Bank, World Development Indicators, 2024 values, CC BY 4.0.
A number is not always a measurement. Phone numbers, postcodes and ID numbers (like
sale_id) are labels written with digits. Their average means nothing. Ask: "Would adding two of these make sense?" If not, treat the column as a category.
Your turn, with help
Lucía's file lucia-classes-marks.csv (synthetic) has the columns class, pupil_id, maths_mark and did_homework. Sort each column into one of the four kinds. Which one could you sensibly average?
Hints: Ask of each column: is it a name? Does it have an order? Does 0 mean "none"? Would adding two of them make sense?
Show the answer
class(5A or 5B): category.pupil_id(5A-01 and so on): a label, so a category. Never average it.did_homework(Yes or No): category.maths_mark: a measurement (treat it as a measurement without a true zero: equal steps, but 0 marks does not mean "no maths at all"). You can average it, and it is the only column where that makes sense. (Whether a mark of 0 means "no maths knowledge at all" is debatable, so do not say one pupil "knows twice as much" as another.)
Your turn, alone
- Sort these columns of
priya-clinic-waits.csvinto the four kinds:weekday,session(Morning or Afternoon),visit_type,wait_minutes. - Is
wait_minutesdiscrete or continuous? Explain in one sentence. - A survey asks: "How happy are you with the clinic? 1 = very unhappy, 2 = unhappy, 3 = happy, 4 = very happy." What kind of data is the answer? Which centre would you use for it, and why?
Watch out
- Codes that look like numbers. If islands are coded 1, 2, 3, the spreadsheet will average them without complaint. The result is meaningless.
- Ordered categories are not equal steps. The gap from "unhappy" to "happy" need not be the same as from "happy" to "very happy". The median is safe; the mean of 1-to-4 scores is often used in practice, but say so and be careful.
- Rounded is still continuous. Flipper lengths are written in whole millimetres, but a flipper can be any length. Rounding does not make data discrete.
Say it back
- In a table, what does one row stand for, and one column?
- Name the four kinds of data, from bottom to top of the ladder.
- Why can you find the median of income groups but not their mean?
Show the answers
- One row is one case (one penguin, sale or economy); one column is one variable (one thing recorded about every case).
- Category, ordered category, measurement without a true zero, measurement with a true zero.
- Income groups have an order, so they have a middle; but they are names, not amounts, so they cannot be added up.
What is next
Real columns are often messy: a blank cell, the letters "NA", a mark of 130 out of 100. Before you calculate anything, you must check for these. Lesson 5 shows you how.
Formulas in this lesson were checked on 2026-10-11 against the official Google Sheets and Microsoft Excel help pages, and every number was calculated by running the formulas in a spreadsheet program (LibreOffice Calc) and checked by a separate calculation. Menu steps are written for Google Sheets on the web and Excel for Microsoft 365.
Answers to Your turn, alone
Show the answers
weekday: a category, or an ordered category (Monday comes before Tuesday within a week, but the week goes round in a circle); either answer is fine if you say why. You would not average days.session: category (or ordered, morning before afternoon; either answer is fine if you say why).visit_type: category.wait_minutes: measurement with a true zero (0 minutes means no wait).- Continuous: time can take any value; the file rounds it to whole minutes, but rounding does not make it discrete.
- An ordered category. Use the median (the middle answer), because the steps between the answers are not known to be equal. You could also report the share of people in each answer.