Appex 10
STA 112 - Spring 2024
Part 1
- Copy the following template into RStudio Pro:
https://github.com/sta-112-s24/appex-10.git
- Load the packages and then examine the
PorschePrice
data frame - Fit a linear model predicting a Porsche’s price from the mileage
- 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
- Open
appex-10.qmd
- Run
summary
on your model predicting Porsche price from mileage - What is the \(r^2\)? How can you interpret this?
Part 4
- Open
appex-10.qmd
- 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.
- 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.