Premier League Predictor: Django & MySQL — Chapter 6, Exercise 2 ==================================================== TASK Explain why this chapter resolves the guest-averaging problem by averaging each guest's own points rather than averaging their raw predicted scorelines, using a concrete example of two guest scorelines that cannot be meaningfully averaged directly. SOLUTION A football scoreline only means something as a pair of whole numbers — "the home team scored this many, the away team scored that many." Averaging two different scorelines field by field doesn't reliably produce another valid scoreline, because there's no such thing as a fractional goal actually being scored on a pitch. Concrete example: one guest predicts 3-0, another predicts 0-2. Averaging directly gives (3+0)/2 = 1.5 for home and (0+2)/2 = 1 for away — "1.5-1," which isn't a result any real match could finish with. This chapter's own worked example (3-0 and 1-0) happens to average to a coincidentally valid-looking "2-0," but that's just an arithmetic accident of those particular numbers, not a reliable property of averaging scorelines in general — the 3-0/0-2 pairing shows the same operation breaking down completely with only slightly different inputs. Points, by contrast, carry no such pairing constraint — they're just plain integers. Each guest's prediction is scored individually by the exact same score_prediction() function used for every other source. In this chapter's worked example, Micah Richards' 3-0 and Jamie Carragher's 1-0 both correctly identified the real 2-1 as a home win without the exact score, so each earns 10 points under POINTS_CORRECT_RESULT. Averaging 10 and 10 gives 10 — a completely well-defined, meaningful number regardless of what the underlying scorelines actually were, since two ordinary integers always average to a third real number with no risk of landing on something impossible. WHY THIS WORKS AS AN ANSWER ---------------------------- It explains the structural reason a scoreline can't be meaningfully averaged (it only means something as a whole-number pair, and averaging pairs independently doesn't preserve that meaning), supplies a concrete pair of scorelines (3-0 and 0-2) that visibly breaks when averaged directly, and explains why points sidestep the problem entirely since a plain integer average is always well-defined.