Second movement · Coupling differences

Exercise 3.2 · Simple regression

One continuous predictor, one straight line, and what the direction costs

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

Fifty grams, or a hundredth of a millimetre?

slope · units · the direction of the question

The same 342 penguins as in Exercise 3.1, the same two columns: flipper length in millimetres, weight in grams. And now two numbers, both worked out properly, both on the same data.

Ask how weight goes along with flipper length, and out comes: 49.69 grams per millimetre. A penguin with one millimetre more flipper weighs almost fifty grams more.

Ask it the other way round — how flipper length goes along with weight — and out comes: 0.01528 millimetres per gram.

Two numbers about the same bunch of animals. And if they said the same thing, then the one would have to be the other upside down. Do it with round numbers for a moment: fifty grams per millimetre is exactly the same message as a fiftieth of a millimetre per gram, or 0.02. Divide one way, divide back the other — the same ratio, read from the other end.

Now check it with the real numbers: 1 / 0.01528 comes out at 65.45.

And 65.45 is not 49.69. There’s a good fifteen grams per millimetre between them, and that gap didn’t creep in — it’s there because something was decided along the way. With the correlation in Exercise 3.1 you could have turned that round without anything happening: the association between bill length and bill depth is the same number, whichever of the two you put first.

Not here. Come along for a moment: we’re going to find out what gets decided, who decides it, and what it costs.

play with it

Draw the line in JASP

regression line · intercept · slope · predicted value

A line through a cloud — you already saw one lying there in Exercise 3.1. Now you’re going to read it. One question makes it small straight away: if you had to tell someone who can’t see the picture how that line runs, how many things would you have to say? Two. Where it starts, and how steep it is. A straight line has nothing more.

Those two have names. The intercept (b0) is where the line meets the vertical axis. The slope (b1) is how much the outcome changes when the predictor moves one unit along.

NoteFirst as in the book — the twelve stones · JASP 0.99.0
  1. Open stones.csv.
  2. Regression → Linear Regression: shine to Dependent Variable, carat to Covariates.
  3. Under Statistics, Model fit is already ticked.

In Coefficients it says (Intercept) −1.429 and carat 32.143. In Model Summary it says R² = 0.334 and RMSE = 18.613.

JASP shows three decimals everywhere, and that is exactly enough — except for one number, and that one comes along in a moment.

And look straight away at what JASP just had you do. You dragged shine into a box called Dependent Variable, and carat into a box called Covariates. Two different boxes, and you had to choose. That choice isn’t layout — it is the choice this exercise is about.

So the line reads: shine = −1.43 + 32.14 × carat. A stone one carat heavier shines a good thirty-two points more.

And now you can do something you couldn’t in Exercise 3.1: give a number to a stone you haven’t looked at. Put in a carat and the line spits out a shine.

NoteIn JASP · a 2-carat stone

JASP has no button for this, and you don’t need one: this is adding and multiplying with the two numbers from Coefficients.

−1.429 + 32.143 × 2 = 62.857

The line is a little machine, a factory: something goes in, the factory multiplies it by the slope, adds the intercept, and spits it out. And mind where you start — you start at the carat, and the shine rolls out. Not the other way round.

Now do it wrong on purpose

Because that’s the move this exercise makes. Swap the two variables round and see what happens.

NoteIn JASP · swap the two boxes · JASP 0.99.0

Same analysis, but now carat to Dependent Variable and shine to Covariates. In Coefficients it says (Intercept) 1.081, and next to shine it says 0.010.

And there is the one number for which three decimals aren’t enough. One divided by 0.010 is 100, and that is not what ought to be there. Go to Preferences → Results, tick Fix the number of decimals and set it to 5: now next to shine it says 0.01038. Turn that one upside down — 1 / 0.01038 — and out comes 96.34. Not 32.14. (After that your decimals can go back to three; only this slope needs five, and in a moment the penguins’ slope does too.)

But look at Model Summary at the same time: R² is still 0.334, to the last decimal. And if you ask for the correlation in Regression → Correlation, it is 0.578 both ways.

