Two causes at once
Capacity explains three quarters of the waits. Amara adds urgent use of routine slots to the model, to see how far the two together could take the clinic.
- 09:00Fit the model with Astrid (Data Analyst)
- 11:00Try scenarios
- 15:00Share with Atticus (Sponsor)
Situation 1 of 2
09:00 · Fit the model with Astrid (Data Analyst)How many inputs should the model have?
Situation 2 of 2
15:00 · Share with Atticus (Sponsor)How do you answer?
Two causes at once
Astrid (Data Analyst) fits one model with both routine slots offered and urgent use of routine slots, for the same 20 weeks.
| Week | Routine slots offered | Urgent use of routine slots (%) | Median wait (days) |
|---|---|---|---|
| Week 1 | 259 | 11 | 8 |
| Week 2 | 261 | 13 | 9 |
| Week 3 | 270 | 15 | 8 |
| Week 4 | 265 | 11 | 7 |
| Week 5 | 254 | 14 | 9 |
| Week 6 | 262 | 10 | 8 |
| Week 7 | 259 | 14 | 9 |
| Week 8 | 263 | 12 | 8 |
| Week 9 | 254 | 11 | 8 |
| Week 10 | 263 | 12 | 9 |
| Week 11 | 263 | 12 | 8 |
| Week 12 | 240 | 12 | 10 |
| Week 13 | 234 | 8 | 10 |
| Week 14 | 235 | 14 | 11 |
| Week 15 | 225 | 10 | 11 |
| Week 16 | 243 | 18 | 12 |
| Week 17 | 222 | 13 | 12 |
| Week 18 | 238 | 16 | 13 |
| Week 19 | 230 | 12 | 12 |
| Week 20 | 228 | 15 | 13 |
- Model
wait = b0 + b1 × slots + b2 × urgent % - Fitted equation
wait = 30.94 − 0.1025 × slots + 0.339 × urgent % - Slots
−0.1025 days per slot; t = −12.6= p below 0.0001 - Urgent use
+0.34 days per percentage point; t = 6.2= p below 0.0001 - Fit
R² 0.924, adjusted R² 0.915 (allows for the extra term)= up from 0.75 - Typical error
standard deviation of the residuals= 0.55 days - Scenario: 262 slots, 6% urgent
30.94 − 0.1025 × 262 + 0.339 × 6; prediction interval ±1.43= 6.1 days - Scenario: 270 slots, 5% urgent
prediction interval ±1.52= 4.9 days
Try it yourself in a spreadsheet
| Fit | =LINEST(D2:D21,B2:C21,TRUE,TRUE) (two input columns together) |
| Or | Data, Data Analysis, Regression, with B and C as the inputs |
| Prediction | =INTERCEPT + slope1 × 270 + slope2 × 5, using the LINEST results |
Adjusted R² went from 0.75 (one input) to 0.915 (two). Why look at adjusted R² rather than R²?
Show the answer
R² always rises when you add an input, even a useless one. Adjusted R² only rises if the new input explains more than chance would.
Key concepts
The ideas behind today. Concept how the work is done, in our own words · Common practice widely used ways of working.
Several inputs
- Multiple regression estimates each input's effect while holding the others constant: y = b0 + b1 × x1 + b2 × x2.
Where you will meet this: Multiple linear regression
Adjusted R²
- R² always rises when an input is added. Adjusted R² only rises if the input explains more than chance would, so it's the fairer comparison.
Keep models lean
- Use inputs with a proven or likely cause, about 10 data points for each, and avoid inputs that measure the same thing.
Explained in our own words. This helps you understand the concepts behind the certifications; it does not reproduce or replace any official guide. Sources
Day 39 complete
2 situations today.
- In multiple regression, add only inputs that are significant and justified; watch adjusted R², not R².
- Use a model for scenarios inside the range of its data, and always give the prediction interval.