Correlation and linear regression
Practice questions
Questions 7–12 · Section 2 of 6
Practice questions
Jump to a question · 6
Compare two scatters and fit both regression directions
For each dataset, find (i) the correlation coefficient r and comment on how it relates to the shape of the scatter diagram, (ii) the regression of y on x, and (iii) the regression of x on y.
(a)
| x | y |
|---|---|
| 3 | 5 |
| 7 | 12 |
| 9 | 5 |
| 11 | 12 |
| 14 | 10 |
| 14 | 17 |
| 15 | 23 |
| 21 | 16 |
| 22 | 10 |
| 23 | 20 |
| 26 | 25 |
(b)
| x | y |
|---|---|
| 0.6 | 5 |
| 1 | 10 |
| 2 | 15 |
| 2.5 | 10 |
| 2.8 | 2.5 |
| 3.6 | 7.5 |
| 4 | 2.5 |
| 4 | 5 |
| 4 | 15 |
| 5 | 10 |
CJC · Lecture · Self-practice
Compare two models using squared residuals
A random sample of five employees has ages x years and monthly earnings y thousand dollars.
| Employee | x | y |
|---|---|---|
| A | 19 | 3.16 |
| B | 21 | 3.21 |
| C | 26 | 3.34 |
| D | 28 | 4.03 |
| E | 32 | 3.99 |
(i) Alex uses y=0.1x+1.8. Calculate the sum of squared residuals for Alex’s line.
(ii) Bertrand uses another straight line whose sum of squared residuals is 2. State, with a reason, which model gives a better fit.
CJC · Lecture · Example 6
Choose the regression line before substituting
Eight observed pairs are:
| x | y |
|---|---|
| 3 | 7 |
| 4 | 8 |
| 6 | 9 |
| 10 | 11 |
| 11 | 20 |
| 12 | 19 |
| 15 | 21 |
| 17 | 22 |
It is given that r=0.93, the regression of y on x is y=1.188x+3.042, and the regression of x on y is x=0.736y−1.009.
(a) Taking x as the independent variable, estimate (i) y when x=14 and (ii) x when y=11.
(b) Now taking y as the independent variable, estimate (i) y when x=14 and (ii) x when y=11.
(c) With neither variable identified as independent, estimate (i) y when x=14 and (ii) x when y=11.
(d) Use an appropriate regression line to estimate x if the independent variable y is correctly determined as 30. Explain why this is not a good estimate.
CJC · Lecture · Example 7
Predict a French mark from an English mark
Ten randomly selected students have these French test marks y and English test marks x.
| x (English) | y (French) |
|---|---|
| 19 | 20 |
| 42 | 43 |
| 44 | 33 |
| 52 | 56 |
| 51 | 50 |
| 53 | 67 |
| 66 | 73 |
| 56 | 68 |
| 60 | 77 |
| 37 | 43 |
(i) Obtain the product moment correlation between y and x and comment on it.
(ii) Obtain the regression line of y on x, correct to 3 decimal places.
(iii) Given that the regression coefficient for x on y is 0.66, show by calculation that this line is x=0.66y+13.02.
(iv) Tom missed the French test but scored 65 in English. Predict a suitable French mark and comment on its reliability.
CJC · Lecture · Example 8
Transform both variables without changing correlation
After a school physical fitness test, ten pupils have the following masses m (kg) and overall scores s.
| Pupil | m | s |
|---|---|---|
| A | 38.6 | 60 |
| B | 41.8 | 58 |
| C | 38.6 | 72 |
| D | 54.1 | 59 |
| E | 44.9 | 62 |
| F | 32.1 | 94 |
| G | 38.4 | 86 |
| H | 41.4 | 62 |
| I | 30.2 | 81 |
| J | 52.4 | 54 |
(i) Calculate the product moment correlation coefficient between m and s for this sample.
(ii) Given u=10(m−30) and v=s−50, calculate the product moment correlation coefficient between u and v for this sample.
CJC · Lecture · Example 9
Fit a straight line to logarithms of both variables
A researcher gave eight children lists of words of varying difficulty and asked each child to define them. The ages x (years) and numbers of correctly defined words y are:
| Child | x | y |
|---|---|---|
| A | 2.5 | 9 |
| B | 3.1 | 13 |
| C | 4.3 | 18 |
| D | 5.0 | 25 |
| E | 5.9 | 35 |
| F | 7.1 | 53 |
| G | 8.1 | 81 |
| H | 9.4 | 132 |
(i) Sketch the scatter diagram and comment on whether a linear regression of y on x is suitable.
(ii) Calculate the product moment correlation coefficient between lny and lnx. Comment on the suitability of lny=a+blnx.
(iii) Find the least-squares regression of lny on lnx. Sketch it on the scatter diagram of lny against lnx.
CJC · Lecture · Example 10