Look carefully at those four results, because they seem to contradict each other. The correlation is the same number both ways. R² is the same number both ways. And the line is not — a good 96 against 32.14, a factor of three.

That’s exactly what happened with the penguins in the hook, only there it was less noticeable: 65.45 against 49.69. Twelve stones, three hundred and forty-two animals, the same phenomenon. So not a coincidence, and not a quirk of one dataset.

NoteFirst the twelve stones

Two questions before you read on — five minutes at most, and they sharpen the rest of this page.

a) Multiply the two slopes by each other: 32.14 times 0.01038. (one number, and say which familiar number from this page that is)

b) Subtract the mean from every carat and draw the line again (make a column carat_c with carat - mean(carat) and put it in Covariates). What does the intercept become? (one number, and say where you saw it before)

a) .33 — and that is the R² of this model. Not roughly: that’s it. Two slopes multiplied by each other give the share of the differences that the line covers. Why that is so comes below.

32.14 × 0.01038 = .3336 — and Model Summary said 0.334. That difference of four ten-thousandths is the rounding of the two slopes, not a different number.

b) 50.00, and that is, to the last decimal, the mean shine across all twelve stones. That’s no fluke either, and that too comes below.

NoteIn JASP

Run the same Linear Regression with carat_c in Covariates. In Coefficients it says (Intercept) 50.000 and carat_c 32.143; Descriptives says that shine has a mean of 50.000.

get it

Who predicts whom

dependent variable · independent variable · the empty address · centring

Now the names, and only now — you’ve already had the thing itself in your hands.

The variable you put in is called the independent variable, also the predictor; in JASP that is the Covariates box. The variable that rolls out is called the dependent variable, also the outcome; which is why, in JASP, that box is simply called Dependent Variable. Here x is the beginning — think of it as the cause, even though you may never call it that — and y the effect. Note that those two warnings belong together: you may think cause in order to remember the direction, and you may not write it down that way. The arrow is in your head and in your question, not in the data.

Because that’s what the swap test showed. The correlation you could turn round without anything changing: r = .58 forward, r = .58 back. That measure is symmetric — it knows no direction, so it doesn’t force you into anything either. A regression line is not. By dragging shine into the Dependent box you’ve said: the carat I know, the shine I want to know. Drag them the other way round and you’re asking a different question, and a different question gets a different answer.

And then the question that comes by itself: which of the two lines is the right one, then? Neither, and both. If you want to guess the shine of a stone that’s sitting on the scales, 32.14 is the right one. If you want to guess the weight of a stone whose shine you’ve looked at, 0.01038 is the right one. There is no third line that is ‘the real relationship’ and that these two are approximations of.

Together, the two slopes know exactly how good the line is

That was question a) above, and this is why it works. You have the slope forward (32.14) and the slope back (0.01038), and those two times each other give .33 — the R² of this model. Not roughly: that’s it.

It follows from the bridge the book builds in this chapter. Forward, the slope is r · Sy/Sx; back, it’s r · Sx/Sy — the same r, and the two spreads exactly the other way up. Multiply them and the spreads cancel out. What’s left is r × r, and that is R².

The empty address

Look again at the intercept of the diamond line: −1.43. Take it literally. A stone of zero carats, according to this line, shines minus one and a half points — a stone that weighs nothing and shines less than nothing.

That’s not a calculation error and not a bad line. It’s an address where nobody lives — and here, even an address that can’t exist. The lightest stone in this file is 1 carat, the heaviest 2.1. Zero lies a whole carat outside anything that was ever weighed; the line has been neatly extended that far, but nobody has ever looked.

The intercept can always be read as the prediction for someone who scores zero on the predictor. That is always true. The only question is: what does that zero mean? Here zero means: a stone that isn’t there. So the intercept is true and worthless, at the same time.

There is one move that repairs that, and it’s nothing more than a subtraction. Centring: subtract the mean from every carat, so that zero no longer means ‘no stone’ but ‘an average stone’. That was question b) above.

NoteIn JASP · centring is subtracting · JASP 0.99.0

