Question: Create a Jupyter notebook file. Import the csv into your notebook. Use the data in the relevant columns to determine how age affects insurance costs:

Create a Jupyter notebook file.
Import the csv into your notebook. Use the data in the relevant columns to determine how age affects insurance costs:
1. Plot a scatter plot with age on the x-axis and charges on the y-axis.
2. Using linear_model.LinearRegression() from sklearn, fit a model to your data, and make predictions on data.
3. Plot another scatter plot with the best-fit line.
 Create a Jupyter notebook file. Import the csv into your notebook.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!