Second movement · Coupling differences
Exercise 3.1 · Correlation and the scatterplot
Association between two variables
In this exercise
Data for this exercise — stones.csv the twelve stones from the book · penguins.csv 342 penguins · bigfive.csv 2634 completed questionnaires · what each column means
hook
Longer bill, shallower bill?
association · negative r
Somewhere on a bare rock off Antarctica stands someone with a pair of callipers and 342 penguins who never asked for any of it.1 Of every penguin he writes down two things: how long the bill is, and how deep. By deep we mean the height of the bill — top to bottom, seen from the side, not the width and not the length. Nothing more: two numbers per animal, neatly one under the other.
And now us. Because something odd is hiding in those two columns. Work out the association between bill length and bill depth across all 342 penguins and out comes a number that is negative: r = −.24. In plain words: the longer the bill, the less deep — as if an animal with a long nose must have a thin nose.
Does that feel right? Not to me. Come along for a moment — we’re going to find out for ourselves, and on the way that number turns out to say something quite different from what it seems.
play with it
Where r comes from — the twelve stones first
covariance · sum of products
Two columns, twelve stones: carat and shine, neatly side by side. And you want one number that says how those two move together. Half the work you’ve already done in the book — for every stone you know its deviation from the mean, the blue strokes. Only here every stone has two: one on carat (the mean is 1.60) and one on shine (mean 50.00).
Then the move you know from the book: multiply those two deviations by each other, stone by stone. If they point the same way — both above, or both below — plus comes out; if they contradict each other, minus.
Do two by hand and you’ll see it happen. The twelve stones have names in the book, and two of them serve well here. Anna weighs 1.0 carat and shines 20, so her deviations are −0.6 carats and −30 shine points: both below the mean, and minus times minus is plus. Her contribution is +18. Kees weighs 2.1 carats and shines 30 — heavy, but dull. His deviations are +0.5 and −20; those contradict each other, and his contribution is −10.
| carat deviation | shine deviation | the two multiplied together | |
|---|---|---|---|
| Anna | −0.6 | −30 | +18 |
| Kees | +0.5 | −20 | −10 |
The other ten you don’t have to do by hand. In the first box below you rebuild the rectangle part of the table from the book’s rectangle section, as three columns beside the data: the deviation on carat, the deviation on shine, and the two multiplied together. Then look in your own third column: eight stones push the sum up, three sit exactly on a mean and so count zero, and only Kees counts against. Add that column up and you get 54 — that sum is called the sum of products. Divide by n − 1 = 11, and there it is: the covariance (Sxy), 4.91. The average rectangle.
And now the question you should ask of every number: 4.91 what? Just carry the unit along — a deviation in carats times a deviation in shine is… carat-shines. Is 4.91 carat-shines a lot of association? You can’t say. Nobody thinks in carat-shines. Raw is rubbish. The covariance still sits on the scale of its two variables; you can read the direction off it — plus, so heavier goes with shinier — but not the strength.
The repair is one division. Divide the covariance by the two standard deviations — 0.3908 carats and 21.7423 shine points — and watch what happens to the units: carat cancels against carat, shine against shine. What’s left is a bare number without a unit, the standardised version of the same association, and that number can never get outside −1 and +1: r = .58. That you can read in one go, with diamonds just as well as with penguins.
Open stones.csv and rebuild the table from the book, as three columns: click the + to the right of the last column, give it a name, choose type Scale and the R icon, and click Create Column; then you type the rule and click Compute column. That is how the toolbox has it too. In the boxes below, left of the arrow is the name of the column and right of it what you type in the R box; you don’t type the arrow itself.
dev_carat -> carat - mean(carat)
dev_shine -> shine - mean(shine)
rectangle -> dev_carat * dev_shine
Add the rectangles up: Descriptives, rectangle in Variables, and under Statistics the Sum tick box. It says 54.000. Divide by eleven on your calculator: 54 / 11 = 4.909, the 4.91 from the text above.
Then the same in one go, and standardised straight away — two more columns:
S_xy -> cov(carat, shine)
r_self -> cov(carat, shine) / (sd(carat) * sd(shine))
Copy the right-hand side exactly; you don’t have to read it. The top one says “give me the covariance”, the bottom one “and divide that by the two standard deviations”.
In S_xy every row holds the same number: 4.909, your average rectangle, with the third decimal that JASP shows by default. In r_self it says 0.578; there the unit has been divided out.
Then the same with one click: Regression → Correlation, carat and shine in Variables, Pearson’s r ticked (it already is), and under Plots the Scatter plots. Next to Pearson’s r it says 0.578.
And which line goes with it: Regression → Linear Regression, shine as Dependent Variable and carat in Covariates. In Coefficients it says (Intercept) −1.429 and carat 32.143.
So Correlation is no black box: it’s your covariance, divided by your two standard deviations. JASP just does the cancelling faster.
Mind the difference between what your screen says and what you write down yourself. JASP prints 0.578, zero and all; in the text above it says r = .58. That’s not sloppiness on either side. A click path quotes your screen; your own sentence follows APA, and there you leave the zero off because its absence says something: this number can’t get past 1. The numbers in the JASP boxes of this exercise book are therefore as JASP shows them, so you can check whether you have the same thing in front of you. Square that r with all the decimals on your screen and you have r² = .33 — a third of the differences in shine runs along with the weight, the rest doesn’t. (Square the rounded .58 and you get .34: here too, whoever calculates on with a printed number calculates the rounding along with it.)
Two questions before you read on, and then you can be let loose on something new.
a) A carat is just a weight: 200 milligrams. So weigh the stones in milligrams (make a column mg with carat * 200) and ask for the covariance again. (one number, and one sentence on what has and hasn’t changed about the twelve stones)
b) Divide that new covariance by the two standard deviations that now go with it. (one number, and say what you recognise)
a) 981.82 milligram-shines — two hundred times the covariance of a moment ago. (Work out 200 × 4.91 by hand and you get 982.00; JASP multiplies the unrounded 4.9091. The same kind of gap as anywhere you calculate on with a printed number.) And nothing about the stones has changed: not one weight, not one shine, not one point in the cloud. Only the unit you write the weight in is different. A number that becomes two hundred times as big the moment you pick a different unit can’t say how strong an association is.
mg -> carat * 200
S_xy_mg -> cov(mg, shine)
Out comes 981.818.
b) .58 — the same number as a moment ago. Dividing by the standard deviations takes the unit out, and that’s exactly why the correlation exists.
r_mg -> cov(mg, shine) / (sd(mg) * sd(shine))
It says 0.578, exactly what r_self gave too.
Now you — on the penguins, which you know by now. A new question for familiar animals: does the length of a bill go with its depth?
Bring the penguins in and throw them into a picture. One dot per penguin: bill length on one axis, bill depth on the other.
Open
penguins.csv(menu top left → Open).Regression → Correlation, and drag
bill_length_mmandbill_depth_mmto Variables. Leave Pearson’s r ticked.In the small menu under Regression, Correlation appears twice. You want the top one, under Classical.
Under Plots, tick Scatter plots: 342 dots, a cloud.
Next to Pearson’s r it says −0.235.
There it is: a cloud that hangs from top left to bottom right, and the number −0.235 is one figure for “how tightly does that cloud tilt down?”. The scale runs from −1 (a perfect falling line) through 0 (no straight-line association) to +1 (a perfect rising line). −.24 is a gentle fall with a lot of clutter around it — weak, but it’s there. Longer bill, shallower bill. Says the number.
get it
Three species in one cloud
confounding · third player · flipped sign · r²
The temptation now is to write: “in penguins, a longer bill goes with a shallower one.” The number has been worked out properly, the sentence seems to follow. And yet it’s wrong. Colour the cloud by species:
Colouring by group is something Correlation can’t do; Descriptives → Descriptive Statistics does it. Put
bill_length_mmandbill_depth_mmunder Variables there (the first one goes on the horizontal axis) andspeciesunder Split, and under Customizable Plots tick Scatter plots. JASP then colours the dots by species, and draws a line of its own for each species. Leave the Correlation from before open: the new table and cloud come in below it, and you need it again in the next step.JASP cuts off the legend next to the cloud by itself, even if you make the picture bigger in JASP: you only see Ad, Ch and Ge, with the first letters of species above them. Those are Adelie, Chinstrap and Gentoo.
And now work out r separately within one species: click the funnel above the data, and then, bottom left in the filter window, on R (if the R box is already there, skip that). Put
species == "Gentoo"in place of the bottom line, and click Apply pass-through filter. Below the data it then says Data has 342 rows, 123 (~36%) passed through filter. The Correlation recalculates, and next to Pearson’s r it says 0.643.That number is in the Correlation from before, higher up on your results page.
Then switch the filter off again — otherwise everything after this is worked out on the Gentoos.
Suddenly you see it. There are three species in that cloud, each as a huddle of its own. And within each huddle the association runs the other way: longer bill, deeper bill. Check it — Adelie +.39, Chinstrap +.65, Gentoo +.64. All three positive. The sign has flipped.
What happened? The Adelies (top left) have short, deep bills, the Gentoos (bottom right) long, shallow ones; the Chinstraps sit top right, with long and deep ones, though there are only 68 of them. Throw them all on one heap and the difference between the Adelies and the Gentoos drags the whole cloud down at a slant — and that’s where the −.24 comes from. Not from an association between bill length and bill depth, but from the difference between the species. The species is a third player dressing itself up as the association. The book calls that confounding later on; you saw it happen here, in the colours of a scatterplot.
And that’s the double lesson of this exercise, finer than either on its own:
- The calculator said: across these 342 animals, r is exactly −.24. There’s nothing to argue with there; check it yourself.
- The scatterplot said: true — but not what you think. The direction is a mirage of the species.
So worked out and true are two different things. A correlation can be right to the last decimal and still point you the wrong way. That’s why you never read r without the cloud beside it — and certainly not without asking who else is in that cloud. If you had to write it down in one honest sentence, then not “longer bills are shallower”, but: across three species the cloud hangs downwards, but within each species upwards — the minus sign is a species effect.
(And that small number r² you sometimes see — here .06 — is the “share of shared variance”: of all the difference in bill depth, only a few per cent shares anything with bill length. That too is no “explanation”, only bookkeeping.)
your turn
From bill to flipper
computing a correlation · colouring by species · species difference
From bill to flipper. penguins.csv also holds the columns flipper_length_mm (in mm) and body_mass_g (in grams). Same recipe, different question: do those two go together?
Open penguins.csv. The covariances you make in the R box, as with the stones; the correlation and the cloud come from Regression → Correlation, and the means per species from Descriptives.
Answer the questions in order; they build on each other. The first three are the route you saw run on the twelve stones above — raw, and only then standardised. The last one is deliberately called Z) and not k): the cloud question always comes last.
There are eleven of them, and that’s too many for one sitting. After f) you’ll have made a whole correlation from start to finish — a good moment to stop and dive back in tomorrow. At g) something else begins: there it’s no longer about the number but about who is in the cloud.
In brackets, each time, is what belongs in a complete answer. Where it says more than one answer is right, or that a part is up to you, the wording is free — for the rest, the answer is fixed. And under Exam-style questions, at the end of this exercise, the same topics come round once more, in the form an exam would ask them in.
a) Work out the covariance between flipper length and weight. (report Sxy with its unit — and that unit is two words long)
b) Do the same again, but put the weight in kilos first (make a column kg with body_mass_g / 1000). (the new number, and one sentence on why this is a problem for a measure that is supposed to express strength)
c) Divide both your covariances by the two standard deviations that go with them. (two numbers, and say what has happened to the unit)
d) Draw the cloud. (one sentence on which way it leans and how tightly — the direction is fixed, how tightly is your call)
e) Say in plain words what the sign means here. (one sentence, about penguins — the direction is fixed, the wording is up to you; a number may go in if you say what it measures)
f) Square the correlation. (report r², and one sentence on what that number does say and what it doesn’t)
g) Don’t trust that number before you’ve seen the species. Colour the cloud by species and work out r separately within each species. (three correlations, each with its n)
h) And yet the r across all 342 is higher than within any species on its own. How can that be?
Do it in two steps. First ask for the mean weight and the mean flipper length per species — six numbers, one Descriptives with species in Split. Then look at those six and try to say what makes the Gentoos different. (two or three sentences; if you can’t work it out, the answer below isn’t a defeat; it’s the point)
i) With the bills above, the sign flipped; here it didn’t. What’s the difference? (two sentences)
j) Write down your finding in one honest sentence. (N, both variables, the r across everything and the range within the species — those four have to be in it, the words around them are up to you; more than one answer is right)
Z) Is the cloud straight, and are there no points in it screwing the whole thing up? An r sums up one thing: how tightly the points lie around a straight line. So look back at your cloud from d) — does it bend anywhere, and is there one point hanging so far out that it’s pulling on the number all by itself? (two short statements, and say which of your answers above depend on them)
a) Sxy = 9824.42 millimetre-grams. Four digits before the point, and a unit you’ll meet nowhere else.
S_fm -> cov(flipper_length_mm, body_mass_g)
Out comes 9824.416.
b) In kilos it’s 9.8244 millimetre-kilograms. Exactly a thousand times smaller, because you’ve put numbers a thousand times smaller in one of the columns — and nothing else. Not one penguin has changed weight, not one point has shifted in the cloud, and yet a different number now stands there. A measure that depends on your scales can’t say how strong an association is.
kg -> body_mass_g / 1000
S_fkg -> cov(flipper_length_mm, kg)
Out comes 9.824 — to the four decimals of the answer above, that is 9.8244.
c) Both .87. The standard deviation of flipper length is 14.0617 mm, that of weight 801.9545 g, and that of weight in kilos 0.8020 kg. Divide the covariance by the product of the two that go with it and you get the same bare number twice.
And that’s because the unit is gone. On top of the fraction were millimetre-grams; underneath is millimetre times gram. They cancel each other out, and what’s left can no longer know what unit you weighed in.
r_fm -> cov(flipper_length_mm, body_mass_g) / (sd(flipper_length_mm) * sd(body_mass_g))
r_fkg -> cov(flipper_length_mm, kg) / (sd(flipper_length_mm) * sd(kg))
Both 0.871. The same 0.871 appears in Regression → Correlation under Pearson’s r.
d) A tight rising cloud, from bottom left to top right, and far less clutter around it than with the bills.
The cloud: Regression → Correlation with flipper_length_mm and body_mass_g, and under Plots the Scatter plots on.
e) Penguins with longer flippers are heavier. Nothing more — it doesn’t say the flipper makes the weight.
f) r² = .76. Three quarters of all the difference in weight runs along with flipper length. What it is not: an explanation. It’s bookkeeping — which part of the differences the two measures share, not why they do.
g) Adelie r = .47 (n = 151), Chinstrap r = .64 (n = 68), Gentoo r = .70 (n = 123).
Colour the cloud in Descriptives → Descriptive Statistics: flipper_length_mm and body_mass_g under Variables, species under Split, and under Customizable Plots tick Scatter plots. Then, with the funnel, switch on one species at a time: species == "Adelie", and so on. Next to Pearson’s r it says 0.468, 0.642 and 0.703. Then switch the filter off again.
h) Keep your coloured picture from g) at hand — the answer is in there, and the six numbers below only say what you see on it. Ask for them:
Descriptives, with body_mass_g and flipper_length_mm in Variables and species in Split. It says 3700.662 · 3733.088 · 5076.016 grams and 189.954 · 195.824 · 217.187 mm.
Now look at what the Gentoos are: by far the heaviest animals (5076 grams against 3701 and 3733) and the longest flippers (217.2 mm against 190.0 and 195.8). Heavy and long-flippered — that is the same direction as the association within each species. So the species difference pushes the cloud along that diagonal instead of standing across it.
And then, across all 342, you’re adding two things together: the association within each species, and the jump from one species to the next. Two huddles that already lie at a slant and moreover lie apart from each other along that same diagonal make, together, one long tight cloud — tighter than either huddle on its own.
If you want to see how big that jump is, set it beside the clutter within a species — but that’s an extra storey on top of your answer, not something you should have got out of the six numbers:
jump -> sd(tapply(body_mass_g, species, mean))
clutter -> sqrt(mean(tapply(body_mass_g, species, var)))
Out come 784.868 and 451.711 — the 785 and 452 that the answer below goes on to calculate with, rounded to whole grams.
So the jump between the species is a good one and a half times the clutter within one species (785 divided by 452 is 1.74), and that whole stretch counts fully in that .87.
i) With the bills, the species difference lay across the association within the species: the Gentoos have long and shallow bills, while within each species a longer bill is a deeper one. There the species pushed the cloud the other way, and the sign flipped. Here the species difference lies along it, and then it strengthens what is already happening within the species. Same third player, two opposite outcomes — and that’s exactly why the sign alone isn’t enough.
j) For example:
In 342 penguins, flipper length and weight were strongly positively associated, r = .87; within each of the three species that association was weaker, r = .47 to .70.
Make sure that second half is there. Without it your reader reads .87 as the association in one species of penguin, and that’s not what it is.
Z) Half and half — and for the half that doesn’t hold, you need the next exercise.
Is the cloud straight? Your eye says yes. You see no bend in the picture. But with what you have in hand in this exercise, you can’t prove that. You could try it like this: run a line through it and look at how much it covers. That’s R², and with one predictor that’s exactly the same number as the r² from f), to four decimals .7590. Now allow the line a bend — an extra term with flipper length squared — and it says .7753.
A good one and a half per cent extra, but that proves nothing. An extra term can only push the R² up and never down — even a term with nothing to say. (That’s not a finding but arithmetic, and you’ll meet it again in multiple regression, where a column of random numbers does exactly the same.) Whether there is a bend in it, you only see in Exercise 3.2: there a line goes through it, and it is checked how far that line is off for each stretch of the cloud. Then there turns out to be a slight bend in it after all, and it comes from the species — the same third player as with the bills.
Make a column flipper2 with flipper_length_mm^2 and run Regression → Linear Regression twice, with body_mass_g as Dependent Variable: first with only flipper_length_mm in Covariates, then with flipper_length_mm and flipper2. In Model Summary it says R² = 0.759 and then 0.775.
And no point pulls on the number all by itself. Leave out the heaviest penguin and the correlation only moves in the fourth decimal:
Put body_mass_g < max(body_mass_g) in the filter — then exactly the heaviest animal drops out, and you don’t have to type in a weight yourself. Next to Pearson’s r it then says 0.872 instead of 0.871; to four decimals that is .8716 against .8712.
Do that in turn for all 342 and the biggest shift a single animal causes is still only .004. That’s the third decimal, and it undermines no conclusion whatsoever.
Doing that in turn for all 342 is not a button in JASP. The R exercise book checks it in two lines, and out comes .0042.
What hangs on it: little here, because the bend is slight. But had it been stronger, this would hold:
- Stands: the three correlations within the species at g), the six species means at h), and the reasoning at i). Those describe what’s in the table, and no curved cloud changes anything about that.
- Redo: not the covariance at a) and b) — that’s just a sum — but everything that expresses strength: the r at c), the r² at f) that is its square, the statement in penguin language at e) that leans on it, and the sentence at j). An r measures straightness; if the association runs curved, the number is no lie but it is a poor summary.
your turn
From flipper to questionnaire
scale score · total score · the same route, a different subject
Penguins have one great advantage: you can weigh them. With people you seldom measure anything that fits on a pair of scales, and then you build your variable yourself, out of a questionnaire.
In bigfive.csv are 2634 people who rated twenty-five statements about themselves on a scale from 1 to 6. You use ten of them here: five are about neuroticism — how easily you get upset — and five about openness, the taste for new things and new ideas. One row is one person.
Ten loose answers are not yet a variable. You turn them into two numbers by taking, per person, the mean of their five answers; then everyone has one neuroticism score and one openness score, both still on that scale from 1 to 6.
One thing first. Two of the five openness statements are reversed: “Avoid difficult reading material” (O2) and “Will not probe deeply into a subject” (O5). Whoever agrees with them completely is in fact less open. You reverse those two first: 7 minus the score. A 6 becomes a 1, a 2 becomes a 5. Why 7: the two ends of the scale, 1 and 6, add up to 7. If you don’t, you add two directions together and measure something other than you think (the dataset page warns about it too). The five neuroticism statements all point the same way.
A number like that is called a scale score: the mean of the questions that belong to one scale. The book prefers to add the questions up and calls that a total score (also sum score). It’s the same idea, only with bigger numbers, and the correlation doesn’t notice — at b) and c) you check for yourself why. Both are fine, as long as you say which one you took. This exercise book averages, because a mean stays on the same 1 to 6 as the answers themselves; that way you read a score straight back as an answer to the questionnaire.
And then you walk exactly the same round as above. That’s the intention: flipper length is now openness, and weight is neuroticism, but the route is the same, line for line.
Open bigfive.csv and make two columns in the R box (type Scale; after the name Create Column, after the line Compute column), as in the toolbox: left of the arrow the name of the column, right of it what goes in the R box.
neuroticism -> rowMeans(data.frame(N1, N2, N3, N4, N5))
openness -> rowMeans(data.frame(O1, 7 - O2, O3, O4, 7 - O5))
Copy the right-hand side exactly; you don’t have to read it. It says “give me, per person, the mean of these five”, and for openness the reversal is right in it: 7 - O2 and 7 - O5.
Mind which mean you take here: one across five columns, per person. The mean(y) block from the drag route averages one column over all rows instead — see the toolbox.
Check that you have two new columns and that they are right: put openness in Descriptives and look at Minimum and Maximum. It should say 1.2 and 6.0. If it says 1.0 and 5.8, you forgot the reversal. If it says anything else, your reversal is off (it is 7 minus the score, for both) or you’ve got hold of the wrong column.
Four steps, and then the sentence this chapter leads up to.
a) Ask for the mean and the standard deviation of both scales. (four numbers, with the scale they’re on)
b) Work out the covariance between openness and neuroticism. Then do it again with the row sum instead of the row mean (a column with N1 + N2 + N3 + N4 + N5, and the same for the O’s, with the same reversal). (two numbers, and say by what factor they differ and why)
c) Divide both by the standard deviations that go with them. (two numbers, and one sentence on what you recognise here from the penguins)
d) Draw the cloud, and square the correlation. (report r², and one sentence on what a cloud like that looks like compared with the one of flipper and weight)
e) Write down what you’ve found, in two sentences and in this fixed form:
Within these n people: … (r = …). Whether that also holds beyond these n, you don’t know yet.
(fill in the n, the finding in plain words and the r — and leave that second sentence exactly as it stands; for the finding, more than one answer is right)
a) Neuroticism: M = 3.16, SD = 1.19 scale points. Openness: M = 4.60, SD = 0.81 scale points. Both on the scale from 1 to 6 the questions were answered on — so the average participant sits just below the middle on neuroticism and clearly above it on openness.
Descriptives, with neuroticism and openness in Variables: Mean (arithmetic) 3.163 and 4.598, Std. Deviation 1.195 and 0.806.
b) With the row means the covariance is −0.0865, with the row sums −2.1613. That differs by a factor of 25 (exactly, unrounded), and not by chance: a sum is five times a mean, and a covariance has two variables in it, so five times five. The same again as with the penguins’ kilos — you changed the unit and not the people.
N_sum -> N1 + N2 + N3 + N4 + N5
O_sum -> O1 + (7 - O2) + O3 + O4 + (7 - O5)
cov_mean -> cov(neuroticism, openness)
cov_sum -> cov(N_sum, O_sum)
Out come −0.086 and −2.161.
c) Both −.09. That’s what you saw with the penguins too: as soon as you divide by the two standard deviations, the units drop out and it no longer matters whether you calculated in means or in sums.
The standard deviations of the sums are in Descriptives: 5.973 for N_sum and 4.032 for O_sum.
r_mean -> cov(neuroticism, openness) / (sd(neuroticism) * sd(openness))
r_sum -> cov(N_sum, O_sum) / (sd(N_sum) * sd(O_sum))
Both −0.090.
d) r² = .01. And the cloud looks like it too: a thick, round blob without a clear direction, in which you can just about make out a faint slope. Set that beside the flipper-and-weight cloud from before — there the points lay in a tight streak. Here the two measures share barely one per cent of their differences.
Regression → Correlation with openness and neuroticism, Scatter plots on. Next to Pearson’s r it says −0.090; square that yourself to .01.
That the points seem to fall into small blocks is no error: a mean of five whole numbers can only take a limited number of values, so many people land on exactly the same spot.
e) For example:
Within these 2634 people: whoever scores higher on openness scores slightly lower on neuroticism (r = −.09). Whether that also holds beyond these 2634, you don’t know yet.
That second sentence is no hedge and no modesty. Everything you’ve worked out in this chapter — the covariance, the correlation, the r² — describes the people in front of you, and nobody else. What it takes to make that step outwards is what the next movement is about.
exam practice
Exam-style questions
covariance versus correlation · third player · r²
These six have the form an exam would ask this topic in: four options, and exactly one is the best — the other three may well be true and still not be the best answer. Only question 2 needs any arithmetic, and only roughly at that.
1. A researcher reports about these 342 penguins that the covariance between flipper length and weight is 9824.42, and adds: “that is a strong association.” Which criticism of that sentence is the best?
- The number is right, but he should first have found out whether the association also holds beyond these 342 animals.
- Wrong, because 9824.42 lies outside the range from −1 to +1.
- The covariance does give the direction and not the strength: put the weight in kilos and it says 9.8244, while nothing about the animals has changed.
- Wrong, because the association between the flipper length and the weight of 342 animals can’t be summed up in one number.
2. The covariance between flipper length and weight is 9824.42 millimetre-grams, and the two standard deviations are 14.06 millimetres and 801.95 grams — both rounded to two decimals. What is the correlation between flipper length and weight? You don’t need to calculate precisely: two of the four drop out as soon as you know where a correlation can lie.
- .76
- .87
- 12.25
- 698.75
3. Across all 342 penguins the correlation between bill length and bill depth is r = −.24. Within Adelie it is +.39, within Chinstrap +.65 and within Gentoo +.64. Which statement is the best?
- In penguins a longer bill goes with a shallower bill; the three species on their own are too small to count against that −.24.
- One of the four numbers must have been worked out wrongly — correlations with opposite signs can’t both be about the same animals.
- Within each species the association does hold, so that −.24 is an error in the file.
- The minus sign comes from the difference between the species and not from an association between bill length and bill depth.
4. Square the correlation between flipper length and weight and it says r² = .76. What does that .76 say?
- A good three quarters of the differences in weight runs along with flipper length; why is not part of it.
- Of the 342 penguins, 76 per cent lie on or close to the line.
- Flipper length explains 76 per cent of a penguin’s weight.
- The association between flipper length and weight is 76 per cent of what it could be at most.
5. Between flipper length and weight, the correlation across all 342 penguins is higher than within each species on its own. With the bills something else happened: there the sign flipped. Where does the difference lie?
- With the flippers the three species are about the same size, with the bills they aren’t.
- With the bills you measure two things on the same body part, and then the two measures work against each other.
- With the bills the difference between the species lies across the association within one species; with the flippers it lies in the same direction.
- With the flippers the association is so strong that the sign can no longer flip.
6. With the 2634 completed questionnaires you turn five answers into one score. Take the row mean per person and the covariance between openness and neuroticism is −0.0865; take the row sum and it is −2.1613. What happens to the correlation between those two?
- It becomes 25 times as big, just like the covariance.
- It stays −.09, because dividing by the two standard deviations takes the unit out.
- It becomes 5 times as big, because a sum of five items is five times a mean.
- You can’t say without the two standard deviations as well.
1 c · 2 b · 3 d · 4 a · 5 c · 6 b
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 kilo test from Your turn, now as a choice: the same bunch of animals, a different number, only because you weigh in kilos. a is true and answers a different question — whether the association holds beyond these 342 animals you indeed don’t know, but the criticism is about the word strong and not about the step outwards. b has the right range for the wrong measure: −1 to +1 is the range of the correlation, and it’s precisely the covariance that has no such range. d is the safe reflex: one number may sum up an association; that’s exactly what the correlation exists for.
2. b. Dividing by the two standard deviations: 9824.42 / (14.06 × 801.95) = .87. And you didn’t need to work it out: a correlation lies between −1 and +1, so c and d drop out at once. c is what you get if you divide only by the standard deviation of weight: 9824.42 / 801.95 = 12.25. d is the other half of that same mistake, only by the standard deviation of flipper length: 9824.42 / 14.06 = 698.75. That both fall so far outside the range is the clue: a division is missing. That leaves a, and that’s r² — the square, not the correlation itself.
3. d. The Gentoos have long, shallow bills and the Adelies short, deep ones; that species difference tilts the whole cloud downwards. a takes the number across the whole heap as the statement about a penguin, and that’s exactly the sentence this exercise forbids. b is the reaction where you blame yourself: all four numbers are right, they’re just about different heaps. c has the right half and the wrong conclusion — the −.24 is properly worked out and no error; it sums up something other than you thought.
4. a. Bookkeeping: which part of the differences the two measures share, not why. b confuses a share of the differences with a share of the animals; r² says nothing about how many penguins lie close by. c is the most tempting, and it’s one word short: it’s about the differences in weight and not about the weight. A penguin of 4200 grams is not 76 per cent flipper length. d makes r² a percentage of the maximum; that would mean r = .87 and r² = .76 are two ways of saying the same thing, and then you’d only have needed one.
5. c. Same third player, two outcomes: if the species difference lies across the association within a species, the sign flips; if it lies along it, the association across everything becomes stronger than within one species. a can be checked and isn’t true: the three species are 151, 68 and 123 animals, with the flippers just as much as with the bills. b sounds like a geometric argument but says nothing — within each species a longer bill does go with a deeper one. d makes strength a lock on the sign; the bills show that a species difference can turn a sign round however strong the association within the species.
6. b. The correlation stays −.09. A sum is five times a mean, and that sits on top of the fraction and underneath, so it cancels — the same law as with the penguins’ kilos. a carries the factor of 25 from the covariance over to the correlation, and that’s precisely what the correlation does not do. c has the right number for the wrong measure: five times holds for one variable, and a covariance has two in it, so five times five. d is too modest — you don’t need to know the standard deviations to know that they shift along in proportion.
Every number in these six questions you worked out yourself earlier on this page. The only new ones are the wrong distractors — and those are all written out above as divisions, so you can check them without having to believe them.
◠ Same shape in the book
Here: one number for the association, and the cloud that gives away what the number keeps quiet.
In the book: Chapter 3 — The Little Rectangle
There it starts with the cloud, not with the number — and the straight line only comes once you’ve seen everyone who is in the cloud.
Footnotes
Palmer Penguins — Gorman, Williams & Fraser (2014), Palmer Station Antarctica LTER; via the R package
palmerpenguins(CC0). Every number in this exercise has been recomputed on that real data.↩︎