Make the column in the R box (type Scale), as in the toolbox: left of the arrow the name of the column, right of it what goes in the R box; you don’t type the arrow itself.

carat_c   ->   carat - mean(carat)

Copy the right-hand side exactly. It says “the carat minus the mean carat”.

Run the same Linear Regression with carat_c in Covariates. In Coefficients it says (Intercept) 50.000 and carat_c 32.143 — the slope hasn’t moved — and Model Summary keeps R² = 0.334.

Look at what happens there. The intercept is now 50.00, and that is, to the last decimal, the mean shine of all twelve stones.

That’s no fluke. A regression line always passes through one fixed point: the crossing of the two means — mean carat, mean shine. Shift the zero to the mean carat and that crossing slides exactly onto the vertical axis, so that’s where you read off the mean shine. Mean in, mean out.

Now somebody lives at the address: where an impossible stone used to stand, the average stone stands. The slope hasn’t moved, R² hasn’t moved, not a single prediction has moved — all you’ve done is shift the zero to a place where somebody lives.

That’s all centring does, and in this book you’ll meet it twice more: in multiple regression as a move, and in interaction as a fixed habit. Here it’s enough to have seen it happen once.

One word, and in a moment two meanings

One more thing, because you’ll meet the word again. You’ve learned here that the predictor is called the independent variable. Further on, this exercise book also deals with rows that are independent of each other — and that is something quite different. There it’s not about a variable but about your rows: does every row in your table carry information that isn’t already there somewhere else, or are you measuring the same person or the same place twice?

The same word, two meanings. Pin it down here, and you won’t have to wonder later.

And then the part this line still owes you. You’ve drawn it, read it and turned it round — but you haven’t yet looked anywhere at how far off it is, stone by stone. That’s the next exercise.

your turn

The penguins, and what the direction costs you

the swap test · naming the units

Back to the 342 penguins. Familiar animals, new question: in Exercise 3.1 you looked at the association between flipper length and weight; now you’re going to predict the one from the other — and then the reverse, to see what that choice costs. These are the two numbers from the hook; now you make them yourself.

NoteIn JASP · set it up · JASP 0.99.0

Open penguins.csv. Everything below comes from Regression → Linear Regression; your decimals may go back to three. Where a slope needs five, it says so.

NoteYour turn

Answer the questions in order; they build on each other. The last one is deliberately called Z) and not j): the cloud question always comes last.

There are ten of them, and that’s too many for one sitting. After d) you’ll have drawn the line, read it and rehoused it — a good moment to stop. At e) the swap test begins, and that’s a story of its own.

In brackets, each time, is what belongs in a complete answer. Where it says 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) First draw the cloud — flipper length horizontal, weight vertical — and run the line of weight on flipper length through it — body_mass_g to Dependent Variable, flipper_length_mm to Covariates. Then read it off. (report b0 and b1, and put its unit after the slope; you’ll need the cloud again at Z))

b) Say out loud what that slope means. (one sentence, about penguins and with the unit in it — the number and the unit are fixed, the wording is up to you; more than one answer is right)

c) The empty address. Take b0 literally: what does this line promise for a penguin with a flipper of zero millimetres? (one number, and one sentence on why that address stands empty here — name the shortest flipper that really is in the file)

d) Centre the flipper length and see what the intercept becomes. Then ask for the mean of body_mass_g. (two numbers, and one sentence about what you recognise — and say what has not changed)

Centring is taking the mean off: from every flipper length you subtract the mean flipper length, exactly as you did with the carats of the twelve stones. More about centring is in the toolbox. The book comes back to it at length later.

e) Turn the question round: swap the two boxes, flipper_length_mm to Dependent Variable and body_mass_g to Covariates. (report b0 and b1, again with the unit)

f) If those two lines said the same thing, the one would have to be the other upside down. Work out 1 divided by the slope back and put it next to the slope forward. (two numbers, and say whether they’re equal)

g) Now do the test with the multiplication: the two slopes times each other. (one number, and say which familiar number that is)

