Back to homeMathematics · High School Year 2 · Social Sciences · Change subject
Start for free
Notes

Exercises: Regression line

Practice★☆☆
Observe the following scatter diagrams representing the relationship between two statistical variables. Match, giving reasons, each of the values of Pearson's…

Observe the following scatter diagrams representing the relationship between two statistical variables. Match, giving reasons, each of the values of Pearson's correlation coefficient, $r$, with its corresponding graph:

Values of $r$: $0.95$; $-0.85$; $0.05$.

x y Graph A x y Graph B x y Graph C
Solve
Practice★☆☆
A study on study habits in 12th grade analyzes the relationship between the number of weekly hours spent reading, $X$, and the grade obtained on the Spanish exam, $Y$.…

A study on study habits in 12th grade analyzes the relationship between the number of weekly hours spent reading, $X$, and the grade obtained on the Spanish exam, $Y$. The regression line of $Y$ on $X$ is:

$y = 0.65x + 3.2$

  1. a) Justify whether the correlation between both variables is positive or negative.
  2. b) If a student spends $8$ weekly hours reading, what grade is estimated for them on the exam?
Solve
Practice★☆☆
In a bivariate distribution, it is known that the mean of variable $X$ is $\bar{x} = 12$ and the mean of variable $Y$ is $\bar{y} = 15$. a) What are the coordinates of…

In a bivariate distribution, it is known that the mean of variable $X$ is $\bar{x} = 12$ and the mean of variable $Y$ is $\bar{y} = 15$.

  1. a) What are the coordinates of the center of gravity of this distribution?
  2. b) If the regression line of $Y$ on $X$ is $y = 0.8x + a$, calculate the value of the y-intercept $a$ knowing that the line must pass through the center of gravity.
Solve
Practice★☆☆
Indicate, for each of the following pairs of variables, whether you expect them to have positive, negative, or zero correlation: 1. The number of kilometers driven by a…

Indicate, for each of the following pairs of variables, whether you expect them to have positive, negative, or zero correlation:

  1. The number of kilometers driven by a car and the fuel remaining in its tank.

  2. A person's height and their grade on the math exam.

  3. A family's monthly income and their expenditure on leisure and culture.

  4. The daily training time of an athlete and their personal best time in a race.

Solve
Practice★☆☆
A nutritionist analyses the relationship between the weight of a group of teenagers ($X$, in kg) and their height ($Y$, in cm). The collected data have a correlation…

A nutritionist analyses the relationship between the weight of a group of teenagers ($X$, in kg) and their height ($Y$, in cm). The collected data have a correlation coefficient of $r = 0.92$ and the regression line is $y = 1.4x + 85$.

Explain the meaning of the gradient ($1.4$) in the context of the problem and assess the reliability of the predictions made using this line.

Solve
Practice★☆☆
The charging time of a cell phone battery ($X$, in minutes) and the charge percentage reached ($Y$, in %) have been measured. The results are shown in the following…

The charging time of a cell phone battery ($X$, in minutes) and the charge percentage reached ($Y$, in %) have been measured. The results are shown in the following graph:

10 20 30 40 50 60 20 40 60 80 100 0 X (min) Y (%)

If the equation of the orange line is $y = 0.5x + 10$:

  1. a) Estimate the charge percentage after $60$ minutes.
  2. b) Is it a deterministic (functional) or statistical relationship? Explain your answer by observing the position of the points relative to the line.
Solve
Practice★☆☆
Given the following table of values for a bivariate variable: | $X$ | $2$ | $4$ | $6$ | $8$ | | :--- | :---: | :---: | :---: | :---: | | $Y$ | $10$ | $18$ | $22$ | $30$…

Given the following table of values for a bivariate variable:

$X$ $2$ $4$ $6$ $8$
$Y$ $10$ $18$ $22$ $30$
  1. a) Calculate the center of gravity $(\bar{x}, \bar{y})$.
  2. b) Plot the points in a small hand-drawn scatter diagram and deduce the sign of the covariance $\sigma_{xy}$ without carrying out the full calculation.
Solve
Practice★☆☆
A courier company knows that the cost of a shipment, $Y$ (in pesos), depends on the weight of the package, $X$ (in kg), according to the regression line $y = 50x + 100$.…

A courier company knows that the cost of a shipment, $Y$ (in pesos), depends on the weight of the package, $X$ (in kg), according to the regression line $y = 50x + 100$.

If the correlation coefficient is $r = 0.98$, which of the following statements is correct?

  1. For every kilogram increase in weight, the cost increases by exactly $50$ pesos.

  2. Predictions made for packages of a similar weight to those studied will be very reliable.

  3. If a package weighs $0$ kg, the cost will necessarily be $0$ pesos.

  4. The relationship between weight and cost is inverse.

