Unit 4
Introduction
Welcome to Week 4 of BIO144!
Course book
This week we will be covering Chapter 4: Simple linear regression – Part 2 of the course book.
Code walkthrough
The R code of this week’s chapter is in a code walkthrough script, with a video walkthrough of it. Both are linked at the top of the course book chapter. Work through them before the practical: the last section of the script (“Practical toolbox”) shows code that this week’s practical uses but the chapter does not.
Learning objectives
These learning objectives, together with the content of the course book chapter, define what you need to know for the exam.
After this unit, students will be able to:
- Explain what the correlation coefficient (r) and R² each measure, and how they differ.
- Explain R² as the proportion of the total sum of squares explained by the model, and calculate it from the sums of squares.
- Use R to obtain r and R² for a simple linear regression, and interpret their values.
- Identify the null hypothesis tested by the t-test of a regression slope.
- Explain what a p-value is, and calculate the t-statistic of a slope as its estimate divided by its standard error.
- Explain how the number of degrees of freedom changes the t-distribution, and why fewer residual degrees of freedom give wider confidence intervals and larger p-values for the same t-statistic.
- Use R to test whether the estimated slope is compatible with zero or another specified value, and draw the appropriate conclusion.
- Use the residual degrees of freedom (n − 2) to obtain the critical t-value for a confidence interval and the p-value for a slope, and identify the degrees of freedom in R output.
- Use R to obtain a 95% confidence interval for the slope and intercept, and interpret it.
- Distinguish a confidence band from a prediction band, and explain why the prediction band is wider.
- Use
predict()to calculate the expected value of the response, with its confidence interval or prediction interval, for a new value of the explanatory variable. - Interpret the slope and intercept in the biological units of the study, including whether the intercept is biologically meaningful.
- Recognise a correct and complete statement of regression results that reports the estimate, its uncertainty and the test result.
- Evaluate whether a regression analysis supports a stated biological claim, considering R² versus statistical significance, extrapolation beyond the data, model diagnostics, and correlation versus causation.
Lecture
Please attend the lecture. If for any reason you can’t, please watch the podcast, which is available on OLAT.
Homework, Practical, and Weekly Quiz
Available here. You will need to be on a UZH network to access this link, so if you are not on campus, you will need to connect to the UZH VPN first.