linear regression - how to include curve functions into my scatterplot

or my task I have to:
  • Draw a scatter plot 'price' (y-axis) vs. 'distance center' (x-axis). Then estimate the relationship between these 2 variables for the values 1, 2, 3, 4, 5 and 6 of the variable 'number of people' (so that you end up with six regression functions in your scatterplot)


`First part is correct, but this part below I think is a bit wrong.

I have used the curve funktion and mod$coefficients,

but I am not sure on how to have 6 regression functions

for the values 1-6 of the variable number of people into my scatterplot`



Plot doeslook like this, but I am not sure if this is correct way. Would need 4 other regression functions if it was correct.


Less is more. Stay pure. Stay poor.
Are you trying to plot lines (models) or actual curves. Since I do not see any polynomials in your model.