Premier League Predictor: FastAPI & PostgreSQL — Chapter 1, Exercise 2 ==================================================== TASK Explain why this app averages multiple guest predictors into a single "guest" figure for weeks with more than one guest, rather than tracking each guest as a permanently separate predictor across the season. SOLUTION The "guest" slot is genuinely different from the other three prediction sources. The user, the BBC's expert, and the BBC's own AI predictions are all real, continuous predictors — the same identity, week after week, for the entire 38-gameweek season, which is exactly what the prediction league table (Chapter 8) needs to rank performance fairly over time. The guest slot has no such continuity. Some weeks have one guest, some weeks have more than one, and there's no guarantee any single guest ever appears again in a later gameweek. Tracking each individual guest as their own permanent row in the prediction league table would mean most "guest predictors" only ever have one or two gameweeks of data on record — not enough to meaningfully compare against a predictor who has been tracked continuously across the whole season, and it would also mean the table's own row count grows unpredictably as more one-off guests show up. Averaging every week's guest predictions into a single "guest" figure keeps that slot behaving like the other three — one consistent row in the prediction league table, updated every gameweek — while still genuinely reflecting whatever the actual guest(s) predicted that week, whether it was one person or several. WHY THIS WORKS AS AN ANSWER ---------------------------- It identifies the real structural difference between the guest slot and the other three predictors (no persistent identity across gameweeks), explains the concrete problem that would arise from tracking guests individually (a table with unstable, mostly-single-data-point rows), and connects the averaging decision directly to what the prediction league table in Chapter 8 actually needs to work correctly.