h) Ask both models for their R², and also for the plain correlation. (three numbers, and say which of the three changes when you turn the direction round)

i) Write down your finding in one sentence. (which two measures you chose, which way round, how many grams per millimetre, and how much the model covers — 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? A straight line is a choice, not a law of nature. Look at the cloud from a) — does it bend anywhere? And is there one penguin hanging so far out that it’s pulling on the slope all by itself? (two short statements, and say which of your answers above depend on them)

a) b0 = −5780.83 and b1 = 49.69 grams per millimetre. The line reads: weight = −5780.83 + 49.69 × flipper length, and R² = .76.

NoteIn JASP

body_mass_g to Dependent Variable, flipper_length_mm to Covariates. In Coefficients it says (Intercept) −5780.831 and flipper_length_mm 49.686; in Model Summary it says R² = 0.759. You get the cloud with the line in it from Regression → Correlation, with Scatter plots switched on.

b) Every extra millimetre of flipper goes with almost fifty grams more weight. Not that the flipper makes the weight — that the two rise together, and that’s all it says.

c) −5780.83 grams, or minus 5.8 kilos. A penguin with a flipper of zero millimetres weighs, according to this line, less than nothing. That address stands empty: the shortest flipper in this file is 172 millimetres, so zero lies a hundred and seventy millimetres outside anything that was ever measured. The line has been neatly extended that far; nobody has ever looked.

NoteIn JASP

Descriptives with flipper_length_mm: Minimum 172.000 and Maximum 231.000.

d) The centred intercept is 4201.75, and the mean weight is also 4201.75. That’s no fluke: the line passes through the crossing of the two means, and by shifting the zero to the mean flipper length you put that crossing exactly on the vertical axis. Mean in, mean out.

And note what did not change: the slope still stands at 49.69 and the R² still at .76. Centring only shifts the zero; the model stays the same model.

NoteIn JASP
flipper_c   ->   flipper_length_mm - mean(flipper_length_mm)

Run the regression again with flipper_c in Covariates: (Intercept) 4201.754 and flipper_c 49.686. Descriptives says that body_mass_g has a mean of 4201.754.

e) b0 = 136.73 and b1 = 0.01528 millimetres per gram. That line reads: flipper length = 136.73 + 0.01528 × weight.

NoteIn JASP

flipper_length_mm to Dependent Variable, body_mass_g to Covariates: (Intercept) 136.730 and next to body_mass_g 0.015. That is the second slope that needs more decimals: set Fix the number of decimals to 5 again, as with the swapped diamond line, and it says 0.01528. After that they may go back to three.

f) The slope back, upside down, is 65.45, and the slope forward is 49.69. Not equal, and not by a little either: there’s a good fifteen grams per millimetre between them. Those are exactly the two numbers from the hook, and now you’ve made them yourself.

1 / 0.01528 = 65.45

(Mind which division it is. Divide by the 0.01528 on your screen and you get 65.45 — and that’s the number from the hook. The R exercise book divides by the unrounded 0.0152759 and lands on 65.46. A number on your screen is rounded, and whoever calculates on with it calculates the rounding in as well.)

g) 49.69 × 0.01528 = .76 — the R² of this model. Two slopes multiplied by each other give the share of the differences that the line covers, just as with the stones.

49.69 × 0.01528 = .7593

h) R² = .76 forward, R² = .76 back, and r = .87. None of the three changes when you turn the direction round. Only the line changes; everything that is symmetric stays put. That’s the whole tension of this exercise in a single sentence.

NoteIn JASP

Model Summary of both models: R² = 0.759. And Regression → Correlation with flipper_length_mm and body_mass_g: Pearson’s r 0.871.

i) For example:

In 342 penguins we predicted weight from flipper length: every millimetre of flipper went with almost fifty grams more weight (b = 49.69), and the line covered a good three quarters of the differences in weight (R² = .76).

Z) Half and half — and the half that’s wrong is the one you learn most from.

