Universit´e Joseph Fourier L2/STA230
Lab 13: Linear regression
Objectives: Realize some linear regressions and the associated confidence intervals and tests.
1 Linear regression
Exercise 1UploadHER.csv, we work with the diastolic column and the BMI column.
We want to realize a linear regression to study if the blood pressure is correlated to the BMI.
1. Which variable is theexplainingone ? Which variable is theexplainedone ? Which one is considered as deterministic ? Which one is considered as random ? We denote X the deterministic and explaining variable andY the random and explained variable.
2. Plot the scatter plot of the two variables. Comment 3. Write the equation for the regression line for Y ontoX.
4. Compute the correlation coefficient betweenX andY. Is there a strong correlation ? 5. Find the coefficients of the regression line.
6. Plot the regression line on the scatter plot. Comment.
7. Find the estimated variance of the regression. Comment.
8. What value would you predict for a person with BMI equal to 30 ? to 40 ? 9. Analyze the residuals.
10. Study if both blood pressures are correlated. Proceed exactly as before.