Solve
Practice★★☆
A group of 1st Bachillerato students has conducted a study on the relationship between the daily time (in hours) spent using a popular short-video social network ($X$)…

A group of 1st Bachillerato students has conducted a study on the relationship between the daily time (in hours) spent using a popular short-video social network ($X$) and the battery percentage remaining on their mobile at the end of the day ($Y$). The data obtained from 6 classmates are as follows:

Hours of use ($X$) 1.5 2 3 3.5 4 5
% Battery ($Y$) 75 68 50 45 32 20

a) Calculate the center of gravity of the distribution $(\bar{x}, \bar{y})$.

b) Find the covariance $\sigma_{xy}$ and the linear correlation coefficient $r$. Interpret the result obtained regarding the sign and the strength of the relationship.

c) Determine the equation of the regression line of $Y$ on $X$.

d) If a student uses the social network for 2.5 hours, what battery percentage is estimated to remain? Is this prediction reliable? Justify your answer based on the coefficient of determination $r^2$.

1 2 3 4 5 6 20 40 60 80 100 Hours of use (X) % Battery (Y) 2.5 ? (x̄, ȳ) Actual data Regression Prediction
Solve
Practice★★☆
A courier company analyzed the relationship between the distance covered (in km) by its bicycle delivery riders ($X$) and the number of calories burned according to…

A courier company analyzed the relationship between the distance covered (in km) by its bicycle delivery riders ($X$) and the number of calories burned according to their smart devices ($Y$). After calculating the statistical parameters, the following values were obtained:

$\bar{x} = 15 \text{ km}$; $\bar{y} = 480 \text{ kcal}$

$\sigma_x = 4.2$; $\sigma_y = 120$

$\sigma_{xy} = 453.6$

a) Calculate the linear correlation coefficient and state what type of dependency exists between the variables.

b) Find the regression line of calories burned ($Y$) as a function of the distance covered ($X$).

c) How many calories is a delivery rider who covers 22 km estimated to burn?

d) If a delivery rider wishes to burn approximately 600 kcal, how many kilometers should they cover according to the regression line of $X$ on $Y$?

Solve
Practice★★☆
A survey has been conducted among a group of teenagers on the number of followers they have on a platform ($X$, in hundreds) and the average number of likes they receive…

A survey has been conducted among a group of teenagers on the number of followers they have on a platform ($X$, in hundreds) and the average number of likes they receive per post ($Y$). The data are summarised in the following table:

Followers ($X$) 2 4 6 8 10
Likes ($Y$) 45 92 135 180 220

a) Plot the scatter diagram and sketch the regression line freehand.

b) Calculate the coefficients of the regression line $y = mx + n$.

c) What is the physical meaning of the gradient $m$ in this context?

d) Calculate the coefficient of determination $r^2$ and explain what percentage of the variation in likes is explained by the number of followers.

Solve
Practice★★☆
In a study on sleep habits and academic performance, the following regression lines were obtained for the variables $X$ (daily hours of sleep) and $Y$ (average term…

In a study on sleep habits and academic performance, the following regression lines were obtained for the variables $X$ (daily hours of sleep) and $Y$ (average term grade):

Regression line of $Y$ on $X$: $y = 0.65x + 3.2$

Regression line of $X$ on $Y$: $x = 1.15y - 0.45$

a) Knowing that both lines intersect at the center of gravity of the distribution, calculate the mean hours of sleep ($\bar{x}$) and the students' average grade ($\bar{y}$).

b) Calculate the linear correlation coefficient $r$ from the slopes of both lines.

c) State with reasoning whether the correlation is positive or negative and whether it is strong or weak.

X (Hours of sleep) Y (Average grade) 0 5 10 15 20 5 10 15 y = 0.65x + 3.2 x = 1.15y - 0.45 G(x̄, ȳ) x̄ ȳ
Solve
Practice★★☆
An athletics coach analyses the relationship between the height of his athletes in cm ($X$) and their stride length in cm ($Y$). The data for 5 athletes are: (160, 110),…

An athletics coach analyses the relationship between the height of his athletes in cm ($X$) and their stride length in cm ($Y$). The data for 5 athletes are: (160, 110), (170, 120), (175, 125), (180, 132) and (190, 145).

a) Obtain the regression line of $Y$ on $X$.

b) What stride length would be expected for an athlete who is 185 cm tall?

c) Calculate the prediction error (residual) for the athlete who is 180 cm tall. The error is defined as the difference between the actual value and the value estimated by the line: $e = y_i - \hat{y}_i$.

d) If the correlation coefficient were $r = 0.98$, what could you state about the reliability of the coach's predictions?

