Exercises: Regression line and parameters
A nutritionist studies the relationship between the grams of sugar ($X$) and the kilocalories ($Y$) of five types of energy bar. She has obtained the following marginal…
A nutritionist studies the relationship between the grams of sugar ($X$) and the kilocalories ($Y$) of five types of energy bar. She has obtained the following marginal parameters:
-
Mean sugar: $\bar{x} = 12$ g
-
Mean energy: $\bar{y} = 210$ kcal
-
Standard deviations: $\sigma_x = 3$ g and $\sigma_y = 25$ kcal
-
Covariance: $\sigma_{xy} = 60$
Calculate the linear correlation coefficient ($r$) and interpret whether there is a strong relationship between both variables.
In a study on physical performance, the resting heart rate ($X$) and the time in seconds taken to recover normal heart rate after exertion ($Y$) are measured. It is…
In a study on physical performance, the resting heart rate ($X$) and the time in seconds taken to recover normal heart rate after exertion ($Y$) are measured. It is known that the sum of the products of the variables is $\sum x_i y_i = 15200$, the number of individuals is $n = 10$, and the means are $\bar{x} = 70$ and $\bar{y} = 20$.
Use the simplified formula $\sigma_{xy} = \frac{\sum x_i y_i}{n} - \bar{x} \bar{y}$ to calculate the covariance. What does the sign of the result indicate about the relationship between heart rate and recovery time?
If the coefficient of determination of a bivariate distribution is $R^2 = 0.81$, calculate the value of the correlation coefficient $r$ (assuming the relationship is…
If the coefficient of determination of a bivariate distribution is $R^2 = 0.81$, calculate the value of the correlation coefficient $r$ (assuming the relationship is positive) and explain what percentage of the variation in variable $Y$ is explained by variable $X$.
The 'centre of gravity' of a bivariate distribution is the point formed by the means of both variables, denoted as $(\bar{x}, \bar{y})$. A group of friends recorded the…
The 'centre of gravity' of a bivariate distribution is the point formed by the means of both variables, denoted as $(\bar{x}, \bar{y})$. A group of friends recorded the time they spend on social media per day ($X$, in minutes) and the hours they sleep each night ($Y$, in hours):
$(45, 9), (60, 8.5), (90, 8), (120, 7), (150, 6.5)$
Calculate the coordinates of the centre of gravity of this distribution.
Observe the following scatter diagram representing the relationship between the advertising expenditure of 8 small businesses and their monthly profits (both in…
Observe the following scatter diagram representing the relationship between the advertising expenditure of 8 small businesses and their monthly profits (both in thousands of euros).
- a) Justify, without performing calculations, whether the sign of the covariance will be positive or negative.
- b) Choose with reasoning which of the following values could be Pearson's correlation coefficient ($r$): $-0.85$; $0.12$; $0.91$; $1.5$.
- c) What would happen to the value of $r$ if we decided to express the data in euros instead of thousands of euros?
An online film archive wants to check whether there is a relationship between the number of instalments in a film franchise ($X$) and the average viewers' rating (out of…
An online film archive wants to check whether there is a relationship between the number of instalments in a film franchise ($X$) and the average viewers' rating (out of 10 points, $Y$). The following parameters are available after analysing 50 franchises:
$\sum x_i = 150 \quad \sum y_i = 325 \quad \sum x_i^2 = 580 \quad \sum y_i^2 = 2200 \quad \sum x_i y_i = 940$
- a) Calculate the covariance $\sigma_{xy}$.
- b) Interpret the result obtained in the context of the problem: do longer franchises tend to have better or worse ratings?
During basketball practice, the distance to the basket in metres ($X$) and the number of baskets scored out of 10 attempts ($Y$) are recorded for a group of players. The…
During basketball practice, the distance to the basket in metres ($X$) and the number of baskets scored out of 10 attempts ($Y$) are recorded for a group of players. The summary data are:
$\bar{x} = 4.5 \text{ m} \quad \sigma_x = 1.2 \text{ m}$
$\bar{y} = 6 \text{ baskets} \quad \sigma_y = 1.8 \text{ baskets}$
$\sigma_{xy} = -1.944$
- a) Calculate Pearson's correlation coefficient and interpret its strength and direction.
- b) Calculate the coefficient of determination $r^2$ and explain what percentage of the variation in successful shots is explained by the distance to the basket.
The relationship between a family's weekly food expenditure ($X$) and their weekly income ($Y$), both in euros, has been studied. The following data have been obtained:…
The relationship between a family's weekly food expenditure ($X$) and their weekly income ($Y$), both in euros, has been studied. The following data have been obtained:
$\bar{x} = 180, \quad \sigma_x^2 = 900, \quad \bar{y} = 600, \quad \sigma_y^2 = 2500, \quad \sigma_{xy} = 1200$
- a) Find the equation of the regression line of $Y$ on $X$.
- b) If a family spends 250 € on food, what would their estimated income be according to the model?
- c) Is this prediction reliable? Justify your answer by calculating the correlation coefficient.
A farmer observes that the yield of his orange crop depends on the hours of sunshine received during the ripening stage. The regression lines obtained from historical…
A farmer observes that the yield of his orange crop depends on the hours of sunshine received during the ripening stage. The regression lines obtained from historical data are:
Regression line of $Y$ on $X$: $y = 0.85x + 12$
Regression line of $X$ on $Y$: $x = 0.92y - 4$
- a) Determine the centre of gravity $(\bar{x}, \bar{y})$ of the distribution.
- b) Calculate Pearson's correlation coefficient from the gradients of the two regression lines.
The relationship between the price of a plane ticket ($X$) and how far in advance it is bought in days ($Y$) is analysed. It is known that the correlation is…
The relationship between the price of a plane ticket ($X$) and how far in advance it is bought in days ($Y$) is analysed. It is known that the correlation is $r = -0.82$.
If the standard deviations are $\sigma_x = \text{€}\ 45$ and $\sigma_y = 12 \text{ days}$, and the means are $\bar{x} = \text{€}\ 150$ and $\bar{y} = 25 \text{ days}$:
- a) Calculate the covariance of the distribution.
- b) Calculate the regression line of $X$ on $Y$ to estimate the price of the ticket as a function of the number of days in advance.
- c) What price would be estimated for a ticket bought 40 days in advance?
A survey has been conducted on the number of children ($X$) and the number of bedrooms in the property ($Y$) in a block of flats. The results are presented in the…
A survey has been conducted on the number of children ($X$) and the number of bedrooms in the property ($Y$) in a block of flats. The results are presented in the following joint frequency table (two-way table):
| $X \setminus Y$ | 1 | 2 | 3 |
|---|---|---|---|
| 0 | 5 | 3 | 0 |
| 1 | 2 | 8 | 4 |
| 2 | 0 | 3 | 10 |
-
Obtain the marginal distributions of $X$ and $Y$.
-
Calculate the marginal mean number of children ($\bar{x}$) and the marginal mean number of bedrooms ($\bar{y}$).
-
Is there a dependency between both variables? Reason your answer by observing the frequencies in the table.
The two regression lines of a bivariate variable are: Regression line of $Y$ on $X$: $y = 0.85x + 12.4$ Regression line of $X$ on $Y$: $x = 0.72y + 5.1$ Knowing that the…
The two regression lines of a bivariate variable are:
-
Regression line of $Y$ on $X$: $y = 0.85x + 12.4$
-
Regression line of $X$ on $Y$: $x = 0.72y + 5.1$
Knowing that the variance of the variable $X$ is $s_x^2 = 16$, calculate:
-
Pearson's correlation coefficient $r$.
-
The covariance $s_{xy}$ of the distribution.
-
The coordinates of the centre of gravity $(\bar{x}, \bar{y})$.
A music streaming app analyses the relationship between the age of its users ($X$) and the number of different artists they listen to per month ($Y$). The following…
A music streaming app analyses the relationship between the age of its users ($X$) and the number of different artists they listen to per month ($Y$). The following summations are known for a sample of $n = 10$ users:
$$\sum x_i = 240 \quad \sum y_i = 150 \quad \sum x_i^2 = 6200 \quad \sum y_i^2 = 2850 \quad \sum x_i y_i = 3100$$-
Calculate Pearson's correlation coefficient.
-
Determine the coefficient of determination $R^2$ and interpret its meaning: what percentage of the variation in the number of artists listened to is explained by the user's age?
In a study of the real estate market in a coastal city, the equations of the two regression lines relating the selling price of apartments, $Y$ (in hundreds of thousands…
In a study of the real estate market in a coastal city, the equations of the two regression lines relating the selling price of apartments, $Y$ (in hundreds of thousands of euros), to their floor area, $X$ (in square metres), have been obtained:
-
Line of $Y$ on $X$: $y = 0.012x + 0.5$
-
Line of $X$ on $Y$: $x = 65y - 20$
In the figure you can see both lines plotted.
Determine, with justification:
- a) The centroid of the distribution $(\bar{x}, \bar{y})$.
- b) Pearson's linear correlation coefficient, $r$, and interpret its sign and strength.
- c) If an apartment has a floor area of $120$ $m^2$, what would its estimated price be? Is this estimate reliable? Justify your answer using the coefficient of determination.
In a language academy, the relationship between weekly hours of personal study ($X$) and final exam score ($Y$) for a group of students has been observed. The joint…
In a language academy, the relationship between weekly hours of personal study ($X$) and final exam score ($Y$) for a group of students has been observed. The joint frequency table is as follows, where three values have been lost ($a, b, c$):
| $X \setminus Y$ | $40$ | $60$ | $80$ | Total $n_i$ |
|---|---|---|---|---|
| $2$ | $4$ | $2$ | $0$ | $a$ |
| $5$ | $1$ | $b$ | $3$ | $10$ |
| $8$ | $0$ | $1$ | $5$ | $c$ |
| Total $n_j$ | $5$ | $9$ | $8$ | $22$ |
- a) Calculate the values of $a, b$ and $c$.
- b) Determine the marginal distribution of variable $Y$ and calculate its mean and variance.
- c) Calculate the mean exam score ($Y$) conditional on the students studying $5$ hours per week ($X=5$).
A sociologist studies the relationship between the age at which young people leave home ($X$) and the per capita income level of their region ($Y$). When plotting the…
A sociologist studies the relationship between the age at which young people leave home ($X$) and the per capita income level of their region ($Y$). When plotting the scatter diagram, he/she observes that the mean point (centre of gravity) is $G(28, 1400)$. One of the regression lines is $y = -50x + 2800$. Given that the variance of age is $s_x^2 = 9$ and the variance of income is $s_y^2 = 360,000$:
- a) Calculate the covariance $s_{xy}$ and the linear correlation coefficient.
- b) Find the equation of the regression line of $X$ on $Y$.
- c) Determine the angle formed by both regression lines. Does this angle alone allow you to claim that the correlation is strong? Justify your answer by comparing it with the value of $r$.
Two variables $X$ and $Y$ have marginal standard deviations $s_x = 4$ and $s_y = 6$. It is known that the two regression lines are perpendicular to each other. a) What…
Two variables $X$ and $Y$ have marginal standard deviations $s_x = 4$ and $s_y = 6$. It is known that the two regression lines are perpendicular to each other.
- a) What is the value of the covariance $s_{xy}$ and the correlation coefficient $r$?
- b) What does this result imply for the predictive capability of the linear model?
- c) If we were to add a new point $(x, y)$ to the distribution that coincided exactly with the mean point, would the value of the correlation coefficient change? Reason your answer.
For a two-variable distribution, it has been verified that the standard deviations of both variables are equal ($s_x = s_y$). a) Prove algebraically that, in this case,…
For a two-variable distribution, it has been verified that the standard deviations of both variables are equal ($s_x = s_y$).
- a) Prove algebraically that, in this case, the linear correlation coefficient coincides with the slope of the regression line of $Y$ on $X$.
- b) If the regression line of $Y$ on $X$ is $y = 0.6x + 2$, what is the coefficient of determination?
- c) What would be the slope of the regression line of $X$ on $Y$ under these conditions?
Given the regression lines $y = -2x + 10$ and $x = -0.4y + 4$, decide whether the following statements are true or false, proving your answer by calculating the…
Given the regression lines $y = -2x + 10$ and $x = -0.4y + 4$, decide whether the following statements are true or false, proving your answer by calculating the corresponding parameters:
- a) The correlation between the variables is positive because both slopes have the same sign.
- b) The centroid of the distribution is the point $(3, 4)$.
- c) The variables have a perfect functional dependence.
- d) The variance of $Y$ is greater than the variance of $X$.
The heights of a sample of couples (man, woman) have been organised into the following two-way table (data in cm): | Man ($X$) \ Woman ($Y$) | [150, 160) | [160, 170) |…
The heights of a sample of couples (man, woman) have been organised into the following two-way table (data in cm):
| Man ($X$) \ Woman ($Y$) | [150, 160) | [160, 170) | [170, 180) |
|---|---|---|---|
| [165, 175) | 4 | 2 | 0 |
| [175, 185) | 1 | 6 | 3 |
| [185, 195) | 0 | 2 | 5 |
Using the class midpoints:
- a) Calculate the covariance of the distribution.
- b) Calculate Pearson's correlation coefficient.
- c) Is there a strong relationship between the heights of the partners in this sample?
A Mathematics retake exam has been given. It is observed that the relationship between the scores on the first exam ($X$) and those on the second ($Y$) follows a linear…
A Mathematics retake exam has been given. It is observed that the relationship between the scores on the first exam ($X$) and those on the second ($Y$) follows a linear trend. It is known that:
-
$\bar{x} = 4$; $\bar{y} = 6$
-
The two regression lines intersect forming a very small angle, and the product of the regression coefficients, $b_{yx}\times b_{xy}$ (that of $Y$ on $X$ and that of $X$ on $Y$), is $0.81$.
-
Both regression coefficients are positive.
- a) Find the Pearson correlation coefficient and state what percentage of the score on the second exam is explained by the score on the first.
- b) If the standard deviation of $X$ is half that of $Y$, obtain the equation of the regression line of $Y$ on $X$.
- c) If a student got a $2$ on the first exam, what score is estimated for the second?
In a study on the performance of e-scooters, the ambient temperature ($X$, in $^\circ C$) and the actual range achieved ($Y$, in km) are analysed. The following data are…
In a study on the performance of e-scooters, the ambient temperature ($X$, in $^\circ C$) and the actual range achieved ($Y$, in km) are analysed. The following data are known:
-
The variance of the temperature is $s_x^2 = 16$.
-
The regression line of the range on the temperature is $y = -0.85x + 42$.
-
The coefficient of determination is $R^2 = 0.7225$.
Calculate:
- a) The covariance between the temperature and the range.
- b) The standard deviation of the range, $s_y$.
- c) What would happen to the correlation coefficient if we decided to measure the temperature in degrees Fahrenheit using the transformation $F = 1.8X + 32$? Justify your answer based on the properties of correlation.
A sociological study analyses the relationship between the number of books read per year ($X$) and the score on a mental agility test ($Y$). The covariance is $12.5$. If…
A sociological study analyses the relationship between the number of books read per year ($X$) and the score on a mental agility test ($Y$). The covariance is $12.5$. If the number of books read by all respondents is doubled and 5 points are added to everyone's score on the mental agility test:
- a) Reason what happens to the new covariance $\sigma'_{xy}$.
- b) If the original correlation coefficient was $r = 0.75$, what will the new coefficient $r'$ be after the changes? Justify your answer analytically.
- c) Will the reliability of the predictions change after these modifications to the data?