First movement · Difference under the microscope

Exercise 0.1 · Looking at the data

Look before you calculate

Data for this exercise — penguins.csv 342 penguins · stones.csv the twelve stones from the book · what each column means

hook

The left one is fatter than the right one

looking before calculating · feeling difference

Before there is any calculating, there is looking. Someone stands on a cold rock, sees two penguins waddle past and thinks: the left one is fatter than the right one. That’s all it is. No formula, no test — a glance, and the beginning of a question.

That is how the book began too: with feeling difference, long before anything got calculated. This exercise book is the other half of that story, and it runs alongside it the whole way: the book tells the story, here you do it yourself. You and JASP — and the idea is that, step by step, you get that computer to show what you could already feel.

But before you touch a single button, I want you to do something almost everyone skips: look at what data actually is. Not calculating — looking.

look

Look at the table in JASP

opening a file · rows and columns

NoteFirst as in the book — the twelve stones · JASP 0.99.0
  1. Open stones.csv in JASP (menu top left → Open).
  2. Look first in the data view, on the left: twelve rows, nine columns — it all fits on one screen.
  3. Go along the columns: which ones hold numbers, and which hold text? That is all that is needed here.

Twelve rows, nine columns — the whole dataset fits in a single glance, and that is exactly why the book calculates with it. With real data, seeing it all in one go no longer works, and then you need tools to see what’s there.

Now you — with 342 penguins, too many rows for a single glance.

A file comes with this exercise book: penguins.csv — 342 penguins from a rock near Antarctica, really picked up, really weighed.1 Download it and just look. Nothing gets calculated here.

NoteIn JASP · just look · JASP 0.99.0
  1. Open the file: menu (≡, top left) → Open → Computer, and browse to penguins.csv.
  2. On the left, the data view appears, laid out like a spreadsheet: the table itself. Scroll slowly through it, from row 1 to row 342. Don’t click on anything, just look.
  3. See the small icons in front of the column names (a ruler, some bars)? JASP has already guessed what kind of data is in each column. We’ll come back to that — for now, just notice that they are there.

What you see is a table: 342 rows, nine columns — id, species, sex, bill_length_mm, bill_depth_mm, flipper_length_mm, body_mass_g, nitrogen and carbon. And with it the most important reading rule of this whole exercise book: one row is one penguin. Row 1 is an Adelie male with a bill (the beak) of 39.1 mm, and he weighs 3750 grams. Look in his row under nitrogen and carbon: there, nothing has been filled in, twice. A measurement is missing at that spot — no fault of yours, and no fault in the file. What those two columns are is on the dataset page. Now scroll a good way down: row 173 is a Gentoo of 5000 grams. Go on, point at them both. This bird weighs 3750 grams; that bird 5000 — a good kilo between them, two animals, one rock.

You haven’t calculated a thing yet. And still you’ve already seen something.

get it

What a table is — and what it leaves out

what data is · measuring · look first, then calculate

This is data. Nothing mystical, no maths — a table. Every row a real animal (or later, in other files, a real person), and every column a question someone put to that animal: how heavy are you, how long is your bill, what species are you.

And straight away this too, because it belongs here from day one: the table is not the penguin. Row 1 says nothing about how that animal waddled across the rock, whether it let itself be picked up or protested, what the wind was doing that day. What you measure is never everything there was. A dataset is a net of numbers that tries to hold on to a piece of reality — and something always slips through. But what does stay in the net is something you can look with. That is not a loss to keep mourning; it is a beginning.

From here on, we’re going to get that table talking, a little more cleverly each time. Chapter by chapter, one technique at a time: first summarising, then drawing, then shuffling, and in the end predicting. And every time in the same order, the one you already know: look first, then calculate.

exam practice

Exam-style questions

one row is one penguin · an empty cell · text versus number · what the first rows show

There is nothing to calculate in this exercise yet, and still an exam can already ask about it. These five have that form: four options, and exactly one is the best — the other three may well be true and still not be the best answer.

NoteExam-style questions

1. penguins.csv has 342 rows and 9 columns. What is in one row?

  1. One measurement on one penguin.
  2. One of the nine things that were measured on the penguins.
  3. One penguin, with all its measurements side by side.
  4. One of the three species of penguin.

2. For the first penguin, nothing has been filled in under nitrogen and carbon — twice. What does that mean?

  1. A measurement is missing in those two places.
  2. Those two measurements came out at zero.
  3. A mistake was made when opening the file.
  4. That penguin doesn’t belong in the dataset and should be taken out.

