A linear regression notebook on actual insurance records. Download the dataset, open the notebook, and see what the numbers say.
The dataset is real: medical insurance charges for about 1,300 people, with variables like age, BMI, smoking status, and region. Your job is to build a linear regression model that predicts insurance costs and understand what it tells you.
Two things to get before you start. The dataset, and the notebook. Both links are below.
Click the button below. Google Drive will open. Click the download icon in the top-right corner to save the file to your computer. The file is called insurance.csv.
Click the button below to open the notebook. You will need to be signed in to a Google account. Once the notebook is open, go to File → Save a copy in Drive so you have your own version to edit.
Open in Google ColabIn Colab, look at the left sidebar and click the folder icon. Then click the upload icon and select the insurance.csv file you just downloaded. It will appear in the file browser. The notebook will find it from there.
Run the cells from top to bottom using Shift + Enter. The notebook walks you through loading the data, fitting a model, and reading the results. Once you have run everything once, go back and experiment: change the input variables, try different combinations, see what happens to the predictions.