Skip to content

Commit

Permalink
Merge pull request #7 from raffaem/patch-1
Browse files Browse the repository at this point in the history
math proof for question 3
  • Loading branch information
danhalligan authored Aug 22, 2024
2 parents 73fb642 + 5660fd1 commit c6f40db
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions 03-linear-regression.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ the $K$ nearest neighbors.
> average than high school graduates provided that the GPA is high
> enough.
The model is:

$y = \beta_0 + \beta_1 \text{GPA} + \beta_2 \text{IQ} + \beta_3 \text{Level} + \beta_4 \text{GPA} \text{IQ} + \beta_5 \text{GPA} \text{Level}$

Fixing IQ and GPA, changing Level from 0 to 1 will change the outcome by:

$\Delta y = \beta_3 + \beta_5 \text{GPA}$

$\Delta y > 0 \Rightarrow \beta_3 + \beta_5 \text{GPA} > 0 \Rightarrow \text{GPA} > \dfrac{-\beta3}{\beta_5} = - \dfrac{35}{-10} = 3.5$

From a graphical standpoint:

```{r, message = FALSE, warning = FALSE}
library(plotly)
```
Expand Down

0 comments on commit c6f40db

Please sign in to comment.