3. You want to know how many penguins are in the file. Where on your screen do you see that?

  1. The number of columns in the data view.
  2. The names at the top of the columns.
  3. The rows you see as soon as you open the file.
  4. The number of the last row with a penguin in it.

4. The column species holds text (Adelie, Chinstrap, Gentoo); the column body_mass_g holds numbers (3750, 5000, …). Because of that difference, what will you later be able to do with body_mass_g and not with species?

  1. Add the values together and so make one number out of them.
  2. Count how often each value occurs.
  3. Sort the rows on that column.
  4. Nothing — you can do exactly the same with both columns.

5. You open the file and look at the first six rows: all six penguins are Adelies. What may you conclude from that?

  1. That more than half of the penguins in the file are Adelies.
  2. That the file is sorted by species.
  3. Nothing about the other 336 — six rows are a peek, not a summary.
  4. That the Chinstraps and Gentoos are in a different file.

1 c · 2 a · 3 d · 4 a · 5 c

Below, for each question, is why — and why the other three options are tempting. If you got one right, you can skip it.

1. c. This is the reading rule of this whole exercise book: one row is one penguin, and the nine columns are the nine things written down about that one animal. a lies closest to it, and is the most important one to tell apart from it: one measurement sits in one cell, where a row and a column cross. Read a row as one measurement and you lose the idea that the measurements of the same animal belong together — and that idea, later on, is everything. b describes a column: nine things, nine columns. d confuses the table with a grouping; the species is one of the nine columns, not the unit a row is about.

2. a. An empty cell means: a measurement belongs here, and it isn’t here. No fault of yours, and no fault in the file. b is the most dangerous of the three, because zero is a measurement — a measured zero says “I looked and there was nothing”, and an empty cell says “I didn’t look” or “it didn’t work”. Later, that difference is the difference between a mean that is right and one that has been dragged down by made-up zeros. c looks for the cause in how the file was opened; you see the gap because it is really there. d throws away a penguin over two missing measurements, while its weight and its bill are right there and join in just fine.

3. d. JASP numbers the rows on the left of the data view, and one row is one penguin — so the number of the last row with a penguin in it, 342, is the number of animals. a counts the columns and gives 9: the number of things measured, not the number of animals. That is the same mix-up as in question 1, now on your screen. b gives the nine column names, so it does say what the file is about, and not how many. c shows a piece of the table and says nothing about the rest — see question 5.

4. a. Weights you can add up; species you can’t. Adelie plus Gentoo is nothing, and Chinstrap is not twice Adelie — the text in that column is a label, not an amount. That sounds obvious, and it is the floor under everything you are about to do: what you can do with a column depends on what is in it. b works for both — how often Adelie occurs is just as countable as how often 3750 grams occurs. c works for both too: text sorts alphabetically, numbers by size. d is the trap, because two of the four things really do work for both; adding up is precisely what sets the two columns apart.

5. c. The first rows show what is there — which columns, what kind of values, where the gaps are — and nothing about what the other 336 rows look like. If you want to know that, you scroll through the whole table, down to row 342. b is the most tempting, and it fails on one point: six rows cannot show it. You could get six Adelies in a row in a file where nothing is in order, too. That is the difference between it’s true and you’ve seen it — and here it is even nearly true, because the animals really are kept together by species: first 151 Adelies, then 123 Gentoos, then 68 Chinstraps. Grouped, then, not sorted, because alphabetically Chinstrap would be in the middle. a is a statement about all 342 on the strength of six, and that is exactly the leap this question is there to stop. It is also untrue here: 151 of the 342 waddling about are Adelies, or 44.2% — the largest group of the three, but no majority. d invents a second file; all three species are in this one.

If you want to see the numbers from these five questions again, on your own screen:

NoteIn JASP · the numbers from these five questions
  1. The number of penguins and the number of columns are in the data view: 342 rows, nine columns. You work out 342 − 6 = 336 yourself.
  2. Click Descriptives, drag species to Variables and tick Frequency tables. Next to Adelie it says 151, and in the Percent column the percentage from answer 5: 44.2.
  3. Scroll down the species column in the data view: first the Adelies, then the Gentoos, then the Chinstraps.

◠ Same breath in the book

Here: looking at a real table for the first time — without a single calculation.

In the book: Chapter 0 — In the Beginning

There it begins even earlier: not with a table, but with feeling difference itself.

Footnotes

  1. Palmer Penguins — Gorman, Williams & Fraser (2014), Palmer Station Antarctica LTER; via the R package palmerpenguins (CC0). Real animals, real measurements.↩︎