Solve
Practice★★☆
A study has been carried out on the relationship between the price of a monthly subscription to a music platform ($X$, in pesos) and the number of hours users listen to…

A study has been carried out on the relationship between the price of a monthly subscription to a music platform ($X$, in pesos) and the number of hours users listen to music per month ($Y$). It is known that:

  • The variance of $X$ is $\sigma_x^2 = 4$.

  • The variance of $Y$ is $\sigma_y^2 = 25$.

  • The regression line of $Y$ on $X$ is $y = -1.2x + 42$.

a) Determine the covariance $\sigma_{xy}$ between both variables.

b) Calculate the linear correlation coefficient $r$.

c) How would the correlation coefficient change if we decided to express listening time in minutes instead of hours? Justify your answer.

Solve
Practice★★☆
A pet adoption center wants to predict the time it takes for a dog to be adopted ($Y$, in days) based on its age ($X$, in years). They have collected data from 10 dogs…

A pet adoption center wants to predict the time it takes for a dog to be adopted ($Y$, in days) based on its age ($X$, in years). They have collected data from 10 dogs and obtained a correlation of $r = 0.85$. The mean age is 4 years and the mean number of days until adoption is 25 days. The standard deviation of age is 2 years and that of the days is 10 days.

a) Find the equation of the regression line.

b) Estimate how long it will take for a 0.5-year-old puppy to be adopted.

c) Estimate how long it will take for a 12-year-old senior dog.

d) Of the two previous estimates, indicate which is more reliable and why, taking into account the range of the original data (ages between 1 and 8 years).

Solve
Practice★★☆
Observe the following scatter diagram relating R&D investment ($X$) and annual net profit ($Y$) of several technology companies: Knowing that the regression line is…

Observe the following scatter diagram relating R&D investment ($X$) and annual net profit ($Y$) of several technology companies:

0 R&D Investment (X) Net Profit (Y)

Knowing that the regression line is $y = 2.5x + 10$ and that the correlation coefficient is $r = 0.92$:

a) State, giving reasons, whether there is a strong relationship between investment and profits.

b) If a company invests nothing in R&D ($x = 0$), according to the model, what would its estimated profit be? Does this value make sense in reality?

c) Explain what would happen to the gradient of the line if the correlation coefficient were negative.

d) If we multiply all the profit values by 2, how would the value of the correlation coefficient $r$ change? Justify your answer.

