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:
Plot a scatter plot with age on the xaxis and charges on the yaxis.
Using linearmodel.LinearRegression from sklearn, fit a model to your data, and make predictions on data.
Plot another scatter plot with the bestfit line.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
