You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 05-regression.qmd
+40-17Lines changed: 40 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -191,7 +191,7 @@ evals_ch5 %>%
191
191
slice_sample(n = 5) %>%
192
192
knitr::kable(
193
193
digits = 3,
194
-
caption = "A random sample of 5 out of the 463 courses at UT Austin",
194
+
#caption = "A random sample of 5 out of the 463 courses at UT Austin",
195
195
booktabs = TRUE,
196
196
format = "markdown"
197
197
) %>%
@@ -486,7 +486,7 @@ score_model
486
486
487
487
This output is telling us that the `Intercept` coefficient $b_0$ of the regression line is 3.8803, and the slope coefficient for `by_avg` is 0.0666. Therefore the blue regression line in @fig-numxplot4 is
@@ -597,7 +604,9 @@ What is the value on the blue line corresponding to this instructor's `bty_avg`
597
604
598
605
* Red circle: This is the *observed value* $y$ = `r y` and corresponds to this instructor's actual teaching score.
599
606
600
-
* Red square: This is the *fitted value* $\widehat{y}$ and corresponds to the value on the regression line for $x$ = `r x`. This value is computed using the intercept and slope in the regression table above: $$\widehat{y} = b_0 + b_1 \cdot x = `r coefs[1,1]` + `r coefs[2,1]` * `r x` = `r y_hat`$$
607
+
* Red square: This is the *fitted value* $\widehat{y}$ and corresponds to the value on the regression line for $x$ = `r x`. This value is computed using the intercept and slope in the regression table above:
* Blue arrow: The length of this arrow is the *residual* and is computed by subtracting the fitted value $\widehat{y}$ from the observed value $y$. The residual can be thought of as the error or "lack of fit" of the regression line. In the case of this instructor, it is $y - \widehat{y}$ = `r y` - `r y_hat` = `r y-y_hat`. In other words, the model was off by `r y-y_hat` teaching score units for this instructor.
0 commit comments