Quick Quiz

Problem
You will use the iris dataset that comes with R by default. You can access this dataset simply by typing in iris in your R console. More information about the dataset is given here help(iris). You will find that it consists of 150 observations(rows) and 5 variables (columns), here we will only be interested in the petal length and petal width

head(iris)
##   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1          5.1         3.5          1.4         0.2  setosa
## 2          4.9         3.0          1.4         0.2  setosa
## 3          4.7         3.2          1.3         0.2  setosa
## 4          4.6         3.1          1.5         0.2  setosa
## 5          5.0         3.6          1.4         0.2  setosa
## 6          5.4         3.9          1.7         0.4  setosa

We aim here to predict the petal width given the petal length using simple linear regression so please answer the following question.
1. Comment about the scatter plot of the two variables.
2. Write down the estimated line equation.
3. Test the existence of the regression using two approaches.
4. Use the function hist() to draw a histogram of the residuals and comment.
5. Interpret the value of \(R^2\)