Data for Exercise 9.21

Nicotine

## Format

A data frame/tibble with eight observations on two variables

nicotine

nicotine content (in milligrams)

sales

sales figures (in \$100,000)

## References

Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.

## Examples


model <- lm(sales ~ nicotine, data = Nicotine)
plot(sales ~ nicotine, data = Nicotine)
abline(model, col = "red")

summary(model)
#>
#> Call:
#> lm(formula = sales ~ nicotine, data = Nicotine)
#>
#> Residuals:
#>      Min       1Q   Median       3Q      Max
#> -29.3548  -6.3547  -0.3917   5.7778  27.0129
#>
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)
#> (Intercept)    24.90      15.37   1.620   0.1564
#> nicotine       33.09      14.78   2.238   0.0665 .
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 17.9 on 6 degrees of freedom
#> Multiple R-squared:  0.455,	Adjusted R-squared:  0.3641
#> F-statistic: 5.009 on 1 and 6 DF,  p-value: 0.06653
#>
predict(model, newdata = data.frame(nicotine = 1),
interval = "confidence", level = 0.99)
#>        fit      lwr      upr
#> 1 57.98711 34.34773 81.62648