Problem 1

x <- c(5.6, 6.3, 7, 7.7, 8.4)
y <- c(8.8, 12.4, 14.8, 18.2, 20.8)

lm(y~x)
## 
## Call:
## lm(formula = y ~ x)
## 
## Coefficients:
## (Intercept)            x  
##     -14.800        4.257

Equation of regression line is y = 4.257x - 14.8

Problem 2

q2

q2

q2

q2

Problem 3

Step 1

Revenue = units sold * price per unit
R(x, y) = (81 - 21x + 17) * x + (40 + 11x -23y) * y
        = 81x + 40y + 28xy - 21x^2 -23y^2

Step 2

x <- 2.30
y <- 4.10
(81*x + 40*y + 28*x*y - 21*x^2 -23*y^2)
## [1] 116.62

Problem 4

q4

q4

Problem 5

q5

q5