Exercises: Problems
The time in hours ($X$) and the distance covered in km ($Y$) by a cyclist over $5$ stages have been measured, obtaining the following pairs of values $(x_i, y_i)$:…
The time in hours ($X$) and the distance covered in km ($Y$) by a cyclist over $5$ stages have been measured, obtaining the following pairs of values $(x_i, y_i)$: $(2, 45)$, $(3, 65)$, $(4, 85)$, $(2, 40)$ and $(5, 110)$. Calculate the covariance of this bivariate distribution.
The regression line of $Y$ on $X$ of a bivariate distribution is given by the equation $y = 3,2x - 1,5$. If the arithmetic mean of the variable $X$ is $\bar{x} = 4,5$,…
The regression line of $Y$ on $X$ of a bivariate distribution is given by the equation $y = 3,2x - 1,5$. If the arithmetic mean of the variable $X$ is $\bar{x} = 4,5$, determine the value of the arithmetic mean of the variable $Y$, $\bar{y}$.
In a study on the weight ($X$, in kg) and height ($Y$, in cm) of a group of students, a linear correlation coefficient $r = 0,85$ was obtained. If the marginal standard…
In a study on the weight ($X$, in kg) and height ($Y$, in cm) of a group of students, a linear correlation coefficient $r = 0,85$ was obtained. If the marginal standard deviations are $S_x = 12$ and $S_y = 8$, calculate the exact value of the covariance $S_{xy}$.
The following scatter diagram shows the relationship between the age of a group of vehicles ($X$, in years) and their current market value ($Y$, in thousands of euros).…
The following scatter diagram shows the relationship between the age of a group of vehicles ($X$, in years) and their current market value ($Y$, in thousands of euros). By observing the shape of the scatter plot, state the sign that the covariance will have and whether the linear correlation between both variables is strong or weak.
To estimate monthly electricity consumption ($Y$, in kWh) based on the number of people living in a household ($X$), the regression line $y = 45x + 120$ was obtained…
To estimate monthly electricity consumption ($Y$, in kWh) based on the number of people living in a household ($X$), the regression line $y = 45x + 120$ was obtained with a correlation coefficient $r = 0,92$. Estimate the consumption for a household with $4$ people and state whether the estimate is very reliable or unreliable, briefly justifying your answer.
The following contingency table shows the data for $100$ ceramic items, classified by size ($X$: Small=$1$, Large=$2$) and quality ($Y$: Defective=$0$, Optimal=$1$).…
The following contingency table shows the data for $100$ ceramic items, classified by size ($X$: Small=$1$, Large=$2$) and quality ($Y$: Defective=$0$, Optimal=$1$). Write down the table for the marginal distribution of the variable $Y$ and calculate its mean $\bar{y}$.
| $X \setminus Y$ | $0$ | $1$ |
|---|---|---|
| $1$ | $10$ | $40$ |
| $2$ | $15$ | $35$ |
The following statistical parameters are known for a bivariate distribution: $\bar{x} = 12$, $\bar{y} = 25$, the marginal variance of $X$, $S_x^2 = 16$, and the…
The following statistical parameters are known for a bivariate distribution: $\bar{x} = 12$, $\bar{y} = 25$, the marginal variance of $X$, $S_x^2 = 16$, and the covariance $S_{xy} = 24$. Write down the equation of the regression line of $Y$ on $X$.
In a study relating the marketing budget of several companies ($X$) to their annual profits ($Y$), the linear correlation coefficient has been calculated as $r = 0,7$.…
In a study relating the marketing budget of several companies ($X$) to their annual profits ($Y$), the linear correlation coefficient has been calculated as $r = 0,7$. What percentage of the variability in profits is explained by the marketing budget according to the proposed linear regression model?
In a two-dimensional statistics exam, Marcos has to analyze the relationship between two variables from the equations of their regression lines: Regression line of $Y$…
In a two-dimensional statistics exam, Marcos has to analyze the relationship between two variables from the equations of their regression lines:
-
Regression line of $Y$ on $X$: $y = -0,75x + 12$
-
Regression line of $X$ on $Y$: $x = -0,48y + 10$
Marcos writes in his solution:
-
"The linear correlation coefficient is $r = \sqrt{(-0,75) \cdot (-0,48)} = \sqrt{0,36} = 0,6$, so the correlation between the variables is positive and moderate."
-
"The covariance of the distribution is directly the slope of the first line, that is, $\sigma_{xy} = -0,75$."
Identify and explain in detail the two conceptual mistakes made by Marcos, calculating the correct value of $r$. Furthermore, explain whether or not it is possible to find the numerical value of $\sigma_{xy}$ having only the equations of the lines.
A ski resort in the Aragonese Pyrenees records the altitude in hundreds of meters ($X$) and the average temperature in $^{\circ}\text{C}$ during a winter day ($Y$) at…
A ski resort in the Aragonese Pyrenees records the altitude in hundreds of meters ($X$) and the average temperature in $^{\circ}\text{C}$ during a winter day ($Y$) at five points of its skiable domain:
$$(1, 18), \quad (2, 15), \quad (3, 12), \quad (4, 11), \quad (5, 9)$$- a) Before carrying out any analytical calculation, reasonably estimate the sign of the covariance and of the linear correlation coefficient $r$, indicating whether you expect a weak or strong linear relationship based on the nature of the physical phenomenon.
- b) Calculate the means $\bar{x}$ and $\bar{y}$, the covariance $\sigma_{xy}$, the standard deviations $\sigma_x$ and $\sigma_y$, and the exact value of $r$.
- c) Check whether the obtained value of $r$ confirms your initial estimate and assess whether a linear fit is suitable for predicting temperatures at other mountain elevations.
In a physics laboratory, the extension of an elastic spring ($Y$, in cm) was measured when hanging different masses ($X$, in kg) from it. The results obtained in the…
In a physics laboratory, the extension of an elastic spring ($Y$, in cm) was measured when hanging different masses ($X$, in kg) from it. The results obtained in the experiment are:
$X$: $1$, $2$, $3$, $4$, $5$, $6$
$Y$: $2,1$, $3,9$, $6,2$, $7,8$, $10,1$, $12,2$
Calculate the linear correlation coefficient $r$ and the equation of the regression line of $Y$ on $X$.
A technology company wants to predict the number of sales of a new smartphone ($Y$, in thousands of units) based on daily social media mentions ($X$, in thousands). Data…
A technology company wants to predict the number of sales of a new smartphone ($Y$, in thousands of units) based on daily social media mentions ($X$, in thousands). Data from $8$ previous launches have been collected, obtaining the following summations:
$\sum x_i = 160$, $\sum y_i = 400$, $\sum x_i^2 = 3600$, $\sum y_i^2 = 21500$, $\sum x_i y_i = 8600$.
Calculate the covariance, the linear correlation coefficient, and estimate the sales that will be obtained if $25$ thousand mentions are recorded on the launch day.
The accompanying scatter diagram represents the relationship between the monthly mean temperature ($X$, in $^\circ\text{C}$) and the consumption of natural gas ($Y$, in…
The accompanying scatter diagram represents the relationship between the monthly mean temperature ($X$, in $^\circ\text{C}$) and the consumption of natural gas ($Y$, in $\text{m}^3$) in a city during the last year. Given that the marginal means are $\bar{x} = 15$ and $\bar{y} = 120$, and that the gradient of the regression line of $Y$ on $X$ is $-3,5$, find the equation of this line and estimate the gas consumption for a month with a mean temperature of $8 \ ^\circ\text{C}$.
When studying the statistical relationship between two variables $X$ and $Y$, the following regression lines were obtained: Line of $Y$ on $X$: $y = 0,5x + 4$ Line of…
When studying the statistical relationship between two variables $X$ and $Y$, the following regression lines were obtained:
Line of $Y$ on $X$: $y = 0,5x + 4$
Line of $X$ on $Y$: $x = 1,5y - 3$
Calculate the coordinates of the mean point (centre of gravity) of the bivariate distribution $(\bar{x}, \bar{y})$.
A study has been carried out on the number of weekly training hours ($X$) and the time achieved in an athletics event ($Y$, in seconds) for a group of runners. Following…
A study has been carried out on the number of weekly training hours ($X$) and the time achieved in an athletics event ($Y$, in seconds) for a group of runners. Following the analysis, it is known that $\bar{x} = 12$, $\bar{y} = 45$, $S_x = 3$, $S_y = 2$ and the covariance is $S_{xy} = -4,8$.
Calculate the regression line of $X$ on $Y$ and estimate how many weekly hours an athlete trained who achieved a time of $42$ seconds in the event.
The following two-way table shows the distribution of $50$ families according to the number of children ($X$) and the number of vehicles they own ($Y$): |…
The following two-way table shows the distribution of $50$ families according to the number of children ($X$) and the number of vehicles they own ($Y$):
| $X \setminus Y$ | $0$ | $1$ | $2$ |
|---|---|---|---|
| $0$ | $5$ | $8$ | $2$ |
| $1$ | $2$ | $12$ | $6$ |
| $2$ | $1$ | $4$ | $10$ |
Calculate the mean and standard deviation of the conditional distribution of the number of vehicles owned by families, knowing that they have exactly $1$ child (that is, the distribution $Y|X=1$).
The correlation coefficient between monthly income ($X$, in euros) and expenditure on leisure ($Y$, in euros) for a group of people is $r = 0,75$. If we decide to…
The correlation coefficient between monthly income ($X$, in euros) and expenditure on leisure ($Y$, in euros) for a group of people is $r = 0,75$. If we decide to express income in thousands of euros ($X' = \frac{X}{1000}$) and increase leisure expenditure by a fixed amount of $50$ euros due to a subsidy ($Y' = Y + 50$), what will be the new linear correlation coefficient between $X'$ and $Y'$? Justify your answer using the properties of covariance and standard deviations.
For a bivariate distribution, the following data are known: sample size $n = 10$, marginal means $\bar{x} = 5$ and $\bar{y} = 8$, marginal variances $S_x^2 = 4$ and…
For a bivariate distribution, the following data are known: sample size $n = 10$, marginal means $\bar{x} = 5$ and $\bar{y} = 8$, marginal variances $S_x^2 = 4$ and $S_y^2 = 9$. Furthermore, the equation of the regression line of $Y$ on $X$ is $y = 1,2x + 2$.
Calculate the exact value of the covariance $S_{xy}$ and the linear correlation coefficient $r$.
In an industrial quality control test, two variables, $X$ and $Y$, are measured, obtaining the first four data pairs $(x_i, y_i)$: $(1, 2)$, $(2, 4)$, $(3, 5)$, and…
In an industrial quality control test, two variables, $X$ and $Y$, are measured, obtaining the first four data pairs $(x_i, y_i)$: $(1, 2)$, $(2, 4)$, $(3, 5)$, and $(4, 7)$. The fifth recorded pair is $(5, k)$, where $k$ is a positive real value pending validation.
- a) Express in terms of $k$ the marginal means $\bar{x}$ and $\bar{y}$, the variance $\sigma_x^2$, and the covariance $\sigma_{xy}$.
- b) Knowing that the regression line of $Y$ on $X$ must pass exactly through the origin of coordinates $(0, 0)$, deduce the exact value that $k$ must take.
- c) With the found value of $k$, determine the equation of said regression line and calculate the coefficient of determination $R^2$ to justify whether the line obtained has sufficient explanatory power.
From a sample of the Instituto Nacional de Estadística (INE) on the standard of living in five medium-sized municipalities in Spain, the average annual disposable…
From a sample of the Instituto Nacional de Estadística (INE) on the standard of living in five medium-sized municipalities in Spain, the average annual disposable household income ($X$, in tens of thousands of euros) and the average annual expenditure on leisure and culture ($Y$, in hundreds of euros) are related:
$$(2, 8), \quad (3, 11), \quad (4, 13), \quad (5, 17), \quad (6, 21)$$- a) Model the linear relationship by determining the equation of the regression line of $Y$ on $X$.
- b) Interpret the specific socioeconomic meaning of the obtained slope and of the y-intercept in the context of the study.
- c) Use the model to predict the expected leisure expenditure in a municipality with an average household income of $45\,000$ € ($x = 4,5$) and in another with $120\,000$ € ($x = 12$). Reasonably compare the reliability of both predictions, distinguishing between interpolation and extrapolation.
- d) If one wished to estimate the income of a municipality from its cultural expenditure, justify whether it would be mathematically appropriate to solve for $x$ directly from the equation obtained in section a).
The regression lines of a bivariate distribution are given by the equations $y = -0,5x + 8$ (line of $Y$ on $X$) and $x = -1,28y + 10$ (line of $X$ on $Y$). Calculate…
The regression lines of a bivariate distribution are given by the equations $y = -0,5x + 8$ (line of $Y$ on $X$) and $x = -1,28y + 10$ (line of $X$ on $Y$).
Calculate the linear correlation coefficient $r$ and find the marginal means $\bar{x}$ and $\bar{y}$.
In a statistical study on two variables $X$ and $Y$, a change of variables was performed by standardising or rescaling the original data in the form…
In a statistical study on two variables $X$ and $Y$, a change of variables was performed by standardising or rescaling the original data in the form $U = \frac{X - 10}{5}$ and $V = \frac{Y - 20}{2}$. It is known that the regression line of $V$ on $U$ is $v = 0,8u + 1,5$.
By reversing the change of variables, find the equation of the regression line of $Y$ on $X$ in explicit form $y = mx + n$.
A factory is studying the relationship between the age of its machines ($X$, in years) and the annual maintenance cost ($Y$, in hundreds of euros). Data have been…
A factory is studying the relationship between the age of its machines ($X$, in years) and the annual maintenance cost ($Y$, in hundreds of euros). Data have been collected from $4$ machines, but due to a computer error, the maintenance cost of one of them has been lost. The pairs $(x_i, y_i)$ are: $(2, 4)$, $(3, 5)$, $(5, k)$, $(6, 9)$.
Knowing that the marginal mean of the maintenance cost for the four machines is $\bar{y} = 6,5$, determine the value of $k$ and then calculate the equation of the regression line of $Y$ on $X$.
Prove mathematically, using the expressions for the gradients of the regression lines as a function of the covariance and the marginal variances, that if the linear…
Prove mathematically, using the expressions for the gradients of the regression lines as a function of the covariance and the marginal variances, that if the linear correlation coefficient is perfect ($r = 1$ or $r = -1$), the two regression lines (that of $Y$ on $X$ and that of $X$ on $Y$) are coincident lines.
The following scatter diagram shows the growth of a bacterial colony ($Y$, in thousands) as a function of time ($X$, in hours). The scatter plot suggests an exponential…
The following scatter diagram shows the growth of a bacterial colony ($Y$, in thousands) as a function of time ($X$, in hours). The scatter plot suggests an exponential growth of the type $Y = A \cdot e^{BX}$.
To linearise the model, it has been proposed to make the change of variable $Z = \ln(Y)$. If, by performing a linear regression fit of $Z$ on $X$, we obtain the line $z = 0,4x + 1,2$, determine the numerical values of the constants $A$ and $B$ of the original exponential model.
The following joint frequency table (absolute frequencies) is given for two qualitative variables $X$ and $Y$: | $X \setminus Y$ | $y_1$ | $y_2$ | | :---: | :---: |…
The following joint frequency table (absolute frequencies) is given for two qualitative variables $X$ and $Y$:
| $X \setminus Y$ | $y_1$ | $y_2$ |
|---|---|---|
| $x_1$ | $12$ | $18$ |
| $x_2$ | $20$ | $k$ |
Determine the exact value of the parameter $k$, knowing that the variables $X$ and $Y$ are statistically independent.
In a statistical study, the regression line of $Y$ on $X$ is $y = 2x - 3$ and the regression line of $X$ on $Y$ is $x = 0,4y + 2$. Knowing that the marginal variance of…
In a statistical study, the regression line of $Y$ on $X$ is $y = 2x - 3$ and the regression line of $X$ on $Y$ is $x = 0,4y + 2$. Knowing that the marginal variance of the variable $X$ is $S_x^2 = 5$, calculate the value of the marginal variance of $Y$, $S_y^2$, and the value of the covariance $S_{xy}$.
Two groups of employees from the same multinational company have been studied to analyse the relationship between years of experience ($X$) and monthly salary ($Y$). In…
Two groups of employees from the same multinational company have been studied to analyse the relationship between years of experience ($X$) and monthly salary ($Y$).
In Group A, consisting of $10$ employees, the following were obtained: $\bar{x}_A = 5$, $\bar{y}_A = 1500$, and a covariance $S_{xy,A} = 200$.
In Group B, consisting of $20$ employees, the following were obtained: $\bar{x}_B = 5$, $\bar{y}_B = 1500$, and a covariance $S_{xy,B} = 350$.
Calculate the total covariance $S_{xy}$ if we decided to group all $30$ employees into a single bivariate distribution.
The evolution of the number of registered electric vehicles ($Y$, in tens) in a region according to the elapsed year ($X$) is studied. The observed time series is:…
The evolution of the number of registered electric vehicles ($Y$, in tens) in a region according to the elapsed year ($X$) is studied. The observed time series is:
$$(2020, 110), \quad (2021, 115), \quad (2022, 122), \quad (2023, 128), \quad (2024, 135)$$To obtain the regression line of $Y$ on $X$ and the correlation coefficient $r$, two alternatives are proposed:
-
Path 1 (Direct): Calculate the summations $\sum x_i$, $\sum y_i$, $\sum x_i^2$, $\sum y_i^2$, and $\sum x_i y_i$ directly on the original numerical data.
-
Path 2 (Change of variable): Define $U = X - 2022$ and $V = Y - 122$, calculate the regression line of $V$ on $U$ ($v = m \cdot u + n$), and algebraically revert the transformation by substituting $u = x - 2022$ and $v = y - 122$.
- a) Compare both paths: prove theoretically that a change of origin $U = X - h$ and $V = Y - k$ does not alter the covariance ($\sigma_{uv} = \sigma_{xy}$) nor the marginal variances, and justify which of the two methods is preferable regarding the risk of calculation or rounding errors.
- b) Apply Path 2 to find the regression line of $V$ on $U$.
- c) Undo the change of variable to deduce the regression line of $Y$ on $X$ and calculate the linear correlation coefficient $r$.
Two research centers A and B analyze, in independent samples of students, the relationship between weekly hours of recreational screen time ($X$) and the average grade…
Two research centers A and B analyze, in independent samples of students, the relationship between weekly hours of recreational screen time ($X$) and the average grade ($Y$). Surprisingly, both centers obtain exactly the same regression equations:
-
Line of $Y$ on $X$: $y = -0,25x + 9$
-
Line of $X$ on $Y$: $x = -y + 15$
- a) Prove that the linear correlation coefficient $r$ and the center of gravity $(\bar{x}, \bar{y})$ are necessarily identical in both studies, calculating their exact numerical values.
- b) Team A reports that the variance of screen hours in its sample is $\sigma_{x,A}^2 = 16$, while team B states that in theirs it is $\sigma_{x,B}^2 = 4$. Prove whether it is possible for both teams to be right simultaneously by calculating, for each center, its covariance $\sigma_{xy}$ and the variance of grades $\sigma_y^2$. Explain from this result why the regression slopes alone are not enough to reconstruct the covariance.
- c) If both samples are merged into a single group of $100$ students ($N_A = 60$ from center A and $N_B = 40$ from center B), calculate the joint covariance taking advantage of the fact that they share the same center of gravity, and reason whether the regression line of $Y$ on $X$ for the total set will differ from the one obtained by the centers separately.
Unit challenge. How does altitude influence the climate of our country? Become a climate analyst and prepare an executive report using GeoGebra or a spreadsheet. 1. Data…
Unit challenge. How does altitude influence the climate of our country? Become a climate analyst and prepare an executive report using GeoGebra or a spreadsheet.
-
Data collection: Consult the AEMET website and compile in a table the altitude ($x$, in metres) and the annual mean temperature ($y$, in °C) of $10$ Spanish provincial capitals from different geographical areas.
-
Bivariate study: Enter the data into the software. Calculate the means ($\bar{x}$, $\bar{y}$), standard deviations, covariance, and Pearson's linear correlation coefficient ($r$). Plot the scatter plot and determine the regression line of $y$ on $x$.
-
Prediction and causality: Estimate the expected temperature for a municipality located at $1250\text{ m}$ and argue the reliability of your result. Check whether a non-linear model (exponential or power) would improve the fit and reflect on whether altitude is a direct cause of thermal variation or if lurking variables are involved.
Submit a brief report (one page) with the table, graphs, and your reasoned justification.
Assessment criteria:
-
Rigour in calculating bivariate statistics and the regression line using digital tools.
-
Skill in graphical representation and interpretation of the coefficient $r$.
-
Critical depth when extrapolating values and discussing causality versus correlation.