Lab 08: Simple Linear Regression

Use the dataset penguins. Download the data and save the CSV file into your Lab08 directory (so that it is submit when you upload your Lab08 folder). Load the dataset into R.

Read the help file about penguins, to better understand the data set.

Please submit a folder containing your Quarto input (qmd) and output (html) documents for this lab, named Lab08, to our shared Google Drive folder when you are finished.

Choose two numerical variables of your choice.

  1. Of your two numerical variables, which variable is more likely to explain the other? Whichever you choose will go on the x-axis of your plot.

  2. Make a scatter plot of your numerical variables. Put the variable that you think is the more appropriate explanatory variable on the x-axis.

  3. State one interesting thing about your plot in context of the data.

  4. Fit linear regression to your two numerical variables, ensuring the x-axis variable goes in the appropriate spot of your code.

  5. Interpret the intercept in context of the data.

  6. Does this interpretation make sense?

  7. Interpret the slope in context of the data.

  8. Does this interpretation make sense?

  9. Perform an appropriate hypothesis test of the slope using \(\alpha = 0.01\). Please state your hypotheses.

  10. Based on your test, which hypothesis is more likely given the data? State your conclusion as either “reject H0” or “fail to reject H0”, and explain why this conclusion is appropriate.

  11. Interpret in context of the data your conclusion of the hypothesis test.