- Reading: Ch. 3.1-3.3
- Exercises to hand in from textbook: 2.12, 2.15, 2.30, 3.1, 3.2, 3.3
require(mosaic)
require(Stat2Data)
Exercise 2.12
Exercise 2.15
data(TextPrices)
head(TextPrices)
## Pages Price
## 1 600 95.00
## 2 91 19.95
## 3 200 51.50
## 4 400 128.50
## 5 521 96.00
## 6 315 48.50
# here is some code to get started (see the Intervals lab for examples)
m1 = lm(Price ~ Pages, data=TextPrices)
predict(m1, newdata=data.frame(Pages=450), interval="confidence")
## fit lwr upr
## 1 62.87549 51.73074 74.02024
predict(m1, newdata=data.frame(Pages=450), interval="prediction")
## fit lwr upr
## 1 62.87549 0.9035981 124.8474
Exercise 2.30
data(ChildSpeaks)
head(ChildSpeaks)
## Child Age Gesell
## 1 1 15 95
## 2 2 26 71
## 3 3 10 83
## 4 4 9 91
## 5 5 15 102
## 6 6 20 87
Exercise 3.1
Exercise 3.2
Exercise 3.3