You are the analyst at Summit Gear Co. The collections team hands you one table of 2,200 B2B customers and one question: how long will each customer take to pay? They will use the expected days to decide who gets a call before the invoice is late. You specify the model, the AI fits it, and you decide what the fit means and whether to hand it over.
Then choose File > Save a copy in Drive and work in your copy. The copy that opens from the link does not save your work. If your U of U Google account cannot open Colab, a personal Google account can.
The data
- summit_gear_customers.csv: 2,200 customers, one row each. The notebook reads it from this link for you.
- The data dictionary: every column and its unit.
- summit_gear_customers_with_ols.xlsx: the same table in Excel, with two regressions already run. Optional. Its "All Column OLS" tab also includes
tenure_months, so its numbers differ slightly from your Exercise 1 fit.
The target is days_to_pay. The notebook starts you from ten numeric candidate predictors.
The three exercises
Exercise 1: Specify and fit
- Write the five-line model definition: the target, the predictors and their units, why each belongs, the look-ahead check, and the benchmark you have to beat.
- Have the AI write the
statsmodelsOLS ofdays_to_payon the ten candidates. Check that it ran on 2,200 rows with the ten names. - Read two coefficients as days per unit, holding the other predictors fixed. A dollar column reads better per $1,000. Say what R-squared tells collections, in one sentence.
Exercise 2: Clean the predictor set
- Have the AI build the correlation matrix of the ten candidates.
- Write
flag_collinear_pairsyourself. It lists the pairs that move together. - Keep one account-size column plus the four payment-behavior columns. Drop
avg_order_valueand the two noise columns: in the full fit, none of the three is distinguishable from zero. Re-fit and compare adjusted R-squared. - One paragraph: what was flagged, what you kept and why, and what adjusted R-squared did. If it fell, say what that tells you about the column you kept.
Exercise 3: Judge it on data the model has not seen
- Run the fixed split as given: 80% of the rows to fit, 20% to test.
- Have the AI fit your pruned model on the training rows and predict both the training rows and the test rows.
- Write
rmseyourself, then compare the model's test RMSE with the benchmark's and with the model's own train RMSE. The benchmark predicts the training mean for every customer. - One paragraph to the collections manager: would you hand it over, what is one thing this table cannot know, and how would you document an adjustment for it?
Ask the tutor
The tutor reads this box and the exercise. It can explain a statsmodels call or an error. It will not write your two helpers or your written answers for you.
What the tutor sees, and a prompt to copy into another AI tool
The preview shows the full prompt, including earlier turns of the conversation. Nothing on this page submits to Canvas.
What to submit
One file: your notebook, run top to bottom. In Colab choose File > Download > Download .ipynb, rename it <uID>_lab_10.ipynb with your uID in place of <uID>, and upload it to Lab 10 in Canvas. Then answer the short closing questions and submit the quiz.
Three checks before you submit
- Runtime > Restart session and run all. Every cell shows its output, and the Final check reads your latest work.
- The Final check prints
RESULTSwith nonullin it, and every row is green. - Your four written cells have your words in them, not the placeholder line.
How it is graded
Lab 10 is worth 100 points. A script reads the RESULTS your Final check prints and checks them against the key for the size column you kept. Any of the three size columns is accepted. It also runs your two helpers on inputs you have not seen. Your four written cells are read against a short rubric: the model definition, the interpretation, the justification, and the decision. The AI can write every fit. The reading is yours.
You may resubmit. The latest attempt is kept.