#R-help to exercise 3.1 in BSS
# Read the data into a dataframe and give names to the variables:
# Take a look at the data (make sure they correspond to those given in the exercise):
# Attach the dataframe (making the variables available):
# Make a plot of sale as a function of the number or dispensers:
# Inspect the plot. How is the relation between the number of dispensers and the coffee sale?
# Fit a straight line and draw it on the plot:
# How well does the straight line describe the relation between the number of dispensers and the coffee sale?
# Fit a second order polynomial (note that inside lm-command, we have to write the second order term inside I( ), # otherwise the sign ^ will be misinterpreted by R):
# Compute and draw the fitted second order polynomial:
# Do the straight line or the second order polynomial provide the best description of the relation between the number of dispensers and the coffee sale?