Exercises: Covariance and correlation
In statistics, it is essential to distinguish between a relationship that can be calculated with an exact formula and one that only shows a trend. State whether the…
In statistics, it is essential to distinguish between a relationship that can be calculated with an exact formula and one that only shows a trend. State whether the relationship between the following pairs of variables is functional or statistical (correlation):
- a) The number of hours a 12th grade student spends playing video games and their grade in the Economics exam.
- b) The side length of a square and its perimeter.
- c) The gallons of gas put into a car and the total amount to pay at the gas station.
- d) The height of a teenager and their body weight.
The direction of the relationship between two variables tells us how one varies when the other changes. Determine whether there is a positive correlation, negative…
The direction of the relationship between two variables tells us how one varies when the other changes. Determine whether there is a positive correlation, negative correlation, or if the variables are uncorrelated in the following cases:
- a) The number of absences from class and the final grade for the course.
- b) A person's shoe size and their average grade in Math.
- c) The outside temperature in summer and the energy consumption of air conditioning units.
- d) The age in years of a mobile phone and its resale price on the second-hand market.
Observe the following scatter plot representing the relationship between weekly training hours ($X$) and the points scored in a season by a group of basketball players…
Observe the following scatter plot representing the relationship between weekly training hours ($X$) and the points scored in a season by a group of basketball players ($Y$).
Based on the shape of the scatter plot, answer:
- a) Is it a direct or inverse relationship?
- b) How would you describe the strength of the correlation: strong or weak?
- c) What sign do you expect the covariance $\sigma_{xy}$ to have for this data?
The "center 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 has recorded…
The "center 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 has recorded the time they spend on social media per day ($X$, in minutes) and their mobile phone battery life ($Y$, in hours):
$(45, 18), (60, 16), (90, 14), (120, 10), (150, 7)$
Calculate the coordinates of the center of gravity of this distribution.
The covariance $\sigma_{xy}$ informs us about the direction of the joint variation of two variables. Without performing all the complex calculations, observe the…
The covariance $\sigma_{xy}$ informs us about the direction of the joint variation of two variables. Without performing all the complex calculations, observe the following data relating the temperature of a soft drink ($X$, in $^\circ C$) and the time it has been out of the fridge ($Y$, in minutes):
| Time ($Y$) | 5 | 10 | 15 | 20 | 25 |
|---|---|---|---|---|---|
| Temperature ($X$) | 6 | 9 | 13 | 18 | 22 |
- a) As time increases, does the temperature tend to increase or decrease?
- b) Justify, according to your previous answer, whether the covariance will be positive, negative, or zero.
The Pearson correlation coefficient, $r$, is a dimensionless measure that ranges within a specific interval. From the following values, state which ones are not possible…
The Pearson correlation coefficient, $r$, is a dimensionless measure that ranges within a specific interval. From the following values, state which ones are not possible for a correlation coefficient and explain why:
- a) $r = 0,85$
- b) $r = -1,2$
- c) $r = 2,5$
- d) $r = -0,4$
- e) $r = 0$
A small study has been carried out on the number of books read per year ($X$) and the grade in English ($Y$) of five students. The data obtained is as follows:…
A small study has been carried out on the number of books read per year ($X$) and the grade in English ($Y$) of five students. The data obtained is as follows:
$(2, 5), (4, 6), (5, 8), (7, 8), (10, 9)$
Draw a scatter plot for this data in your notebook. Then, draw a freehand line of best fit (regression line) and comment on whether the relationship appears linear to you.
We compare two scatter plots represented in the following charts. Both show a direct relationship between the variables. a) In which of the two graphs are the points…
We compare two scatter plots represented in the following charts. Both show a direct relationship between the variables.
- a) In which of the two graphs are the points closer to a possible regression line?
- b) Which of the two will have a correlation coefficient $r$ closer to $1$?
- c) If in graph A the value of $r$ is $1$, what reasonable value (between $0$ and $1$) could you assign to graph B?
An e-sports club wishes to analyze whether there is a relationship between the weekly hours its players dedicate to individual training ($X$) and their accuracy index in…
An e-sports club wishes to analyze whether there is a relationship between the weekly hours its players dedicate to individual training ($X$) and their accuracy index in competitive matches ($Y$), measured out of 100. The data for a sample of 6 players are as follows:
| Training hours ($X$) | 10 | 15 | 12 | 20 | 8 | 18 |
|---|---|---|---|---|---|---|
| Accuracy index ($Y$) | 72 | 81 | 75 | 92 | 68 | 88 |
For this study:
-
Represent the scatter plot associated with this two-dimensional distribution.
-
Calculate the center of gravity of the distribution.
-
Determine the covariance $s_{xy}$ and interpret the sign obtained in the context of the problem.
Match each of the following scatter plots with the value of the Pearson correlation coefficient ($r$) that corresponds to it with reasoning: Values of $r$: $-0,92$;…
Match each of the following scatter plots with the value of the Pearson correlation coefficient ($r$) that corresponds to it with reasoning:
Values of $r$: $-0,92$; $0,05$; $0,65$; $1$.
In a study on the price of daily menus ($X$) and the distance to the city center ($Y$) in miles, the following measures have been obtained for a sample of 50…
In a study on the price of daily menus ($X$) and the distance to the city center ($Y$) in miles, the following measures have been obtained for a sample of 50 restaurants:
-
Mean of the prices: $\$\bar{x} = 12,5$
-
Mean of the distances: $\bar{y} = 3,2$ miles
-
Standard deviation of the price: $\$s_x = 2,1$
-
Standard deviation of the distance: $s_y = 1,4$ miles
-
Covariance: $s_{xy} = -2,35$
Calculate the Pearson correlation coefficient. If a restaurant decides to increase the price of all its menus by $\$2$ due to inflation, how would this change affect the value of the correlation coefficient? Justify your answer based on the properties of this parameter.
A streaming music application analyzes the relationship between the age of its users ($X$) and the number of different artists they listen to per month ($Y$). The…
A streaming music application analyzes the relationship between the age of its users ($X$) and the number of different artists they listen to per month ($Y$). The following sums 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 the Pearson 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?
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$ Given 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$
Given that the variance of the variable $X$ is $s_x^2 = 16$, calculate:
-
The Pearson correlation coefficient $r$.
-
The covariance $s_{xy}$ of the distribution.
-
The coordinates of the center of gravity $(\bar{x}, \bar{y})$.
An organic farmer observes the relationship between the amount of natural fertilizer used ($X$, in pounds) and the potato yield ($Y$, in pounds). The data obtained is…
An organic farmer observes the relationship between the amount of natural fertilizer used ($X$, in pounds) and the potato yield ($Y$, in pounds). The data obtained is summarized in the following table:
| $X$ | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| $Y$ | 12 | 18 | 25 | 28 | 32 |
-
Calculate the regression line of $Y$ on $X$.
-
What yield would be expected if $3,5$ pounds of fertilizer were used?
-
Is the previous prediction reliable? Justify your answer by calculating the correlation coefficient.
A survey was carried out on the number of children ($X$) and the number of bedrooms in the home ($Y$) in an apartment building. The results are presented in the…
A survey was carried out on the number of children ($X$) and the number of bedrooms in the home ($Y$) in an apartment building. 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 |
-
Find the marginal distributions of $X$ and $Y$.
-
Calculate the marginal mean of children ($\bar{x}$) and the marginal mean of bedrooms ($\bar{y}$).
-
Is there a dependence between the two variables? Reason your answer by observing the frequencies in the table.
A courier company studies the relationship between the weight of parcels ($X$, in pounds) and the shipping cost ($Y$, in $\$…
A courier company studies the relationship between the weight of parcels ($X$, in pounds) and the shipping cost ($Y$, in $\$$). After calculating the parameters, they find that the regression line of $Y$ on $X$ is $y = 1,5x + 4,2$ and the correlation coefficient is $r = 0,98$.
-
State whether the relationship between weight and cost is direct or inverse.
-
Explain what the value $1,5$ means in the context of the problem (slope of the line).
-
If a parcel weighs $0$ pounds (an empty parcel or a very light envelope), what cost does the line predict? Does this value make physical sense?
-
Calculate the coefficient of determination and comment on the quality of the linear fit.
A data analyst for a streaming* platform is studying the relationship between the time a user spends watching trailers ($X$, in minutes) and the time they spend watching…
A data analyst for a streaming platform is studying the relationship between the time a user spends watching trailers ($X$, in minutes) and the time they spend watching full content ($Y$, in minutes). After analyzing thousands of profiles, they have determined that the equations of the two regression lines are:
-
Regression line of $Y$ on $X$: $y = 1,2x + 45$
-
Regression line of $X$ on $Y$: $x = 0,3y - 12$
From this information, solve:
- a) Calculate the arithmetic means of both variables, $\bar{x}$ and $\bar{y}$.
- b) Determine the Pearson correlation coefficient, $r$, and interpret the degree of relationship between the two variables.
- c) If a user has spent 10 minutes watching trailers, what is the expected content viewing time? Is this prediction reliable? Reason the answer based on the coefficient of determination.
In a study on the performance of electric scooter batteries, the ambient temperature ($X$, in $^\circ C$) and the actual range achieved ($Y$, in miles) are analyzed. The…
In a study on the performance of electric scooter batteries, the ambient temperature ($X$, in $^\circ C$) and the actual range achieved ($Y$, in miles) are analyzed. 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 video game company wants to predict the monthly expenditure on microtransactions ($Y$, in dollars) of its players based on their weekly hours of play ($X$). The…
A video game company wants to predict the monthly expenditure on microtransactions ($Y$, in dollars) of its players based on their weekly hours of play ($X$). The statistics department has obtained the following parameters:
$\bar{x} = 15$; $\bar{y} = 22$; $s_x^2 = 25$; $s_y^2 = 144$; $\sigma_{xy} = 48$
- a) Find the equation of the regression line of $Y$ on $X$.
- b) A player claims to spend $\$50$ a month. Use the regression line of $X$ on $Y$ to estimate how many weekly hours they play.
- c) Which of the two estimations (predicting the expenditure from the hours or predicting the hours from the expenditure) seems more logical to you in this context? Do they have the same mathematical reliability?
A Math retake exam has been taken. It is observed that the relationship between the grades of the first exam ($X$) and those of the second ($Y$) follows a linear trend.…
A Math retake exam has been taken. It is observed that the relationship between the grades of the first exam ($X$) and those of 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 it has been calculated that the product of their slopes is $0,81$.
-
Both slopes are positive.
- a) Find the Pearson correlation coefficient and state what percentage of the grade of the second exam is explained by the grade of the first.
- b) If the standard deviation of $X$ is half that of $Y$, find the equation of the regression line of $Y$ on $X$.
- c) If a student got a $2$ in the first exam, what grade is estimated for them in the second?
A sociological study analyzes the relationship between the number of books read per year ($X$) and the score in a mental agility test ($Y$). The covariance is $12,5$. By…
A sociological study analyzes the relationship between the number of books read per year ($X$) and the score in a mental agility test ($Y$). The covariance is $12,5$. By doubling the number of books read by all respondents and adding 5 points to everyone in the mental agility test, you are asked to:
- 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?
The relationship between the investment in R&D ($X$, in millions of $) and the net profit ($Y$, in millions of $) of 10 technology companies is investigated. The…
The relationship between the investment in R&D ($X$, in millions of $) and the net profit ($Y$, in millions of $) of 10 technology companies is investigated. The following sums have been obtained:
$\sum x_i = 100$; $\sum y_i = 160$; $\sum x_i^2 = 1100$; $\sum y_i^2 = 2800$; $\sum x_i y_i = 1720$
- a) Calculate the center of gravity of the distribution.
- b) Find the Pearson correlation coefficient.
- c) Determine the equation of the regression line of $Y$ on $X$.
- d) If a company decides not to invest anything in R&D ($x = 0$), what profit is it estimated to have? Comment on the validity of this estimation outside the data range.
The heights of a sample of couples (man, woman) have been organized in 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 organized in 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 the Pearson correlation coefficient.
- c) Is there a strong relationship between the heights of the members of the couple in this sample?
Given the regression lines $y = -2x + 10$ and $x = -0,4y + 4$, reason whether the following statements are true or false, proving it by calculating the corresponding…
Given the regression lines $y = -2x + 10$ and $x = -0,4y + 4$, reason whether the following statements are true or false, proving it by calculating the corresponding parameters:
- a) The correlation between the variables is positive because both slopes have the same sign.
- b) The center of gravity 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$.