Milestone #3: Fitting a Simple Linear Model

Goal:

In this milestone we will start fitting our first simple model. Please report all your findings for this assignment in a R Markdown document.

Step 0:

Identify a numeric response variable in your data set and a numeric explanatory variable. (10 points)

response: Bill length

explanatory: Flipper length

Perform a simple linear regression analysis:

PenMod1 <- lm(flipper_length_mm ~ bill_length_mm,data = penguins)
summary(PenMod1)
## 
## Call:
## lm(formula = flipper_length_mm ~ bill_length_mm, data = penguins)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -43.708  -7.896   0.664   8.650  21.179 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    126.6844     4.6651   27.16   <2e-16 ***
## bill_length_mm   1.6901     0.1054   16.03   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.63 on 340 degrees of freedom
##   (2 observations deleted due to missingness)
## Multiple R-squared:  0.4306, Adjusted R-squared:  0.4289 
## F-statistic: 257.1 on 1 and 340 DF,  p-value: < 2.2e-16
## Analysis of Variance Table
## 
## Response: flipper_length_mm
##                 Df Sum Sq Mean Sq F value    Pr(>F)    
## bill_length_mm   1  29032 29032.1  257.09 < 2.2e-16 ***
## Residuals      340  38394   112.9                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Since the T-value is at the higher end and the P-value is low, we can assume that this model will be a good fit for the data. Just because the R^2 value was low did not loose the significance of the responds variable, just shows that there is a high variance level and that could be because we are looking at a biological statistics instead of mechanical. The F-value showed that there is high level of variance which is good for a linear regression. I can say that this model is a good fit model to proceed with analysis