---
title: "Exercises 11.1, 11.15, 11.44"
author: ""
date: ""
output: 
  html_document:
    fig_height: 3
    fig_width: 5
  pdf_document:
    fig_height: 3
    fig_width: 5
  word_document:
    fig_height: 3
    fig_width: 5
---

```{r, setup, include=FALSE}
require(mosaic)   # Load additional packages here 

# Some customization.  You can alter or delete as desired (if you know what you are doing).
trellis.par.set(theme=theme.mosaic()) # change default color scheme for lattice
knitr::opts_chunk$set(
  tidy=FALSE,     # display code as typed
  size="small")   # slightly smaller font for code
```

## Exercise 11.1, 11.15, 11.44

Import data set for Exercise 11.1:
```{r}
strength <- read.table("https://asta.math.aau.dk/datasets?file=strength.txt", header = TRUE)
head(strength)
```

You should answer the exercise by an analysis in RStudio.

Start by making relevant plot(s).
```{r}
## Write plot command(s) here. Hint: gf_point could be relevant...
```

Then fit the linear model in R:
```{r}
## Write a command like: 
## model = lm( ??? ~ ???, data = ??? )
## summary(model)
```

Now answer questions 11.1 (a) - (b) and 11.15.

You can visualize the regression line by filling out the following code:
```{r}
##  lm( ??? ~ ???, data = ??? ) %>% gf_lm()
```

In Exercise 11.44 (a), you need to find the correlation.
```{r}
## Write a command like: cor( ??? )
```

What does this correlation tell you?

Find $R^2$ and interpret the result.
