All tutorials & labs

Validate a prediction model

Choose a threshold for limited follow-up, assess calibration in a later cohort, and explain why a change in predicted probabilities can leave discrimination unchanged.

Would you deploy this risk model?

A team can follow up 40 of every 100 people. A model estimates 30-day event risk using information available at enrollment. Validate its predictions in two illustrative cohorts of 100 people, with 20 people at each score.

First, try a 30% threshold and count who qualifies. Then raise it one step. Once the 40 places are filled, compare predicted and observed events in each cohort.

Reveal the answer and interpretation

At a 40% threshold, the two highest score groups qualify: 20 people in each group. The model expects 8 + 10 = 18 events among them. In the original cohort, 18 events occur. Switch to the later cohort to see whether the forecast still holds.

Calibration by risk group

0%0%20%20%40%40%60%60%Observed riskPredicted risk
Each dot represents 20 people. The dashed line marks perfect agreement.
PredictedObservedEvents / N
10%10%2 / 20
20%20%4 / 20
30%30%6 / 20
40%40%8 / 20
50%50%10 / 20

Choose a follow-up threshold

Select the lowest available threshold that keeps follow-up within capacity. People at or above your threshold receive follow-up.

People flagged60 / 100
Events captured24 / 30
Events missed6
Sensitivity80%
Positive predictive value40%
Interpret this validation

The observed proportions match the scores in this constructed cohort. Switch to the later cohort and examine whether the same scores still mean the same absolute risks.

Can better probabilities leave the ranking unchanged?

Keep the same 100 people and outcomes. Compare the original scores with a version that adds 10 percentage points to every prediction. Before switching, predict which will change: the expected event count, the ranking, or both.

Score comparison within the selected cohort
Expected / observed events30 / 30
Discrimination (AUC)0.690
Mean squared probability error (Brier score)0.190

Read chapter 13 on validation · Read chapter 14 on risk and fairness

Reveal the answer and interpretation

Adding the same amount to every score preserves every pairwise ranking, so AUC stays fixed within this cohort. AUC compares a person with an event to one without and gives half credit for tied scores. The Brier score measures probability error against individual outcomes; smaller values indicate better accuracy.

Here the original scores already match all five observed group risks. Adding 10 points raises the forecast from 30 to 40 events when 30 occur. Repeat the comparison in the later cohort.

Which assumption would you question in this exercise? Bring your question to the Learning Club