Your eye says straight; the sums say: not quite. Look at your picture from a) — dots from bottom left to top right, the line through the middle, not a bend in sight. Now split the penguins by flipper length into three roughly equal-sized groups and look at how far off the line is, on average, in each group. Plus means: the penguins lie above the line, so the line sits too low. Out comes: +57 grams for the short flippers, −106 in the middle, +41 for the long ones. Up, down, up — that’s a dip, not noise.

Where that dip comes from: the mixture. Give each species its own line and the bend is gone. They’re three straight clouds lying at different places along the axis, and pressed together into one cloud they make a shallow arc. The same lesson as in Exercise 3.1 — now with a line through it.

And mind why we look at those distances and not at the R². Because you could also try it like this: let the line stop being a straight line and give it a bend, and see whether it covers the cloud better then. It does — the R² goes from .76 to .78. Only that proves nothing, because an extra bend always pushes the R² up and never down, even a bend that makes no sense at all. The distances do prove something. They have a name — residuals — and that’s what the next exercise is about. There you learn to draw them instead of averaging them, and then you see a dip like this at a glance.

What does hold up: no penguin is pulling on the slope all by itself. Leave them out one at a time and the biggest shift is 0.33 grams per millimetre — on a slope of 49.69, so not even one per cent.

NoteIn JASP · and what can’t be done here

The mean distance per third of the flipper length, and the test with a line of its own per species, have no button in JASP. The R exercise book checks them in a few lines: +57, −106 and +41 grams, and as soon as each species gets its own line the bend adds nothing more (p = .39).

What depends on it: here, not much — the bend is shallow, and your slope, intercept and R² remain usable summaries of these 342 animals. Had it been stronger, then it wouldn’t have been one of your answers that was wrong — they’d all have been a poor summary: the slope, the intercept, the R², the swap test. That’s the difference from Exercise 3.1, where the species means simply stayed put: those were descriptions of the table, and a line is a model.

And one thing is still open that you can’t see here. How far off this line is, penguin by penguin, you can’t read from b0, b1 or R² — for that you need the residuals, and that’s the next exercise.

your turn

Predict a person from a questionnaire

scale score · the same route, a different subject

With penguins you choose the direction and that’s that. With people the same choice becomes uncomfortable straight away, and that is exactly why it has to come round once more here.

bigfive.csv holds 2634 people who rated twenty-five statements about themselves on a scale from 1 to 6. You use ten of them here — five about neuroticism, how easily you get upset, and five about openness, the taste for new things. First reverse O2 and O5, the two openness statements worded the other way round, then take each person’s mean of their five answers, and you have two variables, both still on the scale from 1 to 6: the two scale scores from Exercise 3.1.

And then you get to choose what you predict from what. Do you predict neuroticism from openness, or the other way round? You can’t tell from the people; the arrow is in your question.

NoteIn JASP · build the two scales · JASP 0.99.0

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 Exercise 3.1 and 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”, with the reversal of O2 and O5 right in it.

Put openness in Descriptives: Minimum and Maximum should give 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.

NoteThe same route on questionnaires

Four steps, and then the sentence this chapter leads up to.

a) Draw the line of neuroticism on openness — neuroticism to Dependent Variable, openness to Covariates — and read it off. (report b0, b1 with its unit, and R²)

b) Take b0 literally, and then centre openness. (two numbers, and one sentence on whether that empty address is worse or less bad here than with the penguins — look at the range of openness)

c) Turn it round and multiply the two slopes. (two numbers, say which familiar number that product is — and one sentence on how heavily your choice of a moment ago weighs here)

d) Write down what you found, in two sentences and in this fixed form:

Within these n people: … (b = …). Whether that also holds beyond these n, you don’t know yet.

(fill in the n, the finding in plain words and the slope — and leave that second sentence exactly as it stands)

a) b0 = 3.77 and b1 = −0.13 scale points of neuroticism per scale point of openness. R² = .01.

NoteIn JASP

In Coefficients it says (Intercept) 3.774 and openness −0.133; in Model Summary it says R² = 0.008.

b) The intercept 3.77 is the prediction for someone who scores zero on openness, and after centring it reads 3.16 — the mean neuroticism, exactly as with the stones.

