Simple Linear Regression

\[ y = \beta_0 + \beta_1 x + \varepsilon \]

Regression Model Form

\[ \hat{y} = \hat{\beta}_0 + \hat{\beta}_1 x \]

Data Table

##   screen_time_hours hw_minutes
## 1         7.9112744   97.89310
## 2         3.1819636   89.93836
## 3         0.9255822   88.35533
## 4         0.5579894   76.89658
## 5         1.9499951   80.40741
## 6         6.3360834   93.04363

Scatterplot

Code

summary(lm_hw)
## 
## Call:
## lm(formula = hw_minutes ~ screen_time_hours, data = study)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -15.9937  -2.7706  -0.0715   4.2182  13.0012 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        72.8757     1.8435  39.531  < 2e-16 ***
## screen_time_hours   3.1713     0.3859   8.218 2.33e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 6.412 on 43 degrees of freedom
## Multiple R-squared:  0.611,  Adjusted R-squared:  0.6019 
## F-statistic: 67.53 on 1 and 43 DF,  p-value: 2.334e-10

Fitted Line Plot

## `geom_smooth()` using formula = 'y ~ x'

Interactive Plotly Plot

## `geom_smooth()` using formula = 'y ~ x'

Residual Plot