How much difference would it make?
Before choosing solutions, Amara wants to know how much each cause moves the wait. She starts with capacity.
- 09:00Fit the line with Astrid (Data Analyst)
- 11:00Check the residuals
- 15:00Predict with Augustin (Black Belt)
Situation 1 of 2
09:00 · Fit the line with Astrid (Data Analyst)What do you check?
Situation 2 of 2
15:00 · Predict with Augustin (Black Belt)Which interval fits his question?
How much does each routine slot shorten the wait?
Astrid (Data Analyst) fits a straight line through the 20 weeks: median wait against routine slots offered.
| 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 |
- Fit the line
least squares: the line that makes the squared vertical distances smallest - Equation
wait = 35.85 − 0.105 × slots - Slope
each extra routine slot a week= −0.105 days; 10 slots ≈ 1 day shorter - Is the slope real?
t = −0.1051 ÷ 0.0143= t = −7.36, p below 0.0001 - R²
share of the variation in weekly waits explained by slots= 0.75 - Residuals
actual − predicted; typical size 0.97 days, no pattern, roughly normal= model is reasonable - Prediction at 262 slots
35.85 − 0.105 × 262; 95% confidence interval for the average ±0.61, prediction interval for one week ±2.13= 8.3 days
Try it yourself in a spreadsheet
| Slope and intercept | =SLOPE(D2:D21,B2:B21) and =INTERCEPT(D2:D21,B2:B21) |
| R² | =RSQ(D2:D21,B2:B21) |
| Full output | =LINEST(D2:D21,B2:B21,TRUE,TRUE), or Data Analysis, Regression |
| Prediction | =FORECAST.LINEAR(262,D2:D21,B2:B21) |
Why is the prediction interval (±2.13) so much wider than the confidence interval (±0.61)?
Show the answer
The confidence interval is for the average wait of all weeks with 262 slots. The prediction interval is for one single week, which also varies around that average.
Key concepts
The ideas behind today. Concept how the work is done, in our own words · Common practice widely used ways of working.
Regression equations
- A regression line y = b0 + b1 × x fitted by least squares. The slope says how much the result changes for each unit of the input.
Where you will meet this: Simple linear regression · least squares
Residuals
- Residual = actual − predicted. They should look like random scatter around zero, roughly normal, with even spread. A pattern means the model is missing something.
Where you will meet this: Residual analysis
Confidence and prediction intervals
- A confidence interval shows where the average result lies for a given input. A prediction interval shows where one new result will probably fall, so it's wider. Predict only inside the range of the data.
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 38 complete
2 situations today.
- Check a regression three ways: is the slope significant, how much does it explain (R²), and do the residuals look random?
- A confidence interval is for the average; a prediction interval is for one new value, so it's wider.