Exercises: Linear correlation coefficient
In a study on solar panel efficiency, it has been calculated that the covariance between received solar radiation ($X$) and generated energy ($Y$) is…
In a study on solar panel efficiency, it has been calculated that the covariance between received solar radiation ($X$) and generated energy ($Y$) is $\sigma_{xy} = 15,2$. Knowing that the standard deviations are $\sigma_x = 4,0$ and $\sigma_y = 3,9$, calculate Pearson's linear correlation coefficient and interpret the result.
Consider the following pairs of statistical variables. State, giving reasons, whether the linear correlation coefficient between them will be positive, negative, or…
Consider the following pairs of statistical variables. State, giving reasons, whether the linear correlation coefficient between them will be positive, negative, or close to zero:
- a) The number of hours an athlete trains per week and their time to run 100 metres.
- b) The amount of rainfall in a month and umbrella sales in that same month.
- c) The last digit of a person's ID number and their height in centimetres.
The linear correlation coefficient between advertising expenditure ($X$, in thousands of euros) and sales revenue ($Y$, in thousands of euros) of a company is…
The linear correlation coefficient between advertising expenditure ($X$, in thousands of euros) and sales revenue ($Y$, in thousands of euros) of a company is $r = 0,88$. If the marginal standard deviations are $\sigma_x = 2,5$ and $\sigma_y = 12,4$, determine the value of the covariance $\sigma_{xy}$.
Observe the three scatter diagrams labelled A, B, and C. Match each of them with the value of the linear correlation coefficient that best describes it, choosing from…
Observe the three scatter diagrams labelled A, B, and C. Match each of them with the value of the linear correlation coefficient that best describes it, choosing from the following values: $r = -0,92$, $r = 0,05$, and $r = 0,95$.
In a bivariate distribution, the gradient of the regression line of $Y$ on $X$ is known to be $m_{yx} = 1,25$ and the gradient of the regression line of $X$ on $Y$ is…
In a bivariate distribution, the gradient of the regression line of $Y$ on $X$ is known to be $m_{yx} = 1,25$ and the gradient of the regression line of $X$ on $Y$ is $m_{xy} = 0,65$. Knowing that the relationship between the variables is positive, calculate the linear correlation coefficient $r$.
Reaction time ($X$, in seconds) and the number of errors made ($Y$) in a psychomotor coordination test were measured for 3 individuals, obtaining the following pairs of…
Reaction time ($X$, in seconds) and the number of errors made ($Y$) in a psychomotor coordination test were measured for 3 individuals, obtaining the following pairs of values: $(1, 2)$, $(2, 4)$, and $(3, 5)$. Calculate Pearson's linear correlation coefficient for this small data set.
The coefficient of determination of a mathematical model relating the age of a commercial vehicle ($X$, in years) to its market value ($Y$, in euros) is $R^2 = 0,7225$.…
The coefficient of determination of a mathematical model relating the age of a commercial vehicle ($X$, in years) to its market value ($Y$, in euros) is $R^2 = 0,7225$. Knowing that as age increases, the value of the vehicle decreases, what is the exact value of the linear correlation coefficient $r$?
Classify the strength (strong, moderate, or weak/none) and direction (positive or negative) of the linear correlation for each of the following coefficients obtained in…
Classify the strength (strong, moderate, or weak/none) and direction (positive or negative) of the linear correlation for each of the following coefficients obtained in different statistical studies:
- a) $r = 0,98$
- b) $r = -0,12$
- c) $r = -0,85$
- d) $r = 0,55$
In a 1st year Bachillerato class, Sergio analyzes two subjects to find out in which one there is greater linear dependence with respect to weekly study hours. After…
In a 1st year Bachillerato class, Sergio analyzes two subjects to find out in which one there is greater linear dependence with respect to weekly study hours. After carrying out the calculations, he obtains a correlation coefficient $r_A = 0,42$ for subject A and, for subject B (where he measures the number of errors on an exam versus study hours), a coefficient $r_B = -0,81$. Sergio concludes in his report: «The linear relationship is much stronger in subject A than in subject B because $0,42 > -0,81$; furthermore, the negative sign in B shows that the linear model is not valid for predicting errors». Identify and state precisely the two conceptual errors made by Sergio, explain why his statements are false, and determine in which of the two subjects the regression line will explain a greater percentage of the variability.
A weather station in the Pyrenees records the altitude above a base point ($X$, in hundreds of meters) and the mean temperature during a winter week ($Y$, in…
A weather station in the Pyrenees records the altitude above a base point ($X$, in hundreds of meters) and the mean temperature during a winter week ($Y$, in $^\circ\text{C}$) at five different elevations: $(1, 9)$, $(2, 8)$, $(3, 6)$, $(4, 4)$, and $(5, 3)$. Carry out the following tasks:
- a) Before calculating anything, observe the trend of the pairs of values: what sign do you expect for the covariance and for $r$? Reasonably estimate whether the value of $|r|$ will be closer to $0$, to $0,5$, or to $1$.
- b) Check your estimate by calculating the means $\bar{x}$ and $\bar{y}$, the standard deviations $\sigma_x$ and $\sigma_y$, the covariance $\sigma_{xy}$, and the linear correlation coefficient $r$.
- c) From the value obtained for $r$, calculate the coefficient of determination $r^2$ and interpret what percentage of the variability in temperature is explained by altitude.
A logistics company wants to study the relationship between the weight of shipments ($X$, in kg) and the transport cost ($Y$, in euros). To do so, it selects a sample of…
A logistics company wants to study the relationship between the weight of shipments ($X$, in kg) and the transport cost ($Y$, in euros). To do so, it selects a sample of 5 shipments, obtaining the following data:
-
Weight ($X$): 2, 4, 5, 8, 11
-
Cost ($Y$): 12, 15, 18, 25, 30
Calculate the means, the marginal standard deviations, the covariance, and the linear correlation coefficient. Based on the result, is weight a good linear predictor of transport cost?
In an agronomy study, the linear correlation coefficient between the mean monthly temperature in degrees Celsius ($C$) and crop yield in tonnes ($P$) was calculated to…
In an agronomy study, the linear correlation coefficient between the mean monthly temperature in degrees Celsius ($C$) and crop yield in tonnes ($P$) was calculated to be $r = 0,82$. If we decide to express the temperature in degrees Fahrenheit using the formula $F = 1,8C + 32$ and the yield in kilograms using $K = 1000P$, what will be the new correlation coefficient between $F$ and $K$? Justify your answer based on the mathematical properties of this coefficient.
The data from a clinical trial on drug dosage ($X$, in mg) and recovery time ($Y$, in days) for $N=10$ patients are summarised in the following summations:…
The data from a clinical trial on drug dosage ($X$, in mg) and recovery time ($Y$, in days) for $N=10$ patients are summarised in the following summations:
$\sum x_i = 120$, $\sum y_i = 80$, $\sum x_i^2 = 1540$, $\sum y_i^2 = 680$, $\sum x_i y_i = 910$.
Calculate the linear correlation coefficient and interpret the result in the context of the medical problem.
The following scatter diagram shows the relationship between weekly study hours ($X$) and the mark obtained in an exam ($Y$) for a group of students. Visually analyse…
The following scatter diagram shows the relationship between weekly study hours ($X$) and the mark obtained in an exam ($Y$) for a group of students.
Visually analyse the scatter plot and answer, giving reasons:
- a) If we did not take into account the outlier located in the bottom right, what would the linear correlation coefficient be like?
- b) What effect does the inclusion of this outlier have on the value of Pearson's correlation coefficient compared to the previous case?
In market research, the two linear regression lines relating the price of a product ($X$) and its monthly demand ($Y$) have been obtained. The equations of these lines…
In market research, the two linear regression lines relating the price of a product ($X$) and its monthly demand ($Y$) have been obtained. The equations of these lines are:
Line 1: $y = -1,5x + 120$
Line 2: $x = -0,6y + 75$
Calculate the linear correlation coefficient and state the degree of relationship between price and demand.
In a bivariate statistical distribution, it is known that the variance of the first variable is $\sigma_x^2 = 25$, the joint covariance is $\sigma_{xy} = 18$, and the…
In a bivariate statistical distribution, it is known that the variance of the first variable is $\sigma_x^2 = 25$, the joint covariance is $\sigma_{xy} = 18$, and the linear correlation coefficient is $r = 0,6$. From these data, determine the exact value of the variance of the second variable, $\sigma_y^2$.
A basketball coach analyses the minutes played ($X$) and the points scored ($Y$) by 6 of his players in a match, obtaining the following pairs of data: $(10, 4)$,…
A basketball coach analyses the minutes played ($X$) and the points scored ($Y$) by 6 of his players in a match, obtaining the following pairs of data: $(10, 4)$, $(15, 8)$, $(20, 12)$, $(25, 14)$, $(30, 20)$, $(35, 22)$. Calculate the coefficient of determination $R^2$ and explain what percentage of the variability of points scored is explained linearly by minutes played.
Given the regression lines $y = 0,8x + 2,5$ and $x = 1,1y - 1,2$, calculate the linear correlation coefficient $r$. Then, determine the mean of the variable $Y$.
Given the regression lines $y = 0,8x + 2,5$ and $x = 1,1y - 1,2$, calculate the linear correlation coefficient $r$. Then, determine the mean of the variable $Y$.
From a sample of 5 regions, a study of the automobile fleet analyzes the relationship between the average age of passenger cars ($X$, in years) and the average annual…
From a sample of 5 regions, a study of the automobile fleet analyzes the relationship between the average age of passenger cars ($X$, in years) and the average annual expenditure on repairs per vehicle ($Y$, in hundreds of euros), obtaining the following observations: $(4; 2,5)$, $(6; 3,5)$, $(8; 5,0)$, $(10; 6,0)$, and $(12; 8,0)$.
- a) Model the relationship by calculating the standard deviations, the covariance, and the linear correlation coefficient $r$. How would you rate the strength of the linear fit?
- b) Calculate the coefficient of determination $r^2$ and interpret, in the context of the problem, what percentage of the variability in repair expenditure constitutes residual dispersion (unexplained by the age of the vehicle).
- c) If an insurance company decides to express the age in months ($X' = 12X$) and the cost in euros ($Y' = 100Y$), algebraically justify using the properties of covariance and standard deviation what the new correlation coefficient $r'$ will be, without performing calculations on the individual numerical data again.
Four observations of a two-dimensional distribution are known: $(1, 2)$, $(2, 4)$, $(3, 6)$, and $(4, 8)$. A fifth observation of the form $(5, y_5)$ is going to be…
Four observations of a two-dimensional distribution are known: $(1, 2)$, $(2, 4)$, $(3, 6)$, and $(4, 8)$. A fifth observation of the form $(5, y_5)$ is going to be added.
- a) Determine what value $y_5$ must take so that the linear correlation coefficient is exactly $r = 1$. Justify your answer from the functional relationship existing among the first four points, without calculating variances.
- b) Set up the equation for the covariance $\sigma_{xy}$ in terms of $y_5$ and calculate what value $y_5$ must take so that the covariance is exactly $0$. Verify that, with that value, the standard deviations are strictly positive and deduce the value of $r$.
- c) With the value of $y_5$ found in section b, $r = 0$ is obtained. Does this mean that there is no relationship whatsoever between both variables in that five-point sample? Explain the difference between «absence of linear correlation» and «absence of relationship» by observing the resulting set of points.
The relationship between two variables $X$ and $Y$ is being studied using three experimental observations: $(0, 2)$, $(3, 8)$, and $(5, k)$. It is known beforehand that…
The relationship between two variables $X$ and $Y$ is being studied using three experimental observations: $(0, 2)$, $(3, 8)$, and $(5, k)$. It is known beforehand that there is a perfect positive linear functional relationship between both variables, that is, the correlation coefficient is $r = 1$. Without needing to calculate the standard deviations, determine the value of the parameter $k$.
Consider a bivariate distribution $(X, Y)$ where the variable $Y$ is obtained from the variable $X$ by means of the affine transformation $Y = -4X + 7$, with $X$ not…
Consider a bivariate distribution $(X, Y)$ where the variable $Y$ is obtained from the variable $X$ by means of the affine transformation $Y = -4X + 7$, with $X$ not constant ($\sigma_x > 0$). Prove analytically, using the algebraic definitions of covariance and standard deviation, that the linear correlation coefficient between $X$ and $Y$ is exactly $-1$.
Given two statistical variables $X$ and $Y$, their corresponding standardised variables are defined as $Z_x = \frac{X - \bar{x}}{\sigma_x}$ and…
Given two statistical variables $X$ and $Y$, their corresponding standardised variables are defined as $Z_x = \frac{X - \bar{x}}{\sigma_x}$ and $Z_y = \frac{Y - \bar{y}}{\sigma_y}$. Prove step by step that the covariance between the standardised variables, $\sigma_{z_x z_y}$, is exactly equal to the linear correlation coefficient $r_{xy}$ of the original variables.
In an engineering study on the strength of certain polymeric materials, two regression lines were obtained whose implicit equations are $3x - 2y - 8 = 0$ and…
In an engineering study on the strength of certain polymeric materials, two regression lines were obtained whose implicit equations are $3x - 2y - 8 = 0$ and $x - 2y + 4 = 0$.
- a) Identify, giving reasons, which is the regression line of $Y$ on $X$ and which is the regression line of $X$ on $Y$.
- b) Calculate the linear correlation coefficient $r$ between both variables.
The following scatter diagram represents the relationship between the temperature of a chemical reactor ($X$, centred at 0) and the reaction yield ($Y$). The recorded…
The following scatter diagram represents the relationship between the temperature of a chemical reactor ($X$, centred at 0) and the reaction yield ($Y$). The recorded points are $(-2, 4)$, $(-1, 1)$, $(0, 0)$, $(1, 1)$, and $(2, 4)$.
- a) Calculate Pearson's linear correlation coefficient for these data.
- b) In light of the mathematical result and the attached diagram, explain carefully why the correlation coefficient takes that value even though an exact functional relationship ($y = x^2$) exists between the variables.
The random variables $X$ and $Y$ have variances $\sigma_x^2 = 16$ and $\sigma_y^2 = 25$, and their linear correlation coefficient is $r_{xy} = 0,4$. A new synthetic…
The random variables $X$ and $Y$ have variances $\sigma_x^2 = 16$ and $\sigma_y^2 = 25$, and their linear correlation coefficient is $r_{xy} = 0,4$. A new synthetic variable $W = X + kY$ is defined, where $k$ is a real constant. Determine the exact value of $k$ so that the variables $X$ and $W$ are uncorrelated (that is, $r_{xw} = 0$).
Note: You may use the linearity property of covariance: $\sigma_{x, x+ky} = \sigma_x^2 + k\sigma_{xy}$.
In a thermodynamics experiment, the pressure ($P$) of a gas is measured at different volumes ($V$) while keeping the temperature constant. Physical theory predicts a…
In a thermodynamics experiment, the pressure ($P$) of a gas is measured at different volumes ($V$) while keeping the temperature constant. Physical theory predicts a relationship of the form $P = \frac{k}{V}$. To linearise the model and apply linear regression, a new auxiliary variable $X = \frac{1}{V}$ is defined. The following experimental pairs $(V, P)$ were obtained: $(2; 12,1)$, $(4; 5,9)$, $(5; 4,8)$, $(8; 3,0)$.
Calculate the linear correlation coefficient between $X$ and $P$. Does the result obtained confirm the underlying physical theory?
The residual variance (or mean squared error) of the regression of $Y$ on $X$ provides a measure of the scatter of the points around the line of best fit, and can be…
The residual variance (or mean squared error) of the regression of $Y$ on $X$ provides a measure of the scatter of the points around the line of best fit, and can be calculated using the expression $\sigma_e^2 = \sigma_y^2 (1 - r^2)$. In a socioeconomic study, the variance of the dependent variable $Y$ is known to be $36$ and the regression line of $Y$ on $X$ leaves a residual variance of $6,25$. If the gradient of this regression line is known to be negative, find the linear correlation coefficient $r$ and interpret its meaning statistically.
An astrophysics laboratory records five joint measurements of two quantities with very large values:…
An astrophysics laboratory records five joint measurements of two quantities with very large values:
$(10\,002; 50\,010),\ (10\,004; 50\,016),\ (10\,006; 50\,022),\ (10\,008; 50\,028),\ (10\,010; 50\,034)$.
To find the linear correlation coefficient $r$, the team debates among three strategies:
-
Method 1 (Direct): Calculate $\bar{x}$, $\bar{y}$, $\sigma_x^2$, $\sigma_y^2$, and $\sigma_{xy}$ by applying the formulas to the original data.
-
Method 2 (Change of scale and origin): Standardize or center by defining $U = \frac{X - 10\,006}{2}$ and $V = \frac{Y - 50\,022}{6}$, calculate $r_{uv}$ on the reduced values $\{-2, -1, 0, 1, 2\}$, and deduce $r_{xy}$.
-
Method 3 (Functional deduction): Search whether an exact relationship $Y = aX + b$ exists between the points and apply the theoretical result on collinear variables.
- a) Solve the problem applying Method 2 and Method 3, explaining in detail the steps followed in each.
- b) Critically compare the three methods: reason which one is the most efficient and argue what numerical disadvantages Method 1 presents when working manually or with standard calculators.
- c) If the last measurement had been $(10\,010; 50\,030)$ instead of $(10\,010; 50\,034)$, would all three methods still be valid? Justify which one would be invalidated and which of the remaining ones would be the most convenient for calculating the new $r$.
A study on working conditions analyzes, in two different professional sectors (Sector A and Sector B), the relationship between years of job experience ($X$) and a job…
A study on working conditions analyzes, in two different professional sectors (Sector A and Sector B), the relationship between years of job experience ($X$) and a job satisfaction index ($Y$, from 1 to 10 points). Three observations are collected in each sector:
-
Sector A: $(1, 5)$, $(2, 6)$, and $(3, 7)$.
-
Sector B: $(7, 1)$, $(8, 2)$, and $(9, 3)$.
- a) Deduce, without the need to calculate variances, the linear correlation coefficient for Sector A ($r_A$) and for Sector B ($r_B$), justifying your deduction from the functional relationship observed in each group.
- b) An analyst decides to combine the two groups into a single overall sample of 6 observations. Calculate in detail the marginal means $\bar{x}$ and $\bar{y}$, the standard deviations $\sigma_x$ and $\sigma_y$, the overall covariance $\sigma_{xy}$, and the overall correlation coefficient $r_{\text{global}}$.
- c) Interpret the result obtained: how is it possible that within each sector the linear correlation is perfect and positive ($r = 1$), but when merging both sectors the overall coefficient turns out to be strongly negative? Reason what role the lurking qualitative variable «sector» plays in this apparent contradiction (known as Simpson's paradox).