And that empty address is less bad here than with the penguins, but still empty. The lowest openness in this file is 1.2 and the highest 6.0, so zero lies only just over one scale point below instead of a hundred and seventy millimetres. Only: zero can’t happen on this scale at all. Whoever answers all five questions in the least open way possible ends up at 1. So the address doesn’t exist, and that’s a different kind of empty from a penguin without a flipper — there the zero was thinkable and simply never measured.

NoteIn JASP

Descriptives with openness: Minimum 1.200 and Maximum 6.000.

openness_c   ->   openness - mean(openness)

With openness_c in Covariates it says (Intercept) 3.163 — and in Descriptives neuroticism has a mean of 3.163.

c) The slope back is −0.0606 scale points of openness per scale point of neuroticism, and their product is .01 — the R², just as with the stones and just as with the penguins. (Minus times minus is plus: an R² is never negative.)

NoteIn JASP

Swap the boxes: openness to Dependent Variable, neuroticism to Covariates. To three decimals the slope back says −0.061; set Fix the number of decimals to 5 again for a moment, and it says −0.06059 — −0.0606 to four decimals, as in the answer above. Swap the boxes back and run the line forward once more: there openness now says −0.13294. The multiplying you do yourself: −0.13294 × (−0.06059) = .0081.

And then the sentence about your choice. If the two lines said the same thing, the one would be the other upside down — that was the test with the penguins, and there it was already off: 65.45 against 49.69. Here you don’t even need to calculate. The slope back is −0.0606, not even a tenth in size, so upside down it comes out far from zero: −16.5 — and the slope forward says −0.13. The two lines stand almost at right angles to each other. Your choice of a moment ago — neuroticism from openness, and not the other way round — therefore weighs more heavily here than anywhere else in this chapter, precisely where the association is weakest. With people that’s the rule and not the exception; associations there are seldom tight.

d) For example:

Within these 2634 people: whoever scores one scale point higher on openness scores, on average, a good tenth of a scale point lower on neuroticism (b = −0.13). Whether that also holds beyond these 2634, you don’t know yet.

Note that it says on average, and note what it does not say: that openness makes you less neurotic. You’ve drawn a line through a cloud of people you’ve seen once. What it takes to say something that does hold beyond these 2634 is what the next movement is about.

exam practice

Exam-style questions

intercept · centring · the direction of the question

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 questions 1 and 6 need any arithmetic.

NoteExam-style questions

1. The line of weight on flipper length reads: weight = −5780.83 + 49.69 × flipper length. What does this line predict for a penguin with a flipper of 200 millimetres?

  1. −5731 grams
  2. 4157 grams
  3. 4202 grams
  4. 9938 grams

2. Take that intercept of −5780.83 literally. What is the best description of what it says?

  1. The line has been drawn wrongly, because a penguin can’t weigh less than nothing.
  2. The mean weight of these 342 penguins, shifted to the vertical axis.
  3. An error in the file: there’s a negative weight in it somewhere.
  4. The weight the line predicts for a flipper of zero millimetres — an address that stands empty here, because the shortest flipper in the file is 172 millimetres.

3. You centre the flipper length: from every flipper length you subtract the mean flipper length, and then you draw the line again. What changes as a result?

  1. Only the intercept: it becomes 4201.75, the mean weight. The slope and the R² stay put.
  2. The intercept and the slope: both shift along with the mean.
  3. Nothing: the output reads line for line the same as before.
  4. The intercept and the R²: the line fits better once zero lies within the data.

4. You turn the question round and predict flipper length from weight instead of weight from flipper length. Which of these measures changes as a result?

  1. The correlation between flipper length and weight.
  2. The R² of the model.
  3. The slope.
  4. None of the three — they’re the same 342 animals, so the same results.

5. The slope forward is 49.69 grams per millimetre, the slope back 0.01528 millimetres per gram. One divided by 0.01528 gives 65.45, and that is not 49.69. Which explanation is the best?

  1. One of the two lines has been drawn wrongly; only the line with the highest R² is right.
  2. The two lines answer a different question, and that’s why the one is not the other upside down.
  3. It’s down to rounding: calculate with all the decimals and they do come out at the same number.
  4. The units differ — grams per millimetre against millimetres per gram — and so the two numbers can’t be compared.

