Exercises: Regression line
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$.
A study on study habits in Year 12 analyses the relationship between the number of weekly hours spent reading, $X$, and the mark obtained in the Spanish exam, $Y$. The…
A study on study habits in Year 12 analyses the relationship between the number of weekly hours spent reading, $X$, and the mark obtained in the Spanish exam, $Y$. The regression line of $Y$ on $X$ is:
$y = 0.65x + 3.2$
- a) Justify whether the correlation between both variables is positive or negative.
- b) If a student spends $8$ weekly hours reading, what mark is estimated for them in the exam?
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$.
- a) What are the coordinates of the centre of gravity of this distribution?
- 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 centre of gravity.
Indicate, for each of the following pairs of variables, whether you expect them to have positive, negative, or zero correlation: 1. The number of kilometres driven by a…
Indicate, for each of the following pairs of variables, whether you expect them to have positive, negative, or zero correlation:
-
The number of kilometres driven by a car and the fuel remaining in its tank.
-
A person's height and their mark in the Mathematics exam.
-
A family's monthly income and their expenditure on leisure and culture.
-
The daily training time of an athlete and their personal best time in a race.
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.
The charging time of a mobile phone battery ($X$, in minutes) and the percentage of charge reached ($Y$, in %) have been measured. The results are shown in the following…
The charging time of a mobile phone battery ($X$, in minutes) and the percentage of charge reached ($Y$, in %) have been measured. The results are shown in the following graph:
If the equation of the orange line is $y = 1.5x + 5$:
- a) Estimate the percentage of charge after $60$ minutes.
- b) Is it a functional or statistical relationship? Justify your answer by observing the position of the points relative to the line.
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$ |
- a) Calculate the centre of gravity $(\bar{x}, \bar{y})$.
- 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.
You can do it on paper and send a photo with your answer.
A courier company knows that the cost of a shipment, $Y$ (in euros), depends on the weight of the parcel, $X$ (in kg), according to the regression line $y = 2.5x + 5$.…
A courier company knows that the cost of a shipment, $Y$ (in euros), depends on the weight of the parcel, $X$ (in kg), according to the regression line $y = 2.5x + 5$.
If the correlation coefficient is $r = 0.98$, which of the following statements is correct?
-
For every kilogram increase in weight, the cost increases by exactly $2.5$ euros.
-
Predictions made for parcels of a similar weight to those studied will be very reliable.
-
If a parcel weighs $0$ kg, the cost will necessarily be $0$ euros.
-
The relationship between weight and cost is inverse.
A group of 5th Year 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…
A group of 5th Year 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 centre 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$.
A courier company analysed 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 analysed 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 kilometres should they cover according to the regression line of $X$ on $Y$?
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.
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 mark):
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 centre of gravity of the distribution, calculate the mean hours of sleep ($\bar{x}$) and the students' average mark ($\bar{y}$).
b) Calculate the linear correlation coefficient $r$ from the gradients of both lines.
c) State with reasoning whether the correlation is positive or negative and whether it is strong or weak.
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?
A study has been carried out on the relationship between the price of a monthly subscription to a music platform ($X$, in euros) 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 euros) 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? Reason your answer.
A pet adoption centre 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 centre 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).
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:
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.
In a study on the performance of a new cryptocurrency, the variables $X$ (advertising expenditure in thousands of euros) 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 euros) and $Y$ (daily transaction volume in millions of euros) have been analysed. 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:
-
The centre of gravity of the distribution $(\bar{x}, \bar{y})$.
-
Pearson's linear correlation coefficient ($r$).
-
If an advertising expenditure of $15\,000$ € is intended, what would be the expected transaction volume? Justify the reliability of this prediction based on the coefficient of determination.
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:
-
The covariance $s_{xy}$ and the correlation coefficient $r$.
-
The regression line of $Y$ on $X$.
-
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.
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)$.
-
Calculate Pearson's correlation coefficient.
-
Determine the variance of variable $Y$ if we know that the standard deviation of $X$ is $s_x = 2.5$.
-
Find the equation of the regression line of $X$ on $Y$ if we know that the centroid is $(\bar{x}, \bar{y}) = (4, 8)$.
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 realise that the sales data were recorded without VAT (21%).
If we define a new variable $Y' = 1.21Y$ to include the tax:
-
What will be the new equation of the regression line of $Y'$ on $X$?
-
How will the original Pearson correlation coefficient be affected? Justify your answer based on the properties of linear transformations in statistics.
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$.
-
Calculate the coefficient of determination $R^2$ and interpret the percentage of the variance in income that is explained by the level of education.
-
If an individual has an education level of $X=5$ and their actual income is $3\,200$ €, calculate the prediction error (residual) made by the line.
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$.
-
Calculate the regression line of $Y$ on $X$.
-
Calculate the regression line of $X$ on $Y$.
-
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.
The grades of 50 students in Economics ($X$) and Geography ($Y$) have a mean of 6.5 in both subjects. The variance in Economics is 4 and in Geography it 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 in Economics is 4 and in Geography it is 2,25. It is known that the correlation coefficient is $r = 0.8$.
- a) If a student has obtained a 4 in Economics, estimate their grade in Geography.
- b) If another student has obtained a 9 in Geography, estimate their grade in Economics using the appropriate regression line.
- c) Compare both estimates and explain why the same line cannot be used for both cases if we want to minimize the mean squared error.
Given the following scatter plot of 12 cars for the variables $X$ (age of a car in years) and $Y$ (market value in thousands of euros), the regression line of $Y$ on…
Given the following scatter plot of 12 cars for the variables $X$ (age of a car in years) and $Y$ (market value in thousands of euros), the regression line of $Y$ on $X$, calculated with all 12 points, has been drawn; its equation is $y = -0.88x + 14.59$. Note that there is an outlier at the coordinates $(1, 2)$.
- a) If we remove that point from the data set, what would you expect to happen to the absolute value of the correlation coefficient? And to the slope of the regression line? Justify your answer.
- b) Using the given regression line, $y = -0.88x + 14.59$, calculate the estimated value for a 10-year-old car and discuss whether it is appropriate to use this model for cars older than 15 years.