Solve
Practice★★★
In a study on the performance of a new cryptocurrency, the variables $X$ (advertising expenditure in thousands of pesos) and $Y$ (daily transaction volume in millions of…

In a study on the performance of a new cryptocurrency, the variables $X$ (advertising expenditure in thousands of pesos) and $Y$ (daily transaction volume in millions of pesos) have been analyzed. After processing the data, the equations of the two regression lines have been obtained:

  • Regression line of $Y$ on $X$: $y = 0.85x + 1.24$

  • Regression line of $X$ on $Y$: $x = 0.92y - 0.15$

Determine with reasoning:

  1. The center of gravity of the distribution $(\bar{x}, \bar{y})$.

  2. Pearson's linear correlation coefficient ($r$).

  3. If an advertising expenditure of $15\,000$ pesos is intended, what would be the expected transaction volume? Justify the reliability of this prediction based on the coefficient of determination.

2 4 6 8 10 12 2 4 6 8 x̄ ȳ G(x̄, ȳ) y = 0.85x + 1.24 Y on X x = 0.92y - 0.15 X on Y Advertising expenditure (X) Transaction volume (Y)
Solve
Practice★★★
A sociologist analyses the relationship between weekly time spent watching television ($X$, in hours) and concentration ability in a specific test ($Y$, scale from 0 to…

A sociologist analyses the relationship between weekly time spent watching television ($X$, in hours) and concentration ability in a specific test ($Y$, scale from 0 to 100). Data from 10 teenagers yielded the following partial results:

$\sum x_i = 150$; $\sum y_i = 620$; $\sum x_i^2 = 2\,850$; $\sum y_i^2 = 41\,500$; $\sum x_iy_i = 8\,400$.

Find:

  1. The covariance $s_{xy}$ and the correlation coefficient $r$.

  2. The regression line of $Y$ on $X$.

  3. A student spends 40 hours per week watching television. Calculate their estimated score on the test. Analyse whether this estimate is an interpolation or an extrapolation and discuss its real validity in the context of the problem.

Solve
Practice★★★
Given a bivariate distribution where the coefficient of determination is $R^2 = 0.81$, it is known that the regression line of $Y$ on $X$ has a positive slope and passes…

Given a bivariate distribution where the coefficient of determination is $R^2 = 0.81$, it is known that the regression line of $Y$ on $X$ has a positive slope and passes through the points $(2, 5)$ and $(6, 11)$.

Regression line of Y on X with known points and centroidXY024682581114Regression line: Y on X(2, 5)(6, 11)(x̄, ȳ) = (4, 8)R² = 0.81sx = 2.5
  1. Calculate Pearson's correlation coefficient.

  2. Determine the variance of variable $Y$ if we know that the standard deviation of $X$ is $s_x = 2.5$.

  3. Find the equation of the regression line of $X$ on $Y$ if we know that the centroid is $(\bar{x}, \bar{y}) = (4, 8)$.

Solve
Practice★★★
A marketing team studies the relationship between the likes obtained on an Instagram post ($X$) and the sales generated for a product ($Y$). They have observed that the…

A marketing team studies the relationship between the likes obtained on an Instagram post ($X$) and the sales generated for a product ($Y$). They have observed that the regression line of $Y$ on $X$ is $y = 0.04x + 150$. However, they realize that the sales data were recorded without tax (21%).

If we define a new variable $Y' = 1.21Y$ to include the tax:

  1. What will be the new equation of the regression line of $Y'$ on $X$?

  2. How will the original Pearson correlation coefficient be affected? Justify your answer based on the properties of linear transformations in statistics.

Solve
Practice★★★
In a contingency table relating level of education ($X$) and income ($Y$) for a sample, some data have been lost. We know the following parameters: $\bar{x} = 3$;…

In a contingency table relating level of education ($X$) and income ($Y$) for a sample, some data have been lost. We know the following parameters:

$\bar{x} = 3$; $\bar{y} = 2\,400$; $s_x^2 = 1.2$; $s_y^2 = 160\,000$ and the regression line of $Y$ on $X$ is $y = 300x + 1\,500$.

  1. Calculate the coefficient of determination $R^2$ and interpret the percentage of the variance in income that is explained by the level of education.

  2. If an individual has an education level of $X=5$ and their actual income is $3\,200$ pesos, calculate the prediction error (residual) made by the line.

1 2 3 4 5 6 1500 2000 2500 3000 3500 Level of education (X) Income (Y) y = 300x + 1500 Residual = 200 Center of gravity (3, 2400) Prediction (5, 3000) Actual value (5, 3200)
Solve
Practice★★★
The relationship between the number of daily sunshine hours ($X$) and the electricity consumption for heating ($Y$) in a large office over 12 months is analysed. The…

The relationship between the number of daily sunshine hours ($X$) and the electricity consumption for heating ($Y$) in a large office over 12 months is analysed. The data are summarised in:

$\bar{x} = 9$; $\bar{y} = 450$; $s_x = 3.2$; $s_y = 85$ and $s_{xy} = -210$.

  1. Calculate the regression line of $Y$ on $X$.

  2. Calculate the regression line of $X$ on $Y$.

  3. Explain the meaning of the sign of the covariance in this context and determine what percentage of the variability in electricity consumption does not depend on the hours of sunshine.

Solve
Practice★★★
The grades of 50 students in Economics ($X$) and Geography ($Y$) have a mean of 6.5 in both subjects. The variance of Economics is 4 and that of Geography is 2.25. It is…

The grades of 50 students in Economics ($X$) and Geography ($Y$) have a mean of 6.5 in both subjects. The variance of Economics is 4 and that of Geography is 2.25. It is known that the correlation coefficient is $r = 0.8$.

  1. If a student scored 4 in Economics, estimate their grade in Geography.

  2. If another student scored 9 in Geography, estimate their grade in Economics using the relevant regression line.

  3. Compare both estimates and explain why the same line cannot be used for both cases if we want to minimize the mean squared error.

Economics (X) Geography (Y) 2 4 6 8 10 0 2 4 6 8 10 x=4 y=5 y=9 x≈9.17 (6,5, 6.5) Center of gravity Regression Y on X Regression X on Y
Solve
Practice★★★
Given the following scatter plot corresponding to the variables $X$ (age of a car in years) and $Y$ (market value in thousands of pesos), the regression line of $Y$ on…

Given the following scatter plot corresponding to the variables $X$ (age of a car in years) and $Y$ (market value in thousands of pesos), the regression line of $Y$ on $X$ has been drawn. It is observed that an outlier exists at the coordinates $(1, 40)$.

  1. If we remove this point from the dataset, what would you expect to happen to the absolute value of the correlation coefficient? And to the slope of the regression line?

  2. If the original line is $y = -30x + 400$, calculate the estimated value for a 10-year-old car and discuss the suitability of using this model for cars over 15 years old.

x > 15 (Not valid) Age X (years) Value Y (thousands of $) 0 2 4 6 8 10 12 14 16 100 200 300 400 y = −30x + 400 Estimate (10, 100) Outlier (1, 40)
Solve