6. Multiply the two slopes by each other: 49.69 × 0.01528. Which familiar number from this page comes out?

  1. The correlation between flipper length and weight, r = .87.
  2. The intercept, divided by the mean flipper length.
  3. The standard deviation of weight, divided by that of flipper length.
  4. The R² of this model, .76.

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

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

1. b. Fill it in: −5780.83 + 49.69 × 200 = 4157 grams. (Let the model do it itself and it says 4156.28 — it works with the unrounded slope. The same rounding lesson as 65.45 against 65.46 above: round off only at the end.) a adds the slope once instead of two hundred times: −5780.83 + 49.69 = −5731. c is 4201.75, the mean weight, and that’s the finest distractor of the six — it’s only forty-five grams off. That’s because the mean flipper is 200.92 millimetres and not 200: that’s the same mean you subtracted from every flipper length at d) to centre, and you can ask for it there. The line passes through the crossing of the two means, so at 200.92 millimetres 4201.75 grams would be the answer. d forgets the intercept: 49.69 × 200 = 9938.

2. d. The intercept is the prediction for whoever scores zero on the predictor — always true, and here worthless, because zero lies a hundred and seventy millimetres outside anything that was ever measured. a confuses impossible with wrong: the line is laid properly, it has just been extended past the animals. b is the intercept after centring and not this intercept; that’s question 3. c looks for the error in the data while there is no negative weight in the file — the lightest animal weighs 2700 grams.

3. a. Centring shifts the zero and nothing else. The intercept lands on the mean weight because the line passes through the crossing of the two means; the slope and the R² don’t move with it. b has the slope shift along, and that can’t be: the slope says how many grams come with each millimetre, and that doesn’t change because you number the millimetres differently. c is right about the model and not about the output — the model is the same model, but the intercept appears as a different number, and that’s exactly the gain. d has centring improve the fit; that doesn’t happen, because not a single prediction changes.

4. c. Only the line changes. The correlation and the R² are symmetric: they know no direction, so they can’t be changed by it either. a and b name exactly those two. d is the most tempting, because it is true that the data are the same — but by choosing the direction you ask a different question, and a different question gets a different answer.

5. b. The weight I know, the flipper length I want to know is a different question from the other way round, and each line is the best for its own question. a looks for a winner where there is none; the R², by the way, is .76 both ways, so that criterion doesn’t even point to one. c can be checked and isn’t true: with all the decimals it says 65.46, still a good fifteen grams per millimetre away from 49.69. d has the right difference and the wrong conclusion — grams per millimetre and millimetres per gram are each other’s upside down, and that is precisely why, after one division, you may compare them.

6. d. 49.69 × 0.01528 = .76, the R² of this model. Forward, the slope is r · Sy/Sx and back it’s r · Sx/Sy — with Sy and Sx the standard deviations of weight and flipper length. Multiply them and those two spreads cancel out, leaving r × r. a names r itself, and that is the square root of the answer and not the answer. c is the most dangerous of the three, because it’s a real quantity: Sy/Sx is in that formula above, and it comes out at about 57 grams per millimetre. That’s the exchange rate between the two measures — how many grams would come with each millimetre if the two were perfectly associated. The exchange rate doesn’t say how well the line fits; only times r does it become the slope, and that’s why it’s a little bigger here than the 49.69 you found. b isn’t a quantity at all but looks like a formula because there’s a division in it.

The numbers in these six questions all appear earlier on this page. What’s new is the prediction at 200 millimetres and the wrong distractors — and those are all written out above as sums, so you can check them without having to take them on trust.

◠ Same shape in the book

Here: the line drawn and read, and the test that shows a direction has been chosen.

In the book: Chapter 3 — The Little Rectangle

There the line gets its two numbers and its bridge to r; here you see what happens when you turn the question round — and what the intercept means at a place where nobody lives.