Appex 10

STA 112 - Spring 2024

Part 1

  1. Copy the following template into RStudio Pro:
https://github.com/sta-112-s24/appex-10.git
  1. Load the packages and then examine the PorschePrice data frame
  2. Fit a linear model predicting a Porsche’s price from the mileage
  3. Examine the ANOVA table – what is the F statistic? What is the associated p-value? Why hypothesis is it testing?

Part 2

\[r^2 = \frac{\textrm{SSModel}}{\textrm{SSTotal}}\]

How could you calculate \(r^2\) if all you had was \(\textrm{SSTotal}\) and \(\textrm{SSE}\)?

Part 3

  1. Open appex-10.qmd
  2. Run summary on your model predicting Porsche price from mileage
  3. What is the \(r^2\)? How can you interpret this?

Part 4

  1. Open appex-10.qmd
  2. You are interested in the predicted Porsche Price for Porsche cars that have 50,000 miles previously driven on average. Calculate this value with an appropriate confidence interval.
  3. You are interested in the predicted Porsche Price for a particular Porsche with 40,000 miles previously driven. Calculate this value with an appropriate confidence interval.