04:00
Application Exercise
PorschePrice
data frame04:00
Often referred to as \(\color{#86a293}{r^2}\), it is the fraction of the response variability that is explained by the model.
Application Exercise
\[r^2 = \frac{\textrm{SSModel}}{\textrm{SSTotal}}\]
How could you calculate \(r^2\) if all you had was \(\textrm{SSTotal}\) and \(\textrm{SSE}\)?
01:00
Call:
lm(formula = battery_percent ~ screen_time, data = data)
Residuals:
Min 1Q Median 3Q Max
-61.818 -17.353 2.546 19.108 115.720
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 68.150787 2.503928 27.218 < 2e-16 ***
screen_time -0.022447 0.008347 -2.689 0.00735 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 24.53 on 630 degrees of freedom
Multiple R-squared: 0.01135, Adjusted R-squared: 0.009781
F-statistic: 7.233 on 1 and 630 DF, p-value: 0.007349
1.1% of the variation in the battery percent is explained by screen time.
Application Exercise
appex-10.qmd
summary
on your model predicting Porsche price from mileage03:00